Changeset 2503
- Timestamp:
- Apr 23, 2021, 4:41:19 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/sw_venus_rh.F
r2464 r2503 4 4 S PTOPSW,PSOLSW,ZFSNET) 5 5 6 use dimphy 6 use dimphy, only: klev 7 7 use cpdet_phy_mod, only: cpdet 8 8 IMPLICIT none 9 9 10 #include "YOMCST.h" 10 include "YOMCST.h" 11 include "clesphys.h" 11 12 C 12 13 C ------------------------------------------------------------------ … … 32 33 c inputs 33 34 34 REAL PRMU0 ! COSINE OF ZENITHAL ANGLE35 REAL PFRAC ! fraction de la journee36 REAL latdeg ! |latitude| (in degrees)37 REAL PPB(klev+1) ! inter-couches PRESSURE (bar)38 REAL PPA(klev)39 REAL pt(klev) ! mid-layer temperature35 REAL,INTENT(IN) :: PRMU0 ! COSINE OF ZENITHAL ANGLE 36 REAL,INTENT(IN) :: PFRAC ! fraction de la journee 37 REAL,INTENT(IN) :: latdeg ! |latitude| (in degrees) 38 REAL,INTENT(IN) :: PPB(klev+1) ! inter-couches PRESSURE (bar) 39 REAL,INTENT(IN) :: PPA(klev) 40 REAL,INTENT(IN) :: pt(klev) ! mid-layer temperature 40 41 C 41 42 c output 42 43 43 REAL PHEAT(klev) ! SHORTWAVE HEATING (K/s) within each layer44 REAL,INTENT(OUT) :: PHEAT(klev) ! SHORTWAVE HEATING (K/s) within each layer 44 45 REAL PHEATPPA(klev) 45 REAL PTOPSW ! SHORTWAVE FLUX AT T.O.A. (net)46 REAL PSOLSW ! SHORTWAVE FLUX AT SURFACE (net)47 REAL ZFSNET(klev+1) ! net solar flux at ppb levels46 REAL,INTENT(OUT) :: PTOPSW ! SHORTWAVE FLUX AT T.O.A. (net) 47 REAL,INTENT(OUT) :: PSOLSW ! SHORTWAVE FLUX AT SURFACE (net) 48 REAL,INTENT(OUT) :: ZFSNET(klev+1) ! net solar flux at ppb levels 48 49 49 50 C … … 136 137 nsza0(:)=2 137 138 138 do nsza=1,nszarh 139 if (solza(nsza,nlat0-1).le.sza0) then 139 if (.not.cycle_diurne) then 140 ! without a diurnal cycle, no need for any elaborate weights of sza 141 factsza(1)=1 142 factsza(2)=0 143 else 144 ! standard case with diurnal cycle 145 do nsza=1,nszarh 146 if (solza(nsza,nlat0-1).le.sza0) then 140 147 nsza0(1) = nsza+1 141 endif142 enddo143 if (nsza0(1).ne.nszarh+1) then144 factsza(1) = (sza0-solza(nsza0(1)-1,nlat0-1))/145 . (solza(nsza0(1),nlat0-1)-solza(nsza0(1)-1,nlat0-1))146 else147 factsza(1) = min((sza0-solza(nszarh,nlat0-1))/148 . (90.-solza(nszarh,nlat0-1)), 1.)149 endif150 if (nlat0.ne.nlatrh+1) then151 do nsza=1,nszarh152 if (solza(nsza,nlat0).le.sza0) then148 endif 149 enddo 150 if (nsza0(1).ne.nszarh+1) then 151 factsza(1) = (sza0-solza(nsza0(1)-1,nlat0-1))/ 152 . (solza(nsza0(1),nlat0-1)-solza(nsza0(1)-1,nlat0-1)) 153 else 154 factsza(1) = min((sza0-solza(nszarh,nlat0-1))/ 155 . (90.-solza(nszarh,nlat0-1)), 1.) 156 endif 157 if (nlat0.ne.nlatrh+1) then 158 do nsza=1,nszarh 159 if (solza(nsza,nlat0).le.sza0) then 153 160 nsza0(2) = nsza+1 154 endif 155 enddo 156 if (nsza0(2).eq.nszarh+1) then 157 factsza(2) = min((sza0-solza(nszarh,nlat0))/ 158 . (90.-solza(nszarh,nlat0)), 1.) 159 elseif ((nsza0(2).eq.2).and.(solza(1,nlat0).gt.sza0)) then 160 factsza(2) = 0. 161 else 162 factsza(2) = (sza0-solza(nsza0(2)-1,nlat0))/ 163 . (solza(nsza0(2),nlat0)-solza(nsza0(2)-1,nlat0)) 164 endif 165 else 166 nsza0(2) = nszarh+1 167 factsza(2) = 1. 168 endif 161 endif 162 enddo 163 if (nsza0(2).eq.nszarh+1) then 164 factsza(2) = min((sza0-solza(nszarh,nlat0))/ 165 . (90.-solza(nszarh,nlat0)), 1.) 166 elseif ((nsza0(2).eq.2).and.(solza(1,nlat0).gt.sza0)) then 167 factsza(2) = 0. 168 else 169 factsza(2) = (sza0-solza(nsza0(2)-1,nlat0))/ 170 . (solza(nsza0(2),nlat0)-solza(nsza0(2)-1,nlat0)) 171 endif 172 else 173 nsza0(2) = nszarh+1 174 factsza(2) = 1. 175 endif ! of if (nlat0.ne.nlatrh+1) 176 endif ! of if (.not.cycle_diurne) 177 169 178 c Pressure levels 170 179 c --------------- … … 319 328 320 329 321 return322 330 end 323 331
Note: See TracChangeset
for help on using the changeset viewer.