1 | SUBROUTINE SW_venus_dc_1Dglobave(PRMU0, PFRAC, |
---|
2 | S PPB, pt, |
---|
3 | S PHEAT, |
---|
4 | S PTOPSW,PSOLSW,ZFSNET) |
---|
5 | |
---|
6 | use dimphy |
---|
7 | use cpdet_phy_mod, only: cpdet |
---|
8 | IMPLICIT none |
---|
9 | |
---|
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 L.Salmi : june 2013 astuce to reduce the excess of NIR |
---|
29 | c in the transition region LTE/LTE |
---|
30 | c |
---|
31 | c G.Gilli : feb 2014 |
---|
32 | C ------------------------------------------------------------------ |
---|
33 | C |
---|
34 | C* ARGUMENTS: |
---|
35 | C |
---|
36 | c inputs |
---|
37 | |
---|
38 | REAL PRMU0 ! COSINE OF ZENITHAL ANGLE |
---|
39 | REAL PFRAC ! fraction de la journee |
---|
40 | REAL PPB(klev+1) ! inter-couches PRESSURE (bar) |
---|
41 | REAL pt(klev) ! mid-layer temperature |
---|
42 | C |
---|
43 | c output |
---|
44 | |
---|
45 | REAL PHEAT(klev) ! SHORTWAVE HEATING (K/s) within each layer |
---|
46 | REAL PTOPSW ! SHORTWAVE FLUX AT T.O.A. (net) |
---|
47 | REAL PSOLSW ! SHORTWAVE FLUX AT SURFACE (net) |
---|
48 | REAL ZFSNET(klev+1) ! net solar flux at ppb levels |
---|
49 | |
---|
50 | C |
---|
51 | C* LOCAL VARIABLES: |
---|
52 | C |
---|
53 | integer nldc,nszadc |
---|
54 | parameter (nldc=49) ! fichiers Crisp |
---|
55 | parameter (nszadc=8) ! fichiers Crisp |
---|
56 | |
---|
57 | integer i,j,nsza,nsza0,nl0 |
---|
58 | real solarrate ! solar heating rate (K/earthday) |
---|
59 | real zsnet(nldc+1,nszadc) ! net solar flux (W/m**2) (+ vers bas) |
---|
60 | real zsdn,zsup ! downward/upward solar flux (W/m**2) |
---|
61 | real solza(nszadc) ! solar zenith angles in table |
---|
62 | real presdc(nldc+1) ! pressure levels in table (bar) |
---|
63 | real tempdc(nldc+1) ! temperature in table (K) |
---|
64 | real altdc(nldc+1) ! altitude in table (km) |
---|
65 | real coolrate ! IR heating rate (K/earthday) ? |
---|
66 | real totalrate ! total rate (K/earthday) |
---|
67 | real zldn ! downward IR flux (W/m**2) ? |
---|
68 | real zlup ! upward IR flux (W/m**2) ? |
---|
69 | real zsolnet(nldc+1) ! for testing mean net solar flux in DC |
---|
70 | character*22 nullchar |
---|
71 | real deltasza |
---|
72 | real sza0,factflux |
---|
73 | logical firstcall |
---|
74 | data firstcall/.true./ |
---|
75 | save solza,zsnet,presdc,tempdc,altdc,zsolnet |
---|
76 | save firstcall |
---|
77 | |
---|
78 | c ------------------------ |
---|
79 | c Loading the file |
---|
80 | c ------------------------ |
---|
81 | |
---|
82 | if (firstcall) then |
---|
83 | |
---|
84 | open(11,file='dataDCrisp.dat') |
---|
85 | read(11,*) nullchar |
---|
86 | |
---|
87 | do nsza=1,nszadc |
---|
88 | read(11,*) nullchar |
---|
89 | read(11,*) nullchar |
---|
90 | read(11,*) nullchar |
---|
91 | read(11,'(22x,F11.5)') solza(nsza) |
---|
92 | read(11,*) nullchar |
---|
93 | read(11,*) nullchar |
---|
94 | read(11,*) nullchar |
---|
95 | read(11,'(3(2x,F10.4),36x,4(2x,F11.5))') |
---|
96 | . presdc(nldc+1),tempdc(nldc+1), altdc(nldc+1), |
---|
97 | . zsdn,zsup,zldn,zlup |
---|
98 | zsnet(nldc+1,nsza)=zsdn-zsup |
---|
99 | do i=1,nldc |
---|
100 | j = nldc+1-i ! changing: vectors from surface to top |
---|
101 | read(11,'(6(2x,F10.4),4(2x,F11.5))') |
---|
102 | . presdc(j),tempdc(j),altdc(j), |
---|
103 | . solarrate,coolrate,totalrate, |
---|
104 | . zsdn,zsup,zldn,zlup |
---|
105 | zsnet(j,nsza)=zsdn-zsup |
---|
106 | enddo |
---|
107 | enddo |
---|
108 | |
---|
109 | close(11) |
---|
110 | |
---|
111 | c ----------- TEST ------------ |
---|
112 | c Moyenne planetaire |
---|
113 | c ----------------------------- |
---|
114 | |
---|
115 | deltasza=(solza(2)-solza(1))*RPI/180. |
---|
116 | |
---|
117 | do j=1,nldc+1 |
---|
118 | zsolnet(j) = zsnet(j,1)*deltasza*deltasza/16. |
---|
119 | do nsza=2,nszadc |
---|
120 | zsolnet(j) = zsolnet(j)+zsnet(j,nsza)*0.5*deltasza* |
---|
121 | . sin(solza(nsza)*RPI/180.) |
---|
122 | enddo |
---|
123 | c overestimation: |
---|
124 | zsolnet(j) = zsolnet(j)*0.84 |
---|
125 | c print*,j,altdc(j),zsolnet(j) |
---|
126 | enddo |
---|
127 | c stop |
---|
128 | c ----------------------------- |
---|
129 | c -------- FIN TEST ---------- |
---|
130 | |
---|
131 | firstcall=.false. |
---|
132 | endif |
---|
133 | |
---|
134 | c -------------------------------------- |
---|
135 | c Interpolation in the GCM vertical grid |
---|
136 | c -------------------------------------- |
---|
137 | |
---|
138 | c Pressure levels |
---|
139 | c --------------- |
---|
140 | |
---|
141 | do j=1,klev+1 |
---|
142 | nl0 = 2 |
---|
143 | do i=1,nldc |
---|
144 | if (presdc(i).ge.PPB(j)) then |
---|
145 | nl0 = i+1 |
---|
146 | endif |
---|
147 | enddo |
---|
148 | |
---|
149 | factflux = (log10(max(PPB(j),presdc(nldc+1))) |
---|
150 | . -log10(presdc(nl0-1))) |
---|
151 | . /(log10(presdc(nl0))-log10(presdc(nl0-1))) |
---|
152 | ZFSNET(j) = factflux *zsolnet(nl0) |
---|
153 | . + (1.-factflux)*zsolnet(nl0-1) |
---|
154 | |
---|
155 | enddo |
---|
156 | |
---|
157 | PTOPSW = ZFSNET(klev+1) |
---|
158 | PSOLSW = ZFSNET(1) |
---|
159 | |
---|
160 | c Heating rates |
---|
161 | c ------------- |
---|
162 | c On utilise le gradient du flux pour calculer le taux de chauffage: |
---|
163 | c heat(K/s) = d(fluxnet) (W/m2) |
---|
164 | c *g (m/s2) |
---|
165 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
---|
166 | c /cp (J/kg/K) |
---|
167 | |
---|
168 | do j=1,klev |
---|
169 | ! ADAPTATION GCM POUR CP(T) |
---|
170 | PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j)) |
---|
171 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
---|
172 | c-------------- |
---|
173 | c BIDOUILLE POUR AJUSTEMENT ET TEST |
---|
174 | c if (PPB(j).lt.1.e-2) then |
---|
175 | c PHEAT(j) = PHEAT(j)*0.3 |
---|
176 | c endif |
---|
177 | c if ((PPB(j).gt.1.e-2).and.(PPB(j).lt.2.e-1)) then |
---|
178 | c PHEAT(j) = PHEAT(j)*0.7 |
---|
179 | c endif |
---|
180 | c if (PPB(j).gt.1.) then |
---|
181 | c PHEAT(j) = PHEAT(j)*2. |
---|
182 | c endif |
---|
183 | c-------------- |
---|
184 | enddo |
---|
185 | |
---|
186 | return |
---|
187 | end |
---|
188 | |
---|