[1442] | 1 | SUBROUTINE SW_venus_cl(PRMU0, PFRAC, |
---|
| 2 | S PPB, pt, |
---|
| 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 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 | character*22 nullchar |
---|
| 64 | real sza0,factsza,factflux |
---|
| 65 | real zlnet,tmpzsnet(nszacl) |
---|
| 66 | logical firstcall |
---|
| 67 | data firstcall/.true./ |
---|
| 68 | save solza,zsnet,prescl,tempcl,altcl |
---|
| 69 | save firstcall |
---|
| 70 | |
---|
| 71 | c ------------------------ |
---|
| 72 | c Loading the file |
---|
| 73 | c ------------------------ |
---|
| 74 | |
---|
| 75 | if (firstcall) then |
---|
| 76 | |
---|
| 77 | do nsza=1,nszacl |
---|
| 78 | solza(nsza)=(nsza-1)*5. |
---|
| 79 | enddo |
---|
| 80 | |
---|
| 81 | open(11,file='CLee-SW.dat') |
---|
| 82 | read(11,*) nullchar |
---|
| 83 | |
---|
| 84 | do i=1,nlcl+1 |
---|
| 85 | read(11,'(4(F10.4,1x),18(F11.4,1x))') |
---|
| 86 | . altcl(i),prescl(i),tempcl(i),zlnet,tmpzsnet |
---|
| 87 | c change of sign convention: |
---|
| 88 | zsnet(i,:)=tmpzsnet*(-1.) |
---|
| 89 | prescl(i)=prescl(i)*1.e-5 ! conversion to bars... |
---|
| 90 | enddo |
---|
| 91 | |
---|
| 92 | close(11) |
---|
| 93 | |
---|
| 94 | firstcall=.false. |
---|
| 95 | endif |
---|
| 96 | |
---|
| 97 | c -------------------------------------- |
---|
| 98 | c Interpolation in the GCM vertical grid |
---|
| 99 | c -------------------------------------- |
---|
| 100 | |
---|
| 101 | c Zenith angle |
---|
| 102 | c ------------ |
---|
| 103 | |
---|
| 104 | sza0 = acos(PRMU0)/3.1416*180. |
---|
| 105 | c print*,'Angle Zenithal =',sza0,' PFRAC=',PFRAC |
---|
| 106 | |
---|
| 107 | do nsza=1,nszacl |
---|
| 108 | if (solza(nsza).le.sza0) then |
---|
| 109 | nsza0 = nsza+1 |
---|
| 110 | endif |
---|
| 111 | enddo |
---|
| 112 | |
---|
| 113 | if (nsza0.ne.nszacl+1) then |
---|
| 114 | factsza = (sza0-solza(nsza0-1))/(solza(nsza0)-solza(nsza0-1)) |
---|
| 115 | else |
---|
| 116 | factsza = min((sza0-solza(nszacl))/(90.-solza(nszacl)), 1.) |
---|
| 117 | endif |
---|
| 118 | |
---|
| 119 | c Pressure levels |
---|
| 120 | c --------------- |
---|
| 121 | |
---|
| 122 | do j=1,klev+1 |
---|
| 123 | nl0 = 2 |
---|
| 124 | do i=1,nlcl |
---|
| 125 | if (prescl(i).ge.PPB(j)) then |
---|
| 126 | nl0 = i+1 |
---|
| 127 | endif |
---|
| 128 | enddo |
---|
| 129 | |
---|
| 130 | factflux = (log10(max(PPB(j),prescl(nlcl+1))) |
---|
| 131 | . -log10(prescl(nl0-1))) |
---|
| 132 | . /(log10(prescl(nl0))-log10(prescl(nl0-1))) |
---|
| 133 | if (nsza0.ne.nszacl+1) then |
---|
| 134 | ZFSNET(j) = factflux * factsza *zsnet(nl0,nsza0) |
---|
| 135 | . + factflux *(1.-factsza)*zsnet(nl0,nsza0-1) |
---|
| 136 | . + (1.-factflux)* factsza *zsnet(nl0-1,nsza0) |
---|
| 137 | . + (1.-factflux)*(1.-factsza)*zsnet(nl0-1,nsza0-1) |
---|
| 138 | else |
---|
| 139 | ZFSNET(j) = factflux *(1.-factsza)*zsnet(nl0,nsza0-1) |
---|
| 140 | . + (1.-factflux)*(1.-factsza)*zsnet(nl0-1,nsza0-1) |
---|
| 141 | endif |
---|
| 142 | |
---|
| 143 | ZFSNET(j) = ZFSNET(j)*PFRAC |
---|
| 144 | |
---|
| 145 | enddo |
---|
| 146 | |
---|
| 147 | PTOPSW = ZFSNET(klev+1) |
---|
| 148 | PSOLSW = ZFSNET(1) |
---|
| 149 | |
---|
| 150 | c Heating rates |
---|
| 151 | c ------------- |
---|
| 152 | c On utilise le gradient du flux pour calculer le taux de chauffage: |
---|
| 153 | c heat(K/s) = d(fluxnet) (W/m2) |
---|
| 154 | c *g (m/s2) |
---|
| 155 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
---|
| 156 | c /cp (J/kg/K) |
---|
| 157 | |
---|
| 158 | do j=1,klev |
---|
| 159 | ! ADAPTATION GCM POUR CP(T) |
---|
| 160 | PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j)) |
---|
| 161 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
---|
| 162 | enddo |
---|
| 163 | |
---|
| 164 | return |
---|
| 165 | end |
---|
| 166 | |
---|