[1442] | 1 | SUBROUTINE SW_venus_ve_1Dglobave( PRMU0, PFRAC, |
---|
| 2 | S PPB, pt, pz, |
---|
| 3 | S PHEAT, |
---|
| 4 | S PTOPSW,PSOLSW,ZFSNET) |
---|
| 5 | |
---|
| 6 | use dimphy |
---|
[1621] | 7 | use cpdet_phy_mod, only: cpdet |
---|
[1442] | 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 and heating rates computed from Vincent Eymet 3D MC code |
---|
| 19 | C |
---|
| 20 | C AUTHOR. |
---|
| 21 | C ------- |
---|
| 22 | C Sebastien Lebonnois |
---|
| 23 | C |
---|
| 24 | C MODIFICATIONS. |
---|
| 25 | C -------------- |
---|
| 26 | C ORIGINAL : 06/2014 |
---|
| 27 | C ------------------------------------------------------------------ |
---|
| 28 | C |
---|
| 29 | C* ARGUMENTS: |
---|
| 30 | C |
---|
| 31 | c inputs |
---|
| 32 | |
---|
| 33 | REAL PRMU0 ! COSINE OF ZENITHAL ANGLE |
---|
| 34 | REAL PFRAC ! fraction de la journee |
---|
| 35 | REAL PPB(klev+1) ! inter-couches PRESSURE (bar) |
---|
| 36 | REAL pt(klev) ! mid-layer temperature |
---|
| 37 | REAL pz(klev+1) ! inter-couches altitude (m) |
---|
| 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 nlve,nszave |
---|
| 50 | parameter (nlve=78) ! fichiers planet_EMC |
---|
| 51 | parameter (nszave=20) ! fichiers planet_EMC |
---|
| 52 | |
---|
| 53 | integer i,j,nsza,nsza0,nl0 |
---|
| 54 | real solarrate ! solar heating rate (K/earthday) |
---|
| 55 | real zsnet(nlve,nszave) ! net solar flux (W/m**2) (+ vers bas) |
---|
| 56 | real zheat(nlve-1,nszave) ! rad budget (W/m**2) |
---|
| 57 | real zsdn,zsup ! downward/upward solar flux (W/m**2) |
---|
| 58 | real solza(nszave) ! solar zenith angles in table (rad) |
---|
| 59 | real altve(nlve) ! altitude in table (m) |
---|
| 60 | real zheatave(nlve-1) ! for testing mean net solar flux |
---|
| 61 | real zsolnet(nlve) ! for testing mean net solar flux |
---|
| 62 | character*22 nullchar |
---|
| 63 | real deltasza |
---|
| 64 | real sza0,factflux,alt |
---|
| 65 | logical firstcall |
---|
| 66 | data firstcall/.true./ |
---|
| 67 | save solza,zsnet,altve,zheat,zheatave,zsolnet |
---|
| 68 | save firstcall |
---|
| 69 | |
---|
| 70 | c ------------------------ |
---|
| 71 | c Loading the files |
---|
| 72 | c ------------------------ |
---|
| 73 | |
---|
| 74 | if (firstcall) then |
---|
| 75 | |
---|
| 76 | ! FLUXES (W/m2) |
---|
| 77 | |
---|
| 78 | open(11,file='solar_fluxes_GCM.dat') |
---|
| 79 | read(11,*) nullchar |
---|
| 80 | read(11,*) nullchar |
---|
| 81 | read(11,*) nullchar |
---|
| 82 | read(11,*) nullchar |
---|
| 83 | |
---|
| 84 | do nsza=1,nszave |
---|
| 85 | read(11,*) nullchar |
---|
| 86 | read(11,*) solza(nsza) |
---|
| 87 | read(11,*) nullchar |
---|
| 88 | read(11,*) nullchar |
---|
| 89 | do j=1,nlve |
---|
| 90 | read(11,'(4(2x,F12.5))') |
---|
| 91 | . altve(j),zsdn,zsup,zsnet(j,nsza) |
---|
| 92 | enddo |
---|
| 93 | enddo |
---|
| 94 | |
---|
| 95 | close(11) |
---|
| 96 | |
---|
| 97 | ! HEATING RATES (W/m2) |
---|
| 98 | |
---|
| 99 | open(12,file='solar_budgets_GCM.dat') |
---|
| 100 | read(12,*) nullchar |
---|
| 101 | read(12,*) nullchar |
---|
| 102 | read(12,*) nullchar |
---|
| 103 | read(12,*) nullchar |
---|
| 104 | |
---|
| 105 | do nsza=1,nszave |
---|
| 106 | read(12,*) nullchar |
---|
| 107 | read(12,*) solza(nsza) |
---|
| 108 | read(12,*) nullchar |
---|
| 109 | read(12,*) nullchar |
---|
| 110 | do j=1,nlve-1 |
---|
| 111 | read(12,'(2(2x,F12.5))') |
---|
| 112 | . alt,zheat(j,nsza) |
---|
| 113 | enddo |
---|
| 114 | enddo |
---|
| 115 | |
---|
| 116 | close(12) |
---|
| 117 | |
---|
| 118 | firstcall=.false. |
---|
| 119 | endif |
---|
| 120 | |
---|
| 121 | c ----------- TEST ------------ |
---|
| 122 | c Moyenne planetaire |
---|
| 123 | c ----------------------------- |
---|
| 124 | zheatave(:)=0. |
---|
| 125 | zsolnet(:)=0. |
---|
| 126 | |
---|
| 127 | do j=1,nlve-1 |
---|
| 128 | deltasza=solza(1)+(solza(2)-solza(1))/2. ! deja en radian |
---|
| 129 | zheatave(j) = zheat(j,1)*deltasza*deltasza/16. |
---|
| 130 | do nsza=2,nszave-1 |
---|
| 131 | deltasza=(solza(nsza)-solza(nsza-1))/2. |
---|
| 132 | . +(solza(nsza+1)-solza(nsza))/2. ! deja en radian |
---|
| 133 | zheatave(j) = zheatave(j)+zheat(j,nsza)*0.5*deltasza* |
---|
| 134 | . sin(solza(nsza)) |
---|
| 135 | enddo |
---|
| 136 | enddo |
---|
| 137 | do j=1,nlve |
---|
| 138 | deltasza=solza(1)+(solza(2)-solza(1))/2. ! deja en radian |
---|
| 139 | zsolnet(j) = zsnet(j,1)*deltasza*deltasza/16. |
---|
| 140 | do nsza=2,nszave |
---|
| 141 | deltasza=(solza(nsza)-solza(nsza-1))/2. |
---|
| 142 | . +(solza(nsza+1)-solza(nsza))/2. ! deja en radian |
---|
| 143 | zsolnet(j) = zsolnet(j)+zsnet(j,nsza)*0.5*deltasza* |
---|
| 144 | . sin(solza(nsza)) |
---|
| 145 | enddo |
---|
| 146 | enddo |
---|
| 147 | c stop |
---|
| 148 | c ----------------------------- |
---|
| 149 | c -------- FIN TEST ---------- |
---|
| 150 | |
---|
| 151 | c -------------------------------------- |
---|
| 152 | c Interpolation in the GCM vertical grid |
---|
| 153 | c -------------------------------------- |
---|
| 154 | |
---|
| 155 | c Pressure levels |
---|
| 156 | c --------------- |
---|
| 157 | |
---|
| 158 | do j=1,klev+1 |
---|
| 159 | nl0 = 2 |
---|
| 160 | do i=1,nlve-1 |
---|
| 161 | if (altve(i).le.pz(j)) then |
---|
| 162 | nl0 = i+1 |
---|
| 163 | endif |
---|
| 164 | enddo |
---|
| 165 | |
---|
| 166 | factflux = (min(pz(j),altve(nlve)) |
---|
| 167 | . -altve(nl0-1)) |
---|
| 168 | . /(altve(nl0)-altve(nl0-1)) |
---|
| 169 | |
---|
| 170 | ! FLUXES |
---|
| 171 | |
---|
| 172 | ZFSNET(j) = factflux *zsolnet(nl0) |
---|
| 173 | . + (1.-factflux)*zsolnet(nl0-1) |
---|
| 174 | |
---|
| 175 | ! HEATING RATES |
---|
| 176 | |
---|
| 177 | if (j.ne.klev+1) then |
---|
| 178 | PHEAT(j) = factflux *zheatave(nl0) |
---|
| 179 | . + (1.-factflux)*zheatave(nl0-1) |
---|
| 180 | endif |
---|
| 181 | |
---|
| 182 | enddo |
---|
| 183 | |
---|
| 184 | PTOPSW = ZFSNET(klev+1) |
---|
| 185 | PSOLSW = ZFSNET(1) |
---|
| 186 | |
---|
| 187 | c Heating rates |
---|
| 188 | c ------------- |
---|
| 189 | c Conversion from W/m2 to K/s: |
---|
| 190 | c heat(K/s) = d(fluxnet) (W/m2) |
---|
| 191 | c *g (m/s2) |
---|
| 192 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
---|
| 193 | c /cp (J/kg/K) |
---|
| 194 | |
---|
| 195 | do j=1,klev |
---|
| 196 | ! ADAPTATION GCM POUR CP(T) |
---|
| 197 | PHEAT(j) = PHEAT(j) |
---|
| 198 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
---|
| 199 | enddo |
---|
| 200 | |
---|
| 201 | return |
---|
| 202 | end |
---|
| 203 | |
---|