Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
265 commits
Select commit Hold shift + click to select a range
591a828
Ported and verified GF function 'get_buoyancy'
Oct 20, 2025
f253294
lots of (untested) work on cumulus_parameterization setup
CharlesKrop Oct 20, 2025
bd4982b
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Oct 20, 2025
12f3bf6
Ported and verified ke_to_heating. Some updates to GF shared_constants.
Oct 21, 2025
4a88694
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Oct 21, 2025
e6cee76
Some updates to constants
Oct 22, 2025
a5521ac
Ported and verified GF "get_precip_fluxes"
Oct 22, 2025
666ec27
Ported and verified GF 'rates_up_pdf'
Oct 23, 2025
2cfd754
GF2020_CumulusParameterization_Setup shallow/mid/deep. deep and mid v…
CharlesKrop Oct 23, 2025
bee5959
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Oct 23, 2025
1583b78
organization
CharlesKrop Oct 23, 2025
4211199
organization
CharlesKrop Oct 23, 2025
7b1b89a
cup_dd_edt stencil and translate test. Test fails in both debug and d…
Oct 24, 2025
e95f2f3
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Oct 24, 2025
182d24e
'cup_env' and translate test
Oct 24, 2025
fd5e7c2
Some updates to 'cup_dd_edt'. Failures of < 7 ULP.
Oct 24, 2025
f6d8840
First attempt at porting RainEvapBelowCloudbase. Test fails in debug …
Oct 27, 2025
ca3d5ab
EnvironmentConditions & EnvironmentCloudLevels. each validated for fi…
CharlesKrop Oct 28, 2025
38f272e
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Oct 28, 2025
8a43781
Fixing some things after merge
CharlesKrop Oct 28, 2025
ee8a7c5
rudimentary error handling for environment classes
CharlesKrop Oct 28, 2025
4542e62
Ported and verified GF cloud_dissipation
Oct 29, 2025
1455b77
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Oct 29, 2025
28078e0
air density, highest moist static energy level, and a some minor fixe…
CharlesKrop Oct 30, 2025
7e096be
first bit of lcl work
CharlesKrop Oct 31, 2025
e212f27
changing imports to account for different Namelist location
CharlesKrop Oct 31, 2025
2527426
Porting in progress of GF 'cup_up_moisture'
Nov 4, 2025
9f676e4
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Nov 4, 2025
bb8f0e8
GetLCL, EntrainmentRates and CloudBase first attempt - untested
CharlesKrop Nov 4, 2025
a722257
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Nov 4, 2025
2949ac1
Ported and verified GF 'cup_up_aa0'
Nov 4, 2025
a8aed4f
GetLCL fixes
CharlesKrop Nov 5, 2025
11648af
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Nov 5, 2025
dcad060
Some fixed
Nov 5, 2025
c7f207d
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Nov 5, 2025
750ab4a
GetLCL fix - validates
CharlesKrop Nov 5, 2025
78914a8
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Nov 5, 2025
d44d86d
tested and verified ParcelMoistStaticEnergy and EntrainmentRates
CharlesKrop Nov 7, 2025
3c999bd
ConvectiveCloudBaseLevel (fails), DowndraftEntrainmentProfiles (passe…
CharlesKrop Nov 11, 2025
1284380
StableDetrainment (passes)
CharlesKrop Nov 11, 2025
df53e68
removing old files
CharlesKrop Nov 11, 2025
d1e8d59
Some minor updates to GF functions and first port of FirstGuessMoistS…
Nov 12, 2025
5e3b561
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Nov 12, 2025
5151752
DowndraftMoistStaticEnergyAndMoistureBudget and UpdraftInCloudUpdraft…
Nov 12, 2025
3de6c72
More GF updates
Nov 12, 2025
c689075
CloudTop (passes)
CharlesKrop Nov 13, 2025
809b308
more cloud top
CharlesKrop Nov 13, 2025
55e56e2
Ported more GF stencils.
Nov 13, 2025
d5c0a9f
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Nov 13, 2025
52809d6
Notes on cumulus_parameterization port
Nov 13, 2025
88328a5
More GF updates
Nov 17, 2025
bd59014
UpdateMassFluxProfile (fails)
CharlesKrop Nov 17, 2025
8c0511a
GF updates
Nov 17, 2025
ac177b3
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Nov 17, 2025
e736038
translate_setup_deep fixes
Nov 18, 2025
7a978ee
fixed errors preventing translate tests from running
CharlesKrop Nov 18, 2025
7c09eb2
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Nov 18, 2025
9e5429c
More GF stencils
Nov 18, 2025
fe82a2c
CalculateMassEntrainmentDetrainment (passes)
CharlesKrop Nov 18, 2025
f26685e
lots of minor fixes + notes tracking test passage + proper warnings o…
CharlesKrop Nov 19, 2025
14c0b8f
FirstGuessMoistStaticEnergy (does not verify) & GetBuoyancy (passes)
CharlesKrop Nov 20, 2025
b363e9b
removing old test
CharlesKrop Nov 20, 2025
6672cc2
renamed test GF2020_CumulusParameterization_GetBuoyancy to GF2020_Cum…
CharlesKrop Nov 20, 2025
49b2ceb
missed a rename
CharlesKrop Nov 20, 2025
6a58ebf
GF updates
Nov 20, 2025
a4f536c
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Nov 20, 2025
1d7531c
renamed three state variables
CharlesKrop Nov 20, 2025
415e299
Port and verification of GF MeltingProfile (passes)
Nov 21, 2025
683a9a6
Verified GetBuoyancy 2 and 3 (passing)
Nov 21, 2025
9690761
Verification of UpdraftInCloudAirTemperature
Nov 24, 2025
91ea444
Verified GF UpdraftInitialWorkfunctions
Nov 25, 2025
faef6b6
Verification of InCloudTemperature, TriggerFunctionConvection, and Up…
Nov 26, 2025
88e462c
Verification of GF DiurnalCycle. Passes for all 3 plumes.
Dec 4, 2025
f6b5dfb
Verification of DowndraftWindshear. Fails by only 7 ULP.
Dec 4, 2025
0f5fedf
GF2020_CumulusParameterization_FirstGuessMoistStaticEnergy fix - now …
CharlesKrop Dec 8, 2025
4a5db43
Added C1DProfile and translate test. does not currently execute, need…
CharlesKrop Dec 9, 2025
628722c
Refactored main CumulusParameterizaiton class to call stencils direct…
CharlesKrop Dec 12, 2025
a75c162
moved FIRST_GUESS_W conditional outside of updraft_air_temperature st…
CharlesKrop Dec 12, 2025
2ec74bd
changed constants MELT_GLAC and FIRST_GUESS_W to bool - bringing back…
CharlesKrop Dec 12, 2025
89b8f77
Better error checks on C1DProfile
CharlesKrop Dec 15, 2025
a43c9fd
new: updraft_moisture_profile, updraft_vertical_velocity. revised: me…
CharlesKrop Dec 17, 2025
56bc4bb
fixed updraft_moist_static_energy_and_momentum_budget: now passes all…
CharlesKrop Dec 19, 2025
4954afa
minor fix for UpdraftVerticalVelocity translate tests - forgot to adj…
CharlesKrop Dec 19, 2025
73cf6eb
Added constant NUMBER_OF_PLUMES and changed instances of the "plume" …
CharlesKrop Dec 20, 2025
dae0ac7
First attempt at implementing the downdraft_origin_level section - do…
CharlesKrop Dec 20, 2025
e314a7e
First attempt at UpdraftMassFlux - does not validate.
CharlesKrop Dec 23, 2025
0d209ff
DowndraftLateralMassFlux - runs but does not validate
CharlesKrop Dec 23, 2025
23e5a23
updating notes
CharlesKrop Dec 23, 2025
d6c051b
DowndraftMSEAndMoisture - passes all plumes
CharlesKrop Dec 24, 2025
35b5abb
Renaming buoyancy fields to d_buoyancy fields where appropriate
CharlesKrop Dec 24, 2025
129fa29
renamed downdraft_moist_static_energy_and_moisture function and assoc…
CharlesKrop Dec 24, 2025
3896dcf
Renamed come python fields to align with fortran fields & new impleme…
CharlesKrop Dec 24, 2025
e81471e
Minor updates to get_buoyancy and associated translate tests, no nume…
CharlesKrop Dec 24, 2025
c7d28ef
Refactored UpdraftInitialWorkfunctions - removed unnecessary temporar…
CharlesKrop Dec 26, 2025
be0fb6f
Minor changes to UpdraftCIN and associated translate tests to bring t…
CharlesKrop Dec 26, 2025
2fcca57
Reorganized and rewired the ConvectionTrigger (old TriggerFunctionCon…
CharlesKrop Dec 26, 2025
7405b5a
Fixing indentation error that wasn't caught in previous commit
CharlesKrop Dec 26, 2025
de582a7
gave "miscellaneous_temperature" a proper name "updraft_column_temper…
CharlesKrop Dec 26, 2025
50e4023
Reorganized and rewired "in_cloud_air_temperature" (now "downdraft_te…
CharlesKrop Dec 26, 2025
9b9f1c3
DiurnalCycle (validates) & DowndraftWindshear (does not run, dimensio…
CharlesKrop Jan 2, 2026
0e4a229
DowndraftWindshear (passes/off by handful of ULP)
CharlesKrop Jan 2, 2026
19fa9cc
EnvironmentMassFlux (verifies)
CharlesKrop Jan 2, 2026
7c29c03
MassConservation (skipped) and come other minor clean up
CharlesKrop Jan 3, 2026
a7b833c
First part of VerticalDiscretization (untested/incomplete)
CharlesKrop Jan 3, 2026
47e1495
Fixed UpdraftMassFlux. Passing now.
Jan 6, 2026
5c3ac0b
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Jan 6, 2026
a1bfd49
First bit of VerticalDiscretiztion (passes)
CharlesKrop Jan 6, 2026
a6e7191
EntrainmentRates is mostly fixed. Only fails by 2 ULP.
Jan 6, 2026
5e9fe38
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Jan 7, 2026
b3af4d2
Updates to PartitionLiqIce and UpdraftMassFlux
Jan 7, 2026
3b77ce6
VerticalDiscretization (passes)
CharlesKrop Jan 7, 2026
783dbb4
notes on VerticalDiscretization passage in CumulusParameterization
CharlesKrop Jan 7, 2026
b071db1
reworked the EntrainmentRates fix - made MIN_ENTRAINMENT_RATE a const…
CharlesKrop Jan 7, 2026
f2ba20e
Low hanging fruit in get_convective_cloud_base_level. A proper soluti…
CharlesKrop Jan 7, 2026
1cc309b
Forgot to update the call in CumulusParameterization for convective c…
CharlesKrop Jan 7, 2026
55b8135
Fixing a bunch of calls with variable names that have changed
CharlesKrop Jan 7, 2026
a663d0d
fixing bad test name in comment
CharlesKrop Jan 7, 2026
c0d797e
Fixed UpdraftVerticalVelocity.
Jan 8, 2026
a105093
debug work on UpdraftMoisture
CharlesKrop Jan 8, 2026
843aeb6
Merge branch 'GF_2020' of https://github.com/FlorianDeconinck/GEOSgcm…
CharlesKrop Jan 8, 2026
2376c3b
changing notes for UpdraftMoisture
CharlesKrop Jan 8, 2026
43e440c
Fix for UpdraftMoisture (passes)
CharlesKrop Jan 8, 2026
d8c80f1
fixing bad docs
CharlesKrop Jan 8, 2026
86273d6
Fix for DowndraftLateralMassflux (passes)
CharlesKrop Jan 8, 2026
f8008e6
Updating doc
CharlesKrop Jan 8, 2026
7d13458
Removing untested shallow plume code from updraft_mass_flux and preve…
CharlesKrop Jan 8, 2026
4f102ca
Docstring for updraft_mass_flux
CharlesKrop Jan 8, 2026
edc1e91
First attempt at DowndraftMassFlux (fails) + removing duplicate field…
CharlesKrop Jan 9, 2026
9900d28
Fix for DowndraftMassFlux (passes)
CharlesKrop Jan 9, 2026
f17a315
Updated documentation in CumulusParameterization and modified call st…
CharlesKrop Jan 9, 2026
56e0398
getting closer to fixing DowndraftOriginLevel
CharlesKrop Jan 9, 2026
c37c620
Fix for DowndraftMoisture (passes)
CharlesKrop Jan 12, 2026
0c1a7ea
Added smooth_tendencies (passes) and reworked some error handling
CharlesKrop Jan 12, 2026
893e80f
Some fixes to ConvectiveCloudBaseLevel. Still not passing.
Jan 13, 2026
76cdf5c
Fix for VerticalDiscretization, some fields were miswired in serialbo…
CharlesKrop Jan 13, 2026
d21acaf
new serialbox names
CharlesKrop Jan 13, 2026
2221d5c
Added ModifyEnvironmentProfiles (passes)
CharlesKrop Jan 13, 2026
00c1ca4
minor documentation updates
CharlesKrop Jan 13, 2026
951b790
removing extra/unnecessary locals
CharlesKrop Jan 13, 2026
23e4e49
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Jan 13, 2026
1d97161
Translate tests for EnvConditions3 and EnvCloudLevels3
Jan 13, 2026
7bd8aa9
Fix for ConvectiveCloudBaseLevel (passes)
CharlesKrop Jan 14, 2026
7addfe7
Testing in progress of MoistStaticEnergyInCloud
Jan 14, 2026
60ef235
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
Jan 14, 2026
3ca3aa8
MoistStaticEnergyInsideCloud (passes)
Jan 14, 2026
db30f2f
Translate test for KeToHeating. Passes.
Jan 14, 2026
be7afe1
PrecipitationFlux (passes)
Jan 14, 2026
970fc83
Bunch of little fixes/cleanup for StaticControl (old MoistStaticEnerg…
CharlesKrop Jan 15, 2026
b2e8f84
fixing bad interval
CharlesKrop Jan 15, 2026
54cb1d3
renaming two locals
CharlesKrop Jan 15, 2026
a0e0820
Fix for DowndraftOriginLevel (passes)
CharlesKrop Jan 15, 2026
f5b31c8
Rewired correct fields for EnvironmentConditions_3 and EnvironmentClo…
CharlesKrop Jan 15, 2026
cd1d46f
Tests for RainEvapBelowCloudbase and OutputEvaporationFlux. Both pass…
Jan 16, 2026
6cfe082
Test for OutputDeepPrecipitaiton. Passes.
Jan 16, 2026
9fa9010
Test for TracerOutput. Passes.
Jan 16, 2026
49c9b0c
Test for PrepareOutput. Passes.
Jan 16, 2026
ffab455
Added UpdraftWorkfunctions (passes)
CharlesKrop Jan 16, 2026
07440a4
Merge branch 'GF_2020' of github.com:FlorianDeconinck/GEOSgcm_GridCom…
CharlesKrop Jan 16, 2026
9d3ee22
Added UpdraftWorkfunction (passes) - actual commit, previous didn't w…
CharlesKrop Jan 16, 2026
f999b2e
modified/rewrote PrecipitationFluxe and RainEvaporationBelowCloudBase…
CharlesKrop Jan 18, 2026
3c19011
changed plume identifiers to use constants from constant file. did no…
CharlesKrop Jan 18, 2026
d76af03
renaming a field
CharlesKrop Jan 18, 2026
6b491ed
renaming serialbox fields in HydrostaticAirDensity
CharlesKrop Jan 18, 2026
0c01804
Added CloudDissipation (passes)
CharlesKrop Jan 18, 2026
13357ff
Fixed/rewired TotalEvaporationFlux and DeepPrecipitationOutput
CharlesKrop Jan 19, 2026
1b88d27
reorganization
CharlesKrop Jan 19, 2026
db8f40d
reorganized/rewired/fixed TracerOutput and PrepareOutput
CharlesKrop Jan 19, 2026
01a9f16
more minor changes for TracerOutput
CharlesKrop Jan 19, 2026
8259f36
Port and test for CloudBaseMassFlux. Passes.
Jan 20, 2026
6b121c3
first part of AtmosphericComposition test
CharlesKrop Jan 21, 2026
34222f5
Reorganized/rewired LargeScaleForcing (old CloudBaseMassFlux) - passes
CharlesKrop Jan 23, 2026
dd80b2c
Updating State and Locals initalization for all translate tests
CharlesKrop Jan 23, 2026
67831a2
Fixed up Setup, which had fallen behind with all the changes to state…
CharlesKrop Jan 23, 2026
4a7c45c
fixing bad file names and cleaning up serialbox variables
CharlesKrop Jan 24, 2026
9f0f513
documentation update for C1DProfile
CharlesKrop Jan 26, 2026
a3e0e16
Fixed UpdraftVerticalVelocity (passes)
CharlesKrop Jan 26, 2026
2ed3acc
Added errors to catch unimplemented paths
CharlesKrop Jan 26, 2026
a74573e
added gate sounding error
CharlesKrop Jan 26, 2026
533b980
move locals from call to init
CharlesKrop Jan 26, 2026
017647f
removing old (unused) translate tests
CharlesKrop Jan 26, 2026
e9e2c7f
formatting
CharlesKrop Jan 26, 2026
b9290c1
removing error_code2 and error_code3 , should not have been in state
CharlesKrop Jan 26, 2026
69c9a33
moving fields from State to Locals
CharlesKrop Jan 26, 2026
84f087d
Port and testing in progress for AtmosphericComposition
Jan 28, 2026
aa1a19c
Some updates to AtmosphericComposition. Break out of stencil to call …
Jan 29, 2026
2fd3ac0
Better error handling
CharlesKrop Jan 29, 2026
548d9d0
created a ConvectionTracers class at the pyMoist level
CharlesKrop Jan 29, 2026
0a9d8f8
changes to config and constants for AtmosphericComposition
CharlesKrop Jan 29, 2026
9abde07
full CumulusParameterization translate test (fails, but expected to f…
CharlesKrop Jan 29, 2026
61d198d
New field types for Convection Tracers
CharlesKrop Feb 2, 2026
183ce88
AtmosphericChemistry (passes) and updates to related files
CharlesKrop Feb 2, 2026
da4441a
better error handling
CharlesKrop Feb 2, 2026
fcae76e
better tracer field type names
CharlesKrop Feb 2, 2026
02bccbf
Renaming "tracers" data dim to "convection_tracers" to get around the…
CharlesKrop Feb 2, 2026
e8d1f0f
I am apparently incapable of spelling initialize correctly
CharlesKrop Feb 2, 2026
d1221d5
updated documentation for AtmosphericComposition
CharlesKrop Feb 2, 2026
b3ca3fc
Reordering plume in CumulusParameterization translate test
CharlesKrop Feb 3, 2026
da573a1
undoing a change that slipped into the previous commit
CharlesKrop Feb 3, 2026
6f3bff2
Renaming inputs in CloudTopLevel
CharlesKrop Feb 4, 2026
31042fb
renaming inputs
CharlesKrop Feb 4, 2026
b2419d8
fixing a DowndraftOriginLevel bug and removing dead code
CharlesKrop Feb 5, 2026
a7857ea
Fixing DowndraftOriginLevel bug
CharlesKrop Feb 5, 2026
feaf73d
fixing bug kstabm from locals to state, added plume dimension
CharlesKrop Feb 5, 2026
f144c92
fixing data accessing bug
CharlesKrop Feb 5, 2026
5a6b615
moving kstabm from locals to state
CharlesKrop Feb 5, 2026
9ef2601
minor bugfixes - bad names
CharlesKrop Feb 5, 2026
b768657
renaming serialbox fields
CharlesKrop Feb 5, 2026
5bd56e9
EnsembleOutputAndFeedback (passes)
CharlesKrop Feb 6, 2026
81a7b66
Fixing minor bug in AtmosphericComposition - was writing to interface…
CharlesKrop Feb 6, 2026
b5d655e
reverting previous change - level <= k_end was correct
CharlesKrop Feb 6, 2026
0ef9ac6
Fix for DowndraftMSEAndBuoyancy - was not indexing properly
CharlesKrop Feb 6, 2026
deac92c
Added OutputWorkfunctionsAndPrecipConcentrations and associated test
CharlesKrop Feb 10, 2026
a941770
Bunch of fixes to GF2020_CumulusParameterization. errors are accpetab…
CharlesKrop Feb 10, 2026
49fe825
move sounding.py up one level
CharlesKrop Feb 10, 2026
a9789b0
rename class
CharlesKrop Feb 11, 2026
b4b048f
move file up one level
CharlesKrop Feb 11, 2026
949b08c
better docs
CharlesKrop Feb 12, 2026
5b5d47f
removing debug stuff
CharlesKrop Feb 13, 2026
d925c04
add NDSLRuntime support
CharlesKrop Feb 13, 2026
a14ca5e
GF2020_Setup (passes, with nan-fortran fields not tested)
CharlesKrop Feb 14, 2026
4a723f3
added proper docstrings for GF2020_Setup and all dependent functions.…
CharlesKrop Feb 15, 2026
f15786e
remove todo notes (has been done)
CharlesKrop Feb 15, 2026
d45146d
changing imports
CharlesKrop Feb 16, 2026
4667429
renaming class
CharlesKrop Feb 16, 2026
206b3c7
added a couple locals and zeroed them properly in Setup
CharlesKrop Feb 16, 2026
9ef3609
updated call with new locals
CharlesKrop Feb 16, 2026
7dba3f9
changed serialbox names to account for serialbox bug
CharlesKrop Feb 16, 2026
5d24829
more new locals - with preset to zero
CharlesKrop Feb 16, 2026
ba0e2ea
new local fields, renamed state fields, updated setup with changes
CharlesKrop Feb 17, 2026
8ce5bb3
added a field to be tested in setup and changed some serialbox names
CharlesKrop Feb 18, 2026
798c5bf
new serialbox variable name
CharlesKrop Feb 19, 2026
d4bea2c
added _interface to a field in Setup to accurately reflect field shape
CharlesKrop Feb 19, 2026
9773747
updated field name
CharlesKrop Feb 19, 2026
be30ea8
move saturation_tables from call to input
CharlesKrop Feb 20, 2026
4596a3e
moving saturation tables from call to init
CharlesKrop Feb 20, 2026
fa6f128
GF2020_Finalize and associated translate test
CharlesKrop Feb 20, 2026
b15fa84
GF2020 translate test
CharlesKrop Feb 20, 2026
2048c5c
fix to get pbl_level to pass properly in the GF2020 test
CharlesKrop Feb 20, 2026
736d61c
docstrings every stencil and class
CharlesKrop Feb 24, 2026
51e38f5
first round of pre-commit. automatic fixes
CharlesKrop Feb 24, 2026
6975a85
fix to allow GF2020_Setup to pass
CharlesKrop Feb 24, 2026
3c83f78
precommit part 2 - manual changes. excess/duplicate imports, missing …
CharlesKrop Feb 24, 2026
e0b92e1
Merge branch 'dsl/develop' into GF_2020
CharlesKrop Feb 24, 2026
e7d3f35
deleting files that somehow werent deleted by the merge
CharlesKrop Feb 24, 2026
995c7a7
Merge remote-tracking branch 'GEOS-ESM/dsl/develop' into GF_2020
CharlesKrop Feb 24, 2026
803710a
more pre-commit changes after merge
CharlesKrop Feb 24, 2026
19617f6
remove unnecesssary comment
CharlesKrop Feb 25, 2026
17ae86e
Revert "deleting files that somehow werent deleted by the merge"
CharlesKrop Feb 25, 2026
3c18ecf
recreating a deleted file
CharlesKrop Feb 25, 2026
091c283
removing a dace file that got committed somehow and updating gitignor…
CharlesKrop Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ sandbox/
.venv/
site/
test_data/
_dacecache/
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
"""File containing all constants used for pyMoist"""
"""File containing constants used in multiple components of pyMoist"""

import numpy as np

from ndsl.dsl.typing import Float
from ndsl.dsl.typing import Float, Int


_f32 = np.float32
_f64 = np.float64
_i32 = np.int32

NUMBER_OF_TRACERS = Int(23)

# Define number of tracers in UW
# NOTE depreciate this, change all references of NCNST to NUMBER_OF_TRACERS
NCNST = _i32(23)

# MAPL_UNDEF is set to 1E15 in the Fortran
Expand Down Expand Up @@ -62,12 +65,14 @@
MAPL_RDRY = MAPL_RUNIV / MAPL_AIRMW # J/(kg K)
MAPL_CPDRY = Float(3.5) * MAPL_RDRY # J/(kg K)
MAPL_KAPPA = MAPL_RDRY / MAPL_CPDRY # (2.0/7.0)
MAPL_EPSILON = MAPL_H2OMW / MAPL_AIRMW # --
MAPL_CVDRY = MAPL_CPDRY - MAPL_RDRY # J/(kg K)
MAPL_RVAP = MAPL_RUNIV / MAPL_H2OMW # J/(kg K)
MAPL_CPVAP = Float(4) * MAPL_RVAP # J/(kg K)
MAPL_CVVAP = MAPL_CPVAP - MAPL_RVAP # J/(kg K)
MAPL_RGAS = MAPL_RDRY # MAPL_RDRY # J/(kg K) (DEPRECATED)
MAPL_CP = MAPL_RGAS / MAPL_KAPPA # J/(kg K) (DEPRECATED)
MAPL_VIREPS = Float(1.0) / MAPL_EPSILON - Float(1.0) # (DEPRECATED)
MAPL_P00 = Float(100000.0) # Pa

EPSILON = MAPL_H2OMW / MAPL_AIRMW # --
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
import pyMoist.convection.GF_2020.cumulus_parameterization.constants as cumulus_parameterization_constants
from ndsl import NDSLRuntime, QuantityFactory, StencilFactory
from pyMoist.convection.GF_2020.config import GF2020Config
from pyMoist.convection.GF_2020.cumulus_parameterization.config import GF2020CumulusParameterizationConfig
from pyMoist.convection.GF_2020.cumulus_parameterization.cumulus_parameterization import (
GF2020CumulusParameterization,
)
from pyMoist.convection.GF_2020.cumulus_parameterization.state import GF2020CumulusParameterizationState
from pyMoist.convection.GF_2020.finalize import GF2020Finalize
from pyMoist.convection.GF_2020.locals import GF2020Locals
from pyMoist.convection.GF_2020.setup import GF2020Setup
from pyMoist.convection.GF_2020.state import GF2020State
from pyMoist.convection_tracers import ConvectionTracers
from pyMoist.saturation_tables.tables.main import SaturationVaporPressureTable


class GF2020(NDSLRuntime):
"""Grell-Fritas convection parameterization scheme, 2020 version (GF2020).

This class has three subcomponents, and each are called at every execution:
Setup - initializes/resets fields, flips K-axis of state variables, and computes derived fields
CumulusParameterization - the core of the scheme, this class contains the all of the science code
related to deep convection. It requires a flipped (level 0 is surface) data structure,
necessitating the flip/unflip routines in Setup and Finalize, respectively.
Finalize - unflips outputs of core and updates the model state
"""

def __init__(
self,
stencil_factory: StencilFactory,
quantity_factory: QuantityFactory,
config: GF2020Config,
cumulus_parameterization_config: GF2020CumulusParameterizationConfig,
saturation_tables: SaturationVaporPressureTable | None,
):
"""Initialize the GF2020 convection parameterization scheme.

Initializes subclasses, builds stencils, and allocates dataclasses

Args:
stencil_factory (StencilFactory)
quantity_factory (QuantityFactory)
config (GF2020Config)
cumulus_parameterization_config (GF2020CumulusParameterizationConfig)
saturation_tables (SaturationVaporPressureTable | None)
"""
super().__init__(stencil_factory)

# make saturation tables visible at runtime
if saturation_tables is None:
saturation_tables = SaturationVaporPressureTable(stencil_factory.backend)
else:
self.saturation_tables = saturation_tables

# initialize GF2020 locals
self.locals = GF2020Locals.zeros(
quantity_factory,
data_dimensions={
"plumes": 3,
"convection_tracers": config.NUMBER_OF_TRACERS,
},
)

# initialize GF2020 CumulusParameterization state
self.cumulus_parameterization_state = GF2020CumulusParameterizationState.zeros(
quantity_factory,
data_dimensions={
"plumes": cumulus_parameterization_constants.NUMBER_OF_PLUMES,
"convection_tracers": config.NUMBER_OF_TRACERS,
},
)

# initialize submodules
self._setup = GF2020Setup(
stencil_factory=stencil_factory,
quantity_factory=quantity_factory,
config=config,
saturation_tables=saturation_tables,
)

self._cumulus_parameterization_core = GF2020CumulusParameterization(
stencil_factory=stencil_factory,
quantity_factory=quantity_factory,
config=config,
cumulus_parameterization_config=cumulus_parameterization_config,
saturation_tables=saturation_tables,
)

self._finalize = GF2020Finalize(
stencil_factory=stencil_factory,
quantity_factory=quantity_factory,
config=config,
cumulus_parameterization_config=cumulus_parameterization_config,
saturation_tables=saturation_tables,
)

def __call__(self, state: GF2020State, convection_tracers: ConvectionTracers):
"""Run the GF2020 convection parameterization scheme.

Args:
state (GF2020State): State of the overarching model - not all fields from the model are required
convection_tracers (ConvectionTracers): Collection of tracers from the rest of the model which
will be updated within convection. These may come from a variaty of sources, and need to be
collected into the expected ConvectionTracers data type before being passed down.
"""
# flag to stop convection scheme for single column models
# this can be set in setup if surface temperature is very near zero Kelvin
scm_stop = False

# call the there parts of the scheme
self._setup(
state=state,
locals=self.locals,
cumulus_parameterization_state=self.cumulus_parameterization_state,
convection_tracers=convection_tracers,
scm_stop=scm_stop,
)

if not scm_stop:
self._cumulus_parameterization_core(
state=self.cumulus_parameterization_state,
convection_tracers=convection_tracers,
)

self._finalize(
state=state,
locals=self.locals,
cumulus_parameterization_state=self.cumulus_parameterization_state,
convection_tracers=convection_tracers,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from dataclasses import dataclass

from ndsl.dsl.typing import Float, Int


@dataclass
class GF2020Config:
SINGLE_COLUMN_MODE: bool
DT_MOIST: Float
LHYDROSTATIC: bool
STOCHASTIC_CNV: bool
STOCH_TOP: Float
STOCH_BOT: Float
GF_MIN_AREA: Float
GF_ENV_SETTING: Int
ENTRVERSION: Int
CONVECTION_TRACER: Int
C1: Float
ADV_TRIGGER: Int
AUTOCONV: Int
USE_TRACER_TRANSPORT: Int
SCLM_DEEP: Float
FIX_CONVECTIVE_CLOUD: bool
APPLY_SUBSIDENCE_MICROPHYSICS: Int
NUMBER_OF_TRACERS: Int
USE_MOMENTUM_TRANSPORT: Int
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import pyMoist.constants as constants
from ndsl.dsl.gt4py import PARALLEL, computation, interval
from ndsl.dsl.typing import FloatField, Int
from pyMoist.convection.GF_2020.cumulus_parameterization.field_types import FloatField_Plume, IntFieldIJ_Plume


def hydrostatic_air_density(
p: FloatField_Plume,
geopotential_height: FloatField,
error_code: IntFieldIJ_Plume,
air_density: FloatField,
plume: Int,
):
"""Compute air density, assuming hydrostatic balance.

Args:
p (FloatField_Plume)
geopotential_height (FloatField)
error_code (IntFieldIJ_Plume)
air_density (FloatField)
plume (Int)
"""
with computation(PARALLEL), interval(...):
# prefil with 0
air_density = 0.0

with computation(PARALLEL), interval(0, -1):
if error_code[0, 0][plume] == 0:
air_density = (
100.0
* (p[0, 0, 0][plume] - p[0, 0, 1][plume])
/ (geopotential_height[0, 0, 1] - geopotential_height)
/ constants.MAPL_GRAV
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from ndsl.dsl.gt4py import PARALLEL, K, computation, interval
from ndsl.dsl.typing import FloatField, Int
from pyMoist.convection.GF_2020.cumulus_parameterization.field_types import IntFieldIJ_Plume


def get_buoyancy(
lcl_level: IntFieldIJ_Plume,
updraft_lfc_level: IntFieldIJ_Plume,
cloud_top_level: IntFieldIJ_Plume,
cloud_moist_static_energy: FloatField,
environment_moist_static_energy: FloatField,
environment_saturation_moist_static_energy: FloatField,
d_buoyancy: FloatField,
error_code: IntFieldIJ_Plume,
plume: Int,
):
"""Determine the "d_buoyancy" of a parcel, defined as the difference between the
moist static energy of the parcel and the environment

Args:
lcl_level (IntFieldIJ_Plume)
updraft_lfc_level (IntFieldIJ_Plume)
cloud_top_level (IntFieldIJ_Plume)
cloud_moist_static_energy (FloatField)
environment_moist_static_energy (FloatField)
environment_saturation_moist_static_energy (FloatField)
d_buoyancy (FloatField)
error_code (IntFieldIJ_Plume)
plume (Int)
"""

with computation(PARALLEL), interval(...):
d_buoyancy = 0

if error_code[0, 0][plume] == 0:
if K <= lcl_level[0, 0][plume]:
d_buoyancy = cloud_moist_static_energy - environment_moist_static_energy
if K > lcl_level[0, 0][plume] and K <= cloud_top_level[0, 0][plume] + 1:
d_buoyancy = cloud_moist_static_energy - environment_saturation_moist_static_energy
Loading
Loading