-
Notifications
You must be signed in to change notification settings - Fork 10
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
Compute SHF using SF, do not re-compute offline #802
Conversation
b46c000
to
bc6414a
Compare
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.
Let's regenerate the Manifests before merging.
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.
Two small issues
(1) Variable naming in canopy_boundary_fluxes.jl
(2) Neutral stability tolerance kwarg
in energy_hydrology.jl
Thanks @kmdeck ! Another note: |
We have some cleanup to do in our buildkite runs which will be tackled in another PR. I will add this to the list! Thank you! |
@@ -304,6 +304,11 @@ Computes turbulent surface fluxes at a point on a surface given | |||
|
|||
This returns an energy flux and a liquid water volume flux, stored in | |||
a tuple with self explanatory keys. | |||
|
|||
Please note that this function, if r_sfc is set to zero, makes no alteration |
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.
Maybe we could explain what it does if r_sfc !=0
too
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 am trying to work too quickly today and being a little sloppy - merged before I saw this. I'll fix this in my next PR.
Purpose
Since evaporation is no longer included in the SH computation in SF.jl, we now use the output of
sensible_heat_flux
provided directly by SF.jl's call tosurface_conditions
. This will make fluxes calculated in atmos and in land more similar, which is a good to prepare for coupled runs.Our fluxes differ from those calculated in SurfaceFluxes still in these ways:
r_sfc
, an additional resistance term, in the evaporation calculation.To-do
Content
Note that this change required an increase in the threshold for passing in one of our tests (for the canopy temperature jacobian contribution from SHF). Previously, we used only cp_m of the atmos in the SH flux, which is indep of T_canopy. now, the coefficient in the Jacobian depends on cp_m_sfc. This does depend on T_canopy, because it depends on q_canopy, which we approximate as q_sat(T_canopy). We hypothesize that this is why the error in the SH approximation grew with this PR. @trontrytel
Previous: SHF = -rho_sfc cp_m_atmos (T_atmos - T_canopy)/resistances
Now: SHF = -rho_sfc/resistances * [stuff indep of T_canopy ..... - cp_m_sfc(T_canopy)*T_canopy ....]
Since we already have an issue open to improve the jacobian approximation, we are accepting this for now. @juliasloan25
For good measure, though, I added the derivative of rho_sfc with respect to T_sfc
Comparisons
This PR followed by implicit canopy PR long run:






Long Runs at 1/2 year:
Canopy Temp:
ET:
SWC:
Canopy Alone Convergence:




this PR vs current main
Errors:
SoilCanopy Convergence:




this PR vs current main
Errors: