-
Notifications
You must be signed in to change notification settings - Fork 96
Add namelist control around the qsat calculation for atm-ocn fluxes #625
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
Conversation
This currently isn't used but will be in an upcoming commit
Use shr_wv_sat_qsat_liquid if aofluxes_use_shr_wv_sat is true, otherwise use the old, inline formulation. This just applies to the Large and COARE formulations.
Instead, refer to the relevant issue
|
@mvertens - I'd welcome a careful review from you here to make sure that this is going to integrate smoothly into the noresm branch, since the main point of this PR is to facilitate merging the noresm branch with the main ESCOMP branch. I have double-checked this reinstated code against what's in the NorESM branch, but in addition to reviewing the code, can you please test to confirm that this is bit-for-bit with the NorESM code when you set the new config variable to false? @jiang-zhu - I'd welcome your double-check of the changes I made to your recent edits in the flux modules to make sure this looks right. @megandevlan - as CESM code owner of the flux routines, I'd welcome whatever level of review you want to give this, from detailed review to just deferring to the other reviewers here... up to you. |
mvertens
left a comment
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.
Thanks @billsacks. These changes look great.
|
@billsacks - thanks so much for this PR. I've reviewed it and the changes look great. I'm just wondering what the next steps are for the NorESMhub and ESCOMP CMEPS versions to be brought more closely together. |
|
Thanks, @mvertens . I have made a branch where I've merged the latest escomp changes into the noresm branch. That includes both the recent changes in escomp/main and the changes in this PR. I think that's the first step to getting these reconciled. I'm opening a PR into the noresm branch for that: NorESMhub#45. Once we get that in, we should talk about the next steps... I'm not fully sure of it myself, but am happy to talk it through with you. |
This is the branch from ESCOMP#625 Resolved Conflicts: cesm/flux_atmocn/flux_atmocn_COARE_mod.F90 cesm/flux_atmocn/flux_atmocn_Large.F90 cime_config/namelist_definition_drv.xml
3.9 is now the minimum supported by CIME
|
@jedwards4b - note that I just pushed a commit to this branch that changes the python 3.8 testing to 3.9 in srt.yml since CIME's minimum python version is now 3.9. |
|
This looks great to me as well! |
3.9 gives a warning, which seems to create a error in the GitHub testing. So instead of 3.9 and 3.11, use 3.10 and 3.12.
|
@jedwards4b - I actually changed srt.yml to test python 3.10 and 3.12: 3.9 generated a warning which apparently causes errors in the GitHub testing. Since I was bumping 3.9 to 3.10, I also bumped 3.11 to 3.12 to have a broader set of versions. |
|
@billsacks I just asked for your review of a PR that fixes the issues with python 3.9. |
Otherwise it's interpreted as 3.1
jedwards4b
left a comment
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.
A couple of suggestions.
|
@jedwards4b - these are both really good suggestions. |
|
I agree - these are both great suggestions, @jedwards4b . I'll add code to write the value to the log file. I can take a stab at adding a comment, but would love feedback from both of you (@jedwards4b and @mvertens ) if you have any thoughts about what that comment should look like based on your understanding of the background/history. |
|
@billsacks - for the NorESM branch you can write that 'This option is currently being used by NorESM'. I'm not sure I would add that further validation needs to be done to adopt the changes for using the share code for now. Does that sound reasonable? |
|
Sounds good - thanks, @mvertens . I think I'll also add that it is the historical option that was used for a long time prior to the recent change in Oct, 2025. |
|
@billsacks - perfect. |
|
@jiang-zhu gave approval via email, so I'm going ahead and merging this. |
Description of changes
The calculation of qsat in the atm-ocn fluxes was recently changed to use the shr_wv_sat module. However, NorESM would like to continue to use the old formulation for now. This PR reintroduces the old code and introduces a new config variable that controls whether to use the old or new formulation for qsat.
The goal here is to allow NorESM and CESM to use the same code, so that @mvertens doesn't need to maintain a separate fork of CMEPS for NorESM. For now, NorESM will need a one-line difference in the namelist definition file, setting the default value of aofluxes_use_shr_wv_sat to false instead of true.
Note that this only applies to ocn_surface_flux_scheme = 0 (Large) or 1 (COARE) (but see #624 regarding extending this at some point).
This PR also renames some arguments in the calls to shr_wv_sat_qsat_liquid to better match the argument names in that subroutine.
Specific notes
Contributors other than yourself, if any:
CMEPS Issues Fixed (include github issue #):
Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial) No - bfb
Any User Interface Changes (namelist or namelist defaults changes)? Adds new namelist flag, aofluxes_use_shr_wv_sat.
Testing performed
Ran these tests in the context of cesm3_0_alpha08a (but with share code updated to the latest, since that's a dependency of the latest CMEPS):
I ran 4 versions of these tests: