Skip to content

Conversation

juliasloan25
Copy link
Member

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

function Interfacer.get_field(sim::ClimaLandSimulation, ::Val{:energy}, level)
surface_field = similar(sim.integrator.p.soil.sfc_scratch)
return sum(
CL.total_energy_per_area!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to call total_energy_per_area! and then call sum(surface_field) and return that, since CL.total_energy_per_area! returns nothing

since the similar function allocates, is there another surface field we can use?

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!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise here

Copy link
Member

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

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