14 |
C ================================================================= |
C ================================================================= |
15 |
C | subroutine bling_airseaflux |
C | subroutine bling_airseaflux |
16 |
C | o Calculate the carbon and oxygen air-sea flux terms |
C | o Calculate the carbon and oxygen air-sea flux terms |
17 |
C | Adapted from pkg/dic/ |
C | Adapted from pkg/dic/dic_surfforcing.F |
18 |
C | - Get atmospheric pCO2 value |
C | - Get atmospheric pCO2 value |
19 |
C | Option 1: constant value, default 268.d-6, can be changed in |
C | Option 1: constant value, default 268.d-6, can be changed in |
20 |
C | data.bling |
C | data.bling |
21 |
C | Option 2: read 2D field using EXF pkg |
C | Option 2: read 2D field using EXF pkg |
22 |
|
C | - Update pCO2 and pH |
23 |
C ================================================================= |
C ================================================================= |
24 |
|
|
25 |
implicit none |
implicit none |
132 |
DO j=jmin,jmax |
DO j=jmin,jmax |
133 |
DO i=imin,imax |
DO i=imin,imax |
134 |
C Compute Kwexch_Pre which is re-used for flux of O2 |
C Compute Kwexch_Pre which is re-used for flux of O2 |
|
caxx Atmos pressure is assumed to be 1 atm |
|
135 |
|
|
136 |
c Read EXF winds instead of value from file: |
c Read EXF winds instead of value from file: |
137 |
#ifdef ALLOW_EXF |
#ifdef ALLOW_EXF |
198 |
pCO2sat(i,j) = bling_pCO2 |
pCO2sat(i,j) = bling_pCO2 |
199 |
#endif |
#endif |
200 |
|
|
|
#ifndef BLING_ADJOINT_SAFE |
|
201 |
c Correct for atmospheric pressure |
c Correct for atmospheric pressure |
202 |
|
#ifdef USE_EXF_ATMPRES |
203 |
|
C Atm pressure in N/m2, convert to bars |
204 |
|
pCO2sat(i,j) = pCO2sat(i,j)*(apressure(i,j,bi,bj)*0.00001) |
205 |
|
#else |
206 |
pCO2sat(i,j) = pCO2sat(i,j)*AtmosP(i,j,bi,bj) |
pCO2sat(i,j) = pCO2sat(i,j)*AtmosP(i,j,bi,bj) |
207 |
#endif |
#endif |
208 |
|
|
209 |
C then account for Schmidt number |
C then account for Schmidt number |
210 |
Kwexch(i,j) = Kwexch_Pre(i,j) |
Kwexch(i,j) = Kwexch_Pre(i,j) |
281 |
O2sat(i,j) = o2s/22391.6 _d 0 * 1. _d 3 |
O2sat(i,j) = o2s/22391.6 _d 0 * 1. _d 3 |
282 |
|
|
283 |
C Determine flux, inc. correction for local atmos surface pressure |
C Determine flux, inc. correction for local atmos surface pressure |
284 |
|
#ifdef USE_EXF_ATMPRES |
285 |
|
C Atm pressure in N/m2, convert to bars |
286 |
|
FluxO2(i,j) = Kwexch_o2(i,j)*( |
287 |
|
& (apressure(i,j,bi,bj)*0.00001) |
288 |
|
& *O2sat(i,j) - PTR_O2(i,j,1) ) |
289 |
|
#else |
290 |
FluxO2(i,j) = Kwexch_o2(i,j)* |
FluxO2(i,j) = Kwexch_o2(i,j)* |
291 |
& (AtmosP(i,j,bi,bj)*O2sat(i,j) |
& (AtmosP(i,j,bi,bj)*O2sat(i,j) |
292 |
& - PTR_O2(i,j,1)) |
& - PTR_O2(i,j,1)) |
293 |
|
#endif |
294 |
ELSE |
ELSE |
295 |
FluxO2(i,j) = 0. _d 0 |
FluxO2(i,j) = 0. _d 0 |
296 |
ENDIF |
ENDIF |