Repository navigation
DSL - GFDL1M (and some pyMoist shared code) to v11.11.0 - #1590
CharlesKrop wants to merge 368 commits into
Conversation
…ling values along with var names
…rought in associated changes from v11.10
…Comp into dsl/fix/microphysics
…ostatic mode turns off DO_SEDI_W, but the opposide is no longer necessarily true
… paths are fully implemented
…ted fields are present. Macrophysics and Microphysics tests pass at all ranks and savepoints, main GFDL1M fails some ranks/savepoints
…t including the surface layer in a calculation
…fdl_1m.py" Attempted to do this in a previous commit, but mac file system is case insensitive, so the changes never actually went through. Applying them now for HPC
…ac case insensitve file system)
… are unassociated
…s for fields within nested dataclasses
|
Note to reviewers: a few directories and files were renamed, significantly bloating the total files changed count. Most substantial/scientific changes are confined to ~15 files (either in |
FlorianDeconinck
left a comment
There was a problem hiding this comment.
Overall good.
Docstrings could use work, make a first pass to at least put down the essential one alongside the big classes. When you don't know, write down a "To Document" notice for further improvement.
Translate test are meh, but that's more on the side of the overall framework not delivering, so a pass on that.
Likewise for the mixed precision of constant, DSL lacking here too
| # In testing, this difference resulted in errors no larger than four (4) ULP. | ||
| dqsat = dq * DEGSUBS | ||
| dqsat = ESFAC * dqsat * p * (dd * dd) | ||
| # Match the selected Fortran entry point's evaluation order. A few ULPs |
There was a problem hiding this comment.
| # Match the selected Fortran entry point's evaluation order. A few ULPs | |
| # Dev NOTE: Match the selected Fortran entry point's evaluation order. A few ULPs |
There was a problem hiding this comment.
Let's try to differentiation implementation/dev notes from algorithmic ones
|
|
||
| Args: | ||
| mass (FloatField) | ||
| u (FloatField) |
There was a problem hiding this comment.
Do we want to be verbose with all of this? I mean mass is mass, but maybe there's always a few different way to keep mass
| self._managed_state.register("fill_negative_tendency_cloud_micro.snow", "DQSDT_FILL_CLDMICRO", export_repository) | ||
| self._managed_state.register("fill_negative_tendency_cloud_micro.vapor", "DQVDT_FILL_CLDMICRO", export_repository) | ||
|
|
||
| # system to alert that radar diag is requested, but not yet implemented. remove when implemented |
| with TimedCUDAProfiler("GFDL 1M - State copy", {}): | ||
| self._managed_state.fortran_to_ndsl() | ||
| # KPBL_SC is Fortran-indexed. Convert to Python index while Python numerics run, then restore before state copy-back. | ||
| self._managed_state.ndsl_state.boundary_layer_level_for_uw_shallow_conv.field[:] -= 1 |
There was a problem hiding this comment.
Side note: we should somewhat encode this type of overhead strictly due to the hybrid nature of the interfacing
| original_orchestrate = config._orchestrate | ||
| config._orchestrate = DaCeOrchestration.Build | ||
| set_distributed_caches(config=self.config, force_build=True) | ||
| config._set_distributed_caches(force_build=True) |
There was a problem hiding this comment.
| config._set_distributed_caches(force_build=True) | |
| # Dev NOTE: refactor when NDSL exposes a public API for distribute caching and/or reworks it's build system | |
| config._set_distributed_caches(force_build=True) |
There was a problem hiding this comment.
Not a fan of "setup", as this could have different aim, e.g. setup the numerics, setup an implementation detail, etc.
| t = t - (MAPL_ALHS / MAPL_CP) * subl | ||
|
|
||
|
|
||
| # # able of lookup values of radiative effective radius of ice crystals as a function of temperature from |
There was a problem hiding this comment.
Inline comments should be docstrings for some of them
|
|
||
|
|
||
| # surface type constants | ||
| SRF_TYPE_OCEAN = Int(0) |
There was a problem hiding this comment.
Also, we have IntEnum now! (I think)
There was a problem hiding this comment.
(can be done later)
| from .microphysics.GFDL_1M.translate_GFDL_1M_RedistributeClouds import TranslateGFDL_1M_RedistributeClouds | ||
| from .microphysics.GFDL_1M.translate_GFDL_1M_Setup import TranslateGFDL_1M_Setup | ||
| from .translate_aerosol_activation import TranslateAerosolActivation | ||
| # from .convection.GF_2020.cumulus_parameterization.air_density.translate_GF2020_CumulusParameterization_HydrostaticAirDensity import ( |
Summary of changes (in no particular order):
Note: UW and GF convection modules (NDSL variant) have not been updated to work with the new shared code; however, this is considered tolerable, as the UW code has been depreciated (Fortran version no longer used), and the 11.8.1 version of GF does not run in v11.11.0, and needs its own update.
GFDL1M module contains nine translate tests to help maintain validity: