Changeset 3691 for trunk/LMDZ.PLUTO
- Timestamp:
- Mar 17, 2025, 5:41:41 PM (5 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/calc_cpp_mugaz.F90
r3669 r3691 40 40 ! ignore variable gas in cpp calculation 41 41 else 42 ! all values at 300 K from Engineering Toolbox42 ! Fill in specific heat cp (J/mol/K) for each gas 43 43 if(igas.eq.igas_CO2)then 44 44 mugaz_c = mugaz_c + 44.01*gfrac(igas) … … 65 65 ! C2H2 https://encyclopedia.airliquide.com/fr/acetylene 66 66 mugaz_c = mugaz_c + 26.04*gfrac(igas) 67 ! GG MODIF JAN201968 67 elseif(igas.eq.igas_C2H4)then 69 68 mugaz_c = mugaz_c + 28.054*gfrac(igas) … … 75 74 elseif(igas.eq.igas_HCl)then 76 75 mugaz_c = mugaz_c + 36.46*gfrac(igas) 76 elseif(igas.eq.igas_HCN)then 77 mugaz_c = mugaz_c + 35.85*gfrac(igas) 77 78 elseif(igas.eq.igas_HF)then 78 79 mugaz_c = mugaz_c + 20.01*gfrac(igas) … … 124 125 elseif(igas.eq.igas_C2H4)then 125 126 ! https://www.engineeringtoolbox.com/ethylene-ethene-C2H4-properties-d_2104.html 126 cpp_c = cpp_c + 1. 53*gfrac(igas)*28.054/mugaz_c127 cpp_c = cpp_c + 1.295*gfrac(igas)*28.054/mugaz_c 127 128 !!!!! MODIF GG JAN 2019 (check source values !!) 128 129 elseif(igas.eq.igas_CO)then … … 131 132 cpp_c = cpp_c + 0.6909*gfrac(igas)*60.07/mugaz_c 132 133 elseif(igas.eq.igas_HCl)then 134 cpp_c = cpp_c + 1.7087*gfrac(igas)*36.46/mugaz_c 135 elseif(igas.eq.igas_HCN)then 133 136 cpp_c = cpp_c + 1.7087*gfrac(igas)*36.46/mugaz_c 134 137 elseif(igas.eq.igas_HF)then -
trunk/LMDZ.PLUTO/libf/phypluto/gases_h.F90
r3669 r3691 32 32 integer :: igas_C2H4 33 33 integer :: igas_C2H6 34 !! GG MODIF Jan 201935 34 integer :: igas_OCS 36 35 integer :: igas_HCl 36 integer :: igas_HCN 37 37 integer :: igas_HF 38 38 !!$OMP THREADPRIVATE(ngasmx,vgas,gnom,gfrac,& -
trunk/LMDZ.PLUTO/libf/phypluto/optcv.F90
r3686 r3691 21 21 22 22 !================================================================== 23 ! 23 ! 24 24 ! Purpose 25 25 ! ------- 26 26 ! Calculates shortwave optical constants at each level. 27 ! 27 ! 28 28 ! Authors 29 29 ! ------- 30 30 ! Adapted from the NASA Ames code by R. Wordsworth (2009) 31 ! 31 ! 32 32 !================================================================== 33 ! 34 ! THIS SUBROUTINE SETS THE OPTICAL CONSTANTS IN THE VISUAL 33 ! 34 ! THIS SUBROUTINE SETS THE OPTICAL CONSTANTS IN THE VISUAL 35 35 ! IT CALCULATES FOR EACH LAYER, FOR EACH SPECTRAL INTERVAL IN THE VISUAL 36 36 ! LAYER: WBAR, DTAU, COSBAR 37 37 ! LEVEL: TAU 38 ! 38 ! 39 39 ! TAUV(L,NW,NG) is the cumulative optical depth at the top of radiation code 40 40 ! layer L. NW is spectral wavelength interval, ng the Gauss point index. 41 ! 41 ! 42 42 ! TLEV(L) - Temperature at the layer boundary 43 43 ! PLEV(L) - Pressure at the layer boundary (i.e. level) 44 ! GASV(NT,NPS,NW,NG) - Visible k-coefficients 45 ! 44 ! GASV(NT,NPS,NW,NG) - Visible k-coefficients 45 ! 46 46 !------------------------------------------------------------------- 47 47 … … 61 61 real*8,intent(in) :: GVAER(L_LEVELS,L_NSPECTV,NAERKIND) 62 62 real*8,intent(in) :: TAUAERO(L_LEVELS,NAERKIND) 63 63 64 64 ! local arrays (saved for convenience as need be allocated) 65 65 real*8,save,allocatable :: TAUAEROLK(:,:,:) 66 66 real*8,save,allocatable :: TAEROS(:,:,:) 67 !$OMP THREADPRIVATE(TAUAEROLK,TAEROS) 67 !$OMP THREADPRIVATE(TAUAEROLK,TAEROS) 68 68 69 69 integer L, NW, NG, K, LK, IAER 70 70 integer MT(L_LEVELS), MP(L_LEVELS), NP(L_LEVELS) 71 71 real*8 ANS, TAUGAS 72 real*8,intent(in) :: TAURAY(L_NSPECTV) 73 real*8 TRAY(L_LEVELS,L_NSPECTV) 72 real*8,intent(in) :: TAURAY(L_NSPECTV) ! Rayleigh scattering 73 real*8 TRAY(L_LEVELS,L_NSPECTV) ! Rayleigh scattering 74 74 real*8 DPR(L_LEVELS), U(L_LEVELS) 75 75 real*8 LCOEF(4), LKCOEF(L_LEVELS,4) … … 87 87 real*8 KCOEF(4) 88 88 integer NVAR(L_LEVELS) 89 89 90 90 ! temporary variables to reduce memory access time to gasv 91 91 real*8 tmpk(2,2) … … 130 130 131 131 taugsurf(:,:) = 0.0 132 dpr(:) = 0.0 132 dpr(:) = 0.0 ! pressure difference between levels 133 133 lkcoef(:,:) = 0.0 134 DTAUKV(:,:,:) = 0.0 134 DTAUKV(:,:,:) = 0.0 135 135 136 136 do K=2,L_LEVELS … … 140 140 if(kastprof)then 141 141 dz(k) = dpr(k)*(1000.0d0*8.3145d0/muvar(k))*TMID(K)/(g*PMID(K)) 142 U(k) = Cmk*DPR(k)*mugaz/muvar(k) 142 U(k) = Cmk*DPR(k)*mugaz/muvar(k) 143 143 else 144 144 dz(k) = dpr(k)*R*TMID(K)/(glat_ig*PMID(K))*mugaz/muvar(k) 145 U(k) = Cmk*DPR(k)*mugaz/muvar(k) ! only Cmk line in optci.F 145 U(k) = Cmk*DPR(k)*mugaz/muvar(k) ! only Cmk line in optci.F 146 146 !JL13 the mugaz/muvar factor takes into account water meanmolecular weight if water is present 147 147 endif … … 160 160 ! The tauaero and tauray are thus set to 0 (a small value for rayleigh because the code crashes otherwise) 161 161 ! in the 4 first semilayers in optcv, but not optci. 162 ! This solves random variations of the sw heating at the model top. 162 ! This solves random variations of the sw heating at the model top. 163 163 do iaer=1,naerkind 164 164 do NW=1,L_NSPECTV … … 169 169 end do 170 170 end do 171 171 172 172 ! Rayleigh scattering 173 173 do NW=1,L_NSPECTV … … 177 177 end do ! levels 178 178 end do 179 179 180 180 ! we ignore K=1... 181 181 do K=2,L_LEVELS … … 221 221 222 222 ! then cross-interactions with other gases !AF24: removed 223 223 224 224 ! elseif(igas.eq.igas_H2O.and.T_cont.gt.100.0)then !AF24: removed 225 225 226 226 endif 227 227 DCONT = DCONT + dtemp … … 242 242 243 243 if(L_REFVAR.eq.1)then ! added by RW for special no variable case 244 244 245 245 ! JVO 2017 : added tmpk because the repeated calls to gasi/v increased dramatically 246 246 ! the execution time of optci/v -> ~ factor 2 on the whole radiative … … 252 252 tmpk = GASV(MT(K):MT(K)+1,MP(K):MP(K)+1,1,NW,NG) 253 253 ENDIF 254 254 255 255 KCOEF(1) = tmpk(1,1) ! KCOEF(1) = GASV(MT(K),MP(K),1,NW,NG) 256 256 KCOEF(2) = tmpk(1,2) ! KCOEF(2) = GASV(MT(K),MP(K)+1,1,NW,NG) … … 274 274 KCOEF(3) = tmpkvar(2,2,1) + WRATIO(K) * & 275 275 ( tmpkvar(2,2,2)-tmpkvar(2,2,1) ) 276 276 277 277 KCOEF(4) = tmpkvar(2,1,1) + WRATIO(K) * & 278 278 ( tmpkvar(2,1,2)-tmpkvar(2,1,1) ) … … 289 289 290 290 TAUGSURF(NW,NG) = TAUGSURF(NW,NG) + TAUGAS + DCONT 291 DTAUKV(K,nw,ng) = TAUGAS & 291 DTAUKV(K,nw,ng) = TAUGAS & 292 292 + DRAYAER & ! DRAYAER includes all scattering contributions 293 293 + DCONT ! For parameterized continuum aborption … … 312 312 ! but not in the visible 313 313 ! The tauaero is thus set to 0 in the 4 first semilayers in optcv, but not optci. 314 ! This solves random variations of the sw heating at the model top. 314 ! This solves random variations of the sw heating at the model top. 315 315 do iaer=1,naerkind 316 316 DO NW=1,L_NSPECTV … … 331 331 COSBV(L,NW,1:L_NGAUSS) = atemp(L,NW)/btemp(L,NW) 332 332 END DO ! L vertical loop 333 333 334 334 ! Last level 335 335 L = L_NLAYRAD … … 340 340 btemp(L,NW) = btemp(L,NW) + TRAY(K,NW) 341 341 COSBV(L,NW,1:L_NGAUSS) = atemp(L,NW)/btemp(L,NW) 342 343 342 343 344 344 END DO ! NW spectral loop 345 345 … … 367 367 ! Total extinction optical depths 368 368 DO NG=1,L_NGAUSS ! full gauss loop 369 DO NW=1,L_NSPECTV 369 DO NW=1,L_NSPECTV 370 370 TAUV(1,NW,NG)=0.0D0 371 371 TAUCUMV(1,NW,NG)=0.0D0 372 372 373 373 DO K=2,L_LEVELS 374 374 TAUCUMV(K,NW,NG)=TAUCUMV(K-1,NW,NG)+DTAUKV(K,NW,NG) … … 379 379 END DO 380 380 TAUV(L,NW,NG)=TAUCUMV(2*L_NLAYRAD+1,NW,NG) 381 END DO 381 END DO 382 382 END DO ! end full gauss loop 383 383 -
trunk/LMDZ.PLUTO/libf/phypluto/su_gases.F90
r3669 r3691 118 118 igas_HCl=igas 119 119 count=count+1 120 elseif (trim(gnom(igas)).eq."HCN") then 121 igas_HCN=igas 122 count=count+1 120 123 elseif (trim(gnom(igas)).eq."HF") then 121 124 igas_HF=igas
Note: See TracChangeset
for help on using the changeset viewer.