/[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.5 by jahn, Wed Nov 9 23:34:17 2011 UTC revision 1.7 by stephd, Fri Jun 29 20:41:59 2012 UTC
# Line 43  c ANNA include wavebands_params.h Line 43  c ANNA include wavebands_params.h
43  #include "WAVEBANDS_PARAMS.h"  #include "WAVEBANDS_PARAMS.h"
44  #endif  #endif
45    
46    c choice which field to take pCO2 from for pCO2limit
47    c this assumes we use Ttendency from offline
48    #include "FFIELDS.h"
49    
50    
51  C     === Global variables ===  C     === Global variables ===
52  c tracers  c tracers
53         _RL Ptr(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,nDarwin)         _RL Ptr(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,nDarwin)
# Line 68  c plankton arrays Line 73  c plankton arrays
73        _RL  Phy_k(npmax,Nr)        _RL  Phy_k(npmax,Nr)
74        _RL  Phyup(npmax)        _RL  Phyup(npmax)
75        _RL  part_k(Nr)        _RL  part_k(Nr)
76    #ifdef ALLOW_CDOM
77          _RL cdom_k(Nr)
78    #endif
79  c iron partitioning  c iron partitioning
80        _RL  freefe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)        _RL  freefe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
81  c some working variables  c some working variables
# Line 126  C      always need for diagnostics Line 134  C      always need for diagnostics
134        _RL chlup(npmax)        _RL chlup(npmax)
135  #endif  #endif
136  #endif  #endif
137    #ifdef ALLOW_CDOM
138          _RL cdoml  
139          _RL dcdoml
140    #endif
141    
142  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
143  COJ for diagnostics  COJ for diagnostics
# Line 187  c some local variables Line 199  c some local variables
199         _RL PSiupl         _RL PSiupl
200         _RL Tlocal         _RL Tlocal
201         _RL Slocal         _RL Slocal
202           _RL pCO2local
203         _RL Qswlocal         _RL Qswlocal
204         _RL NH4l         _RL NH4l
205         _RL NO2l         _RL NO2l
# Line 417  C ========================== i,j loops = Line 430  C ========================== i,j loops =
430  c ------------ these are convenient ------------------------------------  c ------------ these are convenient ------------------------------------
431           DO k=1,Nr           DO k=1,Nr
432            part_k(k)  = max(Ptr(i,j,k,bi,bj,iPOP),0. _d 0)            part_k(k)  = max(Ptr(i,j,k,bi,bj,iPOP),0. _d 0)
433    #ifdef ALLOW_CDOM
434              cdom_k(k)  = max(Ptr(i,j,k,bi,bj,iCDOM),0. _d 0)
435    #endif
436            DO np = 1,npmax            DO np = 1,npmax
437              Phy_k(np,k) = max(Ptr(i,j,k,bi,bj,iPhy+np-1),0. _d 0)              Phy_k(np,k) = max(Ptr(i,j,k,bi,bj,iPhy+np-1),0. _d 0)
438  #ifdef GEIDER  #ifdef GEIDER
# Line 432  c ------------ these are convenient ---- Line 448  c ------------ these are convenient ----
448  c ------------ GET CDOM_k FOR WAVEBANDS_3D and RADTRANS ----------------  c ------------ GET CDOM_k FOR WAVEBANDS_3D and RADTRANS ----------------
449  #ifdef WAVEBANDS  #ifdef WAVEBANDS
450  #if defined(DAR_CALC_ACDOM) || defined(DAR_RADTRANS)  #if defined(DAR_CALC_ACDOM) || defined(DAR_RADTRANS)
451    #ifdef ALLOW_CDOM
452            call MONOD_ACDOM(cdom_k,
453         O                     acdom_k,
454         I                     myThid)
455    #else
456           call MONOD_ACDOM(phychl_k,aphy_chl,aw,           call MONOD_ACDOM(phychl_k,aphy_chl,aw,
457       O                     acdom_k,       O                     acdom_k,
458       I                     myThid)       I                     myThid)
459    #endif
460  #else  #else
461           DO k=1,Nr           DO k=1,Nr
462            DO ilam = 1,tlam            DO ilam = 1,tlam
# Line 669  c brute force... Line 691  c brute force...
691               psil  = max(Ptr(i,j,k,bi,bj,iPOSi ),0. _d 0)               psil  = max(Ptr(i,j,k,bi,bj,iPOSi ),0. _d 0)
692               NH4l  = max(Ptr(i,j,k,bi,bj,iNH4  ),0. _d 0)               NH4l  = max(Ptr(i,j,k,bi,bj,iNH4  ),0. _d 0)
693               NO2l  = max(Ptr(i,j,k,bi,bj,iNO2  ),0. _d 0)               NO2l  = max(Ptr(i,j,k,bi,bj,iNO2  ),0. _d 0)
694    #ifdef ALLOW_CDOM
695                 cdoml = max(Ptr(i,j,k,bi,bj,iCDOM  ),0. _d 0)
696    #endif
697  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
698               dicl  = max(Ptr(i,j,k,bi,bj,iDIC  ),0. _d 0)               dicl  = max(Ptr(i,j,k,bi,bj,iDIC  ),0. _d 0)
699               docl  = max(Ptr(i,j,k,bi,bj,iDOC  ),0. _d 0)               docl  = max(Ptr(i,j,k,bi,bj,iDOC  ),0. _d 0)
# Line 791  c for explicit sinking of particulate ma Line 816  c for explicit sinking of particulate ma
816               Slocal = salt(i,j,k,bi,bj)               Slocal = salt(i,j,k,bi,bj)
817  #endif  #endif
818    
819    c choice where to get pCO2 from
820    c taking from igsm dic run - fed through Tflux array
821    c               pCO2local=surfaceForcingT(i,j,bi,bj)
822    c or from darwin carbon module
823    #ifdef ALLOW_CARBON
824                   pCO2local=pCO2(i,j,bi,bj)
825    #else
826                   pCO2local=280. _d -6
827    #endif
828    
829               freefu = max(freefe(i,j,k),0. _d 0)               freefu = max(freefe(i,j,k),0. _d 0)
830               if (k.eq.1) then               if (k.eq.1) then
831                 inputFel = inputFe(i,j,bi,bj)                 inputFel = inputFe(i,j,bi,bj)
# Line 835  c set tendencies to 0 Line 870  c set tendencies to 0
870                 dphychl(np)=0. _d 0                 dphychl(np)=0. _d 0
871               enddo               enddo
872  #endif  #endif
873    #ifdef ALLOW_CDOM
874                dcdoml=0. _d 0
875    #endif
876  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
877               ddicl=0. _d 0               ddicl=0. _d 0
878               ddocl=0. _d 0               ddocl=0. _d 0
# Line 904  c ANNA pass extra variables if WAVEBANDS Line 942  c ANNA pass extra variables if WAVEBANDS
942       I                       pofeupl, psiupl,       I                       pofeupl, psiupl,
943       I                       PARl,       I                       PARl,
944       I                       Tlocal, Slocal,       I                       Tlocal, Slocal,
945         I                       pCO2local,
946       I                       freefu, inputFel,       I                       freefu, inputFel,
947       I                       bottom, dzlocal,       I                       bottom, dzlocal,
948       O                       Rstarl, RNstarl,       O                       Rstarl, RNstarl,
# Line 934  c ANNA pass extra variables if WAVEBANDS Line 973  c ANNA pass extra variables if WAVEBANDS
973       I                       dphychl,       I                       dphychl,
974       I                       chlup,       I                       chlup,
975  #endif  #endif
976    #ifdef ALLOW_CDOM
977         O                       dcdoml,
978         I                       cdoml,
979    #endif
980  #ifdef WAVEBANDS  #ifdef WAVEBANDS
981       I                       PARw_k(1,k),       I                       PARw_k(1,k),
982  #endif  #endif
# Line 1140  c in darwin_plankton this is stored for Line 1183  c in darwin_plankton this is stored for
1183  #endif  #endif
1184  #endif  #endif
1185           ENDDO           ENDDO
1186    #ifdef ALLOW_CDOM
1187              Ptr(i,j,k,bi,bj,iCDOM ) = Ptr(i,j,k,bi,bj,iCDOM ) +
1188         &                                  dtplankton*dcdoml
1189    #endif
1190  #ifdef ALLOW_CARBON  #ifdef ALLOW_CARBON
1191            Ptr(i,j,k,bi,bj,iDIC ) = Ptr(i,j,k,bi,bj,iDIC ) +            Ptr(i,j,k,bi,bj,iDIC ) = Ptr(i,j,k,bi,bj,iDIC ) +
1192       &                                  dtplankton*ddicl       &                                  dtplankton*ddicl

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22