From 0a073b216a4fcb0f2db78c2481bb800c778bb4db Mon Sep 17 00:00:00 2001 From: AlexisRenchon Date: Tue, 20 Aug 2024 14:49:06 -0700 Subject: [PATCH] WIP --- src/diagnostics/land_compute_methods.jl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/diagnostics/land_compute_methods.jl b/src/diagnostics/land_compute_methods.jl index 951284c063..cf398f5ce8 100644 --- a/src/diagnostics/land_compute_methods.jl +++ b/src/diagnostics/land_compute_methods.jl @@ -139,7 +139,20 @@ end @diagnostic_compute "vapor_flux" SoilCanopyModel p.soil.turbulent_fluxes.vapor_flux # Soil - SoilCO2 -@diagnostic_compute "heterotrophic_respiration" SoilCanopyModel (p.soilco2.top_bc*83.26) # convert from kg C to mol CO2 +function compute_heterotrophic_respiration!( + out, + Y, + p, + t, + land_model::SoilCanopyModel{FT}, +) where {FT} + if isnothing(out) + return p.soilco2.top_bc .* FT(83.26) + else + out .= p.soilco2.top_bc .* FT(83.26) + end +end # Convert from kg C to mol CO2 + @diagnostic_compute "soilco2_diffusivity" SoilCanopyModel p.soilco2.D @diagnostic_compute "soilco2_source_microbe" SoilCanopyModel p.soilco2.Sm