| 1 |
jahn |
1.1 |
#include "CPP_OPTIONS.h" |
| 2 |
|
|
#include "PTRACERS_OPTIONS.h" |
| 3 |
|
|
#include "DARWIN_OPTIONS.h" |
| 4 |
|
|
|
| 5 |
|
|
#ifdef ALLOW_PTRACERS |
| 6 |
|
|
#ifdef ALLOW_DARWIN |
| 7 |
|
|
|
| 8 |
|
|
#ifdef ALLOW_CARBON |
| 9 |
|
|
|
| 10 |
|
|
CBOP |
| 11 |
|
|
C !ROUTINE: O2_SURFFORCING |
| 12 |
|
|
|
| 13 |
|
|
C !INTERFACE: ========================================================== |
| 14 |
|
|
SUBROUTINE DIC_O2_SURFFORCING( PTR_O2, SGO2, |
| 15 |
|
|
I bi,bj,iMin,iMax,jMin,jMax, |
| 16 |
|
|
I myIter, myTime, myThid ) |
| 17 |
|
|
|
| 18 |
|
|
C !DESCRIPTION: |
| 19 |
|
|
C Calculate the oxygen air-sea flux terms |
| 20 |
|
|
|
| 21 |
|
|
C !USES: =============================================================== |
| 22 |
|
|
IMPLICIT NONE |
| 23 |
|
|
#include "SIZE.h" |
| 24 |
|
|
#include "DYNVARS.h" |
| 25 |
|
|
#include "EEPARAMS.h" |
| 26 |
|
|
#include "PARAMS.h" |
| 27 |
|
|
#include "GRID.h" |
| 28 |
|
|
#include "FFIELDS.h" |
| 29 |
|
|
#include "DARWIN_FLUX.h" |
| 30 |
|
|
|
| 31 |
|
|
c !INPUT PARAMETERS: =================================================== |
| 32 |
|
|
C myThid :: thread number |
| 33 |
|
|
C myIter :: current timestep |
| 34 |
|
|
C myTime :: current time |
| 35 |
|
|
C PTR_O2 :: oxygen tracer field |
| 36 |
|
|
_RL myTime |
| 37 |
|
|
_RL PTR_O2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
| 38 |
|
|
INTEGER iMin,iMax,jMin,jMax, bi, bj |
| 39 |
|
|
INTEGER myIter, myThid |
| 40 |
|
|
|
| 41 |
|
|
c !OUTPUT PARAMETERS: =================================================== |
| 42 |
|
|
C SGO2 :: air-sea exchange of oxygen |
| 43 |
|
|
_RL SGO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 44 |
|
|
|
| 45 |
|
|
C !LOCAL VARIABLES: =================================================== |
| 46 |
|
|
C I, J, K - Loop counters |
| 47 |
|
|
INTEGER I,J,K |
| 48 |
|
|
C Solubility relation coefficients |
| 49 |
|
|
_RL SchmidtNoO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 50 |
|
|
_RL O2sat(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 51 |
|
|
_RL Kwexch(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 52 |
|
|
_RL FluxO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 53 |
|
|
_RL aTT |
| 54 |
|
|
_RL aTK |
| 55 |
|
|
_RL aTS |
| 56 |
|
|
_RL aTS2 |
| 57 |
|
|
_RL aTS3 |
| 58 |
|
|
_RL aTS4 |
| 59 |
|
|
_RL aTS5 |
| 60 |
|
|
_RL o2s |
| 61 |
|
|
_RL ttemp |
| 62 |
|
|
_RL stemp |
| 63 |
|
|
_RL oCnew |
| 64 |
|
|
CEOP |
| 65 |
|
|
|
| 66 |
|
|
|
| 67 |
|
|
K=1 |
| 68 |
|
|
|
| 69 |
|
|
C calculate SCHMIDT NO. for O2 |
| 70 |
|
|
DO j=jmin,jmax |
| 71 |
|
|
DO i=imin,imax |
| 72 |
|
|
IF (maskC(i,j,k,bi,bj).NE.0.) THEN |
| 73 |
|
|
ttemp = theta(i,j,k,bi,bj) |
| 74 |
|
|
stemp = salt(i,j,k,bi,bj) |
| 75 |
|
|
|
| 76 |
|
|
SchmidtNoO2(i,j) = |
| 77 |
|
|
& sox1 |
| 78 |
|
|
& + sox2 * ttemp |
| 79 |
|
|
& + sox3 * ttemp*ttemp |
| 80 |
|
|
& + sox4 * ttemp*ttemp*ttemp |
| 81 |
|
|
|
| 82 |
|
|
C Determine surface flux of O2 |
| 83 |
|
|
C exchange coeff accounting for ice cover and Schmidt no. |
| 84 |
|
|
C Kwexch_Pre= pisvel*(1-fice): previously computed in dic_surfforcing.F |
| 85 |
|
|
|
| 86 |
|
|
Kwexch(i,j) = Kwexch_Pre(i,j,bi,bj) |
| 87 |
|
|
& / sqrt(SchmidtNoO2(i,j)/660.0 _d 0) |
| 88 |
|
|
|
| 89 |
|
|
C determine saturation O2 |
| 90 |
|
|
C using Garcia and Gordon (1992), L&O (mistake in original???) |
| 91 |
|
|
aTT = 298.15 _d 0 -ttemp |
| 92 |
|
|
aTK = 273.15 _d 0 +ttemp |
| 93 |
|
|
aTS = log(aTT/aTK) |
| 94 |
|
|
aTS2 = aTS*aTS |
| 95 |
|
|
aTS3 = aTS2*aTS |
| 96 |
|
|
aTS4 = aTS3*aTS |
| 97 |
|
|
aTS5 = aTS4*aTS |
| 98 |
|
|
|
| 99 |
|
|
oCnew = oA0 + oA1*aTS + oA2*aTS2 + oA3*aTS3 + |
| 100 |
|
|
& oA4*aTS4 + oA5*aTS5 |
| 101 |
|
|
& + stemp*(oB0 + oB1*aTS + oB2*aTS2 + oB3*aTS3) |
| 102 |
|
|
& + oC0*(stemp*stemp) |
| 103 |
|
|
|
| 104 |
|
|
o2s = EXP(oCnew) |
| 105 |
|
|
|
| 106 |
|
|
c Convert from ml/l to mol/m^3 |
| 107 |
|
|
O2sat(i,j) = o2s/22391.6 _d 0 * 1. _d 3 |
| 108 |
|
|
c convert from mol/m3 to mmol/m3 |
| 109 |
|
|
O2sat(i,j) = O2sat(i,j)*1. _d 3 |
| 110 |
|
|
|
| 111 |
|
|
C Determine flux, inc. correction for local atmos surface pressure |
| 112 |
|
|
FluxO2(i,j) = Kwexch(i,j)* |
| 113 |
|
|
& (AtmosP(i,j,bi,bj)*O2sat(i,j) |
| 114 |
|
|
& - PTR_O2(i,j,K)) |
| 115 |
|
|
ELSE |
| 116 |
|
|
FluxO2(i,j) = 0. _d 0 |
| 117 |
|
|
ENDIF |
| 118 |
|
|
|
| 119 |
|
|
|
| 120 |
|
|
END DO |
| 121 |
|
|
END DO |
| 122 |
|
|
|
| 123 |
|
|
C update surface tendencies |
| 124 |
|
|
DO j=jmin,jmax |
| 125 |
|
|
DO i=imin,imax |
| 126 |
|
|
SGO2(i,j)= FluxO2(i,j) |
| 127 |
|
|
& *recip_drF(K) * recip_hFacC(i,j,K,bi,bj) |
| 128 |
|
|
ENDDO |
| 129 |
|
|
ENDDO |
| 130 |
|
|
|
| 131 |
|
|
|
| 132 |
|
|
RETURN |
| 133 |
|
|
END |
| 134 |
|
|
#endif /*ALLOW_CARBON*/ |
| 135 |
|
|
|
| 136 |
|
|
#endif /*DARWIN*/ |
| 137 |
|
|
#endif /*ALLOW_PTRACERS*/ |
| 138 |
|
|
c ================================================================== |
| 139 |
|
|
|
| 140 |
|
|
|