-
Notifications
You must be signed in to change notification settings - Fork 7
update land energy/water conservation functions #1232
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
base: main
Are you sure you want to change the base?
Conversation
2bf196d to
c3fcb2c
Compare
| function Interfacer.get_field(sim::ClimaLandSimulation, ::Val{:water}, level) | ||
| surface_field = similar(sim.integrator.p.soil.sfc_scratch) | ||
| return sum( | ||
| CL.total_liq_water_vol_per_area!( |
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.
likewise here
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.
and one other thought is that we will need to multiply by density here or somewhere else to get mass
caeebc2 to
134102c
Compare
kmdeck
left a comment
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 looks right to me! Since sum includes the entire globe (the land domain is the entire surface, not just land), this will include a bunch of ocean points. I think that's OK for checking conservation as long as the fluxes for those points is zero (no change over time, then), but Im not sure they are (maybe coupler needs to multiply them by the land area fraction?)
The fluxes from atmosphere to land aren't multiplied by land area fraction - this would give incorrect results if we ever have fractional land fraction (though we don't right now). Maybe instead we could zero out the result of and same for water |
134102c to
50cc236
Compare
Purpose
Update integrated land conservation functions to use the ClimaLand functions introduced in CliMA/ClimaLand.jl#1071. Note that these provide the energy and water per area, so we integrate horizontally via
sum. We also convert the volumetric water content to water content.Since we don't run slabplanet + conservation checks with the integrated land, these functions aren't being exercised, but they may be nice to have in the future.