Changeset 2245
- Timestamp:
- Feb 24, 2020, 6:55:50 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r2243 r2245 1511 1511 - Get rid of the old 'sparadrap' in iniorbit.F assuming Mkm instead of AU if periastre or apostre gt 25, (otherwise Neptune is a pb) 1512 1512 Everybody should be using AU, that's all. 1513 1514 == 24/02/2020 (r2244) == JVO 1515 + Add a 'versH2H2cia' int key in callphys that allows two values (2011 or 2018) to 1516 deal with updated HITRAN file (for interpolateH2H2.F90) from 2018 that includes the 1517 H2H2 dimer from Fletcher et al. 2018, useful for giant planets. 1518 Retrocompatibility is ok, default value to 2011. -
trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90
r2131 r2245 62 62 !$OMP THREADPRIVATE(photochem) 63 63 64 integer,save :: versH2H2cia 64 65 integer,save :: iddist 65 66 integer,save :: iaervar 66 67 integer,save :: iradia 67 68 integer,save :: startype 68 !$OMP THREADPRIVATE( iddist,iaervar,iradia,startype)69 !$OMP THREADPRIVATE(versH2H2cia,iddist,iaervar,iradia,startype) 69 70 70 71 real,save :: topdustref -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r2138 r2245 250 250 write(*,*) " H2Ocont_simple = ",H2Ocont_simple 251 251 252 write(*,*) "version for H2H2 CIA file ?" 253 versH2H2cia=2011 ! default value (should be 2018 but retrocompatibility first) 254 call getin_p("versH2H2cia",versH2H2cia) 255 write(*,*) " versH2H2cia = ",versH2H2cia 256 ! Sanity check 257 if (versH2H2cia.ne.2011 .and. versH2H2cia.ne.2018) then 258 print*,'Error: Choose a correct value (2011 or 2018) for versH2H2cia !' 259 call abort 260 endif 261 252 262 write(*,*) "call turbulent vertical diffusion ?" 253 263 calldifv=.true. ! default value -
trunk/LMDZ.GENERIC/libf/phystd/interpolateH2H2.F90
r1315 r2245 6 6 ! ------- 7 7 ! Calculates the H2-H2 CIA opacity, using a lookup table from 8 ! HITRAN (2011 )8 ! HITRAN (2011 or later) 9 9 ! 10 10 ! Authors 11 11 ! ------- 12 12 ! R. Wordsworth (2011) 13 ! 13 ! 14 ! + J.Vatant d'Ollone (2019) 15 ! - Enable updated HITRAN file (Karman2019,Fletcher2018) 16 ! (2018 one should be default for giant planets) 14 17 !================================================================== 15 18 19 use callkeys_mod, only: versH2H2cia 16 20 use datafile_mod, only: datadir 17 21 … … 27 31 28 32 integer nS,nT 29 parameter(nS=2428)30 33 parameter(nT=10) 31 34 … … 36 39 37 40 double precision amagat 38 double precision wn_arr(nS)39 41 double precision temp_arr(nT) 40 double precision abs_arr(nS,nT) 42 43 double precision, dimension(:), allocatable :: wn_arr 44 double precision, dimension(:,:), allocatable :: abs_arr 41 45 42 46 integer k,iT 43 47 logical firstcall 44 48 45 save wn_arr, temp_arr, abs_arr !read by master49 save nS, wn_arr, temp_arr, abs_arr !read by master 46 50 47 51 character*100 dt_file 48 integer strlen,ios52 integer ios 49 53 50 character(LEN=*), parameter :: fmat1 = "(A20,F10.3,F10.3,I7,F7.1,E10.3,F5.3)" 54 character(LEN=*), parameter :: fmat11 = "(A20,F10.3,F10.3,I7,F7.1,E10.3,F5.3)" 55 character(LEN=*), parameter :: fmat18 = "(A12,A3,A5,F10.6,F10.4,I7,F7.3,E10.3,F5.3)" 51 56 52 57 character*20 bleh … … 69 74 print*,'Initialising H2-H2 continuum from HITRAN database...' 70 75 71 ! 1.1 Open the ASCII files 72 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia' 76 ! 1.1 Open the ASCII files and set nS according to version 77 ! Only two possible versions for now : 2011 or 2018 (sanity check in inifis_mod) 78 if (versH2H2cia.eq.2011) then 79 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia' 80 nS = 2428 81 else if (versH2H2cia.eq.2018) then 82 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2018.cia' 83 nS = 9600 84 endif 85 86 if(.not.allocated(wn_arr)) allocate(wn_arr(nS)) 87 if(.not.allocated(abs_arr)) allocate(abs_arr(nS,nT)) 73 88 74 89 !$OMP MASTER … … 80 95 write(*,*) 'is correct. You can change it in callphys.def with:' 81 96 write(*,*) 'datadir = /absolute/path/to/datagcm' 82 write(*,*) 'Also check that the continuum data continuum_data/H2-H2_norm_2011.cia is there.'97 write(*,*) 'Also check that the continuum data continuum_data/H2-H2_norm_2011.cia or H2-H2_norm_2018.cia is there.' 83 98 call abort 84 99 else 100 101 if(versH2H2cia.eq.2011) then 102 write(*,*) '... You are using H2-H2 CIA from 2011 but you should use more recent data available on HITRAN !' 103 write(*,*) '... (Especially if you are running a giant planet atmosphere)' 104 write(*,*) '... Just find out the H2-H2_norm_2018.cia, put it in your datadir and have a look at interpolateH2H2.F90 ! .' 105 endif 85 106 86 107 do iT=1,nT 108 109 ! Only two possibles values for now : 2011 or 2018 (sanity check in inifis_mod) 110 if(versH2H2cia.eq.2011) then 111 read(33,fmat11) bleh,blah,blah,nres,Ttemp 112 else if (versH2H2cia.eq.2018) then 113 read(33,fmat18) bleh,bleh,bleh,blah,blah,nres,Ttemp 114 endif 87 115 88 read(33,fmat1) bleh,blah,blah,nres,Ttemp89 116 if(nS.ne.nres)then 90 117 print*,'Resolution given in file: ',trim(dt_file) -
trunk/LMDZ.TITAN/README
r2242 r2245 1576 1576 - Given theses pbs with the radii, also update the optics so that it computes the opacities in 1577 1577 a simpler way, directly for M3, through look-up tables, M3 being a good proxy. 1578 1579 == 24/02/2020 (r2244) == JVO 1580 + Add a 'versH2H2cia' int key in callphys that allows two values (2011 or 2018) to 1581 deal with updated HITRAN file (for interpolateH2H2.F90) from 2018 that includes the 1582 H2H2 dimer from Fletcher et al. 2018, useful for giant planets. 1583 Retrocompatibility is ok, default value to 2011. 1584 -
trunk/LMDZ.TITAN/libf/phytitan/callkeys_mod.F90
r2131 r2245 48 48 integer,save :: ichim 49 49 !$OMP THREADPRIVATE(ichim) 50 integer,save :: versH2H2cia 50 51 integer,save :: iddist 51 52 integer,save :: iradia 52 53 integer,save :: startype 53 !$OMP THREADPRIVATE( iddist,iradia,startype)54 !$OMP THREADPRIVATE(versH2H2cia,iddist,iradia,startype) 54 55 55 56 real,save :: p_prod, tx_prod, rc_prod -
trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
r2241 r2245 288 288 write(*,*) " continuum = ",continuum 289 289 290 write(*,*) "version for H2H2 CIA file ?" 291 versH2H2cia=2011 ! default value (should be 2018 but retrocompatibility first) 292 call getin_p("versH2H2cia",versH2H2cia) 293 write(*,*) " versH2H2cia = ",versH2H2cia 294 ! Sanity check 295 if (versH2H2cia.ne.2011 .and. versH2H2cia.ne.2018) then 296 print*,'Error: Choose a correct value (2011 or 2018) for versH2H2cia !' 297 call abort 298 endif 299 290 300 write(*,*) "call turbulent vertical diffusion ?" 291 301 calldifv=.true. ! default value -
trunk/LMDZ.TITAN/libf/phytitan/interpolateH2H2.F90
r1315 r2245 6 6 ! ------- 7 7 ! Calculates the H2-H2 CIA opacity, using a lookup table from 8 ! HITRAN (2011 )8 ! HITRAN (2011 or later) 9 9 ! 10 10 ! Authors 11 11 ! ------- 12 12 ! R. Wordsworth (2011) 13 ! 13 ! 14 ! + J.Vatant d'Ollone (2019) 15 ! - Enable updated HITRAN file (Karman2019,Fletcher2018) 16 ! (2018 one should be default for giant planets) 14 17 !================================================================== 15 18 19 use callkeys_mod, only: versH2H2cia 16 20 use datafile_mod, only: datadir 17 21 … … 27 31 28 32 integer nS,nT 29 parameter(nS=2428)30 33 parameter(nT=10) 31 34 … … 36 39 37 40 double precision amagat 38 double precision wn_arr(nS)39 41 double precision temp_arr(nT) 40 double precision abs_arr(nS,nT) 42 43 double precision, dimension(:), allocatable :: wn_arr 44 double precision, dimension(:,:), allocatable :: abs_arr 41 45 42 46 integer k,iT 43 47 logical firstcall 44 48 45 save wn_arr, temp_arr, abs_arr !read by master49 save nS, wn_arr, temp_arr, abs_arr !read by master 46 50 47 51 character*100 dt_file 48 integer strlen,ios52 integer ios 49 53 50 character(LEN=*), parameter :: fmat1 = "(A20,F10.3,F10.3,I7,F7.1,E10.3,F5.3)" 54 character(LEN=*), parameter :: fmat11 = "(A20,F10.3,F10.3,I7,F7.1,E10.3,F5.3)" 55 character(LEN=*), parameter :: fmat18 = "(A12,A3,A5,F10.6,F10.4,I7,F7.3,E10.3,F5.3)" 51 56 52 57 character*20 bleh … … 69 74 print*,'Initialising H2-H2 continuum from HITRAN database...' 70 75 71 ! 1.1 Open the ASCII files 72 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia' 76 ! 1.1 Open the ASCII files and set nS according to version 77 ! Only two possible versions for now : 2011 or 2018 (sanity check in inifis_mod) 78 if (versH2H2cia.eq.2011) then 79 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia' 80 nS = 2428 81 else if (versH2H2cia.eq.2018) then 82 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2018.cia' 83 nS = 9600 84 endif 85 86 if(.not.allocated(wn_arr)) allocate(wn_arr(nS)) 87 if(.not.allocated(abs_arr)) allocate(abs_arr(nS,nT)) 73 88 74 89 !$OMP MASTER … … 80 95 write(*,*) 'is correct. You can change it in callphys.def with:' 81 96 write(*,*) 'datadir = /absolute/path/to/datagcm' 82 write(*,*) 'Also check that the continuum data continuum_data/H2-H2_norm_2011.cia is there.'97 write(*,*) 'Also check that the continuum data continuum_data/H2-H2_norm_2011.cia or H2-H2_norm_2018.cia is there.' 83 98 call abort 84 99 else 100 101 if(versH2H2cia.eq.2011) then 102 write(*,*) '... You are using H2-H2 CIA from 2011 but you should use more recent data available on HITRAN !' 103 write(*,*) '... (Especially if you are running a giant planet atmosphere)' 104 write(*,*) '... Just find out the H2-H2_norm_2018.cia, put it in your datadir and have a look at interpolateH2H2.F90 ! .' 105 endif 85 106 86 107 do iT=1,nT 108 109 ! Only two possibles values for now : 2011 or 2018 (sanity check in inifis_mod) 110 if(versH2H2cia.eq.2011) then 111 read(33,fmat11) bleh,blah,blah,nres,Ttemp 112 else if (versH2H2cia.eq.2018) then 113 read(33,fmat18) bleh,bleh,bleh,blah,blah,nres,Ttemp 114 endif 87 115 88 read(33,fmat1) bleh,blah,blah,nres,Ttemp89 116 if(nS.ne.nres)then 90 117 print*,'Resolution given in file: ',trim(dt_file)
Note: See TracChangeset
for help on using the changeset viewer.