From 89a700014970da73596a2c0411de2f0568262399 Mon Sep 17 00:00:00 2001 From: Julia Sloan Date: Fri, 22 Nov 2024 11:27:50 -0800 Subject: [PATCH] use Lehmann 2008 evaporation artifact --- Artifacts.toml | 7 +++++++ docs/tutorials/standalone/Soil/evaporation.jl | 3 +-- src/Artifacts.jl | 18 ++++-------------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Artifacts.toml b/Artifacts.toml index ec05491c27..13a81dcbac 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -51,3 +51,10 @@ git-tree-sha1 = "2fc70601badf6f83dee2b84ba9c386ad041de8e2" [[fluxnet_sites.download]] sha256 = "f05b4c01b57afe9c0f59095b39cea1c0cf46b20deecd5c7afb44f474d9cd9966" url = "https://caltech.box.com/shared/static/otrr2y0rgjct7hqhmq214nb8qjsvqj5p.gz" + +[lehmann2008_evaporation] +git-tree-sha1 = "49386718eda19d2fa00ae6981d83948c6664057a" + + [[lehmann2008_evaporation.download]] + sha256 = "e9603add174709a8eb7f70487bdc0f519843c03d83cb40cf07acd428f0d9d881" + url = "https://caltech.box.com/shared/static/khhop0nvuumrtzdakemaab8hsq8emh8e.gz" diff --git a/docs/tutorials/standalone/Soil/evaporation.jl b/docs/tutorials/standalone/Soil/evaporation.jl index 745b26d2aa..18da5dec6d 100644 --- a/docs/tutorials/standalone/Soil/evaporation.jl +++ b/docs/tutorials/standalone/Soil/evaporation.jl @@ -226,8 +226,7 @@ evap = [ parent(sv.saveval[k].soil.turbulent_fluxes.vapor_flux_liq)[1] for k in 1:length(sol.t) ] -evaporation_data = - ClimaLand.Artifacts.lehmann_assouline_or2008_evaporation_data(); +evaporation_data = ClimaLand.Artifacts.lehmann2008_evaporation_data(); ref_soln_E = readdlm(evaporation_data, ',') ref_soln_E_350mm = ref_soln_E[2:end, 1:2] data_dates = ref_soln_E_350mm[:, 1] diff --git a/src/Artifacts.jl b/src/Artifacts.jl index 285d95d19f..e303091786 100644 --- a/src/Artifacts.jl +++ b/src/Artifacts.jl @@ -194,9 +194,9 @@ function topmodel_data_path(; context = nothing) end """ - lehmann_assouline_or2008_evaporation_data(; context=nothing) + lehmann2008_evaporation_data(; context=nothing) -Local path to file containing measured evaporation rate as a function of time +Returns the path to file containing measured evaporation rate as a function of time for bare soil. Data was originally collected by Lehmann, Peter, Shmuel Assouline, @@ -206,18 +206,8 @@ in Figure 8 of that work. https://doi.org/10.1103/PhysRevE.77.056309 """ -function lehmann_assouline_or2008_evaporation_data(; context = nothing) - dir = joinpath(@__DIR__, "../") - evap_dataset = ArtifactWrapper( - dir, - "lehmann2008_fig8_evaporation", - ArtifactFile[ArtifactFile( - url = "https://caltech.box.com/shared/static/cgppw3tx6zdz7h02yt28ri44g1j088ju.csv", - filename = "lehmann2008_fig8_evaporation.csv", - ),], - ) - evap_datapath = get_data_folder(evap_dataset) - return joinpath(evap_datapath, "lehmann2008_fig8_evaporation.csv") +function lehmann2008_evaporation_data(; context = nothing) + return joinpath(@clima_artifact("lehmann2008_evaporation", context), "lehmann2008_fig8_evaporation.csv") end """