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

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

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

revision 1.12 by jahn, Fri Aug 24 19:45:36 2012 UTC revision 1.18 by jahn, Fri Jul 24 21:47:26 2015 UTC
# Line 92  c ANNA define variables for wavebands Line 92  c ANNA define variables for wavebands
92         _RL PARw_k(tlam,Nr)         _RL PARw_k(tlam,Nr)
93         _RL PARwup(tlam)         _RL PARwup(tlam)
94         _RL acdom_k(Nr,tlam)         _RL acdom_k(Nr,tlam)
95           _RL Ek_nll(npmax,tlam)
96           _RL EkoverE_nll(npmax,tlam)
97  #ifdef DAR_RADTRANS  #ifdef DAR_RADTRANS
98         integer iday,iyr,imon,isec,lp,wd,mydate(4)         integer iday,iyr,imon,isec,lp,wd,mydate(4)
99         _RL Edwsf(tlam),Eswsf(tlam)         _RL Edwsf(tlam),Eswsf(tlam)
# Line 131  C      always need for diagnostics Line 133  C      always need for diagnostics
133  #ifdef GEIDER  #ifdef GEIDER
134        _RL phychl(npmax)        _RL phychl(npmax)
135        _RL phychl_k(npmax,Nr)        _RL phychl_k(npmax,Nr)
136          _RL Ekl(npmax)
137          _RL EkoverEl(npmax)
138          _RL chl2cl(npmax)
139  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
140        _RL dphychl(npmax)        _RL dphychl(npmax)
141        _RL chlup(npmax)        _RL chlup(npmax)
142          _RL accliml(npmax)
143  #endif  #endif
144  #endif  #endif
145  #ifdef ALLOW_CDOM  #ifdef ALLOW_CDOM
# Line 416  C        always fill; this will be the s Line 422  C        always fill; this will be the s
422  C        way it won't blow up for weird diagnostics periods.  C        way it won't blow up for weird diagnostics periods.
423  C        we fill before updating, so the diag is the one used in this time  C        we fill before updating, so the diag is the one used in this time
424  C        step  C        step
425           CALL DIAGNOSTICS_FILL(           IF ( useDiagnostics ) THEN
426              CALL DIAGNOSTICS_FILL(
427       &         PARday(1-Olx,1-Oly,1,bi,bj,PARiprev),'PARday  ',       &         PARday(1-Olx,1-Oly,1,bi,bj,PARiprev),'PARday  ',
428       &         0,Nr,2,bi,bj,myThid )       &         0,Nr,2,bi,bj,myThid )
429             ENDIF
430  #endif  #endif
431  #endif /* ALLOW_PAR_DAY */  #endif /* ALLOW_PAR_DAY */
432    
# Line 499  c ------------ GET INCIDENT NON-SPECTRAL Line 507  c ------------ GET INCIDENT NON-SPECTRAL
507    
508  #else /* not USE_QSW */  #else /* not USE_QSW */
509    
510           lite = sfac(j)*maskC(i,j,1,bi,bj)/86400*1 _d 6  C        convert W/m2 to uEin/s/m2
511             lite = sfac(j)*parconv*maskC(i,j,1,bi,bj)
512    
513  #endif /* not USE_QSW */  #endif /* not USE_QSW */
514  #endif /* not READ_PAR */  #endif /* not READ_PAR */
# Line 885  c taking from igsm dic run - fed through Line 894  c taking from igsm dic run - fed through
894  c               pCO2local=surfaceForcingT(i,j,bi,bj)  c               pCO2local=surfaceForcingT(i,j,bi,bj)
895  c or from darwin carbon module  c or from darwin carbon module
896  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
897    #ifdef pH_3D
898                   pCO2local=pCO2(i,j,k,bi,bj)
899    #else
900                 pCO2local=pCO2(i,j,bi,bj)                 pCO2local=pCO2(i,j,bi,bj)
901    #endif
902  #else  #else
903                 pCO2local=280. _d -6                 pCO2local=280. _d -6
904  #endif  #endif
# Line 964  c set other arguments to zero Line 977  c set other arguments to zero
977                  NfixPl(np)=0. _d 0                  NfixPl(np)=0. _d 0
978  #endif  #endif
979  #endif  #endif
980    #ifdef DAR_DIAG_PARW
981                    chl2cl(np)=0. _d 0
982    #endif
983    #ifdef DAR_DIAG_EK
984                    Ekl(np)=0. _d 0
985                    EkoverEl(np)=0. _d 0
986                    do ilam=1,tlam
987                      Ek_nll(np,ilam)=0. _d 0
988                      EkoverE_nll(np,ilam)=0. _d 0
989                    enddo
990    #endif
991               enddo               enddo
992    
993    
# Line 1033  c ANNA pass extra variables if WAVEBANDS Line 1057  c ANNA pass extra variables if WAVEBANDS
1057  #endif  #endif
1058  #ifdef GEIDER  #ifdef GEIDER
1059       O                       phychl,       O                       phychl,
1060    #ifdef DAR_DIAG_EK
1061         I                       Ekl, EkoverEl,
1062    #endif
1063    #ifdef DAR_DIAG_PARW
1064         I                       chl2cl,
1065    #endif
1066  #ifdef DYNAMIC_CHL  #ifdef DYNAMIC_CHL
1067       I                       dphychl,       I                       dphychl,
1068       I                       chlup,       I                       chlup,
1069    #ifdef DAR_DIAG_EK
1070         O                       accliml,
1071    #endif
1072  #endif  #endif
1073  #ifdef ALLOW_CDOM  #ifdef ALLOW_CDOM
1074       O                       dcdoml,       O                       dcdoml,
# Line 1043  c ANNA pass extra variables if WAVEBANDS Line 1076  c ANNA pass extra variables if WAVEBANDS
1076  #endif  #endif
1077  #ifdef WAVEBANDS  #ifdef WAVEBANDS
1078       I                       PARw_k(1,k),       I                       PARw_k(1,k),
1079    #ifdef DAR_DIAG_EK
1080         I                       Ek_nll, EkoverE_nll,
1081    #endif
1082  #endif  #endif
1083  #endif  #endif
1084  #ifdef ALLOW_PAR_DAY  #ifdef ALLOW_PAR_DAY
# Line 1186  c ---- end steph's alternative Line 1222  c ---- end steph's alternative
1222                  dfetl=dfetl+fet_flx(i,j,k,bi,bj)                  dfetl=dfetl+fet_flx(i,j,k,bi,bj)
1223                  dsil=dsil+si_flx(i,j,k,bi,bj)                  dsil=dsil+si_flx(i,j,k,bi,bj)
1224  #endif  #endif
1225  c  
1226    #ifdef ALLOW_OBCS
1227              IF (useOBCS) THEN
1228                dpo4l  = dpo4l *maskInC(i,j,bi,bj)
1229                dno3l  = dno3l *maskInC(i,j,bi,bj)
1230                dfetl  = dfetl *maskInC(i,j,bi,bj)
1231                dsil   = dsil  *maskInC(i,j,bi,bj)
1232                ddopl  = ddopl *maskInC(i,j,bi,bj)
1233                ddonl  = ddonl *maskInC(i,j,bi,bj)
1234                ddofel = ddofel*maskInC(i,j,bi,bj)
1235                dpopl  = dpopl *maskInC(i,j,bi,bj)
1236                dponl  = dponl *maskInC(i,j,bi,bj)
1237                dpofel = dpofel*maskInC(i,j,bi,bj)
1238                dpsil  = dpsil *maskInC(i,j,bi,bj)
1239                dnh4l  = dnh4l *maskInC(i,j,bi,bj)
1240                dno2l  = dno2l *maskInC(i,j,bi,bj)
1241                DO nz = 1,nzmax
1242                 dzoop (nz) = dzoop (nz)*maskInC(i,j,bi,bj)
1243                 dzoon (nz) = dzoon (nz)*maskInC(i,j,bi,bj)
1244                 dzoofe(nz) = dzoofe(nz)*maskInC(i,j,bi,bj)
1245                 dzoosi(nz) = dzoosi(nz)*maskInC(i,j,bi,bj)
1246                ENDDO
1247                DO np = 1,npmax
1248                 dPhy(np) = dPhy(np)*maskInC(i,j,bi,bj)
1249    #ifdef GEIDER
1250    #ifdef DYNAMIC_CHL
1251                 dphychl(np) = dphychl(np)*maskInC(i,j,bi,bj)
1252    #endif
1253    #endif
1254                ENDDO
1255    #ifdef ALLOW_CDOM
1256                dcdoml = dcdoml*maskInC(i,j,bi,bj)
1257    #endif
1258    #ifdef ALLOW_CARBON
1259                ddicl = ddicl*maskInC(i,j,bi,bj)
1260                ddocl = ddocl*maskInC(i,j,bi,bj)
1261                dpocl = dpocl*maskInC(i,j,bi,bj)
1262                dpicl = dpicl*maskInC(i,j,bi,bj)
1263                dalkl = dalkl*maskInC(i,j,bi,bj)
1264                do2l  = do2l *maskInC(i,j,bi,bj)
1265                DO nz = 1,nzmax
1266                 dzoocl(nz) = dzoocl(nz)*maskInC(i,j,bi,bj)
1267                ENDDO
1268    #endif
1269              ENDIF
1270    #endif
1271    
1272  c now update main tracer arrays  c now update main tracer arrays
1273            dtplankton = PTRACERS_dTLev(k)/float(nsubtime)            dtplankton = PTRACERS_dTLev(k)/float(nsubtime)
1274            Ptr(i,j,k,bi,bj,iPO4 ) = Ptr(i,j,k,bi,bj,iPO4) +            Ptr(i,j,k,bi,bj,iPO4 ) = Ptr(i,j,k,bi,bj,iPO4) +
# Line 1381  c    &                       deltaTclock Line 1463  c    &                       deltaTclock
1463       &                           phychl(np)*dtplankton       &                           phychl(np)*dtplankton
1464               enddo               enddo
1465  #endif  #endif
1466    #ifdef DAR_DIAG_PARW
1467                do ilam=1,tlam
1468                   PARwave(i,j,k,bi,bj,ilam)=PARwave(i,j,k,bi,bj,ilam)+
1469         &                           PARw_k(ilam,k)*dtplankton
1470                enddo
1471                do np=1,npmax
1472                  chl2cave(i,j,k,bi,bj,np)=chl2cave(i,j,k,bi,bj,np)+
1473         &                          chl2cl(np)*dtplankton
1474                enddo
1475    #endif
1476  #ifdef DAR_DIAG_ACDOM  #ifdef DAR_DIAG_ACDOM
1477  c            print*,'acdom',k,acdom_k(k,darwin_diag_acdom_ilam)  c            print*,'acdom',k,acdom_k(k,darwin_diag_acdom_ilam)
1478               aCDOMave(i,j,k,bi,bj)=aCDOMave(i,j,k,bi,bj)+               aCDOMave(i,j,k,bi,bj)=aCDOMave(i,j,k,bi,bj)+
# Line 1446  Coj            no Eu at surface (yet) Line 1538  Coj            no Eu at surface (yet)
1538       &                                 rmud*dtplankton       &                                 rmud*dtplankton
1539               endif               endif
1540  #endif  #endif
1541    #ifdef DAR_DIAG_EK
1542                do np=1,npmax
1543                 Ekave(i,j,k,bi,bj,np)=Ekave(i,j,k,bi,bj,np)+
1544         &                        Ekl(np)*dtplankton
1545                 EkoverEave(i,j,k,bi,bj,np)=EkoverEave(i,j,k,bi,bj,np)+
1546         &                        EkoverEl(np)*dtplankton
1547                 acclimave(i,j,k,bi,bj,np)=acclimave(i,j,k,bi,bj,np)+
1548         &                        accliml(np)*dtplankton
1549                 do ilam=1,tlam
1550                    Ek_nlave(i,j,k,bi,bj,np,ilam)=
1551         &                        Ek_nlave(i,j,k,bi,bj,np,ilam)+
1552         &                        Ek_nll(np,ilam)*dtplankton
1553                    EkoverE_nlave(i,j,k,bi,bj,np,ilam)=
1554         &                        EkoverE_nlave(i,j,k,bi,bj,np,ilam)+
1555         &                        EkoverE_nll(np,ilam)*dtplankton
1556                 enddo
1557                enddo
1558    #endif
1559  #ifdef DAR_DIAG_RSTAR  #ifdef DAR_DIAG_RSTAR
1560               do np=1,npmax               do np=1,npmax
1561                 Rstarave(i,j,k,bi,bj,np)=Rstarave(i,j,k,bi,bj,np)+                 Rstarave(i,j,k,bi,bj,np)=Rstarave(i,j,k,bi,bj,np)+
# Line 1491  Coj            no Eu at surface (yet) Line 1601  Coj            no Eu at surface (yet)
1601       &                              FluxCO2(i,j,bi,bj)*dtplankton       &                              FluxCO2(i,j,bi,bj)*dtplankton
1602                SUROave(i,j,bi,bj)   =SUROave(i,j,bi,bj)+                SUROave(i,j,bi,bj)   =SUROave(i,j,bi,bj)+
1603       &                              flxO2(i,j)*dtplankton       &                              flxO2(i,j)*dtplankton
1604                 endif
1605    #ifdef pH_3D
1606                  pCO2ave(i,j,k,bi,bj)   =pCO2ave(i,j,k,bi,bj)+
1607         &                              pCO2(i,j,k,bi,bj)*dtplankton
1608                  pHave(i,j,k,bi,bj)     =pHave(i,j,k,bi,bj)+
1609         &                              pH(i,j,k,bi,bj)*dtplankton
1610    #else
1611                 if (k.eq.1) then
1612                pCO2ave(i,j,bi,bj)   =pCO2ave(i,j,bi,bj)+                pCO2ave(i,j,bi,bj)   =pCO2ave(i,j,bi,bj)+
1613       &                              pCO2(i,j,bi,bj)*dtplankton       &                              pCO2(i,j,bi,bj)*dtplankton
1614                pHave(i,j,bi,bj)     =pHave(i,j,bi,bj)+                pHave(i,j,bi,bj)     =pHave(i,j,bi,bj)+
1615       &                              pH(i,j,bi,bj)*dtplankton       &                              pH(i,j,bi,bj)*dtplankton
1616               endif               endif
1617  #endif  #endif
1618    #endif
1619            endif              endif  
1620  c end if hFac>0  c end if hFac>0
1621    
# Line 1641  c ANNA end TAVE Line 1760  c ANNA end TAVE
1760       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1761          CALL DIAGNOSTICS_FILL( flxO2(1-Olx,1-Oly), 'DICOFLX ',          CALL DIAGNOSTICS_FILL( flxO2(1-Olx,1-Oly), 'DICOFLX ',
1762       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1763    #ifdef pH_3D
1764            CALL DIAGNOSTICS_FILL( pCO2(1-Olx,1-Oly,1,bi,bj), 'DICPCO2 ',
1765         &                         0,Nr,2,bi,bj,myThid )
1766            CALL DIAGNOSTICS_FILL( pH(1-Olx,1-Oly,1,bi,bj), 'DICPHAV ',
1767         &                         0,Nr,2,bi,bj,myThid )
1768    #else
1769          CALL DIAGNOSTICS_FILL( pCO2(1-Olx,1-Oly,bi,bj), 'DICPCO2 ',          CALL DIAGNOSTICS_FILL( pCO2(1-Olx,1-Oly,bi,bj), 'DICPCO2 ',
1770       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1771          CALL DIAGNOSTICS_FILL( pH(1-Olx,1-Oly,bi,bj), 'DICPHAV ',          CALL DIAGNOSTICS_FILL( pH(1-Olx,1-Oly,bi,bj), 'DICPHAV ',
1772       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1773    #endif
1774  #endif /* ALLOW_CARBON */  #endif /* ALLOW_CARBON */
1775         ENDIF         ENDIF
1776  #endif /* ALLOW_DIAGNOSTICS */  #endif /* ALLOW_DIAGNOSTICS */
# Line 1657  c determine iron partitioning  - solve f Line 1783  c determine iron partitioning  - solve f
1783  c  c
1784  #ifdef ALLOW_TIMEAVE  #ifdef ALLOW_TIMEAVE
1785  c save averages  c save averages
1786         do k=1,nR           dar_timeave(bi,bj) = dar_timeave(bi,bj) + dtplankton
          dar_timeave(bi,bj,k)=dar_timeave(bi,bj,k)  
      &                         +dtplankton  
1787  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1788           dic_timeave(bi,bj,k)=dic_timeave(bi,bj,k)           dic_timeave(bi,bj) = dic_timeave(bi,bj) + dtplankton
      &                         +dtplankton  
1789  #endif  #endif
        enddo  
1790  #endif  #endif
1791  c  c
1792  c -----------------------------------------------------  c -----------------------------------------------------

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22