-
Notifications
You must be signed in to change notification settings - Fork 10
[NDSL] GFDL Single moment microphysics port to NDSL #1041
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
Merged
FlorianDeconinck
merged 61 commits into
GEOS-ESM:dsl/develop
from
CharlesKrop:dsl/GFDL_1M_driver
Mar 7, 2025
Merged
Changes from 56 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
0a1ec4a
Merge remote-tracking branch 'origin/dsl/develop' into dsl/extradim_f…
CharlesKrop 9490578
Merge remote-tracking branch 'origin/dsl/develop' into dsl/extradim_f…
CharlesKrop c78e946
Merge remote-tracking branch 'origin/dsl/develop' into dsl/GFDL_1M_dr…
CharlesKrop 93c53a2
Written and verified: fall_speed, terminal_fall, implicit_fall, wqs2
CharlesKrop 8f10431
icloud verifies through line 474 of icloud_component_2 (end of major …
CharlesKrop 99ba9a5
Assembled, functioning GFDL_1M_driver. Errors remain: DQADTmic, DUDTm…
CharlesKrop 63b9d46
Updates to the driver
CharlesKrop 14c08d6
Added flexible backend specifier for driver_tables and improved the c…
CharlesKrop 434b244
Clean up
CharlesKrop 425dc6c
Merge remote-tracking branch 'origin/dsl/develop' into dsl/GFDL_1M_dr…
CharlesKrop 15dc561
pre-commit run and corrected errors
CharlesKrop 5875e82
Add `pymoist_GFDL_1M_driver` hook and interface for microphysics driv…
FlorianDeconinck 2151fbb
docstrings
CharlesKrop 94a9f46
Merge branch 'dsl/GFDL_1M_driver' of github.com:CharlesKrop/GEOSgcm_G…
CharlesKrop 7685b6b
refactored GFDL_1M_driver __init__ to move calculation of constants t…
CharlesKrop a83b6d3
capitalized constants
CharlesKrop 05bdd2b
update to python bridge to work with GFDL driver
CharlesKrop 721e0c0
Refactored bridge, created independent call & function cascade for gf…
CharlesKrop df5e551
Reworked gfdl driver calls into the pymoist wrapper
CharlesKrop d2a00b7
Working interface to pyMoist.GDFL_1M_driver
FlorianDeconinck daa9f10
Reset precipitation temporaries between iterations and functions
CharlesKrop 91f27f0
Merge branch 'dsl/GFDL_1M_driver' of github.com:CharlesKrop/GEOSgcm_G…
CharlesKrop a8ba509
Reset a few more outputs that were missed on the previous pass
CharlesKrop aa7b073
Re-enabled precipitation conversion to mm/day
CharlesKrop 0703593
Remove debug - HPC ready
FlorianDeconinck 4c582a5
Added check for fix_negative in check_flags
CharlesKrop 8ba44ff
Merge branch 'dsl/GFDL_1M_driver' of github.com:CharlesKrop/GEOSgcm_G…
CharlesKrop 9d0b1a7
removing dead code from warm_rain.py
CharlesKrop 352f7b6
Merge branch 'dsl/GFDL_1M_driver' into dsl/GFDL_1M
CharlesKrop ffb93ec
Major reorganization. No numerical differences. Results are still wro…
CharlesKrop 54c8fd6
Merge branch 'dsl/GFDL_1M' into dsl/GFDL_1M_driver
CharlesKrop 43ac84b
Revert run_tests.sh
CharlesKrop 5ea9313
reverted qsat.py
CharlesKrop b6ff723
Linting
CharlesKrop f7d6203
OSX DS_Store removal
FlorianDeconinck bfdfed3
Cleanup per Florian's PR comments
CharlesKrop fe72620
few new sat table constants, changed a few old constants to ensure th…
CharlesKrop 6da508e
Renames files, moved icloud and warm_rain into their own classes
CharlesKrop 355d2ca
finish refactor of driver class. last couple subclasses created. no n…
CharlesKrop d2b9722
Merge branch 'dsl/GFDL_1M_driver' of github.com:CharlesKrop/GEOSgcm_G…
CharlesKrop 2dc822e
Major reorganization of warm_rain. Minor reorganization/renaming in t…
CharlesKrop 1595619
new translate test design, implemented on warm_rain, first attempt. c…
CharlesKrop 69f7768
New translate tests. All are funcitonal EXCEPT the main driver test. …
CharlesKrop 18a7098
Update GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMo…
CharlesKrop 136d102
changed i32 to int
CharlesKrop 2fe3bcd
Update GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMo…
CharlesKrop 9a0deb4
added docstrings for constants
CharlesKrop 38318db
bunch of updates per Tobias' review
CharlesKrop cdb315f
more changes from tobias' review
CharlesKrop 922b41c
Merge branch 'dsl/GFDL_1M_driver' of github.com:CharlesKrop/GEOSgcm_G…
CharlesKrop 6eafc57
changed organization of constant files
CharlesKrop 9daa8d6
stencilified the saturation table calculations
CharlesKrop 207ccdf
last round of changes per Tobias' first round of comments
CharlesKrop 0cec3e1
pre-commit checks
CharlesKrop 3b69483
classes to dataclasses where appropriate
CharlesKrop e88411e
linting
CharlesKrop b4a4e94
autodetection of library_dirs for the pymoist interface
CharlesKrop 3d2b8a6
pre-commit
CharlesKrop 86412cd
MicrophysicsConfiguration class --> dataclass
CharlesKrop 971a307
Remove unneeded `make`
FlorianDeconinck 1ab3622
Lint
FlorianDeconinck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
71 changes: 71 additions & 0 deletions
71
...omp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/check_flags.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| from ndsl.dsl.typing import Float | ||
| from pyMoist.GFDL_1M.driver.config import MicrophysicsConfiguration | ||
|
|
||
|
|
||
| def check_flags( | ||
| GFDL_1M_config: MicrophysicsConfiguration, | ||
| dts: Float, | ||
| ): | ||
| """ | ||
| Checks for any flags that are no meeting the expected value. | ||
| Failing flags are likely not implemetned, | ||
| or at the very least not fully implemented | ||
| """ | ||
| failed_keywords = [] | ||
| if not GFDL_1M_config.PHYS_HYDROSTATIC: | ||
| failed_keywords.append("phys_hydrostatic") | ||
| if GFDL_1M_config.HYDROSTATIC: | ||
| failed_keywords.append("hydrostatic") | ||
| if GFDL_1M_config.CONST_VI: | ||
| failed_keywords.append("const_vi") | ||
| if GFDL_1M_config.CONST_VS: | ||
| failed_keywords.append("const_vs") | ||
| if GFDL_1M_config.CONST_VG: | ||
| failed_keywords.append("const_vg") | ||
| if GFDL_1M_config.CONST_VR: | ||
| failed_keywords.append("const_vr") | ||
| if GFDL_1M_config.USE_PPM: | ||
| failed_keywords.append("use_ppm") | ||
| if not GFDL_1M_config.USE_CCN: | ||
| failed_keywords.append("use_ccn") | ||
| if GFDL_1M_config.DO_QA: | ||
| failed_keywords.append("do_qa") | ||
| if not GFDL_1M_config.FIX_NEGATIVE: | ||
| failed_keywords.append("fix_negative") | ||
| if GFDL_1M_config.FAST_SAT_ADJ: | ||
| failed_keywords.append("fast_sat_adj") | ||
| if GFDL_1M_config.DO_BIGG: | ||
| failed_keywords.append("do_bigg") | ||
| if GFDL_1M_config.DO_EVAP: | ||
| failed_keywords.append("do_evap") | ||
| if GFDL_1M_config.DO_SUBL: | ||
| failed_keywords.append("do_subl") | ||
| if not GFDL_1M_config.Z_SLOPE_LIQ: | ||
| failed_keywords.append("z_slope_liq") | ||
| if not GFDL_1M_config.Z_SLOPE_ICE: | ||
| failed_keywords.append("z_slope_ice") | ||
| if not GFDL_1M_config.PROG_CCN: | ||
| failed_keywords.append("prog_ccn") | ||
| if not GFDL_1M_config.PRECIPRAD: | ||
| failed_keywords.append("preciprad") | ||
| if not GFDL_1M_config.MONO_PROF: | ||
| failed_keywords.append("mono_prof") | ||
| if GFDL_1M_config.DO_SEDI_HEAT: | ||
| failed_keywords.append("do_sedi_heat") | ||
| if not GFDL_1M_config.SEDI_TRANSPORT: | ||
| failed_keywords.append("sedi_transport") | ||
| if GFDL_1M_config.DO_SEDI_W: | ||
| failed_keywords.append("do_sedi_w") | ||
| if GFDL_1M_config.DE_ICE: | ||
| failed_keywords.append("de_ice") | ||
| if GFDL_1M_config.MP_PRINT: | ||
| failed_keywords.append("mp_print") | ||
| if dts >= 300: | ||
| failed_keywords.append("dts") | ||
|
|
||
| if len(failed_keywords) > 0: | ||
| raise ValueError( | ||
| "One or more namelist parameters do not meet \ | ||
| expected values. Failing parameters: ", | ||
| failed_keywords, | ||
| ) |
173 changes: 173 additions & 0 deletions
173
...GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/driver/config.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,173 @@ | ||
| from ndsl.dsl.typing import Float | ||
|
|
||
|
|
||
| class MicrophysicsConfiguration: | ||
| def __init__( | ||
| self, | ||
| PHYS_HYDROSTATIC: bool, | ||
| HYDROSTATIC: bool, | ||
| DT_MOIST: Float, | ||
| MP_TIME: Float, | ||
| T_MIN: Float, | ||
| T_SUB: Float, | ||
| TAU_R2G: Float, | ||
| TAU_SMLT: Float, | ||
| TAU_G2R: Float, | ||
| DW_LAND: Float, | ||
| DW_OCEAN: Float, | ||
| VI_FAC: Float, | ||
| VR_FAC: Float, | ||
| VS_FAC: Float, | ||
| VG_FAC: Float, | ||
| QL_MLT: Float, | ||
| DO_QA: bool, | ||
| FIX_NEGATIVE: bool, | ||
| VI_MAX: Float, | ||
| VS_MAX: Float, | ||
| VG_MAX: Float, | ||
| VR_MAX: Float, | ||
| QS_MLT: Float, | ||
| QS0_CRT: Float, | ||
| QI_GEN: Float, | ||
| QL0_MAX: Float, | ||
| QI0_MAX: Float, | ||
| QI0_CRT: Float, | ||
| QR0_CRT: Float, | ||
| FAST_SAT_ADJ: bool, | ||
| RH_INC: Float, | ||
| RH_INS: Float, | ||
| RH_INR: Float, | ||
| CONST_VI: bool, | ||
| CONST_VS: bool, | ||
| CONST_VG: bool, | ||
| CONST_VR: bool, | ||
| USE_CCN: bool, | ||
| RTHRESHU: Float, | ||
| RTHRESHS: Float, | ||
| CCN_L: Float, | ||
| CCN_O: Float, | ||
| QC_CRT: Float, | ||
| TAU_G2V: Float, | ||
| TAU_V2G: Float, | ||
| TAU_S2V: Float, | ||
| TAU_V2S: Float, | ||
| TAU_REVP: Float, | ||
| TAU_FRZ: Float, | ||
| DO_BIGG: bool, | ||
| DO_EVAP: bool, | ||
| DO_SUBL: bool, | ||
| SAT_ADJ0: Float, | ||
| C_PIACR: Float, | ||
| TAU_IMLT: Float, | ||
| TAU_V2L: Float, | ||
| TAU_L2V: Float, | ||
| TAU_I2V: Float, | ||
| TAU_I2S: Float, | ||
| TAU_L2R: Float, | ||
| QI_LIM: Float, | ||
| QL_GEN: Float, | ||
| C_PAUT: Float, | ||
| C_PSACI: Float, | ||
| C_PGACS: Float, | ||
| C_PGACI: Float, | ||
| Z_SLOPE_LIQ: bool, | ||
| Z_SLOPE_ICE: bool, | ||
| PROG_CCN: bool, | ||
| C_CRACW: Float, | ||
| ALIN: Float, | ||
| CLIN: Float, | ||
| PRECIPRAD: bool, | ||
| CLD_MIN: Float, | ||
| USE_PPM: bool, | ||
| MONO_PROF: bool, | ||
| DO_SEDI_HEAT: bool, | ||
| SEDI_TRANSPORT: bool, | ||
| DO_SEDI_W: bool, | ||
| DE_ICE: bool, | ||
| ICLOUD_F: Float, | ||
| IRAIN_F: Float, | ||
| MP_PRINT: bool, | ||
| ): | ||
| self.PHYS_HYDROSTATIC = PHYS_HYDROSTATIC | ||
| self.HYDROSTATIC = HYDROSTATIC | ||
| self.DT_MOIST = DT_MOIST | ||
| self.MP_TIME = MP_TIME | ||
| self.T_MIN = T_MIN | ||
| self.T_SUB = T_SUB | ||
| self.TAU_R2G = TAU_R2G | ||
| self.TAU_SMLT = TAU_SMLT | ||
| self.TAU_G2R = TAU_G2R | ||
| self.DW_LAND = DW_LAND | ||
| self.DW_OCEAN = DW_OCEAN | ||
| self.VI_FAC = VI_FAC | ||
| self.VR_FAC = VR_FAC | ||
| self.VS_FAC = VS_FAC | ||
| self.VG_FAC = VG_FAC | ||
| self.QL_MLT = QL_MLT | ||
| self.DO_QA = DO_QA | ||
| self.FIX_NEGATIVE = FIX_NEGATIVE | ||
| self.VI_MAX = VI_MAX | ||
| self.VS_MAX = VS_MAX | ||
| self.VG_MAX = VG_MAX | ||
| self.VR_MAX = VR_MAX | ||
| self.QS_MLT = QS_MLT | ||
| self.QS0_CRT = QS0_CRT | ||
| self.QI_GEN = QI_GEN | ||
| self.QL0_MAX = QL0_MAX | ||
| self.QI0_MAX = QI0_MAX | ||
| self.QI0_CRT = QI0_CRT | ||
| self.QR0_CRT = QR0_CRT | ||
| self.FAST_SAT_ADJ = FAST_SAT_ADJ | ||
| self.RH_INC = RH_INC | ||
| self.RH_INS = RH_INS | ||
| self.RH_INR = RH_INR | ||
| self.CONST_VI = CONST_VI | ||
| self.CONST_VS = CONST_VS | ||
| self.CONST_VG = CONST_VG | ||
| self.CONST_VR = CONST_VR | ||
| self.USE_CCN = USE_CCN | ||
| self.RTHRESHU = RTHRESHU | ||
| self.RTHRESHS = RTHRESHS | ||
| self.CCN_L = CCN_L | ||
| self.CCN_O = CCN_O | ||
| self.QC_CRT = QC_CRT | ||
| self.TAU_G2V = TAU_G2V | ||
| self.TAU_V2G = TAU_V2G | ||
| self.TAU_S2V = TAU_S2V | ||
| self.TAU_V2S = TAU_V2S | ||
| self.TAU_REVP = TAU_REVP | ||
| self.TAU_FRZ = TAU_FRZ | ||
| self.DO_BIGG = DO_BIGG | ||
| self.DO_EVAP = DO_EVAP | ||
| self.DO_SUBL = DO_SUBL | ||
| self.SAT_ADJ0 = SAT_ADJ0 | ||
| self.C_PIACR = C_PIACR | ||
| self.TAU_IMLT = TAU_IMLT | ||
| self.TAU_V2L = TAU_V2L | ||
| self.TAU_L2V = TAU_L2V | ||
| self.TAU_I2V = TAU_I2V | ||
| self.TAU_I2S = TAU_I2S | ||
| self.TAU_L2R = TAU_L2R | ||
| self.QI_LIM = QI_LIM | ||
| self.QL_GEN = QL_GEN | ||
| self.C_PAUT = C_PAUT | ||
| self.C_PSACI = C_PSACI | ||
| self.C_PGACS = C_PGACS | ||
| self.C_PGACI = C_PGACI | ||
| self.Z_SLOPE_LIQ = Z_SLOPE_LIQ | ||
| self.Z_SLOPE_ICE = Z_SLOPE_ICE | ||
| self.PROG_CCN = PROG_CCN | ||
| self.C_CRACW = C_CRACW | ||
| self.ALIN = ALIN | ||
| self.CLIN = CLIN | ||
| self.PRECIPRAD = PRECIPRAD | ||
| self.CLD_MIN = CLD_MIN | ||
| self.USE_PPM = USE_PPM | ||
| self.MONO_PROF = MONO_PROF | ||
| self.DO_SEDI_HEAT = DO_SEDI_HEAT | ||
| self.SEDI_TRANSPORT = SEDI_TRANSPORT | ||
| self.DO_SEDI_W = DO_SEDI_W | ||
| self.DE_ICE = DE_ICE | ||
| self.ICLOUD_F = ICLOUD_F | ||
| self.IRAIN_F = IRAIN_F | ||
| self.MP_PRINT = MP_PRINT | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.