/[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.14 by jahn, Thu Oct 25 15:58:24 2012 UTC revision 1.19 by jahn, Mon Jan 4 17:06:57 2016 UTC
# Line 422  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 608  C cos(solz) is average over daylight per Line 610  C cos(solz) is average over daylight per
610       O                       solz)       O                       solz)
611    
612  #else /* not DAR_RADTRANS_USE_MODEL_CALENDAR */  #else /* not DAR_RADTRANS_USE_MODEL_CALENDAR */
613  C use calendar date for full solar zenith angle computation  C Use calendar date for full solar zenith angle computation.
614  C oj: average light effective at noon?  C Use local noon zenith angle to avoid problems with zero cosine and
615           solz = 0.0 _d 0  C non-zero light.  One should really use a zenith angle compatible with
616           isec = 12*3600        C the light fields, in particular averaged over the same time period.
617             isec = MOD(36.*3600. - 240.*XC(i,j,bi,bj), 86400.)
618           call radtrans_sfcsolz(rad,iyr,imon,iday,isec,           call radtrans_sfcsolz(rad,iyr,imon,iday,isec,
619       I                         XC(i,j,bi,bj),YC(i,j,bi,bj),       I                         XC(i,j,bi,bj),YC(i,j,bi,bj),
620       O                         solz)       O                         solz)
# Line 892  c taking from igsm dic run - fed through Line 895  c taking from igsm dic run - fed through
895  c               pCO2local=surfaceForcingT(i,j,bi,bj)  c               pCO2local=surfaceForcingT(i,j,bi,bj)
896  c or from darwin carbon module  c or from darwin carbon module
897  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
898    #ifdef pH_3D
899                   pCO2local=pCO2(i,j,k,bi,bj)
900    #else
901                 pCO2local=pCO2(i,j,bi,bj)                 pCO2local=pCO2(i,j,bi,bj)
902    #endif
903  #else  #else
904                 pCO2local=280. _d -6                 pCO2local=280. _d -6
905  #endif  #endif
# Line 1216  c ---- end steph's alternative Line 1223  c ---- end steph's alternative
1223                  dfetl=dfetl+fet_flx(i,j,k,bi,bj)                  dfetl=dfetl+fet_flx(i,j,k,bi,bj)
1224                  dsil=dsil+si_flx(i,j,k,bi,bj)                  dsil=dsil+si_flx(i,j,k,bi,bj)
1225  #endif  #endif
1226  c  
1227    #ifdef ALLOW_OBCS
1228              IF (useOBCS) THEN
1229                dpo4l  = dpo4l *maskInC(i,j,bi,bj)
1230                dno3l  = dno3l *maskInC(i,j,bi,bj)
1231                dfetl  = dfetl *maskInC(i,j,bi,bj)
1232                dsil   = dsil  *maskInC(i,j,bi,bj)
1233                ddopl  = ddopl *maskInC(i,j,bi,bj)
1234                ddonl  = ddonl *maskInC(i,j,bi,bj)
1235                ddofel = ddofel*maskInC(i,j,bi,bj)
1236                dpopl  = dpopl *maskInC(i,j,bi,bj)
1237                dponl  = dponl *maskInC(i,j,bi,bj)
1238                dpofel = dpofel*maskInC(i,j,bi,bj)
1239                dpsil  = dpsil *maskInC(i,j,bi,bj)
1240                dnh4l  = dnh4l *maskInC(i,j,bi,bj)
1241                dno2l  = dno2l *maskInC(i,j,bi,bj)
1242                DO nz = 1,nzmax
1243                 dzoop (nz) = dzoop (nz)*maskInC(i,j,bi,bj)
1244                 dzoon (nz) = dzoon (nz)*maskInC(i,j,bi,bj)
1245                 dzoofe(nz) = dzoofe(nz)*maskInC(i,j,bi,bj)
1246                 dzoosi(nz) = dzoosi(nz)*maskInC(i,j,bi,bj)
1247                ENDDO
1248                DO np = 1,npmax
1249                 dPhy(np) = dPhy(np)*maskInC(i,j,bi,bj)
1250    #ifdef GEIDER
1251    #ifdef DYNAMIC_CHL
1252                 dphychl(np) = dphychl(np)*maskInC(i,j,bi,bj)
1253    #endif
1254    #endif
1255                ENDDO
1256    #ifdef ALLOW_CDOM
1257                dcdoml = dcdoml*maskInC(i,j,bi,bj)
1258    #endif
1259    #ifdef ALLOW_CARBON
1260                ddicl = ddicl*maskInC(i,j,bi,bj)
1261                ddocl = ddocl*maskInC(i,j,bi,bj)
1262                dpocl = dpocl*maskInC(i,j,bi,bj)
1263                dpicl = dpicl*maskInC(i,j,bi,bj)
1264                dalkl = dalkl*maskInC(i,j,bi,bj)
1265                do2l  = do2l *maskInC(i,j,bi,bj)
1266                DO nz = 1,nzmax
1267                 dzoocl(nz) = dzoocl(nz)*maskInC(i,j,bi,bj)
1268                ENDDO
1269    #endif
1270              ENDIF
1271    #endif
1272    
1273  c now update main tracer arrays  c now update main tracer arrays
1274            dtplankton = PTRACERS_dTLev(k)/float(nsubtime)            dtplankton = PTRACERS_dTLev(k)/float(nsubtime)
1275            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 1549  Coj            no Eu at surface (yet) Line 1602  Coj            no Eu at surface (yet)
1602       &                              FluxCO2(i,j,bi,bj)*dtplankton       &                              FluxCO2(i,j,bi,bj)*dtplankton
1603                SUROave(i,j,bi,bj)   =SUROave(i,j,bi,bj)+                SUROave(i,j,bi,bj)   =SUROave(i,j,bi,bj)+
1604       &                              flxO2(i,j)*dtplankton       &                              flxO2(i,j)*dtplankton
1605                 endif
1606    #ifdef pH_3D
1607                  pCO2ave(i,j,k,bi,bj)   =pCO2ave(i,j,k,bi,bj)+
1608         &                              pCO2(i,j,k,bi,bj)*dtplankton
1609                  pHave(i,j,k,bi,bj)     =pHave(i,j,k,bi,bj)+
1610         &                              pH(i,j,k,bi,bj)*dtplankton
1611    #else
1612                 if (k.eq.1) then
1613                pCO2ave(i,j,bi,bj)   =pCO2ave(i,j,bi,bj)+                pCO2ave(i,j,bi,bj)   =pCO2ave(i,j,bi,bj)+
1614       &                              pCO2(i,j,bi,bj)*dtplankton       &                              pCO2(i,j,bi,bj)*dtplankton
1615                pHave(i,j,bi,bj)     =pHave(i,j,bi,bj)+                pHave(i,j,bi,bj)     =pHave(i,j,bi,bj)+
1616       &                              pH(i,j,bi,bj)*dtplankton       &                              pH(i,j,bi,bj)*dtplankton
1617               endif               endif
1618  #endif  #endif
1619    #endif
1620            endif              endif  
1621  c end if hFac>0  c end if hFac>0
1622    
# Line 1699  c ANNA end TAVE Line 1761  c ANNA end TAVE
1761       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1762          CALL DIAGNOSTICS_FILL( flxO2(1-Olx,1-Oly), 'DICOFLX ',          CALL DIAGNOSTICS_FILL( flxO2(1-Olx,1-Oly), 'DICOFLX ',
1763       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1764    #ifdef pH_3D
1765            CALL DIAGNOSTICS_FILL( pCO2(1-Olx,1-Oly,1,bi,bj), 'DICPCO2 ',
1766         &                         0,Nr,2,bi,bj,myThid )
1767            CALL DIAGNOSTICS_FILL( pH(1-Olx,1-Oly,1,bi,bj), 'DICPHAV ',
1768         &                         0,Nr,2,bi,bj,myThid )
1769    #else
1770          CALL DIAGNOSTICS_FILL( pCO2(1-Olx,1-Oly,bi,bj), 'DICPCO2 ',          CALL DIAGNOSTICS_FILL( pCO2(1-Olx,1-Oly,bi,bj), 'DICPCO2 ',
1771       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1772          CALL DIAGNOSTICS_FILL( pH(1-Olx,1-Oly,bi,bj), 'DICPHAV ',          CALL DIAGNOSTICS_FILL( pH(1-Olx,1-Oly,bi,bj), 'DICPHAV ',
1773       &                         0,1,2,bi,bj,myThid )       &                         0,1,2,bi,bj,myThid )
1774    #endif
1775  #endif /* ALLOW_CARBON */  #endif /* ALLOW_CARBON */
1776         ENDIF         ENDIF
1777  #endif /* ALLOW_DIAGNOSTICS */  #endif /* ALLOW_DIAGNOSTICS */
# Line 1715  c determine iron partitioning  - solve f Line 1784  c determine iron partitioning  - solve f
1784  c  c
1785  #ifdef ALLOW_TIMEAVE  #ifdef ALLOW_TIMEAVE
1786  c save averages  c save averages
1787         do k=1,nR           dar_timeave(bi,bj) = dar_timeave(bi,bj) + dtplankton
          dar_timeave(bi,bj,k)=dar_timeave(bi,bj,k)  
      &                         +dtplankton  
1788  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1789           dic_timeave(bi,bj,k)=dic_timeave(bi,bj,k)           dic_timeave(bi,bj) = dic_timeave(bi,bj) + dtplankton
      &                         +dtplankton  
1790  #endif  #endif
        enddo  
1791  #endif  #endif
1792  c  c
1793  c -----------------------------------------------------  c -----------------------------------------------------

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.22