1 | SUBROUTINE SW_venus_cl_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 Chris Lee calculations for Venus. |
---|
19 | c Ref: Lee and Richardson 2011 |
---|
20 | C |
---|
21 | C AUTHOR. |
---|
22 | C ------- |
---|
23 | C Sebastien Lebonnois |
---|
24 | C |
---|
25 | C MODIFICATIONS. |
---|
26 | C -------------- |
---|
27 | C ORIGINAL : 11/2014 |
---|
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/s) 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 nlcl,nszacl |
---|
50 | parameter (nlcl=80) ! fichiers Crisp |
---|
51 | parameter (nszacl=18) ! fichiers Crisp |
---|
52 | |
---|
53 | integer i,j,nsza,nsza0,nl0 |
---|
54 | real solarrate ! solar heating rate (K/earthday) |
---|
55 | real zsnet(nlcl+1,nszacl) ! net solar flux (W/m**2) (+ vers bas) |
---|
56 | real zsdn,zsup ! downward/upward solar flux (W/m**2) |
---|
57 | real solza(nszacl) ! solar zenith angles in table |
---|
58 | real prescl(nlcl+1) ! pressure levels in table (bar) |
---|
59 | real tempcl(nlcl+1) ! temperature in table (K) |
---|
60 | real altcl(nlcl+1) ! altitude in table (km) |
---|
61 | real coolrate ! IR heating rate (K/earthday) ? |
---|
62 | real totalrate ! total rate (K/earthday) |
---|
63 | real zsolnet(nlcl+1) ! for testing mean net solar flux in CL |
---|
64 | character*22 nullchar |
---|
65 | real sza0,factflux |
---|
66 | real zlnet,tmpzsnet(nszacl),deltasza |
---|
67 | logical firstcall |
---|
68 | data firstcall/.true./ |
---|
69 | save solza,zsnet,prescl,tempcl,altcl,zsolnet |
---|
70 | save firstcall |
---|
71 | |
---|
72 | c ------------------------ |
---|
73 | c Loading the file |
---|
74 | c ------------------------ |
---|
75 | |
---|
76 | if (firstcall) then |
---|
77 | |
---|
78 | do nsza=1,nszacl |
---|
79 | solza(nsza)=(nsza-1)*5. |
---|
80 | enddo |
---|
81 | |
---|
82 | open(11,file='CLee-SW.dat') |
---|
83 | read(11,*) nullchar |
---|
84 | |
---|
85 | do i=1,nlcl+1 |
---|
86 | read(11,'(4(F10.4,1x),18(F11.4,1x))') |
---|
87 | . altcl(i),prescl(i),tempcl(i),zlnet,tmpzsnet |
---|
88 | c change of sign convention: |
---|
89 | zsnet(i,:)=tmpzsnet*(-1.) |
---|
90 | prescl(i)=prescl(i)*1.e-5 ! conversion to bars... |
---|
91 | enddo |
---|
92 | |
---|
93 | close(11) |
---|
94 | |
---|
95 | c ----------- TEST ------------ |
---|
96 | c Moyenne planetaire |
---|
97 | c ----------------------------- |
---|
98 | |
---|
99 | deltasza=(solza(2)-solza(1))*RPI/180. |
---|
100 | |
---|
101 | do j=1,nlcl+1 |
---|
102 | zsolnet(j) = zsnet(j,1)*deltasza*deltasza/16. |
---|
103 | do nsza=2,nszacl |
---|
104 | zsolnet(j) = zsolnet(j)+zsnet(j,nsza)*0.5*deltasza* |
---|
105 | . sin(solza(nsza)*RPI/180.) |
---|
106 | enddo |
---|
107 | c print*,j,altcl(j),zsolnet(j) |
---|
108 | enddo |
---|
109 | c stop |
---|
110 | c ----------------------------- |
---|
111 | c -------- FIN TEST ---------- |
---|
112 | |
---|
113 | firstcall=.false. |
---|
114 | endif |
---|
115 | |
---|
116 | c -------------------------------------- |
---|
117 | c Interpolation in the GCM vertical grid |
---|
118 | c -------------------------------------- |
---|
119 | |
---|
120 | c Pressure levels |
---|
121 | c --------------- |
---|
122 | |
---|
123 | do j=1,klev+1 |
---|
124 | nl0 = 2 |
---|
125 | do i=1,nlcl |
---|
126 | if (prescl(i).ge.PPB(j)) then |
---|
127 | nl0 = i+1 |
---|
128 | endif |
---|
129 | enddo |
---|
130 | |
---|
131 | factflux = (log10(max(PPB(j),prescl(nlcl+1))) |
---|
132 | . -log10(prescl(nl0-1))) |
---|
133 | . /(log10(prescl(nl0))-log10(prescl(nl0-1))) |
---|
134 | ZFSNET(j) = factflux *zsolnet(nl0) |
---|
135 | . + (1.-factflux)*zsolnet(nl0-1) |
---|
136 | |
---|
137 | enddo |
---|
138 | |
---|
139 | PTOPSW = ZFSNET(klev+1) |
---|
140 | PSOLSW = ZFSNET(1) |
---|
141 | |
---|
142 | c Heating rates |
---|
143 | c ------------- |
---|
144 | c On utilise le gradient du flux pour calculer le taux de chauffage: |
---|
145 | c heat(K/s) = d(fluxnet) (W/m2) |
---|
146 | c *g (m/s2) |
---|
147 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
---|
148 | c /cp (J/kg/K) |
---|
149 | |
---|
150 | do j=1,klev |
---|
151 | ! ADAPTATION GCM POUR CP(T) |
---|
152 | PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j)) |
---|
153 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
---|
154 | enddo |
---|
155 | |
---|
156 | return |
---|
157 | end |
---|
158 | |
---|