/[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.3 - (hide annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52e_pre, checkpoint51o_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint51l_post, checkpoint51q_post, hrcube_1, branch-netcdf, checkpoint52d_pre, checkpoint51r_post, checkpoint52b_pre, checkpoint51o_post, checkpoint51p_post, checkpoint52a_pre, checkpoint51i_post, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint52f_post, checkpoint52c_post, checkpoint51l_pre, ecco_c52_e35, checkpoint52i_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_2, hrcube_3, checkpoint51m_post, checkpoint51s_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch, netcdf-sm0
Changes since 1.2: +1 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 edhill 1.3 #include "DIC_OPTIONS.h"
2 stephd 1.1 #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