1 |
C $Header: /u/gcmpack/MITgcm/pkg/dic/o2_surfforcing.F,v 1.21 2008/04/07 20:31:17 dfer Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "DIC_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: O2_SURFFORCING |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE O2_SURFFORCING( PTR_O2, SGO2, |
11 |
I bi,bj,iMin,iMax,jMin,jMax, |
12 |
I myIter, myTime, myThid ) |
13 |
|
14 |
C !DESCRIPTION: |
15 |
C Calculate the oxygen air-sea flux terms |
16 |
|
17 |
C !USES: =============================================================== |
18 |
IMPLICIT NONE |
19 |
#include "SIZE.h" |
20 |
#include "DYNVARS.h" |
21 |
#include "EEPARAMS.h" |
22 |
#include "PARAMS.h" |
23 |
#include "GRID.h" |
24 |
#include "FFIELDS.h" |
25 |
#include "DIC_VARS.h" |
26 |
|
27 |
c !INPUT PARAMETERS: =================================================== |
28 |
C myThid :: thread number |
29 |
C myIter :: current timestep |
30 |
C myTime :: current time |
31 |
C PTR_O2 :: oxygen tracer field |
32 |
_RL myTime |
33 |
_RL PTR_O2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
34 |
INTEGER iMin,iMax,jMin,jMax, bi, bj |
35 |
INTEGER myIter, myThid |
36 |
|
37 |
c !OUTPUT PARAMETERS: =================================================== |
38 |
C SGO2 :: air-sea exchange of oxygen |
39 |
_RL SGO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
40 |
|
41 |
#ifdef ALLOW_PTRACERS |
42 |
|
43 |
#ifdef ALLOW_O2 |
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 |
|
109 |
C Determine flux, inc. correction for local atmos surface pressure |
110 |
FluxO2(i,j) = Kwexch(i,j)* |
111 |
& (AtmosP(i,j,bi,bj)*O2sat(i,j) |
112 |
& - PTR_O2(i,j,K)) |
113 |
ELSE |
114 |
FluxO2(i,j) = 0. _d 0 |
115 |
ENDIF |
116 |
|
117 |
|
118 |
END DO |
119 |
END DO |
120 |
|
121 |
C update surface tendencies |
122 |
DO j=jmin,jmax |
123 |
DO i=imin,imax |
124 |
SGO2(i,j)= FluxO2(i,j) |
125 |
& *recip_drF(K) * recip_hFacC(i,j,K,bi,bj) |
126 |
ENDDO |
127 |
ENDDO |
128 |
#endif |
129 |
#endif |
130 |
|
131 |
|
132 |
RETURN |
133 |
END |
134 |
|