48 |
I phytoup, popuplocal, ponuplocal, |
I phytoup, popuplocal, ponuplocal, |
49 |
I pofeuplocal, psiuplocal, |
I pofeuplocal, psiuplocal, |
50 |
I PARlocal,Tlocal, Slocal, |
I PARlocal,Tlocal, Slocal, |
51 |
|
I pCO2local, |
52 |
I freefelocal, inputFelocal, |
I freefelocal, inputFelocal, |
53 |
I bottom, dzlocal, |
I bottom, dzlocal, |
54 |
O Rstarlocal, RNstarlocal, |
O Rstarlocal, RNstarlocal, |
75 |
#endif |
#endif |
76 |
#ifdef GEIDER |
#ifdef GEIDER |
77 |
I phychl, |
I phychl, |
78 |
|
#ifdef DAR_DIAG_EK |
79 |
|
O Ek, EkoverE, |
80 |
|
#endif |
81 |
|
#ifdef DAR_DIAG_PARW |
82 |
|
O chl2c, |
83 |
|
#endif |
84 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
85 |
O dphychl, Chlup, |
O dphychl, Chlup, |
86 |
|
#ifdef DAR_DIAG_EK |
87 |
|
O acclim, |
88 |
|
#endif |
89 |
|
#endif |
90 |
|
#ifdef ALLOW_CDOM |
91 |
|
O dcdomdt , |
92 |
|
I cdomlocal, |
93 |
#endif |
#endif |
94 |
#ifdef WAVEBANDS |
#ifdef WAVEBANDS |
95 |
I PARwlocal, |
I PARwlocal, |
96 |
|
#ifdef DAR_DIAG_EK |
97 |
|
O Ek_nl, EkoverE_nl, |
98 |
|
#endif |
99 |
#endif |
#endif |
100 |
#endif |
#endif |
101 |
#ifdef ALLOW_PAR_DAY |
#ifdef ALLOW_PAR_DAY |
161 |
_RL PARlocal |
_RL PARlocal |
162 |
_RL Tlocal |
_RL Tlocal |
163 |
_RL Slocal |
_RL Slocal |
164 |
|
_RL pCO2local |
165 |
_RL freefelocal |
_RL freefelocal |
166 |
_RL inputFelocal |
_RL inputFelocal |
167 |
_RL bottom |
_RL bottom |
216 |
#endif |
#endif |
217 |
#ifdef GEIDER |
#ifdef GEIDER |
218 |
_RL phychl(npmax) |
_RL phychl(npmax) |
219 |
|
_RL Ek(npmax) |
220 |
|
_RL EkoverE(npmax) |
221 |
|
_RL chl2c(npmax) |
222 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
223 |
_RL dphychl(npmax) |
_RL dphychl(npmax) |
224 |
_RL Chlup(npmax) |
_RL Chlup(npmax) |
225 |
|
_RL acclim(npmax) |
226 |
|
#endif |
227 |
|
#endif |
228 |
|
#ifdef ALLOW_CDOM |
229 |
|
_RL cdomlocal |
230 |
|
_RL dcdomdt |
231 |
|
#ifdef ALLOW_CARBON |
232 |
|
_RL cdomclocal, dcdomcdt |
233 |
#endif |
#endif |
234 |
#endif |
#endif |
235 |
#ifdef ALLOW_PAR_DAY |
#ifdef ALLOW_PAR_DAY |
244 |
c ANNA these variables are passed in/out of darwin_forcing.F |
c ANNA these variables are passed in/out of darwin_forcing.F |
245 |
#ifdef WAVEBANDS |
#ifdef WAVEBANDS |
246 |
_RL PARwlocal(tlam) !PAR at midpoint of previous(in) and local(out) gridcell |
_RL PARwlocal(tlam) !PAR at midpoint of previous(in) and local(out) gridcell |
247 |
|
_RL Ek_nl(npmax,tlam) |
248 |
|
_RL EkoverE_nl(npmax,tlam) |
249 |
#endif |
#endif |
250 |
c ANNA endif |
c ANNA endif |
251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
c LOCAL VARIABLES |
c LOCAL VARIABLES |
253 |
c ------------------------------------------------------------- |
c ------------------------------------------------------------- |
254 |
|
|
263 |
_RL limit(npmax) |
_RL limit(npmax) |
264 |
c phytoplankton light limitation term |
c phytoplankton light limitation term |
265 |
_RL ilimit(npmax) |
_RL ilimit(npmax) |
266 |
|
_RL pCO2limit(npmax) |
267 |
_RL ngrow(npmax) |
_RL ngrow(npmax) |
268 |
_RL grow(npmax) |
_RL grow(npmax) |
269 |
_RL PspecificPO4(npmax) |
_RL PspecificPO4(npmax) |
270 |
_RL phytoTempFunction(npmax) |
_RL phytoTempFunction(npmax) |
271 |
|
_RL mortPTempFunction |
272 |
_RL dummy |
_RL dummy |
273 |
_RL Ndummy |
_RL Ndummy |
274 |
_RL Nsourcelimit(npmax) |
_RL Nsourcelimit(npmax) |
299 |
#ifdef OLD_GRAZE |
#ifdef OLD_GRAZE |
300 |
c variables for zooplankton grazing rates |
c variables for zooplankton grazing rates |
301 |
_RL zooTempFunction(nzmax) |
_RL zooTempFunction(nzmax) |
302 |
|
_RL mortZTempFunction |
303 |
|
_RL mortZ2TempFunction |
304 |
_RL grazing_phyto(npmax) |
_RL grazing_phyto(npmax) |
305 |
_RL grazingP(nzmax) |
_RL grazingP(nzmax) |
306 |
_RL grazingN(nzmax) |
_RL grazingN(nzmax) |
309 |
#else |
#else |
310 |
c variables for zooplankton grazing rates |
c variables for zooplankton grazing rates |
311 |
_RL zooTempFunction(nzmax) |
_RL zooTempFunction(nzmax) |
312 |
|
_RL mortZTempFunction |
313 |
|
_RL mortZ2TempFunction |
314 |
_RL allphyto(nzmax) |
_RL allphyto(nzmax) |
315 |
_RL denphyto(nzmax) |
_RL denphyto(nzmax) |
316 |
_RL grazphy(npmax,nzmax) |
_RL grazphy(npmax,nzmax) |
329 |
_RL alpha_I(npmax) |
_RL alpha_I(npmax) |
330 |
_RL pcarbon(npmax) |
_RL pcarbon(npmax) |
331 |
_RL pcm(npmax) |
_RL pcm(npmax) |
|
_RL chl2c(npmax) |
|
332 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
|
_RL acclim(npmax) |
|
333 |
_RL psinkchl(npmax) |
_RL psinkchl(npmax) |
334 |
_RL rhochl(npmax) |
_RL rhochl(npmax) |
335 |
#endif |
#endif |
336 |
#endif |
#endif |
337 |
|
|
338 |
|
#ifdef ALLOW_CDOM |
339 |
|
_RL cdomp_degrd, cdomn_degrd, cdomfe_degrd |
340 |
|
_RL preminP_cdom, preminN_cdom, preminFe_cdom |
341 |
|
#ifdef ALLOW_CARBON |
342 |
|
_RL cdomc_degrd |
343 |
|
_RL preminC_cdom |
344 |
|
#endif |
345 |
|
#endif |
346 |
|
|
347 |
#ifdef DAR_DIAG_CHL |
#ifdef DAR_DIAG_CHL |
348 |
_RL tmppcm |
_RL tmppcm |
349 |
_RL tmpchl2c |
_RL tmpchl2c |
416 |
_RL totzoo_pofe |
_RL totzoo_pofe |
417 |
_RL totzoo_posi |
_RL totzoo_posi |
418 |
|
|
419 |
|
#ifdef ALLOW_CDOM |
420 |
|
_RL totphy_cdomp |
421 |
|
_RL totphy_cdomn |
422 |
|
_RL totphy_cdomfe |
423 |
|
_RL totzoo_cdomp |
424 |
|
_RL totzoo_cdomn |
425 |
|
_RL totzoo_cdomfe |
426 |
|
#ifdef ALLOW_CARBON |
427 |
|
_RL totphy_cdomc |
428 |
|
_RL totzoo_cdomc |
429 |
|
#endif |
430 |
|
#endif |
431 |
|
|
432 |
_RL NO2prod |
_RL NO2prod |
433 |
_RL NO3prod |
_RL NO3prod |
434 |
|
|
467 |
#endif |
#endif |
468 |
c ANNA endif |
c ANNA endif |
469 |
|
|
|
c ANNA - for inhib |
|
|
_RL Ek |
|
|
_RL EkoverE |
|
|
|
|
470 |
c................................................................. |
c................................................................. |
471 |
|
|
472 |
#ifdef ALLOW_MUTANTS |
#ifdef ALLOW_MUTANTS |
524 |
pcarbon(np) = 0. _d 0 |
pcarbon(np) = 0. _d 0 |
525 |
pcm(np)=0. _d 0 |
pcm(np)=0. _d 0 |
526 |
chl2c(np)=0. _d 0 |
chl2c(np)=0. _d 0 |
527 |
|
Ek(np)=0. _d 0 |
528 |
|
EkoverE(np)=0. _d 0 |
529 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
530 |
acclim(np)=0. _d 0 |
acclim(np)=0. _d 0 |
531 |
psinkChl(np)=0. _d 0 |
psinkChl(np)=0. _d 0 |
532 |
#endif |
#endif |
533 |
|
#ifdef WAVEBANDS |
534 |
|
do ilam=1,tlam |
535 |
|
Ek_nl(np,ilam)=0. _d 0 |
536 |
|
EkoverE_nl(np,ilam)=0. _d 0 |
537 |
|
enddo |
538 |
|
#endif |
539 |
enddo |
enddo |
540 |
#endif |
#endif |
541 |
|
|
624 |
|
|
625 |
c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
626 |
call MONOD_TEMPFUNC(Tlocal,phytoTempFunction, |
call MONOD_TEMPFUNC(Tlocal,phytoTempFunction, |
627 |
& zooTempFunction, reminTempFunction, myThid) |
& zooTempFunction, reminTempFunction, |
628 |
|
& mortPTempFunction, mortZTempFunction, |
629 |
|
& mortZ2TempFunction, myThid) |
630 |
if (debug.eq.1) print*,'phytoTempFunction', |
if (debug.eq.1) print*,'phytoTempFunction', |
631 |
& phytoTempFunction, Tlocal |
& phytoTempFunction, Tlocal |
632 |
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
655 |
#endif |
#endif |
656 |
c ANNA endif |
c ANNA endif |
657 |
|
|
658 |
|
c pCO2 limit - default to non |
659 |
|
do np=1,npmax |
660 |
|
pCO2limit(np)=1. _d 0 |
661 |
|
c if (np.eq.6) then |
662 |
|
c pCO2limit(np)=1. _d 0 + (pCO2local-400. _d -6)/600 _d -6 |
663 |
|
c pCO2limit(np)=max(pCO2limit(np),1. _d 0) |
664 |
|
c pCO2limit(np)=min(pCO2limit(np),2. _d 0) |
665 |
|
c endif |
666 |
|
if (debug.eq.15) print*,'pco2limit',pCO2limit(np),pCO2local |
667 |
|
enddo |
668 |
|
|
669 |
|
|
670 |
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
671 |
c Determine phytoplankton nutrient limitation as mimimum of |
c Determine phytoplankton nutrient limitation as mimimum of |
672 |
c P,N,Si,Fe. However N can be utilized in several forms, so |
c P,N,Si,Fe. However N can be utilized in several forms, so |
884 |
#endif |
#endif |
885 |
|
|
886 |
do np = 1, npmax |
do np = 1, npmax |
887 |
pcm(np)=pcmax(np)*limit(np)*phytoTempFunction(np) |
pcm(np)=pcmax(np)*limit(np)*phytoTempFunction(np)* |
888 |
|
& pCO2limit(np) |
889 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
890 |
if (phyto(np).gt. 0. _d 0) then |
if (phyto(np).gt. 0. _d 0) then |
891 |
chl2c(np)=phychl(np)/(phyto(np)*R_PC(np)) |
chl2c(np)=phychl(np)/(phyto(np)*R_PC(np)) |
906 |
c Eq A1 in Geider et al 1997 |
c Eq A1 in Geider et al 1997 |
907 |
pcarbon(np)=pcm(np)*( 1 - |
pcarbon(np)=pcm(np)*( 1 - |
908 |
& exp((-alpha_I(np)*chl2c(np))/(pcm(np))) ) |
& exp((-alpha_I(np)*chl2c(np))/(pcm(np))) ) |
|
c for inhibition |
|
|
if (inhibcoef_geid(np).gt.0. _d 0) then |
|
909 |
#ifdef WAVEBANDS |
#ifdef WAVEBANDS |
910 |
Ek = pcm(np)/(chl2c(np)*alpha_mean(np)) |
Ek(np) = pcm(np)/(chl2c(np)*alpha_mean(np)) |
911 |
|
EkoverE(np) = Ek(np) / PARlocal |
912 |
|
do nl=1, tlam |
913 |
|
Ek_nl(np,nl)=pcm(np)/(chl2c(np)*alphachl_nl(np,nl)) |
914 |
|
EkoverE_nl(np,nl) = Ek_nl(np,nl) / PARwlocal(nl) |
915 |
|
enddo |
916 |
#else |
#else |
917 |
Ek = pcm(np)/(chl2c(np)*alphachl(np)) |
Ek(np) = pcm(np)/(chl2c(np)*alphachl(np)) |
918 |
|
EkoverE(np) = Ek(np) / PARlocal |
919 |
#endif |
#endif |
920 |
EkoverE = Ek / PARlocal |
c for inhibition |
921 |
if (PARlocal .ge. Ek) then !photoinhibition begins |
if (inhibcoef_geid(np).gt.0. _d 0) then |
922 |
pcarbon(np) = pcarbon(np)*(EkoverE*inhibcoef_geid(np)) |
if (PARlocal .ge. Ek(np)) then !photoinhibition begins |
923 |
|
pcarbon(np) = pcarbon(np)* |
924 |
|
& (EkoverE(np)*inhibcoef_geid(np)) |
925 |
endif |
endif |
926 |
endif |
endif |
927 |
c end inhib |
c end inhib |
937 |
pcarbon(np)=0. _d 0 |
pcarbon(np)=0. _d 0 |
938 |
endif |
endif |
939 |
else ! if pcm 0 |
else ! if pcm 0 |
940 |
pcm(np)=0.d0 |
pcm(np)=0. _d 0 |
941 |
#ifndef DYNAMIC_CHL |
#ifndef DYNAMIC_CHL |
942 |
chl2c(np)=chl2cmin(np) |
chl2c(np)=chl2cmin(np) |
943 |
#endif |
#endif |
944 |
pcarbon(np)=0.d0 |
pcarbon(np)=0. _d 0 |
945 |
ilimit(np)=0.d0 |
ilimit(np)=0. _d 0 |
946 |
endif |
endif |
947 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
948 |
c Chl:C acclimated to current conditions |
c Chl:C acclimated to current conditions |
968 |
c diagnostic version of the above that does not feed back to growth |
c diagnostic version of the above that does not feed back to growth |
969 |
ChlGeiderlocal = 0. _d 0 |
ChlGeiderlocal = 0. _d 0 |
970 |
do np = 1, npmax |
do np = 1, npmax |
971 |
tmppcm = mu(np)*limit(np)*phytoTempFunction(np) |
tmppcm = mu(np)*limit(np)*phytoTempFunction(np)* |
972 |
|
& pCO2limit(np) |
973 |
if (tmppcm.gt.0.d0) then |
if (tmppcm.gt.0.d0) then |
974 |
tmpchl2c = Geider_chl2cmax(np)/ |
tmpchl2c = Geider_chl2cmax(np)/ |
975 |
& (1+(Geider_chl2cmax(np)*Geider_alphachl(np)*PARdaylocal)/ |
& (1+(Geider_chl2cmax(np)*Geider_alphachl(np)*PARdaylocal)/ |
1128 |
c accumulate particulate and dissolved detritus |
c accumulate particulate and dissolved detritus |
1129 |
do np=1, npmax |
do np=1, npmax |
1130 |
totphy_pop=totphy_pop+ |
totphy_pop=totphy_pop+ |
1131 |
& ExportFracP(np)*mortphy(np)*phytomin(np) |
& ExportFracP(np)*mortphy(np)* |
1132 |
|
& mortPTempFunction*phytomin(np) |
1133 |
totphy_dop=totphy_dop+ |
totphy_dop=totphy_dop+ |
1134 |
& (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np) |
& (1. _d 0-ExportFracP(np))*mortphy(np)* |
1135 |
|
& mortPTempFunction*phytomin(np) |
1136 |
totphy_pon=totphy_pon+ R_NP(np)* |
totphy_pon=totphy_pon+ R_NP(np)* |
1137 |
& ExportFracP(np)*mortphy(np)*phytomin(np) |
& ExportFracP(np)*mortphy(np)* |
1138 |
|
& mortPTempFunction*phytomin(np) |
1139 |
totphy_don=totphy_don+ R_NP(np)* |
totphy_don=totphy_don+ R_NP(np)* |
1140 |
& (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np) |
& (1. _d 0-ExportFracP(np))*mortphy(np)* |
1141 |
|
& mortPTempFunction*phytomin(np) |
1142 |
totphy_pofe=totphy_pofe+ R_FeP(np)* |
totphy_pofe=totphy_pofe+ R_FeP(np)* |
1143 |
& ExportFracP(np)*mortphy(np)*phytomin(np) |
& ExportFracP(np)*mortphy(np)* |
1144 |
|
& mortPTempFunction*phytomin(np) |
1145 |
totphy_dofe=totphy_dofe+ R_FeP(np)* |
totphy_dofe=totphy_dofe+ R_FeP(np)* |
1146 |
& (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np) |
& (1. _d 0-ExportFracP(np))*mortphy(np)* |
1147 |
|
& mortPTempFunction*phytomin(np) |
1148 |
totphy_posi=totphy_posi+ R_SiP(np)* |
totphy_posi=totphy_posi+ R_SiP(np)* |
1149 |
& mortphy(np)*phytomin(np) |
& mortphy(np)* |
1150 |
|
& mortPTempFunction*phytomin(np) |
1151 |
#ifdef ALLOW_CARBON |
#ifdef ALLOW_CARBON |
1152 |
totphy_poc=totphy_poc+ R_PC(np)* |
totphy_poc=totphy_poc+ R_PC(np)* |
1153 |
& ExportFracP(np)*mortphy(np)*phytomin(np) |
& ExportFracP(np)*mortphy(np)* |
1154 |
|
& mortPTempFunction*phytomin(np) |
1155 |
totphy_doc=totphy_doc+ R_PC(np)* |
totphy_doc=totphy_doc+ R_PC(np)* |
1156 |
& (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np) |
& (1. _d 0-ExportFracP(np))*mortphy(np)* |
1157 |
|
& mortPTempFunction*phytomin(np) |
1158 |
totphy_pic=totphy_pic+ R_PC(np)*R_PICPOC(np)* |
totphy_pic=totphy_pic+ R_PC(np)*R_PICPOC(np)* |
1159 |
& mortphy(np)*phytomin(np) |
& mortphy(np)* |
1160 |
|
& mortPTempFunction*phytomin(np) |
1161 |
#endif |
#endif |
1162 |
enddo |
enddo |
1163 |
|
#ifdef ALLOW_CDOM |
1164 |
|
totphy_cdomp=(fraccdom)*totphy_dop |
1165 |
|
totphy_dop=totphy_dop-totphy_cdomp |
1166 |
|
totphy_cdomn=rnp_cdom*totphy_cdomp |
1167 |
|
totphy_don=totphy_don-totphy_cdomn |
1168 |
|
totphy_cdomfe=rfep_cdom*totphy_cdomp |
1169 |
|
totphy_dofe=totphy_dofe-totphy_cdomfe |
1170 |
|
#ifdef ALLOW_CARBON |
1171 |
|
totphy_cdomc=rcp_cdom*totphy_cdomp |
1172 |
|
totphy_doc=totphy_doc-totphy_cdomc |
1173 |
|
#endif |
1174 |
|
#endif |
1175 |
if (debug.eq.3) print*,'tot_phy_pop',totphy_pop |
if (debug.eq.3) print*,'tot_phy_pop',totphy_pop |
1176 |
if (debug.eq.3) print*,'tot_phy_dop',totphy_dop |
if (debug.eq.3) print*,'tot_phy_dop',totphy_dop |
1177 |
if (debug.eq.3) print*,'tot_phy_pon',totphy_pon |
if (debug.eq.3) print*,'tot_phy_pon',totphy_pon |
1223 |
c accumulate particulate and dissolved detritus |
c accumulate particulate and dissolved detritus |
1224 |
do nz=1, nzmax |
do nz=1, nzmax |
1225 |
totzoo_pop=totzoo_pop+ |
totzoo_pop=totzoo_pop+ |
1226 |
& ExportFracZ(nz)*( mortzoo(nz)*zooP(nz) |
& ExportFracZ(nz)*( mortzoo(nz)* |
1227 |
& + mortzoo2(nz)*zooP(nz)**2 ) |
& mortZTempFunction*zooP(nz) |
1228 |
|
& + mortzoo2(nz)* |
1229 |
|
& mortZ2TempFunction*zooP(nz)**2 ) |
1230 |
totzoo_dop=totzoo_dop+ |
totzoo_dop=totzoo_dop+ |
1231 |
& (1. _d 0-ExportFracZ(nz))*( |
& (1. _d 0-ExportFracZ(nz))*( |
1232 |
& mortzoo(nz)*zooP(nz)+ |
& mortzoo(nz)* |
1233 |
& mortzoo2(nz)*zooP(nz)**2 ) |
& mortZTempFunction*zooP(nz)+ |
1234 |
|
& mortzoo2(nz)* |
1235 |
|
& mortZ2TempFunction*zooP(nz)**2 ) |
1236 |
totzoo_pon=totzoo_pon+ |
totzoo_pon=totzoo_pon+ |
1237 |
& ExportFracZ(nz)*( mortzoo(nz)*zooN(nz) |
& ExportFracZ(nz)*( mortzoo(nz)* |
1238 |
& + mortzoo2(nz)*zooN(nz)**2 ) |
& mortZTempFunction*zooN(nz) |
1239 |
|
& + mortzoo2(nz)* |
1240 |
|
& mortZ2TempFunction*zooN(nz)**2 ) |
1241 |
totzoo_don=totzoo_don+ |
totzoo_don=totzoo_don+ |
1242 |
& (1. _d 0-ExportFracZ(nz))*( |
& (1. _d 0-ExportFracZ(nz))*( |
1243 |
& mortzoo(nz)*zooN(nz)+ |
& mortzoo(nz)* |
1244 |
& mortzoo2(nz)*zooN(nz)**2 ) |
& mortZTempFunction*zooN(nz)+ |
1245 |
|
& mortzoo2(nz)* |
1246 |
|
& mortZ2TempFunction*zooN(nz)**2 ) |
1247 |
totzoo_pofe=totzoo_pofe+ |
totzoo_pofe=totzoo_pofe+ |
1248 |
& ExportFracZ(nz)*( mortzoo(nz)*zooFe(nz) |
& ExportFracZ(nz)*( mortzoo(nz)* |
1249 |
& + mortzoo2(nz)*zooFe(nz)**2 ) |
& mortZTempFunction*zooFe(nz) |
1250 |
|
& + mortzoo2(nz)* |
1251 |
|
& mortZ2TempFunction*zooFe(nz)**2 ) |
1252 |
totzoo_dofe=totzoo_dofe+ |
totzoo_dofe=totzoo_dofe+ |
1253 |
& (1. _d 0-ExportFracZ(nz))*( |
& (1. _d 0-ExportFracZ(nz))*( |
1254 |
& mortzoo(nz)*zooFe(nz) + |
& mortzoo(nz)* |
1255 |
& mortzoo2(nz)*zooFe(nz)**2 ) |
& mortZTempFunction*zooFe(nz) + |
1256 |
|
& mortzoo2(nz)* |
1257 |
|
& mortZ2TempFunction*zooFe(nz)**2 ) |
1258 |
totzoo_posi=totzoo_posi+ |
totzoo_posi=totzoo_posi+ |
1259 |
& ( mortzoo(nz)*zooSi(nz)+ |
& ( mortzoo(nz)* |
1260 |
& mortzoo2(nz)*zooSi(nz)**2 ) |
& mortZTempFunction*zooSi(nz)+ |
1261 |
|
& mortzoo2(nz)* |
1262 |
|
& mortZ2TempFunction*zooSi(nz)**2 ) |
1263 |
#ifdef ALLOW_CARBON |
#ifdef ALLOW_CARBON |
1264 |
totzoo_poc=totzoo_poc+ |
totzoo_poc=totzoo_poc+ |
1265 |
& ExportFracZ(nz)*( mortzoo(nz)*zooClocal(nz) |
& ExportFracZ(nz)*( mortzoo(nz)* |
1266 |
& + mortzoo2(nz)*zooClocal(nz)**2 ) |
& mortZTempFunction*zooClocal(nz) |
1267 |
|
& + mortzoo2(nz)* |
1268 |
|
& mortZ2TempFunction*zooClocal(nz)**2 ) |
1269 |
totzoo_doc=totzoo_doc+ |
totzoo_doc=totzoo_doc+ |
1270 |
& (1. _d 0-ExportFracZ(nz))*( mortzoo(nz)*zooClocal(nz) |
& (1. _d 0-ExportFracZ(nz))*( mortzoo(nz)* |
1271 |
& + mortzoo2(nz)*zooClocal(nz)**2 ) |
& mortZTempFunction*zooClocal(nz) |
1272 |
|
& + mortzoo2(nz)* |
1273 |
|
& mortZ2TempFunction*zooClocal(nz)**2 ) |
1274 |
#endif |
#endif |
1275 |
enddo |
enddo |
1276 |
|
|
1300 |
#endif |
#endif |
1301 |
enddo |
enddo |
1302 |
#endif |
#endif |
1303 |
|
|
1304 |
|
#ifdef ALLOW_CDOM |
1305 |
|
totzoo_cdomp=(fraccdom)*totzoo_dop |
1306 |
|
totzoo_dop=totzoo_dop-totzoo_cdomp |
1307 |
|
totzoo_cdomn=rnp_cdom*totzoo_cdomp |
1308 |
|
totzoo_don=totzoo_don-totzoo_cdomn |
1309 |
|
totzoo_cdomfe=rfep_cdom*totzoo_cdomp |
1310 |
|
totzoo_dofe=totzoo_dofe-totzoo_cdomfe |
1311 |
|
#ifdef ALLOW_CARBON |
1312 |
|
totzoo_cdomc=rcp_cdom*totzoo_cdomp |
1313 |
|
totzoo_doc=totzoo_doc-totzoo_cdomc |
1314 |
|
#endif |
1315 |
|
#endif |
1316 |
if (debug.eq.5) print*,'totzoo_pop',totzoo_pop |
if (debug.eq.5) print*,'totzoo_pop',totzoo_pop |
1317 |
if (debug.eq.5) print*,'totzoo_dop',totzoo_dop |
if (debug.eq.5) print*,'totzoo_dop',totzoo_dop |
1318 |
if (debug.eq.5) print*,'totzoo_pon',totzoo_pon |
if (debug.eq.5) print*,'totzoo_pon',totzoo_pon |
1329 |
c phospate uptake by each phytoplankton |
c phospate uptake by each phytoplankton |
1330 |
#ifndef GEIDER |
#ifndef GEIDER |
1331 |
grow(np)=ngrow(np)*mu(np)*limit(np)*ilimit(np)* |
grow(np)=ngrow(np)*mu(np)*limit(np)*ilimit(np)* |
1332 |
& phytoTempFunction(np) |
& phytoTempFunction(np)*pCO2limit(np) |
1333 |
#endif |
#endif |
1334 |
#ifdef GEIDER |
#ifdef GEIDER |
1335 |
grow(np)=ngrow(np)*pcarbon(np) |
grow(np)=ngrow(np)*pcarbon(np) |
1447 |
preminN = reminTempFunction * Kpremin_N*PONlocal |
preminN = reminTempFunction * Kpremin_N*PONlocal |
1448 |
preminFe = reminTempFunction * Kpremin_Fe*POFelocal |
preminFe = reminTempFunction * Kpremin_Fe*POFelocal |
1449 |
preminSi = reminTempFunction * Kpremin_Si*PSilocal |
preminSi = reminTempFunction * Kpremin_Si*PSilocal |
1450 |
|
#ifdef ALLOW_CDOM |
1451 |
|
preminP_cdom = fraccdom*preminP |
1452 |
|
preminP=preminP-preminP_cdom |
1453 |
|
preminN_cdom = rnp_cdom*preminP_cdom |
1454 |
|
preminN=preminN-preminN_cdom |
1455 |
|
preminFe_cdom = rfep_cdom*preminP_cdom |
1456 |
|
preminFe=preminFe-preminFe_cdom |
1457 |
|
#endif |
1458 |
|
|
1459 |
#ifdef ALLOW_CARBON |
#ifdef ALLOW_CARBON |
1460 |
DOCremin = reminTempFunction * Kdoc * DOClocal |
DOCremin = reminTempFunction * Kdoc * DOClocal |
1461 |
preminC = reminTempFunction * Kpremin_C*POClocal |
preminC = reminTempFunction * Kpremin_C*POClocal |
1462 |
|
#ifdef ALLOW_CDOM |
1463 |
|
preminC_cdom = rcp_cdom*preminP_cdom |
1464 |
|
preminC=preminC-preminC_cdom |
1465 |
|
#endif |
1466 |
c dissolution |
c dissolution |
1467 |
disscPIC = Kdissc*PIClocal |
disscPIC = Kdissc*PIClocal |
1468 |
#endif |
#endif |
1469 |
|
|
1470 |
|
#ifdef ALLOW_CDOM |
1471 |
|
c degradation of CDOM - high when bleached by light |
1472 |
|
cdomp_degrd = reminTempFunction * cdomlocal |
1473 |
|
& *(cdomdegrd+cdombleach*min(PARlocal/PARcdom,1. _d 0) ) |
1474 |
|
cdomn_degrd = rnp_cdom * cdomp_degrd |
1475 |
|
cdomfe_degrd= rfep_cdom * cdomp_degrd |
1476 |
|
#ifdef ALLOW_CARBON |
1477 |
|
cdomc_degrd = rcp_cdom * cdomp_degrd |
1478 |
|
#endif |
1479 |
|
#endif |
1480 |
|
|
1481 |
|
#ifdef ALLOW_DENIT |
1482 |
|
if (O2local.lt.O2crit) then |
1483 |
|
if (NO3local.lt.no3crit) then |
1484 |
|
c no remineralization for N, P, Fe (not Si?) |
1485 |
|
DOPremin = 0. _d 0 |
1486 |
|
DONremin = 0. _d 0 |
1487 |
|
DOFeremin = 0. _d 0 |
1488 |
|
preminP = 0. _d 0 |
1489 |
|
preminN = 0. _d 0 |
1490 |
|
preminFe = 0. _d 0 |
1491 |
|
#ifdef ALLOW_CDOM |
1492 |
|
preminP_cdom = 0. _d 0 |
1493 |
|
preminN_cdom = 0. _d 0 |
1494 |
|
preminFe_cdom = 0. _d 0 |
1495 |
|
#endif |
1496 |
|
#ifdef ALLOW_CARBON |
1497 |
|
DOCremin = 0. _d 0 |
1498 |
|
preminC = 0. _d 0 |
1499 |
|
#ifdef ALLOW_CDOM |
1500 |
|
preminC_cdom = 0. _d 0 |
1501 |
|
#endif |
1502 |
|
#endif |
1503 |
|
|
1504 |
|
#ifdef ALLOW_CDOM |
1505 |
|
c degradation of CDOM - high when bleached by light |
1506 |
|
cdomp_degrd = reminTempFunction * cdomlocal |
1507 |
|
& *(cdombleach*min(PARlocal/PARcdom,1. _d 0) ) |
1508 |
|
cdomn_degrd = rnp_cdom * cdomp_degrd |
1509 |
|
cdomfe_degrd= rfep_cdom * cdomp_degrd |
1510 |
|
#ifdef ALLOW_CARBON |
1511 |
|
cdomc_degrd = rcp_cdom * cdomp_degrd |
1512 |
|
#endif |
1513 |
|
#endif |
1514 |
|
endif |
1515 |
|
endif |
1516 |
|
#endif |
1517 |
|
c end denit caveats |
1518 |
|
|
1519 |
c chemistry |
c chemistry |
1520 |
c NH4 -> NO2 -> NO3 by bacterial action |
c NH4 -> NO2 -> NO3 by bacterial action |
1521 |
NO2prod = knita*( 1. _d 0-min(PARlocal/PAR0,1. _d 0) ) |
NO2prod = knita*( 1. _d 0-min(PARlocal/PAR0,1. _d 0) ) |
1542 |
#else |
#else |
1543 |
& - sumgrazphy(np) |
& - sumgrazphy(np) |
1544 |
#endif |
#endif |
1545 |
& - mortphy(np)*phytomin(np) |
& - mortphy(np)* |
1546 |
|
& mortPTempFunction*phytomin(np) |
1547 |
& + psinkphy(np) |
& + psinkphy(np) |
1548 |
#ifdef GEIDER |
#ifdef GEIDER |
1549 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
1558 |
#else |
#else |
1559 |
& - sumgrazphy(np) |
& - sumgrazphy(np) |
1560 |
#endif |
#endif |
1561 |
& - mortphy(np)*phytomin(np)) *chl2c(np)*R_PC(np) |
& - mortphy(np)* |
1562 |
|
& mortPTempFunction*phytomin(np)) |
1563 |
|
& *chl2c(np)*R_PC(np) |
1564 |
& + psinkChl(np) |
& + psinkChl(np) |
1565 |
#endif |
#endif |
1566 |
Chl=Chl + phychl(np) |
Chl=Chl + phychl(np) |
1571 |
#ifdef OLD_GRAZE |
#ifdef OLD_GRAZE |
1572 |
tmpr=grazing_phyto(np)* |
tmpr=grazing_phyto(np)* |
1573 |
& (phytomin(np)/(phytomin(np) + kgrazesat)) |
& (phytomin(np)/(phytomin(np) + kgrazesat)) |
1574 |
& + mortphy(np)*phytomin(np) |
& + mortphy(np)* |
1575 |
|
& mortPTempFunction*phytomin(np) |
1576 |
& - psinkphy(np) |
& - psinkphy(np) |
1577 |
#else |
#else |
1578 |
tmpr=sumgrazphy(np) |
tmpr=sumgrazphy(np) |
1579 |
& + mortphy(np)*phytomin(np) |
& + mortphy(np)* |
1580 |
|
& mortPTempFunction*phytomin(np) |
1581 |
& - psinkphy(np) |
& - psinkphy(np) |
1582 |
#endif |
#endif |
1583 |
#ifdef DAR_DIAG_RSTAR |
#ifdef DAR_DIAG_RSTAR |
1584 |
#ifndef GEIDER |
#ifndef GEIDER |
1585 |
tmpgrow=ngrow(np)*mu(np)*ilimit(np)* |
tmpgrow=ngrow(np)*mu(np)*ilimit(np)* |
1586 |
& phytoTempFunction(np) |
& phytoTempFunction(np)*pCO2limit(np) |
1587 |
#endif |
#endif |
1588 |
#ifdef GEIDER |
#ifdef GEIDER |
1589 |
tmpgrow=grow(np)/limit(np) |
tmpgrow=grow(np)/limit(np) |
1644 |
do nz=1,nzmax |
do nz=1,nzmax |
1645 |
c zoo in P currency |
c zoo in P currency |
1646 |
dzooPdt(nz) = dzooPdt(nz) |
dzooPdt(nz) = dzooPdt(nz) |
1647 |
& - mortzoo(nz)*zooP(nz) |
& - mortzoo(nz)* |
1648 |
& - mortzoo2(nz)*zooP(nz)**2 |
& mortZTempFunction*zooP(nz) |
1649 |
|
& - mortzoo2(nz)* |
1650 |
|
& mortZ2TempFunction*zooP(nz)**2 |
1651 |
c zooplankton in other currencies |
c zooplankton in other currencies |
1652 |
C zooplankton stoichiometry varies according to food source |
C zooplankton stoichiometry varies according to food source |
1653 |
dzooNdt(nz) = dzooNdt(nz) |
dzooNdt(nz) = dzooNdt(nz) |
1654 |
& - mortzoo(nz)*zooN(nz) |
& - mortzoo(nz)* |
1655 |
& - mortzoo2(nz)*zooN(nz)**2 |
& mortZTempFunction*zooN(nz) |
1656 |
|
& - mortzoo2(nz)* |
1657 |
|
& mortZ2TempFunction*zooN(nz)**2 |
1658 |
dzooFedt(nz) = dzooFedt(nz) |
dzooFedt(nz) = dzooFedt(nz) |
1659 |
& - mortzoo(nz)*zooFe(nz) |
& - mortzoo(nz)* |
1660 |
& - mortzoo2(nz)*zooFe(nz)**2 |
& mortZTempFunction*zooFe(nz) |
1661 |
|
& - mortzoo2(nz)* |
1662 |
|
& mortZ2TempFunction*zooFe(nz)**2 |
1663 |
dzooSidt(nz) = dzooSidt(nz) |
dzooSidt(nz) = dzooSidt(nz) |
1664 |
& - mortzoo(nz)*zooSi(nz) |
& - mortzoo(nz)* |
1665 |
& - mortzoo2(nz)*zooSi(nz)**2 |
& mortZTempFunction*zooSi(nz) |
1666 |
|
& - mortzoo2(nz)* |
1667 |
|
& mortZ2TempFunction*zooSi(nz)**2 |
1668 |
enddo |
enddo |
1669 |
|
|
1670 |
|
|
1671 |
c sum contributions to inorganic nutrient tendencies |
c sum contributions to inorganic nutrient tendencies |
1672 |
dPO4dt = - consumpPO4 + preminP + DOPremin |
dPO4dt = - consumpPO4 + |
1673 |
dNH4dt = - consumpNH4 + preminN + DONremin |
#ifdef ALLOW_CDOM |
1674 |
|
& DOPremin |
1675 |
|
#else |
1676 |
|
& preminP + DOPremin |
1677 |
|
#endif |
1678 |
|
dNH4dt = - consumpNH4 + |
1679 |
|
#ifdef ALLOW_CDOM |
1680 |
|
& DONremin |
1681 |
|
#else |
1682 |
|
& preminN + DONremin |
1683 |
|
#endif |
1684 |
& - NO2prod |
& - NO2prod |
1685 |
dNO2dt = - consumpNO2 |
dNO2dt = - consumpNO2 |
1686 |
& + NO2prod - NO3prod |
& + NO2prod - NO3prod |
1689 |
c-ONLYNO3 dNO3dt = - consumpNO3 + preminN + DONremin |
c-ONLYNO3 dNO3dt = - consumpNO3 + preminN + DONremin |
1690 |
#ifdef ALLOW_DENIT |
#ifdef ALLOW_DENIT |
1691 |
if (O2local.le.O2crit) then |
if (O2local.le.O2crit) then |
1692 |
denit = denit_np*(preminP + DOPremin) |
denit = denit_np |
1693 |
dNO3dt = dNO3dt - denit |
#ifdef ALLOW_CDOM |
1694 |
dNH4dt = dNH4dt - (preminN + DONremin) |
& *(DOPremin) |
1695 |
|
#else |
1696 |
|
& *(preminP + DOPremin) |
1697 |
|
#endif |
1698 |
|
dNO3dt = dNO3dt - (denit_no3/denit_np)*denit |
1699 |
|
dNH4dt = dNH4dt - |
1700 |
|
#ifdef ALLOW_CDOM |
1701 |
|
& (DONremin) |
1702 |
|
#else |
1703 |
|
& (preminN + DONremin) |
1704 |
|
#endif |
1705 |
endif |
endif |
1706 |
#endif |
#endif |
1707 |
dFeTdt = - consumpFeT + preminFe + DOFeremin |
dFeTdt = - consumpFeT + |
1708 |
|
#ifdef ALLOW_CDOM |
1709 |
|
& DOFeremin |
1710 |
|
#else |
1711 |
|
& preminFe + DOFeremin |
1712 |
|
#endif |
1713 |
#ifdef PART_SCAV |
#ifdef PART_SCAV |
1714 |
& - scav_part*freefelocal + |
& - scav_part*freefelocal + |
1715 |
#else |
#else |
1720 |
|
|
1721 |
c tendency of dissolved organic pool |
c tendency of dissolved organic pool |
1722 |
dDOPdt = totphy_dop + totzoo_dop - DOPremin |
dDOPdt = totphy_dop + totzoo_dop - DOPremin |
1723 |
|
#ifdef ALLOW_CDOM |
1724 |
|
& +preminP + cdomp_degrd |
1725 |
|
#endif |
1726 |
dDONdt = totphy_don + totzoo_don - DONremin |
dDONdt = totphy_don + totzoo_don - DONremin |
1727 |
|
#ifdef ALLOW_CDOM |
1728 |
|
& +preminN + cdomn_degrd |
1729 |
|
#endif |
1730 |
dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin |
dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin |
1731 |
|
#ifdef ALLOW_CDOM |
1732 |
|
& +preminFe + cdomfe_degrd |
1733 |
|
#endif |
1734 |
|
|
1735 |
c tendency of particulate detritus pools |
c tendency of particulate detritus pools |
1736 |
dpopdt = totphy_pop + totzoo_pop - preminP + psinkP |
dpopdt = totphy_pop + totzoo_pop - preminP + psinkP |
1737 |
|
#ifdef ALLOW_CDOM |
1738 |
|
& -preminP_cdom |
1739 |
|
#endif |
1740 |
dpondt = totphy_pon + totzoo_pon - preminN + psinkN |
dpondt = totphy_pon + totzoo_pon - preminN + psinkN |
1741 |
|
#ifdef ALLOW_CDOM |
1742 |
|
& -preminN_cdom |
1743 |
|
#endif |
1744 |
dpofedt = totphy_pofe + totzoo_pofe - preminFe + psinkFe |
dpofedt = totphy_pofe + totzoo_pofe - preminFe + psinkFe |
1745 |
|
#ifdef ALLOW_CDOM |
1746 |
|
& -preminFe_cdom |
1747 |
|
#endif |
1748 |
dpSidt = totphy_posi + totzoo_posi - preminSi + psinkSi |
dpSidt = totphy_posi + totzoo_posi - preminSi + psinkSi |
1749 |
#ifdef ALLOW_CARBON |
#ifdef ALLOW_CARBON |
1750 |
dDICdt = - consumpDIC - consumpDIC_PIC |
dDICdt = - consumpDIC - consumpDIC_PIC |
1751 |
|
#ifdef ALLOW_CDOM |
1752 |
|
& + DOCremin |
1753 |
|
#else |
1754 |
& + preminC + DOCremin |
& + preminC + DOCremin |
1755 |
|
#endif |
1756 |
& + disscPIC |
& + disscPIC |
1757 |
dDOCdt = totphy_doc + totzoo_doc - DOCremin |
dDOCdt = totphy_doc + totzoo_doc - DOCremin |
1758 |
|
#ifdef ALLOW_CDOM |
1759 |
|
& +preminC + cdomc_degrd |
1760 |
|
#endif |
1761 |
dPOCdt = totphy_poc + totzoo_poc - preminC + psinkC |
dPOCdt = totphy_poc + totzoo_poc - preminC + psinkC |
1762 |
|
#ifdef ALLOW_CDOM |
1763 |
|
& -preminC_cdom |
1764 |
|
#endif |
1765 |
dPICdt = totphy_pic + totzoo_pic - disscPIC + psinkPIC |
dPICdt = totphy_pic + totzoo_pic - disscPIC + psinkPIC |
1766 |
dALKdt = - dNO3dt - 2.d0 * (consumpDIC_PIC - disscPIC) |
dALKdt = - dNO3dt - 2.d0 * (consumpDIC_PIC - disscPIC) |
1767 |
c should be = O2prod - preminP - DOPremin? |
c should be = O2prod - preminP - DOPremin? |
1771 |
dO2dt = R_OP*consumpPO4 |
dO2dt = R_OP*consumpPO4 |
1772 |
c loss of O2 by remineralization |
c loss of O2 by remineralization |
1773 |
if (O2local.gt.O2crit) then |
if (O2local.gt.O2crit) then |
1774 |
dO2dt = dO2dt - R_OP*(preminP + DOPremin) |
dO2dt = dO2dt - R_OP |
1775 |
|
#ifdef ALLOW_CDOM |
1776 |
|
& *(DOPremin) |
1777 |
|
#else |
1778 |
|
& *(preminP + DOPremin) |
1779 |
|
#endif |
1780 |
endif |
endif |
1781 |
#ifdef OLD_GRAZE |
#ifdef OLD_GRAZE |
1782 |
do nz=1,nzmax |
do nz=1,nzmax |
1783 |
dzooCdt(nz) = grazingC(nz)*zooClocal(nz) |
dzooCdt(nz) = grazingC(nz)*zooClocal(nz) |
1784 |
& - mortzoo(nz)*zooClocal(nz) |
& - mortzoo(nz)* |
1785 |
& - mortzoo2(nz)*zooClocal(nz)**2 |
& mortZTempFunction*zooClocal(nz) |
1786 |
|
& - mortzoo2(nz)* |
1787 |
|
& mortZ2TempFunction*zooClocal(nz)**2 |
1788 |
enddo |
enddo |
1789 |
#else |
#else |
1790 |
do nz=1,nzmax |
do nz=1,nzmax |
1791 |
dzooCdt(nz) = sumgrazzooc(nz) |
dzooCdt(nz) = sumgrazzooc(nz) |
1792 |
& - mortzoo(nz)*zooClocal(nz) |
& - mortzoo(nz)* |
1793 |
& - mortzoo2(nz)*zooClocal(nz)**2 |
& mortZTempFunction*zooClocal(nz) |
1794 |
|
& - mortzoo2(nz)* |
1795 |
|
& mortZ2TempFunction*zooClocal(nz)**2 |
1796 |
enddo |
enddo |
1797 |
#endif |
#endif |
1798 |
|
|
1799 |
|
#ifdef ALLOW_CDOM |
1800 |
|
dcdomdt = totphy_cdomp + totzoo_cdomp + preminP_cdom |
1801 |
|
& -cdomp_degrd |
1802 |
|
#endif |
1803 |
|
|
1804 |
#endif |
#endif |
1805 |
|
|
1806 |
if (debug.eq.10) print*,'dDOPdt', dDOPdt |
if (debug.eq.10) print*,'dDOPdt', dDOPdt |