/[MITgcm]/MITgcm/pkg/dic/o2_surfforcing.F
ViewVC logotype

Annotation of /MITgcm/pkg/dic/o2_surfforcing.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.11 - (hide annotations) (download)
Tue Nov 28 21:16:03 2006 UTC (17 years, 6 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint58u_post, checkpoint58w_post, checkpoint58x_post, checkpoint58t_post, checkpoint59a, checkpoint59, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post
Changes since 1.10: +1 -3 lines
o changes to make dic code more adjoint friendly:
      - standardize how tracers are passed from dic_biotic_forcing to
        other subroutines
      - add a tanh function to take the place of min(x,y) in bio_export.F
        and fe_chem.F.

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

  ViewVC Help
Powered by ViewVC 1.1.22