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

How to change planetary properties? #120

Open
danielkoll opened this issue Jan 10, 2020 · 2 comments
Open

How to change planetary properties? #120

danielkoll opened this issue Jan 10, 2020 · 2 comments

Comments

@danielkoll
Copy link

danielkoll commented Jan 10, 2020

Is there an easy way to change physical constants, say, if I wanted to run climlab across a range of different surface gravities or atmospheric MMWs? The only way I know of doing this right now would be to make a hard copy of the climlab library, modifying the constants in the copy, then importing both library versions into python. This becomes impractical once I'm thinking about dozens of different parameter values.

**Sub-issues that only matter for non-grey radiation:

  • CAM3 currently seems to import its constants from 'climlab/radiation/cam3/src/shr_const_mod.F90', which are different than those set in 'climlab/utils/constants.py'.
  • RRTMG appears even more hard-wired, e.g., surface gravity is a fixed value set in 'rrtmg_lw_init.f90'.

To deal with this one would presumably have to modify the fortran structure so CAM3/RRTM get their physical constants as inputs?

@brian-rose
Copy link
Collaborator

Short answer is no, there is no easy way to do this. And there should be.

Also I think you raise an important point about possible inconsistencies in physical constants.

I think we'll put this on the list of things to prioritize in the imminent major re-write of climlab internals. Along the lines of #119, the user should be able to pass physical constants as optional keyword arguments to each process.

@brian-rose
Copy link
Collaborator

See PR #123. Proof-of-concept for one way to handle this.

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

No branches or pull requests

2 participants