| 1 | SUBROUTINE SW_venus_dc(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 | character*22 nullchar |
|---|
| 70 | real sza0,factsza,factflux |
|---|
| 71 | logical firstcall |
|---|
| 72 | data firstcall/.true./ |
|---|
| 73 | save solza,zsnet,presdc,tempdc,altdc |
|---|
| 74 | save firstcall |
|---|
| 75 | |
|---|
| 76 | c ------------------------ |
|---|
| 77 | c Loading the file |
|---|
| 78 | c ------------------------ |
|---|
| 79 | |
|---|
| 80 | if (firstcall) then |
|---|
| 81 | |
|---|
| 82 | open(11,file='dataDCrisp.dat') |
|---|
| 83 | read(11,*) nullchar |
|---|
| 84 | |
|---|
| 85 | do nsza=1,nszadc |
|---|
| 86 | read(11,*) nullchar |
|---|
| 87 | read(11,*) nullchar |
|---|
| 88 | read(11,*) nullchar |
|---|
| 89 | read(11,'(22x,F11.5)') solza(nsza) |
|---|
| 90 | read(11,*) nullchar |
|---|
| 91 | read(11,*) nullchar |
|---|
| 92 | read(11,*) nullchar |
|---|
| 93 | read(11,'(3(2x,F10.4),36x,4(2x,F11.5))') |
|---|
| 94 | . presdc(nldc+1),tempdc(nldc+1), altdc(nldc+1), |
|---|
| 95 | . zsdn,zsup,zldn,zlup |
|---|
| 96 | zsnet(nldc+1,nsza)=zsdn-zsup |
|---|
| 97 | do i=1,nldc |
|---|
| 98 | j = nldc+1-i ! changing: vectors from surface to top |
|---|
| 99 | read(11,'(6(2x,F10.4),4(2x,F11.5))') |
|---|
| 100 | . presdc(j),tempdc(j),altdc(j), |
|---|
| 101 | . solarrate,coolrate,totalrate, |
|---|
| 102 | . zsdn,zsup,zldn,zlup |
|---|
| 103 | zsnet(j,nsza)=zsdn-zsup |
|---|
| 104 | enddo |
|---|
| 105 | enddo |
|---|
| 106 | |
|---|
| 107 | close(11) |
|---|
| 108 | |
|---|
| 109 | firstcall=.false. |
|---|
| 110 | endif |
|---|
| 111 | |
|---|
| 112 | c -------------------------------------- |
|---|
| 113 | c Interpolation in the GCM vertical grid |
|---|
| 114 | c -------------------------------------- |
|---|
| 115 | |
|---|
| 116 | c Zenith angle |
|---|
| 117 | c ------------ |
|---|
| 118 | |
|---|
| 119 | sza0 = acos(PRMU0)/3.1416*180. |
|---|
| 120 | c print*,'Angle Zenithal =',sza0,' PFRAC=',PFRAC |
|---|
| 121 | |
|---|
| 122 | do nsza=1,nszadc |
|---|
| 123 | if (solza(nsza).le.sza0) then |
|---|
| 124 | nsza0 = nsza+1 |
|---|
| 125 | endif |
|---|
| 126 | enddo |
|---|
| 127 | |
|---|
| 128 | if (nsza0.ne.nszadc+1) then |
|---|
| 129 | factsza = (sza0-solza(nsza0-1))/(solza(nsza0)-solza(nsza0-1)) |
|---|
| 130 | else |
|---|
| 131 | factsza = min((sza0-solza(nszadc))/(90.-solza(nszadc)), 1.) |
|---|
| 132 | endif |
|---|
| 133 | |
|---|
| 134 | c Pressure levels |
|---|
| 135 | c --------------- |
|---|
| 136 | |
|---|
| 137 | do j=1,klev+1 |
|---|
| 138 | nl0 = 2 |
|---|
| 139 | do i=1,nldc |
|---|
| 140 | if (presdc(i).ge.PPB(j)) then |
|---|
| 141 | nl0 = i+1 |
|---|
| 142 | endif |
|---|
| 143 | enddo |
|---|
| 144 | |
|---|
| 145 | factflux = (log10(max(PPB(j),presdc(nldc+1))) |
|---|
| 146 | . -log10(presdc(nl0-1))) |
|---|
| 147 | . /(log10(presdc(nl0))-log10(presdc(nl0-1))) |
|---|
| 148 | c factflux = (max(PPB(j),presdc(nldc+1))-presdc(nl0-1)) |
|---|
| 149 | c . /(presdc(nl0)-presdc(nl0-1)) |
|---|
| 150 | if (nsza0.ne.nszadc+1) then |
|---|
| 151 | ZFSNET(j) = factflux * factsza *zsnet(nl0,nsza0) |
|---|
| 152 | . + factflux *(1.-factsza)*zsnet(nl0,nsza0-1) |
|---|
| 153 | . + (1.-factflux)* factsza *zsnet(nl0-1,nsza0) |
|---|
| 154 | . + (1.-factflux)*(1.-factsza)*zsnet(nl0-1,nsza0-1) |
|---|
| 155 | else |
|---|
| 156 | ZFSNET(j) = factflux *(1.-factsza)*zsnet(nl0,nsza0-1) |
|---|
| 157 | . + (1.-factflux)*(1.-factsza)*zsnet(nl0-1,nsza0-1) |
|---|
| 158 | endif |
|---|
| 159 | |
|---|
| 160 | ZFSNET(j) = ZFSNET(j)*PFRAC |
|---|
| 161 | |
|---|
| 162 | enddo |
|---|
| 163 | |
|---|
| 164 | PTOPSW = ZFSNET(klev+1) |
|---|
| 165 | PSOLSW = ZFSNET(1) |
|---|
| 166 | |
|---|
| 167 | c Heating rates |
|---|
| 168 | c ------------- |
|---|
| 169 | c On utilise le gradient du flux pour calculer le taux de chauffage: |
|---|
| 170 | c heat(K/s) = d(fluxnet) (W/m2) |
|---|
| 171 | c *g (m/s2) |
|---|
| 172 | c /(-dp) (epaisseur couche, en Pa=kg/m/s2) |
|---|
| 173 | c /cp (J/kg/K) |
|---|
| 174 | |
|---|
| 175 | do j=1,klev |
|---|
| 176 | ! ADAPTATION GCM POUR CP(T) |
|---|
| 177 | PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j)) |
|---|
| 178 | . *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5) |
|---|
| 179 | enddo |
|---|
| 180 | |
|---|
| 181 | return |
|---|
| 182 | end |
|---|
| 183 | |
|---|