| 1 | SUBROUTINE SW_venus_rh(PRMU0, PFRAC, latdeg, |
|---|
| 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 Rainer Haus calculations for Venus. |
|---|
| 19 | c Ref: Haus et al. 2016 |
|---|
| 20 | C |
|---|
| 21 | C AUTHOR. |
|---|
| 22 | C ------- |
|---|
| 23 | C Sebastien Lebonnois |
|---|
| 24 | C |
|---|
| 25 | C MODIFICATIONS. |
|---|
| 26 | C -------------- |
|---|
| 27 | C ORIGINAL : 5/2016 |
|---|
| 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 latdeg ! |latitude| (in degrees) |
|---|
| 37 | REAL PPB(klev+1) ! inter-couches PRESSURE (bar) |
|---|
| 38 | REAL pt(klev) ! mid-layer temperature |
|---|
| 39 | C |
|---|
| 40 | c output |
|---|
| 41 | |
|---|
| 42 | REAL PHEAT(klev) ! SHORTWAVE HEATING (K/s) within each layer |
|---|
| 43 | REAL PTOPSW ! SHORTWAVE FLUX AT T.O.A. (net) |
|---|
| 44 | REAL PSOLSW ! SHORTWAVE FLUX AT SURFACE (net) |
|---|
| 45 | REAL ZFSNET(klev+1) ! net solar flux at ppb levels |
|---|
| 46 | |
|---|
| 47 | C |
|---|
| 48 | C* LOCAL VARIABLES: |
|---|
| 49 | C |
|---|
| 50 | integer nlrh,nszarh,nlatrh |
|---|
| 51 | parameter (nlrh=118) ! fichiers Rainer Haus |
|---|
| 52 | parameter (nszarh=7) ! fichiers Rainer Haus |
|---|
| 53 | parameter (nlatrh=19) ! fichiers Rainer Haus |
|---|
| 54 | |
|---|
| 55 | integer i,j,lat,nsza,nsza0(2),nl0,nlat0 |
|---|
| 56 | real zsnet(nlrh+1,nszarh+1,nlatrh+1)! net solar flux (W/m**2) (+ vers bas) |
|---|
| 57 | real solza(nszarh,nlatrh) ! solar zenith angles in table |
|---|
| 58 | real presrh(nlrh+1) ! pressure in table (bar) |
|---|
| 59 | real altrh(nlrh+1) ! altitude in table (km) |
|---|
| 60 | real latrh(nlatrh) ! latitude in table (degrees) |
|---|
| 61 | character*22 nullchar |
|---|
| 62 | real sza0,factsza(2),factflux,factlat |
|---|
| 63 | real zsnetmoy |
|---|
| 64 | logical firstcall |
|---|
| 65 | data firstcall/.true./ |
|---|
| 66 | save solza,zsnet,altrh,latrh,presrh |
|---|
| 67 | save firstcall |
|---|
| 68 | |
|---|
| 69 | c ------------------------ |
|---|
| 70 | c Loading the file |
|---|
| 71 | c ------------------------ |
|---|
| 72 | |
|---|
| 73 | if (firstcall) then |
|---|
| 74 | |
|---|
| 75 | zsnet=0. |
|---|
| 76 | |
|---|
| 77 | open(11,file='SolarNetFlux_RH.dat') |
|---|
| 78 | |
|---|
| 79 | do i=1,nlrh+1 |
|---|
| 80 | read(11,'(E5.1,4x,F8.2)') altrh(i),presrh(i) |
|---|
| 81 | enddo |
|---|
| 82 | |
|---|
| 83 | do lat=1,nlatrh |
|---|
| 84 | latrh(lat)=5.*(lat-1) |
|---|
| 85 | read(11,*) nullchar |
|---|
| 86 | read(11,*) nullchar |
|---|
| 87 | read(11,'(3x,7(5x,E8.5))') solza(:,lat) |
|---|
| 88 | read(11,*) nullchar |
|---|
| 89 | |
|---|
| 90 | do i=1,nlrh+1 |
|---|
| 91 | read(11,'(E6.1,7(2x,F11.5),7x,F11.5)') |
|---|
| 92 | . altrh(i),zsnet(i,1:nszarh,lat),zsnetmoy |
|---|
| 93 | enddo |
|---|
| 94 | read(11,*) nullchar |
|---|
| 95 | enddo |
|---|
| 96 | latrh(nlatrh)=89. |
|---|
| 97 | |
|---|
| 98 | c Correction of factor 2 in the table... |
|---|
| 99 | zsnet=zsnet*2. |
|---|
| 100 | |
|---|
| 101 | close(11) |
|---|
| 102 | |
|---|
| 103 | firstcall=.false. |
|---|
| 104 | endif |
|---|
| 105 | |
|---|
| 106 | c -------------------------------------- |
|---|
| 107 | c Interpolation in the GCM vertical grid |
|---|
| 108 | c -------------------------------------- |
|---|
| 109 | |
|---|
| 110 | c Latitude |
|---|
| 111 | c --------- |
|---|
| 112 | |
|---|
| 113 | do lat=1,nlatrh |
|---|
| 114 | if (latrh(lat).le.latdeg) then |
|---|
| 115 | nlat0 = lat+1 |
|---|
| 116 | endif |
|---|
| 117 | enddo |
|---|
| 118 | |
|---|
| 119 | if (nlat0.ne.nlatrh+1) then |
|---|
| 120 | factlat = (latdeg-latrh(nlat0-1))/(latrh(nlat0)-latrh(nlat0-1)) |
|---|
| 121 | else |
|---|
| 122 | factlat = min((latdeg-latrh(nlatrh))/(90.-latrh(nlatrh)), 1.) |
|---|
| 123 | endif |
|---|
| 124 | |
|---|
| 125 | c Zenith angle |
|---|
| 126 | c ------------ |
|---|
| 127 | |
|---|
| 128 | sza0 = acos(PRMU0)/3.1416*180. |
|---|
| 129 | c print*,'Angle Zenithal =',sza0,' PFRAC=',PFRAC |
|---|
| 130 | nsza0(:)=2 |
|---|
| 131 | |
|---|
| 132 | do nsza=1,nszarh |
|---|
| 133 | if (solza(nsza,nlat0-1).le.sza0) then |
|---|
| 134 | nsza0(1) = nsza+1 |
|---|
| 135 | endif |
|---|
| 136 | enddo |
|---|
| 137 | |
|---|
| 138 | if (nsza0(1).ne.nszarh+1) then |
|---|
| 139 | factsza(1) = (sza0-solza(nsza0(1)-1,nlat0-1))/ |
|---|
| 140 | . (solza(nsza0(1),nlat0-1)-solza(nsza0(1)-1,nlat0-1)) |
|---|
| 141 | else |
|---|
| 142 | factsza(1) = min((sza0-solza(nszarh,nlat0-1))/ |
|---|
| 143 | . (90.-solza(nszarh,nlat0-1)), 1.) |
|---|
| 144 | endif |
|---|
| 145 | |
|---|
| 146 | if (nlat0.ne.nlatrh+1) then |
|---|
| 147 | do nsza=1,nszarh |
|---|
| 148 | if (solza(nsza,nlat0).le.sza0) then |
|---|
| 149 | nsza0(2) = nsza+1 |
|---|
| 150 | endif |
|---|
| 151 | enddo |
|---|
| 152 | |
|---|
| 153 | if (nsza0(2).eq.nszarh+1) then |
|---|
| 154 | factsza(2) = min((sza0-solza(nszarh,nlat0))/ |
|---|
| 155 | . (90.-solza(nszarh,nlat0)), 1.) |
|---|
| 156 | elseif ((nsza0(2).eq.2).and.(solza(1,nlat0).gt.sza0)) then |
|---|
| 157 | factsza(2) = 0. |
|---|
| 158 | else |
|---|
| 159 | factsza(2) = (sza0-solza(nsza0(2)-1,nlat0))/ |
|---|
| 160 | . (solza(nsza0(2),nlat0)-solza(nsza0(2)-1,nlat0)) |
|---|
| 161 | endif |
|---|
| 162 | else |
|---|
| 163 | nsza0(2) = nszarh+1 |
|---|
| 164 | factsza(2) = 1. |
|---|
| 165 | endif |
|---|
| 166 | |
|---|
| 167 | c Pressure levels |
|---|
| 168 | c --------------- |
|---|
| 169 | |
|---|
| 170 | do j=1,klev+1 |
|---|
| 171 | nl0 = nlrh |
|---|
| 172 | do i=nlrh+1,2,-1 |
|---|
| 173 | if (presrh(i).ge.PPB(j)) then |
|---|
| 174 | nl0 = i-1 |
|---|
| 175 | endif |
|---|
| 176 | enddo |
|---|
| 177 | |
|---|
| 178 | factflux = (log10(max(PPB(j),presrh(1)))-log10(presrh(nl0+1))) |
|---|
| 179 | . /(log10(presrh(nl0))-log10(presrh(nl0+1))) |
|---|
| 180 | |
|---|
| 181 | ZFSNET(j) = factlat*( |
|---|
| 182 | . factflux * factsza(2) *zsnet(nl0,nsza0(2),nlat0) |
|---|
| 183 | . + factflux *(1.-factsza(2))*zsnet(nl0,nsza0(2)-1,nlat0) |
|---|
| 184 | . + (1.-factflux)* factsza(2) *zsnet(nl0+1,nsza0(2),nlat0) |
|---|
| 185 | . + (1.-factflux)*(1.-factsza(2))*zsnet(nl0+1,nsza0(2)-1,nlat0) ) |
|---|
| 186 | . + (1.-factlat)*( |
|---|
| 187 | . factflux * factsza(1) *zsnet(nl0,nsza0(1),nlat0-1) |
|---|
| 188 | . + factflux *(1.-factsza(1))*zsnet(nl0,nsza0(1)-1,nlat0-1) |
|---|
| 189 | . + (1.-factflux)* factsza(1) *zsnet(nl0+1,nsza0(1),nlat0-1) |
|---|
| 190 | . + (1.-factflux)*(1.-factsza(1))*zsnet(nl0+1,nsza0(1)-1,nlat0-1) ) |
|---|
| 191 | |
|---|
| 192 | ZFSNET(j) = ZFSNET(j)*PFRAC |
|---|
| 193 | |
|---|
| 194 | enddo |
|---|
| 195 | |
|---|
| 196 | PTOPSW = ZFSNET(klev+1) |
|---|
| 197 | PSOLSW = ZFSNET(1) |
|---|
| 198 | |
|---|
| 199 | c Heating rates |
|---|
| 200 | c ------------- |
|---|
| 201 | c On utilise le gradient du flux pour calculer le taux de chauffage: |
|---|
| 202 | c heat(K/s) = d(fluxnet) (W/m2) |
|---|
| 203 | c *g (m/s2) |
|---|
| 204 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
|---|
| 205 | c /cp (J/kg/K) |
|---|
| 206 | |
|---|
| 207 | do j=1,klev |
|---|
| 208 | ! ADAPTATION GCM POUR CP(T) |
|---|
| 209 | PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j)) |
|---|
| 210 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
|---|
| 211 | c-----TEST------- |
|---|
| 212 | c tayloring the solar flux... |
|---|
| 213 | if ((PPB(j).gt.1.4).and.(PPB(j).le.10.)) then |
|---|
| 214 | PHEAT(j) = PHEAT(j)*3 |
|---|
| 215 | endif |
|---|
| 216 | c---------------- |
|---|
| 217 | enddo |
|---|
| 218 | |
|---|
| 219 | return |
|---|
| 220 | end |
|---|
| 221 | |
|---|