/[MITgcm]/MITgcm_contrib/ecco_darwin/v4_3deg/code/darwin_generate_phyto.F
ViewVC logotype

Annotation of /MITgcm_contrib/ecco_darwin/v4_3deg/code/darwin_generate_phyto.F

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


Revision 1.1 - (hide annotations) (download)
Mon Jan 27 02:52:02 2020 UTC (6 years, 7 months ago) by dimitri
Branch: MAIN
First complete check in with v4_llc270 ecco-darwin set-up

1 dimitri 1.1 C $Header: /u/gcmpack/MITgcm_contrib/ecco_darwin/v4_llc270/code_darwin/darwin_generate_phyto.F,v 1.3 2020/01/08 16:05:31 dcarroll Exp $
2     C $Name: $
3    
4     #include "CPP_OPTIONS.h"
5     #include "PTRACERS_OPTIONS.h"
6     #include "DARWIN_OPTIONS.h"
7    
8     #ifdef ALLOW_PTRACERS
9     #ifdef ALLOW_DARWIN
10    
11     c ==========================================================
12     c SUBROUTINE DARWIN_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 DARWIN_GENERATE_PHYTO(myThid, np)
25    
26     implicit none
27     #include "EEPARAMS.h"
28     #include "DARWIN_SIZE.h"
29     #include "DARWIN_PARAMS.h"
30     #include "DARWIN.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     c but diazotrophs always slower due to energetics
216     if(diazotroph(np) .eq. 1.0 _d 0) then
217     growthdays = growthdays * diaz_growfac
218     endif
219     c cocco have slower growth than other large
220     if (diacoc(np).eq.2. _d 0) then
221     growthdays= growthdays * 1.3 _d 0
222     endif
223     c diatom has faster thatn other large
224     if (diacoc(np).eq.1. _d 0) then
225     growthdays= growthdays * 1. _d 0 ! 0.95 _d 0
226     endif
227     #endif
228     c now convert to a growth rate
229     if (growthdays.gt.0. _d 0) then
230     mu(np) = 1.0 _d 0/(growthdays*pday)
231     else
232     mu(np) = 0. _d 0
233     endif
234    
235     c mortality and export fraction rates
236     RandNo = darwin_random(myThid)
237     c big/small phyto mortality rates..
238     if(physize(np) .eq. 1.0 _d 0)then
239     mortdays = Bigmort +Randno*Bigmortrange
240     ExportFracP(np)=Bigexport
241     else
242     mortdays = Smallmort +RandNo*Smallmortrange
243     ExportFracP(np)=Smallexport
244     end if
245     #ifdef TWO_SPECIES_SETUP
246     if(physize(np) .eq. 1.0 _d 0)then
247     mortdays = Bigmort
248     else
249     mortdays = Smallmort
250     end if
251     #endif
252     #ifdef NINE_SPECIES_SETUP
253     if(physize(np) .eq. 1.0 _d 0)then
254     mortdays = Bigmort
255     else
256     mortdays = Smallmort
257     end if
258     #endif
259    
260     c now convert to a mortality rate
261     if (mortdays.gt.0. _d 0) then
262     mortphy(np) = 1.0 _d 0/(mortdays*pday)
263     else
264     mortphy(np) = 0. _d 0
265     endif
266    
267    
268    
269     c nutrient source
270     if(diazotroph(np) .ne. 1.0 _d 0)then
271     RandNo = darwin_random(myThid)
272     if (physize(np).eq.1.0 _d 0) then
273     nsource(np) = 3
274     else
275     if(RandNo .gt. 0.670 _d 0)then
276     nsource(np) = 1
277     elseif(RandNo .lt. 0.33 _d 0)then
278     nsource(np) = 2
279     else
280     nsource(np) = 3
281     endif
282     c ANNA shift bias away from pros. Now equal chance of being HL, LL, Syn, Euk.
283     c ANNA i.e. now 50% chance of being Pro (nsource 1 or 2, with 50% change of each being HL)
284     c ANNA i.e. and 50% chance of being non-Pro (nsource 3, with 50% chance of non-pro being Syn)
285     c if(RandNo .gt. 0.50 _d 0)then
286     c nsource(np) = 3
287     c elseif(RandNo .lt. 0.25 _d 0)then
288     c nsource(np) = 2
289     c else
290     c nsource(np) = 1
291     c endif
292     endif
293     else
294     nsource(np) = 0
295     end if
296     #ifdef TWO_SPECIES_SETUP
297     nsource(np) = 3
298     #endif
299     #ifdef NINE_SPECIES_SETUP
300     if (np.lt.4) then
301     nsource(np) = 3
302     end if
303     nsource(4)=2
304     nsource(5)=1
305     if (np.gt.5.and.np.lt.8) then
306     nsource(np) = 0
307     end if
308     if (np.gt.7) then
309     nsource(np) = 3
310     end if
311     #endif
312    
313     c.....................................................
314     c ANNA make selections for WAVEBANDS
315     c.....................................................
316     #ifdef WAVEBANDS
317     c for now, choice of four absorption spectra types
318     c pros get either 'HL' or 'LL'
319     c small others get 'syn' or 'euk'
320     c large get 'euk'
321     c each 'type', once assigned, gets given actual values in wavebands_init_vari.F
322    
323     c ANNA_Q could use tricho abs and scattering spectra (Subramanian et al. 1999)
324     c ANNA_Q think diaz is turned off for now
325     c Diaz will be 0 if not defined, and will have nsource = 0.
326     if (tnabp.eq.4) then
327     if (nsource(np).eq.0) then !if diazotroph
328     if (physize(np).eq.1.0d0) then !if BIG
329     ap_type(np) = 1 !euk (assume diatom association)
330     else !or
331     ap_type(np) = 2 !syn (for now - tricho has billins)
332     end if
333     end if
334    
335     RandNo = darwin_random(myThid)
336     if (nsource(np).eq.3) then !if all three sources (NO3)
337     if (physize(np).eq.1.0d0) then !if BIG
338     ap_type(np) = 1 !euk
339     else !if SMALL
340     if (RandNo.gt.0.500d0) then
341     ap_type(np) = 1 !euk
342     else !or
343     ap_type(np) = 2 !Syn
344     end if
345     end if
346     endif
347    
348     RandNo = darwin_random(myThid)
349     if (nsource(np).eq.2) then !if NH4 only
350     if (RandNo.gt.0.500d0) then
351     ap_type(np) = 3 !Pro HL
352     else !or
353     ap_type(np) = 4 !Pro LL
354     end if
355     end if
356    
357     RandNo = darwin_random(myThid)
358     if (nsource(np).eq.1) then !if NH4 & NO2
359     if (RandNo.gt.0.500d0) then
360     ap_type(np) = 3 !Pro HL
361     else !or
362     ap_type(np) = 4 !Pro LL
363     end if
364     end if
365     endif
366     c
367     if (tnabp.eq.12) then
368     if (nsource(np).eq.0) then !if diazotroph
369     if (physize(np).eq.1.0d0) then !if BIG
370     if (diacoc(np).eq.1.0d0) then
371     ap_type(np) = 5 !diatom association
372     endif
373     if (diacoc(np).eq.0.0d0) then
374     ap_type(np) = 7 !tricho
375     endif
376     if (diacoc(np).eq.2.0d0) then
377     ap_type(np) = 6 !coccolithopher(?)
378     endif
379     else !or
380     ap_type(np) = 1 !unicellular (whould be 8 -
381     !but currently zero)
382     end if
383     end if
384    
385     RandNo = darwin_random(myThid)
386     if (nsource(np).eq.3) then !if all three sources (NO3)
387     if (physize(np).eq.1.0d0) then !if BIG
388     if (diacoc(np).eq.1.0d0) then
389     ap_type(np) = 5 !diatom
390     endif
391     if (diacoc(np).eq.0.0d0) then
392     ap_type(np) = 9 !Lg Euk
393     endif
394     if (diacoc(np).eq.2.0d0) then
395     ap_type(np) = 6 !coccolithopher
396     endif
397     else !if SMALL
398     if (RandNo.gt.0.500d0) then
399     ap_type(np) = 1 !euk
400     else !or
401     ap_type(np) = 2 !Syn
402     end if
403     end if
404     endif
405     endif
406    
407     #ifdef TWO_SPECIES_SETUP
408     if (np.eq.1) ap_type(np) = 10
409     if (np.eq.2) ap_type(np) = 10
410     #endif
411     #ifdef NINE_SPECIES_SETUP
412     if (np.eq.1) ap_type(np) = 5
413     if (np.eq.2) ap_type(np) = 9
414     if (np.eq.3) ap_type(np) = 2
415     if (np.eq.4) ap_type(np) = 3
416     if (np.eq.5) ap_type(np) = 4
417     if (np.eq.6) ap_type(np) = 7
418     if (np.eq.7) ap_type(np) = 8
419     if (np.eq.8) ap_type(np) = 1
420     if (np.eq.9) ap_type(np) = 6
421     ap_type(np) = 10
422     #endif
423    
424    
425     #else
426     c ANNA number of RandNo's carreid out MUST MATCH regardless of wavebands or not.
427     C ANNA the number of RandNo statements here MUST MATCH the number done above
428    
429     c RandNo = darwin_random(myThid)
430     c RandNo = darwin_random(myThid)
431     c RandNo = darwin_random(myThid)
432    
433     #endif
434     c ANNA endif
435    
436    
437     c..........................................................
438     c generate phyto Temperature Function parameters
439     c.......................................................
440     phytoTempCoeff(np) = tempcoeff1
441     phytoTempExp1(np) = tempcoeff3
442     if(physize(np) .eq. 1.0 _d 0)then
443     phytoTempExp2(np) = tempcoeff2_big
444     else
445     phytoTempExp2(np) = tempcoeff2_small
446     endif
447    
448     RandNo = darwin_random(myThid)
449     #ifdef TEMP_RANGE
450     cswd phytoTempOptimum(np) = 30.0 _d 0 - RandNo*28.0 _d 0
451     phytoTempOptimum(np) = tempmax - RandNo*temprange
452     phytoDecayPower(np) = tempdecay
453     #else
454     phytoTempOptimum(np) = 0. _d 0
455     phytoDecayPower(np) = 0. _d 0
456     #endif
457    
458     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
459     & 'generate Phyto: np = ',np,' Topt =',
460     & phytoTempOptimum(np)
461     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
462     & SQUEEZE_RIGHT , mythid)
463    
464     c ...............................................
465     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
466     & 'generate Phyto: np = ',np,' growthdays =', growthdays
467     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
468     & SQUEEZE_RIGHT , mythid)
469     c ...............................................
470    
471     c stoichiometric ratios for each functional group of phyto
472     c relative to phosphorus - the base currency nutrient
473     c set Si:P
474     if(diacoc(np) .eq. 1.0 _d 0)then
475     R_SiP(np) = val_R_SiP_diatom
476     else
477     R_SiP(np) = 0.0 _d 0
478     end if
479     if(diacoc(np) .eq. 2.0 _d 0)then
480     R_PICPOC(np) = val_R_PICPOC
481     else
482     R_PICPOC(np) = 0.0 _d 0
483     end if
484     cswd %%%%%%%%%%% OCMIP STYLE for other phyto (not diatom or prochl)
485     if (np.eq.2.or.np.eq.3.or.np.eq.8) then
486     C ECCO-Darwin JAMES paper value
487     R_PICPOC(np) = 0.0419 _d 0
488     cBX GF optizm run ag4 R_PICPOC(np) = 0.133 _d 0
489     endif
490     c set N:P and iron requirement according to diazotroph status
491     if(diazotroph(np) .eq. 1.0 _d 0)then
492     R_NP(np) = val_R_NP_diaz
493     R_FeP(np) = val_RFeP_diaz
494     else
495     R_NP(np) = val_R_NP
496     R_FeP(np) = val_RFeP
497     end if
498     c set C:P ratio
499     R_PC(np) = val_R_PC
500     c set sinking rates according to allometry
501     if(physize(np) .eq. 1.0 _d 0)then
502     wsink(np) = BigSink
503     else
504     wsink(np) = SmallSink
505     end if
506     c half-saturation coeffs
507    
508     RandNo = darwin_random(myThid)
509     if(physize(np) .eq. 1.0 _d 0)then
510     ksatPO4(np) = BigPsat + RandNo*BigPsatrange
511     else
512     c ksatPO4(np) = SmallPsat + RandNo*SmallPsatrange
513     c if (nsource(np).lt.3) then
514     c ksatPO4(np) = ksatPO4(np)*prochlPsat
515     c endif
516     if (nsource(np).eq.3) then
517     ksatPO4(np) = SmallPsat + RandNo*SmallPsatrange
518     endif
519     if (nsource(np).eq..0) then
520     c ksatPO4(np) = SmallPsat + RandNo*SmallPsatrange
521     ksatPO4(np) = UniDzPsat + RandNo*UniDzPsatrange
522     endif
523     if (nsource(np).eq.2.or.nsource(np).eq.1) then
524     ksatPO4(np) = ProcPsat + RandNo*ProcPsatrange
525     endif
526     endif
527     #ifdef TWO_SPECIES_SETUP
528     if(physize(np) .eq. 1.0 _d 0)then
529     ksatPO4(np) = BigPsat
530     else
531     ksatPO4(np) = SmallPsat
532     endif
533     #endif
534     #ifdef NINE_SPECIES_SETUP
535     if(physize(np) .eq. 1.0 _d 0)then
536     ksatPO4(np) = BigPsat
537     else
538     ksatPO4(np) = SmallPsat
539     endif
540     if (nsource(np).eq.2.or.nsource(np).eq.1) then
541     ksatPO4(np) = ProcPsat
542     endif
543     if (diacoc(np) .eq. 2.0 _d 0) then
544     ksatPO4(np) = ksatPO4(np)/1.2 _d 0
545     endif
546     #endif
547    
548     ksatNO3(np) = ksatPO4(np)*R_NP(np)
549     ksatNO2(np) = ksatNO3(np)*ksatNO2fac
550     c Made ksatNH4 smaller since it is the preferred source
551     ksatNH4(np) = ksatNO3(np)*ksatNH4fac
552     ksatFeT(np) = ksatPO4(np)*R_FeP(np)
553     ksatSi(np) = val_ksatsi
554    
555     #ifndef GEIDER
556     cNEW Light parameters:
557     c ksatPAR {0.1 - 1.3}
558     c 0.35=Av High Light Adapted, 0.8=Av Low Light Adapted
559     c kinhib {0.0 - 3.0}
560     c 0.5 =Av High Light Adapted, 2.0=Av Low Light Adapted
561     c High Light Groups for Large size:
562     if(physize(np) .eq. 1.0 _d 0)then
563     RandNo = darwin_random_normal(myThid)
564     ksatPAR(np) = abs(Bigksatpar+Bigksatparstd*RandNo)
565    
566     RandNo = darwin_random_normal(myThid)
567     kinhib(np) = abs(Bigkinhib+Bigkinhibstd*RandNo)
568     else
569     c QQ remove someday
570     RandNo = darwin_random(myThid)
571     c Low Light Groups for Small size:
572     RandNo = darwin_random_normal(myThid)
573     ksatPAR(np) = abs(smallksatpar+smallksatparstd*RandNo)
574    
575     RandNo = darwin_random_normal(myThid)
576     kinhib(np) = abs(smallkinhib+smallkinhibstd*RandNo)
577     endif
578     #ifdef TWO_SPECIES_SETUP
579     if(physize(np) .eq. 1.0 _d 0)then
580     ksatPAR(np) = abs(Bigksatpar)
581     kinhib(np) = abs(Bigkinhib)
582     else
583     ksatPAR(np) = abs(smallksatpar)
584     kinhib(np) = abs(smallkinhib)
585     endif
586     #endif
587     #ifdef NINE_SPECIES_SETUP
588     if(physize(np) .eq. 1.0 _d 0)then
589     ksatPAR(np) = abs(Bigksatpar)
590     kinhib(np) = abs(Bigkinhib)
591     else
592     ksatPAR(np) = abs(smallksatpar)
593     kinhib(np) = abs(smallkinhib)
594     endif
595     if (np.eq.5) then
596     kinhib(np) = 6.0 _d 0
597     endif
598     if (np.eq.9) then
599     kinhib(np) = 0.5 _d 0
600     endif
601     #endif
602     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
603     & 'generate Phyto: np = ',np,' ksatPAR =', ksatPAR(np)
604     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
605     & SQUEEZE_RIGHT , mythid)
606     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
607     & 'generate Phyto: np = ',np,' kinhib =', kinhib(np)
608     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
609     & SQUEEZE_RIGHT , mythid)
610     #endif
611    
612     #ifdef GEIDER
613     RandNo = darwin_random(myThid)
614     c big/small phyto growth rates..
615     if(physize(np) .eq. 1.0 _d 0)then
616     growthdays = Biggrow +Randno*Biggrowrange
617     else
618     growthdays = Smallgrow +RandNo*Smallgrowrange
619     end if
620     c but diazotrophs always slower due to energetics
621     if(diazotroph(np) .eq. 1.0 _d 0) then
622     growthdays = growthdays * diaz_growfac
623     endif
624     c cocco have slower growth than diatom
625     if (diacoc(np).eq.2. _d 0) then
626     growthdays= growthdays * 1.3 _d 0
627     endif
628     #ifdef TWO_SPECIES_SETUP
629     if(physize(np) .eq. 1.0 _d 0)then
630     growthdays = Biggrow
631     else
632     growthdays = Smallgrow
633     end if
634     #endif
635     #ifdef NINE_SPECIES_SETUP
636     if(physize(np) .eq. 1.0 _d 0)then
637     growthdays = Biggrow
638     else
639     growthdays = Smallgrow
640     end if
641     c but diazotrophs always slower due to energetics
642     if(diazotroph(np) .eq. 1.0 _d 0) then
643     growthdays = growthdays * diaz_growfac
644     endif
645     c cocco have slower growth than other large
646     if (diacoc(np).eq.2. _d 0) then
647     growthdays= growthdays * 1.3 _d 0
648     endif
649     c diatom has faster thatn other large
650     if (diacoc(np).eq.1. _d 0) then
651     growthdays= growthdays * 1.0 _d 0 ! 0.95 _d 0
652     endif
653     #endif
654     c now convert to a growth rate
655     if (growthdays.gt.0. _d 0) then
656     pcmax(np) = 1.0 _d 0/(growthdays*pday)
657     else
658     pcmax(np) = 0. _d 0
659     endif
660     c
661     c photo-inhibition
662     #ifdef WAVEBANDS
663     c only LL Pro are inhibited
664     if (ap_type(np).eq.4) then
665     inhibcoef_geid(np) = inhibcoef_geid_val
666     else
667     inhibcoef_geid(np) = 0. _d 0
668     endif
669     #else
670     c no inhibition
671     if(physize(np) .eq. 1.0 _d 0)then
672     inhibcoef_geid(np) = 0. _d 0
673     else
674     inhibcoef_geid(np) = 0. _d 0 !inhibcoef_geid_val
675     endif
676     #endif
677     c
678     RandNo = darwin_random(myThid)
679    
680     c big/small phyto PI slope (chl specific)
681     c if(physize(np) .eq. 1.0 _d 0)then
682     c alphachl(np) = Bigalphachl +Randno*Bigalphachlrange
683     c else
684     c alphachl(np) = Smallalphachl +RandNo*Smallalphachlrange
685     c end if
686    
687     c ANNA gieder via mQyield instead of alpha
688     c big/small phyto Maximum Quantum Yield
689     if(physize(np) .eq. 1.0 _d 0)then
690     mQyield(np) = BigmQyield +Randno*BigmQyieldrange
691     else
692     mQyield(np) = SmallmQyield +RandNo*SmallmQyieldrange
693     end if
694     #ifdef TWO_SPECIES_SETUP
695     if(physize(np) .eq. 1.0 _d 0)then
696     mQyield(np) = BigmQyield
697     else
698     mQyield(np) = SmallmQyield
699     end if
700     #endif
701     #ifdef NINE_SPECIES_SETUP
702     if(physize(np) .eq. 1.0 _d 0)then
703     mQyield(np) = BigmQyield
704     else
705     mQyield(np) = SmallmQyield
706     end if
707     #endif
708     #ifdef WAVEBANDS
709     c ANNA for wavebands only, re-set mQyield to be constant for all np's
710     c ANNA i.e. let alpha vary only with aphy_chl_ps
711     c ANNA value is mean of vals for big and small.
712     mQyield(np) = 4.0 _d -5
713     #endif
714    
715     RandNo = darwin_random(myThid)
716     c big/small phyto C:Chl max
717     if(physize(np) .eq. 1.0 _d 0)then
718     chl2cmax(np) = Bigchl2cmax +Randno*Bigchl2cmaxrange
719     else
720     chl2cmax(np) = Smallchl2cmax +RandNo*Smallchl2cmaxrange
721     end if
722     #ifdef TWO_SPECIES_SETUP
723     if(physize(np) .eq. 1.0 _d 0)then
724     chl2cmax(np) = Bigchl2cmax
725     else
726     chl2cmax(np) = Smallchl2cmax
727     end if
728     #endif
729     #ifdef NINE_SPECIES_SETUP
730     if(physize(np) .eq. 1.0 _d 0)then
731     chl2cmax(np) = Bigchl2cmax
732     else
733     chl2cmax(np) = Smallchl2cmax
734     end if
735     #endif
736     c ANNA chl2cmin added
737     c chl2cmin(np) = 0.003 _d 0 * 12. _d 0 ! mg Chl a/mmol C
738    
739     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
740     & 'generate Phyto: np = ',np,' pcmax =', pcmax(np)
741     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
742     & SQUEEZE_RIGHT , mythid)
743     c write(msgBuf,'(A,I4,A,1P1G24.15E3)')
744     c & 'generate Phyto: np = ',np,' alphachl =', alphachl(np)
745     c ANNA CHANGED TO MQYIELD from ALPHACHL
746     c ANNA STEPH msgBuf changed for mQyield?
747     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
748     & 'generate Phyto: np = ',np,' mQyield =', mQyield(np)
749     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
750     & SQUEEZE_RIGHT , mythid)
751     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
752     & 'generate Phyto: np = ',np,' chl2cmax =', chl2cmax(np)
753     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
754     & SQUEEZE_RIGHT , mythid)
755     #endif
756    
757     #ifdef DAR_DIAG_CHL
758     if(physize(np) .eq. 1.0 _d 0)then
759     Geider_alphachl(np) = Geider_Bigalphachl
760     Geider_chl2cmax(np) = Geider_Bigchl2cmax
761     Geider_chl2cmin(np) = Geider_Bigchl2cmin
762     else
763     Geider_alphachl(np) = Geider_smallalphachl
764     Geider_chl2cmax(np) = Geider_smallchl2cmax
765     Geider_chl2cmin(np) = Geider_smallchl2cmin
766     end if
767    
768     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
769     & 'generate Phyto: np = ',np,' Geider_alphachl =',
770     & Geider_alphachl(np)
771     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
772     & SQUEEZE_RIGHT , mythid)
773     write(msgBuf,'(A,I4,A,1P1G24.15E3)')
774     & 'generate Phyto: np = ',np,' Geider_chl2cmax =',
775     & Geider_chl2cmax(np)
776     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
777     & SQUEEZE_RIGHT , mythid)
778     #endif
779    
780     RETURN
781     END
782     #endif /*DARWIN*/
783     #endif /*ALLOW_PTRACERS*/
784    
785     c ===========================================================

  ViewVC Help
Powered by ViewVC 1.1.22