From 647eb36b21b00133d7b8d160f6232c565d17d339 Mon Sep 17 00:00:00 2001 From: kmdeck Date: Mon, 5 Aug 2024 12:35:51 -0700 Subject: [PATCH 1/4] use different LAI dataset --- experiments/benchmarks/land.jl | 2 +- experiments/integrated/global/global_soil_canopy.jl | 2 +- experiments/long_runs/land.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/experiments/benchmarks/land.jl b/experiments/benchmarks/land.jl index 3abec4200e..85368220be 100644 --- a/experiments/benchmarks/land.jl +++ b/experiments/benchmarks/land.jl @@ -470,7 +470,7 @@ function setup_prob(t0, tf, Δt; nelements = (101, 15)) # or PR #645 for details. # For now, this clipping is similar to what CLM does. LAIfunction = TimeVaryingInput( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + joinpath(era5_artifact_path, "era5_lai_2021_0.9x1.25_clima.nc"), "lai", surface_space; reference_date = ref_time, diff --git a/experiments/integrated/global/global_soil_canopy.jl b/experiments/integrated/global/global_soil_canopy.jl index 4a6962e807..137e244b84 100644 --- a/experiments/integrated/global/global_soil_canopy.jl +++ b/experiments/integrated/global/global_soil_canopy.jl @@ -231,7 +231,7 @@ photosynthesis_args = (; # Set up plant hydraulics # Not ideal LAIfunction = TimeVaryingInput( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + joinpath(era5_artifact_path, "era5_lai_2021_0.9x1.25_clima.nc"), "lai", surface_space; reference_date = ref_time, diff --git a/experiments/long_runs/land.jl b/experiments/long_runs/land.jl index e48d785748..bf33d14e82 100644 --- a/experiments/long_runs/land.jl +++ b/experiments/long_runs/land.jl @@ -469,7 +469,7 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) # or PR #645 for details. # For now, this clipping is similar to what CLM does. LAIfunction = TimeVaryingInput( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"), + joinpath(era5_artifact_path, "era5_lai_2021_0.9x1.25_clima.nc"), "lai", surface_space; reference_date = ref_time, From 83f6d960a597baa05bfad7930a0b35f4a7b06d74 Mon Sep 17 00:00:00 2001 From: kmdeck Date: Mon, 5 Aug 2024 12:39:47 -0700 Subject: [PATCH 2/4] trigger long run --- experiments/long_runs/land.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/experiments/long_runs/land.jl b/experiments/long_runs/land.jl index bf33d14e82..7aed2cd370 100644 --- a/experiments/long_runs/land.jl +++ b/experiments/long_runs/land.jl @@ -462,6 +462,7 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) ) ) # Set up plant hydraulics + # Note that we clip all values of LAI below 0.05 to zero. # This is because we currently run into issues when LAI is # of order eps(FT) in the SW radiation code. From 8f1fb89cd39e5749329a258e5ecc2b198d6f48ff Mon Sep 17 00:00:00 2001 From: kmdeck Date: Mon, 5 Aug 2024 14:45:48 -0700 Subject: [PATCH 3/4] not sure about bug on GPU with SIF --- src/standalone/Vegetation/optimality_farquhar.jl | 1 + src/standalone/Vegetation/solar_induced_fluorescence.jl | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/standalone/Vegetation/optimality_farquhar.jl b/src/standalone/Vegetation/optimality_farquhar.jl index a2212269b7..1422b20271 100644 --- a/src/standalone/Vegetation/optimality_farquhar.jl +++ b/src/standalone/Vegetation/optimality_farquhar.jl @@ -153,3 +153,4 @@ function update_photosynthesis!( @. Rd = dark_respiration(Vcmax25, β, f, ΔHRd, T, To, R) @. An = net_photosynthesis(Ac, Aj, Rd, β) end +Base.broadcastable(m::OptimalityFarquharParameters) = tuple(m) diff --git a/src/standalone/Vegetation/solar_induced_fluorescence.jl b/src/standalone/Vegetation/solar_induced_fluorescence.jl index f2ca8e6df7..968e18a5fa 100644 --- a/src/standalone/Vegetation/solar_induced_fluorescence.jl +++ b/src/standalone/Vegetation/solar_induced_fluorescence.jl @@ -95,8 +95,11 @@ function compute_SIF_at_a_point( Vcmax25::FT, R::FT, T_freeze::FT, - photosynthesis_parameters, - sif_parameters, + photosynthesis_parameters::Union{ + FarquharParameters, + OptimalityFarquharParameters, + }, + sif_parameters::SIFParameters, ) where {FT} (; ΔHJmax, To, θj, ϕ) = photosynthesis_parameters Jmax = max_electron_transport(Vcmax25, ΔHJmax, Tc, To, R) From 314e0b53f86b0ffa31c433cf3e24dc8bd6e7932a Mon Sep 17 00:00:00 2001 From: kmdeck Date: Mon, 5 Aug 2024 15:15:43 -0700 Subject: [PATCH 4/4] SIF does not run on GPU [skip ci] --- src/standalone/Vegetation/solar_induced_fluorescence.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/standalone/Vegetation/solar_induced_fluorescence.jl b/src/standalone/Vegetation/solar_induced_fluorescence.jl index 968e18a5fa..ae5fded511 100644 --- a/src/standalone/Vegetation/solar_induced_fluorescence.jl +++ b/src/standalone/Vegetation/solar_induced_fluorescence.jl @@ -96,10 +96,10 @@ function compute_SIF_at_a_point( R::FT, T_freeze::FT, photosynthesis_parameters::Union{ - FarquharParameters, - OptimalityFarquharParameters, + FarquharParameters{FT}, + OptimalityFarquharParameters{FT}, }, - sif_parameters::SIFParameters, + sif_parameters::SIFParameters{FT}, ) where {FT} (; ΔHJmax, To, θj, ϕ) = photosynthesis_parameters Jmax = max_electron_transport(Vcmax25, ΔHJmax, Tc, To, R)