GF-2020 Convection Parameterization#15
Merged
FlorianDeconinck merged 72 commits intoApr 27, 2026
Merged
Conversation
…line with fortran behavior
…ME --> DT_MOIST change
…s (using dace instead of debug backend) and updated a few comments to reflected changes to translate test names
We've been tracking (in git) an empty vscode config and a temp graph from dace. This commit removes both files and - moves the `.vscode/` ignore "up" to the grid comp - adds `_dacegraphs/` to the ignore paths because it will only ever contain invalid/failed dace graphs for debugging.
* GF2020: fix typos * fix typo in README
Fix access of `updraft_lfc_level` inside `ensemble_forcing_mid_plume`.
… of the field to the stencil instead
…nto dsl/feature/UW_all_levels
…to avoid `icpx` failure
* unrelated: fall back to default number of tracers * unrelated: namelist is unused in `TestCore` * unrelated: fixing typos in GF_2020 * unrelated: fixing typos (2) in GF2020 * unrelated: start_level and lcl_level are both 2d * unrelated: unused variables * unrelated: cleanup dzh temporary The temprory `dzh` is only used in that scope and can be (manually) scalarized. No need to have an IJ-Field. * fix: manually inline `cap_max_internal` in the right computation `cap_max_internal` might be read before written (in case `MOIST_TRIGGER` is not `1`). DaCe wronly scalarizes the variable into both (previous) computation blocks. That leads to a potential read of undefined memory in the later computation block. Manually scoping `cap_max_internal` to the later block ensures that an initial value is written before the variable is read the first time. This is only a temp fix. I'll go debug the DaCe scalarization ... * GF2020: fix for DowndraftWindShear * GF2020: fix for DowndraftWindShear * cleanup: don't pass unused arguments --------- Co-authored-by: Charles Kropiewnicki <charles.j.krop@gmail.com>
* fix/cleanup GF translate tests This PR fixes and cleans up translate tests of GF2020. The things you will find in this PR are: 1. Fix cumulus parametrization (args of `StaticControl`) 2. Clean up tests by not passing `namelist` down to `TestCore` if it isn't used there. 3. Fix some translate tests (e.g. GF2020) that were initializing `TranslateFortranData2Py` with `namelist`. `namelist` has never been an argument of that base class. 4. Cleaning up tests by not overloading `self.stencil_factory` in the subclass (the baseclass already assigns, given the right arguments are passed to the base class (see 3)). * fix / cleanup GFDL_1M translate tests This commit changes the translate tests of the GFDL_1M microphysics code. In particular, this PR 1. fixes tests that were initiliazing `TranslateFortranData2Py` with a namelist argument (there is no such argument). 2. cleans up translate tests that were shadowing `self.stencil_factory` in the subclasse (already done in the base class).
… agree with the fortran (consistently about 0.5 degrees C too cold after the first day or so)
…020 and GF2020_Setup tests (after they were removed form the savepoint). changed the data source for the GF2020_Finalize savepoint for those two fields
…ncils, with the execution hidden behind an existance check
unlike microphysics, gf convection takes a level (pbl_level) from the model state. this level must be adjusted by one to python indexing before the python runs, then back to fortran indexing before it is passed back to the rest of the state
…' into dsl/feature/UW_all_levels
…s doing if (X and Y): breaks when x or why is a boolean. Error: "ValueError: Arithmetic expression is not allowed in boolean operation."
… as these fields are integers (albiet always 0 or 1) and not booleans
…' into fdeconinck/feat/pyMoist_infra
FlorianDeconinck
requested changes
Apr 24, 2026
Owner
FlorianDeconinck
left a comment
There was a problem hiding this comment.
We have to figure out the E501, then a few clean up
…e between numpy , cupy and python. Type ignored.
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.
This PR contains the NDSL port of the Grell-Freitas convection parameterization parameterization. Translate tests show numerical equivalence between Fortran and NDSL at individual time steps for SCM experiments bomex and armtwp-ice, as well as a test case GCM run with C24L72 resolution. This code has been tested using data from GEOS v11.5.2 and v11.8.1, with the current implementation aligning with then v11.8.1 Fortran code. This data is available on the data share at
/css/astg/smt/geos-fp/v11.8.1, with further sorting based on cpu architecture and compiler.Important note: some code paths remain unimplemented - only those needed to run the aforementioned suite of test cases were ported. All non-implemented code paths are protected with initialization and runtime error that prevent computation, as are the configuration options which lead to calling unimplemented code.