- Timestamp:
- Feb 23, 2025, 10:53:43 PM (30 hours ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/changelog.txt
r3621 r3641 1994 1994 Follow-up of recent changes in iostart (making 1D restarts) from r3562, 1995 1995 Correspondingly adapt newstart. 1996 1997 == 23/02/2025 == MT 1998 Implement the new generic continuum database 1999 More details here: https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Continuum_Database -
trunk/LMDZ.GENERIC/libf/phystd/calc_cpp_mugaz.F90
r2831 r3641 45 45 elseif(igas.eq.igas_N2)then 46 46 mugaz_c = mugaz_c + 28.01*gfrac(igas) 47 elseif(igas.eq.igas_O2)then 48 mugaz_c = mugaz_c + 31.999*gfrac(igas) 47 49 elseif(igas.eq.igas_H2)then 48 50 mugaz_c = mugaz_c + 2.01*gfrac(igas) … … 98 100 elseif(igas.eq.igas_N2)then 99 101 cpp_c = cpp_c + 1.040*gfrac(igas)*28.01/mugaz_c 102 elseif(igas.eq.igas_O2)then 103 cpp_c = cpp_c + 0.918*gfrac(igas)*31.999/mugaz_c 100 104 elseif(igas.eq.igas_H2)then 101 105 cpp_c = cpp_c + 14.31*gfrac(igas)*2.01/mugaz_c -
trunk/LMDZ.GENERIC/libf/phystd/calc_rayleigh.F90
r3043 r3641 29 29 use radcommon_h, only: WAVEV, BWNV, DWNV, tstellar, tauray, taurayvar, scalep 30 30 use gases_h, only: ngasmx, vgas, gnom, gfrac, igas_CO2, igas_H2, & 31 igas_H2O, igas_He, igas_N2, igas_CH4, igas_CO 31 igas_H2O, igas_He, igas_N2, igas_CH4, igas_CO, & 32 igas_O2 32 33 use comcstfi_mod, only: g, mugaz, pi 33 34 -
trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90
r3309 r3641 13 13 logical,save :: season,diurnal,tlocked,rings_shadow,lwrite 14 14 !$OMP THREADPRIVATE(season,diurnal,tlocked,rings_shadow,lwrite) 15 logical,save :: callgasvis,continuum,g raybody16 !$OMP THREADPRIVATE(callgasvis,continuum,g raybody)15 logical,save :: callgasvis,continuum,generic_continuum_database,graybody 16 !$OMP THREADPRIVATE(callgasvis,continuum,generic_continuum_database,graybody) 17 17 logical,save :: strictboundcorrk 18 18 !$OMP THREADPRIVATE(strictboundcorrk) -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r3437 r3641 341 341 call getin_p("continuum",continuum) 342 342 if (is_master) write(*,*) trim(rname)//": continuum = ",continuum 343 344 if (is_master) write(*,*) trim(rname)//& 345 ": use generic continuum opacity database ?"//& 346 " (matters only if callrad=T)" 347 generic_continuum_database=.true. ! default value 348 call getin_p("generic_continuum_database",generic_continuum_database) 349 if (is_master) write(*,*) trim(rname)//": generic_continuum_database = ", & 350 generic_continuum_database 343 351 344 352 if (is_master) write(*,*) trim(rname)//": version for H2H2 CIA file ?" -
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r3233 r3641 13 13 use radcommon_h, only: gasi,tlimit,wrefVAR,Cmk,tgasref,pfgasref,wnoi,scalep,indi,glat_ig 14 14 use gases_h, only: gfrac, ngasmx, igas_N2, igas_He, igas_H2O, igas_H2, & 15 igas_CH4, igas_CO2 15 igas_CH4, igas_CO2, igas_O2 16 16 use comcstfi_mod, only: g, r, mugaz 17 use callkeys_mod, only: kastprof,continuum,graybody,varspec 17 use callkeys_mod, only: kastprof,continuum,graybody,varspec, & 18 generic_continuum_database 18 19 use recombin_corrk_mod, only: corrk_recombin, gasi_recomb 19 20 use tpindex_mod, only: tpindex … … 188 189 if(continuum.and.(.not.graybody))then 189 190 ! include continua if necessary 190 wn_cont = dble(wnoi(nw)) 191 T_cont = dble(TMID(k)) 192 do igas=1,ngasmx 191 192 if(generic_continuum_database)then 193 T_cont = dble(TMID(k)) 194 do igas=1,ngasmx 195 196 if(gfrac(igas).eq.-1)then ! variable 197 p_cont = dble(PMID(k)*scalep*QVAR(k)) ! qvar = mol/mol 198 elseif(varspec) then 199 p_cont = dble(PMID(k)*scalep*FRACVAR(igas,k)*(1.-QVAR(k))) 200 else 201 p_cont = dble(PMID(k)*scalep*gfrac(igas)*(1.-QVAR(k))) 202 endif 203 204 dtemp=0.0 205 206 if (igas .eq. igas_N2) then 207 call interpolate_continuum('',igas_N2,igas_N2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 208 do jgas=1,ngasmx 209 if (jgas .eq. igas_H2) then 210 call interpolate_continuum('',igas_N2,igas_H2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 211 elseif (jgas .eq. igas_O2) then 212 call interpolate_continuum('',igas_N2,igas_O2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 213 elseif (jgas .eq. igas_CH4) then 214 call interpolate_continuum('',igas_N2,igas_CH4,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 215 endif 216 enddo 217 elseif (igas .eq. igas_O2) then 218 call interpolate_continuum('',igas_O2,igas_O2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 219 do jgas=1,ngasmx 220 if (jgas .eq. igas_CO2) then 221 call interpolate_continuum('',igas_CO2,igas_O2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 222 endif 223 enddo 224 elseif (igas .eq. igas_H2) then 225 call interpolate_continuum('',igas_H2,igas_H2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 226 do jgas=1,ngasmx 227 if (jgas .eq. igas_CH4) then 228 call interpolate_continuum('',igas_H2,igas_CH4,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 229 elseif (jgas .eq. igas_He) then 230 call interpolate_continuum('',igas_H2,igas_He,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 231 endif 232 enddo 233 elseif (igas .eq. igas_CH4) then 234 call interpolate_continuum('',igas_CH4,igas_CH4,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 235 elseif (igas .eq. igas_H2O) then 236 call interpolate_continuum('',igas_H2O,igas_H2O,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 237 do jgas=1,ngasmx 238 if (jgas .eq. igas_N2) then 239 call interpolate_continuum('',igas_H2O,igas_N2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 240 elseif (jgas .eq. igas_O2) then 241 call interpolate_continuum('',igas_H2O,igas_O2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 242 elseif (jgas .eq. igas_CO2) then 243 call interpolate_continuum('',igas_H2O,igas_CO2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 244 endif 245 enddo 246 elseif (igas .eq. igas_CO2) then 247 call interpolate_continuum('',igas_CO2,igas_CO2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 248 do jgas=1,ngasmx 249 if (jgas .eq. igas_H2) then 250 call interpolate_continuum('',igas_CO2,igas_H2,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 251 elseif (jgas .eq. igas_CH4) then 252 call interpolate_continuum('',igas_CO2,igas_CH4,'IR',nw,T_cont,p_cont,p_cont,dtemp,.false.) 253 endif 254 enddo 255 endif 256 257 DCONT = DCONT + dtemp 258 259 enddo ! igas=1,ngasmx 260 else ! generic_continuum_database 261 wn_cont = dble(wnoi(nw)) 262 T_cont = dble(TMID(k)) 263 do igas=1,ngasmx 193 264 194 265 if(gfrac(igas).eq.-1)then ! variable … … 295 366 DCONT = DCONT*dz(k) 296 367 297 endif 368 endif ! generic_continuum_database 369 370 endif ! continuum 298 371 299 372 do ng=1,L_NGAUSS-1 -
trunk/LMDZ.GENERIC/libf/phystd/optcv.F90
r3233 r3641 12 12 use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep,indv,glat_ig 13 13 use gases_h, only: gfrac, ngasmx, igas_H2, igas_H2O, igas_He, igas_N2, & 14 igas_CH4, igas_CO2 14 igas_CH4, igas_CO2, igas_O2 15 15 use comcstfi_mod, only: g, r, mugaz 16 use callkeys_mod, only: kastprof,continuum,graybody,callgasvis,varspec 16 use callkeys_mod, only: kastprof,continuum,graybody,callgasvis,varspec, & 17 generic_continuum_database 17 18 use recombin_corrk_mod, only: corrk_recombin, gasv_recomb 18 19 use tpindex_mod, only: tpindex … … 193 194 if(continuum.and.(.not.graybody).and.callgasvis)then 194 195 ! include continua if necessary 196 197 if(generic_continuum_database)then 198 T_cont = dble(TMID(k)) 199 do igas=1,ngasmx 200 201 if(gfrac(igas).eq.-1)then ! variable 202 p_cont = dble(PMID(k)*scalep*QVAR(k)) ! qvar = mol/mol 203 elseif(varspec) then 204 p_cont = dble(PMID(k)*scalep*FRACVAR(igas,k)*(1.-QVAR(k))) 205 else 206 p_cont = dble(PMID(k)*scalep*gfrac(igas)*(1.-QVAR(k))) 207 endif 208 209 dtemp=0.0 210 211 if (igas .eq. igas_N2) then 212 call interpolate_continuum('',igas_N2,igas_N2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 213 do jgas=1,ngasmx 214 if (jgas .eq. igas_H2) then 215 call interpolate_continuum('',igas_N2,igas_H2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 216 elseif (jgas .eq. igas_O2) then 217 call interpolate_continuum('',igas_N2,igas_O2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 218 elseif (jgas .eq. igas_CH4) then 219 call interpolate_continuum('',igas_N2,igas_CH4,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 220 endif 221 enddo 222 elseif (igas .eq. igas_O2) then 223 call interpolate_continuum('',igas_O2,igas_O2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 224 do jgas=1,ngasmx 225 if (jgas .eq. igas_CO2) then 226 call interpolate_continuum('',igas_CO2,igas_O2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 227 endif 228 enddo 229 elseif (igas .eq. igas_H2) then 230 call interpolate_continuum('',igas_H2,igas_H2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 231 do jgas=1,ngasmx 232 if (jgas .eq. igas_CH4) then 233 call interpolate_continuum('',igas_H2,igas_CH4,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 234 elseif (jgas .eq. igas_He) then 235 call interpolate_continuum('',igas_H2,igas_He,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 236 endif 237 enddo 238 elseif (igas .eq. igas_CH4) then 239 call interpolate_continuum('',igas_CH4,igas_CH4,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 240 elseif (igas .eq. igas_H2O) then 241 call interpolate_continuum('',igas_H2O,igas_H2O,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 242 do jgas=1,ngasmx 243 if (jgas .eq. igas_N2) then 244 call interpolate_continuum('',igas_H2O,igas_N2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 245 elseif (jgas .eq. igas_O2) then 246 call interpolate_continuum('',igas_H2O,igas_O2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 247 elseif (jgas .eq. igas_CO2) then 248 call interpolate_continuum('',igas_H2O,igas_CO2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 249 endif 250 enddo 251 elseif (igas .eq. igas_CO2) then 252 call interpolate_continuum('',igas_CO2,igas_CO2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 253 do jgas=1,ngasmx 254 if (jgas .eq. igas_H2) then 255 call interpolate_continuum('',igas_CO2,igas_H2,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 256 elseif (jgas .eq. igas_CH4) then 257 call interpolate_continuum('',igas_CO2,igas_CH4,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 258 endif 259 enddo 260 endif 261 262 DCONT = DCONT + dtemp 263 264 enddo ! igas=1,ngasmx 265 266 else ! generic_continuum_database 267 268 195 269 wn_cont = dble(wnov(nw)) 196 270 T_cont = dble(TMID(k)) … … 293 367 DCONT = DCONT*dz(k) 294 368 295 endif 296 369 endif ! generic_continuum_database 370 endif ! continuum 371 297 372 do ng=1,L_NGAUSS-1 298 373 -
trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
r2875 r3641 31 31 use gases_h, only: gnom, ngasmx, & 32 32 igas_H2, igas_H2O, igas_He, igas_N2, igas_CH4, & 33 igas_CO2 33 igas_CO2, igas_O2 34 34 use ioipsl_getin_p_mod, only: getin_p 35 35 use callkeys_mod, only: varactive,varfixed,graybody,callgasvis,& 36 continuum 36 continuum,generic_continuum_database 37 37 use tracer_h, only : nqtot, moderntracdef, is_recomb, noms 38 38 use recombin_corrk_mod, only: su_recombin, & … … 716 716 ! Initialise the continuum absorption data 717 717 if(continuum)then 718 do igas=1,ngasmx 719 718 if(generic_continuum_database)then 719 do igas=1,ngasmx ! we loop on all pairs of molecules that have data available 720 ! data can be downloaded from https://web.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/continuum_data/ 721 if (igas .eq. igas_N2) then 722 file_id='/continuum_data/' // 'N2-N2_continuum_70-500K_2025.dat' 723 file_path=TRIM(datadir)//TRIM(file_id) 724 call interpolate_continuum(file_path,igas_N2,igas_N2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 725 do jgas=1,ngasmx 726 if (jgas .eq. igas_H2) then 727 file_id='/continuum_data/' // 'H2-N2_continuum_40-600K_2025.dat' 728 file_path=TRIM(datadir)//TRIM(file_id) 729 call interpolate_continuum(file_path,igas_N2,igas_H2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 730 elseif (jgas .eq. igas_O2) then 731 file_id='/continuum_data/' // 'O2-N2_continuum_100-500K_2025.dat' 732 file_path=TRIM(datadir)//TRIM(file_id) 733 call interpolate_continuum(file_path,igas_N2,igas_O2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 734 elseif (jgas .eq. igas_CH4) then 735 file_id='/continuum_data/' // 'CH4-N2_continuum_40-600K_2025.dat' 736 file_path=TRIM(datadir)//TRIM(file_id) 737 call interpolate_continuum(file_path,igas_N2,igas_CH4,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 738 endif 739 enddo 740 elseif (igas .eq. igas_O2) then 741 file_id='/continuum_data/' // 'O2-O2_continuum_100-400K_2025.dat' 742 file_path=TRIM(datadir)//TRIM(file_id) 743 call interpolate_continuum(file_path,igas_O2,igas_O2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 744 do jgas=1,ngasmx 745 if (jgas .eq. igas_CO2) then 746 file_id='/continuum_data/' // 'CO2-O2_continuum_150-600K_2025.dat' 747 file_path=TRIM(datadir)//TRIM(file_id) 748 call interpolate_continuum(file_path,igas_CO2,igas_O2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 749 endif 750 enddo 751 elseif (igas .eq. igas_H2) then 752 file_id='/continuum_data/' // 'H2-H2_continuum_40-7000K_2025.dat' 753 file_path=TRIM(datadir)//TRIM(file_id) 754 call interpolate_continuum(file_path,igas_H2,igas_H2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 755 do jgas=1,ngasmx 756 if (jgas .eq. igas_CH4) then 757 file_id='/continuum_data/' // 'H2-CH4_continuum_40-600K_2025.dat' 758 file_path=TRIM(datadir)//TRIM(file_id) 759 call interpolate_continuum(file_path,igas_H2,igas_CH4,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 760 elseif (jgas .eq. igas_He) then 761 file_id='/continuum_data/' // 'H2-He_continuum_40-5500K_2025.dat' 762 file_path=TRIM(datadir)//TRIM(file_id) 763 call interpolate_continuum(file_path,igas_H2,igas_He,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 764 endif 765 enddo 766 elseif (igas .eq. igas_CH4) then 767 file_id='/continuum_data/' // 'CH4-CH4_continuum_40-500K_2025.dat' 768 file_path=TRIM(datadir)//TRIM(file_id) 769 call interpolate_continuum(file_path,igas_CH4,igas_CH4,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 770 elseif (igas .eq. igas_H2O) then 771 file_id='/continuum_data/' // 'H2O-H2O_continuum_100-2000K_2025.dat' 772 file_path=TRIM(datadir)//TRIM(file_id) 773 call interpolate_continuum(file_path,igas_H2O,igas_H2O,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 774 do jgas=1,ngasmx 775 if (jgas .eq. igas_N2) then 776 file_id='/continuum_data/' // 'H2O-N2_continuum_100-2000K_2025.dat' 777 file_path=TRIM(datadir)//TRIM(file_id) 778 call interpolate_continuum(file_path,igas_H2O,igas_N2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 779 elseif (jgas .eq. igas_O2) then 780 file_id='/continuum_data/' // 'H2O-O2_continuum_100-2000K_2025.dat' 781 file_path=TRIM(datadir)//TRIM(file_id) 782 call interpolate_continuum(file_path,igas_H2O,igas_O2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 783 elseif (jgas .eq. igas_CO2) then 784 file_id='/continuum_data/' // 'H2O-CO2_continuum_100-800K_2025.dat' 785 file_path=TRIM(datadir)//TRIM(file_id) 786 call interpolate_continuum(file_path,igas_H2O,igas_CO2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 787 endif 788 enddo 789 elseif (igas .eq. igas_CO2) then 790 file_id='/continuum_data/' // 'CO2-CO2_continuum_100-800K_2025.dat' 791 file_path=TRIM(datadir)//TRIM(file_id) 792 call interpolate_continuum(file_path,igas_CO2,igas_CO2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 793 do jgas=1,ngasmx 794 if (jgas .eq. igas_H2) then 795 file_id='/continuum_data/' // 'CO2-H2_continuum_100-800K_2025.dat' 796 file_path=TRIM(datadir)//TRIM(file_id) 797 call interpolate_continuum(file_path,igas_CO2,igas_H2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 798 elseif (jgas .eq. igas_CH4) then 799 file_id='/continuum_data/' // 'CO2-CH4_continuum_100-800K_2025.dat' 800 file_path=TRIM(datadir)//TRIM(file_id) 801 call interpolate_continuum(file_path,igas_CO2,igas_CH4,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 802 endif 803 enddo 804 endif 805 enddo ! igas=1,ngasmx 806 807 else ! generic_continuum_database tag 808 do igas=1,ngasmx 720 809 if (igas .eq. igas_N2) then 721 810 … … 771 860 endif 772 861 773 enddo 774 endif 862 enddo ! igas=1,ngasmx 863 endif ! generic_continuum_database tag 864 endif ! continuum flag 775 865 776 866 print*,'----------------------------------------------------'
Note: See TracChangeset
for help on using the changeset viewer.