[NDSL] GFDL Single moment microphysics port to NDSL#1041
Merged
FlorianDeconinck merged 61 commits intoGEOS-ESM:dsl/developfrom Mar 7, 2025
Merged
[NDSL] GFDL Single moment microphysics port to NDSL#1041FlorianDeconinck merged 61 commits intoGEOS-ESM:dsl/developfrom
FlorianDeconinck merged 61 commits intoGEOS-ESM:dsl/developfrom
Conversation
Written but unverified: warm_rain, i_cloud, iqs1, iqs2, wqs1 Written, verified, but incorrect: all tables. Errors are small (< 100 ULP) for tables. des tables (which are just the gradients of the tables themselves) have larger errors, but none of these errors cause significant problems in later calculations, so I am putting them aside for now.
…if, before major else). warm rain does not verify. only fails because of implicit rain "function" call. this "function" runs perfectly within the terminal_fall port (called three times with different data of similar order of magnitude), but fails within warm_rain
…ic, DQVDTmic, DQLDTmic, DQIDTmic, PRCP_ICE, PFI_LS DQIDTmic and DUDTmic errors are small in magnitude not tremendous concern. Others are a problem
…heck_flags error handling capabilities. Driver passes when testing only the first loop (with the exception of DQADTmic), errors grow with each subsequent loop, compounding to some pretty serious errors after the final iteration. Cause unknown
FlorianDeconinck
requested changes
Dec 30, 2024
Collaborator
FlorianDeconinck
left a comment
There was a problem hiding this comment.
First look. More docstrings on all functions and rename of the generic "loop" functions + inline coments
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Outdated
Show resolved
Hide resolved
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Outdated
Show resolved
Hide resolved
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Outdated
Show resolved
Hide resolved
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Outdated
Show resolved
Hide resolved
...omp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/icloud.py
Outdated
Show resolved
Hide resolved
...Sphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/terminal_fall.py
Outdated
Show resolved
Hide resolved
...Sphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/terminal_fall.py
Outdated
Show resolved
Hide resolved
GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/saturation/qsat.py
Outdated
Show resolved
Hide resolved
GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/tests/scripts/run_tests.sh
Outdated
Show resolved
Hide resolved
…er port Fix all string `cffi.FFI.CDATA` with __annotations__ since py 3.11
…ridComp into dsl/GFDL_1M_driver
…o a class (namelist_constants) moved length constant to driver_constants
…he rest of the driver
…lose but something is wrong with the extra data loader
…Need to figure out to test outputs that are not also inputs
twicki
previously requested changes
Feb 26, 2025
...cm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/config.py
Outdated
Show resolved
Hide resolved
...cm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/config.py
Show resolved
Hide resolved
...GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/constants.py
Show resolved
Hide resolved
...GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/constants.py
Outdated
Show resolved
Hide resolved
...GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/constants.py
Outdated
Show resolved
Hide resolved
...GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/terminal_fall/main.py
Show resolved
Hide resolved
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/terminal_fall/stencils.py
Show resolved
Hide resolved
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/terminal_fall/stencils.py
Show resolved
Hide resolved
...sics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/terminal_fall/temporaries.py
Show resolved
Hide resolved
...GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/warm_rain/stencils.py
Show resolved
Hide resolved
…ist/pyMoist/GFDL_1M/driver/config.py renamed config class Co-authored-by: Tobias Wicky-Pfund <tobias.wicky@meteoswiss.ch>
…ist/pyMoist/GFDL_1M/driver/constants.py Co-authored-by: Tobias Wicky-Pfund <tobias.wicky@meteoswiss.ch>
…ridComp into dsl/GFDL_1M_driver
FlorianDeconinck
requested changes
Mar 7, 2025
Collaborator
FlorianDeconinck
left a comment
There was a problem hiding this comment.
Almost there:
- Configuration is textbook dataclass, let's get it there
- Interface need to be returned to the non-OSX hack (for now)
...cm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/config.py
Show resolved
Hide resolved
...Comp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/interface/cffi_lib/interface.py
Outdated
Show resolved
Hide resolved
...Comp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/interface/cffi_lib/interface.py
Show resolved
Hide resolved
Update `.gitignore` to next standard
FlorianDeconinck
approved these changes
Mar 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GFDL single moment microphysics port to NDSL of the driver, corresponding to
gfdl_cloud_microphys_driverin the source Fortran.dace:cpubackendPartial Validation
GFDL_1M_driver created. Primary components:
fall_speed,terminal_fall,warm_rain,icloud. All components are considered correct on their own, with minor errors (order 10^-9/10^-10 or <100 ULP in most cases) inwarm_rainandicloud.Putting these components together results in divergence in nearly all variables. Most are minor, but a few (e.g
PRCP_RAIN) are significant. These errors are most likely the accumulation of the small errors from the aforementioned driver components as the driver runs its iterations (in the test case, these functions were called 12 times).Configuration ported
During construction numerous unexecuted code paths were discovered, controlled by boolean keywords. This keyword control pattern has been replicated, but unexecuted code was not carried over. Instead, if one of these paths would be triggered, the keywords will prevent execution.