bmorris3 / shone

Radiative transfer in JAX
https://shone.readthedocs.io/
MIT License
4 stars 5 forks source link

Add API for FastChem #5

Closed bmorris3 closed 5 months ago

bmorris3 commented 5 months ago

This PR adds the simple class FastchemWrapper(temperature, pressure) to run FastChem to calculate VMRs and MMRs. In addition to the mixing ratios, the function also returns a table of each species in the mixing ratio matrices including their names, symbols, weights, and indices.

I've also added an examples directory containing an interactive notebook that demos how the wrapper works.

Planned follow up:

Hoeijmakers commented 5 months ago

Sounds like the extra layer of user friendliness we always dreamt of!

bmorris3 commented 5 months ago

If you look at the species table called table in this notebook, you'll see that there are distinct entries for Al and Al2, with names that differ by the letter i:

Screen Shot 2024-05-15 at 09 42 57

I agree that the chemical name isn't always helpful. For this demo notebook, I'll leave it as is for now while we continue to refine the API in followup PRs (like #6).