1 |
stephd |
1.2 |
C $Header: /u/gcmpack/MITgcm_contrib/darwin2/pkg/monod/monod_acdom.F,v 1.1 2011/04/13 18:56:25 jahn Exp $ |
2 |
|
|
C $Name: $ |
3 |
jahn |
1.1 |
|
4 |
|
|
#include "DARWIN_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: RTWB_ACDOM |
8 |
|
|
|
9 |
|
|
c ANNA pass extra variables if WAVEBANDS |
10 |
|
|
C !INTERFACE: ========================================================== |
11 |
|
|
SUBROUTINE MONOD_ACDOM( |
12 |
stephd |
1.2 |
#ifdef ALLOW_CDOM |
13 |
|
|
I cdomlocal, |
14 |
|
|
#else |
15 |
jahn |
1.1 |
I P_chl, aclocal, awlocal, |
16 |
stephd |
1.2 |
#endif |
17 |
jahn |
1.1 |
O acdomlocal, |
18 |
|
|
I myThid ) |
19 |
|
|
|
20 |
|
|
C !DESCRIPTION: |
21 |
|
|
C computes CDOM from Chlorophyll |
22 |
|
|
C |
23 |
|
|
c ANNA I have changed this a bit from WG code |
24 |
|
|
c ------------- this is WG code: |
25 |
|
|
c do k = 1,km |
26 |
|
|
c actot450 = 0.0 |
27 |
|
|
c atot450 = 0.0 |
28 |
|
|
c do n = 1,nchl |
29 |
|
|
c actot450 = actot450 + P(k,n)*ac(n,nl450) |
30 |
|
|
c enddo |
31 |
|
|
c atot450 = aw(nl450) + actot450 |
32 |
|
|
c do nl = 1,nlt |
33 |
|
|
c acdom(k,nl) = 0.2*atot450*excdom(nl) |
34 |
|
|
c enddo |
35 |
|
|
c enddo |
36 |
|
|
c do nl = 1,nlt |
37 |
|
|
c write(6,*)'nl,lam,aw,ac,acdom = ',nl,lam(nl), |
38 |
|
|
c *aw(nl),ac(1,nl),acdom(1,nl) |
39 |
|
|
c enddo |
40 |
|
|
c this implies P biomass is being scaled by the absorption of phytoplankton |
41 |
|
|
c at 450nm. ie. the waveband on the main chl-a peak. |
42 |
|
|
c so (i think) this is effectively getting the absorption by the phytoplankton |
43 |
|
|
c In our version, since we have phyto chl we need to scale the |
44 |
|
|
c chlorophyll normalised absorption spectra (the inputs) |
45 |
|
|
c by phyt chl rather than phyto biomass |
46 |
|
|
|
47 |
|
|
C !USES: =============================================================== |
48 |
|
|
IMPLICIT NONE |
49 |
|
|
C === Global variables === |
50 |
|
|
#include "SIZE.h" |
51 |
|
|
#include "EEPARAMS.h" |
52 |
|
|
#include "PARAMS.h" |
53 |
|
|
#include "MONOD_SIZE.h" |
54 |
stephd |
1.2 |
#include "MONOD.h" |
55 |
jahn |
1.1 |
#include "SPECTRAL_SIZE.h" |
56 |
|
|
#ifdef WAVEBANDS |
57 |
|
|
#include "WAVEBANDS_PARAMS.h" |
58 |
|
|
#endif |
59 |
|
|
|
60 |
|
|
C !INPUT PARAMETERS: =================================================== |
61 |
|
|
C P_chl :: Chlorophyll per species and level |
62 |
|
|
c ac :: absorption spectra for each phtyo (chl normalised) |
63 |
|
|
c awlocal :: absoprtion spectra for water (m-1) |
64 |
|
|
C myTime :: Current time in simulation |
65 |
|
|
C myIter :: Current iteration number in simulation |
66 |
|
|
C myThid :: My Thread Id number |
67 |
|
|
|
68 |
|
|
C !OUTPUT PARAMETERS: ================================================== |
69 |
|
|
C acdom :: absortpion spectra for CDOM per level |
70 |
|
|
|
71 |
stephd |
1.2 |
#ifdef ALLOW_CDOM |
72 |
|
|
_RL cdomlocal(NR) |
73 |
|
|
#else |
74 |
jahn |
1.1 |
_RL P_chl(npmax,Nr) |
75 |
|
|
_RL aclocal(npmax,tlam) |
76 |
|
|
_RL awlocal(tlam) |
77 |
stephd |
1.2 |
#endif |
78 |
jahn |
1.1 |
_RL acdomlocal(Nr,tlam) |
79 |
|
|
C _RL myTime |
80 |
|
|
C INTEGER myIter |
81 |
|
|
INTEGER myThid |
82 |
|
|
CEOP |
83 |
|
|
|
84 |
|
|
#ifdef WAVEBANDS |
85 |
|
|
#ifdef DAR_CALC_ACDOM |
86 |
|
|
|
87 |
|
|
C !LOCAL VARIABLES: |
88 |
|
|
C == Local variables == |
89 |
|
|
INTEGER k, np, ilam |
90 |
|
|
_RL actot450, atot450 |
91 |
|
|
c params in common block |
92 |
|
|
c nl450, excdom, |
93 |
|
|
|
94 |
stephd |
1.2 |
#ifdef ALLOW_CDOM |
95 |
|
|
c use cdom-like tracer |
96 |
|
|
do k = 1,Nr |
97 |
|
|
do ilam = 1,tlam |
98 |
|
|
acdomlocal(k,ilam) = cdomcoeff*cdomlocal(k)*excdom(ilam) |
99 |
|
|
enddo |
100 |
|
|
enddo |
101 |
|
|
#else |
102 |
jahn |
1.1 |
c ANNA moved cdom calculation from WG's light.f |
103 |
|
|
c it's done for RADTRANS and WAVEBANDS_3D |
104 |
|
|
do k = 1,Nr |
105 |
|
|
actot450 = 0.0 _d 0 |
106 |
|
|
atot450 = 0.0 _d 0 |
107 |
|
|
do np = 1,npmax |
108 |
|
|
actot450 = actot450 + P_chl(np,k)*aclocal(np,nl450) !nb. n,k swapped from WG |
109 |
|
|
enddo |
110 |
|
|
atot450 = awlocal(nl450) + actot450 |
111 |
|
|
do ilam = 1,tlam |
112 |
|
|
acdomlocal(k,ilam) = 0.2 _d 0 * atot450*excdom(ilam) |
113 |
|
|
enddo |
114 |
|
|
enddo |
115 |
|
|
c do nl = 1,tlam |
116 |
|
|
c write(6,*)'nl,lam,aw,ac,acdom = ',nl,lam(nl), |
117 |
|
|
c *aw(nl),ac(1,nl),acdom(1,nl) |
118 |
|
|
c enddo |
119 |
|
|
c ANNA cdom end |
120 |
stephd |
1.2 |
#endif |
121 |
jahn |
1.1 |
|
122 |
|
|
#endif /* DAR_CALC_ACDOM */ |
123 |
|
|
#endif /* WAVEBANDS */ |
124 |
|
|
|
125 |
|
|
RETURN |
126 |
|
|
END |
127 |
|
|
|