1 |
C $Header$ |
2 |
C $Name$ |
3 |
|
4 |
#include "DARWIN_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: MONOD_RADTRANS |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
subroutine MONOD_RADTRANS( |
11 |
I H,rmud,Ed,Es,a_k,bt_k,bb_k, |
12 |
O Edz,Esz,Euz,Eutop, |
13 |
O tirrq,tirrwq, |
14 |
I myThid) |
15 |
|
16 |
C !DESCRIPTION: |
17 |
c MODIFIED VERSION OF WG's edeu.F |
18 |
c |
19 |
c |
20 |
c Model of irradiance in the water column. Accounts for three |
21 |
c irradiance streams: |
22 |
c |
23 |
c Edz = direct downwelling irradiance in W/m2 per waveband |
24 |
c Esz = diffuse downwelling irradiance in W/m2 per waveband |
25 |
c Euz = diffuse upwelling irradiance in W/m2 per waveband |
26 |
c |
27 |
c Propagation is done in energy units, tests are done in quanta, |
28 |
c final is quanta for phytoplankton growth. |
29 |
c |
30 |
C !USES: =============================================================== |
31 |
IMPLICIT NONE |
32 |
#include "SIZE.h" /* Nr */ |
33 |
C#include "EEPARAMS.h" |
34 |
#include "MONOD_SIZE.h" |
35 |
#include "SPECTRAL_SIZE.h" /* tlam */ |
36 |
#include "SPECTRAL.h" /* WtouEin */ |
37 |
#include "WAVEBANDS_PARAMS.h" /* darwin_PAR_ilamLo/Hi |
38 |
darwin_radmodThresh |
39 |
darwin_Dmax darwin_rmus darwin_rmuu */ |
40 |
|
41 |
C !INPUT PARAMETERS: =================================================== |
42 |
C H :: layer thickness (should include hFacC!) |
43 |
C rmud :: inv.cosine of direct (underwater solar) zenith angle |
44 |
C Ed :: direct downwelling irradiance below surface per waveband |
45 |
C Es :: diffuse downwelling irradiance below surface per waveband |
46 |
C a_k :: absorption coefficient per level and waveband (1/m) |
47 |
C bt_k :: total scattering coefficient per level and waveband (1/m) |
48 |
C = forward + back scattering coefficient |
49 |
C bb_k :: backscattering coefficient per level and waveband (1/m) |
50 |
_RL H(Nr) |
51 |
_RL rmud |
52 |
_RL Ed(tlam), Es(tlam) |
53 |
_RL a_k(Nr,tlam), bt_k(Nr,tlam), bb_k(Nr,tlam) |
54 |
INTEGER myThid |
55 |
|
56 |
C !OUTPUT PARAMETERS: ================================================== |
57 |
C Edz :: direct downwelling irradiance at bottom of layer |
58 |
C Esz :: diffuse downwelling irradiance at bottom of layer |
59 |
C Euz :: diffuse upwelling irradiance at bottom of layer |
60 |
C tirrq :: total scalar irradiance at cell center (uEin/m2/s) |
61 |
C tirrwq :: total scalar irradiance at cell center per waveband |
62 |
_RL Edz(tlam,Nr),Esz(tlam,Nr),Euz(tlam,Nr),Eutop(tlam,Nr) |
63 |
_RL tirrq(Nr) |
64 |
_RL tirrwq(tlam,Nr) |
65 |
|
66 |
#ifdef DAR_RADTRANS |
67 |
|
68 |
C !LOCAL VARIABLES: ==================================================== |
69 |
INTEGER k, np, nl |
70 |
C _RL Etop, Ebot |
71 |
_RL Etopq,Ebotq |
72 |
_RL Etopwq(tlam), Ebotwq(tlam) |
73 |
_RL zd,zirrq |
74 |
C _RL zirr |
75 |
C _RL Etopql,Ebotql,Emidql |
76 |
_RL Emidq,Emidwq |
77 |
_RL Edtop(tlam),Estop(tlam) |
78 |
CEOP |
79 |
|
80 |
C Ebot = 0.0 |
81 |
do nl = 1,tlam |
82 |
C initialize state variables |
83 |
Edtop(nl) = Ed(nl) |
84 |
Estop(nl) = Es(nl) |
85 |
C Ebot = Ebot + (Ed(nl)+Es(nl)) |
86 |
enddo |
87 |
c Convert to quanta: divide by Avos # to get moles quanta; then mult by |
88 |
c 1E6 to get uM or uEin |
89 |
do nl = 1,tlam |
90 |
C don't include upwelling at surface |
91 |
Ebotwq(nl) = (Edtop(nl)+Estop(nl))*WtouEins(nl) |
92 |
enddo |
93 |
C sum PAR range |
94 |
Ebotq = 0.0 |
95 |
do nl = darwin_PAR_ilamLo,darwin_PAR_ilamHi |
96 |
Ebotq = Ebotq + Ebotwq(nl) |
97 |
enddo |
98 |
do k = 1,Nr |
99 |
C Etop = Ebot |
100 |
Etopq = Ebotq |
101 |
zd = min(darwin_Dmax,H(k)) |
102 |
C zirr = 0.0 |
103 |
do nl = 1,tlam |
104 |
Edz(nl,k) = 0.0 |
105 |
Esz(nl,k) = 0.0 |
106 |
Euz(nl,k) = 0.0 |
107 |
Eutop(nl,k) = 0.0 |
108 |
if (Edtop(nl) .ge. darwin_radmodThresh .or. |
109 |
& Estop(nl) .ge. darwin_radmodThresh) then |
110 |
c print*,'pre',zd,Edtop(nl),Estop(nl), |
111 |
c & rmud,rmus,rmuu,a,bt,bb,Dmax |
112 |
#ifdef DAR_RADTRANS_DECREASING |
113 |
C truncation to decreasing modes a la Aas |
114 |
call radtrans_radmod_decr( |
115 |
I zd,Edtop(nl),Estop(nl), |
116 |
I rmud,darwin_rmus,darwin_rmuu, |
117 |
I a_k(k,nl),bt_k(k,nl),bb_k(k,nl),darwin_Dmax, |
118 |
O Edz(nl,k),Esz(nl,k),Euz(nl,k),Eutop(nl,k)) |
119 |
#else |
120 |
C Watson Gregg's original |
121 |
call radtrans_radmod( |
122 |
I zd,Edtop(nl),Estop(nl), |
123 |
I rmud,darwin_rmus,darwin_rmuu, |
124 |
I a_k(k,nl),bt_k(k,nl),bb_k(k,nl),darwin_Dmax, |
125 |
O Edz(nl,k),Esz(nl,k),Euz(nl,k),Eutop(nl,k)) |
126 |
#endif |
127 |
c print*,'radmod',Edz(nl,k),Esz(nl,k),Euz(nl,k) |
128 |
endif |
129 |
C cycle |
130 |
Edtop(nl) = Edz(nl,k) |
131 |
Estop(nl) = Esz(nl,k) |
132 |
C zirr = zirr + (Edz(nl,k)+Esz(nl,k)+Euz(nl,k)) |
133 |
C- enddo nl |
134 |
enddo |
135 |
C Ebot = zirr |
136 |
c ANNA SPEC retrieve and pass spectral irrq |
137 |
do nl = 1,tlam |
138 |
Etopwq(nl) = Ebotwq(nl) |
139 |
C add vertical components, ... |
140 |
Ebotwq(nl)=(Edz(nl,k)+Esz(nl,k)+Euz(nl,k))*WtouEins(nl) |
141 |
C ... interpolate ... |
142 |
Emidwq = sqrt(Etopwq(nl)*Ebotwq(nl)) |
143 |
C ... and convert using rmus !? |
144 |
tirrwq(nl,k) = Emidwq*darwin_rmus |
145 |
enddo |
146 |
C sum PAR range |
147 |
zirrq = 0.0 |
148 |
do nl = darwin_PAR_ilamLo,darwin_PAR_ilamHi |
149 |
zirrq = zirrq + Ebotwq(nl) |
150 |
enddo |
151 |
Ebotq = zirrq |
152 |
C interpolate nonspectral PAR separately !? |
153 |
Emidq = sqrt(Etopq*Ebotq) |
154 |
tirrq(k) = Emidq*darwin_rmus !scalar irradiance |
155 |
C- enddo k |
156 |
enddo |
157 |
c |
158 |
#endif /* DAR_RADTRANS */ |
159 |
|
160 |
return |
161 |
end |
162 |
|