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

Mie scattering of clouds, and Refelection Spectrum (Forward modelling) #477

Merged
merged 181 commits into from
Mar 25, 2024

Conversation

HajimeKawahara
Copy link
Owner

@HajimeKawahara HajimeKawahara commented Mar 17, 2024

Finally, I implemented the radiative transfer of the reflection spectrum with Ackerman and Marley cloud model + Mie scattering, but currently only for the forward modelling. #431 #432

Check the following jupyter notebook samples:

  • documents/tutorials/Jupiter_cloud_model_using_amp.ipynb (see here) for the NH3 cloud modeling of Jupiter
  • documents/tutorials/Jupiter_Hires_Modeling.ipynb (see here) for the forward modeling of the Subaru/HDS real Jupiter reflection spectrum, i.e. NH3 cloud+CH4 absorption.
    Jupiter_forward

Some important changes

  • removed resolution argument in sop (SopInstProfile and SopRotation etc)
  • numpy<2 added in setup.py because of installation error on pandas, numba etc
  • from jax.config import config is removed -> from jax import config

New features we focus on

We added new art, opa, pdb and also amp (Atmospheric Micro Physics class) for this new enhancement.

exojax

spec.atmrt.ArtReflectPure

art class for the pure (i.e. no emission) reflection spectrum (ArtReflectEmis, reflection+emis has not been verified)

The RT algorithm is basically the flux-adding treatment by Robinson & Crisp 2018; Robinson & Salvador 2023,

We added the opacity computation of clouds in art

dtau_cld = art.opacity_profile_cloud_lognormal(sigma_extinction, rhoc, MMRc, rg, sigmag, gravity)

spec.pardb.PdbCloud

pdb (particulate database) for clouds/condensates.

from exojax.spec.pardb import PdbCloud
pdb_nh3 = PdbCloud("NH3")
#condensate substance density
rhoc = pdb_nh3.condensate_substance_density #g/cc

spec.opacont.OpaMie

opa for Mie scattering. The following code computes the Mie parameters using PyMieScatt. So, OpaMie is a kind of a wrapper of PyMieScatt currently. I will update this for retrieval.

from exojax.spec.opacont import OpaMie
opa = OpaMie(pdb_nh3, nus)
sigma_extinction, sigma_scattering, asymmetric_factor = opa.mieparams_vector_direct_from_pymiescatt(rg, sigmag)

spec.amp.AmpAmcloud

amp for the Akerman and Marley cloud model

For instance, amp.calc_ammodel computes rg (condensate typical radius) and mass mixing ratio from the cloud parameters

rg_layer, MMRc = amp.calc_ammodel(Parr, Tarr, mu, molmass_nh3, gravity, fsed, sigmag, Kzz, MMRbase_nh3)

AM cloud model in ExoJAX

The tutorial of the implementation of the AM cloud model in ExoJAX can be found in documents/tutorials/Ackerman_and_Marley_cloud_model.ipynb, see here.

We also compared the code with VIRGA:

  • documents/userguide/amclouds_comparison_virga.ipynb (see here) if you are interested in the difference between the ExoJAX/amcloud and VIRGA.

Copy link

github-actions bot commented Mar 17, 2024

Unit Test Results

154 tests  +15   154 ✔️ +15   35s ⏱️ +3s
    1 suites ±  0       0 💤 ±  0 
    1 files   ±  0       0 ±  0 

Results for commit ed0d500. ± Comparison against base commit 4de023c.

♻️ This comment has been updated with latest results.

@HajimeKawahara HajimeKawahara changed the title Miescattering of clouds, and Refelection Spectrum (Forward modelling) Mie scattering of clouds, and Refelection Spectrum (Forward modelling) Mar 17, 2024
@ykawashima
Copy link
Collaborator

ykawashima commented Mar 25, 2024

Thank you very much!

I got a bit different result for the final figure of Ackerman and Marley cloud model tutorial. Is the figure outdated or did I do something wrong?

-> thanks! No, your results are correct. done it. (H.K.)

スクリーンショット 2024-03-25 13 23 56

As far as I understand, it seems that vmap is not used here.

Compute VMRs of clouds. Because Parr is an array, we apply jax.vmap to

"Compute VMRs of clouds. Because Parr is an array, we apply jax.vmap to atm.amclouds.VMRclouds."

Copy link
Collaborator

@ykawashima ykawashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for a lot of implementations! I have confirmed that the following four tutorials work. Sorry for my late review.

  • documents/tutorials/Jupiter_cloud_model_using_amp.ipynb
  • documents/tutorials/Jupiter_Hires_Modeling.ipynb
  • documents/tutorials/Ackerman_and_Marley_cloud_model.ipynb
  • documents/userguide/amclouds_comparison_virga.ipynb

HajimeKawahara and others added 9 commits March 26, 2024 07:55
Co-authored-by: ykawashima <44265645+ykawashima@users.noreply.github.com>
Co-authored-by: ykawashima <44265645+ykawashima@users.noreply.github.com>
Co-authored-by: ykawashima <44265645+ykawashima@users.noreply.github.com>
Co-authored-by: ykawashima <44265645+ykawashima@users.noreply.github.com>
Co-authored-by: ykawashima <44265645+ykawashima@users.noreply.github.com>
Co-authored-by: ykawashima <44265645+ykawashima@users.noreply.github.com>
@HajimeKawahara
Copy link
Owner Author

@ykawashima Thanks a lot!

@HajimeKawahara HajimeKawahara merged commit 44ce8f2 into develop Mar 25, 2024
3 checks passed
@HajimeKawahara HajimeKawahara deleted the mieclouds branch March 25, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloud (Mie) scattering using Ackerman and Marley model Jupiter reflection light
2 participants