Skip to content

Commit

Permalink
global run of soil/canopy model
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Jun 21, 2024
1 parent 0683b81 commit c96affc
Show file tree
Hide file tree
Showing 30 changed files with 1,752 additions and 177 deletions.
6 changes: 6 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ steps:
agents:
slurm_mem: 16G

- label: "Global Run CPU"
command: "julia --color=yes --project=.buildkite experiments/integrated/global/global_soil_canopy.jl"
artifact_paths: "experiments/integrated/global/plots/*png"
agents:
slurm_mem: 16G

- group: "Experiments on GPU"
steps:
- label: "Richards Runoff GPU"
Expand Down
10 changes: 10 additions & 0 deletions .buildkite/target/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ steps:
agents:
slurm_mem: 8GB
slurm_gpus: 1

- label: "Soil/Canopy"
command: "julia --color=yes --project=.buildkite experiments/benchmarks/land.jl"
artifact_paths:
- "land_benchmark_gpu/*html"
env:
CLIMACOMMS_DEVICE: CUDA
agents:
slurm_mem: 8GB
slurm_gpus: 1
12 changes: 6 additions & 6 deletions docs/tutorials/integrated/soil_canopy_tutorial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,14 @@ Y.soil.ϑ_l = FT(0.4)
Y.soil.θ_i = FT(0.0)
T_0 = FT(288.7)
ρc_s =
volumetric_heat_capacity.(Y.soil.ϑ_l, Y.soil.θ_i, Ref(land.soil.parameters))
Y.soil.ρe_int =
volumetric_internal_energy.(
volumetric_heat_capacity.(
Y.soil.ϑ_l,
Y.soil.θ_i,
ρc_s,
T_0,
Ref(land.soil.parameters),
land.soil.parameters.ρc_ds,
earth_param_set,
)
Y.soil.ρe_int =
volumetric_internal_energy.(Y.soil.θ_i, ρc_s, T_0, earth_param_set)

Y.soilco2.C .= FT(0.000412) # set to atmospheric co2, mol co2 per mol air

Expand Down
9 changes: 7 additions & 2 deletions docs/tutorials/standalone/Soil/evaporation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,14 @@ function init_soil!(Y, z, params)
Y.soil.ϑ_l .= hydrostatic_equilibrium.(z, FT(-0.001), params)
Y.soil.θ_i .= 0
T = FT(296.15)
ρc_s = @. Soil.volumetric_heat_capacity(Y.soil.ϑ_l, FT(0), params)
ρc_s = @. Soil.volumetric_heat_capacity(
Y.soil.ϑ_l,
FT(0),
params.ρc_ds,
params.earth_param_set,
)
Y.soil.ρe_int =
Soil.volumetric_internal_energy.(FT(0), ρc_s, T, Ref(params))
Soil.volumetric_internal_energy.(FT(0), ρc_s, T, params.earth_param_set)
end
init_soil!(Y, z, soil.parameters);

Expand Down
14 changes: 12 additions & 2 deletions docs/tutorials/standalone/Soil/evaporation_gilat_loess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,19 @@ function init_soil!(Y, z, params)
Y.soil.ϑ_l .= estimated_ic.(z)
Y.soil.θ_i .= 0
T = FT(294.15)
ρc_s = @. Soil.volumetric_heat_capacity(Y.soil.ϑ_l, Y.soil.θ_i, params)
ρc_s = @. Soil.volumetric_heat_capacity(
Y.soil.ϑ_l,
Y.soil.θ_i,
params.ρc_ds,
params.earth_param_set,
)
Y.soil.ρe_int =
Soil.volumetric_internal_energy.(Y.soil.θ_i, ρc_s, T, Ref(params))
Soil.volumetric_internal_energy.(
Y.soil.θ_i,
ρc_s,
T,
params.earth_param_set,
)
end

init_soil!(Y, z, soil.parameters)
Expand Down
14 changes: 12 additions & 2 deletions docs/tutorials/standalone/Soil/freezing_front.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,19 @@ function init_soil!(Ysoil, z, params)
Ysoil.soil.ϑ_l .= FT(0.33)
Ysoil.soil.θ_i .= FT(0.0)
T = FT(279.85)
ρc_s = Soil.volumetric_heat_capacity(FT(0.33), FT(0.0), params)
ρc_s = Soil.volumetric_heat_capacity(
FT(0.33),
FT(0.0),
params.ρc_ds,
params.earth_param_set,
)
Ysoil.soil.ρe_int .=
Soil.volumetric_internal_energy.(FT(0.0), ρc_s, T, Ref(params))
Soil.volumetric_internal_energy.(
FT(0.0),
ρc_s,
T,
params.earth_param_set,
)
end

init_soil!(Y, coords.subsurface.z, soil.parameters);
Expand Down
15 changes: 13 additions & 2 deletions docs/tutorials/standalone/Soil/soil_energy_hydrology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,20 @@ function init_soil!(Y, z, params)
T = @.(T_min + (T_max - T_min) * exp(-(z - zmax) / (zmin - zmax) * c))

θ_l = Soil.volumetric_liquid_fraction.(Y.soil.ϑ_l, ν, θ_r)
ρc_s = Soil.volumetric_heat_capacity.(θ_l, Y.soil.θ_i, Ref(params))
ρc_s =
Soil.volumetric_heat_capacity.(
θ_l,
Y.soil.θ_i,
params.ρc_ds,
params.earth_param_set,
)
Y.soil.ρe_int .=
Soil.volumetric_internal_energy.(Y.soil.θ_i, ρc_s, T, Ref(params))
Soil.volumetric_internal_energy.(
Y.soil.θ_i,
ρc_s,
T,
params.earth_param_set,
)
end

init_soil!(Y, coords.subsurface.z, soil.parameters);
Expand Down
9 changes: 7 additions & 2 deletions docs/tutorials/standalone/Soil/sublimation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ function init_soil!(Y, z, params)
Y.soil.ϑ_l .= hydrostatic_equilibrium.(z, FT(-0.1), params)
Y.soil.θ_i .= 0
T = FT(275.0)
ρc_s = @. Soil.volumetric_heat_capacity(Y.soil.ϑ_l, FT(0), params)
ρc_s = @. Soil.volumetric_heat_capacity(
Y.soil.ϑ_l,
FT(0),
params.ρc_ds,
params.earth_param_set,
)
Y.soil.ρe_int =
Soil.volumetric_internal_energy.(FT(0), ρc_s, T, Ref(params))
Soil.volumetric_internal_energy.(FT(0), ρc_s, T, params.earth_param_set)
end
init_soil!(Y, z, soil.parameters);

Expand Down
Loading

0 comments on commit c96affc

Please sign in to comment.