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

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

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


Revision 1.3 - (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.2: +3 -68 lines
changes to keep current with gchem pkg, and to be adjointable

1 stephd 1.1 #include "CPP_OPTIONS.h"
2     #include "PTRACERS_OPTIONS.h"
3     #include "GCHEM_OPTIONS.h"
4    
5     CStartOfInterFace
6     SUBROUTINE DIC_SURFFORCING( PTR_CO2 , GDC,
7     I bi,bj,imin,imax,jmin,jmax,
8     I myIter,myTime,myThid)
9    
10     C /==========================================================\
11     C | SUBROUTINE DIC_SURFFORCING |
12     C | o Calculate the carbon air-sea flux terms |
13     C | o following external_forcing_dic.F from Mick |
14     C |==========================================================|
15     IMPLICIT NONE
16    
17     C == GLobal variables ==
18     #include "SIZE.h"
19     #include "DYNVARS.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "GRID.h"
23     #include "FFIELDS.h"
24     #include "DIC_ABIOTIC.h"
25     #ifdef DIC_BIOTIC
26     #include "PTRACERS.h"
27     #endif
28    
29     C == Routine arguments ==
30     INTEGER myIter, myThid
31     _RL myTime
32     _RL PTR_CO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
33     _RL GDC(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
34     INTEGER iMin,iMax,jMin,jMax, bi, bj
35    
36     #ifdef ALLOW_PTRACERS
37     C == Local variables ==
38 stephd 1.2 INTEGER I,J, kLev, it
39 stephd 1.1 C Number of iterations for pCO2 solvers...
40     C Solubility relation coefficients
41     _RL SchmidtNoDIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42     _RL pCO2sat(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43     _RL Kwexch(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44     C local variables for carbon chem
45     _RL surfalk(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46     _RL surfphos(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47     _RL surfsi(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
48     _RL VirtualFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49    
50     cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
51    
52     kLev=1
53    
54     C PRE-INDUSTRIAL STEADY STATE pCO2 = 278.0 ppmv
55     DO j=1-OLy,sNy+OLy
56     DO i=1-OLx,sNx+OLx
57     AtmospCO2(i,j,bi,bj)=278.0d-6
58     ENDDO
59     ENDDO
60    
61    
62     C =================================================================
63     C determine inorganic carbon chem coefficients
64     DO j=1-OLy,sNy+OLy
65     DO i=1-OLx,sNx+OLx
66    
67     #ifdef DIC_BIOTIC
68     cQQQQ check ptracer numbers
69     surfalk(i,j) = PTRACER(i,j,klev,bi,bj,2)
70     & * maskC(i,j,kLev,bi,bj)
71     surfphos(i,j) = PTRACER(i,j,klev,bi,bj,3)
72     & * maskC(i,j,kLev,bi,bj)
73     #else
74     surfalk(i,j) = 2.366595 * salt(i,j,kLev,bi,bj)/gsm_s
75     & * maskC(i,j,kLev,bi,bj)
76     surfphos(i,j) = 5.1225e-4 * maskC(i,j,kLev,bi,bj)
77     #endif
78     C FOR NON-INTERACTIVE Si
79 stephd 1.3 surfsi(i,j) = SILICA(i,j,bi,bj) * maskC(i,j,kLev,bi,bj)
80 stephd 1.1 ENDDO
81     ENDDO
82    
83     CALL CARBON_COEFFS(
84     I theta,salt,
85     I bi,bj,iMin,iMax,jMin,jMax)
86     C====================================================================
87    
88     c pCO2 solver...
89 stephd 1.3 C$TAF LOOP = parallel
90 stephd 1.1 DO j=1-OLy,sNy+OLy
91 stephd 1.3 C$TAF LOOP = parallel
92 stephd 1.1 DO i=1-OLx,sNx+OLx
93    
94     IF(maskC(i,j,kLev,bi,bj) .NE. 0.)THEN
95     CALL CALC_PCO2_APPROX(
96     I theta(i,j,kLev,bi,bj),salt(i,j,kLev,bi,bj),
97     I PTR_CO2(i,j,kLev), surfphos(i,j),
98     I surfsi(i,j),surfalk(i,j),
99     I ak1(i,j,bi,bj),ak2(i,j,bi,bj),
100     I ak1p(i,j,bi,bj),ak2p(i,j,bi,bj),ak3p(i,j,bi,bj),
101     I aks(i,j,bi,bj),akb(i,j,bi,bj),akw(i,j,bi,bj),
102     I aksi(i,j,bi,bj),akf(i,j,bi,bj),ff(i,j,bi,bj),
103     I bt(i,j,bi,bj),st(i,j,bi,bj),ft(i,j,bi,bj),
104     U pH(i,j,bi,bj),pCO2(i,j,bi,bj) )
105     ELSE
106     pCO2(i,j,bi,bj)=0. _d 0
107     END IF
108     ENDDO
109     ENDDO
110    
111     DO j=1-OLy,sNy+OLy
112     DO i=1-OLx,sNx+OLx
113    
114     IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN
115     C calculate SCHMIDT NO. for CO2
116     SchmidtNoDIC(i,j) =
117     & sca1
118     & + sca2 * theta(i,j,kLev,bi,bj)
119     & + sca3 * theta(i,j,kLev,bi,bj)*theta(i,j,kLev,bi,bj)
120     & + sca4 * theta(i,j,kLev,bi,bj)*theta(i,j,kLev,bi,bj)
121     & *theta(i,j,kLev,bi,bj)
122    
123     C Determine surface flux (FDIC)
124     C first correct pCO2at for surface atmos pressure
125     pCO2sat(i,j) =
126     & AtmosP(i,j,bi,bj)*AtmospCO2(i,j,bi,bj)
127     c find exchange coefficient
128     c account for schmidt number and and varible piston velocity
129     Kwexch(i,j) =
130     & pisvel(i,j,bi,bj)
131     & / sqrt(SchmidtNoDIC(i,j)/660.0)
132     c OR use a constant coeff
133     c Kwexch(i,j) = 5e-5
134     c ice influence
135     cQQ Kwexch(i,j) =(1.d0-Fice(i,j,bi,bj))*Kwexch(i,j)
136    
137    
138     C Calculate flux in terms of DIC units using K0, solubility
139     C Flux = Vp * ([CO2sat] - [CO2])
140     C CO2sat = K0*pCO2atmos*P/P0
141     C Converting pCO2 to [CO2] using ff, as in CALC_PCO2
142 stephd 1.2 FluxCO2(i,j,bi,bj) =
143 stephd 1.1 & maskC(i,j,kLev,bi,bj)*Kwexch(i,j)*(
144     & ak0(i,j,bi,bj)*pCO2sat(i,j) -
145     & ff(i,j,bi,bj)*pCO2(i,j,bi,bj)
146     & )
147     ELSE
148 stephd 1.2 FluxCO2(i,j,bi,bj) = 0.
149 stephd 1.1 ENDIF
150     C convert flux (mol kg-1 m s-1) to (mol m-2 s-1)
151 stephd 1.2 FluxCO2(i,j,bi,bj) = FluxCO2(i,j,bi,bj)/permil
152 stephd 1.1
153     IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN
154     c calculate virtual flux
155     c EminusPforV = dS/dt*(1/Sglob)
156     C NOTE: Be very careful with signs here!
157     C Positive EminusPforV => loss of water to atmos and increase
158     C in salinity. Thus, also increase in other surface tracers
159     C (i.e. positive virtual flux into surface layer)
160     C ...so here, VirtualFLux = dC/dt!
161     VirtualFlux(i,j)=gsm_DIC*surfaceTendencyS(i,j,bi,bj)/gsm_s
162     c OR
163     c let virtual flux be zero
164     c VirtualFlux(i,j)=0.d0
165     c
166     ELSE
167     VirtualFlux(i,j)=0. _d 0
168     ENDIF
169     ENDDO
170     ENDDO
171    
172     C update tendency
173     DO j=1-OLy,sNy+OLy
174     DO i=1-OLx,sNx+OLx
175     GDC(i,j)= maskC(i,j,kLev,bi,bj)*(
176 stephd 1.2 & FluxCO2(i,j,bi,bj)*recip_drF(kLev)
177 stephd 1.1 & + VirtualFlux(i,j)
178     & )
179     ENDDO
180     ENDDO
181    
182     #endif
183     RETURN
184     END

  ViewVC Help
Powered by ViewVC 1.1.22