Update Documentation authored by Charnay Benjamin's avatar Charnay Benjamin
Summary:
- [Input file](#input-file)
- [output_files](#output_files)
- [target_parameters](#target_parameters)
- [light_source_parameters](#light_source_parameters)
- [atmosphere_parameters](#atmosphere_parameters)
- [species_parameters](#species_parameters)
- [spectrum_parameters](#spectrum_parameters)
- [clouds_parameters](#clouds_parameters)
- [retrieval_parameters](#retrieval_parameters)
- [options](#options)
- [paths](#paths)
- [Output file (HDF5)](#output-file-hdf5)
- [Code](#code)
# Input file
The input file format is [Fortran namelist](https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-developer-guide-and-reference/top/language-reference/a-to-z-reference/m-to-n/namelist.html). All of the headers and variables must be present. If your input file does not work, start back with a working example. An input file, _example.nml_ is provided with any distributed version of *Exo-REM*, with a short description of each variables.
Comments are handled with `!`.
Below is the complete list of headers and variables as well as an extended description. The units are indicated in parenthesis:
## output_files
The `output_files` section allows you to personalize the names of the output files. The output directory is set with `path_outputs` (see [`paths`](#paths)).
- `spectrum_file_prefix`
- string
- prefix of the spectrum files
- e.g. with `spectrum_file_prefix = 'spectra'`, the spectrum file will be _spectra_XXX.dat_, where _XXX_ is the output files suffix. Has no influence if `ouput_hdf5` is `True`.
- `temperature_profile_file_prefix`
- string
- prefix of the temperature profile files
- e.g. with `temperature_profile_file_prefix = 'temperature_profile'`, the temperature file will be _temperature_profile_XXX.dat_, where _XXX_ is the output files suffix. Has no influence if `ouput_hdf5` is `True`.
- `vmr_file_prefix`
- string
- prefix of the volume mixing ratio profiles files
- e.g. with `vmr_file_prefix = 'vmr'`, the vmr file will be _vmr_XXX.dat_, where _XXX_ is the output files suffix. Has no influence if `ouput_hdf5` is `True`.
- `output_files_suffix`
- string
- suffix of the output files
- e.g. with `output_files_suffix = 'example'` and `ouput_hdf5 = False`, the output files will be _YYY_example.dat_, where _YYY_ are the output files prefix. If `ouput_hdf5` is `True`, the sole output file will be _example.h5_.
## target_parameters
The `target_parameters` section handles the target (planet) settings.
- `use_gravity`
- boolean
- if True, uses equatorial gravity instead of mass to calculate gravity
- e.g. `use_gravity = False`. In that case, the equatorial gravity at 1 bar is derived from `target_equatorial_radius` and `target_mass`. If `True`, the equatorial gravity at 1 bar is derived from `target_equatorial_gravity`.
- `use_flattening`
- boolean
- if True, uses flattening instead of polar radius to calculate gravity
- e.g. `use_flattening = True`. In that case, the gravity at 1 bar will be derived from `target_flattening`, `latitude` and the equatorial gravity. If `False`, the gravity at 1 bar will be derived from `target_polar_radius`, `target_equatorial_radius`, `latitude` and the equatorial gravity.
- `target_mass`
- float
- (kg) mass of the target
- e.g. `target_mass = 5e25`. Used to calculate gravity, only if `use_gravity` is `False`.
- `target_equatorial_gravity`
- float
- (m.s-2) gravity at 1 bar of the target
- e.g. `target_equatorial_gravity = 14.83`. Used only if `use_gravity` is `True`.
- `target_equatorial_radius`
- float
- (m) equatorial radius at 1 bar of the target
- e.g. `target_equatorial_radius = 15000e3`.
- `target_polar_radius`
- float
- (m) polar radius at 1 bar of the target
- e.g. `target_polar_radius = 15000e3`. Used only if `use_flattening` is `False`.
- `target_flattening`
- float
- flattening of the target
- e.g. `target_flattening = 0` for a perfect sphere. Used only if `use_flattening` is `True`.
- `latitude`
- float
- (deg) latitude of observation on the target
- e.g. `latitude = 0` to look at the equator.
- `target_internal_temperature`
- float
- (K) internal (or intrinsic) temperature of the target
- e.g. `target_internal_temperature = 500`. This is the temperature derived from the radiosity (upward flux) of the target (i.e. the radiosity corresponds to that of a black body at `target_internal_temperature`) if it was perfectly isolated (i.e. without any external light source/star). *Exo-REM* will change the temperature profile so that the calculated internal temperature is as close as possible to `target_internal_temperature`.
- `emission_angle` [unused parameter]
- float
- (deg) emission angle
- e.g. `emission_angle = 0.0` to look along the normal of the atmosphere. Could be used in the calculation of the emission spectrum.
## light_source_parameters
The `light_source_parameters` section handles the light source (star) settings.
- `add_light_source`
- boolean
- if True, add the light source
- e.g. `add_light_source = True`. In that case, a light source/star will be added, and the atmosphere will be irradiated. If `False`, the other parameters in this section are not taken into.
- `use_irradiation`
- boolean
- if True, use irradiation instead of range to calculate the light source spectrum
- e.g. `use_irradiation = False`. In that case, the irradiation will be calculated using `light_source_range`. If `True`, the distance between the light source and the target will be calculated from `light_source_irradiation`.
- `use_light_source_spectrum`
- boolean
- if True, use a spectrum for the light source instead of a black body
- e.g. `use_light_source_spectrum = False`. In that case, the spectral irradiance of the target will be calculated from a black body. If `True`, the spectral irradiance is read from `light_source_spectrum_file` and re-adapted so that the light source radiosity correspond to `light_source_effective_temperature`.
- `light_source_radius`
- float
- (m) radius of the light source
- e.g. `light_source_radius = 100e6`.
- `light_source_range`
- float
- (m) distance between the target and the light source
- e.g. `light_source_range = 2e9`. Used to calculate the target/planet irradiance if `use_irradiation` is `False`.
- `light_source_effective_temperature`
- float
- (K) light source effective temperature
- e.g. `light_source_effective_temperature = 3450`.
- `light_source_irradiation`
- float
- (W.m-2) light source irradiation
- e.g. `light_source_irradiation = 20000`. Used to calculate the target/planet irradiance if `use_irradiation` is `True`.
- `light_source_spectrum_file`
- string
- spectrum of the light source
- e.g. with `light_source_spectrum_file = 'spectrum_BTSettl_3500K_logg5_met0.dat'`. The file must be placed in the `path_light_source_spectra` directory. Used only if `use_light_source_spectrum` is `True`.
- `incidence_angle` [unused parameter]
- float
- (deg) incident light source light relative to the normal of the atmosphere
- e.g. `incidence_angle = 0.0` if the light rays are have the same direction than the normal of the atmosphere. Could be used to calculate the temperature profile at a specific local hour on the target/planet.
## atmosphere_parameters
The `atmosphere_parameters` section handles the atmospheric settings.
- `use_metallicity`
- boolean
- if True, uses metallicity instead of H2, He and Z VMR to get the elemental abundances
- e.g. `use_metallicity = True`. In that case, the elemental abundances are calculated from `metallicity`. If `False`, they are calculated from `h2_vmr`, `he_vmr` and `z_vmr`.
- `use_pressure_grid`
- boolean
- if True, uses the pressure grid in the temperature profile file to generate the pressure grid
- e.g. `use_pressure_grid = False`. In that case, the pressure grid will be equally spaced in the log-space between `pressure_min` and `pressure_max`. If `True`, it will be directly read from `temperature_profile_file` (see [`retrieval_parameters`](#retrieval_parameters)).
- `h2_vmr`
- float
- H2 volume mixing ratio
- e.g. `h2_vmr = 0.6`. `h2_vmr`, `he_vmr` and `z_vmr` will be automatically adjusted so that their sum is 1.
- `he_vmr`
- float
- He volume mixing ratio
- e.g. `he_vmr = 0.1`. `h2_vmr`, `he_vmr` and `z_vmr` will be automatically adjusted so that their sum is 1.
- `z_vmr`
- float
- other species volume mixing ratio
- e.g. `z_vmr = 0.3`. `h2_vmr`, `he_vmr` and `z_vmr` will be automatically adjusted so that their sum is 1. The heavy elements abundances are scaled from the solar abundance.
- `metallicity`
- float
- (solar metallicity) atmospheric metallicity
- e.g. `metallicity = 10.0`. The metallicity is a factor by which all the elemental abundances except H are multiplied compared to their solar abundances. The solar abundances are read in the _data/solar_abundances.dat_ file.
- `n_levels`
- integer
- number of atmospheric levels
- e.g. `n_levels = 81`. If `use_pressure_grid` is `False`, the bottom level has the pressure `pressure_max`, and the top level has the pressure `pressure_min`. `retrieval_level_top` must be lower or equal to this parameter.
- `n_species`
- integer
- number of absorbing species
- e.g. `n_species = 13`. This parameter must match the number of elements in `species_names` and `species_at_equilibrium` (see [`species_parameters`](#species_parameters)).
- `n_cia`
- integer
- number of collision induced absorptions
- e.g. `n_cia = 3`. This parameter must match the number of elements in `cia_names` (see [`species_parameters`](#species_parameters)).
- `n_clouds`
- integer
- number of clouds in atmosphere
- e.g. `n_clouds = 2`. This parameter must match the number of elements in `cloud_names`, `cloud_particle_radius`, `sedimentation_parameter`, `cloud_particle_density`, `cloud_molar_mass` and `reference_wavenumber` (see [`clouds_parameters`](#clouds_parameters)).
- `eddy_mode`
- string
- eddy diffusion coefficient (Kzz) mode ('constant'|'Ackerman'|'AckermanConvective'|'infinity')
- e.g. `eddy_mode = 'AckermanConvective'`. `'constant'` mean that the Kzz is constant within the pressure grid, set to the value of `eddy_diffusion_coefficient`. `'Ackerman'` mean that Kzz is calculated using the method from Ackerman et al. `'AckermanConvective'` mean that Kzz is calculated using the method from Ackerman et al, but taking into account the convective flux. `'infinity'` is the same than AckermanConvective, but if `cloud_mode = 'fixedRadius'` (see [`clouds_parameters`](#clouds_parameters)), the cloud will extend to the top of the atmosphere (no sedimentation).
- `eddy_diffusion_coefficient`
- float
- (cm2.s-1) eddy diffusion coefficient
- e.g. `eddy_diffusion_coefficient = 1e8`. Used if `eddy_mode = 'constant'`.
- `pressure_min`
- float
- (Pa) pressure at the top of the atmospheric grid
- e.g. `pressure_min = 1e-1`. Used only if `use_pressure_grid` is `False`.
- `pressure_max`
- float
- (Pa) pressure at the bottom of the atmospheric grid
- e.g. `pressure_min = 1e7`. Used only if `use_pressure_grid` is `False`.
## species_parameters
The `species_parameters` section handles the atmospheric elemental abundances, which absorbing species to include and the chemical mode (equilibrium or out-of-equilibrium).
- `use_atmospheric_metallicity`
- boolean
- if True, use the atmospheric metallicity instead of the element/H ratios or the elements metallicity to get the elemental abundances
- e.g. `use_atmospheric_metallicity = False`. In that case, the elemental abundances are calculated from `elements_h_ratio` if `use_elements_metallicity` is `False`, or else from `elements_metallicity`. If `True`, the elemental abundances are calculated only from `metallicity` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- Example:
- `use_atmospheric_metallicity = True`, `metallicity = 10`: He/H, C/H, O/H, N/H ... are set to 10 times their solar value.
- `use_atmospheric_metallicity = False`, `metallicity = 10`, `use_elements_metallicity = False`, `elements_names = 'He', 'C'`, `elements_h_ratio = 8e-2, 1e-30`: He/H = 8e-2, C/H = 1e-30. O/H, N/H, ... are set to 10 times their solar value.
- `use_atmospheric_metallicity = False`, `metallicity = 10`, `use_elements_metallicity = True`, `elements_names = 'He', 'C'`, `elements_metallicity = 1, 5`: He/H is set to 1 times its solar value. C/H is set to 5 times its solar value. O/H, N/H, ... are set to 10 times their solar value.
- `use_elements_metallicity`
- boolean
- if True, use the atmospheric metallicity instead of the element/H ratios or the elements metallicity to get the elemental abundances
- e.g. `use_atmospheric_metallicity = False`. In that case, the elemental abundances are calculated from `elements_h_ratio` if `use_elements_metallicity` is `False`, or else from `elements_metallicity`. If `True`, the elemental abundances are calculated only from `metallicity` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `elements_names`
- list of strings
- elements listed here won't have the atmospheric metallicity if use_atmospheric_metallicity is False (atmosphere_parameters/metallicity)
- e.g. `elements_names = 'He', 'Ne', 'Ar', 'Kr', 'Xe'` to set the elemental abundances of the noble gases at a different value than `metallicity`.
- `elements_h_ratio`
- list of floats
- element over hydrogen ratio of the elements listed above (only used if both use_atmospheric_metallicity and use_elements_metallicity are False)
- e.g. `elements_h_ratio = 8.395e-2, 1e-30, 1e-30, 1e-30, 1e-30`, in combination with the example above for `elements_names`, `use_elements_metallicity = False`, `use_atmospheric_metallicity = False`, to set He/H = 8.395e-2, Ne/H = 1e-30, ...
- `elements_metallicity`
- list of floats
- (solar metallicity) elemental metallicity of the elements listed above
- e.g. `elements_metallicity = 1, 1, 1, 1, 1`, in combination with the example above for `elements_names`, `use_elements_metallicity = True`, `use_atmospheric_metallicity = False`, to set elemental abundances of the noble gases to 1 time their solar value.
- `species_names`
- list of strings
- absorbing species in atmosphere
- e.g. `species_names = 'CH4', 'CO', 'CO2', 'FeH', 'H2O', 'H2S', 'HCN', 'K', 'Na', 'NH3', 'PH3', 'TiO', 'VO'`. The number of elements must match `n_species` (see [`atmosphere_parameters`](#atmosphere_parameters)). The k-coefficients of these species must be within the `path_k_coefficients` directory (see [`paths`](#paths)).
- `species_at_equilibrium`
- list of booleans
- if True, the species is at thermochemical equilibrium, else it is out of equilibrium
- e.g. `species_at_equilibrium = False, False, False, False, False, False, False, False, False, False, False, False, False` To set all the absorbing species in out-of-equilibrium mode. The number of elements must match `n_species` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `cia_names`
- list of strings
- collision induced absorptions to be included
- e.g. `cia_names = 'H2-H2', 'H2-He', 'H2O-H2O'`. The number of elements must match `n_cia` (see [`atmosphere_parameters`](#atmosphere_parameters)). The CIA files must be within the `path_cia` directory (see [`paths`](#paths)).
- `load_vmr_profiles`
- boolean
- if True, load VMR profiles from a file (can be useful only if chemistry is deactivated)
- e.g. `load_vmr_profiles = False`. In that case, the VMR are initialized by *Exo-REM*. If `True`, the VMR are read from `vmr_profiles_file`. This has no impact if `n_iterations` (see [`retrieval_parameters`](#retrieval_parameters)) is greater than 0.
- `vmr_profiles_file`
- string
- VMR profiles file, ignored if load_vmr_profiles is False
- e.g. `vmr_profiles_file = 'vmr_example_ref.dat'`. The file must be in the `path_vmr_profiles` directory.
## spectrum_parameters
The `spectrum_parameters` section handles the spectral range and resolution of the calculated spectrum.
- `wavenumber_min`
- float
- (cm-1) first wavenumber of the calculated spectrum
- e.g. `wavenumber_min = 130`.
- `wavenumber_max`
- float
- (cm-1) last wavenumber of the calculated spectrum
- e.g. `wavenumber_min = 30130`.
- `wavenumber_step`
- float
- (cm-1) wavenumber step of the calculated spectrum
- e.g. `wavenumber_min = 200`.
## clouds_parameters
The `clouds_parameters` section handles the clouds settings. The cloud optical constants must be within the `path_clouds` directory (see [`paths`](#paths)).
- `cloud_mode`
- string
- cloud mode ('fixedRadius'|'fixedSedimentation'|'fixedRadiusCondensation'|'fixedRadiusTime')
- e.g. `eddy_mode = 'fixedSedimentation'`. `'fixedRadius'` mean that the mean cloud particle radius is constant within the pressure grid, set to the value of `cloud_particle_radius`. `'fixedSedimentation'` mean that mean cloud particle is calculated based on the value of `sedimentation_parameter` (see [Ackerman and Marley 2001](https://iopscience.iop.org/article/10.1086/321540/fulltext/52911.text.html)). `'fixedRadiusCondensation'` is the same than `'fixedSedimentation'`, but the sedimentation radius is set constant two layers above the cloud condensation level. `'fixedRadiusTime'` mean that the mean cloud particle radius is calculated from the condensation timescale.
- `cloud_fraction`
- float
- cloud cover fraction
- e.g. `cloud_fraction = 0.15` mean that 15% of the atmosphere is covered by clouds. The flux with clouds is calculated as `(1 - cloud_fraction) * flux_clear + cloud_fraction * flux_full_cover`.
- `cloud_names`
- list of strings
- condensing species forming the clouds
- e.g. `cloud_names = 'H2O', 'KCl'`. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `cloud_particle_radius`
- list of floats
- (m) mean radius of the cloud particles (fixed radius modes)
- e.g. `cloud_particle_radius = 50e-6, 5e-6`. Used only with `cloud_mode = 'fixedRadius'`. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `sedimentation_parameter`
- list of floats
- sedimentation parameter of the clouds
- e.g. `sedimentation_parameter = 2, 2`. Used only in the `'fixedSedimentation'` and `'fixedRadiusCondensation'` modes. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `cloud_particle_density`
- list of floats
- (kg.m-3) density of the clouds particles
- e.g. `cloud_particle_density = 917, 1980`. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `supersaturation_parameter`
- list of floats
- supersaturation parameter of the clouds
- e.g. `supersaturation_parameter = 0.003, 0.003`.
- `sticking_efficiency`
- list of floats
- sticking efficiency of the clouds
- e.g. `sticking_efficiency = 1.0, 1.0`.
- `reference_wavenumber`
- list of floats
- (cm-1) [for diagnostic] wavenumber for cloud optical depth output
- e.g. `reference_wavenumber = 1e4, 1e4`. Output the cloud opacities at this wavenumber. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `load_cloud_profiles`
- boolean
- if True, use initial cloud profile defined in vmr_profiles_file
- e.g. `load_cloud_profiles = False`.
## retrieval_parameters
The `retrieval_parameters` section handles the retrieval/inversion settings.
- `temperature_profile_file`
- string
- a-priori temperature profile file
- e.g. `temperature_profile_file = 'temperature_profile_example_ref.dat' `. The file must be in the `path_temperature_profile` directory.
- `retrieval_level_bottom`
- integer
- min level for flux retrieval
- e.g. `retrieval_level_bottom = 2` mean that the retrieval will not take into account levels below the 2nd one. A value greater than 1 is strongly recommended.
- `retrieval_level_top`
- integer
- max level for flux retrieval
- e.g. `retrieval_level_top = 81` mean that the retrieval will not take into account levels above the 81st one. This value must be between `retrieval_level_bottom` and `n_levels`.
- `retrieval_flux_error_bottom`
- float
- relative flux error at the bottom of the atmospheric grid
- e.g. `retrieval_flux_error_bottom = 1e-3`. This represents the tolerance of the retrieval at the bottom of the atmosphere. A value between `1e-2` and `1e-15` is recommended.
- `retrieval_flux_error_top`
- float
- relative flux error at the top of the atmospheric grid
- e.g. `retrieval_flux_error_top = 1e-5`. This represents the tolerance of the retrieval at the top of the atmosphere. A value between `1e-2` and `1e-15` is recommended.
- `n_iterations`
- integer
- number of iterations
- e.g. `n_iterations = 30`. Maximum number of iterations allowed.
- `n_non_adiabatic_iterations`
- integer
- number of iterations without including the adiabatic correction (necessary for convergence)
- e.g. `n_non_adiabatic_iterations = 15`. Maximum number of iterations without requiring an adiabatic temperature profile allowed. It is recommended to set this parameter `> 1` when far from convergence. It must be below `n_iterations`.
- `chemistry_iteration_interval`
- integer
- number of iterations between 2 calls the of the thermochemical equilibrium
- e.g. `chemistry_iteration_interval = 2` mean that the chemistry is calculated with an interval of 2 iterations, i.e. every 3 iterations.
- `cloud_iteration_interval`
- integer
- number of iterations between 2 calls of the cloud physics
- e.g. `cloud_iteration_interval = 4` mean that the cloud VMR is calculated with an interval of 4 iterations, i.e. every 5 iterations.
- `n_burn_iterations`
- integer
- number of iterations before the end where all the physics is calculated at every iterations
- e.g. `n_burn_iterations = 99`.
- `retrieval_tolerance`
- float
- tolerance for the flux convergence (0 to use the iterations limits)
- e.g. `retrieval_tolerance = 0.001` mean that if at iteration `i` the chi2 variation or the T/dT ratio is lower than 0.001, if `i < n_non_adiabatic_iterations`, the non-adiabatic runs end, else if `i > n_non_adiabatic_iterations`, the run end. A value of 0 for this parameter is recommended when far from convergence.
- `smoothing_bottom`
- float
- (height scale) vertical profile smoothing at the bottom of the atmosphere
- e.g. `smoothing_bottom = 0.5`.
- `smoothing_top`
- float
- (height scale) vertical profile smoothing at the top of the atmosphere
- e.g. `smoothing_top = 0.5`.
- `weight_apriori`
- float
- weight of the a priori, low weight means small variations
- e.g. `weight_apriori = 10`.
## options
The `options` section handles the output options settings.
- `output_transmission_spectra`
- boolean
- if True, output the transmission spectra
- e.g. `output_transmission_spectra = True`. This enable the output of the transmission spectrum, plus the contributions to the transmission spectrum if the output contribution options are set to True (see below).
- `output_species_spectral_contributions`
- boolean
- if True, output the absorbers spectral contribution
- e.g. `output_species_spectral_contributions = True`. This enable the output of each absorber (defined in `species_names`) + CIA + Rayleigh contributions, individually.
- `output_cia_spectral_contribution`
- boolean
- if True, output the CIA spectral contribution
- e.g. `output_cia_spectral_contribution = True`. This enable the output of the CIA + Rayleigh total contributions.
- `output_thermal_spectral_contribution`
- boolean
- if True, output the thermal spectral contribution
- e.g. `output_thermal_spectral_contribution = True`. This enable the output of the thermal contribution (i.e. without light source), which is useful to calculate e.g. the Bond albedo.
- `output_fluxes`
- boolean
- if True, output the radiosities without the effect of irradiance
- e.g. `output_fluxes = True`. This enable the output of the fluxes (i.e. the radiosities without light source).
- `output_hdf5`
- boolean
- if True, set the output format to HDF5
- e.g. `output_hdf5 = True`. This enable the output in HDF5, this is recommended as the HDF5 output is more complete.
## paths
The `paths` section handles the output paths settings.
- `path_data`
- string
- path to molecular parameters files
- e.g. `path_data = '../data/'`.
- `path_cia`
- string
- path to collision induced absorption files
- e.g. `path_cia = '../cia/'`.
- `path_clouds`
- string
- path to the absorption cross sections files
- e.g. `path_clouds ='../data/cloud_optical_constants/'`.
- `path_k_coefficients`
- string
- path to the k coefficients files
- e.g. `path_k_coefficients = '../data/k_coefficients_tables/R50/'`.
- `path_temperature_profile`
- string
- path to the a-priori temperature profile file
- e.g. `path_temperature_profile = '../inputs/atmospheres/temperature_profiles/'`.
- `path_thermochemical_tables`
- string
- path to the thermochemical tables files
- e.g. `path_thermochemical_tables = '../data/thermochemical_tables/'`.
- `path_vmr_profiles`
- string
- path to the VMR profiles
- e.g. `path_vmr_profiles= '../inputs/atmospheres/vmr_profiles/'`.
- `path_light_source_spectra`
- string
- path to the stellar spectra
- e.g. `path_light_source_spectra = '../data/stellar_spectra/'`.
- `path_outputs`
- string
- path to molecular parameters files
- e.g. `path_outputs = '../outputs/exorem/'`.
# Output file (HDF5)
The units of each dataset are indicated under the `units` attribute.
Structure of the file:
```
.
├── model_parameters <- parameters used in the model
| ├── atmosphere
| | └── eddy_mode <- (scalar string) model eddy mode
| ├── clouds
| | ├── fraction <- (scalar float) model cloud fraction
| | ├── mode <- (scalar string) model cloud mode
| | ├── particle_density
| | | ├── cloud1 <- (scalar float) cloud 1 particle density
| | | ├── ...
| | | └── cloudn
| | ├── particle_radius
| | | ├── cloud1 <- (scalar float) cloud 1 particle radius
| | | ├── ...
| | | └── cloudn
| | ├── reference_wavenumber
| | | ├── cloud1 <- (scalar float) cloud 1 reference wavenumber
| | | ├── ...
| | | └── cloudn
| | └── sedimentation_parameter
| | ├── cloud1 <- (scalar float) cloud 1 sedimentation param.
| | ├── ...
| | └── cloudn
| ├── light_source
| | ├── effective_temperature <- (scalar float) light source T_eff
| | ├── radius <- (scalar float) light source radius
| | ├── range <- (scalar float) light source range
| | └── spectral_irradiance <- (scalar float) light source irradiance
| ├── retrieval
| | ├── chemistry_iteration_interval <- (scalar integer)
| | ├── cloud_iteration_interval <- (scalar integer)
| | ├── flux_error_bottom <- (scalar float)
| | ├── flux_error_top <- (scalar float)
| | ├── level_bottom <- (scalar integer) lowest level of retrieval
| | ├── level_top <- (scalar integer) highest level of retrieval
| | ├── n_burn_iterations <- (scalar integer)
| | ├── n_iterations <- (scalar integer)
| | ├── n_non_adiabatic_iterations <- (scalar integer)
| | ├── pressure_apriori <- (array float) pressures used in a-priori
| | ├── smoothing_bottom <- (scalar float)
| | ├── smoothing_top <- (scalar float)
| | ├── temperature_apriori <- (array float) temperatures used in a-priori
| | ├── tolerance <- (scalar float)
| | └── weight_apriori <- (scalar float)
| ├── species
| | ├── absorber_is_at_equilibrium
| | | ├── abs1 <- (scalar string) (T|F) if T, abs1 is at eq.
| | | ├── ...
| | | └── absn
| | ├── collision_induced_absorptions <- (scalar string) CIAs in model
| | ├── elemental_abundances
| | | ├── Al <- (scalar float) Al/H ratio in model
| | | ├── ...
| | | └── Zn
| | └── solar_elemental_abundances
| | ├── Al <- (scalar float) Al/H solar ratio
| | ├── ...
| | └── Zn
| └── target
| ├── equatorial_radius_1e5Pa <- (scalar float) r_eq at 10^5 Pa
| ├── internal_temperature <- (scalar float)
| ├── latitude <- (scalar float)
| ├── mass <- (scalar float)
| ├── polar_radius_1e5Pa <- (scalar float) r_pol at 10^5 Pa
| └── radius_1e5Pa <- (scalar float) radius at 10^5 Pa
└── outputs <- model output
├── layers
| ├── clouds
| | ├── opacity
| | | ├── cloud1 <- (array float) cloud 1 tau at reference_wavenumber
| | | ├── ...
| | | └── cloudn
| | ├── particle_radius
| | | ├── cloud1 <- (array float) cloud 1 particle radius
| | | ├── ...
| | | └── cloudn
| | └── volume_mixing_ratio
| | | ├── cloud1 <- (array float) cloud 1 vmr
| | | ├── ...
| | | └── cloudn
| ├── condensates
| | ├── pressure_condensation
| | | ├── cond1 <- (scalar float) pressure of condensation of condensate 1
| | | ├── ...
| | | └── condn
| | ├── volume_mixing_ratio_condensation
| | | ├── cond1 <- (scalar float) vmr at condensation of condensate 1
| | | ├── ...
| | | └── condn
| | └── volume_mixing_ratio_saturation
| | ├── cond1 <- (array float) saturation vmr of condensate 1
| | ├── ...
| | └── condn
| ├── eddy_diffusion_coefficient <- (array float) Kzz in layers
| ├── gravity <- (array float) gravity in layers
| ├── isobaric_molar_heat_capacity<- (array float) C_p in layers
| ├── molar_mass <- (array float) molar mass in layers
| ├── pressure <- (array float) pressure in layers
| ├── temperature <- (array float) temperature in layers
| └── volume_mixing_ratios
| ├── absorbers
| | ├── abs1 <- (array float) vmr of absorbing gas 1
| | ├── ...
| | └── absn
| ├── elements_gas_phase
| | ├── Al <- (array float) weighted sum of the vmr of all gases containing element Al (ex. 0.7 H2, 0.1 H = 1.4 + 0.1 H)
| | ├── ...
| | └── Zn
| └── gases
| ├── gas1 <- (array float) vmr of non-absorbing gas 1
| ├── ...
| └── gasn
├── levels
| ├── altitude <- (array float) altitude in levels
| ├── delta_temperature_convection<- (array float) difference of temperature due to convection
| ├── gradiant_temperature <- (array float) T gradiant
| ├── is_convective <- (array integer) (0|1) if 1, convection is occurring at the level
| ├── kernel_temperature <- (2D-array float) matrix K of retrieval
| ├── pressure <- (array float) pressure in levels
| ├── radiosity_convective <- (array float) radiosity due to convection
| ├── radiosity_error <- (array float) error on radiosity
| ├── radiosity_internal <- (array float) internal radiosity
| ├── temperature <- (array float) temperature in levels
| ├── temperature_adiabatic <- (array float) adiabatic temperature in levels
| ├── temperature_uncertainty <- (array float) uncertainty on temperatures
| └── temperature_uncertainty_b <- (array float) variant of the uncertainty on temperatures
├── run_quality
| ├── actual_internal_temperature <- (scalar float) actual T_int of the planet at the end of the run
| ├── chi2_retrieval <- (scalar float) reduced chi2 of the retrieval
| ├── delta_chi2_retrieval <- (scalar float) relative difference between the red. chi2 and the red. chi2 at the previous iteration
| ├── delta_temperature <- (array float) difference between the temperature and the temperature at the previous iteration
| └── radiosity_actual_target_ratio <- (scalar float) ratio of the actual radiosity of the planet at the end of the run and the targeted radiosity (calculated with internal_temperature in input)
└── spectra
├── emission
| ├── contributions
| | ├── abs1 <- (array float) contribution of absorbing gas 1 + CIA + Rayleigh
| | ├── ...
| | ├── absn
| | ├── cia_rayleigh <- (array float) contribution of CIA + Rayleigh
| | └── thermal <- (array float) thermal contribution + CIA + Rayleigh
| └── spectral_radiosity <- (array float) total spectral radiosity
├── flux
| ├── spectral_flux <- (array float) spectral flux
| ├── spectral_flux_clear <- (array float) spectral flux without clouds
| └── spectral_flux_cloud <- (array float) spectral flux with full cloud coverage
├── transmission
| ├── contributions
| | ├── abs1 <- (array float) contribution of absorbing gas 1 + CIA + Rayleigh
| | ├── ...
| | ├── absn
| | ├── cia_rayleigh <- (array float) contribution of CIA + Rayleigh
| | └── clouds <- (array float) cloud contribution + CIA + Rayleigh
| ├── derivative <- (2D-array float) derivative of the transmission spectrum
| ├── transit_depth <- (array float)
| ├── transit_depth_clear <- (array float) transit depth without clouds
| ├── transit_depth_full_cover<- (array float) transit depth with full coverage
| └── spectral_radiosity <- (array float) total spectral radiosity
└── wavenumber <- (array float) wavenumber
```
# Code
**This page is a work in progress**
Summary:
- [Input file](#input-file)
- [output_files](#output_files)
- [target_parameters](#target_parameters)
- [light_source_parameters](#light_source_parameters)
- [atmosphere_parameters](#atmosphere_parameters)
- [species_parameters](#species_parameters)
- [spectrum_parameters](#spectrum_parameters)
- [clouds_parameters](#clouds_parameters)
- [retrieval_parameters](#retrieval_parameters)
- [options](#options)
- [paths](#paths)
- [Output file (HDF5)](#output-file-hdf5)
- [Code](#code)
# Input file
The input file format is [Fortran namelist](https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-developer-guide-and-reference/top/language-reference/a-to-z-reference/m-to-n/namelist.html). All of the headers and variables must be present. If your input file does not work, start back with a working example. An input file, _example.nml_ is provided with any distributed version of *Exo-REM*, with a short description of each variables.
Comments are handled with `!`.
Below is the complete list of headers and variables as well as an extended description. The units are indicated in parenthesis:
## output_files
The `output_files` section allows you to personalize the names of the output files. The output directory is set with `path_outputs` (see [`paths`](#paths)).
- `spectrum_file_prefix`
- string
- prefix of the spectrum files
- e.g. with `spectrum_file_prefix = 'spectra'`, the spectrum file will be _spectra_XXX.dat_, where _XXX_ is the output files suffix. Has no influence if `ouput_hdf5` is `True`.
- units of the file: wavenumber in cm-1, flux in W.m-2/cm-1
- `temperature_profile_file_prefix`
- string
- prefix of the temperature profile files
- e.g. with `temperature_profile_file_prefix = 'temperature_profile'`, the temperature file will be _temperature_profile_XXX.dat_, where _XXX_ is the output files suffix. Has no influence if `ouput_hdf5` is `True`.
- units of the file: pressure in Pa, temperature in K
- `vmr_file_prefix`
- string
- prefix of the volume mixing ratio profiles files
- e.g. with `vmr_file_prefix = 'vmr'`, the vmr file will be _vmr_XXX.dat_, where _XXX_ is the output files suffix. Has no influence if `ouput_hdf5` is `True`.
- units of the file: pressure in Pa, vmr in mol/mol
- `output_files_suffix`
- string
- suffix of the output files
- e.g. with `output_files_suffix = 'example'` and `ouput_hdf5 = False`, the output files will be _YYY_example.dat_, where _YYY_ are the output files prefix. If `ouput_hdf5` is `True`, the sole output file will be _example.h5_.
## target_parameters
The `target_parameters` section handles the target (planet) settings.
- `use_gravity`
- boolean
- if True, uses equatorial gravity instead of mass to calculate gravity
- e.g. `use_gravity = False`. In that case, the equatorial gravity at 1 bar is derived from `target_equatorial_radius` and `target_mass`. If `True`, the equatorial gravity at 1 bar is derived from `target_equatorial_gravity`.
- `use_flattening`
- boolean
- if True, uses flattening instead of polar radius to calculate gravity
- e.g. `use_flattening = True`. In that case, the gravity at 1 bar will be derived from `target_flattening`, `latitude` and the equatorial gravity. If `False`, the gravity at 1 bar will be derived from `target_polar_radius`, `target_equatorial_radius`, `latitude` and the equatorial gravity.
- `target_mass`
- float
- (kg) mass of the target
- e.g. `target_mass = 5e25`. Used to calculate gravity, only if `use_gravity` is `False`.
- `target_equatorial_gravity`
- float
- (m.s-2) gravity at 1 bar of the target
- e.g. `target_equatorial_gravity = 14.83`. Used only if `use_gravity` is `True`.
- `target_equatorial_radius`
- float
- (m) equatorial radius at 1 bar of the target
- e.g. `target_equatorial_radius = 15000e3`.
- `target_polar_radius`
- float
- (m) polar radius at 1 bar of the target
- e.g. `target_polar_radius = 15000e3`. Used only if `use_flattening` is `False`.
- `target_flattening`
- float
- flattening of the target
- e.g. `target_flattening = 0` for a perfect sphere. Used only if `use_flattening` is `True`.
- `latitude`
- float
- (deg) latitude of observation on the target
- e.g. `latitude = 0` to look at the equator.
- `target_internal_temperature`
- float
- (K) internal (or intrinsic) temperature of the target
- e.g. `target_internal_temperature = 500`. This is the temperature derived from the radiosity (upward flux) of the target (i.e. the radiosity corresponds to that of a black body at `target_internal_temperature`) if it was perfectly isolated (i.e. without any external light source/star). *Exo-REM* will change the temperature profile so that the calculated internal temperature is as close as possible to `target_internal_temperature`.
- `emission_angle` [unused parameter]
- float
- (deg) emission angle
- e.g. `emission_angle = 0.0` to look along the normal of the atmosphere. Could be used in the calculation of the emission spectrum.
## light_source_parameters
The `light_source_parameters` section handles the light source (star) settings.
- `add_light_source`
- boolean
- if True, add the light source
- e.g. `add_light_source = True`. In that case, a light source/star will be added, and the atmosphere will be irradiated. If `False`, the other parameters in this section are not taken into.
- `use_irradiation`
- boolean
- if True, use irradiation instead of range to calculate the light source spectrum
- e.g. `use_irradiation = False`. In that case, the irradiation will be calculated using `light_source_range`. If `True`, the distance between the light source and the target will be calculated from `light_source_irradiation`.
- `use_light_source_spectrum`
- boolean
- if True, use a spectrum for the light source instead of a black body
- e.g. `use_light_source_spectrum = False`. In that case, the spectral irradiance of the target will be calculated from a black body. If `True`, the spectral irradiance is read from `light_source_spectrum_file` and re-adapted so that the light source radiosity correspond to `light_source_effective_temperature`.
- `light_source_radius`
- float
- (m) radius of the light source
- e.g. `light_source_radius = 100e6`.
- `light_source_range`
- float
- (m) distance between the target and the light source
- e.g. `light_source_range = 2e9`. Used to calculate the target/planet irradiance if `use_irradiation` is `False`.
- `light_source_effective_temperature`
- float
- (K) light source effective temperature
- e.g. `light_source_effective_temperature = 3450`.
- `light_source_irradiation`
- float
- (W.m-2) light source irradiation
- e.g. `light_source_irradiation = 20000`. Used to calculate the target/planet irradiance if `use_irradiation` is `True`.
- `light_source_spectrum_file`
- string
- spectrum of the light source
- e.g. with `light_source_spectrum_file = 'spectrum_BTSettl_3500K_logg5_met0.dat'`. The file must be placed in the `path_light_source_spectra` directory. Used only if `use_light_source_spectrum` is `True`.
- units of the file for BT-Settl: wavelength in angstrom, flux in erg.s-1.cm-2.a-1
- `incidence_angle` [unused parameter]
- float
- (deg) incident light source light relative to the normal of the atmosphere
- e.g. `incidence_angle = 0.0` if the light rays are have the same direction than the normal of the atmosphere. Could be used to calculate the temperature profile at a specific local hour on the target/planet.
## atmosphere_parameters
The `atmosphere_parameters` section handles the atmospheric settings.
- `use_metallicity`
- boolean
- if True, uses metallicity instead of H2, He and Z VMR to get the elemental abundances
- e.g. `use_metallicity = True`. In that case, the elemental abundances are calculated from `metallicity`. If `False`, they are calculated from `h2_vmr`, `he_vmr` and `z_vmr`.
- `use_pressure_grid`
- boolean
- if True, uses the pressure grid in the temperature profile file to generate the pressure grid
- e.g. `use_pressure_grid = False`. In that case, the pressure grid will be equally spaced in the log-space between `pressure_min` and `pressure_max`. If `True`, it will be directly read from `temperature_profile_file` (see [`retrieval_parameters`](#retrieval_parameters)).
- `h2_vmr`
- float
- H2 volume mixing ratio
- e.g. `h2_vmr = 0.6`. `h2_vmr`, `he_vmr` and `z_vmr` will be automatically adjusted so that their sum is 1.
- `he_vmr`
- float
- He volume mixing ratio
- e.g. `he_vmr = 0.1`. `h2_vmr`, `he_vmr` and `z_vmr` will be automatically adjusted so that their sum is 1.
- `z_vmr`
- float
- other species volume mixing ratio
- e.g. `z_vmr = 0.3`. `h2_vmr`, `he_vmr` and `z_vmr` will be automatically adjusted so that their sum is 1. The heavy elements abundances are scaled from the solar abundance.
- `metallicity`
- float
- (times solar metallicity) atmospheric metallicity
- e.g. `metallicity = 10.0`. The metallicity is a factor by which all the elemental abundances except H are multiplied compared to their solar abundances. The solar abundances are read in the _data/solar_abundances.dat_ file.
- `n_levels`
- integer
- number of atmospheric levels
- e.g. `n_levels = 81`. If `use_pressure_grid` is `False`, the bottom level has the pressure `pressure_max`, and the top level has the pressure `pressure_min`. `retrieval_level_top` must be lower or equal to this parameter.
- `n_species`
- integer
- number of absorbing species
- e.g. `n_species = 13`. This parameter must match the number of elements in `species_names` and `species_at_equilibrium` (see [`species_parameters`](#species_parameters)).
- `n_cia`
- integer
- number of collision induced absorptions
- e.g. `n_cia = 3`. This parameter must match the number of elements in `cia_names` (see [`species_parameters`](#species_parameters)).
- `n_clouds`
- integer
- number of clouds in atmosphere
- e.g. `n_clouds = 2`. This parameter must match the number of elements in `cloud_names`, `cloud_particle_radius`, `sedimentation_parameter`, `cloud_particle_density`, `cloud_molar_mass` and `reference_wavenumber` (see [`clouds_parameters`](#clouds_parameters)).
- `eddy_mode`
- string
- eddy diffusion coefficient (Kzz) mode ('constant'|'Ackerman'|'AckermanConvective'|'infinity')
- e.g. `eddy_mode = 'AckermanConvective'`. `'constant'` mean that the Kzz is constant within the pressure grid, set to the value of `eddy_diffusion_coefficient`. `'Ackerman'` mean that Kzz is calculated using the method from Ackerman et al. `'AckermanConvective'` mean that Kzz is calculated using the method from Ackerman et al, but taking into account the convective flux. `'infinity'` is the same than AckermanConvective, but if `cloud_mode = 'fixedRadius'` (see [`clouds_parameters`](#clouds_parameters)), the cloud will extend to the top of the atmosphere (no sedimentation).
- `eddy_diffusion_coefficient`
- float
- (cm2.s-1) eddy diffusion coefficient
- e.g. `eddy_diffusion_coefficient = 1e8`. Used if `eddy_mode = 'constant'`.
- `pressure_min`
- float
- (Pa) pressure at the top of the atmospheric grid
- e.g. `pressure_min = 1e-1`. Used only if `use_pressure_grid` is `False`.
- `pressure_max`
- float
- (Pa) pressure at the bottom of the atmospheric grid
- e.g. `pressure_min = 1e7`. Used only if `use_pressure_grid` is `False`.
## species_parameters
The `species_parameters` section handles the atmospheric elemental abundances, which absorbing species to include and the chemical mode (equilibrium or out-of-equilibrium).
- `use_atmospheric_metallicity`
- boolean
- if True, use the atmospheric metallicity instead of the element/H ratios or the elements metallicity to get the elemental abundances
- e.g. `use_atmospheric_metallicity = False`. In that case, the elemental abundances are calculated from `elements_h_ratio` if `use_elements_metallicity` is `False`, or else from `elements_metallicity`. If `True`, the elemental abundances are calculated only from `metallicity` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- Example:
- `use_atmospheric_metallicity = True`, `metallicity = 10`: He/H, C/H, O/H, N/H ... are set to 10 times their solar value.
- `use_atmospheric_metallicity = False`, `metallicity = 10`, `use_elements_metallicity = False`, `elements_names = 'He', 'C'`, `elements_h_ratio = 8e-2, 1e-30`: He/H = 8e-2, C/H = 1e-30. O/H, N/H, ... are set to 10 times their solar value.
- `use_atmospheric_metallicity = False`, `metallicity = 10`, `use_elements_metallicity = True`, `elements_names = 'He', 'C'`, `elements_metallicity = 1, 5`: He/H is set to 1 times its solar value. C/H is set to 5 times its solar value. O/H, N/H, ... are set to 10 times their solar value.
- `use_elements_metallicity`
- boolean
- if True, use the atmospheric metallicity instead of the element/H ratios or the elements metallicity to get the elemental abundances
- e.g. `use_atmospheric_metallicity = False`. In that case, the elemental abundances are calculated from `elements_h_ratio` if `use_elements_metallicity` is `False`, or else from `elements_metallicity`. If `True`, the elemental abundances are calculated only from `metallicity` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `elements_names`
- list of strings
- elements listed here won't have the atmospheric metallicity if use_atmospheric_metallicity is False (atmosphere_parameters/metallicity)
- e.g. `elements_names = 'He', 'Ne', 'Ar', 'Kr', 'Xe'` to set the elemental abundances of the noble gases at a different value than `metallicity`.
- `elements_h_ratio`
- list of floats
- element over hydrogen ratio of the elements listed above (only used if both use_atmospheric_metallicity and use_elements_metallicity are False)
- e.g. `elements_h_ratio = 8.395e-2, 1e-30, 1e-30, 1e-30, 1e-30`, in combination with the example above for `elements_names`, `use_elements_metallicity = False`, `use_atmospheric_metallicity = False`, to set He/H = 8.395e-2, Ne/H = 1e-30, ...
- `elements_metallicity`
- list of floats
- (solar metallicity) elemental metallicity of the elements listed above
- e.g. `elements_metallicity = 1, 1, 1, 1, 1`, in combination with the example above for `elements_names`, `use_elements_metallicity = True`, `use_atmospheric_metallicity = False`, to set elemental abundances of the noble gases to 1 time their solar value.
- `species_names`
- list of strings
- absorbing species in atmosphere
- e.g. `species_names = 'CH4', 'CO', 'CO2', 'FeH', 'H2O', 'H2S', 'HCN', 'K', 'Na', 'NH3', 'PH3', 'TiO', 'VO'`. The number of elements must match `n_species` (see [`atmosphere_parameters`](#atmosphere_parameters)). The k-coefficients of these species must be within the `path_k_coefficients` directory (see [`paths`](#paths)).
- `species_at_equilibrium`
- list of booleans
- if True, the species is at thermochemical equilibrium, else it is out of equilibrium
- e.g. `species_at_equilibrium = False, False, False, False, False, False, False, False, False, False, False, False, False` To set all the absorbing species in out-of-equilibrium mode. The number of elements must match `n_species` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `cia_names`
- list of strings
- collision induced absorptions to be included
- e.g. `cia_names = 'H2-H2', 'H2-He', 'H2O-H2O'`. The number of elements must match `n_cia` (see [`atmosphere_parameters`](#atmosphere_parameters)). The CIA files must be within the `path_cia` directory (see [`paths`](#paths)).
- `load_vmr_profiles`
- boolean
- if True, load VMR profiles from a file (can be useful only if chemistry is deactivated)
- e.g. `load_vmr_profiles = False`. In that case, the VMR are initialized by *Exo-REM*. If `True`, the VMR are read from `vmr_profiles_file`. This has no impact if `n_iterations` (see [`retrieval_parameters`](#retrieval_parameters)) is greater than 0.
- `vmr_profiles_file`
- string
- VMR profiles file, ignored if load_vmr_profiles is False
- e.g. `vmr_profiles_file = 'vmr_example_ref.dat'`. The file must be in the `path_vmr_profiles` directory.
- units: pressure in Pa, vmr in mol/mol
## spectrum_parameters
The `spectrum_parameters` section handles the spectral range and resolution of the calculated spectrum.
- `wavenumber_min`
- float
- (cm-1) first wavenumber of the calculated spectrum
- e.g. `wavenumber_min = 130`.
- `wavenumber_max`
- float
- (cm-1) last wavenumber of the calculated spectrum
- e.g. `wavenumber_min = 30130`.
- `wavenumber_step`
- float
- (cm-1) wavenumber step of the calculated spectrum
- e.g. `wavenumber_min = 200`.
## clouds_parameters
The `clouds_parameters` section handles the clouds settings. The cloud optical constants must be within the `path_clouds` directory (see [`paths`](#paths)).
- `cloud_mode`
- string
- cloud mode ('fixedRadius'|'fixedSedimentation'|'fixedRadiusCondensation'|'fixedRadiusTime')
- e.g. `eddy_mode = 'fixedSedimentation'`. `'fixedRadius'` mean that the mean cloud particle radius is constant within the pressure grid, set to the value of `cloud_particle_radius`. `'fixedSedimentation'` mean that mean cloud particle is calculated based on the value of `sedimentation_parameter` (see [Ackerman and Marley 2001](https://iopscience.iop.org/article/10.1086/321540/fulltext/52911.text.html)). `'fixedRadiusCondensation'` is the same than `'fixedSedimentation'`, but the sedimentation radius is set constant two layers above the cloud condensation level. `'fixedRadiusTime'` mean that the mean cloud particle radius is calculated from the condensation timescale.
- `cloud_fraction`
- float
- cloud cover fraction (dimensionless)
- e.g. `cloud_fraction = 0.15` mean that 15% of the atmosphere is covered by clouds. The flux with clouds is calculated as `(1 - cloud_fraction) * flux_clear + cloud_fraction * flux_full_cover`.
- `cloud_names`
- list of strings
- condensing species forming the clouds
- e.g. `cloud_names = 'H2O', 'KCl'`. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `cloud_particle_radius`
- list of floats
- (m) mean radius of the cloud particles (fixed radius modes)
- e.g. `cloud_particle_radius = 50e-6, 5e-6`. Used only with `cloud_mode = 'fixedRadius'`. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `sedimentation_parameter`
- list of floats
- sedimentation parameter (dimensionless) of the clouds
- e.g. `sedimentation_parameter = 2, 2`. Used only in the `'fixedSedimentation'` and `'fixedRadiusCondensation'` modes. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `cloud_particle_density`
- list of floats
- (kg.m-3) density of the clouds particles
- e.g. `cloud_particle_density = 917, 1980`. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `supersaturation_parameter`
- list of floats
- supersaturation parameter of the clouds
- e.g. `supersaturation_parameter = 0.003, 0.003`.
- `sticking_efficiency`
- list of floats
- sticking efficiency (dimensionless) of the clouds
- e.g. `sticking_efficiency = 1.0, 1.0`.
- `reference_wavenumber`
- list of floats
- (cm-1) [for diagnostic] wavenumber for cloud optical depth output
- e.g. `reference_wavenumber = 1e4, 1e4`. Output the cloud opacities at this wavenumber. The number of elements must match `n_clouds` (see [`atmosphere_parameters`](#atmosphere_parameters)).
- `load_cloud_profiles`
- boolean
- if True, use initial cloud profile defined in vmr_profiles_file
- e.g. `load_cloud_profiles = False`.
## retrieval_parameters
The `retrieval_parameters` section handles the retrieval/inversion settings.
- `temperature_profile_file`
- string
- a-priori temperature profile file
- e.g. `temperature_profile_file = 'temperature_profile_example_ref.dat' `. The file must be in the `path_temperature_profile` directory.
- units: pressure in Pa, temperature in K
- `retrieval_level_bottom`
- integer
- min level for flux retrieval
- e.g. `retrieval_level_bottom = 2` mean that the retrieval will not take into account levels below the 2nd one. A value greater than 1 is strongly recommended.
- `retrieval_level_top`
- integer
- max level for flux retrieval
- e.g. `retrieval_level_top = 81` mean that the retrieval will not take into account levels above the 81st one. This value must be between `retrieval_level_bottom` and `n_levels`.
- `retrieval_flux_error_bottom`
- float
- relative flux error (dimensionless) at the bottom of the atmospheric grid
- e.g. `retrieval_flux_error_bottom = 1e-3`. This represents the tolerance of the retrieval at the bottom of the atmosphere. A value between `1e-2` and `1e-15` is recommended.
- `retrieval_flux_error_top`
- float
- relative flux error (dimensionless) at the top of the atmospheric grid
- e.g. `retrieval_flux_error_top = 1e-5`. This represents the tolerance of the retrieval at the top of the atmosphere. A value between `1e-2` and `1e-15` is recommended.
- `n_iterations`
- integer
- number of iterations
- e.g. `n_iterations = 30`. Maximum number of iterations allowed.
- `n_non_adiabatic_iterations`
- integer
- number of iterations without including the adiabatic correction (necessary for convergence)
- e.g. `n_non_adiabatic_iterations = 15`. Maximum number of iterations without requiring an adiabatic temperature profile allowed. It is recommended to set this parameter `> 1` when far from convergence. It must be below `n_iterations`.
- `chemistry_iteration_interval`
- integer
- number of iterations between 2 calls the of the thermochemical equilibrium
- e.g. `chemistry_iteration_interval = 2` mean that the chemistry is calculated with an interval of 2 iterations, i.e. every 3 iterations.
- `cloud_iteration_interval`
- integer
- number of iterations between 2 calls of the cloud physics
- e.g. `cloud_iteration_interval = 4` mean that the cloud VMR is calculated with an interval of 4 iterations, i.e. every 5 iterations.
- `n_burn_iterations`
- integer
- number of iterations before the end where all the physics is calculated at every iterations
- e.g. `n_burn_iterations = 99`.
- `retrieval_tolerance`
- float
- tolerance for the flux convergence (0 to use the iterations limits)
- e.g. `retrieval_tolerance = 0.001` mean that if at iteration `i` the chi2 variation or the T/dT ratio is lower than 0.001, if `i < n_non_adiabatic_iterations`, the non-adiabatic runs end, else if `i > n_non_adiabatic_iterations`, the run end. A value of 0 for this parameter is recommended when far from convergence.
- `smoothing_bottom`
- float
- (height scale) vertical profile smoothing at the bottom of the atmosphere
- e.g. `smoothing_bottom = 0.5`.
- `smoothing_top`
- float
- (height scale) vertical profile smoothing at the top of the atmosphere
- e.g. `smoothing_top = 0.5`.
- `weight_apriori`
- float
- weight of the a priori, low weight means small variations
- e.g. `weight_apriori = 10`.
## options
The `options` section handles the output options settings.
- `output_transmission_spectra`
- boolean
- if True, output the transmission spectra
- e.g. `output_transmission_spectra = True`. This enable the output of the transmission spectrum, plus the contributions to the transmission spectrum if the output contribution options are set to True (see below).
- `output_species_spectral_contributions`
- boolean
- if True, output the absorbers spectral contribution
- e.g. `output_species_spectral_contributions = True`. This enable the output of each absorber (defined in `species_names`) + CIA + Rayleigh contributions, individually.
- `output_cia_spectral_contribution`
- boolean
- if True, output the CIA spectral contribution
- e.g. `output_cia_spectral_contribution = True`. This enable the output of the CIA + Rayleigh total contributions.
- `output_thermal_spectral_contribution`
- boolean
- if True, output the thermal spectral contribution
- e.g. `output_thermal_spectral_contribution = True`. This enable the output of the thermal contribution (i.e. without light source), which is useful to calculate e.g. the Bond albedo.
- `output_fluxes`
- boolean
- if True, output the radiosities without the effect of irradiance
- e.g. `output_fluxes = True`. This enable the output of the fluxes (i.e. the radiosities without light source).
- `output_hdf5`
- boolean
- if True, set the output format to HDF5
- e.g. `output_hdf5 = True`. This enable the output in HDF5, this is recommended as the HDF5 output is more complete.
## paths
The `paths` section handles the output paths settings.
- `path_data`
- string
- path to molecular parameters files
- e.g. `path_data = '../data/'`.
- `path_cia`
- string
- path to collision induced absorption files
- e.g. `path_cia = '../cia/'`.
- `path_clouds`
- string
- path to the absorption cross sections files
- e.g. `path_clouds ='../data/cloud_optical_constants/'`.
- `path_k_coefficients`
- string
- path to the k coefficients files
- e.g. `path_k_coefficients = '../data/k_coefficients_tables/R50/'`.
- `path_temperature_profile`
- string
- path to the a-priori temperature profile file
- e.g. `path_temperature_profile = '../inputs/atmospheres/temperature_profiles/'`.
- `path_thermochemical_tables`
- string
- path to the thermochemical tables files
- e.g. `path_thermochemical_tables = '../data/thermochemical_tables/'`.
- `path_vmr_profiles`
- string
- path to the VMR profiles
- e.g. `path_vmr_profiles= '../inputs/atmospheres/vmr_profiles/'`.
- `path_light_source_spectra`
- string
- path to the stellar spectra
- e.g. `path_light_source_spectra = '../data/stellar_spectra/'`.
- `path_outputs`
- string
- path to molecular parameters files
- e.g. `path_outputs = '../outputs/exorem/'`.
# Output file (HDF5)
The units of each dataset are indicated under the `units` attribute.
Structure of the file:
```
.
├── model_parameters <- parameters used in the model
| ├── atmosphere
| | └── eddy_mode <- (scalar string) model eddy mode
| ├── clouds
| | ├── fraction <- (scalar float) model cloud fraction
| | ├── mode <- (scalar string) model cloud mode
| | ├── particle_density
| | | ├── cloud1 <- (scalar float) cloud 1 particle density
| | | ├── ...
| | | └── cloudn
| | ├── particle_radius
| | | ├── cloud1 <- (scalar float) cloud 1 particle radius
| | | ├── ...
| | | └── cloudn
| | ├── reference_wavenumber
| | | ├── cloud1 <- (scalar float) cloud 1 reference wavenumber
| | | ├── ...
| | | └── cloudn
| | └── sedimentation_parameter
| | ├── cloud1 <- (scalar float) cloud 1 sedimentation param.
| | ├── ...
| | └── cloudn
| ├── light_source
| | ├── effective_temperature <- (scalar float) light source T_eff
| | ├── radius <- (scalar float) light source radius
| | ├── range <- (scalar float) light source range
| | └── spectral_irradiance <- (scalar float) light source irradiance
| ├── retrieval
| | ├── chemistry_iteration_interval <- (scalar integer)
| | ├── cloud_iteration_interval <- (scalar integer)
| | ├── flux_error_bottom <- (scalar float)
| | ├── flux_error_top <- (scalar float)
| | ├── level_bottom <- (scalar integer) lowest level of retrieval
| | ├── level_top <- (scalar integer) highest level of retrieval
| | ├── n_burn_iterations <- (scalar integer)
| | ├── n_iterations <- (scalar integer)
| | ├── n_non_adiabatic_iterations <- (scalar integer)
| | ├── pressure_apriori <- (array float) pressures used in a-priori
| | ├── smoothing_bottom <- (scalar float)
| | ├── smoothing_top <- (scalar float)
| | ├── temperature_apriori <- (array float) temperatures used in a-priori
| | ├── tolerance <- (scalar float)
| | └── weight_apriori <- (scalar float)
| ├── species
| | ├── absorber_is_at_equilibrium
| | | ├── abs1 <- (scalar string) (T|F) if T, abs1 is at eq.
| | | ├── ...
| | | └── absn
| | ├── collision_induced_absorptions <- (scalar string) CIAs in model
| | ├── elemental_abundances
| | | ├── Al <- (scalar float) Al/H ratio in model
| | | ├── ...
| | | └── Zn
| | └── solar_elemental_abundances
| | ├── Al <- (scalar float) Al/H solar ratio
| | ├── ...
| | └── Zn
| └── target
| ├── equatorial_radius_1e5Pa <- (scalar float) r_eq at 10^5 Pa
| ├── internal_temperature <- (scalar float)
| ├── latitude <- (scalar float)
| ├── mass <- (scalar float)
| ├── polar_radius_1e5Pa <- (scalar float) r_pol at 10^5 Pa
| └── radius_1e5Pa <- (scalar float) radius at 10^5 Pa
└── outputs <- model output
├── layers
| ├── clouds
| | ├── opacity
| | | ├── cloud1 <- (array float) cloud 1 tau at reference_wavenumber
| | | ├── ...
| | | └── cloudn
| | ├── particle_radius
| | | ├── cloud1 <- (array float) cloud 1 particle radius
| | | ├── ...
| | | └── cloudn
| | └── volume_mixing_ratio
| | | ├── cloud1 <- (array float) cloud 1 vmr
| | | ├── ...
| | | └── cloudn
| ├── condensates
| | ├── pressure_condensation
| | | ├── cond1 <- (scalar float) pressure of condensation of condensate 1
| | | ├── ...
| | | └── condn
| | ├── volume_mixing_ratio_condensation
| | | ├── cond1 <- (scalar float) vmr at condensation of condensate 1
| | | ├── ...
| | | └── condn
| | └── volume_mixing_ratio_saturation
| | ├── cond1 <- (array float) saturation vmr of condensate 1
| | ├── ...
| | └── condn
| ├── eddy_diffusion_coefficient <- (array float) Kzz in layers
| ├── gravity <- (array float) gravity in layers
| ├── isobaric_molar_heat_capacity<- (array float) C_p in layers
| ├── molar_mass <- (array float) molar mass in layers
| ├── pressure <- (array float) pressure in layers
| ├── temperature <- (array float) temperature in layers
| └── volume_mixing_ratios
| ├── absorbers
| | ├── abs1 <- (array float) vmr of absorbing gas 1
| | ├── ...
| | └── absn
| ├── elements_gas_phase
| | ├── Al <- (array float) weighted sum of the vmr of all gases containing element Al (ex. 0.7 H2, 0.1 H = 1.4 + 0.1 H)
| | ├── ...
| | └── Zn
| └── gases
| ├── gas1 <- (array float) vmr of non-absorbing gas 1
| ├── ...
| └── gasn
├── levels
| ├── altitude <- (array float) altitude in levels
| ├── delta_temperature_convection<- (array float) difference of temperature due to convection
| ├── gradiant_temperature <- (array float) T gradiant
| ├── is_convective <- (array integer) (0|1) if 1, convection is occurring at the level
| ├── kernel_temperature <- (2D-array float) matrix K of retrieval
| ├── pressure <- (array float) pressure in levels
| ├── radiosity_convective <- (array float) radiosity due to convection
| ├── radiosity_error <- (array float) error on radiosity
| ├── radiosity_internal <- (array float) internal radiosity
| ├── temperature <- (array float) temperature in levels
| ├── temperature_adiabatic <- (array float) adiabatic temperature in levels
| ├── temperature_uncertainty <- (array float) uncertainty on temperatures
| └── temperature_uncertainty_b <- (array float) variant of the uncertainty on temperatures
├── run_quality
| ├── actual_internal_temperature <- (scalar float) actual T_int of the planet at the end of the run
| ├── chi2_retrieval <- (scalar float) reduced chi2 of the retrieval
| ├── delta_chi2_retrieval <- (scalar float) relative difference between the red. chi2 and the red. chi2 at the previous iteration
| ├── delta_temperature <- (array float) difference between the temperature and the temperature at the previous iteration
| └── radiosity_actual_target_ratio <- (scalar float) ratio of the actual radiosity of the planet at the end of the run and the targeted radiosity (calculated with internal_temperature in input)
└── spectra
├── emission
| ├── contributions
| | ├── abs1 <- (array float) contribution of absorbing gas 1 + CIA + Rayleigh
| | ├── ...
| | ├── absn
| | ├── cia_rayleigh <- (array float) contribution of CIA + Rayleigh
| | └── thermal <- (array float) thermal contribution + CIA + Rayleigh
| └── spectral_radiosity <- (array float) total spectral radiosity
├── flux
| ├── spectral_flux <- (array float) spectral flux
| ├── spectral_flux_clear <- (array float) spectral flux without clouds
| └── spectral_flux_cloud <- (array float) spectral flux with full cloud coverage
├── transmission
| ├── contributions
| | ├── abs1 <- (array float) contribution of absorbing gas 1 + CIA + Rayleigh
| | ├── ...
| | ├── absn
| | ├── cia_rayleigh <- (array float) contribution of CIA + Rayleigh
| | └── clouds <- (array float) cloud contribution + CIA + Rayleigh
| ├── derivative <- (2D-array float) derivative of the transmission spectrum
| ├── transit_depth <- (array float)
| ├── transit_depth_clear <- (array float) transit depth without clouds
| ├── transit_depth_full_cover<- (array float) transit depth with full coverage
| └── spectral_radiosity <- (array float) total spectral radiosity
└── wavenumber <- (array float) wavenumber
```
# Code
**This page is a work in progress**
In order to have information on the different functions used in the code and their parameters, we you can look at the docstrings in the source code.
\ No newline at end of file