Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Espeer5 committed Jun 2, 2024
1 parent 2c6f8c7 commit b77108a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 44 deletions.
7 changes: 2 additions & 5 deletions experiments/integrated/fluxnet/ozark_pft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,8 @@ plant_hydraulics_ps = PlantHydraulics.PlantHydraulicsParameters(;
conductivity_model = conductivity_model,
retention_model = retention_model,
)
plant_hydraulics_args = (
parameters = plant_hydraulics_ps,
h_stem = h_stem,
h_leaf = h_leaf,
)
plant_hydraulics_args =
(parameters = plant_hydraulics_ps, h_stem = h_stem, h_leaf = h_leaf)

energy_args = (parameters = Canopy.BigLeafEnergyParameters{FT}(ac_canopy),)

Expand Down
7 changes: 2 additions & 5 deletions experiments/integrated/fluxnet/run_fluxnet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,8 @@ plant_hydraulics_ps = PlantHydraulics.PlantHydraulicsParameters(;
conductivity_model = conductivity_model,
retention_model = retention_model,
)
plant_hydraulics_args = (
parameters = plant_hydraulics_ps,
h_stem = h_stem,
h_leaf = h_leaf,
)
plant_hydraulics_args =
(parameters = plant_hydraulics_ps, h_stem = h_stem, h_leaf = h_leaf)

energy_args = (parameters = Canopy.BigLeafEnergyParameters{FT}(ac_canopy),)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,8 @@ plant_hydraulics_ps = PlantHydraulics.PlantHydraulicsParameters(;
conductivity_model = conductivity_model,
retention_model = retention_model,
)
plant_hydraulics_args = (
parameters = plant_hydraulics_ps,
h_stem = h_stem,
h_leaf = h_leaf,
)
plant_hydraulics_args =
(parameters = plant_hydraulics_ps, h_stem = h_stem, h_leaf = h_leaf)

# Canopy component args
canopy_component_args = (;
Expand Down
7 changes: 2 additions & 5 deletions experiments/integrated/performance/profile_allocations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,8 @@ plant_hydraulics_ps = PlantHydraulics.PlantHydraulicsParameters(;
conductivity_model = conductivity_model,
retention_model = retention_model,
)
plant_hydraulics_args = (
parameters = plant_hydraulics_ps,
h_stem = h_stem,
h_leaf = h_leaf,
)
plant_hydraulics_args =
(parameters = plant_hydraulics_ps, h_stem = h_stem, h_leaf = h_leaf)

# Canopy component args
canopy_component_args = (;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ setup site specific domain and time stepping:
- dt, the time step (s)
- n, the number of time step between saving outputs
"""
function make_setup(;
dz_bottom,
dz_top,
h_stem,
h_leaf,
t0,
dt,
n,
)
function make_setup(; dz_bottom, dz_top, h_stem, h_leaf, t0, dt, n)
return (
dz_bottom = dz_bottom,
dz_top = dz_top,
Expand Down
6 changes: 1 addition & 5 deletions lib/ClimaLandSimulations/src/Fluxnet/run_fluxnet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,7 @@ function run_fluxnet(
conductivity_model = params.plant_hydraulics.conductivity_model,
retention_model = params.plant_hydraulics.retention_model,
)
plant_hydraulics_args = (
parameters = plant_hydraulics_ps,
h_stem,
h_leaf,
)
plant_hydraulics_args = (parameters = plant_hydraulics_ps, h_stem, h_leaf)

energy_args = (
parameters = Canopy.BigLeafEnergyParameters{FT}(
Expand Down
12 changes: 5 additions & 7 deletions src/integrated/soil_canopy_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,16 @@ function make_update_boundary_fluxes(

area_index = p.canopy.hydraulics.area_index

labels = land.canopy.hydraulics.parameters.h_stem > 0 ? [:stem, :leaf] : [:leaf]
labels =
land.canopy.hydraulics.parameters.h_stem > 0 ? [:stem, :leaf] :
[:leaf]

above_ground_area_index = getproperty(
area_index,
labels[1],
)
above_ground_area_index = getproperty(area_index, labels[1])

h_stem = land.canopy.hydraulics.parameters.h_stem
h_leaf = land.canopy.hydraulics.parameters.h_leaf

midpoint =
labels[1] == :stem ? h_stem / 2 : model.h_leaf / 2
midpoint = labels[1] == :stem ? h_stem / 2 : model.h_leaf / 2

@. p.root_extraction =
(area_index.root + above_ground_area_index) / 2 *
Expand Down
3 changes: 1 addition & 2 deletions src/standalone/Vegetation/Canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ function ClimaLand.make_update_aux(
)

areai = getproperty(area_index, labels[i])
areaip1 =
getproperty(area_index, labels[ip1])
areaip1 = getproperty(area_index, labels[ip1])

midpoint = hydraulics.h_stem / 2
midpointip1 = hydraulics.h_stem + (model.h_leaf / 2)
Expand Down
2 changes: 1 addition & 1 deletion test/standalone/Vegetation/canopy_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ for FT in (Float32, Float64)
)
h_stem = FT(0.0)
h_leaf = FT(1.0)

plant_hydraulics = PlantHydraulics.BigLeafHydraulicsModel{FT}(;
parameters = param_set,
h_stem = h_stem,
Expand Down

0 comments on commit b77108a

Please sign in to comment.