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

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

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

revision 1.2 by jahn, Fri Jan 25 21:59:38 2013 UTC revision 1.3 by jahn, Tue May 21 20:31:39 2013 UTC
# Line 25  c Line 25  c
25  #include "PTRACERS_FIELDS.h"  #include "PTRACERS_FIELDS.h"
26  #include "MONOD_SIZE.h"  #include "MONOD_SIZE.h"
27  #include "MONOD.h"  #include "MONOD.h"
28    #include "MONOD_FIELDS.h"
29  #include "DARWIN_IO.h"  #include "DARWIN_IO.h"
30  #ifdef OASIM  #ifdef OASIM
31  #include "SPECTRAL_SIZE.h"  #include "SPECTRAL_SIZE.h"
# Line 53  C     msgBuf    - Informational/error me Line 54  C     msgBuf    - Informational/error me
54          _RL atten          _RL atten
55  CEOP  CEOP
56    
57  #ifdef DYNAMIC_CHL  #ifdef GEIDER
58    
59          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
60       &  '// ======================================================='       &  '// ======================================================='
# Line 67  CEOP Line 68  CEOP
68          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
69       &                      SQUEEZE_RIGHT, myThid )       &                      SQUEEZE_RIGHT, myThid )
70    
71    C     do not overwrite pickup
72          IF (nIter0 .EQ. PTRACERS_Iter0) THEN
73    
74         call DARWIN_FIELDS_LOAD(0,0. _d 0,myThid)         call DARWIN_FIELDS_LOAD(0,0. _d 0,myThid)
75    
76  c check Chl fields are reasonable  c check Chl fields are reasonable
# Line 94  c if spectral use wavebands to give a si Line 98  c if spectral use wavebands to give a si
98                 endif                 endif
99                 PARlocal = lite*exp(-atten)                 PARlocal = lite*exp(-atten)
100                 DO np=1,npmax                 DO np=1,npmax
101    #ifdef DYNAMIC_CHL
102                  chltmp=Ptracer(i,j,k,bi,bj,iChl+np-1)                  chltmp=Ptracer(i,j,k,bi,bj,iChl+np-1)
103    #else
104                    chltmp=0.0
105    #endif
106                  phytmp=Ptracer(i,j,k,bi,bj,iPhy+np-1)                  phytmp=Ptracer(i,j,k,bi,bj,iPhy+np-1)
107  c if initialized to zero, set to balanced growth  c if initialized to zero, set to balanced growth
108  c with no nutrient or temperature limitation  c with no nutrient or temperature limitation
# Line 104  c (Eq. A15 Geider et al 1997) Line 112  c (Eq. A15 Geider et al 1997)
112                       chl2ctmp=chl2cmax(np)/                       chl2ctmp=chl2cmax(np)/
113       &                       (1+(chl2cmax(np)*alphachl(np)*PARlocal)/       &                       (1+(chl2cmax(np)*alphachl(np)*PARlocal)/
114       &                       (2*pcm))       &                       (2*pcm))
115                       Ptracer(i,j,k,bi,bj,iChl+np-1)=                       chltmp=phytmp*R_PC(np)*chl2ctmp
      &                                  phytmp*R_PC(np)*chl2ctmp  
116                  endif                  endif
117  c check not too high or too low  c check not too high or too low
118                  Ptracer(i,j,k,bi,bj,iChl+np-1)=                  chltmp=max(chltmp, phytmp*R_PC(np)*chl2cmin(np))
119       &                      max(Ptracer(i,j,k,bi,bj,iChl+np-1),                  chltmp=min(chltmp, phytmp*R_PC(np)*chl2cmax(np))
120       &                          phytmp*R_PC(np)*chl2cmin(np))  #ifdef DYNAMIC_CHL
121                  Ptracer(i,j,k,bi,bj,iChl+np-1)=                  Ptracer(i,j,k,bi,bj,iChl+np-1)=chltmp
122       &                      min(Ptracer(i,j,k,bi,bj,iChl+np-1),  #else
123       &                          phytmp*R_PC(np)*chl2cmax(np))                  Chl_phy(i,j,k,bi,bj,np)=chltmp
124    #endif
125                  if (k.eq.1.and.i.eq.1.and.j.eq.1) print*,'initial Chl',                  if (k.eq.1.and.i.eq.1.and.j.eq.1) print*,'initial Chl',
126       &                        Ptracer(i,j,k,bi,bj,iChl+np-1), phytmp       &                        chltmp, phytmp
127                 ENDDO                 ENDDO
128                endif                endif
129               ENDDO               ENDDO
# Line 124  c check not too high or too low Line 132  c check not too high or too low
132            ENDDO            ENDDO
133            ENDDO            ENDDO
134    
135    C     nIter0
136          ENDIF
137  #endif  #endif
138    
139          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22