/[MITgcm]/MITgcm_contrib/darwin2/pkg/monod/monod_plankton.F
ViewVC logotype

Diff of /MITgcm_contrib/darwin2/pkg/monod/monod_plankton.F

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

revision 1.1 by jahn, Wed Apr 13 18:56:25 2011 UTC revision 1.15 by jahn, Thu May 1 16:19:32 2014 UTC
# Line 48  c ANNA pass extra variables if WAVEBANDS Line 48  c ANNA pass extra variables if WAVEBANDS
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,
# Line 74  c ANNA pass extra variables if WAVEBANDS Line 75  c ANNA pass extra variables if WAVEBANDS
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
# Line 94  c ANNA pass extra variables if WAVEBANDS Line 111  c ANNA pass extra variables if WAVEBANDS
111                                        
112    
113           implicit none           implicit none
 #include "EEPARAMS.h"  
114  #include "MONOD_SIZE.h"  #include "MONOD_SIZE.h"
115  #include "MONOD.h"  #include "MONOD.h"
116  #include "DARWIN_PARAMS.h"  #include "DARWIN_PARAMS.h"
# Line 145  c zoo   = zooplankton Line 161  c zoo   = zooplankton
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
# Line 199  c zoo   = zooplankton Line 216  c zoo   = zooplankton
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
# Line 216  c ANNA Global variables for WAVEBANDS Line 244  c ANNA Global variables for WAVEBANDS
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    
# Line 237  c phytoplankton specific nutrient limita Line 263  c phytoplankton specific nutrient limita
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)
# Line 271  c varible for mimumum phyto Line 299  c varible for mimumum phyto
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)
# Line 279  c  variables for zooplankton grazing rat Line 309  c  variables for zooplankton grazing rat
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)
316           _RL grazphy(npmax,nzmax)           _RL grazphy(npmax,nzmax)
317           _RL sumgrazphy(npmax)           _RL sumgrazphy(npmax)
318           _RL sumgrazzoo(nzmax)           _RL sumgrazzoo(nzmax)
# Line 296  c  variables for zooplankton grazing rat Line 329  c  variables for zooplankton grazing rat
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
# Line 376  c variables for conversions from phyto a Line 416  c variables for conversions from phyto a
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        
# Line 414  c ANNA inportant but local variables tha Line 467  c ANNA inportant but local variables tha
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
# Line 475  c energetic disadvantage of using NO2/No Line 524  c energetic disadvantage of using NO2/No
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                    
# Line 567  ccccccccccccccccccccccccccccccc Line 624  ccccccccccccccccccccccccccccccc
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
# Line 596  c using Platt-like equations with inhibi Line 655  c using Platt-like equations with inhibi
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
# Line 813  c ANNA endif Line 884  c ANNA endif
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))
# Line 834  c assumes balanced growth, eq A14 in Gei Line 906  c assumes balanced growth, eq A14 in Gei
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
# Line 859  c end inhib Line 937  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
# Line 890  c         acclim(np)=max(acclim(np),chl2 Line 968  c         acclim(np)=max(acclim(np),chl2
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)/
# Line 951  c sum all palatability*phyto and find ph Line 1030  c sum all palatability*phyto and find ph
1030              allphyto(nz)=allphyto(nz)+palat(np,nz)*phyto(np)              allphyto(nz)=allphyto(nz)+palat(np,nz)*phyto(np)
1031             enddo             enddo
1032             if (allphyto(nz).le.0. _d 0) allphyto(nz)=phygrazmin             if (allphyto(nz).le.0. _d 0) allphyto(nz)=phygrazmin
1033    #ifdef SER_GRAZ
1034               denphyto(nz)=0. _d 0
1035               do np=1,npmax
1036                denphyto(nz)=denphyto(nz)+
1037         &            (palat(np,nz)*phyto(np)/allphyto(nz))*phyto(np)
1038               enddo
1039               if (denphyto(nz).le.0. _d 0) denphyto(nz)=phygrazmin
1040    #endif
1041             do np=1,npmax             do np=1,npmax
1042              tmpz=max(0. _d 0,(allphyto(nz)-phygrazmin) )              tmpz=max(0. _d 0,(allphyto(nz)-phygrazmin) )
1043              grazphy(np,nz)=grazemax(nz)*              grazphy(np,nz)=grazemax(nz)*zooTempFunction(nz)*
1044    #ifdef SER_GRAZ
1045    c as in Vallina et al, 2011
1046         &          (((palat(np,nz)*phyto(np)/allphyto(nz))*phyto(np))/
1047         &           denphyto(nz)) *
1048    #else
1049    c as in Dutkiewicz et al, GBC, 2009
1050       &           (palat(np,nz)*phyto(np)/allphyto(nz))*       &           (palat(np,nz)*phyto(np)/allphyto(nz))*
1051       &           ( tmpz/  #endif
1052       &             (tmpz+kgrazesat) )       &           ( tmpz**hollexp/
1053         &             (tmpz**hollexp+kgrazesat**hollexp) )
1054             enddo             enddo
1055            enddo            enddo
1056            if (debug.eq.2) print*,'allphyto',allphyto            if (debug.eq.2) print*,'allphyto',allphyto
# Line 986  c sum over phy for impact on zoo, and al Line 1080  c sum over phy for impact on zoo, and al
1080             sumgrazlossPIC(nz)=0. _d 0             sumgrazlossPIC(nz)=0. _d 0
1081  #endif  #endif
1082             do np=1,npmax             do np=1,npmax
1083    #ifdef FIX_ZOO_QUOTAS
1084                  sumgrazzoo(nz)=sumgrazzoo(nz)+
1085         &             asseff(np,nz)*grazphy(np,nz)*zooP(nz)
1086                  sumgrazloss(nz)=sumgrazloss(nz)+
1087         &             (1. _d 0-asseff(np,nz))*grazphy(np,nz)*zooP(nz)
1088                  sumgrazzooN(nz)=sumgrazzooN(nz)+
1089         &             asseff(np,nz)*grazphy(np,nz)*zooP(nz)*R_NP_zoo(nz)
1090                  sumgrazlossN(nz)=sumgrazlossN(nz)+
1091         &             (R_NP(np)-asseff(np,nz)*R_NP_zoo(nz))*
1092         &             grazphy(np,nz)*zooP(nz)
1093                  sumgrazzooFe(nz)=sumgrazzooFe(nz)+
1094         &             asseff(np,nz)*grazphy(np,nz)*
1095         &                                      zooP(nz)*R_FeP_zoo(nz)
1096                  sumgrazlossFe(nz)=sumgrazlossFe(nz)+
1097         &             (R_FeP(np)-asseff(np,nz)*R_FeP_zoo(nz))*
1098         &             grazphy(np,nz)*zooP(nz)
1099                  sumgrazzooSi(nz)=sumgrazzooSi(nz)+
1100         &             asseff(np,nz)*grazphy(np,nz)*
1101         &                                     zooP(nz)*R_SiP_zoo(nz)
1102                  sumgrazlossSi(nz)=sumgrazlossSi(nz)+
1103         &             (R_SiP(np)-asseff(np,nz)*R_SiP_zoo(nz))*
1104         &             grazphy(np,nz)*zooP(nz)
1105    #ifdef ALLOW_CARBON
1106                  sumgrazzooC(nz)=sumgrazzooC(nz)+
1107         &             asseff(np,nz)*grazphy(np,nz)*zooP(nz)*R_PC_zoo(nz)
1108                  sumgrazlossC(nz)=sumgrazlossC(nz)+
1109         &             (R_PC(np)-asseff(np,nz)*R_PC_zoo(nz))*
1110         &             grazphy(np,nz)*zooP(nz)
1111                  sumgrazlossPIC(nz)=sumgrazlossPIC(nz)+
1112         &             (1. _d 0)*grazphy(np,nz)*
1113         &                           zooP(nz)*R_PC(np)*R_PICPOC(np)
1114    #endif
1115    #else
1116                sumgrazzoo(nz)=sumgrazzoo(nz)+                sumgrazzoo(nz)=sumgrazzoo(nz)+
1117       &             asseff(np,nz)*grazphy(np,nz)*zooP(nz)       &             asseff(np,nz)*grazphy(np,nz)*zooP(nz)
1118                sumgrazloss(nz)=sumgrazloss(nz)+                sumgrazloss(nz)=sumgrazloss(nz)+
# Line 1017  c sum over phy for impact on zoo, and al Line 1144  c sum over phy for impact on zoo, and al
1144       &             (1. _d 0)*grazphy(np,nz)*       &             (1. _d 0)*grazphy(np,nz)*
1145       &                           zooP(nz)*R_PC(np)*R_PICPOC(np)       &                           zooP(nz)*R_PC(np)*R_PICPOC(np)
1146  #endif  #endif
1147    #endif
1148             enddo             enddo
1149            enddo            enddo
1150            if (debug.eq.2) print*,'sumgrazzoo',sumgrazzoo            if (debug.eq.2) print*,'sumgrazzoo',sumgrazzoo
# Line 1034  cccccccccccccccccccccccccccccccccccccccc Line 1162  cccccccccccccccccccccccccccccccccccccccc
1162  c accumulate particulate and dissolved detritus  c accumulate particulate and dissolved detritus
1163             do np=1, npmax             do np=1, npmax
1164                 totphy_pop=totphy_pop+                 totphy_pop=totphy_pop+
1165       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1166         &                mortPTempFunction*phytomin(np)
1167                 totphy_dop=totphy_dop+                 totphy_dop=totphy_dop+
1168       &                (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &                (1. _d 0-ExportFracP(np))*mortphy(np)*
1169         &                mortPTempFunction*phytomin(np)
1170                 totphy_pon=totphy_pon+ R_NP(np)*                 totphy_pon=totphy_pon+ R_NP(np)*
1171       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1172         &                mortPTempFunction*phytomin(np)
1173                 totphy_don=totphy_don+ R_NP(np)*                 totphy_don=totphy_don+ R_NP(np)*
1174       &               (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &               (1. _d 0-ExportFracP(np))*mortphy(np)*
1175         &                mortPTempFunction*phytomin(np)
1176                 totphy_pofe=totphy_pofe+ R_FeP(np)*                 totphy_pofe=totphy_pofe+ R_FeP(np)*
1177       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1178         &                mortPTempFunction*phytomin(np)
1179                 totphy_dofe=totphy_dofe+ R_FeP(np)*                 totphy_dofe=totphy_dofe+ R_FeP(np)*
1180       &               (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &               (1. _d 0-ExportFracP(np))*mortphy(np)*
1181         &                mortPTempFunction*phytomin(np)
1182                 totphy_posi=totphy_posi+ R_SiP(np)*                 totphy_posi=totphy_posi+ R_SiP(np)*
1183       &                mortphy(np)*phytomin(np)       &                mortphy(np)*
1184         &                mortPTempFunction*phytomin(np)
1185  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1186                 totphy_poc=totphy_poc+ R_PC(np)*                 totphy_poc=totphy_poc+ R_PC(np)*
1187       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1188         &                mortPTempFunction*phytomin(np)
1189                 totphy_doc=totphy_doc+ R_PC(np)*                 totphy_doc=totphy_doc+ R_PC(np)*
1190       &               (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &               (1. _d 0-ExportFracP(np))*mortphy(np)*
1191         &                mortPTempFunction*phytomin(np)
1192                 totphy_pic=totphy_pic+ R_PC(np)*R_PICPOC(np)*                 totphy_pic=totphy_pic+ R_PC(np)*R_PICPOC(np)*
1193       &                mortphy(np)*phytomin(np)       &                mortphy(np)*
1194         &                mortPTempFunction*phytomin(np)
1195  #endif  #endif
1196              enddo              enddo
1197    #ifdef ALLOW_CDOM
1198                   totphy_cdomp=(fraccdom)*totphy_dop
1199                   totphy_dop=totphy_dop-totphy_cdomp
1200                   totphy_cdomn=rnp_cdom*totphy_cdomp
1201                   totphy_don=totphy_don-totphy_cdomn
1202                   totphy_cdomfe=rfep_cdom*totphy_cdomp
1203                   totphy_dofe=totphy_dofe-totphy_cdomfe
1204    #ifdef ALLOW_CARBON
1205                   totphy_cdomc=rcp_cdom*totphy_cdomp
1206                   totphy_doc=totphy_doc-totphy_cdomc
1207    #endif
1208    #endif
1209              if (debug.eq.3) print*,'tot_phy_pop',totphy_pop              if (debug.eq.3) print*,'tot_phy_pop',totphy_pop
1210              if (debug.eq.3) print*,'tot_phy_dop',totphy_dop              if (debug.eq.3) print*,'tot_phy_dop',totphy_dop
1211              if (debug.eq.3) print*,'tot_phy_pon',totphy_pon              if (debug.eq.3) print*,'tot_phy_pon',totphy_pon
# Line 1107  cccccccccccccccccccccccccccccccccccccccc Line 1257  cccccccccccccccccccccccccccccccccccccccc
1257  c accumulate particulate and dissolved detritus  c accumulate particulate and dissolved detritus
1258              do nz=1, nzmax              do nz=1, nzmax
1259                 totzoo_pop=totzoo_pop+                 totzoo_pop=totzoo_pop+
1260       &                     ExportFracZ(nz)*mortzoo(nz)*zooP(nz)       &                     ExportFracZ(nz)*( mortzoo(nz)*
1261         &                     mortZTempFunction*zooP(nz)
1262         &                     +  mortzoo2(nz)*
1263         &                     mortZ2TempFunction*zooP(nz)**2 )
1264                 totzoo_dop=totzoo_dop+                 totzoo_dop=totzoo_dop+
1265       &                    (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooP(nz)       &                    (1. _d 0-ExportFracZ(nz))*(
1266                 totzoo_pon=totzoo_pon+       &                     mortzoo(nz)*
1267       &                     ExportFracZ(nz)*mortzoo(nz)*zooN(nz)       &                     mortZTempFunction*zooP(nz)+
1268         &                     mortzoo2(nz)*
1269         &                     mortZ2TempFunction*zooP(nz)**2 )
1270                   totzoo_pon=totzoo_pon+
1271         &                     ExportFracZ(nz)*( mortzoo(nz)*
1272         &                     mortZTempFunction*zooN(nz)
1273         &                     +  mortzoo2(nz)*
1274         &                     mortZ2TempFunction*zooN(nz)*zooP(nz) )
1275                 totzoo_don=totzoo_don+                 totzoo_don=totzoo_don+
1276       &                    (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooN(nz)       &                    (1. _d 0-ExportFracZ(nz))*(
1277         &                     mortzoo(nz)*
1278         &                     mortZTempFunction*zooN(nz)+
1279         &                     mortzoo2(nz)*
1280         &                     mortZ2TempFunction*zooN(nz)*zooP(nz) )
1281                 totzoo_pofe=totzoo_pofe+                 totzoo_pofe=totzoo_pofe+
1282       &                     ExportFracZ(nz)*mortzoo(nz)*zooFe(nz)       &                     ExportFracZ(nz)*( mortzoo(nz)*
1283         &                     mortZTempFunction*zooFe(nz)
1284         &                     +  mortzoo2(nz)*
1285         &                     mortZ2TempFunction*zooFe(nz)*zooP(nz) )
1286                 totzoo_dofe=totzoo_dofe+                 totzoo_dofe=totzoo_dofe+
1287       &                   (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooFe(nz)       &                   (1. _d 0-ExportFracZ(nz))*(
1288                 totzoo_posi=totzoo_posi+       &                    mortzoo(nz)*
1289       &                     mortzoo(nz)*zooSi(nz)       &                    mortZTempFunction*zooFe(nz) +
1290         &                    mortzoo2(nz)*
1291         &                    mortZ2TempFunction*zooFe(nz)*zooP(nz) )
1292                   totzoo_posi=totzoo_posi+
1293         &                     ( mortzoo(nz)*
1294         &                       mortZTempFunction*zooSi(nz)+
1295         &                       mortzoo2(nz)*
1296         &                       mortZ2TempFunction*zooSi(nz)*zooP(nz) )
1297  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1298                 totzoo_poc=totzoo_poc+                 totzoo_poc=totzoo_poc+
1299       &                    ExportFracZ(nz)*mortzoo(nz)*zooClocal(nz)       &                    ExportFracZ(nz)*( mortzoo(nz)*
1300         &                         mortZTempFunction*zooClocal(nz)
1301         &                      +  mortzoo2(nz)*
1302         &                       mortZ2TempFunction*zooClocal(nz)*zooP(nz) )
1303                 totzoo_doc=totzoo_doc+                 totzoo_doc=totzoo_doc+
1304       &           (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooClocal(nz)       &           (1. _d 0-ExportFracZ(nz))*( mortzoo(nz)*
1305         &                         mortZTempFunction*zooClocal(nz)
1306         &                      +  mortzoo2(nz)*
1307         &                       mortZ2TempFunction*zooClocal(nz)*zooP(nz) )
1308  #endif  #endif
1309              enddo              enddo
1310    
# Line 1154  c accumulate particulate and dissolved d Line 1334  c accumulate particulate and dissolved d
1334  #endif  #endif
1335              enddo              enddo
1336  #endif  #endif
1337    
1338    #ifdef ALLOW_CDOM
1339                   totzoo_cdomp=(fraccdom)*totzoo_dop
1340                   totzoo_dop=totzoo_dop-totzoo_cdomp
1341                   totzoo_cdomn=rnp_cdom*totzoo_cdomp
1342                   totzoo_don=totzoo_don-totzoo_cdomn
1343                   totzoo_cdomfe=rfep_cdom*totzoo_cdomp
1344                   totzoo_dofe=totzoo_dofe-totzoo_cdomfe
1345    #ifdef ALLOW_CARBON
1346                   totzoo_cdomc=rcp_cdom*totzoo_cdomp
1347                   totzoo_doc=totzoo_doc-totzoo_cdomc
1348    #endif
1349    #endif
1350              if (debug.eq.5) print*,'totzoo_pop',totzoo_pop              if (debug.eq.5) print*,'totzoo_pop',totzoo_pop
1351              if (debug.eq.5) print*,'totzoo_dop',totzoo_dop              if (debug.eq.5) print*,'totzoo_dop',totzoo_dop
1352              if (debug.eq.5) print*,'totzoo_pon',totzoo_pon              if (debug.eq.5) print*,'totzoo_pon',totzoo_pon
# Line 1170  c consumption - sum of phytoplankton con Line 1363  c consumption - sum of phytoplankton con
1363  c phospate uptake by each phytoplankton  c phospate uptake by each phytoplankton
1364  #ifndef GEIDER  #ifndef GEIDER
1365                 grow(np)=ngrow(np)*mu(np)*limit(np)*ilimit(np)*                 grow(np)=ngrow(np)*mu(np)*limit(np)*ilimit(np)*
1366       &                            phytoTempFunction(np)       &                            phytoTempFunction(np)*pCO2limit(np)
1367  #endif  #endif
1368  #ifdef GEIDER  #ifdef GEIDER
1369                 grow(np)=ngrow(np)*pcarbon(np)                 grow(np)=ngrow(np)*pcarbon(np)
# Line 1178  c phospate uptake by each phytoplankton Line 1371  c phospate uptake by each phytoplankton
1371                 if (debug.eq.14) print*,'grow', grow(np), pcarbon(np)                 if (debug.eq.14) print*,'grow', grow(np), pcarbon(np)
1372  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
1373  c geider 97 for dChl/dt (source part) Eq. 3  c geider 97 for dChl/dt (source part) Eq. 3
1374                 if (acclim(np).gt. 0. _d 0) then                 if (acclim(np).gt. 0. _d 0.and.
1375         &                                 alpha_I(np).gt. 0. _d 0) then
1376                  rhochl(np)=chl2cmax(np) *                  rhochl(np)=chl2cmax(np) *
1377       &                      (grow(np)/(alpha_I(np)*acclim(np)) )       &                      (grow(np)/(alpha_I(np)*acclim(np)) )
1378                 else                 else
# Line 1288  c remineralization of sinking particulat Line 1482  c remineralization of sinking particulat
1482              preminN  = reminTempFunction * Kpremin_N*PONlocal              preminN  = reminTempFunction * Kpremin_N*PONlocal
1483              preminFe = reminTempFunction * Kpremin_Fe*POFelocal              preminFe = reminTempFunction * Kpremin_Fe*POFelocal
1484              preminSi = reminTempFunction * Kpremin_Si*PSilocal              preminSi = reminTempFunction * Kpremin_Si*PSilocal
1485    #ifdef ALLOW_CDOM
1486                preminP_cdom = fraccdom*preminP
1487                preminP=preminP-preminP_cdom
1488                preminN_cdom = rnp_cdom*preminP_cdom
1489                preminN=preminN-preminN_cdom
1490                preminFe_cdom = rfep_cdom*preminP_cdom
1491                preminFe=preminFe-preminFe_cdom
1492    #endif
1493    
1494  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1495             DOCremin =  reminTempFunction * Kdoc * DOClocal             DOCremin =  reminTempFunction * Kdoc * DOClocal
1496             preminC  = reminTempFunction * Kpremin_C*POClocal             preminC  = reminTempFunction * Kpremin_C*POClocal
1497    #ifdef ALLOW_CDOM
1498                preminC_cdom = rcp_cdom*preminP_cdom
1499                preminC=preminC-preminC_cdom
1500    #endif
1501  c dissolution  c dissolution
1502             disscPIC = Kdissc*PIClocal             disscPIC = Kdissc*PIClocal
1503  #endif  #endif
1504    
1505    #ifdef ALLOW_CDOM
1506    c degradation of  CDOM - high when bleached by light
1507               cdomp_degrd = reminTempFunction * cdomlocal
1508         &            *(cdomdegrd+cdombleach*min(PARlocal/PARcdom,1. _d 0) )
1509               cdomn_degrd = rnp_cdom * cdomp_degrd
1510               cdomfe_degrd= rfep_cdom * cdomp_degrd
1511    #ifdef ALLOW_CARBON
1512               cdomc_degrd = rcp_cdom  * cdomp_degrd
1513    #endif
1514    #endif
1515    
1516    #ifdef ALLOW_DENIT
1517               if (O2local.lt.O2crit) then
1518                  if (NO3local.lt.no3crit) then
1519    c no remineralization for N, P, Fe (not Si?)
1520                   DOPremin = 0. _d 0
1521                   DONremin = 0. _d 0
1522                   DOFeremin = 0. _d 0
1523                   preminP  = 0. _d 0
1524                   preminN  = 0. _d 0
1525                   preminFe =  0. _d 0
1526    #ifdef ALLOW_CDOM
1527                   preminP_cdom =  0. _d 0
1528                   preminN_cdom =  0. _d 0
1529                   preminFe_cdom =  0. _d 0
1530    #endif
1531    #ifdef ALLOW_CARBON
1532                  DOCremin = 0. _d 0
1533                  preminC  = 0. _d 0
1534    #ifdef ALLOW_CDOM
1535                  preminC_cdom =  0. _d 0
1536    #endif
1537    #endif
1538    
1539    #ifdef ALLOW_CDOM
1540    c degradation of  CDOM - high when bleached by light
1541               cdomp_degrd = reminTempFunction * cdomlocal
1542         &            *(cdombleach*min(PARlocal/PARcdom,1. _d 0) )
1543               cdomn_degrd = rnp_cdom * cdomp_degrd
1544               cdomfe_degrd= rfep_cdom * cdomp_degrd
1545    #ifdef ALLOW_CARBON
1546               cdomc_degrd = rcp_cdom  * cdomp_degrd
1547    #endif
1548    #endif
1549                  endif
1550               endif
1551    #endif
1552    c end denit caveats
1553    
1554  c chemistry  c chemistry
1555  c NH4 -> NO2 -> NO3 by bacterial action  c NH4 -> NO2 -> NO3 by bacterial action
1556              NO2prod = knita*( 1. _d 0-min(PARlocal/PAR0,1. _d 0) )              NO2prod = knita*( 1. _d 0-min(PARlocal/PAR0,1. _d 0) )
# Line 1322  c phytoplankton Line 1577  c phytoplankton
1577  #else  #else
1578       &                        - sumgrazphy(np)       &                        - sumgrazphy(np)
1579  #endif  #endif
1580       &                        - mortphy(np)*phytomin(np)       &                        - mortphy(np)*
1581         &                          mortPTempFunction*phytomin(np)
1582       &                        + psinkphy(np)       &                        + psinkphy(np)
1583  #ifdef GEIDER  #ifdef GEIDER
1584  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
# Line 1337  c             dphychl(np) = rhochl(np)*P Line 1593  c             dphychl(np) = rhochl(np)*P
1593  #else  #else
1594       &                   - sumgrazphy(np)       &                   - sumgrazphy(np)
1595  #endif  #endif
1596       &                   - mortphy(np)*phytomin(np)) *chl2c(np)*R_PC(np)       &                   - mortphy(np)*
1597         &                     mortPTempFunction*phytomin(np))
1598         &                       *chl2c(np)*R_PC(np)
1599       &                        + psinkChl(np)       &                        + psinkChl(np)
1600  #endif  #endif
1601                Chl=Chl + phychl(np)                Chl=Chl + phychl(np)
# Line 1348  c%%% Line 1606  c%%%
1606  #ifdef OLD_GRAZE  #ifdef OLD_GRAZE
1607                tmpr=grazing_phyto(np)*                tmpr=grazing_phyto(np)*
1608       &              (phytomin(np)/(phytomin(np) + kgrazesat))       &              (phytomin(np)/(phytomin(np) + kgrazesat))
1609       &                        + mortphy(np)*phytomin(np)       &                        + mortphy(np)*
1610         &                          mortPTempFunction*phytomin(np)
1611       &                        - psinkphy(np)       &                        - psinkphy(np)
1612  #else  #else
1613                tmpr=sumgrazphy(np)                tmpr=sumgrazphy(np)
1614       &                        + mortphy(np)*phytomin(np)       &                        + mortphy(np)*
1615         &                          mortPTempFunction*phytomin(np)
1616       &                        - psinkphy(np)       &                        - psinkphy(np)
1617  #endif  #endif
1618  #ifdef DAR_DIAG_RSTAR  #ifdef DAR_DIAG_RSTAR
1619  #ifndef GEIDER  #ifndef GEIDER
1620                tmpgrow=ngrow(np)*mu(np)*ilimit(np)*                tmpgrow=ngrow(np)*mu(np)*ilimit(np)*
1621       &              phytoTempFunction(np)       &              phytoTempFunction(np)*pCO2limit(np)
1622  #endif  #endif
1623  #ifdef GEIDER  #ifdef GEIDER
1624                tmpgrow=grow(np)/limit(np)                tmpgrow=grow(np)/limit(np)
# Line 1419  c zooplankton mortality Line 1679  c zooplankton mortality
1679              do nz=1,nzmax              do nz=1,nzmax
1680  c zoo in P currency  c zoo in P currency
1681                dzooPdt(nz)  = dzooPdt(nz)                dzooPdt(nz)  = dzooPdt(nz)
1682       &                           - mortzoo(nz)*zooP(nz)       &                           - mortzoo(nz)*
1683         &                             mortZTempFunction*zooP(nz)
1684         &                           - mortzoo2(nz)*
1685         &                             mortZ2TempFunction*zooP(nz)**2
1686  c zooplankton in other currencies  c zooplankton in other currencies
1687  C zooplankton stoichiometry varies according to food source  C zooplankton stoichiometry varies according to food source
1688                dzooNdt(nz)  = dzooNdt(nz)                dzooNdt(nz)  = dzooNdt(nz)
1689       &                           - mortzoo(nz)*zooN(nz)       &                           - mortzoo(nz)*
1690         &                             mortZTempFunction*zooN(nz)
1691         &                           - mortzoo2(nz)*
1692         &                             mortZ2TempFunction*zooN(nz)*zooP(nz)
1693                dzooFedt(nz) = dzooFedt(nz)                dzooFedt(nz) = dzooFedt(nz)
1694       &                           - mortzoo(nz)*zooFe(nz)       &                           - mortzoo(nz)*
1695         &                             mortZTempFunction*zooFe(nz)
1696         &                           - mortzoo2(nz)*
1697         &                             mortZ2TempFunction*zooFe(nz)*zooP(nz)
1698                dzooSidt(nz) = dzooSidt(nz)                dzooSidt(nz) = dzooSidt(nz)
1699       &                           - mortzoo(nz)*zooSi(nz)       &                           - mortzoo(nz)*
1700         &                             mortZTempFunction*zooSi(nz)
1701         &                           - mortzoo2(nz)*
1702         &                             mortZ2TempFunction*zooSi(nz)*zooP(nz)
1703              enddo              enddo
1704    
1705    
1706  c sum contributions to inorganic nutrient tendencies  c sum contributions to inorganic nutrient tendencies
1707              dPO4dt =  - consumpPO4 +  preminP  + DOPremin              dPO4dt =  - consumpPO4 +  
1708              dNH4dt =  - consumpNH4 +  preminN  + DONremin  #ifdef ALLOW_CDOM
1709         &                 DOPremin
1710    #else
1711         &                 preminP  + DOPremin
1712    #endif
1713                dNH4dt =  - consumpNH4 +  
1714    #ifdef ALLOW_CDOM
1715         &                 DONremin
1716    #else
1717         &                 preminN  +  DONremin
1718    #endif
1719       &                                   - NO2prod       &                                   - NO2prod
1720              dNO2dt =  - consumpNO2                                      dNO2dt =  - consumpNO2                        
1721       &                                   + NO2prod - NO3prod       &                                   + NO2prod - NO3prod
# Line 1442  c sum contributions to inorganic nutrien Line 1724  c sum contributions to inorganic nutrien
1724  c-ONLYNO3   dNO3dt =  - consumpNO3 +  preminN  + DONremin  c-ONLYNO3   dNO3dt =  - consumpNO3 +  preminN  + DONremin
1725  #ifdef ALLOW_DENIT  #ifdef ALLOW_DENIT
1726              if (O2local.le.O2crit) then              if (O2local.le.O2crit) then
1727                denit =  denit_np*(preminP  + DOPremin)                denit =  denit_np
1728                dNO3dt = dNO3dt - denit  #ifdef ALLOW_CDOM
1729                dNH4dt = dNH4dt -  (preminN  + DONremin)       &                *(DOPremin)
1730    #else
1731         &                *(preminP  + DOPremin)
1732    #endif
1733                  dNO3dt = dNO3dt - (denit_no3/denit_np)*denit
1734                  dNH4dt = dNH4dt -  
1735    #ifdef ALLOW_CDOM
1736         &                 (DONremin)
1737    #else
1738         &                 (preminN  + DONremin)
1739    #endif
1740              endif              endif
1741  #endif  #endif
1742              dFeTdt =  - consumpFeT +  preminFe + DOFeremin              dFeTdt =  - consumpFeT +  
1743    #ifdef ALLOW_CDOM
1744         &                 DOFeremin
1745    #else
1746         &                 preminFe + DOFeremin
1747    #endif
1748  #ifdef PART_SCAV  #ifdef PART_SCAV
1749       &                 - scav_part*freefelocal +       &                 - scav_part*freefelocal +
1750  #else  #else
# Line 1458  c-ONLYNO3   dNO3dt =  - consumpNO3 +  pr Line 1755  c-ONLYNO3   dNO3dt =  - consumpNO3 +  pr
1755    
1756  c tendency of dissolved organic pool  c tendency of dissolved organic pool
1757              dDOPdt  = totphy_dop  + totzoo_dop  - DOPremin              dDOPdt  = totphy_dop  + totzoo_dop  - DOPremin
1758    #ifdef ALLOW_CDOM
1759         &                +preminP + cdomp_degrd
1760    #endif
1761              dDONdt  = totphy_don  + totzoo_don  - DONremin              dDONdt  = totphy_don  + totzoo_don  - DONremin
1762    #ifdef ALLOW_CDOM
1763         &                +preminN + cdomn_degrd
1764    #endif
1765              dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin              dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin
1766    #ifdef ALLOW_CDOM
1767         &                +preminFe + cdomfe_degrd
1768    #endif
1769    
1770  c tendency of particulate detritus pools  c tendency of particulate detritus pools
1771              dpopdt  = totphy_pop  + totzoo_pop   - preminP + psinkP              dpopdt  = totphy_pop  + totzoo_pop   - preminP + psinkP
1772    #ifdef ALLOW_CDOM
1773         &                -preminP_cdom
1774    #endif
1775              dpondt  = totphy_pon  + totzoo_pon   - preminN + psinkN              dpondt  = totphy_pon  + totzoo_pon   - preminN + psinkN
1776    #ifdef ALLOW_CDOM
1777         &                -preminN_cdom
1778    #endif
1779              dpofedt = totphy_pofe + totzoo_pofe  - preminFe + psinkFe              dpofedt = totphy_pofe + totzoo_pofe  - preminFe + psinkFe
1780    #ifdef ALLOW_CDOM
1781         &                -preminFe_cdom
1782    #endif
1783              dpSidt  = totphy_posi + totzoo_posi  - preminSi + psinkSi              dpSidt  = totphy_posi + totzoo_posi  - preminSi + psinkSi
1784  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1785              dDICdt =  - consumpDIC - consumpDIC_PIC              dDICdt =  - consumpDIC - consumpDIC_PIC
1786    #ifdef ALLOW_CDOM
1787         &                                         +  DOCremin
1788    #else
1789       &                                         +  preminC  + DOCremin       &                                         +  preminC  + DOCremin
1790    #endif
1791       &                                         + disscPIC       &                                         + disscPIC
1792              dDOCdt  = totphy_doc  + totzoo_doc  - DOCremin              dDOCdt  = totphy_doc  + totzoo_doc  - DOCremin
1793    #ifdef ALLOW_CDOM
1794         &                    +preminC + cdomc_degrd
1795    #endif
1796              dPOCdt  = totphy_poc  + totzoo_poc  - preminC + psinkC              dPOCdt  = totphy_poc  + totzoo_poc  - preminC + psinkC
1797    #ifdef ALLOW_CDOM
1798         &                -preminC_cdom
1799    #endif
1800              dPICdt  = totphy_pic  + totzoo_pic  - disscPIC + psinkPIC              dPICdt  = totphy_pic  + totzoo_pic  - disscPIC + psinkPIC
1801              dALKdt  = - dNO3dt    - 2.d0 * (consumpDIC_PIC - disscPIC)              dALKdt  = - dNO3dt    - 2.d0 * (consumpDIC_PIC - disscPIC)
1802  c should be = O2prod - preminP - DOPremin?  c should be = O2prod - preminP - DOPremin?
# Line 1480  c production of O2 by photosynthesis Line 1806  c production of O2 by photosynthesis
1806               dO2dt   = R_OP*consumpPO4               dO2dt   = R_OP*consumpPO4
1807  c loss of O2 by remineralization  c loss of O2 by remineralization
1808               if (O2local.gt.O2crit) then               if (O2local.gt.O2crit) then
1809                 dO2dt   = dO2dt - R_OP*(preminP  + DOPremin)                 dO2dt   = dO2dt - R_OP
1810    #ifdef ALLOW_CDOM
1811         &                      *(DOPremin)
1812    #else
1813         &                      *(preminP  + DOPremin)
1814    #endif
1815               endif               endif
1816  #ifdef OLD_GRAZE  #ifdef OLD_GRAZE
1817              do nz=1,nzmax              do nz=1,nzmax
1818                dzooCdt(nz)  = grazingC(nz)*zooClocal(nz)                dzooCdt(nz)  = grazingC(nz)*zooClocal(nz)
1819       &                           - mortzoo(nz)*zooClocal(nz)       &                           - mortzoo(nz)*
1820         &                             mortZTempFunction*zooClocal(nz)
1821         &                           - mortzoo2(nz)*
1822         &                         mortZ2TempFunction*zooClocal(nz)*zooP(nz)
1823              enddo              enddo
1824  #else  #else
1825              do nz=1,nzmax              do nz=1,nzmax
1826                dzooCdt(nz)  = sumgrazzooc(nz)                dzooCdt(nz)  = sumgrazzooc(nz)
1827       &                           - mortzoo(nz)*zooClocal(nz)       &                           - mortzoo(nz)*
1828         &                             mortZTempFunction*zooClocal(nz)
1829         &                           - mortzoo2(nz)*
1830         &                         mortZ2TempFunction*zooClocal(nz)*zooP(nz)
1831              enddo              enddo
1832  #endif  #endif
1833    
1834    #endif /* ALLOW_CARBON */
1835    
1836    #ifdef ALLOW_CDOM
1837                dcdomdt = totphy_cdomp + totzoo_cdomp +  preminP_cdom
1838         &                  -cdomp_degrd
1839  #endif  #endif
1840    
1841              if (debug.eq.10) print*,'dDOPdt', dDOPdt              if (debug.eq.10) print*,'dDOPdt', dDOPdt

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22