Skip to content

Commit

Permalink
remove allcoation
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Dec 17, 2024
1 parent 59638ec commit f215bea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions experiments/integrated/fluxnet/run_fluxnet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ include(joinpath(climaland_dir, "experiments/integrated/fluxnet/data_tools.jl"))
include(joinpath(climaland_dir, "experiments/integrated/fluxnet/plot_utils.jl"))

# Read in the site to be run from the command line
#if length(ARGS) < 1
# error("Must provide site ID on command line")
#end
if length(ARGS) < 1
error("Must provide site ID on command line")
end

site_ID = "US-MOz"#ARGS[1]
site_ID = "US-MOz"

# Read all site-specific domain parameters from the simulation file for the site
include(
Expand Down
4 changes: 2 additions & 2 deletions src/integrated/soil_canopy_root_interactions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function update_root_extraction!(p, Y, t, land)
z = land.soil.domain.fields.z
(; conductivity_model) = land.canopy.hydraulics.parameters
area_index = p.canopy.hydraulics.area_index
# allocates
above_ground_area_index =
above_ground_area_index = p.scratch1
above_ground_area_index .=
PlantHydraulics.harmonic_mean.(
getproperty(
area_index,
Expand Down
5 changes: 4 additions & 1 deletion src/standalone/Soil/Runoff/Runoff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ Computes the soil infiltration capacity on the surface space
Currently approximates i_c = -K_sat*((0-ψ)/Δz_top + 1) at the surface.
"""
function soil_infiltration_capacity(model::RichardsModel, Y, p)
@. p.soil.subsfc_scratch = -1 * model.parameters.K_sat * (1 - p.soil.ψ / (model.domain.fields.Δz / 2))
@. p.soil.subsfc_scratch =
-1 *
model.parameters.K_sat *
(1 - p.soil.ψ / (model.domain.fields.Δz / 2))
return ClimaLand.Domains.top_center_to_surface(p.soil.subsfc_scratch)
end

Expand Down

0 comments on commit f215bea

Please sign in to comment.