add boundary fluxes function for snow #701
Merged
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.
Purpose
This PR simply adds a function which computes boundary fluxes in the same way we already compute them, but within a standalone function specifically for that purpose.
We construct our tendencies in the following fashion:
(1) update "auxiliary vars" of model, stored in cache
p
(2) update boundary fluxes (also in
p
, but use the values updated in (1))(3) compute tendency using updated cache values, boundary conditions and
Y
For standalone models (snow by itself, soil by itself, etc), there is no reason to split (1) and (2). However, when we combine these models, the presence of interactions between the components affect the boundary fluxes each experiences. Because of that, we split the tendency of the land model as
in preparation for the snow model being integrated with soil/canopy, create the boundary_flux function and update the boundary conditions there, rather than in aux or in the tendency itself.
To-do
Review
Content
move certain quantities (Rn, turbulent fluxes) computed in update_aux! and in the tendency for snow into boundary_fluxes!
Review checklist
I have:
In the Content, I have included