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

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

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


Revision 1.3 - (show annotations) (download)
Tue May 21 20:31:39 2013 UTC (12 years, 2 months ago) by jahn
Branch: MAIN
CVS Tags: ctrb_darwin2_ckpt64k_20130723, ctrb_darwin2_ckpt65w_20160512, ctrb_darwin2_ckpt65j_20150225, ctrb_darwin2_ckpt66g_20170424, ctrb_darwin2_ckpt64h_20130528, ctrb_darwin2_ckpt66k_20171025, ctrb_darwin2_ckpt66n_20180118, ctrb_darwin2_ckpt65v_20160409, ctrb_darwin2_ckpt65s_20160114, ctrb_darwin2_ckpt65_20140718, ctrb_darwin2_ckpt64m_20130820, ctrb_darwin2_ckpt66d_20170214, ctrb_darwin2_ckpt64r_20131210, ctrb_darwin2_ckpt65m_20150615, ctrb_darwin2_ckpt65q_20151118, ctrb_darwin2_ckpt65o_20150914, ctrb_darwin2_ckpt65p_20151023, ctrb_darwin2_ckpt64n_20130826, ctrb_darwin2_ckpt65e_20140929, ctrb_darwin2_ckpt64o_20131024, ctrb_darwin2_ckpt64v_20140411, ctrb_darwin2_ckpt64z_20140711, ctrb_darwin2_ckpt65l_20150504, ctrb_darwin2_ckpt65z_20160929, ctrb_darwin2_ckpt65n_20150729, ctrb_darwin2_ckpt64y_20140622, ctrb_darwin2_ckpt65d_20140915, ctrb_darwin2_ckpt64t_20140202, ctrb_darwin2_ckpt66h_20170602, ctrb_darwin2_ckpt64i_20130622, ctrb_darwin2_ckpt64s_20140105, ctrb_darwin2_ckpt64x_20140524, ctrb_darwin2_ckpt65x_20160612, ctrb_darwin2_ckpt66f_20170407, ctrb_darwin2_ckpt65g_20141120, ctrb_darwin2_ckpt65k_20150402, ctrb_darwin2_ckpt64w_20140502, ctrb_darwin2_ckpt66a_20161020, ctrb_darwin2_ckpt64l_20130806, ctrb_darwin2_ckpt65f_20141014, ctrb_darwin2_ckpt66b_20161219, ctrb_darwin2_ckpt64u_20140308, ctrb_darwin2_ckpt64j_20130704, ctrb_darwin2_ckpt65i_20150123, ctrb_darwin2_ckpt66j_20170815, ctrb_darwin2_ckpt65y_20160801, ctrb_darwin2_ckpt66c_20170121, ctrb_darwin2_ckpt65a_20140728, ctrb_darwin2_ckpt65b_20140812, ctrb_darwin2_ckpt65t_20160221, ctrb_darwin2_ckpt64p_20131118, ctrb_darwin2_ckpt66o_20180209, ctrb_darwin2_ckpt66e_20170314, ctrb_darwin2_ckpt64q_20131118, ctrb_darwin2_ckpt64p_20131024, ctrb_darwin2_ckpt65u_20160315, ctrb_darwin2_ckpt65r_20151221, ctrb_darwin2_ckpt66i_20170718, ctrb_darwin2_ckpt65c_20140830, ctrb_darwin2_ckpt66l_20171025, ctrb_darwin2_ckpt65h_20141217, ctrb_darwin2_ckpt66m_20171213, HEAD
Changes since 1.2: +20 -10 lines
initialize non-dynamic Chlorophyll like dynamic Chlorophyll

1
2 #include "CPP_OPTIONS.h"
3 #include "DARWIN_OPTIONS.h"
4
5 #ifdef ALLOW_PTRACERS
6 #ifdef ALLOW_MONOD
7
8 c ==========================================================
9 c SUBROUTINE MONOD_CHECK_CHL()
10 c initialize Chl is not set and check that not too much or too little
11 c --- steph spring 2010
12 c ==========================================================
13 c
14 SUBROUTINE MONOD_CHECK_CHL(myThid)
15
16 IMPLICIT NONE
17
18 #include "SIZE.h"
19 #include "GRID.h"
20 #include "DYNVARS.h"
21 #include "EEPARAMS.h"
22 #include "PARAMS.h"
23 #include "PTRACERS_SIZE.h"
24 #include "PTRACERS_PARAMS.h"
25 #include "PTRACERS_FIELDS.h"
26 #include "MONOD_SIZE.h"
27 #include "MONOD.h"
28 #include "MONOD_FIELDS.h"
29 #include "DARWIN_IO.h"
30 #ifdef OASIM
31 #include "SPECTRAL_SIZE.h"
32 #include "SPECTRAL.h"
33 #endif
34
35
36 C !INPUT PARAMETERS: ===================================================
37 C myThid :: thread number
38 INTEGER myThid
39
40 C !LOCAL VARIABLES:
41 C === Local variables ===
42 C msgBuf - Informational/error meesage buffer
43 CHARACTER*(MAX_LEN_MBUF) msgBuf
44 INTEGER IniUnit1, IniUnit2
45
46 INTEGER bi, bj, k, i, j, iPAR
47
48 INTEGER np
49
50 INTEGER ilam
51
52 _RL phytmp, chltmp, chl2ctmp, pcm
53 _RL PARlocal, lite
54 _RL atten
55 CEOP
56
57 #ifdef GEIDER
58
59 WRITE(msgBuf,'(A)')
60 & '// ======================================================='
61 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
62 & SQUEEZE_RIGHT, myThid )
63 WRITE(msgBuf,'(A)') '// Darwin check Chl >>> START <<<'
64 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
65 & SQUEEZE_RIGHT, myThid )
66 WRITE(msgBuf,'(A)')
67 & '// ======================================================='
68 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
69 & 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)
75
76 c check Chl fields are reasonable
77 DO bj = myByLo(myThid), myByHi(myThid)
78 DO bi = myBxLo(myThid), myBxHi(myThid)
79 DO j=1-Oly,sNy+Oly
80 DO i=1-Olx,sNx+Olx
81 atten= 0. _d 0
82 #if defined(WAVEBANDS) && defined(OASIM)
83 c if spectral use wavebands to give a single surface PAR
84 lite= 0. _d 0
85 DO ilam=1,tlam
86 lite=lite+WtouEins(ilam)*(oasim_ed(i,j,ilam,bi,bj)+
87 & oasim_es(i,j,ilam,bi,bj))
88 ENDDO
89 #else
90 lite=sur_par(i,j,bi,bj)
91 #endif
92
93 DO k=1,nR
94 if (HFacC(i,j,k,bi,bj).gt.0. _d 0) then
95 atten= atten + (k0 )*5. _d -1*drF(k)
96 if (k.gt.1)then
97 atten = atten + (k0)*5. _d -1*drF(k-1)
98 endif
99 PARlocal = lite*exp(-atten)
100 DO np=1,npmax
101 #ifdef DYNAMIC_CHL
102 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)
107 c if initialized to zero, set to balanced growth
108 c with no nutrient or temperature limitation
109 c (Eq. A15 Geider et al 1997)
110 if (chltmp.eq.0. _d 0) then
111 pcm=pcmax(np) !*limit(np)*phytoTempFunction(np)
112 chl2ctmp=chl2cmax(np)/
113 & (1+(chl2cmax(np)*alphachl(np)*PARlocal)/
114 & (2*pcm))
115 chltmp=phytmp*R_PC(np)*chl2ctmp
116 endif
117 c check not too high or too low
118 chltmp=max(chltmp, phytmp*R_PC(np)*chl2cmin(np))
119 chltmp=min(chltmp, phytmp*R_PC(np)*chl2cmax(np))
120 #ifdef DYNAMIC_CHL
121 Ptracer(i,j,k,bi,bj,iChl+np-1)=chltmp
122 #else
123 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',
126 & chltmp, phytmp
127 ENDDO
128 endif
129 ENDDO
130 ENDDO
131 ENDDO
132 ENDDO
133 ENDDO
134
135 C nIter0
136 ENDIF
137 #endif
138
139 WRITE(msgBuf,'(A)')
140 & '// ======================================================='
141 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
142 & SQUEEZE_RIGHT, myThid )
143 WRITE(msgBuf,'(A)') '// Darwin check chl >>> END <<<'
144 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
145 & SQUEEZE_RIGHT, myThid )
146 WRITE(msgBuf,'(A)')
147 & '// ======================================================='
148 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
149 & SQUEEZE_RIGHT, myThid )
150
151
152 RETURN
153 END
154 #endif /*MONOD*/
155 #endif /*ALLOW_PTRACERS*/
156 c ==========================================================
157

  ViewVC Help
Powered by ViewVC 1.1.22