[DSL] fixes for GFDL_1M microphysics#1394
Draft
romanc wants to merge 11 commits intoGEOS-ESM:developfrom
Draft
Conversation
romanc
commented
May 6, 2026
| from __externals__ import CCW_EVAP_EFF, DT_MOIST | ||
|
|
||
| with computation(PARALLEL), interval(...): | ||
| evaporation = mixing_ratio_vapor |
Contributor
Author
There was a problem hiding this comment.
evaporation is written unconditionally below again (and not read in between) - so this line is unnecessary
| qc_i = mixing_ratio_large_scale_ice * inv_clcn | ||
| t_n = t | ||
| qs_x, _ = saturation_specific_humidity(t=t, p=p_mb * 100, ese=ese, esx=esx) | ||
| qs_x, _ = saturation_specific_humidity(t=t, p=p_mb * 100.0, ese=ese, esx=esx) |
Contributor
Author
There was a problem hiding this comment.
those are the pressure fields that are floats and thus need to be multiplied with a float
| convective_ice=state.mixing_ratio.convective_ice, | ||
| mixing_ratio_vapor=state.mixing_ratio.vapor, | ||
| mixing_ratio_convective_liquid=state.mixing_ratio.convective_liquid, | ||
| mixing_ratio_convective_ice=state.mixing_ratio.convective_ice, |
Contributor
Author
There was a problem hiding this comment.
those were the things needed to just run (in stencil mode)
| surface_type=state.surface_type, | ||
| t=state.t, | ||
| liquid=state.mixing_ratio.large_scale_liquid, | ||
| ice=state.mixing_ratio.large_scale_ice, |
Contributor
Author
There was a problem hiding this comment.
somehow this stencil was running twice ...
39c4524 to
700bfec
Compare
0c2b4d3 to
048465d
Compare
- change workflow to run on pull requests - change paths to include changes to the workflow - change python version to 3.12 (as on the HPC) - fix `mkdocs build` - fix data url - make wget less verbose - fix `pytest` invocation - add NDSL to dependencies - non-verbose `tar` extract - pick a (random) experiment (why is this needed?!) - fix `test_constants` by adding more excludes - fix running translate test by temporarily exluding netCDFs that don't match a translate test anymore.
048465d to
4f2d98b
Compare
This commit changes `saturation_specific_humidy()` such that the case of `use_ramp=True` is rejected as not implemented. So far, we don't have a use-case for this case. Doing so allows us to avoid a floating point comparison with plain `==`, which is dagerous.
romanc
commented
May 8, 2026
| uramp = -abs(ramp) | ||
| else: | ||
| uramp = TMIX | ||
| raise NotImplementedError("The option `use_ramp=True` is not implemented.") |
Contributor
Author
There was a problem hiding this comment.
As discussed, this serves as a stop-gap measure to avoid the float equality check below. We can revisit once we have a need for the ramp / use_ramp arguments.
Since we are depending on a couple of recent changes in NDSL and since we not planning to release any time soon, let's just use `ndsl @ develop` for now.
We can't `raise NotImplementedError` from within a `gtscript.function`. Since we never use the `ramp` option, let's remove it all together. This also removes the need to supply the `ese` table, which trickles in a lot of places ...
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.
Description
Work in progress to stabilize GFDL_1M microphysics. With this state, I get
with the data downloaded from here.
Labelled as
0-diffbecause this only touches the DSL part - no changes to the Fortran.