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

add boundary fluxes function for snow #701

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Conversation

kmdeck
Copy link
Member

@kmdeck kmdeck commented Jul 17, 2024

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

  1. update all auxiliary vars in the cache for all components
  2. update all the boundary conditions for all the components [ taking into account interactions]
  3. compute tendencies for all the components (only use precomputed quantities and Y)

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

  • relevant unit tests, and integration tests,
  • appropriate docstrings on all functions, structs, and modules, and included relevant documentation.

  • I have read and checked the items on the review checklist.

@kmdeck kmdeck requested a review from szy21 July 17, 2024 20:32
@kmdeck kmdeck self-assigned this Jul 17, 2024
@kmdeck kmdeck force-pushed the kd/snow_boundary_fluxes branch from d6e648a to 403be91 Compare July 17, 2024 22:32
@kmdeck kmdeck enabled auto-merge July 17, 2024 22:32
@kmdeck kmdeck merged commit 173c9ff into main Jul 17, 2024
10 checks passed
@kmdeck kmdeck deleted the kd/snow_boundary_fluxes branch October 10, 2024 21: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.

2 participants