-
Notifications
You must be signed in to change notification settings - Fork 0
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
Moist-Dry conversions #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks sensible to me. Some more comments might help, in particular what the variables are and what happens, e.g., in the iteration in lines 687-716. Otherwise fine.
0e6767a
to
6780dac
Compare
I have added some comments and references to explain the variable conversion code in f4e7198 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit worried about the introduction of the r variables for mixing ratios. We have ended up with lines like:
qn = max(0., r_temp-qsat)
Here qn, qsat, and r_temp are all mixing ratios but only one is denoted r.
An alternative approach would be to keep everything as q, and have distinct blocks of code that do the moist to dry mixing ratio conversions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with this now, but will refrain from approving it until @paogorman is happy, too
I have renamed the variables used by 'SAM' to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to rv etc. generally looks good and does make things clearer.
For CAM_var_conversion:
- might be cleaner to introduce rc,ri explicitly (but what you have looks right)
- are you now missing a declaration for incoming variables qc,qi?
This should now be ready to go. |
…se in the SAM parts of the code.
…se in the returning CAM parts of the code.
… for condensation.
…e as requested by @ MarionBWeinzierl.
… SAM is dry mixing.
…M->SAM variable conversion to improve clarity.
7ceba23
to
15e21cc
Compare
Yes this looks good - thanks Jack |
This addresses #15
The variable conversion routines now also include a moist - dry conversion and back.
The moist mixing ratios from CAM are now converted to dry mixing ratios as expected by SAM for use in that code, and then back for calculation of tendencies and return values.