Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Jul 2, 2024
1 parent 2ef45e2 commit bb4ac73
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 36 deletions.
78 changes: 45 additions & 33 deletions src/diagnostics/default_diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,42 +75,54 @@ function default_diagnostics(
land_model::SoilCanopyModel,
t_start;
output_writer,
output_vars = "long",
)

define_diagnostics!(land_model)

soilcanopy_diagnostics = [
"rn",
"lhf",
"rae",
"shf",
"vflux",
"tsoil",
"slw",
"infil",
"scd",
"scms",
"gs",
"mt",
"trans",
"rain", # do we want?
"an",
"gpp",
"rd",
"vcmax25",
"par",
"apar",
"rpar",
"tpar",
"nir",
"anir",
"rnir",
"tnir",
"swn",
"lwn",
"ra",
"soilco2",
]

if output_vars == "short"
soilcanopy_diagnostics = [
"rn",
"lhf",
"rae",
"shf",
"vflux",
"tsoil",
"slw",
"infil",
"scd",
"scms",
"gs",
"mt",
"trans",
"rain", # do we want?
"an",
"gpp",
"rd",
"vcmax25",
"par",
"apar",
"rpar",
"tpar",
"nir",
"anir",
"rnir",
"tnir",
"swn",
"lwn",
"ra",
"soilco2",
]
elseif output_vars == "short"
soilcanopy_diagnostics = [
#"lhf",
#"shf",
"gpp",
#"tsoil",
#"rn",
#"trans",
]
end

default_outputs =
hourly_averages(soilcanopy_diagnostics...; output_writer, t_start)
Expand Down
6 changes: 3 additions & 3 deletions src/diagnostics/soilcanopy_compute_methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ function compute_canopy_latent_heat_flux(
if isnothing(out)
return copy(p.canopy.energy.lhf)
else
p.canopy.canopy.lhf
p.canopy.energy.lhf
end
end

Expand All @@ -544,7 +544,7 @@ function compute_canopy_sensible_heat_flux(
if isnothing(out)
return copy(p.canopy.energy.shf)
else
p.canopy.canopy.shf
p.canopy.energy.shf
end
end

Expand All @@ -558,7 +558,7 @@ function compute_canopy_aerodynamic_resistance(
if isnothing(out)
return copy(p.canopy.energy.r_ae)
else
p.canopy.canopy.r_ae
p.canopy.energy.r_ae
end
end

Expand Down

0 comments on commit bb4ac73

Please sign in to comment.