1 |
dfer |
1.15 |
C $Header: /u/gcmpack/MITgcm/pkg/dic/dic_surfforcing.F,v 1.14 2007/08/13 02:29:40 dfer Exp $ |
2 |
jmc |
1.6 |
C $Name: $ |
3 |
|
|
|
4 |
edhill |
1.4 |
#include "DIC_OPTIONS.h" |
5 |
stephd |
1.1 |
#include "PTRACERS_OPTIONS.h" |
6 |
|
|
#include "GCHEM_OPTIONS.h" |
7 |
|
|
|
8 |
stephd |
1.5 |
CBOP |
9 |
|
|
C !ROUTINE: DIC_SURFFORCING |
10 |
|
|
|
11 |
|
|
C !INTERFACE: ========================================================== |
12 |
stephd |
1.12 |
SUBROUTINE DIC_SURFFORCING( PTR_CO2 , PTR_ALK, PTR_PO4, GDC, |
13 |
stephd |
1.1 |
I bi,bj,imin,imax,jmin,jmax, |
14 |
|
|
I myIter,myTime,myThid) |
15 |
|
|
|
16 |
stephd |
1.5 |
C !DESCRIPTION: |
17 |
|
|
C Calculate the carbon air-sea flux terms |
18 |
|
|
C following external_forcing_dic.F (OCMIP run) from Mick |
19 |
|
|
|
20 |
|
|
C !USES: =============================================================== |
21 |
stephd |
1.1 |
IMPLICIT NONE |
22 |
|
|
#include "SIZE.h" |
23 |
|
|
#include "DYNVARS.h" |
24 |
|
|
#include "EEPARAMS.h" |
25 |
|
|
#include "PARAMS.h" |
26 |
|
|
#include "GRID.h" |
27 |
|
|
#include "FFIELDS.h" |
28 |
|
|
#include "DIC_ABIOTIC.h" |
29 |
|
|
|
30 |
stephd |
1.5 |
C !INPUT PARAMETERS: =================================================== |
31 |
|
|
C myThid :: thread number |
32 |
|
|
C myIter :: current timestep |
33 |
|
|
C myTime :: current time |
34 |
|
|
c PTR_CO2 :: DIC tracer field |
35 |
stephd |
1.1 |
INTEGER myIter, myThid |
36 |
|
|
_RL myTime |
37 |
|
|
_RL PTR_CO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
38 |
stephd |
1.12 |
_RL PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
39 |
|
|
_RL PTR_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
40 |
stephd |
1.5 |
INTEGER iMin,iMax,jMin,jMax, bi, bj |
41 |
|
|
|
42 |
|
|
C !OUTPUT PARAMETERS: =================================================== |
43 |
stephd |
1.8 |
c GDC :: tendency due to air-sea exchange |
44 |
stephd |
1.1 |
_RL GDC(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
45 |
|
|
|
46 |
|
|
#ifdef ALLOW_PTRACERS |
47 |
stephd |
1.5 |
|
48 |
|
|
C !LOCAL VARIABLES: ==================================================== |
49 |
stephd |
1.2 |
INTEGER I,J, kLev, it |
50 |
stephd |
1.1 |
C Number of iterations for pCO2 solvers... |
51 |
|
|
C Solubility relation coefficients |
52 |
|
|
_RL SchmidtNoDIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
53 |
|
|
_RL pCO2sat(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
54 |
|
|
_RL Kwexch(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
55 |
|
|
C local variables for carbon chem |
56 |
|
|
_RL surfalk(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
57 |
|
|
_RL surfphos(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
58 |
|
|
_RL surfsi(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
59 |
|
|
_RL VirtualFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
60 |
stephd |
1.5 |
CEOP |
61 |
stephd |
1.1 |
|
62 |
|
|
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
63 |
|
|
|
64 |
|
|
kLev=1 |
65 |
|
|
|
66 |
stephd |
1.13 |
c if coupled to atmsopheric model, use the |
67 |
|
|
c Co2 value passed from the coupler |
68 |
|
|
#ifndef USE_ATMOSCO2 |
69 |
stephd |
1.1 |
C PRE-INDUSTRIAL STEADY STATE pCO2 = 278.0 ppmv |
70 |
|
|
DO j=1-OLy,sNy+OLy |
71 |
|
|
DO i=1-OLx,sNx+OLx |
72 |
dfer |
1.15 |
AtmospCO2(i,j,bi,bj)=278.0 _d -6 |
73 |
stephd |
1.1 |
ENDDO |
74 |
|
|
ENDDO |
75 |
stephd |
1.13 |
#endif |
76 |
stephd |
1.1 |
|
77 |
|
|
|
78 |
|
|
C ================================================================= |
79 |
|
|
C determine inorganic carbon chem coefficients |
80 |
stephd |
1.10 |
DO j=jmin,jmax |
81 |
|
|
DO i=imin,imax |
82 |
stephd |
1.1 |
|
83 |
|
|
#ifdef DIC_BIOTIC |
84 |
|
|
cQQQQ check ptracer numbers |
85 |
stephd |
1.12 |
surfalk(i,j) = PTR_ALK(i,j,klev) |
86 |
stephd |
1.1 |
& * maskC(i,j,kLev,bi,bj) |
87 |
stephd |
1.12 |
surfphos(i,j) = PTR_PO4(i,j,klev) |
88 |
stephd |
1.1 |
& * maskC(i,j,kLev,bi,bj) |
89 |
|
|
#else |
90 |
dfer |
1.15 |
surfalk(i,j) = 2.366595 _d 0 * salt(i,j,kLev,bi,bj)/gsm_s |
91 |
stephd |
1.1 |
& * maskC(i,j,kLev,bi,bj) |
92 |
dfer |
1.15 |
surfphos(i,j) = 5.1225 _d -4 * maskC(i,j,kLev,bi,bj) |
93 |
stephd |
1.1 |
#endif |
94 |
|
|
C FOR NON-INTERACTIVE Si |
95 |
stephd |
1.3 |
surfsi(i,j) = SILICA(i,j,bi,bj) * maskC(i,j,kLev,bi,bj) |
96 |
stephd |
1.1 |
ENDDO |
97 |
|
|
ENDDO |
98 |
|
|
|
99 |
|
|
CALL CARBON_COEFFS( |
100 |
|
|
I theta,salt, |
101 |
|
|
I bi,bj,iMin,iMax,jMin,jMax) |
102 |
|
|
C==================================================================== |
103 |
|
|
|
104 |
|
|
c pCO2 solver... |
105 |
stephd |
1.3 |
C$TAF LOOP = parallel |
106 |
stephd |
1.10 |
DO j=jmin,jmax |
107 |
stephd |
1.3 |
C$TAF LOOP = parallel |
108 |
stephd |
1.10 |
DO i=imin,imax |
109 |
stephd |
1.1 |
|
110 |
|
|
IF(maskC(i,j,kLev,bi,bj) .NE. 0.)THEN |
111 |
|
|
CALL CALC_PCO2_APPROX( |
112 |
|
|
I theta(i,j,kLev,bi,bj),salt(i,j,kLev,bi,bj), |
113 |
|
|
I PTR_CO2(i,j,kLev), surfphos(i,j), |
114 |
|
|
I surfsi(i,j),surfalk(i,j), |
115 |
|
|
I ak1(i,j,bi,bj),ak2(i,j,bi,bj), |
116 |
|
|
I ak1p(i,j,bi,bj),ak2p(i,j,bi,bj),ak3p(i,j,bi,bj), |
117 |
|
|
I aks(i,j,bi,bj),akb(i,j,bi,bj),akw(i,j,bi,bj), |
118 |
|
|
I aksi(i,j,bi,bj),akf(i,j,bi,bj),ff(i,j,bi,bj), |
119 |
|
|
I bt(i,j,bi,bj),st(i,j,bi,bj),ft(i,j,bi,bj), |
120 |
|
|
U pH(i,j,bi,bj),pCO2(i,j,bi,bj) ) |
121 |
|
|
ELSE |
122 |
|
|
pCO2(i,j,bi,bj)=0. _d 0 |
123 |
|
|
END IF |
124 |
|
|
ENDDO |
125 |
|
|
ENDDO |
126 |
|
|
|
127 |
stephd |
1.10 |
DO j=jmin,jmax |
128 |
|
|
DO i=imin,imax |
129 |
stephd |
1.1 |
|
130 |
|
|
IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN |
131 |
|
|
C calculate SCHMIDT NO. for CO2 |
132 |
|
|
SchmidtNoDIC(i,j) = |
133 |
|
|
& sca1 |
134 |
|
|
& + sca2 * theta(i,j,kLev,bi,bj) |
135 |
|
|
& + sca3 * theta(i,j,kLev,bi,bj)*theta(i,j,kLev,bi,bj) |
136 |
|
|
& + sca4 * theta(i,j,kLev,bi,bj)*theta(i,j,kLev,bi,bj) |
137 |
|
|
& *theta(i,j,kLev,bi,bj) |
138 |
|
|
|
139 |
stephd |
1.13 |
c |
140 |
|
|
#ifdef USE_PLOAD |
141 |
dfer |
1.14 |
C Convert anomalous pressure pLoad (in Pa) from atmospheric model |
142 |
|
|
C to total pressure (in Atm) |
143 |
|
|
C Note: it is assumed the reference atmospheric pressure is 1Atm=1013mb |
144 |
|
|
C rather than the actual ref. pressure from Atm. model so that on |
145 |
|
|
C average AtmosP is about 1 Atm. |
146 |
dfer |
1.15 |
AtmosP(i,j,bi,bj)= 1. _d 0 + pLoad(i,j,bi,bj)/Pa2Atm |
147 |
stephd |
1.13 |
#endif |
148 |
|
|
|
149 |
stephd |
1.1 |
C Determine surface flux (FDIC) |
150 |
|
|
C first correct pCO2at for surface atmos pressure |
151 |
|
|
pCO2sat(i,j) = |
152 |
|
|
& AtmosP(i,j,bi,bj)*AtmospCO2(i,j,bi,bj) |
153 |
|
|
c find exchange coefficient |
154 |
|
|
c account for schmidt number and and varible piston velocity |
155 |
dfer |
1.15 |
pisvel(i,j,bi,bj)=0.337 _d 0 *wind(i,j,bi,bj)**2/3.6 _d 5 |
156 |
stephd |
1.1 |
Kwexch(i,j) = |
157 |
|
|
& pisvel(i,j,bi,bj) |
158 |
dfer |
1.15 |
& / sqrt(SchmidtNoDIC(i,j)/660.0 _d 0) |
159 |
stephd |
1.1 |
c OR use a constant coeff |
160 |
|
|
c Kwexch(i,j) = 5e-5 |
161 |
|
|
c ice influence |
162 |
dfer |
1.15 |
Kwexch(i,j) =(1. _d 0 - FIce(i,j,bi,bj))*Kwexch(i,j) |
163 |
stephd |
1.1 |
|
164 |
|
|
|
165 |
|
|
C Calculate flux in terms of DIC units using K0, solubility |
166 |
|
|
C Flux = Vp * ([CO2sat] - [CO2]) |
167 |
|
|
C CO2sat = K0*pCO2atmos*P/P0 |
168 |
|
|
C Converting pCO2 to [CO2] using ff, as in CALC_PCO2 |
169 |
stephd |
1.2 |
FluxCO2(i,j,bi,bj) = |
170 |
stephd |
1.1 |
& maskC(i,j,kLev,bi,bj)*Kwexch(i,j)*( |
171 |
|
|
& ak0(i,j,bi,bj)*pCO2sat(i,j) - |
172 |
|
|
& ff(i,j,bi,bj)*pCO2(i,j,bi,bj) |
173 |
|
|
& ) |
174 |
|
|
ELSE |
175 |
dfer |
1.15 |
FluxCO2(i,j,bi,bj) = 0. _d 0 |
176 |
stephd |
1.1 |
ENDIF |
177 |
|
|
C convert flux (mol kg-1 m s-1) to (mol m-2 s-1) |
178 |
stephd |
1.2 |
FluxCO2(i,j,bi,bj) = FluxCO2(i,j,bi,bj)/permil |
179 |
stephd |
1.1 |
|
180 |
|
|
IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN |
181 |
|
|
c calculate virtual flux |
182 |
|
|
c EminusPforV = dS/dt*(1/Sglob) |
183 |
|
|
C NOTE: Be very careful with signs here! |
184 |
|
|
C Positive EminusPforV => loss of water to atmos and increase |
185 |
|
|
C in salinity. Thus, also increase in other surface tracers |
186 |
|
|
C (i.e. positive virtual flux into surface layer) |
187 |
|
|
C ...so here, VirtualFLux = dC/dt! |
188 |
jmc |
1.7 |
VirtualFlux(i,j)=gsm_DIC*surfaceForcingS(i,j,bi,bj)/gsm_s |
189 |
stephd |
1.1 |
c OR |
190 |
|
|
c let virtual flux be zero |
191 |
|
|
c VirtualFlux(i,j)=0.d0 |
192 |
|
|
c |
193 |
|
|
ELSE |
194 |
|
|
VirtualFlux(i,j)=0. _d 0 |
195 |
|
|
ENDIF |
196 |
|
|
ENDDO |
197 |
|
|
ENDDO |
198 |
|
|
|
199 |
|
|
C update tendency |
200 |
stephd |
1.10 |
DO j=jmin,jmax |
201 |
|
|
DO i=imin,imax |
202 |
stephd |
1.9 |
GDC(i,j)= maskC(i,j,kLev,bi,bj)*recip_drF(kLev)* |
203 |
|
|
& recip_hFacC(i,j,kLev,bi,bj)*( |
204 |
stephd |
1.8 |
& FluxCO2(i,j,bi,bj) + VirtualFlux(i,j) |
205 |
stephd |
1.1 |
& ) |
206 |
|
|
ENDDO |
207 |
|
|
ENDDO |
208 |
|
|
|
209 |
|
|
#endif |
210 |
|
|
RETURN |
211 |
|
|
END |