From 1669af1f560c9708eed261c28b645273dd781ffe Mon Sep 17 00:00:00 2001 From: Alexis Renchon Date: Tue, 13 Aug 2024 12:51:52 -0700 Subject: [PATCH 1/4] Use different LAI dataset with data only every week Since LAI changes infrequently, use a dataset with only weekly data so that we read data less frequently. This new data set is created in this PR: https://github.com/CliMA/ClimaArtifacts/pull/5/files and on the Caltech cluster. Co-authored-by: AlexisRenchon Co-authored-by: SBozzolo Co-authored-by: kmdeck --- experiments/benchmarks/land.jl | 2 +- experiments/integrated/global/global_soil_canopy.jl | 2 +- experiments/long_runs/land.jl | 3 ++- 3 files changed, 4 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..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. @@ -469,7 +470,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 a9fdc7b9f7c7b9bdb2fa46598778b1b092d775a8 Mon Sep 17 00:00:00 2001 From: Alexis Renchon Date: Tue, 13 Aug 2024 12:52:52 -0700 Subject: [PATCH 2/4] Fix GPU bug from SIF model The implementation of the SIF model in the Canopy module broke GPU compatibility. This commit fixes this bug. Co-authored-by: AlexisRenchon Co-authored-by: SBozzolo Co-authored-by: kmdeck --- src/standalone/Vegetation/optimality_farquhar.jl | 1 + .../Vegetation/solar_induced_fluorescence.jl | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 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..17e8f1131d 100644 --- a/src/standalone/Vegetation/solar_induced_fluorescence.jl +++ b/src/standalone/Vegetation/solar_induced_fluorescence.jl @@ -76,6 +76,7 @@ function update_SIF!( T_freeze, photosynthesis_parameters, ) + (; ΔHJmax, To, θj, ϕ) = photosynthesis_parameters sif_parameters = sif_model.parameters @. SIF = compute_SIF_at_a_point( APAR, @@ -83,7 +84,10 @@ function update_SIF!( Vcmax25, R, T_freeze, - photosynthesis_parameters, + ΔHJmax, + To, + θj, + ϕ, sif_parameters, ) end @@ -95,10 +99,12 @@ function compute_SIF_at_a_point( Vcmax25::FT, R::FT, T_freeze::FT, - photosynthesis_parameters, - sif_parameters, + ΔHJmax::FT, + To::FT, + θj::FT, + ϕ::FT, + sif_parameters::SIFParameters{FT}, ) where {FT} - (; ΔHJmax, To, θj, ϕ) = photosynthesis_parameters Jmax = max_electron_transport(Vcmax25, ΔHJmax, Tc, To, R) J = electron_transport(APAR, Jmax, θj, ϕ) (; kf, kd_p1, kd_p2, min_kd, kn_p1, kn_p2, kp, kappa_p1, kappa_p2) = From d2d89c96f115e0aaeb3f61b27125b088357cc983 Mon Sep 17 00:00:00 2001 From: Alexis Renchon Date: Tue, 13 Aug 2024 15:34:44 -0700 Subject: [PATCH 3/4] Change the Artifact for albedo The albedo artifact was broken, this commit updates the albedo file to sw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2_no-nans.nc Co-authored-by: AlexisRenchon Co-authored-by: SBozzolo --- Artifacts.toml | 15 +++++++++------ src/Artifacts.jl | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Artifacts.toml b/Artifacts.toml index d819275697..c5e347564b 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -1,12 +1,8 @@ [era5_land_forcing_data2021] git-tree-sha1 = "ec424296df6b60cfe273ac8f981701fbbed0bd8a" -[soil_params_Gupta2020_2022] -git-tree-sha1 = "c10e8f877603bfa2c018eb2dd0c51dd078abe5df" - - [[soil_params_Gupta2020_2022.download]] - sha256 = "6205d96ae7724c469eef5cd1cf3b99e186637427b6fb65ecc659fb808fc6cacf" - url = "https://caltech.box.com/shared/static/7c6yx62tzjivxfmhqyy03r6e9l1glyu1.gz" +[land_albedo] +git-tree-sha1 = "3f07b70ab43a05123e93753a45e094dcf7a66b5b" [snowmip] git-tree-sha1 = "230f00823299e7e33d276d9b57cba985fc04eaae" @@ -14,3 +10,10 @@ git-tree-sha1 = "230f00823299e7e33d276d9b57cba985fc04eaae" [[snowmip.download]] sha256 = "598b525c7421fabf06de4c8d4d7e05d50b7655ad2387d98c4335e90fd5633d61" url = "https://caltech.box.com/shared/static/0vqhet1hsj36sgmy0ajrcrb24cihcfd7.gz" + +[soil_params_Gupta2020_2022] +git-tree-sha1 = "c10e8f877603bfa2c018eb2dd0c51dd078abe5df" + + [[soil_params_Gupta2020_2022.download]] + sha256 = "6205d96ae7724c469eef5cd1cf3b99e186637427b6fb65ecc659fb808fc6cacf" + url = "https://caltech.box.com/shared/static/7c6yx62tzjivxfmhqyy03r6e9l1glyu1.gz" diff --git a/src/Artifacts.jl b/src/Artifacts.jl index 98fca53524..e8375e8d53 100644 --- a/src/Artifacts.jl +++ b/src/Artifacts.jl @@ -248,7 +248,7 @@ https://doi.org/10.4141/cjss09118 function huang_et_al2011_soil_van_genuchten_data(; context = nothing) dir = joinpath(@__DIR__, "../") af = ArtifactFile( - url = "https://caltech.box.com/shared/static/qvbt37xkwz8gveyi6tzzbs0e18trpcsq.csv", + url = "https://caltech.box.com/shared/static/kbgxc8r2j6uzboxgg9h2ydi5145wdpxh.csv", filename = "sv_62.csv", ) dataset = ArtifactWrapper(dir, "sv62", ArtifactFile[af]) @@ -300,7 +300,7 @@ function cesm2_albedo_dataset_path(; context = nothing) dir, "land_albedo", ArtifactFile[ArtifactFile( - url = "https://caltech.box.com/shared/static/eesee8iv3c21z3pysizcgnuncfp5xykv.nc", + url = "https://caltech.box.com/shared/static/1uhqspj4xujkyz661x0pio59hvmgsi5c.nc", filename = "esw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2.nc", ),], ) From 4f726a2843fa819416fe57347a11986124929994 Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Wed, 14 Aug 2024 11:55:49 -0700 Subject: [PATCH 4/4] Bump to 0.14.2 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cff08561aa..842729bcf3 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimaLand" uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532" authors = ["Clima Land Team"] -version = "0.14.1" +version = "0.14.2" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"