4 |
#include "BLING_OPTIONS.h" |
#include "BLING_OPTIONS.h" |
5 |
|
|
6 |
CBOP |
CBOP |
7 |
subroutine BLING_MAIN( PTR_DIC, PTR_ALK, PTR_NUT, |
subroutine BLING_MAIN( PTR_DIC, PTR_ALK, PTR_O2, PTR_NO3, |
8 |
& PTR_DOM, PTR_O2, PTR_FE, |
& PTR_PO4, PTR_FE, PTR_DON, PTR_DOP, |
9 |
|
#ifdef ADVECT_PHYTO |
10 |
|
& PTR_PHY, |
11 |
|
#endif |
12 |
& bi, bj, imin, imax, jmin, jmax, |
& bi, bj, imin, imax, jmin, jmax, |
13 |
& myIter, myTime, myThid) |
& myIter, myTime, myThid) |
14 |
|
|
31 |
#ifdef ALLOW_EXF |
#ifdef ALLOW_EXF |
32 |
# include "EXF_FIELDS.h" |
# include "EXF_FIELDS.h" |
33 |
#endif |
#endif |
34 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF |
35 |
# include "tamc.h" |
# include "tamc.h" |
36 |
#endif |
#endif |
37 |
|
|
49 |
C === Input === |
C === Input === |
50 |
C PTR_DIC :: dissolved inorganic carbon |
C PTR_DIC :: dissolved inorganic carbon |
51 |
C PTR_ALK :: alkalinity |
C PTR_ALK :: alkalinity |
52 |
C PTR_NUT :: macro-nutrient concentration |
C PTR_NO3 :: nitrate concentration |
53 |
C PTR_DOM :: dissolved organic matter concentration |
C PTR_PO4 :: phosphate concentration |
54 |
|
C PTR_DON :: dissolved organic nitrogen concentration |
55 |
|
C PTR_DOP :: dissolved organic phosphorus concentration |
56 |
C PTR_O2 :: oxygen concentration |
C PTR_O2 :: oxygen concentration |
57 |
C PTR_FE :: iron concentration |
C PTR_FE :: iron concentration |
58 |
|
C PTR_PHY :: total phytoplankton biomass |
59 |
_RL PTR_DIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL PTR_DIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
60 |
_RL PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
61 |
_RL PTR_NUT(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL PTR_NO3(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
62 |
_RL PTR_DOM(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL PTR_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
_RL PTR_O2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
63 |
_RL PTR_FE (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL PTR_FE (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
64 |
|
_RL PTR_O2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
65 |
|
_RL PTR_DON(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
66 |
|
_RL PTR_DOP(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
67 |
|
#ifdef ADVECT_PHYTO |
68 |
|
_RL PTR_PHY(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
69 |
|
#endif |
70 |
|
|
71 |
C === Local variables === |
C === Local variables === |
72 |
C i,j,k :: loop indices |
C i,j,k :: loop indices |
73 |
C G* :: tendency term for the tracers |
C G_xx :: tendency term for the tracers |
74 |
C SURC :: tendency of DIC due to air-sea exchange |
C surf_DIC :: tendency of DIC due to air-sea exchange |
75 |
C SURO :: tendency of O2 due to air-sea exchange |
C surf_O2 :: tendency of O2 due to air-sea exchange |
76 |
C NUT_uptake :: nutrient uptake for biological production |
C runoff_bgc :: tendency due to river runoff |
|
C POM_prod :: nutrient converted to particulate |
|
|
C organic matter |
|
|
C DOM_prod :: nutrient converted to dissolved organic |
|
|
C matter |
|
|
C DOM_remin :: DOM remineralization |
|
|
C POM_remin :: POM sinking and instant remineralization |
|
|
C NUT_remin :: Total nutrient remineralization |
|
|
C NUT_recyc :: Fast nutrient recycling |
|
|
C Fe_uptake :: iron converted to particulate organic or |
|
|
C inorganic (colloidal) iron |
|
|
C Fe_remin :: particulate iron converted to total iron |
|
|
C CaCO3_prod :: uptake of carbonate ions for CaCO3 formation |
|
|
C CaCO3_diss :: dissolution of CaCO3 |
|
|
C Car :: carbonate ion biological production |
|
|
C BioUp :: DIC biological production (<0) |
|
|
C Remin :: DIC remineralization |
|
|
C runoff* :: tendency due to river runoff |
|
77 |
|
|
78 |
INTEGER i,j,k |
INTEGER i,j,k |
79 |
_RL GDIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_DIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
80 |
_RL GALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
81 |
_RL GNUT(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_NO3(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
82 |
_RL GDOM(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
83 |
_RL GO2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_FE (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
84 |
_RL GFE (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_O2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
85 |
_RL SURC(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL G_DON(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
86 |
_RL SURO(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL G_DOP(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
87 |
_RL NUT_uptake(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_CaCO3(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
88 |
_RL NUT_remin (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
#ifdef ADVECT_PHYTO |
89 |
_RL NUT_recyc (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL G_PHY(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
90 |
_RL POM_remin (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
#endif |
91 |
_RL POM_diss (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL bio_DIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
92 |
_RL POM_prod (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL surf_DIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
93 |
_RL DOM_prod (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL surf_O2(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
94 |
_RL DOM_remin (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL irr_eff(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
95 |
_RL CaCO3_prod(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL mld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
96 |
_RL CaCO3_diss(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
cxx _RL runoff_bgc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,PTRACERS_num) |
97 |
_RL Fe_uptake (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL runoff_bgc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,8) |
|
_RL Fe_remin (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
|
_RL runoff_dic(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL runoff_alk(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL runoff_nut(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL runoff_dom(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL runoff_o2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL runoff_fe (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL BioUp (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
|
_RL Remin (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
|
_RL Car (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
|
|
|
98 |
CEOP |
CEOP |
99 |
|
|
100 |
C----------------------------------------------------------- |
c----------------------------------------------------------- |
101 |
C Initialize local variables |
c Initialize local variables |
102 |
|
|
103 |
DO k=1,Nr |
DO j=jmin,jmax |
104 |
DO j=1-OLy,sNy+OLy |
DO i=imin,imax |
105 |
DO i=1-OLx,sNx+OLx |
DO k=1,Nr |
106 |
GDIC(i,j,k) = 0. _d 0 |
G_DIC(i,j,k) = 0. _d 0 |
107 |
GALK(i,j,k) = 0. _d 0 |
G_ALK(i,j,k) = 0. _d 0 |
108 |
GNUT(i,j,k) = 0. _d 0 |
G_NO3(i,j,k) = 0. _d 0 |
109 |
GDOM(i,j,k) = 0. _d 0 |
G_PO4(i,j,k) = 0. _d 0 |
110 |
GO2(i,j,k) = 0. _d 0 |
G_FE(i,j,k) = 0. _d 0 |
111 |
GFE(i,j,k) = 0. _d 0 |
G_O2(i,j,k) = 0. _d 0 |
112 |
NUT_uptake(i,j,k) = 0. _d 0 |
G_DON(i,j,k) = 0. _d 0 |
113 |
NUT_remin(i,j,k) = 0. _d 0 |
G_DOP(i,j,k) = 0. _d 0 |
114 |
NUT_recyc(i,j,k) = 0. _d 0 |
G_CaCO3(i,j,k) = 0. _d 0 |
115 |
DOM_remin(i,j,k) = 0. _d 0 |
#ifdef ADVECT_PHYTO |
116 |
POM_remin(i,j,k) = 0. _d 0 |
G_PHY(i,j,k) = 0. _d 0 |
117 |
DOM_prod(i,j,k) = 0. _d 0 |
#endif |
118 |
POM_prod(i,j,k) = 0. _d 0 |
irr_eff(i,j,k) = 0. _d 0 |
119 |
CaCO3_prod(i,j,k) = 0. _d 0 |
ENDDO |
120 |
CaCO3_diss(i,j,k) = 0. _d 0 |
cxx DO k=1,PTRACERS_num |
121 |
Fe_uptake(i,j,k) = 0. _d 0 |
DO k=1,8 |
122 |
Fe_remin(i,j,k) = 0. _d 0 |
runoff_bgc(i,j,k) = 0. _d 0 |
123 |
BioUp(i,j,k) = 0. _d 0 |
ENDDO |
124 |
Remin(i,j,k) = 0. _d 0 |
bio_DIC(i,j,k) = 0. _d 0 |
125 |
Car(i,j,k) = 0. _d 0 |
surf_DIC(i,j) = 0. _d 0 |
126 |
ENDDO |
surf_O2(i,j) = 0. _d 0 |
127 |
ENDDO |
mld(i,j) = 0. _d 0 |
|
ENDDO |
|
|
DO j=1-OLy,sNy+OLy |
|
|
DO i=1-OLx,sNx+OLx |
|
|
SURC(i,j) = 0. _d 0 |
|
|
SURO(i,j) = 0. _d 0 |
|
|
runoff_dic(i,j) = 0. _d 0 |
|
|
runoff_alk(i,j) = 0. _d 0 |
|
|
runoff_nut(i,j) = 0. _d 0 |
|
|
runoff_dom(i,j) = 0. _d 0 |
|
|
runoff_o2(i,j) = 0. _d 0 |
|
|
runoff_fe(i,j) = 0. _d 0 |
|
|
ENDDO |
|
128 |
ENDDO |
ENDDO |
129 |
|
ENDDO |
130 |
C----------------------------------------------------------- |
|
131 |
C carbon and oxygen air-sea interaction |
c----------------------------------------------------------- |
132 |
|
c carbon and oxygen air-sea interaction |
133 |
CALL BLING_AIRSEAFLUX( |
CALL BLING_AIRSEAFLUX( |
134 |
I PTR_DIC, PTR_ALK, PTR_NUT, PTR_O2, |
I PTR_DIC, PTR_ALK, PTR_O2, |
135 |
U SURC, SURO, |
I PTR_NO3, PTR_PO4, |
136 |
|
U surf_DIC, surf_O2, |
137 |
I bi, bj, imin, imax, jmin, jmax, |
I bi, bj, imin, imax, jmin, jmax, |
138 |
I myIter, myTime, myThid) |
I myIter, myTime, myThid) |
139 |
|
|
140 |
C$TAF STORE irr_mem = comlev1, key = ikey_dynamics, kind=isbyte |
cxx C$TAF STORE irr_inst = comlev1, key = ikey_dynamics, kind=isbyte |
141 |
C$TAF STORE irr_inst = comlev1, key = ikey_dynamics, kind=isbyte |
C$TAF STORE irr_mem = comlev1, key = ikey_dynamics, kind=isbyte |
142 |
C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte |
#ifndef ADVECT_PHYTO |
143 |
C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte |
C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte |
144 |
|
C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte |
145 |
|
C$TAF STORE P_diaz = comlev1, key = ikey_dynamics, kind=isbyte |
146 |
|
#endif |
147 |
|
|
148 |
C----------------------------------------------------------- |
c----------------------------------------------------------- |
149 |
C biological production of organic matter |
c determine calcite saturation for remineralization |
|
CALL BLING_PROD( |
|
|
I PTR_NUT, PTR_FE, PTR_DOM, PTR_O2, |
|
|
U NUT_uptake, POM_prod, DOM_prod, |
|
|
U Fe_uptake, CaCO3_prod, |
|
|
I bi, bj, imin, imax, jmin, jmax, |
|
|
I myIter, myTime, myThid) |
|
|
|
|
|
C----------------------------------------------------------- |
|
|
C determine calcite saturation for use in bling_remin |
|
150 |
CALL BLING_CARBONATE_SYS( |
CALL BLING_CARBONATE_SYS( |
151 |
I PTR_DIC, PTR_ALK, PTR_NUT, |
I PTR_DIC, PTR_ALK, PTR_PO4, |
152 |
I bi, bj, imin, imax, jmin, jmax, |
I bi, bj, imin, imax, jmin, jmax, |
153 |
I myIter, myTime, myThid) |
I myIter, myTime, myThid) |
154 |
|
|
155 |
|
|
156 |
C----------------------------------------------------------- |
C----------------------------------------------------------- |
157 |
C flux of NUT, CaCO3, and Fe from remineralization |
C biological activity |
158 |
CALL BLING_REMIN( |
CALL BLING_PROD( |
159 |
I PTR_O2, PTR_FE, |
I PTR_NO3, PTR_PO4, PTR_FE, |
160 |
U POM_prod, Fe_uptake, CaCO3_prod, |
I PTR_O2, PTR_DON, PTR_DOP, |
161 |
U POM_remin, POM_diss, Fe_remin, CaCO3_diss, |
#ifdef ADVECT_PHYTO |
162 |
I bi, bj, imin, imax, jmin, jmax, |
PTR_PHY, |
163 |
I myIter, myTime, myThid) |
#endif |
164 |
|
U G_NO3, G_PO4, G_FE, |
165 |
|
U G_O2, G_DON, G_DOP, G_CACO3, |
166 |
|
I bi, bj, imin, imax, jmin, jmax, |
167 |
|
I myIter, myTime, myThid) |
168 |
|
|
169 |
|
|
170 |
|
#ifndef ADVECT_PHYTO |
171 |
C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte |
C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte |
172 |
C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte |
C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte |
173 |
|
C$TAF STORE P_diaz = comlev1, key = ikey_dynamics, kind=isbyte |
174 |
|
#endif |
175 |
|
|
176 |
|
|
177 |
C----------------------------------------------------------- |
C----------------------------------------------------------- |
178 |
C Calculate river runoff source |
C Calculate river runoff source |
179 |
C Tracers are already diluted by freswater input, P-E+R |
C Tracers are already diluted by freswater input, P-E+R |
180 |
C This accounts for tracer concentration in river runoff |
C This accounts for tracer concentration in river runoff |
|
DO j=jmin,jmax |
|
|
DO i=imin,imax |
|
|
#ifdef ALLOW_EXF |
|
|
runoff_dic(i,j) = riverconc_DIC*runoff(i,j,bi,bj) |
|
|
& *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
|
|
runoff_alk(i,j) = riverconc_ALK*runoff(i,j,bi,bj) |
|
|
& *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
|
|
runoff_nut(i,j) = riverconc_NUT*runoff(i,j,bi,bj) |
|
|
& *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
|
|
runoff_dom(i,j) = riverconc_DOM*runoff(i,j,bi,bj) |
|
|
& *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
|
|
runoff_o2(i,j) = riverconc_O2 *runoff(i,j,bi,bj) |
|
|
& *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
|
|
runoff_fe(i,j) = riverconc_FE *runoff(i,j,bi,bj) |
|
|
& *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
|
|
C else it is 0 as initialized |
|
|
#endif |
|
|
ENDDO |
|
|
ENDDO |
|
181 |
|
|
182 |
C----------------------------------------------------------- |
cxx DO k=1,PTRACERS_num |
183 |
C add all tendencies |
DO k=1,8 |
184 |
DO k=1,Nr |
DO j=jmin,jmax |
185 |
DO j=jmin,jmax |
DO i=imin,imax |
186 |
DO i=imin,imax |
|
187 |
|
c#ifdef ALLOW_EXF |
188 |
|
c runoff_bgc(i,j,k) = river_conc_trac(k)*runoff(i,j,bi,bj) |
189 |
|
c & *recip_drF(1)*recip_hFacC(i,j,1,bi,bj) |
190 |
|
c#else |
191 |
|
c runoff_bgc(i,j,k) = 0. _d 0 |
192 |
|
c#endif |
193 |
|
|
194 |
C Dissolved organic matter slow remineralization |
ENDDO |
195 |
#ifdef BLING_NO_NEG |
ENDDO |
196 |
DOM_remin(i,j,k) = MAX(maskC(i,j,k,bi,bj)*gamma_DOM |
ENDDO |
197 |
& *PTR_DOM(i,j,k),0. _d 0) |
|
198 |
#else |
|
199 |
DOM_remin(i,j,k) = maskC(i,j,k,bi,bj)*gamma_DOM |
|
200 |
& *PTR_DOM(i,j,k) |
c --------------------------------------------------------------------- |
201 |
#endif |
|
202 |
C Total nutrient remin, recycling |
|
203 |
NUT_remin(i,j,k) = POM_remin(i,j,k) + DOM_remin(i,j,k) |
c Carbon system |
204 |
NUT_recyc(i,j,k) = NUT_uptake(i,j,k) - POM_prod(i,j,k) |
cxx check |
205 |
& - DOM_prod(i,j,k) |
|
206 |
|
DO j=jmin,jmax |
207 |
C Carbon system diagnostics |
DO i=imin,imax |
208 |
C Change in DIC from primary production, from recycling and |
DO k=1,Nr |
209 |
C remineralization, change in carbonate ions concentration |
|
210 |
C from biological activity: |
IF (hFacC(i,j,k,bi,bj) .gt. 0. _d 0) THEN |
|
BioUp(i,j,k) = -NUT_uptake(i,j,k)*CtoP/NUTfac |
|
|
Remin(i,j,k) = (DOM_remin(i,j,k) + NUT_recyc(i,j,k) |
|
|
& + POM_remin(i,j,k))*CtoP/NUTfac |
|
|
Car(i,j,k) = CaCO3_diss(i,j,k) - CaCO3_prod(i,j,k) |
|
|
|
|
|
C Tendencies |
|
|
GNUT(i,j,k) = -NUT_uptake(i,j,k) + NUT_recyc(i,j,k) |
|
|
& + DOM_remin(i,j,k) + POM_remin(i,j,k) |
|
|
|
|
|
GDOM(i,j,k) = DOM_prod(i,j,k) - DOM_remin(i,j,k) |
|
|
& + POM_diss(i,j,k) |
|
|
|
|
|
GALK(i,j,k) = 2. _d 0*Car(i,j,k) - NtoP/NUTfac*GNUT(i,j,k) |
|
|
|
|
|
GDIC(i,j,k) = BioUp(i,j,k) + Remin(i,j,k) + Car(i,j,k) |
|
|
|
|
|
if ( PTR_O2(i,j,k) .GT. O2_min ) then |
|
|
GO2(i,j,k) = O2toP/NUTfac*GNUT(i,j,k) |
|
|
else |
|
|
GO2(i,j,k) = 0. _d 0 |
|
|
endif |
|
211 |
|
|
212 |
GFE(i,j,k) = Fe_remin(i,j,k) - Fe_uptake(i,j,k) |
G_ALK(i,j,k) = - G_NO3(i,j,k) |
213 |
|
& + 2. _d 0*G_CaCO3(i,j,k) |
214 |
|
|
215 |
|
G_DIC(i,j,k) = CtoN * G_NO3(i,j,k) |
216 |
|
& + G_CaCO3(i,j,k) |
217 |
|
|
218 |
|
|
219 |
|
c For diagnostics |
220 |
|
bio_DIC(i,j,k) = G_DIC(i,j,k) |
221 |
|
|
222 |
|
ENDIF |
223 |
|
|
224 |
|
ENDDO |
225 |
|
ENDDO |
226 |
|
ENDDO |
227 |
|
|
228 |
|
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDDO |
|
229 |
|
|
230 |
C----------------------------------------------------------- |
C----------------------------------------------------------- |
231 |
C adding surface tendencies due to air-sea exchange |
C adding surface tendencies due to air-sea exchange |
232 |
C adding surface tendencies due to river runoff |
C adding surface tendencies due to river runoff |
233 |
C adding aeolian iron source |
C adding aeolian iron source |
234 |
|
|
235 |
DO j=jmin,jmax |
DO j=jmin,jmax |
236 |
DO i=imin,imax |
DO i=imin,imax |
237 |
GDIC(i,j,1)=GDIC(i,j,1)+runoff_dic(i,j)+SURC(i,j) |
G_DIC(i,j,1) = G_DIC(i,j,1) + runoff_bgc(i,j,1) |
238 |
GALK(i,j,1)=GALK(i,j,1)+runoff_alk(i,j) |
& + surf_DIC(i,j) |
239 |
GNUT(i,j,1)=GNUT(i,j,1)+runoff_nut(i,j) |
G_ALK(i,j,1) = G_ALK(i,j,1) + runoff_bgc(i,j,2) |
240 |
GDOM(i,j,1)=GDOM(i,j,1)+runoff_dom(i,j) |
G_NO3(i,j,1) = G_NO3(i,j,1) + runoff_bgc(i,j,3) |
241 |
GO2(i,j,1) =GO2(i,j,1) +runoff_o2(i,j) +SURO(i,j) |
G_PO4(i,j,1) = G_PO4(i,j,1) + runoff_bgc(i,j,4) |
242 |
GFE(i,j,1) =GFE(i,j,1) +runoff_fe(i,j) |
G_FE(i,j,1) = G_FE(i,j,1) + runoff_bgc(i,j,5) |
243 |
& +alpfe*InputFe(i,j,bi,bj)*recip_drF(1) |
& + alpfe*InputFe(i,j,bi,bj)*recip_drF(1) |
244 |
& *recip_hFacC(i,j,1,bi,bj) |
& * recip_hFacC(i,j,1,bi,bj) |
245 |
|
G_O2(i,j,1) = G_O2(i,j,1) + runoff_bgc(i,j,6) |
246 |
|
& + surf_O2(i,j) |
247 |
|
G_DON(i,j,1) = G_DON(i,j,1) + runoff_bgc(i,j,7) |
248 |
|
G_DOP(i,j,1) = G_DOP(i,j,1) + runoff_bgc(i,j,8) |
249 |
ENDDO |
ENDDO |
250 |
ENDDO |
ENDDO |
251 |
|
|
254 |
DO k=1,Nr |
DO k=1,Nr |
255 |
DO j=jmin,jmax |
DO j=jmin,jmax |
256 |
DO i=imin,imax |
DO i=imin,imax |
257 |
PTR_DIC(i,j,k)= PTR_DIC(i,j,k)+GDIC(i,j,k)*PTRACERS_dTLev(k) |
PTR_DIC(i,j,k)=PTR_DIC(i,j,k)+G_DIC(i,j,k)*PTRACERS_dTLev(k) |
258 |
PTR_ALK(i,j,k)= PTR_ALK(i,j,k)+GALK(i,j,k)*PTRACERS_dTLev(k) |
PTR_ALK(i,j,k)=PTR_ALK(i,j,k)+G_ALK(i,j,k)*PTRACERS_dTLev(k) |
259 |
PTR_NUT(i,j,k)= PTR_NUT(i,j,k)+GNUT(i,j,k)*PTRACERS_dTLev(k) |
PTR_NO3(i,j,k)=PTR_NO3(i,j,k)+G_NO3(i,j,k)*PTRACERS_dTLev(k) |
260 |
PTR_DOM(i,j,k)= PTR_DOM(i,j,k)+GDOM(i,j,k)*PTRACERS_dTLev(k) |
PTR_PO4(i,j,k)=PTR_PO4(i,j,k)+G_PO4(i,j,k)*PTRACERS_dTLev(k) |
261 |
PTR_O2(i,j,k) = PTR_O2(i,j,k) +GO2(i,j,k) *PTRACERS_dTLev(k) |
PTR_FE (i,j,k)=PTR_FE (i,j,k)+G_FE (i,j,k)*PTRACERS_dTLev(k) |
262 |
PTR_FE(i,j,k) = PTR_FE(i,j,k) +GFE(i,j,k) *PTRACERS_dTLev(k) |
PTR_O2 (i,j,k)=PTR_O2 (i,j,k)+G_O2 (i,j,k)*PTRACERS_dTLev(k) |
263 |
|
PTR_DON(i,j,k)=PTR_DON(i,j,k)+G_DON(i,j,k)*PTRACERS_dTLev(k) |
264 |
|
PTR_DOP(i,j,k)=PTR_DOP(i,j,k)+G_DOP(i,j,k)*PTRACERS_dTLev(k) |
265 |
|
#ifdef ADVECT_PHYTO |
266 |
|
PTR_PHY(i,j,k)=PTR_PHY(i,j,k)+G_PHY(i,j,k)*PTRACERS_dTLev(k) |
267 |
|
#endif |
268 |
ENDDO |
ENDDO |
269 |
ENDDO |
ENDDO |
270 |
ENDDO |
ENDDO |
272 |
C----------------------------------------------------------- |
C----------------------------------------------------------- |
273 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
274 |
IF ( useDiagnostics ) THEN |
IF ( useDiagnostics ) THEN |
275 |
CALL DIAGNOSTICS_FILL(BioUp ,'BLGBIOA ',0,Nr,2,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(bio_DIC ,'BLGBIOA ',0,Nr,2,bi,bj,myThid) |
|
CALL DIAGNOSTICS_FILL(Remin ,'BLGREMI ',0,Nr,2,bi,bj,myThid) |
|
|
CALL DIAGNOSTICS_FILL(Car ,'BLGCARB ',0,Nr,2,bi,bj,myThid) |
|
276 |
CALL DIAGNOSTICS_FILL(pH ,'BLGPH3D ',0,Nr,1,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(pH ,'BLGPH3D ',0,Nr,1,bi,bj,myThid) |
277 |
CALL DIAGNOSTICS_FILL(OmegaAr ,'BLGOMAR ',0,Nr,1,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(OmegaAr ,'BLGOMAR ',0,Nr,1,bi,bj,myThid) |
278 |
CALL DIAGNOSTICS_FILL(pCO2 ,'BLGPCO2 ',0,1 ,1,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(pCO2 ,'BLGPCO2 ',0,1 ,1,bi,bj,myThid) |
279 |
CALL DIAGNOSTICS_FILL(fluxCO2 ,'BLGCFLX ',0,1 ,1,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(fluxCO2 ,'BLGCFLX ',0,1 ,1,bi,bj,myThid) |
280 |
CALL DIAGNOSTICS_FILL(SURC ,'BLGTFLX ',0,1 ,2,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(surf_DIC,'BLGTFLX ',0,1 ,2,bi,bj,myThid) |
281 |
CALL DIAGNOSTICS_FILL(SURO ,'BLGOFLX ',0,1 ,2,bi,bj,myThid) |
CALL DIAGNOSTICS_FILL(surf_O2 ,'BLGOFLX ',0,1 ,2,bi,bj,myThid) |
282 |
ENDIF |
ENDIF |
283 |
#endif /* ALLOW_DIAGNOSTICS */ |
#endif /* ALLOW_DIAGNOSTICS */ |
284 |
|
|