/[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.2 - (hide annotations) (download)
Mon Oct 6 20:11:10 2003 UTC (20 years, 8 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint51j_post, checkpoint51h_pre, checkpoint51i_pre
Changes since 1.1: +0 -2 lines
changes to keep current with gchem pkg, and to be adjointable

1 stephd 1.1 #include "CPP_OPTIONS.h"
2     #include "GCHEM_OPTIONS.h"
3    
4     CStartOfInterFace
5     SUBROUTINE O2_SURFFORCING( PTR_O2, GO2,
6     I bi,bj,iMin,iMax,jMin,jMax,
7     I myIter, myTime, myThid )
8     C /==========================================================\
9     C | SUBROUTINE O2_SURFFORCING |
10     C | o Calculate the oxygen air-sea flux terms |
11     C | o following external_forcing_o2.F from Mick |
12     C |==========================================================|
13     IMPLICIT NONE
14    
15     C == GLobal variables ==
16     #include "SIZE.h"
17     #include "DYNVARS.h"
18     #include "EEPARAMS.h"
19     #include "PARAMS.h"
20     #include "GRID.h"
21     #include "FFIELDS.h"
22     #ifdef DIC_BIOTIC
23     #include "DIC_ABIOTIC.h"
24     #include "PTRACERS.h"
25     #endif
26    
27    
28     C == Routine arguments ==
29     INTEGER myIter, myThid
30     _RL myTime
31     _RL PTR_O2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
32     _RL GO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
33     INTEGER iMin,iMax,jMin,jMax, bi, bj
34    
35     #ifdef ALLOW_PTRACERS
36    
37    
38     C == Local variables ==
39     C I, J, K - Loop counters
40     INTEGER I,J,K
41     C Solubility relation coefficients
42     _RL SchmidtNoO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43     _RL O2sat(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44     _RL Kwexch(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45     _RL FluxO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46     _RL AtmosO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47     _RL aTT
48     _RL aTK
49     _RL aTS
50     _RL aTS2
51     _RL aTS3
52     _RL aTS4
53     _RL aTS5
54     _RL o2s
55     _RL ttemp
56     _RL stemp
57     _RL oCnew
58    
59    
60     K=1
61    
62     C calculate SCHMIDT NO. for O2
63     DO j=jMin,jMax
64     DO i=iMin,iMax
65     IF (hFacC(i,j,k,bi,bj).NE.0.) THEN
66     SchmidtNoO2(i,j) =
67     & sox1
68     & + sox2 * theta(i,j,k,bi,bj)
69     & + sox3 * theta(i,j,k,bi,bj)*theta(i,j,k,bi,bj)
70     & + sox4 * theta(i,j,k,bi,bj)*theta(i,j,k,bi,bj)
71     & *theta(i,j,k,bi,bj)
72    
73     C Determine surface flux of O2
74     C exchange coeff, accounting for ice cover and Schmidt no.
75     Kwexch(i,j) =
76     & pisvel(i,j,bi,bj)
77     & / sqrt(SchmidtNoO2(i,j)/660.0)
78     c ice influence
79     cQQ Kwexch(i,j) =(1.d0-Fice(i,j,bi,bj))*Kwexch(i,j)
80    
81     ttemp = theta(i,j,k,bi,bj)
82     stemp = salt(i,j,k,bi,bj)
83     C determine saturation O2
84     C using Garcia and Gordon (1992), L&O (mistake in original???)
85     aTT = 298.15-ttemp
86     aTK = 273.15+ttemp
87     aTS = log(aTT/aTK)
88     aTS2 = aTS*aTS
89     aTS3 = aTS2*aTS
90     aTS4 = aTS3*aTS
91     aTS5 = aTS4*aTS
92    
93     oCnew = oA0 + oA1*aTS + oA2*aTS2 + oA3*aTS3 +
94     & oA4*aTS4 + oA5*aTS5
95     & + stemp*(oB0 + oB1*aTS + oB2*aTS2 + oB3*aTS3)
96     & + oC0*(stemp*stemp)
97    
98     o2s = EXP(oCnew)
99    
100     c Convert from ml/l to mol/m^3
101     O2sat(i,j) = o2s/22391.6*1000.0
102    
103     c Determine flux, inc. correction for local atmos surface pressure
104     cQQ PTR_O2?
105     FluxO2(i,j) = maskC(i,j,k,bi,bj)*Kwexch(i,j)*
106     & (atmosP(i,j,bi,bj)*O2sat(i,j)
107     & - PTR_O2(i,j,1))
108     ELSE
109     FluxO2(i,j) = 0.d0
110     ENDIF
111    
112    
113     END DO
114     END DO
115    
116     C update surface tendencies
117     DO j=jMin,jMax
118     DO i=iMin,iMax
119     GO2(i,j)= maskC(i,j,1,bi,bj)*FluxO2(i,j)*recip_drF(1)
120     ENDDO
121     ENDDO
122     #endif
123    
124    
125     RETURN
126     END
127    

  ViewVC Help
Powered by ViewVC 1.1.22