Skip to content
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

Moist redo #1347

Merged
merged 3 commits into from
Dec 15, 2023
Merged

Moist redo #1347

merged 3 commits into from
Dec 15, 2023

Conversation

AMLattanzi
Copy link
Collaborator

@AMLattanzi AMLattanzi commented Dec 14, 2023

This PR is a part of the greater effort to overhaul the moisture classes and how they interact with ERF. The new paradigm is summarized as follows

  1. Microphysics will own a vector (nlev) that contains pointers to the micro class being used, which is the same at each level.
  2. The micro class now creates and owns its own data. If ERF wants qmoist variables, it must query the micro class for a pointer and then use that pointer. The query should only be done when init is called.
  3. The micro class data (Mic_Fab_Vars) persists along all levels but is now updated after each FillPatch and FillPatchIntermediate call (may be excessive).
  4. The micro classes are restructured to have the following operations (Init, Define, Qmoist_Ptr, Copy_State_to_Micro, Copy_Micro_to_State, Update_Micro_Vars, Update_State_Vars). We may then start up with one call to Init, Define and get the pointers with Qmoist_ptr. If the state data changes, the Update_Micro_Vars can be called, which is a wrapper to internal functions that do necessary operations on the new data (after it's copied into the micro_fab_vars).

TODO:

  1. General clean up, a lot of legacy code from the old `Init' function was left commented out. This was done since that function was cut into separate operations for clarity. Once verified, this code should be deleted.
  2. Iterations to split qt -> qv/qc are NOT implemented. New function and scheme is need.
  3. Whenever we re-grid we need to make sure we call micro.Init() and then get the new micro.Qmoist_Ptr().
  4. Assess FillPatchMoistVars, only the qv component was passed to this routine...

@AMLattanzi AMLattanzi merged commit d100543 into erf-model:development Dec 15, 2023
10 checks passed
@AMLattanzi AMLattanzi deleted the MoistRedo branch December 15, 2023 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant