Changeset 2655
- Timestamp:
- Mar 30, 2022, 12:19:20 PM (3 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r2625 r2655 1715 1715 Minor bug fix for aerave_new.F when input wavelenght in data file are in 1716 1716 descending order. 1717 1718 == 30/03/2022 == GM 1719 Major changes to CIA interpolation: 1720 1) Add contribution from CH4 (H2-CH4,He-CH4,CH4-CH4) ; 1721 2) Add some tests before interpolation for H2, He and CH4 ; 1722 3) Add the possibility to choose between a normal or equilibrium ortho:para 1723 fraction for CIA H2; 1724 4) Change "strictboundH2H2cia" to the generic "strictboundcia" for H2,He,CH4. 1725 It can be added for others CIA (N2,H,CO2...) if you want. -
trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90
r2635 r2655 14 14 logical,save :: strictboundcorrk 15 15 !$OMP THREADPRIVATE(strictboundcorrk) 16 logical,save :: strictbound H2H2cia17 !$OMP THREADPRIVATE(strictbound H2H2cia)16 logical,save :: strictboundcia 17 !$OMP THREADPRIVATE(strictboundcia) 18 18 19 19 logical,save :: enertest … … 76 76 integer,save :: startype 77 77 integer,save :: versH2H2cia 78 character(64),save :: H2orthopara_mixture 78 79 integer,save :: nlayaero 79 !$OMP THREADPRIVATE(iddist,iaervar,iradia,startype,versH2H2cia, nlayaero)80 !$OMP THREADPRIVATE(iddist,iaervar,iradia,startype,versH2H2cia,H2orthopara_mixture,nlayaero) 80 81 integer,dimension(:),allocatable,save :: aeronlay_choice 81 82 !$OMP THREADPRIVATE(aeronlay_choice) -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r2635 r2655 259 259 260 260 if (is_master) write(*,*) trim(rname)//& 261 ": prohibit calculations outside H2H2CIA T grid?"262 strictbound H2H2cia=.true. ! default value263 call getin_p("strictbound H2H2cia",strictboundH2H2cia)264 if (is_master) write(*,*) trim(rname)//& 265 ": strictbound H2H2cia = ",strictboundH2H2cia261 ": prohibit calculations outside CIA T grid?" 262 strictboundcia=.true. ! default value 263 call getin_p("strictboundcia",strictboundcia) 264 if (is_master) write(*,*) trim(rname)//& 265 ": strictboundcia = ",strictboundcia 266 266 267 267 if (is_master) write(*,*) trim(rname)//& … … 304 304 if (versH2H2cia.ne.2011 .and. versH2H2cia.ne.2018) then 305 305 call abort_physic(rname,"Error: Choose a correct value (2011 or 2018) for versH2H2cia !",1) 306 endif 306 endif 307 308 if (is_master) write(*,*) trim(rname)//& 309 ": CIA - normal or equilibrium ortho-para mixture for H2?" 310 H2orthopara_mixture = 'normal' 311 call getin_p("H2orthopara_mixture",H2orthopara_mixture) 312 if (is_master) write(*,*)trim(rname)//& 313 ": H2orthopara_mixture = ",trim(H2orthopara_mixture) 307 314 308 315 if (is_master) write(*,*) trim(rname)//& -
trunk/LMDZ.GENERIC/libf/phystd/interpolateH2H2.F90
r2633 r2655 1 1 2 subroutine interpolateH2H2(wn,temp,pres,abcoef,firstcall,ind) 2 3 … … 17 18 !================================================================== 18 19 19 use callkeys_mod, only: versH2H2cia, strictbound H2H2cia20 use callkeys_mod, only: versH2H2cia, strictboundcia, H2orthopara_mixture 20 21 use datafile_mod, only: datadir 21 22 … … 60 61 61 62 integer ind 62 63 63 64 if(temp.gt.400)then 64 if (strictboundH2H2cia) then 65 print*,'Your temperatures are too high for this H2-H2 CIA dataset. If you ' 66 print*,'really want to run simulations with hydrogen at T > 400 K, contact' 67 print*,'Robin Wordsworth [rwordsworth@uchicago.edu].' 68 stop 69 else 70 print*,'Your temperatures are too high for this H2-H2 CIA dataset' 71 print*,'you have chosen strictboundH2H2cia = ', strictboundH2H2cia 72 print*,'*********************************************************' 73 print*,' we allow model to continue but with temp = 400 ' 74 print*,' ... for H2-H2 CIA dataset ... ' 75 print*,' ... we assume we know what you are doing ... ' 76 print*,'*********************************************************' 77 temp = 400 78 endif 65 if (strictboundcia) then 66 print*,'Your temperatures are too high for this H2-H2 CIA dataset. If you ' 67 print*,'really want to run simulations with hydrogen at T > 400 K, contact' 68 print*,'Robin Wordsworth [rwordsworth@uchicago.edu].' 69 stop 70 else 71 print*,'Your temperatures are too high for this H2-H2 CIA dataset' 72 print*,'you have chosen strictboundcia = ', strictboundcia 73 print*,'*********************************************************' 74 print*,' we allow model to continue but with temp = 400 ' 75 print*,' ... for H2-H2 CIA dataset ... ' 76 print*,' ... we assume we know what you are doing ... ' 77 print*,'*********************************************************' 78 temp = 400 79 endif 80 elseif(temp.lt.40)then 81 if (strictboundcia) then 82 print*,'Your temperatures are too low for this H2-H2 CIA dataset. If you ' 83 print*,'really want to run simulations with hydrogen at T < 40 K, contact' 84 print*,'Robin Wordsworth [rwordsworth@uchicago.edu].' 85 stop 86 else 87 print*,'Your temperatures are too low for this H2-H2 CIA dataset' 88 print*,'you have chosen strictboundcia = ', strictboundcia 89 print*,'*********************************************************' 90 print*,' we allow model to continue but with temp = 40 ' 91 print*,' ... for H2-H2 CIA dataset ... ' 92 print*,' ... we assume we know what you are doing ... ' 93 print*,'*********************************************************' 94 temp = 40 95 endif 79 96 endif 80 97 … … 88 105 ! Only two possible versions for now : 2011 or 2018 (sanity check in inifis_mod) 89 106 if (versH2H2cia.eq.2011) then 90 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia'91 107 nS = 2428 108 if (H2orthopara_mixture.eq."normal") then 109 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia' 110 else if (H2orthopara_mixture.eq."equilibrium") then 111 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_eq_2011.cia' 112 endif 92 113 else if (versH2H2cia.eq.2018) then 93 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2018.cia'94 114 nS = 9600 115 if (H2orthopara_mixture.eq."normal") then 116 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2018.cia' 117 else if (H2orthopara_mixture.eq."equilibrium") then 118 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_eq_2018.cia' 119 endif 95 120 endif 96 121 … … 106 131 write(*,*) 'is correct. You can change it in callphys.def with:' 107 132 write(*,*) 'datadir = /absolute/path/to/datagcm' 108 write(*,*) 'Also check that the continuum data continuum_data/H2-H2_norm_2011.cia or H2-H2_norm_2018.ciais there.'133 write(*,*) 'Also check that the continuum data is there.' 109 134 call abort 110 135 else … … 113 138 write(*,*) '... You are using H2-H2 CIA from 2011 but you should use more recent data available on HITRAN !' 114 139 write(*,*) '... (Especially if you are running a giant planet atmosphere)' 115 write(*,*) '... Just find out the H2-H2 _norm_2018.cia, put it in your datadir and have a look at interpolateH2H2.F90 ! .'140 write(*,*) '... Just find out the H2-H2 CIA from 2018, put it in your datadir and have a look at interpolateH2H2.F90 ! .' 116 141 endif 117 142 … … 149 174 150 175 endif 151 176 177 178 152 179 call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind) 153 180 -
trunk/LMDZ.GENERIC/libf/phystd/interpolateH2He.F90
r1315 r2655 14 14 !================================================================== 15 15 16 use callkeys_mod, only: H2orthopara_mixture, strictboundcia 16 17 use datafile_mod, only: datadir 17 18 … … 57 58 58 59 integer ind 59 60 60 61 if(temp.gt.400)then 61 print*,'Your temperatures are too high for this H2-He CIA dataset.' 62 print*,'Please run mixed H2-He atmospheres below T = 400 K.' 63 stop 62 if (strictboundcia) then 63 print*,'Your temperatures are too high for this H2-He CIA dataset.' 64 print*,'Please run mixed H2-He atmospheres below T = 400 K.' 65 stop 66 else 67 print*,'Your temperatures are too high for this H2-He CIA dataset' 68 print*,'you have chosen strictboundcia = ', strictboundcia 69 print*,'*********************************************************' 70 print*,' we allow model to continue but with temp = 400 ' 71 print*,' ... for H2-He CIA dataset ... ' 72 print*,' ... we assume we know what you are doing ... ' 73 print*,'*********************************************************' 74 temp = 400 75 endif 76 elseif(temp.lt.40)then 77 if (strictboundcia) then 78 print*,'Your temperatures are too low for this H2-He CIA dataset.' 79 print*,'Please run mixed H2-He atmospheres above T = 40 K.' 80 stop 81 else 82 print*,'Your temperatures are too low for this H2-He CIA dataset' 83 print*,'you have chosen strictboundcia = ', strictboundcia 84 print*,'*********************************************************' 85 print*,' we allow model to continue but with temp = 40 ' 86 print*,' ... for H2-He CIA dataset ... ' 87 print*,' ... we assume we know what you are doing ... ' 88 print*,'*********************************************************' 89 temp = 40 90 endif 64 91 endif 65 92 … … 72 99 73 100 ! 1.1 Open the ASCII files 74 dt_file=TRIM(datadir)//'/continuum_data/H2-He_norm_2011.cia' 101 if (H2orthopara_mixture.eq."normal") then 102 dt_file=TRIM(datadir)//'/continuum_data/H2-He_norm_2011.cia' 103 else if (H2orthopara_mixture.eq."equilibrium") then 104 dt_file=TRIM(datadir)//'/continuum_data/H2-He_eq_2011.cia' 105 endif 75 106 76 107 !$OMP MASTER … … 82 113 write(*,*) 'is correct. You can change it in callphys.def with:' 83 114 write(*,*) 'datadir = /absolute/path/to/datagcm' 84 write(*,*) 'Also check that the continuum data continuum_data/H2-He_norm_2011.ciais there.'115 write(*,*) 'Also check that the continuum data is there.' 85 116 call abort 86 117 else -
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r2582 r2655 12 12 L_NLEVRAD, L_REFVAR, naerkind 13 13 use radcommon_h, only: gasi,tlimit,wrefVAR,Cmk,tgasref,pfgasref,wnoi,scalep,indi,glat_ig 14 use gases_h, only: gfrac, ngasmx, igas_N2, igas_He, igas_H2O, igas_H2 14 use gases_h, only: gfrac, ngasmx, igas_N2, igas_He, igas_H2O, igas_H2, igas_CH4 15 15 use comcstfi_mod, only: g, r, mugaz 16 16 use callkeys_mod, only: kastprof,continuum,graybody … … 208 208 enddo 209 209 210 elseif(igas.eq.igas_CH4)then 211 212 ! first do self-induced absorption 213 interm = indi(nw,igas,igas) 214 call interpolateCH4CH4(wn_cont,T_cont,p_cont,dtemp,.false.,interm) 215 indi(nw,igas,igas) = interm 216 217 ! then cross-interactions with other gases 218 do jgas=1,ngasmx 219 p_cross = dble(PMID(k)*scalep*gfrac(jgas)*(1.-QVAR(k))) 220 dtempc = 0.0d0 221 if(jgas.eq.igas_H2)then 222 interm = indi(nw,igas,jgas) 223 call interpolateH2CH4(wn_cont,T_cont,p_cross,p_cont,dtempc,.false.,interm) 224 indi(nw,igas,jgas) = interm 225 elseif(jgas.eq.igas_He)then 226 interm = indi(nw,igas,jgas) 227 call interpolateHeCH4(wn_cont,T_cont,p_cross,p_cont,dtempc,.false.,interm) 228 indi(nw,igas,jgas) = interm 229 endif 230 dtemp = dtemp + dtempc 231 enddo 232 210 233 elseif(igas.eq.igas_H2O.and.T_cont.gt.100.0)then 211 234 ! Compute self and foreign (with air) continuum of H2O -
trunk/LMDZ.GENERIC/libf/phystd/optcv.F90
r2582 r2655 11 11 use radinc_h, only: L_NLAYRAD, L_NLEVRAD, L_LEVELS, L_NSPECTV, L_NGAUSS, L_REFVAR, NAERKIND 12 12 use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep,indv,glat_ig 13 use gases_h, only: gfrac, ngasmx, igas_H2, igas_H2O, igas_He, igas_N2 13 use gases_h, only: gfrac, ngasmx, igas_H2, igas_H2O, igas_He, igas_N2, igas_CH4 14 14 use comcstfi_mod, only: g, r, mugaz 15 15 use callkeys_mod, only: kastprof,continuum,graybody,callgasvis … … 215 215 dtemp = dtemp + dtempc 216 216 enddo 217 218 elseif(igas.eq.igas_CH4)then 219 220 ! first do self-induced absorption 221 interm = indv(nw,igas,igas) 222 call interpolateCH4CH4(wn_cont,T_cont,p_cont,dtemp,.false.,interm) 223 indv(nw,igas,igas) = interm 224 225 ! then cross-interactions with other gases 226 do jgas=1,ngasmx 227 p_cross = dble(PMID(k)*scalep*gfrac(jgas)*(1.-QVAR(k))) 228 dtempc = 0.0d0 229 if(jgas.eq.igas_H2)then 230 interm = indv(nw,igas,jgas) 231 call interpolateH2CH4(wn_cont,T_cont,p_cross,p_cont,dtempc,.false.,interm) 232 indv(nw,igas,jgas) = interm 233 elseif(jgas.eq.igas_He)then 234 interm = indv(nw,igas,jgas) 235 call interpolateHeCH4(wn_cont,T_cont,p_cross,p_cont,dtempc,.false.,interm) 236 indv(nw,igas,jgas) = interm 237 endif 238 dtemp = dtemp + dtempc 239 enddo 217 240 218 241 elseif(igas.eq.igas_H2O.and.T_cont.gt.100.0)then -
trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
r2585 r2655 30 30 use comcstfi_mod, only: mugaz 31 31 use gases_h, only: gnom, ngasmx, & 32 igas_H2, igas_H2O, igas_He, igas_N2 32 igas_H2, igas_H2O, igas_He, igas_N2, igas_CH4 33 33 use ioipsl_getin_p_mod, only: getin_p 34 34 use callkeys_mod, only: varactive,varfixed,graybody,callgasvis,& … … 737 737 endif 738 738 enddo 739 740 741 elseif (igas .eq. igas_CH4) then 742 743 ! first do self-induced absorption 744 dummy = -9999 745 call interpolateCH4CH4(600.0,66.7,400.0,testcont,.true.,dummy) 746 ! then cross-interactions with other gases 747 do jgas=1,ngasmx 748 if (jgas .eq. igas_H2) then 749 dummy = -9999 750 call interpolateH2CH4(500.D+0,250.D+0,200000.D+0,10000.D+0,testcont,.true.,dummy) 751 elseif (jgas .eq. igas_He) then 752 dummy = -9999 753 call interpolateHeCH4(500.D+0,250.D+0,200000.D+0,10000.D+0,testcont,.true.,dummy) 754 endif 755 enddo 756 739 757 740 758 elseif (igas .eq. igas_H2O) then
Note: See TracChangeset
for help on using the changeset viewer.