-
Notifications
You must be signed in to change notification settings - Fork 7
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
[NDSL] GFDL Single moment microphysics port to NDSL #1041
base: dsl/develop
Are you sure you want to change the base?
Conversation
Written but unverified: warm_rain, i_cloud, iqs1, iqs2, wqs1 Written, verified, but incorrect: all tables. Errors are small (< 100 ULP) for tables. des tables (which are just the gradients of the tables themselves) have larger errors, but none of these errors cause significant problems in later calculations, so I am putting them aside for now.
…if, before major else). warm rain does not verify. only fails because of implicit rain "function" call. this "function" runs perfectly within the terminal_fall port (called three times with different data of similar order of magnitude), but fails within warm_rain
…ic, DQVDTmic, DQLDTmic, DQIDTmic, PRCP_ICE, PFI_LS DQIDTmic and DUDTmic errors are small in magnitude not tremendous concern. Others are a problem
…heck_flags error handling capabilities. Driver passes when testing only the first loop (with the exception of DQADTmic), errors grow with each subsequent loop, compounding to some pretty serious errors after the final iteration. Cause unknown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First look. More docstrings on all functions and rename of the generic "loop" functions + inline coments
.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see these files in my vs code to remove them
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Show resolved
Hide resolved
self.melting_mask_2 = quantity_factory.zeros( | ||
[X_DIM, Y_DIM, Z_DIM], "n/a", dtype=bool | ||
) | ||
self.current_k_level = quantity_factory.zeros( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THIS_K
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more complicated than that. this is the double k loop we talked about briefly. its not executed in the test case, but I fear we will run into a case where this is turned on pretty quickly, so I'm leaving the code there. it works when I force it to execute, but I obviously can't validate it.
THIS_K
sort of solves the problem, but not entirely. Katrina and I spent a while brainstorming this and this was the best (albeit still not good) solution we could come up with that actually runs. if/when we need to tackle this, we can talk and figure out something better
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Show resolved
Hide resolved
...physics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/GFDL_1M_driver.py
Show resolved
Hide resolved
...omp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/icloud.py
Outdated
Show resolved
Hide resolved
...Sphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/terminal_fall.py
Show resolved
Hide resolved
...Sphysics_GridComp/GEOSmoist_GridComp/pyMoist/pyMoist/GFDL_1M/GFDL_1M_driver/terminal_fall.py
Show resolved
Hide resolved
@@ -47,6 +47,7 @@ def QSat_Float_Liquid( | |||
PL: Float = -999.0, | |||
DQ_trigger: bool = False, | |||
): | |||
DQ = 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a qsat
fix? If so it needs to be PR'ed separately since it's shared code
export PACE_TEST_N_THRESHOLD_SAMPLES=0 | ||
export PACE_DACE_DEBUG=True | ||
export GT4PY_COMPILE_OPT_LEVEL=0 | ||
python -m pytest -s \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert from line 11 downwards
…er port Fix all string `cffi.FFI.CDATA` with __annotations__ since py 3.11
…ridComp into dsl/GFDL_1M_driver
…o a class (namelist_constants) moved length constant to driver_constants
Summary
GFDL single moment microphysics port to NDSL of the driver, corresponding to
gfdl_cloud_microphys_driver
in the source Fortran.dace:cpu
backendPartial Validation
GFDL_1M_driver created. Primary components:
fall_speed
,terminal_fall
,warm_rain
,icloud
. All components are considered correct on their own, with minor errors (order 10^-9/10^-10 or <100 ULP in most cases) inwarm_rain
andicloud
.Putting these components together results in divergence in nearly all variables. Most are minor, but a few (e.g
PRCP_RAIN
) are significant. These errors are most likely the accumulation of the small errors from the aforementioned driver components as the driver runs its iterations (in the test case, these functions were called 12 times).Configuration ported
During construction numerous unexecuted code paths were discovered, controlled by boolean keywords. This keyword control pattern has been replicated, but unexecuted code was not carried over. Instead, if one of these paths would be triggered, the keywords will prevent execution.