From 2046e89ef360e70163c209cf91ad6454f44a084f Mon Sep 17 00:00:00 2001 From: Alexis Renchon Date: Mon, 5 Aug 2024 14:51:50 -0700 Subject: [PATCH] WIP --- docs/src/diagnostics/make_diagnostic_table.jl | 8 +++++++- src/diagnostics/define_diagnostics.jl | 6 +++--- src/diagnostics/land_compute_methods.jl | 9 +++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/src/diagnostics/make_diagnostic_table.jl b/docs/src/diagnostics/make_diagnostic_table.jl index 2fd993fd8f..4839efd307 100644 --- a/docs/src/diagnostics/make_diagnostic_table.jl +++ b/docs/src/diagnostics/make_diagnostic_table.jl @@ -17,7 +17,13 @@ for d in values(CL.Diagnostics.ALL_DIAGNOSTICS) push!(standard_names, d.standard_name) end i = sortperm(short_names) # indices of short_names sorted alphabetically -data = hcat(short_names[i], long_names[i], units[i], comments[i], standard_names[i]) +data = hcat( + short_names[i], + long_names[i], + units[i], + comments[i], + standard_names[i], +) pretty_table( data; autowrap = true, diff --git a/src/diagnostics/define_diagnostics.jl b/src/diagnostics/define_diagnostics.jl index 3ed936f258..6264f77468 100644 --- a/src/diagnostics/define_diagnostics.jl +++ b/src/diagnostics/define_diagnostics.jl @@ -199,7 +199,7 @@ function define_diagnostics!(land_model) short_name = "infil", long_name = "Infiltration", standard_name = "infiltration", - units = "m s^-1", + units = "m s^-1", comments = "The flux of liquid water into the soil.", compute! = (out, Y, p, t) -> compute_infiltration!(out, Y, p, t, land_model), @@ -221,7 +221,7 @@ function define_diagnostics!(land_model) short_name = "scms", long_name = "Soil CO2 Microbial Source", standard_name = "soil_co2_microbial_source", - units = "kg CO2 m^-2 s^-1", + units = "kg CO2 m^-2 s^-1", comments = "The production of CO2 by microbes in the soil. Vary by layers of soil depth.", compute! = (out, Y, p, t) -> compute_soilco2_source_microbe!(out, Y, p, t, land_model), @@ -254,7 +254,7 @@ function define_diagnostics!(land_model) short_name = "trans", long_name = "Canopy Transpiration", standard_name = "canopy_transpiration", - units = "m s^-1", + units = "m s^-1", comments = "The water evaporated from the canopy due to leaf transpiration.", compute! = (out, Y, p, t) -> compute_canopy_transpiration!(out, Y, p, t, land_model), diff --git a/src/diagnostics/land_compute_methods.jl b/src/diagnostics/land_compute_methods.jl index 1501925d26..c7cca5e112 100644 --- a/src/diagnostics/land_compute_methods.jl +++ b/src/diagnostics/land_compute_methods.jl @@ -38,7 +38,7 @@ end ### BucketModel ### -# variables stored in p +# variables stored in p (diagnostics variables stored in the cache) @land_compute "aerodynamic_resistance" BucketModel p.bucket.turbulent_fluxes.r_ae @land_compute "albedo" BucketModel p.bucket.α_sfc @land_compute "latent_heat_flux" BucketModel p.bucket.turbulent_fluxes.lhf @@ -49,7 +49,7 @@ end @land_compute "surface_temperature" BucketModel p.bucket.T_sfc @land_compute "vapor_flux" BucketModel p.bucket.turbulent_fluxes.vapor_flux -# variables stored in Y +# variables stored in Y (prognostic or state variables) @land_compute "snow_water_equivalent" BucketModel Y.bucket.σS @land_compute "soil_temperature" BucketModel Y.bucket.T @land_compute "subsurface_water_storage" BucketModel Y.bucket.W @@ -57,7 +57,7 @@ end ### SoilCanopyModel ### -# variables stored in p +# variables stored in p (diagnostics variables stored in the cache) ## Canopy Module ## @@ -139,7 +139,8 @@ end @land_compute "soilco2_diffusivity" SoilCanopyModel p.soilco2.D @land_compute "soilco2_source_microbe" SoilCanopyModel p.soilco2.Sm -# variables stored in Y +# variables stored in Y (prognostic or state variables) + @land_compute "canopy_temperature" SoilCanopyModel Y.canopy.energy.T @land_compute "soil_ice" SoilCanopyModel top_center_to_surface(Y.soil.θ_i) @land_compute "soilco2" SoilCanopyModel Y.soilco2.C