Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create new opacity tables for arbitrary chemistry #7

Open
iancrossfield opened this issue Dec 2, 2022 · 1 comment
Open

Can't create new opacity tables for arbitrary chemistry #7

iancrossfield opened this issue Dec 2, 2022 · 1 comment

Comments

@iancrossfield
Copy link
Contributor

How does one create HELIOS model atmospheres/synthetic spectra for model atmospheres of arbitrary composition (e.g., 100% SO2)? It seems clear that HELIOS & its sibling codes have this functionality, but despite many attempts to follow the documentation I'm unable to achieve this goal. A simple step-by-step worked example of how to set this up would be worth its weight in gold (or beer, etc.).

@teald
Copy link

teald commented Dec 15, 2022

This was something I ran into as well! I'll outline what I did here.

To do this, you need to edit input/species.dat to have the appropriate constant volume mixing ratio or have a value of file. For example, if I wanted to set the mixing ratio of SO2 to be constant, but have CH4 be read in from a file (which I would need to pass to -file_with_vertical_mixing_ratios or the corresponding parameter in param.dat), my input/species.dat file would look like:

# species      absorbing       scattering         mixing_ratio
 CH4           yes             no                  file
 SO2           yes             no                  1e-5

In order to avoid importing every opacity file in cases like a 100% SO2 atmosphere, you'd need to delete the other species lines from the file. You could pass a separate file like input/species_oops_all_so2.dat to -path_to_species_file with just the SO2 line set to 1.

So,

  1. Edit input/species.dat, or relevant file, to have "mixing ratio" set to:
    • A float
    • file
  2. If using file, pass your volume mixing ratios profile to -file_with_vertical_mixing_ratios.
  3. Run as normal otherwise and enjoy a fresh set of model outputs!

I just tested this with a fresh clone and 100% CO2 atmosphere using this:

printf "# This is my file\nCO2 yes no 1.0" &> oops_all_co2.dat && python helios.py -path_to_species_file oops_all_co2.dat -opacity_mixing on-the-fly -number_of_layers 50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants