-
Notifications
You must be signed in to change notification settings - Fork 435
Dynamical adjustment on freshwater fluxes balance for E3SM runs #7361
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
@zhangshixuan1987, this seems like a nice capability. I'll take a look early this coming week. Concerning labels, I would not use |
Hi @xylar : Thank you for the clarification. I removed the labels "data-ocean" and "MPAS-Ocean". |
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 @zhangshixuan1987! This looks promising!
A few questions and suggested changes to begin with. The bulk of the code looks very good to me, similar to the scaled DISMF/DIB approach.
components/mpas-ocean/src/analysis_members/Registry_global_stats.xml
Outdated
Show resolved
Hide resolved
Thanks @zhangshixuan1987! That's nice to have fixed up (not just your additions but other problems left by others in the registry). |
This only affects uncoupled cases? The PR description needs to have a more brief summary at the top. |
@rljacob : Hi Rob, thank you for the suggestions. Yes, the pull request currently only targets the uncoupled cases (G-case or GCase+ ICase). I added a "Brief description" section at the top, and hopefully this is a correct understanding on your suggestions. |
That's better. Is this a stealth feature or is it on by default? |
@rljacob does stealth impact G/G-I/C cases? I guess so if we have G-cases in testing. I'd want to see impacts in a much longer test before this is turned on by default (at least a couple JRA cycles) |
Yes we test G-cases. My question is about how its currently implemented. You can always change it later. |
I think this should be a stealth feature until it undergoes a lot more testing in a lot of configurations. But I think as it is coded, it is a stealth feature and is off by default |
I agree with @jonbob and @vanroekel. it should be stealth for now. |
I agree. Let's keep it a stealth feature. |
@zhangshixuan1987 - we have some scripts to make the bld files consistent with the changes to Registry. I ran them and they came up with some changes, which I have pushed to your branch. However, I noticed that you added more documentation to the namelist_definition_mpaso.xml file than was in Registry, so you might want to look at the changes and think about modifying Registry to reflect the enhanced descriptions. I can always run the scripts again, if you decide to do so |
Passes (with expected NML DIFFs):
|
|
@jonbob: Hi Jon, could you please explain a little bit more about the "you added more documentation to the namelist_definition_mpaso.xml file than was in Registry, so you might want to look at the changes and think about modifying Registry to reflect the enhanced descriptions" |
Hi @jonbob, Following up on your comments — if I understand correctly, you're suggesting that we ensure consistency in the descriptions of the relevant namelist variables introduced in this pull request between namelist_defaults_mpaso.xml and Registry.xml, correct? If so, I’ve updated |
@zhangshixuan1987 -- sorry, I realize that wasn't very clear. We have scripts that take the information in the Registry files and make the bld files -- like namelist_definitions_mpaso.xml. So any changes you made to that file by hand will be lost when we re-generate them. So if there's documentation you have added to namelist_definitions_mpaso.xml and not Registry, you may want to transfer that documentation to Registry and I'll remake the bld files to match it |
Hi @zhangshixuan1987 -- I didn't see any changes recently, so I'm not sure what you're referring to. Let me see if I can explain the process better. We don't modify namelist_definitions_mpaso.xml directly -- it is auto-generated by scripts using the descriptions and other information in the Registry files. I ran those scripts on this branch committed the updates, but noticed that you had added documentation to namelist_definitions_mpaso.xml that this would overwrite. I just wanted to make sure nothing important is getting lost, so if you want to keep the extra descriptions you added to namelist_definitions_mpaso.xml, we'll need to move them to Registry and I will rerun the scripts. Right now -- or at least after my commit -- they are consistent. |
…ith namelist_definition_mpaso.xml
@jonbob : Apologies for the confusion earlier. I realized that I had been working under a separate branch, precfactor_rebase, where I intended to make the recent modifications. Following your explanations above, I have updated the Please take another look when you have a chance, and let me know if you have any further questions or suggestions. Apologies again for the mix-up, and thank you for your guidance. |
Thanks @zhangshixuan1987 -- I guess I still wasn't clear about the namelist_definitions_mpaso.xml and namelist_defaults_mpaso.xml files. Those files are auto-generated (mostly) from the Registry files, so there is no need to modify them. Mostly we just need definitions and descriptions to be made in Registry, and then the scripts use those updates to populate the namelist_ files. But I see you have added more text to Registry, so I'll run the scripts again and hopefully we'll be good to go. |
Thank you, @jonbob, for the further explanation. I believe I now fully understand the intent. The descriptions I’ve added to the |
Dynamical adjustment on freshwater fluxes balance for E3SM runs This pull request introduces a new module and function in the MPAS-Ocean (MPAS-O) model to compute and apply a scaling factor on precipitation fluxes. The goal of this feature is to help maintain freshwater balance in ocean-only simulations by mitigating the spurious linear trend observed in sea surface height (SSH) over time. The updates specifically target uncoupled ocean configurations, including: * G-case: ocean + sea ice with data atmosphere * GP- or J-case: land + river + ocean + sea ice with data atmosphere These configurations do not include a dynamically coupled atmosphere, and thus lack the feedback mechanisms necessary for naturally maintaining freshwater balance. This PR provides a workaround by dynamically adjusting the precipitation flux. [NML] [BFB] - stealth feature, off by default
Passes:
merged to next |
merged to master and expected NML DIFFs blessed except for pm-cpu prod and developer, which have not yet reported |
blessed everywhere now |
Fix a minor documentation issue in mpaso Registry.xml In the mpaso Registry file, the possible_values for config_land_ice_draft_mode had a missing single quote: possible_values="'data,'pressure-dependent'" This fixes that and updates the bld files to be consistent. Those updates also pick up changes that must have been missed in PR #7361. [BFB]
Fix a minor documentation issue in mpaso Registry.xml In the mpaso Registry file, the possible_values for config_land_ice_draft_mode had a missing single quote: possible_values="'data,'pressure-dependent'" This fixes that and updates the bld files to be consistent. Those updates also pick up changes that must have been missed in PR #7361. [BFB]
This pull request introduces a new module and function in the MPAS-Ocean (MPAS-O) model to compute and apply a scaling factor on precipitation fluxes. The goal of this feature is to help maintain freshwater balance in ocean-only simulations by mitigating the spurious linear trend observed in sea surface height (SSH) over time. The updates specifically target uncoupled ocean configurations, including:
These configurations do not include a dynamically coupled atmosphere, and thus lack the feedback mechanisms necessary for naturally maintaining freshwater balance. This PR provides a workaround by dynamically adjusting the precipitation flux.
[NML]
[BFB] - stealth feature, off by default
Problem Overview
In E3SM preindustrial (1850) spin-up simulations using standalone ocean or ocean-plus-land configurations—particularly when driven by prescribed historical atmospheric forcing—a pronounced linear trend appears in the sea surface height (SSH) anomaly fields (Figure 1). This trend signals a breakdown in the freshwater budget, which is normally maintained in fully coupled simulations. Without an interactive atmosphere, the ocean component cannot influence freshwater fluxes such as precipitation and snowfall, eliminating the feedback mechanisms necessary for a balanced system. As a result, the standalone spin-up generates unrealistic SSH states, degrading the initial conditions used for fully coupled production runs.

Solution Summary

This pull request introduces a mechanism to dynamically enforce freshwater balance in standalone ocean configurations of E3SM. It implements a scaling scheme that adjusts the atmospheric precipitation fluxes (rain + snow) passed to the ocean model. The scaling factor is derived from the diagnosed imbalance between precipitation, evaporation, and river runoff, ensuring that the net freshwater input to the ocean evolves conservatively over time. This approach helps mitigate the spurious sea surface height drift typically observed in long spin-up simulations without interactive atmospheric feedbacks (see example in Figure 2 for time evolution of SSH after applying the scaling scheme in this pull request).
Key Features
Precipitation scaling logic: Applies a time-evolving or constant scaling factor to rain and snow fluxes from the prescribed atmosphere to maintain freshwater balance.
Runtime diagnostics: Tracks and reports freshwater flux terms to evaluate the effectiveness of the adjustment.
Targeted simulation: Designed for use in standalone ocean and ocean-land E3SM configurations, particularly during long spin-up phases.
Design and Documentation
Full technical details, including derivation of the scaling algorithm, code structure, verification strategy, and validation results, are documented at:
Design Document: Dynamical adjustment on freshwater fluxes balance for E3SM runs