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

Annotation of /MITgcm_contrib/darwin2/pkg/monod/monod_generate_phyto.F

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


Revision 1.2 - (hide annotations) (download)
Fri Jan 25 22:03:06 2013 UTC (12 years, 5 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_ckpt64f_20130405, 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_ckpt64e_20130305, 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_ckpt64g_20130503, 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_ckpt64d_20130219, 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.1: +3 -3 lines
actually check for diatom as the comment says

1 jahn 1.2 C $Header: /u/gcmpack/MITgcm_contrib/darwin2/pkg/monod/monod_generate_phyto.F,v 1.1 2011/04/13 18:56:25 jahn Exp $
2     C $Name: $
3 jahn 1.1
4     #include "CPP_OPTIONS.h"
5     #include "PTRACERS_OPTIONS.h"
6     #include "DARWIN_OPTIONS.h"
7    
8     #ifdef ALLOW_PTRACERS
9     #ifdef ALLOW_MONOD
10    
11     c ==========================================================
12     c SUBROUTINE MONOD_GENERATE_PHYTO
13     c generate parameters for "functional group" of phyto (index np)
14     c using a "Monte Carlo" approach
15     c Mick Follows, Scott Grant Fall/Winter 2005
16     c Stephanie Dutkiewicz Spring/Summer 2005
17     c Anna Hickman Summer 2008
18     c TWO_SPECIES_SETUP
19     c 1=large, 2=small
20     c NINE_SPECIES_SETUP
21     c 1=diatom, 2=other large, 3=syn, 4=hl pro, 5=ll pro, 6=trich,
22     c 7=uni diaz, 8=small euk, 9=cocco
23     c ==========================================================
24     SUBROUTINE MONOD_GENERATE_PHYTO(myThid, np)
25    
26     implicit none
27     #include "EEPARAMS.h"
28     #include "MONOD_SIZE.h"
29     #include "DARWIN_PARAMS.h"
30     #include "MONOD.h"
31    
32    
33     c ANNA define WAVEBANDS variables
34     #ifdef WAVEBANDS
35     #include "SPECTRAL_SIZE.h"
36     #include "WAVEBANDS_PARAMS.h"
37     #endif
38    
39    
40    
41     C !INPUT PARAMETERS: ===================================================
42     C myThid :: thread number
43     INTEGER myThid
44    
45     C === Functions ===
46     _RL DARWIN_RANDOM
47     EXTERNAL DARWIN_RANDOM
48     _RL DARWIN_RANDOM_NORMAL
49     EXTERNAL DARWIN_RANDOM_NORMAL
50    
51     C !LOCAL VARIABLES:
52     C === Local variables ===
53     C msgBuf - Informational/error meesage buffer
54     CHARACTER*(MAX_LEN_MBUF) msgBuf
55    
56     _RL RandNo
57     _RL growthdays
58     _RL mortdays
59     _RL pday
60     _RL year
61     _RL month
62     _RL fiveday
63     _RL rtime
64     _RL standin
65     _RL dm
66     _RL volp
67     _RL PI
68     INTEGER np
69     INTEGER nz
70     INTEGER signvar
71     PARAMETER ( PI = 3.14159265358979323844D0 )
72    
73     CEOP
74     c
75     standin=0. _d 0
76    
77     c length of day (seconds)
78     pday = 86400.0 _d 0
79    
80     c each time generate another functional group add one to ngroups
81     ngroups = ngroups + 1
82    
83     c RANDOM NUMBERS
84     c phyto either "small" (physize(np)=0.0) or "big" (physize(np)=1.0)
85     c at this point independent of whether diatom or coccolithophor or not
86     RandNo = darwin_random(myThid)
87     if(RandNo .gt. 0.500 _d 0)then
88     physize(np) = 1.0 _d 0
89     else
90     physize(np) = 0.0 _d 0
91     end if
92     #ifdef TWO_SPECIES_SETUP
93     if (np.eq.1) physize(np) = 1.0 _d 0
94     if (np.eq.2) physize(np) = 0.0 _d 0
95     #endif
96     #ifdef NINE_SPECIES_SETUP
97     if (np.lt.3.or.np.eq.6.or.np.eq.9) then
98     physize(np) = 1.0 _d 0
99     else
100     physize(np) = 0.0 _d 0
101     end if
102     #endif
103    
104     c size of phytoplankton
105     if(physize(np).eq. 1.0 _d 0)then
106     dm = 10. _d 0 ! diameter (micrometer)
107     else
108     dm = 1. _d 0 ! diameter (micrometer)
109     end if
110     c phytoplankton volume in micrometers cubed
111     volp=4. _d 0/3. _d 0 *PI*(dm/2. _d 0)**3 _d 0
112     c
113     c common block variables (in m and m3)
114     phyto_esd(np)=dm* 1. _d -6
115     phyto_vol(np)=volp* 1. _d -18
116     c
117     c phyto either diatoms (diacoc=1.0) and use silica or cocolithophor
118     c (diacoc=2.0) and produce PIC or neither (diacoc=0.0)
119     c if they are large
120     if (physize(np).eq.1.0 _d 0) then
121     RandNo = darwin_random(myThid)
122     if(RandNo .gt. 0.500 _d 0)then
123     diacoc(np) = 1.0 _d 0
124     else
125     diacoc(np) = 0.0 _d 0
126     end if
127     c if(RandNo .gt. 0.670 _d 0)then
128     c diacoc(np) = 1.0 _d 0
129     c endif
130     c if(RandNo .gt. 0.330 _d 0 .and. RandNo. le. 0.67 _d 0)then
131     c diacoc(np) = 2.0 _d 0
132     c endif
133     c if (RandNo .le. 0.330 _d 0) then
134     c diacoc(np) = 0.0 _d 0
135     c endif
136     else
137     diacoc(np) = 0.0 _d 0
138     endif
139     #ifdef TWO_SPECIES_SETUP
140     diacoc(np) = 0.0 _d 0
141     #endif
142     #ifdef NINE_SPECIES_SETUP
143     if (np.eq.1) then
144     diacoc(np) = 1.0 _d 0
145     else
146     diacoc(np) = 0.0 _d 0
147     endif
148     if (np.eq.9) then
149     diacoc(np) = 2.0 _d 0
150     endif
151     #endif
152     c TEST ...........................................
153     c diacoc(np) = 0.0 _d 0
154     c write(msgBuf,'(A,I4,A)')
155     c & 'generate Phyto: np = ',np,' FIXED - no DIAZO'
156     c CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
157     c & SQUEEZE_RIGHT , mythid)
158     c TEST ...........................................
159    
160    
161    
162     c phyto either diazotrophs (diazotroph=1.0) or not (diazotroph=0.0)
163     RandNo = darwin_random(myThid)
164     if(RandNo .gt. 0.6700 _d 0)then
165     diazotroph(np) = 1.0 _d 0
166     else
167     diazotroph(np) = 0.0 _d 0
168     end if
169     c TEST ...........................................
170     #ifndef ALLOW_DIAZ
171     diazotroph(np) = 0.0 _d 0
172     write(msgBuf,'(A,I4,A)')
173     & 'generate Phyto: np = ',np,' FIXED - no DIAZO'
174     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
175     & SQUEEZE_RIGHT , mythid)
176     #endif
177     c TEST ...........................................
178     #ifdef TWO_SPECIES_SETUP
179     diazotroph(np) = 0.0 _d 0
180     #endif
181     #ifdef NINE_SPECIES_SETUP
182     if (np.gt.5.and.np.lt.8) then
183     diazotroph(np) = 1.0 _d 0
184     else
185     diazotroph(np) = 0.0 _d 0
186     end if
187     #endif
188    
189    
190     c growth rates
191     RandNo = darwin_random(myThid)
192     c big/small phyto growth rates..
193     if(physize(np) .eq. 1.0 _d 0)then
194     growthdays = Biggrow +Randno*Biggrowrange
195     else
196     growthdays = Smallgrow +RandNo*Smallgrowrange
197     end if
198     c but diazotrophs always slower due to energetics
199     if(diazotroph(np) .eq. 1.0 _d 0) then
200     growthdays = growthdays * diaz_growfac
201     endif
202     #ifdef TWO_SPECIES_SETUP
203     if(physize(np) .eq. 1.0 _d 0)then
204     growthdays = Biggrow
205     else
206     growthdays = Smallgrow
207     end if
208     #endif
209     #ifdef NINE_SPECIES_SETUP
210     if(physize(np) .eq. 1.0 _d 0)then
211     growthdays = Biggrow
212     else
213     growthdays = Smallgrow
214     end if
215     #endif
216     c now convert to a growth rate
217     if (growthdays.gt.0. _d 0) then
218     mu(np) = 1.0 _d 0/(growthdays*pday)
219     else
220     mu(np) = 0. _d 0
221     endif
222    
223     c mortality and export fraction rates
224     RandNo = darwin_random(myThid)
225     c big/small phyto mortality rates..
226     if(physize(np) .eq. 1.0 _d 0)then
227     mortdays = Bigmort +Randno*Bigmortrange
228     ExportFracP(np)=Bigexport
229     else
230     mortdays = Smallmort +RandNo*Smallmortrange
231     ExportFracP(np)=Smallexport
232     end if
233     #ifdef TWO_SPECIES_SETUP
234     if(physize(np) .eq. 1.0 _d 0)then
235     mortdays = Bigmort
236     else
237     mortdays = Smallmort
238     end if
239     #endif
240     #ifdef NINE_SPECIES_SETUP
241     if(physize(np) .eq. 1.0 _d 0)then
242     mortdays = Bigmort
243     else
244     mortdays = Smallmort
245     end if
246     #endif
247    
248     c now convert to a mortality rate
249     if (mortdays.gt.0. _d 0) then
250     mortphy(np) = 1.0 _d 0/(mortdays*pday)
251     else
252     mortphy(np) = 0. _d 0
253     endif
254    
255    
256    
257     c nutrient source
258     if(diazotroph(np) .ne. 1.0 _d 0)then
259     RandNo = darwin_random(myThid)
260     if (physize(np).eq.1.0 _d 0) then
261     nsource(np) = 3
262     else
263     if(RandNo .gt. 0.670 _d 0)then
264     nsource(np) = 1
265     elseif(RandNo .lt. 0.33 _d 0)then
266     nsource(np) = 2
267     else
268     nsource(np) = 3
269     endif
270     c ANNA shift bias away from pros. Now equal chance of being HL, LL, Syn, Euk.
271     c ANNA i.e. now 50% chance of being Pro (nsource 1 or 2, with 50% change of each being HL)
272     c ANNA i.e. and 50% chance of being non-Pro (nsource 3, with 50% chance of non-pro being Syn)
273     c if(RandNo .gt. 0.50 _d 0)then
274     c nsource(np) = 3
275     c elseif(RandNo .lt. 0.25 _d 0)then
276     c nsource(np) = 2
277     c else
278     c nsource(np) = 1
279     c endif
280     endif
281     else
282     nsource(np) = 0
283     end if
284     #ifdef TWO_SPECIES_SETUP
285     nsource(np) = 3
286     #endif
287     #ifdef NINE_SPECIES_SETUP
288     if (np.lt.4) then
289     nsource(np) = 3
290     end if
291     nsource(4)=2
292     nsource(5)=1
293     if (np.gt.5.and.np.lt.8) then
294     nsource(np) = 0
295     end if
296     if (np.gt.7) then
297     nsource(np) = 3
298     end if
299     #endif
300    
301     c.....................................................
302     c ANNA make selections for WAVEBANDS
303     c.....................................................
304     #ifdef WAVEBANDS
305     c for now, choice of four absorption spectra types
306     c pros get either 'HL' or 'LL'
307     c small others get 'syn' or 'euk'
308     c large get 'euk'
309     c each 'type', once assigned, gets given actual values in wavebands_init_vari.F
310    
311     c ANNA_Q could use tricho abs and scattering spectra (Subramanian et al. 1999)
312     c ANNA_Q think diaz is turned off for now
313     c Diaz will be 0 if not defined, and will have nsource = 0.
314     if (tnabp.eq.4) then
315     if (nsource(np).eq.0) then !if diazotroph
316     if (physize(np).eq.1.0d0) then !if BIG
317     ap_type(np) = 1 !euk (assume diatom association)
318     else !or
319     ap_type(np) = 2 !syn (for now - tricho has billins)
320     end if
321     end if
322    
323     RandNo = darwin_random(myThid)
324     if (nsource(np).eq.3) then !if all three sources (NO3)
325     if (physize(np).eq.1.0d0) then !if BIG
326     ap_type(np) = 1 !euk
327     else !if SMALL
328     if (RandNo.gt.0.500d0) then
329     ap_type(np) = 1 !euk
330     else !or
331     ap_type(np) = 2 !Syn
332     end if
333     end if
334     endif
335    
336     RandNo = darwin_random(myThid)
337     if (nsource(np).eq.2) then !if NH4 only
338     if (RandNo.gt.0.500d0) then
339     ap_type(np) = 3 !Pro HL
340     else !or
341     ap_type(np) = 4 !Pro LL
342     end if
343     end if
344    
345     RandNo = darwin_random(myThid)
346     if (nsource(np).eq.1) then !if NH4 & NO2
347     if (RandNo.gt.0.500d0) then
348     ap_type(np) = 3 !Pro HL
349     else !or
350     ap_type(np) = 4 !Pro LL
351     end if
352     end if
353     endif
354     c
355     if (tnabp.eq.12) then
356     if (nsource(np).eq.0) then !if diazotroph
357     if (physize(np).eq.1.0d0) then !if BIG
358     if (diacoc(np).eq.1.0d0) then
359     ap_type(np) = 5 !diatom association
360     endif
361     if (diacoc(np).eq.0.0d0) then
362     ap_type(np) = 7 !tricho
363     endif
364     if (diacoc(np).eq.2.0d0) then
365     ap_type(np) = 6 !coccolithopher(?)
366     endif
367     else !or
368     ap_type(np) = 1 !unicellular (whould be 8 -
369     !but currently zero)
370     end if
371     end if
372    
373     RandNo = darwin_random(myThid)
374     if (nsource(np).eq.3) then !if all three sources (NO3)
375     if (physize(np).eq.1.0d0) then !if BIG
376     if (diacoc(np).eq.1.0d0) then
377     ap_type(np) = 5 !diatom
378     endif
379     if (diacoc(np).eq.0.0d0) then
380     ap_type(np) = 9 !Lg Euk
381     endif
382     if (diacoc(np).eq.2.0d0) then
383     ap_type(np) = 6 !coccolithopher
384     endif
385     else !if SMALL
386     if (RandNo.gt.0.500d0) then
387     ap_type(np) = 1 !euk
388     else !or
389     ap_type(np) = 2 !Syn
390     end if
391     end if
392     endif
393     endif
394    
395     #ifdef TWO_SPECIES_SETUP
396     if (np.eq.1) ap_type(np) = 10
397     if (np.eq.2) ap_type(np) = 10
398     #endif
399     #ifdef NINE_SPECIES_SETUP
400     if (np.eq.1) ap_type(np) = 5
401     if (np.eq.2) ap_type(np) = 9
402     if (np.eq.3) ap_type(np) = 2
403     if (np.eq.4) ap_type(np) = 3
404     if (np.eq.5) ap_type(np) = 4
405     if (np.eq.6) ap_type(np) = 7
406     if (np.eq.7) ap_type(np) = 8
407     if (np.eq.8) ap_type(np) = 1
408     if (np.eq.9) ap_type(np) = 6
409     ap_type(np) = 10
410     #endif
411    
412    
413     #else
414     c ANNA number of RandNo's carreid out MUST MATCH regardless of wavebands or not.
415     C ANNA the number of RandNo statements here MUST MATCH the number done above
416    
417     c RandNo = darwin_random(myThid)
418     c RandNo = darwin_random(myThid)
419     c RandNo = darwin_random(myThid)
420    
421     #endif
422     c ANNA endif
423    
424    
425     c..........................................................
426     c generate phyto Temperature Function parameters
427     c.......................................................
428     phytoTempCoeff(np) = tempcoeff1
429     phytoTempExp1(np) = tempcoeff3
430     if(physize(np) .eq. 1.0 _d 0)then
431     phytoTempExp2(np) = tempcoeff2_big
432     else
433     phytoTempExp2(np) = tempcoeff2_small
434     endif
435    
436     RandNo = darwin_random(myThid)
437     #ifdef TEMP_RANGE
438     cswd phytoTempOptimum(np) = 30.0 _d 0 - RandNo*28.0 _d 0
439     phytoTempOptimum(np) = tempmax - RandNo*temprange
440     phytoDecayPower(np) = tempdecay
441     #else
442     phytoTempOptimum(np) = 0. _d 0
443     phytoDecayPower(np) = 0. _d 0
444     #endif
445    
446     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
447     & 'generate Phyto: np = ',np,' Topt =',
448     & phytoTempOptimum(np)
449     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
450     & SQUEEZE_RIGHT , mythid)
451    
452     c ...............................................
453     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
454     & 'generate Phyto: np = ',np,' growthdays =', growthdays
455     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
456     & SQUEEZE_RIGHT , mythid)
457     c ...............................................
458    
459     c stoichiometric ratios for each functional group of phyto
460     c relative to phosphorus - the base currency nutrient
461     c set Si:P
462     if(diacoc(np) .eq. 1.0 _d 0)then
463     R_SiP(np) = val_R_SiP_diatom
464     else
465     R_SiP(np) = 0.0 _d 0
466     end if
467     if(diacoc(np) .eq. 2.0 _d 0)then
468     R_PICPOC(np) = val_R_PICPOC
469     else
470     R_PICPOC(np) = 0.0 _d 0
471     end if
472     c set N:P and iron requirement according to diazotroph status
473     if(diazotroph(np) .eq. 1.0 _d 0)then
474     R_NP(np) = val_R_NP_diaz
475     R_FeP(np) = val_RFeP_diaz
476     else
477     R_NP(np) = val_R_NP
478     R_FeP(np) = val_RFeP
479     end if
480     c set C:P ratio
481     R_PC(np) = val_R_PC
482     c set sinking rates according to allometry
483     if(physize(np) .eq. 1.0 _d 0)then
484     wsink(np) = BigSink
485     else
486     wsink(np) = SmallSink
487     end if
488     c half-saturation coeffs
489    
490     RandNo = darwin_random(myThid)
491     if(physize(np) .eq. 1.0 _d 0)then
492     ksatPO4(np) = BigPsat + RandNo*BigPsatrange
493     else
494     c ksatPO4(np) = SmallPsat + RandNo*SmallPsatrange
495     c if (nsource(np).lt.3) then
496     c ksatPO4(np) = ksatPO4(np)*prochlPsat
497     c endif
498     if (nsource(np).eq.3) then
499     ksatPO4(np) = SmallPsat + RandNo*SmallPsatrange
500     endif
501     if (nsource(np).eq..0) then
502     c ksatPO4(np) = SmallPsat + RandNo*SmallPsatrange
503     ksatPO4(np) = UniDzPsat + RandNo*UniDzPsatrange
504     endif
505     if (nsource(np).eq.2.or.nsource(np).eq.1) then
506     ksatPO4(np) = ProcPsat + RandNo*ProcPsatrange
507     endif
508     endif
509     #ifdef TWO_SPECIES_SETUP
510     if(physize(np) .eq. 1.0 _d 0)then
511     ksatPO4(np) = BigPsat
512     else
513     ksatPO4(np) = SmallPsat
514     endif
515     #endif
516     #ifdef NINE_SPECIES_SETUP
517     if(physize(np) .eq. 1.0 _d 0)then
518     ksatPO4(np) = BigPsat
519     else
520     ksatPO4(np) = SmallPsat
521     endif
522     if (nsource(np).eq.2.or.nsource(np).eq.1) then
523     ksatPO4(np) = ProcPsat
524     endif
525     if (diacoc(np) .eq. 2.0 _d 0) then
526     ksatPO4(np) = ksatPO4(np)/0.8 _d 0
527     endif
528     #endif
529    
530     ksatNO3(np) = ksatPO4(np)*R_NP(np)
531     ksatNO2(np) = ksatNO3(np)*ksatNO2fac
532     c Made ksatNH4 smaller since it is the preferred source
533     ksatNH4(np) = ksatNO3(np)*ksatNH4fac
534     ksatFeT(np) = ksatPO4(np)*R_FeP(np)
535     ksatSi(np) = val_ksatsi
536    
537     #ifndef GEIDER
538     cNEW Light parameters:
539     c ksatPAR {0.1 - 1.3}
540     c 0.35=Av High Light Adapted, 0.8=Av Low Light Adapted
541     c kinhib {0.0 - 3.0}
542     c 0.5 =Av High Light Adapted, 2.0=Av Low Light Adapted
543     c High Light Groups for Large size:
544     if(physize(np) .eq. 1.0 _d 0)then
545     RandNo = darwin_random_normal(myThid)
546     ksatPAR(np) = abs(Bigksatpar+Bigksatparstd*RandNo)
547    
548     RandNo = darwin_random_normal(myThid)
549     kinhib(np) = abs(Bigkinhib+Bigkinhibstd*RandNo)
550     else
551     c QQ remove someday
552     RandNo = darwin_random(myThid)
553     c Low Light Groups for Small size:
554     RandNo = darwin_random_normal(myThid)
555     ksatPAR(np) = abs(smallksatpar+smallksatparstd*RandNo)
556    
557     RandNo = darwin_random_normal(myThid)
558     kinhib(np) = abs(smallkinhib+smallkinhibstd*RandNo)
559     endif
560     #ifdef TWO_SPECIES_SETUP
561     if(physize(np) .eq. 1.0 _d 0)then
562     ksatPAR(np) = abs(Bigksatpar)
563     kinhib(np) = abs(Bigkinhib)
564     else
565     ksatPAR(np) = abs(smallksatpar)
566     kinhib(np) = abs(smallkinhib)
567     endif
568     #endif
569     #ifdef NINE_SPECIES_SETUP
570     if(physize(np) .eq. 1.0 _d 0)then
571     ksatPAR(np) = abs(Bigksatpar)
572     kinhib(np) = abs(Bigkinhib)
573     else
574     ksatPAR(np) = abs(smallksatpar)
575     kinhib(np) = abs(smallkinhib)
576     endif
577     if (np.eq.5) then
578     kinhib(np) = 6.0 _d 0
579     endif
580     if (np.eq.9) then
581     kinhib(np) = 0.5 _d 0
582     endif
583     #endif
584     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
585     & 'generate Phyto: np = ',np,' ksatPAR =', ksatPAR(np)
586     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
587     & SQUEEZE_RIGHT , mythid)
588     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
589     & 'generate Phyto: np = ',np,' kinhib =', kinhib(np)
590     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
591     & SQUEEZE_RIGHT , mythid)
592     #endif
593    
594     #ifdef GEIDER
595     RandNo = darwin_random(myThid)
596     c big/small phyto growth rates..
597     if(physize(np) .eq. 1.0 _d 0)then
598     growthdays = Biggrow +Randno*Biggrowrange
599     else
600     growthdays = Smallgrow +RandNo*Smallgrowrange
601     end if
602     c but diazotrophs always slower due to energetics
603     if(diazotroph(np) .eq. 1.0 _d 0) then
604     growthdays = growthdays * diaz_growfac
605     endif
606     c cocco have slower growth than diatom
607     if (diacoc(np).eq.2. _d 0) then
608     growthdays= growthdays * 1.3 _d 0
609     endif
610     #ifdef TWO_SPECIES_SETUP
611     if(physize(np) .eq. 1.0 _d 0)then
612     growthdays = Biggrow
613     else
614     growthdays = Smallgrow
615     end if
616     #endif
617     #ifdef NINE_SPECIES_SETUP
618     if(physize(np) .eq. 1.0 _d 0)then
619     growthdays = Biggrow
620     else
621     growthdays = Smallgrow
622     end if
623     c but diazotrophs always slower due to energetics
624     if(diazotroph(np) .eq. 1.0 _d 0) then
625     growthdays = growthdays * diaz_growfac
626     endif
627     c cocco have slower growth than other large
628     if (diacoc(np).eq.2. _d 0) then
629     growthdays= growthdays * 1.3 _d 0
630     endif
631     c diatom has faster thatn other large
632 jahn 1.2 if (diacoc(np).eq.1. _d 0) then
633 jahn 1.1 growthdays= growthdays * 0.95 _d 0
634     endif
635     #endif
636     c now convert to a growth rate
637     if (growthdays.gt.0. _d 0) then
638     pcmax(np) = 1.0 _d 0/(growthdays*pday)
639     else
640     pcmax(np) = 0. _d 0
641     endif
642     c
643     c photo-inhibition
644     #ifdef WAVEBANDS
645     c only LL Pro are inhibited
646     if (ap_type(np).eq.4) then
647     inhibcoef_geid(np) = inhibcoef_geid_val
648     else
649     inhibcoef_geid(np) = 0. _d 0
650     endif
651     #else
652     c no inhibition
653     if(physize(np) .eq. 1.0 _d 0)then
654     inhibcoef_geid(np) = 0. _d 0
655     else
656     inhibcoef_geid(np) = 0. _d 0 !inhibcoef_geid_val
657     endif
658     #endif
659     c
660     RandNo = darwin_random(myThid)
661    
662     c big/small phyto PI slope (chl specific)
663     c if(physize(np) .eq. 1.0 _d 0)then
664     c alphachl(np) = Bigalphachl +Randno*Bigalphachlrange
665     c else
666     c alphachl(np) = Smallalphachl +RandNo*Smallalphachlrange
667     c end if
668    
669     c ANNA gieder via mQyield instead of alpha
670     c big/small phyto Maximum Quantum Yield
671     if(physize(np) .eq. 1.0 _d 0)then
672     mQyield(np) = BigmQyield +Randno*BigmQyieldrange
673     else
674     mQyield(np) = SmallmQyield +RandNo*SmallmQyieldrange
675     end if
676     #ifdef TWO_SPECIES_SETUP
677     if(physize(np) .eq. 1.0 _d 0)then
678     mQyield(np) = BigmQyield
679     else
680     mQyield(np) = SmallmQyield
681     end if
682     #endif
683     #ifdef NINE_SPECIES_SETUP
684     if(physize(np) .eq. 1.0 _d 0)then
685     mQyield(np) = BigmQyield
686     else
687     mQyield(np) = SmallmQyield
688     end if
689     #endif
690     #ifdef WAVEBANDS
691     c ANNA for wavebands only, re-set mQyield to be constant for all np's
692     c ANNA i.e. let alpha vary only with aphy_chl_ps
693     c ANNA value is mean of vals for big and small.
694     mQyield(np) = 4.0 _d -5
695     #endif
696    
697     RandNo = darwin_random(myThid)
698     c big/small phyto C:Chl max
699     if(physize(np) .eq. 1.0 _d 0)then
700     chl2cmax(np) = Bigchl2cmax +Randno*Bigchl2cmaxrange
701     else
702     chl2cmax(np) = Smallchl2cmax +RandNo*Smallchl2cmaxrange
703     end if
704     #ifdef TWO_SPECIES_SETUP
705     if(physize(np) .eq. 1.0 _d 0)then
706     chl2cmax(np) = Bigchl2cmax
707     else
708     chl2cmax(np) = Smallchl2cmax
709     end if
710     #endif
711     #ifdef NINE_SPECIES_SETUP
712     if(physize(np) .eq. 1.0 _d 0)then
713     chl2cmax(np) = Bigchl2cmax
714     else
715     chl2cmax(np) = Smallchl2cmax
716     end if
717     #endif
718     c ANNA chl2cmin added
719     c chl2cmin(np) = 0.003 _d 0 * 12. _d 0 ! mg Chl a/mmol C
720    
721     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
722     & 'generate Phyto: np = ',np,' pcmax =', pcmax(np)
723     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
724     & SQUEEZE_RIGHT , mythid)
725     c write(msgBuf,'(A,I4,A,1P1G24.15E3)')
726     c & 'generate Phyto: np = ',np,' alphachl =', alphachl(np)
727     c ANNA CHANGED TO MQYIELD from ALPHACHL
728     c ANNA STEPH msgBuf changed for mQyield?
729     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
730     & 'generate Phyto: np = ',np,' mQyield =', mQyield(np)
731     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
732     & SQUEEZE_RIGHT , mythid)
733     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
734     & 'generate Phyto: np = ',np,' chl2cmax =', chl2cmax(np)
735     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
736     & SQUEEZE_RIGHT , mythid)
737     #endif
738    
739     #ifdef DAR_DIAG_CHL
740     if(physize(np) .eq. 1.0 _d 0)then
741     Geider_alphachl(np) = Geider_Bigalphachl
742     Geider_chl2cmax(np) = Geider_Bigchl2cmax
743     Geider_chl2cmin(np) = Geider_Bigchl2cmin
744     else
745     Geider_alphachl(np) = Geider_smallalphachl
746     Geider_chl2cmax(np) = Geider_smallchl2cmax
747     Geider_chl2cmin(np) = Geider_smallchl2cmin
748     end if
749    
750     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
751     & 'generate Phyto: np = ',np,' Geider_alphachl =',
752     & Geider_alphachl(np)
753     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
754     & SQUEEZE_RIGHT , mythid)
755     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
756     & 'generate Phyto: np = ',np,' Geider_chl2cmax =',
757     & Geider_chl2cmax(np)
758     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
759     & SQUEEZE_RIGHT , mythid)
760     #endif
761    
762     RETURN
763     END
764     #endif /*MONOD*/
765     #endif /*ALLOW_PTRACERS*/
766    
767     c ===========================================================

  ViewVC Help
Powered by ViewVC 1.1.22