1 | SUBROUTINE SW_venus_dc( PRMU0, PFRAC, |
---|
2 | S PPB, pt, |
---|
3 | S PHEAT, |
---|
4 | S PTOPSW,PSOLSW,ZFSNET) |
---|
5 | |
---|
6 | use dimphy |
---|
7 | IMPLICIT none |
---|
8 | |
---|
9 | #include "dimensions.h" |
---|
10 | #include "YOMCST.h" |
---|
11 | C |
---|
12 | C ------------------------------------------------------------------ |
---|
13 | C |
---|
14 | C PURPOSE. |
---|
15 | C -------- |
---|
16 | C |
---|
17 | c this routine loads and interpolates the shortwave radiation |
---|
18 | c fluxes taken from Dave Crisp calculations for Venus. |
---|
19 | c Ref: Crisp 1986. |
---|
20 | C |
---|
21 | C AUTHOR. |
---|
22 | C ------- |
---|
23 | C Sebastien Lebonnois |
---|
24 | C |
---|
25 | C MODIFICATIONS. |
---|
26 | C -------------- |
---|
27 | C ORIGINAL : 27/07/2005 |
---|
28 | C ------------------------------------------------------------------ |
---|
29 | C |
---|
30 | C* ARGUMENTS: |
---|
31 | C |
---|
32 | c inputs |
---|
33 | |
---|
34 | REAL PRMU0 ! COSINE OF ZENITHAL ANGLE |
---|
35 | REAL PFRAC ! fraction de la journee |
---|
36 | REAL PPB(klev+1) ! inter-couches PRESSURE (bar) |
---|
37 | REAL pt(klev) ! mid-layer temperature |
---|
38 | C |
---|
39 | c output |
---|
40 | |
---|
41 | REAL PHEAT(klev) ! SHORTWAVE HEATING (K/VENUSDAY) within each layer |
---|
42 | REAL PTOPSW ! SHORTWAVE FLUX AT T.O.A. (net) |
---|
43 | REAL PSOLSW ! SHORTWAVE FLUX AT SURFACE (net) |
---|
44 | REAL ZFSNET(klev+1) ! net solar flux at ppb levels |
---|
45 | |
---|
46 | C |
---|
47 | C* LOCAL VARIABLES: |
---|
48 | C |
---|
49 | integer nldc,nszadc |
---|
50 | real dureejour |
---|
51 | parameter (nldc=49) ! fichiers Crisp |
---|
52 | parameter (nszadc=8) ! fichiers Crisp |
---|
53 | parameter (dureejour=10.087e6) |
---|
54 | |
---|
55 | integer i,j,nsza,nsza0,nl0 |
---|
56 | real solarrate ! solar heating rate (K/earthday) |
---|
57 | real zsnet(nldc+1,nszadc) ! net solar flux (W/m**2) (+ vers bas) |
---|
58 | real zsdn,zsup ! downward/upward solar flux (W/m**2) |
---|
59 | real solza(nszadc) ! solar zenith angles in table |
---|
60 | real presdc(nldc+1) ! pressure levels in table (bar) |
---|
61 | real tempdc(nldc+1) ! temperature in table (K) |
---|
62 | real altdc(nldc+1) ! altitude in table (km) |
---|
63 | real coolrate ! IR heating rate (K/earthday) ? |
---|
64 | real totalrate ! total rate (K/earthday) |
---|
65 | real zldn ! downward IR flux (W/m**2) ? |
---|
66 | real zlup ! upward IR flux (W/m**2) ? |
---|
67 | real zsolnet(nldc) ! for testing mean net solar flux in DC |
---|
68 | character*22 nullchar |
---|
69 | real sza0,factsza,factflux |
---|
70 | logical firstcall |
---|
71 | data firstcall/.true./ |
---|
72 | REAL,save,allocatable :: zsolVE(:) ! net solar flux at ppb levels, fichiers VE |
---|
73 | save solza,zsnet,presdc,tempdc,altdc |
---|
74 | save firstcall |
---|
75 | |
---|
76 | c ------------------------ |
---|
77 | c Loading the file |
---|
78 | c ------------------------ |
---|
79 | |
---|
80 | if (firstcall) then |
---|
81 | allocate(zsolVE(klevp1)) |
---|
82 | |
---|
83 | open(11,file='dataDCrisp.dat') |
---|
84 | read(11,*) nullchar |
---|
85 | |
---|
86 | do nsza=1,nszadc |
---|
87 | read(11,*) nullchar |
---|
88 | read(11,*) nullchar |
---|
89 | read(11,*) nullchar |
---|
90 | read(11,'(22x,F11.5)') solza(nsza) |
---|
91 | read(11,*) nullchar |
---|
92 | read(11,*) nullchar |
---|
93 | read(11,*) nullchar |
---|
94 | read(11,'(3(2x,F10.4),36x,4(2x,F11.5))') |
---|
95 | . presdc(nldc+1),tempdc(nldc+1), altdc(nldc+1), |
---|
96 | . zsdn,zsup,zldn,zlup |
---|
97 | zsnet(nldc+1,nsza)=zsdn-zsup |
---|
98 | do i=1,nldc |
---|
99 | j = nldc+1-i ! changing: vectors from surface to top |
---|
100 | read(11,'(6(2x,F10.4),4(2x,F11.5))') |
---|
101 | . presdc(j),tempdc(j),altdc(j), |
---|
102 | . solarrate,coolrate,totalrate, |
---|
103 | . zsdn,zsup,zldn,zlup |
---|
104 | zsnet(j,nsza)=zsdn-zsup |
---|
105 | enddo |
---|
106 | enddo |
---|
107 | |
---|
108 | close(11) |
---|
109 | |
---|
110 | c ----------- TEST ------------ |
---|
111 | c Fichiers de Vincent |
---|
112 | c ----------------------------- |
---|
113 | c open(12,file='flux_vis_dcGCM.txt') |
---|
114 | c read(12,*) nullchar |
---|
115 | c |
---|
116 | c do j=1,klev+1 |
---|
117 | c read(12,*) zlup,zldn,zsolVE(j) |
---|
118 | c enddo |
---|
119 | c |
---|
120 | c close(12) |
---|
121 | c ----------------------------- |
---|
122 | c -------- FIN TEST ---------- |
---|
123 | |
---|
124 | firstcall=.false. |
---|
125 | endif |
---|
126 | |
---|
127 | c ----------- TEST ------------ |
---|
128 | c Moyenne planetaire |
---|
129 | c ----------------------------- |
---|
130 | c do j=1,nldc |
---|
131 | c --- |
---|
132 | c zsolnet(j) = zsnet(j,1)*0.5* |
---|
133 | c . sin(solza(1)*RPI/180.)*solza(2)*RPI/180./2. |
---|
134 | c do nsza=2,nszadc-1 |
---|
135 | c zsolnet(j) = zsolnet(j)+zsnet(j,nsza)*0.5* |
---|
136 | c . sin(solza(nsza)*RPI/180.)* |
---|
137 | c . (solza(nsza+1)-solza(nsza-1))*RPI/180./2. |
---|
138 | c enddo |
---|
139 | c zsolnet(j) = zsolnet(j)+zsdn(j,nszadc)*0.5* |
---|
140 | c . sin(solza(nszadc)*RPI/180.)* |
---|
141 | c . (90.-solza(nszadc-1))*RPI/180./2. |
---|
142 | c --- |
---|
143 | c zsolnet(j) = 0.0 |
---|
144 | c do nsza=1,nszadc-1 |
---|
145 | c zsolnet(j) = zsolnet(j)+(zsnet(j,nsza ) |
---|
146 | c . +zsnet(j,nsza+1))*0.5* |
---|
147 | c . (cos(solza(nsza )*RPI/180.)- |
---|
148 | c . cos(solza(nsza+1)*RPI/180.) ) |
---|
149 | c enddo |
---|
150 | c zsolnet(j) = zsolnet(j)+zsnet(j,nszadc)*0.25* |
---|
151 | c . cos(solza(nszadc)*RPI/180.) |
---|
152 | c --- |
---|
153 | c print*,j,altdc(j),zsolnet(j) |
---|
154 | c enddo |
---|
155 | c stop |
---|
156 | c ----------------------------- |
---|
157 | c -------- FIN TEST ---------- |
---|
158 | |
---|
159 | c -------------------------------------- |
---|
160 | c Interpolation in the GCM vertical grid |
---|
161 | c -------------------------------------- |
---|
162 | |
---|
163 | c Zenith angle |
---|
164 | c ------------ |
---|
165 | |
---|
166 | sza0 = acos(PRMU0)/3.1416*180. |
---|
167 | c print*,'Angle Zenithal =',sza0,' PFRAC=',PFRAC |
---|
168 | |
---|
169 | do nsza=1,nszadc |
---|
170 | if (solza(nsza).le.sza0) then |
---|
171 | nsza0 = nsza+1 |
---|
172 | endif |
---|
173 | enddo |
---|
174 | |
---|
175 | if (nsza0.ne.nszadc+1) then |
---|
176 | factsza = (sza0-solza(nsza0-1))/(solza(nsza0)-solza(nsza0-1)) |
---|
177 | else |
---|
178 | factsza = min((sza0-solza(nszadc))/(90.-solza(nszadc)), 1.) |
---|
179 | endif |
---|
180 | |
---|
181 | c Pressure levels |
---|
182 | c --------------- |
---|
183 | |
---|
184 | do j=1,klev+1 |
---|
185 | nl0 = 2 |
---|
186 | do i=1,nldc |
---|
187 | if (presdc(i).ge.PPB(j)) then |
---|
188 | nl0 = i+1 |
---|
189 | endif |
---|
190 | enddo |
---|
191 | |
---|
192 | factflux = (log10(max(PPB(j),presdc(nldc+1))) |
---|
193 | . -log10(presdc(nl0-1))) |
---|
194 | . /(log10(presdc(nl0))-log10(presdc(nl0-1))) |
---|
195 | c factflux = (max(PPB(j),presdc(nldc+1))-presdc(nl0-1)) |
---|
196 | c . /(presdc(nl0)-presdc(nl0-1)) |
---|
197 | if (nsza0.ne.nszadc+1) then |
---|
198 | ZFSNET(j) = factflux * factsza *zsnet(nl0,nsza0) |
---|
199 | . + factflux *(1.-factsza)*zsnet(nl0,nsza0-1) |
---|
200 | . + (1.-factflux)* factsza *zsnet(nl0-1,nsza0) |
---|
201 | . + (1.-factflux)*(1.-factsza)*zsnet(nl0-1,nsza0-1) |
---|
202 | else |
---|
203 | ZFSNET(j) = factflux *(1.-factsza)*zsnet(nl0,nsza0-1) |
---|
204 | . + (1.-factflux)*(1.-factsza)*zsnet(nl0-1,nsza0-1) |
---|
205 | endif |
---|
206 | |
---|
207 | ZFSNET(j) = ZFSNET(j)*PFRAC |
---|
208 | |
---|
209 | enddo |
---|
210 | |
---|
211 | c ----------- TEST ------------ |
---|
212 | c Fichiers de Vincent |
---|
213 | c ----------------------------- |
---|
214 | c do j=1,klev+1 |
---|
215 | c ZFSNET(j)=zsolVE(j) |
---|
216 | c enddo |
---|
217 | c ----------------------------- |
---|
218 | c -------- FIN TEST ---------- |
---|
219 | |
---|
220 | PTOPSW = ZFSNET(klev+1) |
---|
221 | PSOLSW = ZFSNET(1) |
---|
222 | |
---|
223 | c Heating rates |
---|
224 | c ------------- |
---|
225 | c On utilise le gradient du flux pour calculer le taux de chauffage: |
---|
226 | c heat(K/s) = d(fluxnet) (W/m2) |
---|
227 | c *g (m/s2) |
---|
228 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
---|
229 | c /cp (J/kg/K) |
---|
230 | |
---|
231 | do j=1,klev |
---|
232 | ! ADAPTATION GCM POUR CP(T) |
---|
233 | PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j)) |
---|
234 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
---|
235 | PHEAT(j) = PHEAT(j)*dureejour ! K/venus_day |
---|
236 | enddo |
---|
237 | |
---|
238 | return |
---|
239 | end |
---|
240 | |
---|