@@ -361,16 +361,36 @@ Interfacer.get_field(sim::ClimaLandSimulation, ::Val{:area_fraction}) = sim.area
361361Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:beta} ) =
362362 CL. surface_evaporative_scaling (sim. model, sim. integrator. u, sim. integrator. p)
363363Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:emissivity} ) = sim. integrator. p. ϵ_sfc
364- Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:energy} ) =
365- CL. total_energy (sim. integrator. u, sim. integrator. p)
366364Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:surface_direct_albedo} ) =
367365 CL. surface_albedo (sim. model, sim. integrator. u, sim. integrator. p)
368366Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:surface_diffuse_albedo} ) =
369367 CL. surface_albedo (sim. model, sim. integrator. u, sim. integrator. p)
370- Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:water} ) =
371- CL. total_water (sim. integrator. u, sim. integrator. p)
372368Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:surface_temperature} ) =
373369 sim. integrator. p. T_sfc
370+ function Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:energy} , level)
371+ return sum (
372+ CL. total_energy_per_area! (
373+ sim. integrator. p. soil. sfc_scratch,
374+ sim. model,
375+ sim. integrator. u,
376+ sim. integrator. p,
377+ sim. integrator. t,
378+ ),
379+ )
380+ end
381+ function Interfacer. get_field (sim:: ClimaLandSimulation , :: Val{:water} , level)
382+ # Convert volumetric water content to mass water content
383+ ρ_liq = LP. ρ_cloud_liq (sim. model. soil. parameters. earth_param_set)
384+ return ρ_liq * sum (
385+ CL. total_liq_water_vol_per_area! (
386+ sim. integrator. p. soil. sfc_scratch,
387+ sim. model,
388+ sim. integrator. u,
389+ sim. integrator. p,
390+ sim. integrator. t,
391+ ),
392+ )
393+ end
374394
375395# Update fields stored in land drivers
376396function Interfacer. update_field! (sim:: ClimaLandSimulation , :: Val{:diffuse_fraction} , field)
0 commit comments