77 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
78 |
O dphychl, Chlup, |
O dphychl, Chlup, |
79 |
#endif |
#endif |
80 |
|
#ifdef ALLOW_CDOM |
81 |
|
O dcdomdt , |
82 |
|
I cdomlocal, |
83 |
|
#endif |
84 |
#ifdef WAVEBANDS |
#ifdef WAVEBANDS |
85 |
I PARwlocal, |
I PARwlocal, |
86 |
#endif |
#endif |
207 |
_RL Chlup(npmax) |
_RL Chlup(npmax) |
208 |
#endif |
#endif |
209 |
#endif |
#endif |
210 |
|
#ifdef ALLOW_CDOM |
211 |
|
_RL cdomlocal |
212 |
|
_RL dcdomdt |
213 |
|
#ifdef ALLOW_CARBON |
214 |
|
_RL cdomclocal, dcdomcdt |
215 |
|
#endif |
216 |
|
#endif |
217 |
#ifdef ALLOW_PAR_DAY |
#ifdef ALLOW_PAR_DAY |
218 |
_RL PARdaylocal |
_RL PARdaylocal |
219 |
#endif |
#endif |
315 |
#endif |
#endif |
316 |
#endif |
#endif |
317 |
|
|
318 |
|
#ifdef ALLOW_CDOM |
319 |
|
_RL cdomp_degrd, cdomn_degrd, cdomfe_degrd |
320 |
|
_RL preminP_cdom, preminN_cdom, preminFe_cdom |
321 |
|
#ifdef ALLOW_CARBON |
322 |
|
_RL cdomc_degrd |
323 |
|
_RL preminC_cdom |
324 |
|
#endif |
325 |
|
#endif |
326 |
|
|
327 |
#ifdef DAR_DIAG_CHL |
#ifdef DAR_DIAG_CHL |
328 |
_RL tmppcm |
_RL tmppcm |
329 |
_RL tmpchl2c |
_RL tmpchl2c |
396 |
_RL totzoo_pofe |
_RL totzoo_pofe |
397 |
_RL totzoo_posi |
_RL totzoo_posi |
398 |
|
|
399 |
|
#ifdef ALLOW_CDOM |
400 |
|
_RL totphy_cdomp |
401 |
|
_RL totphy_cdomn |
402 |
|
_RL totphy_cdomfe |
403 |
|
_RL totzoo_cdomp |
404 |
|
_RL totzoo_cdomn |
405 |
|
_RL totzoo_cdomfe |
406 |
|
#ifdef ALLOW_CARBON |
407 |
|
_RL totphy_cdomc |
408 |
|
_RL totzoo_cdomc |
409 |
|
#endif |
410 |
|
#endif |
411 |
|
|
412 |
_RL NO2prod |
_RL NO2prod |
413 |
_RL NO3prod |
_RL NO3prod |
414 |
|
|
1104 |
& mortphy(np)*phytomin(np) |
& mortphy(np)*phytomin(np) |
1105 |
#endif |
#endif |
1106 |
enddo |
enddo |
1107 |
|
#ifdef ALLOW_CDOM |
1108 |
|
totphy_cdomp=(fraccdom)*totphy_dop |
1109 |
|
totphy_dop=totphy_dop-totphy_cdomp |
1110 |
|
totphy_cdomn=rnp_cdom*totphy_cdomp |
1111 |
|
totphy_don=totphy_don-totphy_cdomn |
1112 |
|
totphy_cdomfe=rfep_cdom*totphy_cdomp |
1113 |
|
totphy_dofe=totphy_dofe-totphy_cdomfe |
1114 |
|
#ifdef ALLOW_CARBON |
1115 |
|
totphy_cdomc=rcp_cdom*totphy_cdomp |
1116 |
|
totphy_doc=totphy_doc-totphy_cdomc |
1117 |
|
#endif |
1118 |
|
#endif |
1119 |
if (debug.eq.3) print*,'tot_phy_pop',totphy_pop |
if (debug.eq.3) print*,'tot_phy_pop',totphy_pop |
1120 |
if (debug.eq.3) print*,'tot_phy_dop',totphy_dop |
if (debug.eq.3) print*,'tot_phy_dop',totphy_dop |
1121 |
if (debug.eq.3) print*,'tot_phy_pon',totphy_pon |
if (debug.eq.3) print*,'tot_phy_pon',totphy_pon |
1226 |
#endif |
#endif |
1227 |
enddo |
enddo |
1228 |
#endif |
#endif |
1229 |
|
|
1230 |
|
#ifdef ALLOW_CDOM |
1231 |
|
totzoo_cdomp=(fraccdom)*totzoo_dop |
1232 |
|
totzoo_dop=totzoo_dop-totzoo_cdomp |
1233 |
|
totzoo_cdomn=rnp_cdom*totzoo_cdomp |
1234 |
|
totzoo_don=totzoo_don-totzoo_cdomn |
1235 |
|
totzoo_cdomfe=rfep_cdom*totzoo_cdomp |
1236 |
|
totzoo_dofe=totzoo_dofe-totzoo_cdomfe |
1237 |
|
#ifdef ALLOW_CARBON |
1238 |
|
totzoo_cdomc=rcp_cdom*totzoo_cdomp |
1239 |
|
totzoo_doc=totzoo_doc-totzoo_cdomc |
1240 |
|
#endif |
1241 |
|
#endif |
1242 |
if (debug.eq.5) print*,'totzoo_pop',totzoo_pop |
if (debug.eq.5) print*,'totzoo_pop',totzoo_pop |
1243 |
if (debug.eq.5) print*,'totzoo_dop',totzoo_dop |
if (debug.eq.5) print*,'totzoo_dop',totzoo_dop |
1244 |
if (debug.eq.5) print*,'totzoo_pon',totzoo_pon |
if (debug.eq.5) print*,'totzoo_pon',totzoo_pon |
1373 |
preminN = reminTempFunction * Kpremin_N*PONlocal |
preminN = reminTempFunction * Kpremin_N*PONlocal |
1374 |
preminFe = reminTempFunction * Kpremin_Fe*POFelocal |
preminFe = reminTempFunction * Kpremin_Fe*POFelocal |
1375 |
preminSi = reminTempFunction * Kpremin_Si*PSilocal |
preminSi = reminTempFunction * Kpremin_Si*PSilocal |
1376 |
|
#ifdef ALLOW_CDOM |
1377 |
|
preminP_cdom = fraccdom*preminP |
1378 |
|
preminP=preminP-preminP_cdom |
1379 |
|
preminN_cdom = rnp_cdom*preminP_cdom |
1380 |
|
preminN=preminN-preminN_cdom |
1381 |
|
preminFe_cdom = rfep_cdom*preminP_cdom |
1382 |
|
preminFe=preminFe-preminFe_cdom |
1383 |
|
#endif |
1384 |
|
|
1385 |
#ifdef ALLOW_CARBON |
#ifdef ALLOW_CARBON |
1386 |
DOCremin = reminTempFunction * Kdoc * DOClocal |
DOCremin = reminTempFunction * Kdoc * DOClocal |
1387 |
preminC = reminTempFunction * Kpremin_C*POClocal |
preminC = reminTempFunction * Kpremin_C*POClocal |
1388 |
|
#ifdef ALLOW_CDOM |
1389 |
|
preminC_cdom = rcp_cdom*preminP_cdom |
1390 |
|
preminC=preminC-preminC_cdom |
1391 |
|
#endif |
1392 |
c dissolution |
c dissolution |
1393 |
disscPIC = Kdissc*PIClocal |
disscPIC = Kdissc*PIClocal |
1394 |
#endif |
#endif |
1395 |
|
|
1396 |
|
#ifdef ALLOW_CDOM |
1397 |
|
c degradation of CDOM - high when bleached by light |
1398 |
|
cdomp_degrd = reminTempFunction * cdomlocal |
1399 |
|
& *(cdomdegrd+cdombleach*min(PARlocal/PARcdom,1. _d 0) ) |
1400 |
|
cdomn_degrd = rnp_cdom * cdomp_degrd |
1401 |
|
cdomfe_degrd= rfep_cdom * cdomp_degrd |
1402 |
|
#ifdef ALLOW_CARBON |
1403 |
|
cdomc_degrd = rcp_cdom * cdomp_degrd |
1404 |
|
#endif |
1405 |
|
#endif |
1406 |
|
|
1407 |
c chemistry |
c chemistry |
1408 |
c NH4 -> NO2 -> NO3 by bacterial action |
c NH4 -> NO2 -> NO3 by bacterial action |
1409 |
NO2prod = knita*( 1. _d 0-min(PARlocal/PAR0,1. _d 0) ) |
NO2prod = knita*( 1. _d 0-min(PARlocal/PAR0,1. _d 0) ) |
1544 |
|
|
1545 |
|
|
1546 |
c sum contributions to inorganic nutrient tendencies |
c sum contributions to inorganic nutrient tendencies |
1547 |
dPO4dt = - consumpPO4 + preminP + DOPremin |
dPO4dt = - consumpPO4 + |
1548 |
dNH4dt = - consumpNH4 + preminN + DONremin |
#ifdef ALLOW_CDOM |
1549 |
|
& DOPremin |
1550 |
|
#else |
1551 |
|
& preminP + DOPremin |
1552 |
|
#endif |
1553 |
|
dNH4dt = - consumpNH4 + |
1554 |
|
#ifdef ALLOW_CDOM |
1555 |
|
& DONremin |
1556 |
|
#else |
1557 |
|
& preminN + DONremin |
1558 |
|
#endif |
1559 |
& - NO2prod |
& - NO2prod |
1560 |
dNO2dt = - consumpNO2 |
dNO2dt = - consumpNO2 |
1561 |
& + NO2prod - NO3prod |
& + NO2prod - NO3prod |
1564 |
c-ONLYNO3 dNO3dt = - consumpNO3 + preminN + DONremin |
c-ONLYNO3 dNO3dt = - consumpNO3 + preminN + DONremin |
1565 |
#ifdef ALLOW_DENIT |
#ifdef ALLOW_DENIT |
1566 |
if (O2local.le.O2crit) then |
if (O2local.le.O2crit) then |
1567 |
denit = denit_np*(preminP + DOPremin) |
denit = denit_np |
1568 |
|
#ifdef ALLOW_CDOM |
1569 |
|
& *(DOPremin) |
1570 |
|
#else |
1571 |
|
& *(preminP + DOPremin) |
1572 |
|
#endif |
1573 |
dNO3dt = dNO3dt - denit |
dNO3dt = dNO3dt - denit |
1574 |
dNH4dt = dNH4dt - (preminN + DONremin) |
dNH4dt = dNH4dt - |
1575 |
|
#ifdef ALLOW_CDOM |
1576 |
|
& (DONremin) |
1577 |
|
#else |
1578 |
|
& (preminN + DONremin) |
1579 |
|
#endif |
1580 |
endif |
endif |
1581 |
#endif |
#endif |
1582 |
dFeTdt = - consumpFeT + preminFe + DOFeremin |
dFeTdt = - consumpFeT + |
1583 |
|
#ifdef ALLOW_CDOM |
1584 |
|
& DOFeremin |
1585 |
|
#else |
1586 |
|
& preminFe + DOFeremin |
1587 |
|
#endif |
1588 |
#ifdef PART_SCAV |
#ifdef PART_SCAV |
1589 |
& - scav_part*freefelocal + |
& - scav_part*freefelocal + |
1590 |
#else |
#else |
1595 |
|
|
1596 |
c tendency of dissolved organic pool |
c tendency of dissolved organic pool |
1597 |
dDOPdt = totphy_dop + totzoo_dop - DOPremin |
dDOPdt = totphy_dop + totzoo_dop - DOPremin |
1598 |
|
#ifdef ALLOW_CDOM |
1599 |
|
& +preminP + cdomp_degrd |
1600 |
|
#endif |
1601 |
dDONdt = totphy_don + totzoo_don - DONremin |
dDONdt = totphy_don + totzoo_don - DONremin |
1602 |
|
#ifdef ALLOW_CDOM |
1603 |
|
& +preminN + cdomn_degrd |
1604 |
|
#endif |
1605 |
dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin |
dDOFedt = totphy_dofe + totzoo_dofe - DOFeremin |
1606 |
|
#ifdef ALLOW_CDOM |
1607 |
|
& +preminFe + cdomfe_degrd |
1608 |
|
#endif |
1609 |
|
|
1610 |
c tendency of particulate detritus pools |
c tendency of particulate detritus pools |
1611 |
dpopdt = totphy_pop + totzoo_pop - preminP + psinkP |
dpopdt = totphy_pop + totzoo_pop - preminP + psinkP |
1612 |
|
#ifdef ALLOW_CDOM |
1613 |
|
& -preminP_cdom |
1614 |
|
#endif |
1615 |
dpondt = totphy_pon + totzoo_pon - preminN + psinkN |
dpondt = totphy_pon + totzoo_pon - preminN + psinkN |
1616 |
|
#ifdef ALLOW_CDOM |
1617 |
|
& -preminN_cdom |
1618 |
|
#endif |
1619 |
dpofedt = totphy_pofe + totzoo_pofe - preminFe + psinkFe |
dpofedt = totphy_pofe + totzoo_pofe - preminFe + psinkFe |
1620 |
|
#ifdef ALLOW_CDOM |
1621 |
|
& -preminFe_cdom |
1622 |
|
#endif |
1623 |
dpSidt = totphy_posi + totzoo_posi - preminSi + psinkSi |
dpSidt = totphy_posi + totzoo_posi - preminSi + psinkSi |
1624 |
#ifdef ALLOW_CARBON |
#ifdef ALLOW_CARBON |
1625 |
dDICdt = - consumpDIC - consumpDIC_PIC |
dDICdt = - consumpDIC - consumpDIC_PIC |
1626 |
|
#ifdef ALLOW_CDOM |
1627 |
|
& + DOCremin |
1628 |
|
#else |
1629 |
& + preminC + DOCremin |
& + preminC + DOCremin |
1630 |
|
#endif |
1631 |
& + disscPIC |
& + disscPIC |
1632 |
dDOCdt = totphy_doc + totzoo_doc - DOCremin |
dDOCdt = totphy_doc + totzoo_doc - DOCremin |
1633 |
|
#ifdef ALLOW_CDOM |
1634 |
|
& +preminC + cdomc_degrd |
1635 |
|
#endif |
1636 |
dPOCdt = totphy_poc + totzoo_poc - preminC + psinkC |
dPOCdt = totphy_poc + totzoo_poc - preminC + psinkC |
1637 |
|
#ifdef ALLOW_CDOM |
1638 |
|
& -preminC_cdom |
1639 |
|
#endif |
1640 |
dPICdt = totphy_pic + totzoo_pic - disscPIC + psinkPIC |
dPICdt = totphy_pic + totzoo_pic - disscPIC + psinkPIC |
1641 |
dALKdt = - dNO3dt - 2.d0 * (consumpDIC_PIC - disscPIC) |
dALKdt = - dNO3dt - 2.d0 * (consumpDIC_PIC - disscPIC) |
1642 |
c should be = O2prod - preminP - DOPremin? |
c should be = O2prod - preminP - DOPremin? |
1646 |
dO2dt = R_OP*consumpPO4 |
dO2dt = R_OP*consumpPO4 |
1647 |
c loss of O2 by remineralization |
c loss of O2 by remineralization |
1648 |
if (O2local.gt.O2crit) then |
if (O2local.gt.O2crit) then |
1649 |
dO2dt = dO2dt - R_OP*(preminP + DOPremin) |
dO2dt = dO2dt - R_OP |
1650 |
|
#ifdef ALLOW_CDOM |
1651 |
|
& *(DOPremin) |
1652 |
|
#else |
1653 |
|
& *(preminP + DOPremin) |
1654 |
|
#endif |
1655 |
endif |
endif |
1656 |
#ifdef OLD_GRAZE |
#ifdef OLD_GRAZE |
1657 |
do nz=1,nzmax |
do nz=1,nzmax |
1667 |
enddo |
enddo |
1668 |
#endif |
#endif |
1669 |
|
|
1670 |
|
#ifdef ALLOW_CDOM |
1671 |
|
dcdomdt = totphy_cdomp + totzoo_cdomp + preminP_cdom |
1672 |
|
& -cdomp_degrd |
1673 |
|
#endif |
1674 |
|
|
1675 |
#endif |
#endif |
1676 |
|
|
1677 |
if (debug.eq.10) print*,'dDOPdt', dDOPdt |
if (debug.eq.10) print*,'dDOPdt', dDOPdt |