/[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.9 by stephd, Thu Jul 26 18:01:22 2012 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 77  c ANNA pass extra variables if WAVEBANDS Line 78  c ANNA pass extra variables if WAVEBANDS
78  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
79       O                       dphychl, Chlup,       O                       dphychl, Chlup,
80  #endif  #endif
81    #ifdef ALLOW_CDOM
82         O                       dcdomdt   ,
83         I                       cdomlocal,
84    #endif
85  #ifdef WAVEBANDS  #ifdef WAVEBANDS
86       I                       PARwlocal,       I                       PARwlocal,
87  #endif  #endif
# Line 94  c ANNA pass extra variables if WAVEBANDS Line 99  c ANNA pass extra variables if WAVEBANDS
99                                        
100    
101           implicit none           implicit none
 #include "EEPARAMS.h"  
102  #include "MONOD_SIZE.h"  #include "MONOD_SIZE.h"
103  #include "MONOD.h"  #include "MONOD.h"
104  #include "DARWIN_PARAMS.h"  #include "DARWIN_PARAMS.h"
# Line 145  c zoo   = zooplankton Line 149  c zoo   = zooplankton
149           _RL PARlocal           _RL PARlocal
150           _RL Tlocal           _RL Tlocal
151           _RL Slocal           _RL Slocal
152             _RL pCO2local
153           _RL freefelocal           _RL freefelocal
154           _RL inputFelocal           _RL inputFelocal
155           _RL bottom           _RL bottom
# Line 204  c zoo   = zooplankton Line 209  c zoo   = zooplankton
209           _RL Chlup(npmax)           _RL Chlup(npmax)
210  #endif  #endif
211  #endif  #endif
212    #ifdef ALLOW_CDOM
213             _RL cdomlocal
214             _RL dcdomdt  
215    #ifdef ALLOW_CARBON
216             _RL cdomclocal, dcdomcdt    
217    #endif
218    #endif
219  #ifdef ALLOW_PAR_DAY  #ifdef ALLOW_PAR_DAY
220           _RL PARdaylocal           _RL PARdaylocal
221  #endif  #endif
# Line 237  c phytoplankton specific nutrient limita Line 249  c phytoplankton specific nutrient limita
249           _RL limit(npmax)           _RL limit(npmax)
250  c phytoplankton light limitation term  c phytoplankton light limitation term
251           _RL ilimit(npmax)           _RL ilimit(npmax)
252             _RL pCO2limit(npmax)
253           _RL ngrow(npmax)           _RL ngrow(npmax)
254           _RL grow(npmax)           _RL grow(npmax)
255           _RL PspecificPO4(npmax)           _RL PspecificPO4(npmax)
256           _RL phytoTempFunction(npmax)           _RL phytoTempFunction(npmax)
257             _RL mortPTempFunction
258           _RL dummy           _RL dummy
259           _RL Ndummy           _RL Ndummy
260           _RL Nsourcelimit(npmax)           _RL Nsourcelimit(npmax)
# Line 271  c varible for mimumum phyto Line 285  c varible for mimumum phyto
285  #ifdef OLD_GRAZE  #ifdef OLD_GRAZE
286  c  variables for zooplankton grazing rates  c  variables for zooplankton grazing rates
287           _RL zooTempFunction(nzmax)           _RL zooTempFunction(nzmax)
288             _RL mortZTempFunction
289             _RL mortZ2TempFunction
290           _RL grazing_phyto(npmax)           _RL grazing_phyto(npmax)
291           _RL grazingP(nzmax)           _RL grazingP(nzmax)
292           _RL grazingN(nzmax)           _RL grazingN(nzmax)
# Line 279  c  variables for zooplankton grazing rat Line 295  c  variables for zooplankton grazing rat
295  #else  #else
296  c  variables for zooplankton grazing rates  c  variables for zooplankton grazing rates
297           _RL zooTempFunction(nzmax)           _RL zooTempFunction(nzmax)
298             _RL mortZTempFunction
299             _RL mortZ2TempFunction
300           _RL allphyto(nzmax)           _RL allphyto(nzmax)
301             _RL denphyto(nzmax)
302           _RL grazphy(npmax,nzmax)           _RL grazphy(npmax,nzmax)
303           _RL sumgrazphy(npmax)           _RL sumgrazphy(npmax)
304           _RL sumgrazzoo(nzmax)           _RL sumgrazzoo(nzmax)
# Line 304  c  variables for zooplankton grazing rat Line 323  c  variables for zooplankton grazing rat
323  #endif  #endif
324  #endif  #endif
325    
326    #ifdef ALLOW_CDOM
327            _RL cdomp_degrd, cdomn_degrd, cdomfe_degrd
328            _RL preminP_cdom, preminN_cdom, preminFe_cdom
329    #ifdef ALLOW_CARBON
330            _RL cdomc_degrd
331            _RL preminC_cdom
332    #endif
333    #endif
334    
335  #ifdef DAR_DIAG_CHL  #ifdef DAR_DIAG_CHL
336           _RL tmppcm           _RL tmppcm
337           _RL tmpchl2c           _RL tmpchl2c
# Line 376  c variables for conversions from phyto a Line 404  c variables for conversions from phyto a
404           _RL totzoo_pofe           _RL totzoo_pofe
405           _RL totzoo_posi           _RL totzoo_posi
406    
407    #ifdef ALLOW_CDOM
408             _RL totphy_cdomp
409             _RL totphy_cdomn
410             _RL totphy_cdomfe
411             _RL totzoo_cdomp
412             _RL totzoo_cdomn
413             _RL totzoo_cdomfe
414    #ifdef ALLOW_CARBON
415             _RL totphy_cdomc
416             _RL totzoo_cdomc
417    #endif
418    #endif
419    
420           _RL NO2prod           _RL NO2prod
421           _RL NO3prod           _RL NO3prod
422        
# Line 567  ccccccccccccccccccccccccccccccc Line 608  ccccccccccccccccccccccccccccccc
608    
609  c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc  c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
610            call MONOD_TEMPFUNC(Tlocal,phytoTempFunction,            call MONOD_TEMPFUNC(Tlocal,phytoTempFunction,
611       &            zooTempFunction, reminTempFunction, myThid)       &            zooTempFunction, reminTempFunction,
612         &            mortPTempFunction, mortZTempFunction,
613         &            mortZ2TempFunction, myThid)
614            if (debug.eq.1) print*,'phytoTempFunction',            if (debug.eq.1) print*,'phytoTempFunction',
615       &                          phytoTempFunction, Tlocal       &                          phytoTempFunction, Tlocal
616  ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc  ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
# Line 596  c using Platt-like equations with inhibi Line 639  c using Platt-like equations with inhibi
639  #endif  #endif
640  c ANNA endif  c ANNA endif
641    
642    c pCO2 limit - default to non
643             do np=1,npmax
644               pCO2limit(np)=1. _d 0
645    c          if (np.eq.6) then
646    c             pCO2limit(np)=1. _d 0 + (pCO2local-400. _d -6)/600 _d -6
647    c             pCO2limit(np)=max(pCO2limit(np),1. _d 0)
648    c             pCO2limit(np)=min(pCO2limit(np),2. _d 0)
649    c          endif
650               if (debug.eq.15) print*,'pco2limit',pCO2limit(np),pCO2local
651             enddo
652    
653    
654  ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc  ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
655  c Determine phytoplankton nutrient limitation as mimimum of  c Determine phytoplankton nutrient limitation as mimimum of
656  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 868  c ANNA endif
868  #endif  #endif
869    
870            do np = 1, npmax            do np = 1, npmax
871             pcm(np)=pcmax(np)*limit(np)*phytoTempFunction(np)             pcm(np)=pcmax(np)*limit(np)*phytoTempFunction(np)*
872         &                                         pCO2limit(np)
873  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
874             if (phyto(np).gt. 0. _d 0) then             if (phyto(np).gt. 0. _d 0) then
875               chl2c(np)=phychl(np)/(phyto(np)*R_PC(np))               chl2c(np)=phychl(np)/(phyto(np)*R_PC(np))
# Line 890  c         acclim(np)=max(acclim(np),chl2 Line 946  c         acclim(np)=max(acclim(np),chl2
946  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
947            ChlGeiderlocal = 0. _d 0            ChlGeiderlocal = 0. _d 0
948            do np = 1, npmax            do np = 1, npmax
949             tmppcm = mu(np)*limit(np)*phytoTempFunction(np)             tmppcm = mu(np)*limit(np)*phytoTempFunction(np)*
950         &                                       pCO2limit(np)
951             if (tmppcm.gt.0.d0) then             if (tmppcm.gt.0.d0) then
952               tmpchl2c = Geider_chl2cmax(np)/               tmpchl2c = Geider_chl2cmax(np)/
953       &         (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 1008  c sum all palatability*phyto and find ph
1008              allphyto(nz)=allphyto(nz)+palat(np,nz)*phyto(np)              allphyto(nz)=allphyto(nz)+palat(np,nz)*phyto(np)
1009             enddo             enddo
1010             if (allphyto(nz).le.0. _d 0) allphyto(nz)=phygrazmin             if (allphyto(nz).le.0. _d 0) allphyto(nz)=phygrazmin
1011    #ifdef SER_GRAZ
1012               denphyto(nz)=0. _d 0
1013               do np=1,npmax
1014                denphyto(nz)=denphyto(nz)+
1015         &            (palat(np,nz)*phyto(np)/allphyto(nz))*phyto(np)
1016               enddo
1017               if (denphyto(nz).le.0. _d 0) denphyto(nz)=phygrazmin
1018    #endif
1019             do np=1,npmax             do np=1,npmax
1020              tmpz=max(0. _d 0,(allphyto(nz)-phygrazmin) )              tmpz=max(0. _d 0,(allphyto(nz)-phygrazmin) )
1021              grazphy(np,nz)=grazemax(nz)*              grazphy(np,nz)=grazemax(nz)*
1022    #ifdef SER_GRAZ
1023    c as in Vallina et al, 2011
1024         &          (((palat(np,nz)*phyto(np)/allphyto(nz))*phyto(np))/
1025         &           denphyto(nz)) *
1026    #else
1027    c as in Dutkiewicz et al, GBC, 2009
1028       &           (palat(np,nz)*phyto(np)/allphyto(nz))*       &           (palat(np,nz)*phyto(np)/allphyto(nz))*
1029       &           ( tmpz/  #endif
1030       &             (tmpz+kgrazesat) )       &           ( tmpz**hollexp/
1031         &             (tmpz**hollexp+kgrazesat**hollexp) )
1032             enddo             enddo
1033            enddo            enddo
1034            if (debug.eq.2) print*,'allphyto',allphyto            if (debug.eq.2) print*,'allphyto',allphyto
# Line 1034  cccccccccccccccccccccccccccccccccccccccc Line 1106  cccccccccccccccccccccccccccccccccccccccc
1106  c accumulate particulate and dissolved detritus  c accumulate particulate and dissolved detritus
1107             do np=1, npmax             do np=1, npmax
1108                 totphy_pop=totphy_pop+                 totphy_pop=totphy_pop+
1109       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1110         &                mortPTempFunction*phytomin(np)
1111                 totphy_dop=totphy_dop+                 totphy_dop=totphy_dop+
1112       &                (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &                (1. _d 0-ExportFracP(np))*mortphy(np)*
1113         &                mortPTempFunction*phytomin(np)
1114                 totphy_pon=totphy_pon+ R_NP(np)*                 totphy_pon=totphy_pon+ R_NP(np)*
1115       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1116         &                mortPTempFunction*phytomin(np)
1117                 totphy_don=totphy_don+ R_NP(np)*                 totphy_don=totphy_don+ R_NP(np)*
1118       &               (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &               (1. _d 0-ExportFracP(np))*mortphy(np)*
1119         &                mortPTempFunction*phytomin(np)
1120                 totphy_pofe=totphy_pofe+ R_FeP(np)*                 totphy_pofe=totphy_pofe+ R_FeP(np)*
1121       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1122         &                mortPTempFunction*phytomin(np)
1123                 totphy_dofe=totphy_dofe+ R_FeP(np)*                 totphy_dofe=totphy_dofe+ R_FeP(np)*
1124       &               (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &               (1. _d 0-ExportFracP(np))*mortphy(np)*
1125         &                mortPTempFunction*phytomin(np)
1126                 totphy_posi=totphy_posi+ R_SiP(np)*                 totphy_posi=totphy_posi+ R_SiP(np)*
1127       &                mortphy(np)*phytomin(np)       &                mortphy(np)*
1128         &                mortPTempFunction*phytomin(np)
1129  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1130                 totphy_poc=totphy_poc+ R_PC(np)*                 totphy_poc=totphy_poc+ R_PC(np)*
1131       &                ExportFracP(np)*mortphy(np)*phytomin(np)       &                ExportFracP(np)*mortphy(np)*
1132         &                mortPTempFunction*phytomin(np)
1133                 totphy_doc=totphy_doc+ R_PC(np)*                 totphy_doc=totphy_doc+ R_PC(np)*
1134       &               (1. _d 0-ExportFracP(np))*mortphy(np)*phytomin(np)       &               (1. _d 0-ExportFracP(np))*mortphy(np)*
1135         &                mortPTempFunction*phytomin(np)
1136                 totphy_pic=totphy_pic+ R_PC(np)*R_PICPOC(np)*                 totphy_pic=totphy_pic+ R_PC(np)*R_PICPOC(np)*
1137       &                mortphy(np)*phytomin(np)       &                mortphy(np)*
1138         &                mortPTempFunction*phytomin(np)
1139  #endif  #endif
1140              enddo              enddo
1141    #ifdef ALLOW_CDOM
1142                   totphy_cdomp=(fraccdom)*totphy_dop
1143                   totphy_dop=totphy_dop-totphy_cdomp
1144                   totphy_cdomn=rnp_cdom*totphy_cdomp
1145                   totphy_don=totphy_don-totphy_cdomn
1146                   totphy_cdomfe=rfep_cdom*totphy_cdomp
1147                   totphy_dofe=totphy_dofe-totphy_cdomfe
1148    #ifdef ALLOW_CARBON
1149                   totphy_cdomc=rcp_cdom*totphy_cdomp
1150                   totphy_doc=totphy_doc-totphy_cdomc
1151    #endif
1152    #endif
1153              if (debug.eq.3) print*,'tot_phy_pop',totphy_pop              if (debug.eq.3) print*,'tot_phy_pop',totphy_pop
1154              if (debug.eq.3) print*,'tot_phy_dop',totphy_dop              if (debug.eq.3) print*,'tot_phy_dop',totphy_dop
1155              if (debug.eq.3) print*,'tot_phy_pon',totphy_pon              if (debug.eq.3) print*,'tot_phy_pon',totphy_pon
# Line 1107  cccccccccccccccccccccccccccccccccccccccc Line 1201  cccccccccccccccccccccccccccccccccccccccc
1201  c accumulate particulate and dissolved detritus  c accumulate particulate and dissolved detritus
1202              do nz=1, nzmax              do nz=1, nzmax
1203                 totzoo_pop=totzoo_pop+                 totzoo_pop=totzoo_pop+
1204       &                     ExportFracZ(nz)*mortzoo(nz)*zooP(nz)       &                     ExportFracZ(nz)*( mortzoo(nz)*
1205         &                     mortZTempFunction*zooP(nz)
1206         &                     +  mortzoo2(nz)*
1207         &                     mortZ2TempFunction*zooP(nz)**2 )
1208                 totzoo_dop=totzoo_dop+                 totzoo_dop=totzoo_dop+
1209       &                    (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooP(nz)       &                    (1. _d 0-ExportFracZ(nz))*(
1210                 totzoo_pon=totzoo_pon+       &                     mortzoo(nz)*
1211       &                     ExportFracZ(nz)*mortzoo(nz)*zooN(nz)       &                     mortZTempFunction*zooP(nz)+
1212         &                     mortzoo2(nz)*
1213         &                     mortZ2TempFunction*zooP(nz)**2 )
1214                   totzoo_pon=totzoo_pon+
1215         &                     ExportFracZ(nz)*( mortzoo(nz)*
1216         &                     mortZTempFunction*zooN(nz)
1217         &                     +  mortzoo2(nz)*
1218         &                     mortZ2TempFunction*zooN(nz)**2 )
1219                 totzoo_don=totzoo_don+                 totzoo_don=totzoo_don+
1220       &                    (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooN(nz)       &                    (1. _d 0-ExportFracZ(nz))*(
1221         &                     mortzoo(nz)*
1222         &                     mortZTempFunction*zooN(nz)+
1223         &                     mortzoo2(nz)*
1224         &                     mortZ2TempFunction*zooN(nz)**2 )
1225                 totzoo_pofe=totzoo_pofe+                 totzoo_pofe=totzoo_pofe+
1226       &                     ExportFracZ(nz)*mortzoo(nz)*zooFe(nz)       &                     ExportFracZ(nz)*( mortzoo(nz)*
1227         &                     mortZTempFunction*zooFe(nz)
1228         &                     +  mortzoo2(nz)*
1229         &                     mortZ2TempFunction*zooFe(nz)**2 )
1230                 totzoo_dofe=totzoo_dofe+                 totzoo_dofe=totzoo_dofe+
1231       &                   (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooFe(nz)       &                   (1. _d 0-ExportFracZ(nz))*(
1232                 totzoo_posi=totzoo_posi+       &                    mortzoo(nz)*
1233       &                     mortzoo(nz)*zooSi(nz)       &                    mortZTempFunction*zooFe(nz) +
1234         &                    mortzoo2(nz)*
1235         &                    mortZ2TempFunction*zooFe(nz)**2 )
1236                   totzoo_posi=totzoo_posi+
1237         &                     ( mortzoo(nz)*
1238         &                       mortZTempFunction*zooSi(nz)+
1239         &                       mortzoo2(nz)*
1240         &                       mortZ2TempFunction*zooSi(nz)**2 )
1241  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1242                 totzoo_poc=totzoo_poc+                 totzoo_poc=totzoo_poc+
1243       &                    ExportFracZ(nz)*mortzoo(nz)*zooClocal(nz)       &                    ExportFracZ(nz)*( mortzoo(nz)*
1244         &                         mortZTempFunction*zooClocal(nz)
1245         &                      +  mortzoo2(nz)*
1246         &                         mortZ2TempFunction*zooClocal(nz)**2 )
1247                 totzoo_doc=totzoo_doc+                 totzoo_doc=totzoo_doc+
1248       &           (1. _d 0-ExportFracZ(nz))*mortzoo(nz)*zooClocal(nz)       &           (1. _d 0-ExportFracZ(nz))*( mortzoo(nz)*
1249         &                         mortZTempFunction*zooClocal(nz)
1250         &                      +  mortzoo2(nz)*
1251         &                         mortZ2TempFunction*zooClocal(nz)**2 )
1252  #endif  #endif
1253              enddo              enddo
1254    
# Line 1154  c accumulate particulate and dissolved d Line 1278  c accumulate particulate and dissolved d
1278  #endif  #endif
1279              enddo              enddo
1280  #endif  #endif
1281    
1282    #ifdef ALLOW_CDOM
1283                   totzoo_cdomp=(fraccdom)*totzoo_dop
1284                   totzoo_dop=totzoo_dop-totzoo_cdomp
1285                   totzoo_cdomn=rnp_cdom*totzoo_cdomp
1286                   totzoo_don=totzoo_don-totzoo_cdomn
1287                   totzoo_cdomfe=rfep_cdom*totzoo_cdomp
1288                   totzoo_dofe=totzoo_dofe-totzoo_cdomfe
1289    #ifdef ALLOW_CARBON
1290                   totzoo_cdomc=rcp_cdom*totzoo_cdomp
1291                   totzoo_doc=totzoo_doc-totzoo_cdomc
1292    #endif
1293    #endif
1294              if (debug.eq.5) print*,'totzoo_pop',totzoo_pop              if (debug.eq.5) print*,'totzoo_pop',totzoo_pop
1295              if (debug.eq.5) print*,'totzoo_dop',totzoo_dop              if (debug.eq.5) print*,'totzoo_dop',totzoo_dop
1296              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 1307  c consumption - sum of phytoplankton con
1307  c phospate uptake by each phytoplankton  c phospate uptake by each phytoplankton
1308  #ifndef GEIDER  #ifndef GEIDER
1309                 grow(np)=ngrow(np)*mu(np)*limit(np)*ilimit(np)*                 grow(np)=ngrow(np)*mu(np)*limit(np)*ilimit(np)*
1310       &                            phytoTempFunction(np)       &                            phytoTempFunction(np)*pCO2limit(np)
1311  #endif  #endif
1312  #ifdef GEIDER  #ifdef GEIDER
1313                 grow(np)=ngrow(np)*pcarbon(np)                 grow(np)=ngrow(np)*pcarbon(np)
# Line 1288  c remineralization of sinking particulat Line 1425  c remineralization of sinking particulat
1425              preminN  = reminTempFunction * Kpremin_N*PONlocal              preminN  = reminTempFunction * Kpremin_N*PONlocal
1426              preminFe = reminTempFunction * Kpremin_Fe*POFelocal              preminFe = reminTempFunction * Kpremin_Fe*POFelocal
1427              preminSi = reminTempFunction * Kpremin_Si*PSilocal              preminSi = reminTempFunction * Kpremin_Si*PSilocal
1428    #ifdef ALLOW_CDOM
1429                preminP_cdom = fraccdom*preminP
1430                preminP=preminP-preminP_cdom
1431                preminN_cdom = rnp_cdom*preminP_cdom
1432                preminN=preminN-preminN_cdom
1433                preminFe_cdom = rfep_cdom*preminP_cdom
1434                preminFe=preminFe-preminFe_cdom
1435    #endif
1436    
1437  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1438             DOCremin =  reminTempFunction * Kdoc * DOClocal             DOCremin =  reminTempFunction * Kdoc * DOClocal
1439             preminC  = reminTempFunction * Kpremin_C*POClocal             preminC  = reminTempFunction * Kpremin_C*POClocal
1440    #ifdef ALLOW_CDOM
1441                preminC_cdom = rcp_cdom*preminP_cdom
1442                preminC=preminC-preminC_cdom
1443    #endif
1444  c dissolution  c dissolution
1445             disscPIC = Kdissc*PIClocal             disscPIC = Kdissc*PIClocal
1446  #endif  #endif
1447    
1448    #ifdef ALLOW_CDOM
1449    c degradation of  CDOM - high when bleached by light
1450               cdomp_degrd = reminTempFunction * cdomlocal
1451         &            *(cdomdegrd+cdombleach*min(PARlocal/PARcdom,1. _d 0) )
1452               cdomn_degrd = rnp_cdom * cdomp_degrd
1453               cdomfe_degrd= rfep_cdom * cdomp_degrd
1454    #ifdef ALLOW_CARBON
1455               cdomc_degrd = rcp_cdom  * cdomp_degrd
1456    #endif
1457    #endif
1458    
1459    #ifdef ALLOW_DENIT
1460               if (O2local.lt.O2crit) then
1461                  if (NO3local.lt.no3crit) then
1462    c no remineralization for N, P, Fe (not Si?)
1463                   DOPremin = 0. _d 0
1464                   DONremin = 0. _d 0
1465                   DOFeremin = 0. _d 0
1466                   preminP  = 0. _d 0
1467                   preminN  = 0. _d 0
1468                   preminFe =  0. _d 0
1469    #ifdef ALLOW_CDOM
1470                   preminP_cdom =  0. _d 0
1471                   preminN_cdom =  0. _d 0
1472                   preminFe_cdom =  0. _d 0
1473    #endif
1474    #ifdef ALLOW_CARBON
1475                  DOCremin = 0. _d 0
1476                  preminC  = 0. _d 0
1477    #ifdef ALLOW_CDOM
1478                  preminC_cdom =  0. _d 0
1479    #endif
1480    #endif
1481    
1482    #ifdef ALLOW_CDOM
1483    c degradation of  CDOM - high when bleached by light
1484               cdomp_degrd = reminTempFunction * cdomlocal
1485         &            *(cdombleach*min(PARlocal/PARcdom,1. _d 0) )
1486               cdomn_degrd = rnp_cdom * cdomp_degrd
1487               cdomfe_degrd= rfep_cdom * cdomp_degrd
1488    #ifdef ALLOW_CARBON
1489               cdomc_degrd = rcp_cdom  * cdomp_degrd
1490    #endif
1491    #endif
1492                  endif
1493               endif
1494    #endif
1495    c end denit caveats
1496    
1497  c chemistry  c chemistry
1498  c NH4 -> NO2 -> NO3 by bacterial action  c NH4 -> NO2 -> NO3 by bacterial action
1499              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 1520  c phytoplankton
1520  #else  #else
1521       &                        - sumgrazphy(np)       &                        - sumgrazphy(np)
1522  #endif  #endif
1523       &                        - mortphy(np)*phytomin(np)       &                        - mortphy(np)*
1524         &                          mortPTempFunction*phytomin(np)
1525       &                        + psinkphy(np)       &                        + psinkphy(np)
1526  #ifdef GEIDER  #ifdef GEIDER
1527  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
# Line 1337  c             dphychl(np) = rhochl(np)*P Line 1536  c             dphychl(np) = rhochl(np)*P
1536  #else  #else
1537       &                   - sumgrazphy(np)       &                   - sumgrazphy(np)
1538  #endif  #endif
1539       &                   - mortphy(np)*phytomin(np)) *chl2c(np)*R_PC(np)       &                   - mortphy(np)*
1540         &                     mortPTempFunction*phytomin(np))
1541         &                       *chl2c(np)*R_PC(np)
1542       &                        + psinkChl(np)       &                        + psinkChl(np)
1543  #endif  #endif
1544                Chl=Chl + phychl(np)                Chl=Chl + phychl(np)
# Line 1348  c%%% Line 1549  c%%%
1549  #ifdef OLD_GRAZE  #ifdef OLD_GRAZE
1550                tmpr=grazing_phyto(np)*                tmpr=grazing_phyto(np)*
1551       &              (phytomin(np)/(phytomin(np) + kgrazesat))       &              (phytomin(np)/(phytomin(np) + kgrazesat))
1552       &                        + mortphy(np)*phytomin(np)       &                        + mortphy(np)*
1553         &                          mortPTempFunction*phytomin(np)
1554       &                        - psinkphy(np)       &                        - psinkphy(np)
1555  #else  #else
1556                tmpr=sumgrazphy(np)                tmpr=sumgrazphy(np)
1557       &                        + mortphy(np)*phytomin(np)       &                        + mortphy(np)*
1558         &                          mortPTempFunction*phytomin(np)
1559       &                        - psinkphy(np)       &                        - psinkphy(np)
1560  #endif  #endif
1561  #ifdef DAR_DIAG_RSTAR  #ifdef DAR_DIAG_RSTAR
1562  #ifndef GEIDER  #ifndef GEIDER
1563                tmpgrow=ngrow(np)*mu(np)*ilimit(np)*                tmpgrow=ngrow(np)*mu(np)*ilimit(np)*
1564       &              phytoTempFunction(np)       &              phytoTempFunction(np)*pCO2limit(np)
1565  #endif  #endif
1566  #ifdef GEIDER  #ifdef GEIDER
1567                tmpgrow=grow(np)/limit(np)                tmpgrow=grow(np)/limit(np)
# Line 1419  c zooplankton mortality Line 1622  c zooplankton mortality
1622              do nz=1,nzmax              do nz=1,nzmax
1623  c zoo in P currency  c zoo in P currency
1624                dzooPdt(nz)  = dzooPdt(nz)                dzooPdt(nz)  = dzooPdt(nz)
1625       &                           - mortzoo(nz)*zooP(nz)       &                           - mortzoo(nz)*
1626         &                             mortZTempFunction*zooP(nz)
1627         &                           - mortzoo2(nz)*
1628         &                             mortZ2TempFunction*zooP(nz)**2
1629  c zooplankton in other currencies  c zooplankton in other currencies
1630  C zooplankton stoichiometry varies according to food source  C zooplankton stoichiometry varies according to food source
1631                dzooNdt(nz)  = dzooNdt(nz)                dzooNdt(nz)  = dzooNdt(nz)
1632       &                           - mortzoo(nz)*zooN(nz)       &                           - mortzoo(nz)*
1633         &                             mortZTempFunction*zooN(nz)
1634         &                           - mortzoo2(nz)*
1635         &                             mortZ2TempFunction*zooN(nz)**2
1636                dzooFedt(nz) = dzooFedt(nz)                dzooFedt(nz) = dzooFedt(nz)
1637       &                           - mortzoo(nz)*zooFe(nz)       &                           - mortzoo(nz)*
1638         &                             mortZTempFunction*zooFe(nz)
1639         &                           - mortzoo2(nz)*
1640         &                             mortZ2TempFunction*zooFe(nz)**2
1641                dzooSidt(nz) = dzooSidt(nz)                dzooSidt(nz) = dzooSidt(nz)
1642       &                           - mortzoo(nz)*zooSi(nz)       &                           - mortzoo(nz)*
1643         &                             mortZTempFunction*zooSi(nz)
1644         &                           - mortzoo2(nz)*
1645         &                             mortZ2TempFunction*zooSi(nz)**2
1646              enddo              enddo
1647    
1648    
1649  c sum contributions to inorganic nutrient tendencies  c sum contributions to inorganic nutrient tendencies
1650              dPO4dt =  - consumpPO4 +  preminP  + DOPremin              dPO4dt =  - consumpPO4 +  
1651              dNH4dt =  - consumpNH4 +  preminN  + DONremin  #ifdef ALLOW_CDOM
1652         &                 DOPremin
1653    #else
1654         &                 preminP  + DOPremin
1655    #endif
1656                dNH4dt =  - consumpNH4 +  
1657    #ifdef ALLOW_CDOM
1658         &                 DONremin
1659    #else
1660         &                 preminN  +  DONremin
1661    #endif
1662       &                                   - NO2prod       &                                   - NO2prod
1663              dNO2dt =  - consumpNO2                                      dNO2dt =  - consumpNO2                        
1664       &                                   + NO2prod - NO3prod       &                                   + NO2prod - NO3prod
# Line 1442  c sum contributions to inorganic nutrien Line 1667  c sum contributions to inorganic nutrien
1667  c-ONLYNO3   dNO3dt =  - consumpNO3 +  preminN  + DONremin  c-ONLYNO3   dNO3dt =  - consumpNO3 +  preminN  + DONremin
1668  #ifdef ALLOW_DENIT  #ifdef ALLOW_DENIT
1669              if (O2local.le.O2crit) then              if (O2local.le.O2crit) then
1670                denit =  denit_np*(preminP  + DOPremin)                denit =  denit_np
1671                dNO3dt = dNO3dt - denit  #ifdef ALLOW_CDOM
1672                dNH4dt = dNH4dt -  (preminN  + DONremin)       &                *(DOPremin)
1673    #else
1674         &                *(preminP  + DOPremin)
1675    #endif
1676                  dNO3dt = dNO3dt - (denit_no3/denit_np)*denit
1677                  dNH4dt = dNH4dt -  
1678    #ifdef ALLOW_CDOM
1679         &                 (DONremin)
1680    #else
1681         &                 (preminN  + DONremin)
1682    #endif
1683              endif              endif
1684  #endif  #endif
1685              dFeTdt =  - consumpFeT +  preminFe + DOFeremin              dFeTdt =  - consumpFeT +  
1686    #ifdef ALLOW_CDOM
1687         &                 DOFeremin
1688    #else
1689         &                 preminFe + DOFeremin
1690    #endif
1691  #ifdef PART_SCAV  #ifdef PART_SCAV
1692       &                 - scav_part*freefelocal +       &                 - scav_part*freefelocal +
1693  #else  #else
# Line 1458  c-ONLYNO3   dNO3dt =  - consumpNO3 +  pr Line 1698  c-ONLYNO3   dNO3dt =  - consumpNO3 +  pr
1698    
1699  c tendency of dissolved organic pool  c tendency of dissolved organic pool
1700              dDOPdt  = totphy_dop  + totzoo_dop  - DOPremin              dDOPdt  = totphy_dop  + totzoo_dop  - DOPremin
1701    #ifdef ALLOW_CDOM
1702         &                +preminP + cdomp_degrd
1703    #endif
1704              dDONdt  = totphy_don  + totzoo_don  - DONremin              dDONdt  = totphy_don  + totzoo_don  - DONremin
1705    #ifdef ALLOW_CDOM
1706         &                +preminN + cdomn_degrd
1707    #endif
1708              dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin              dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin
1709    #ifdef ALLOW_CDOM
1710         &                +preminFe + cdomfe_degrd
1711    #endif
1712    
1713  c tendency of particulate detritus pools  c tendency of particulate detritus pools
1714              dpopdt  = totphy_pop  + totzoo_pop   - preminP + psinkP              dpopdt  = totphy_pop  + totzoo_pop   - preminP + psinkP
1715    #ifdef ALLOW_CDOM
1716         &                -preminP_cdom
1717    #endif
1718              dpondt  = totphy_pon  + totzoo_pon   - preminN + psinkN              dpondt  = totphy_pon  + totzoo_pon   - preminN + psinkN
1719    #ifdef ALLOW_CDOM
1720         &                -preminN_cdom
1721    #endif
1722              dpofedt = totphy_pofe + totzoo_pofe  - preminFe + psinkFe              dpofedt = totphy_pofe + totzoo_pofe  - preminFe + psinkFe
1723    #ifdef ALLOW_CDOM
1724         &                -preminFe_cdom
1725    #endif
1726              dpSidt  = totphy_posi + totzoo_posi  - preminSi + psinkSi              dpSidt  = totphy_posi + totzoo_posi  - preminSi + psinkSi
1727  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1728              dDICdt =  - consumpDIC - consumpDIC_PIC              dDICdt =  - consumpDIC - consumpDIC_PIC
1729    #ifdef ALLOW_CDOM
1730         &                                         +  DOCremin
1731    #else
1732       &                                         +  preminC  + DOCremin       &                                         +  preminC  + DOCremin
1733    #endif
1734       &                                         + disscPIC       &                                         + disscPIC
1735              dDOCdt  = totphy_doc  + totzoo_doc  - DOCremin              dDOCdt  = totphy_doc  + totzoo_doc  - DOCremin
1736    #ifdef ALLOW_CDOM
1737         &                    +preminC + cdomc_degrd
1738    #endif
1739              dPOCdt  = totphy_poc  + totzoo_poc  - preminC + psinkC              dPOCdt  = totphy_poc  + totzoo_poc  - preminC + psinkC
1740    #ifdef ALLOW_CDOM
1741         &                -preminC_cdom
1742    #endif
1743              dPICdt  = totphy_pic  + totzoo_pic  - disscPIC + psinkPIC              dPICdt  = totphy_pic  + totzoo_pic  - disscPIC + psinkPIC
1744              dALKdt  = - dNO3dt    - 2.d0 * (consumpDIC_PIC - disscPIC)              dALKdt  = - dNO3dt    - 2.d0 * (consumpDIC_PIC - disscPIC)
1745  c should be = O2prod - preminP - DOPremin?  c should be = O2prod - preminP - DOPremin?
# Line 1480  c production of O2 by photosynthesis Line 1749  c production of O2 by photosynthesis
1749               dO2dt   = R_OP*consumpPO4               dO2dt   = R_OP*consumpPO4
1750  c loss of O2 by remineralization  c loss of O2 by remineralization
1751               if (O2local.gt.O2crit) then               if (O2local.gt.O2crit) then
1752                 dO2dt   = dO2dt - R_OP*(preminP  + DOPremin)                 dO2dt   = dO2dt - R_OP
1753    #ifdef ALLOW_CDOM
1754         &                      *(DOPremin)
1755    #else
1756         &                      *(preminP  + DOPremin)
1757    #endif
1758               endif               endif
1759  #ifdef OLD_GRAZE  #ifdef OLD_GRAZE
1760              do nz=1,nzmax              do nz=1,nzmax
1761                dzooCdt(nz)  = grazingC(nz)*zooClocal(nz)                dzooCdt(nz)  = grazingC(nz)*zooClocal(nz)
1762       &                           - mortzoo(nz)*zooClocal(nz)       &                           - mortzoo(nz)*
1763         &                             mortZTempFunction*zooClocal(nz)
1764         &                           - mortzoo2(nz)*
1765         &                             mortZ2TempFunction*zooClocal(nz)**2
1766              enddo              enddo
1767  #else  #else
1768              do nz=1,nzmax              do nz=1,nzmax
1769                dzooCdt(nz)  = sumgrazzooc(nz)                dzooCdt(nz)  = sumgrazzooc(nz)
1770       &                           - mortzoo(nz)*zooClocal(nz)       &                           - mortzoo(nz)*
1771         &                             mortZTempFunction*zooClocal(nz)
1772         &                           - mortzoo2(nz)*
1773         &                             mortZ2TempFunction*zooClocal(nz)**2
1774              enddo              enddo
1775  #endif  #endif
1776    
1777    #ifdef ALLOW_CDOM
1778                dcdomdt = totphy_cdomp + totzoo_cdomp +  preminP_cdom
1779         &                  -cdomp_degrd
1780    #endif
1781    
1782  #endif  #endif
1783    
1784              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.9

  ViewVC Help
Powered by ViewVC 1.1.22