Skip to content

Commit

Permalink
use Lehmann 2008 evaporation artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Nov 22, 2024
1 parent 1ffffe2 commit 61ac397
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
7 changes: 7 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ git-tree-sha1 = "10855ff977cc948a92c7a83915895d27650649a1"
[[topmodel.download]]
sha256 = "03de8f42fedf3836c6792571f04b55fbaca321919ecd761b846286dc56bfa2e8"
url = "https://caltech.box.com/shared/static/bfjxp72vre6b5ncm7jqf9w8hyj4ab4yr.gz"

[lehmann2008_evaporation]
git-tree-sha1 = "49386718eda19d2fa00ae6981d83948c6664057a"

[[lehmann2008_evaporation.download]]
sha256 = "e9603add174709a8eb7f70487bdc0f519843c03d83cb40cf07acd428f0d9d881"
url = "https://caltech.box.com/shared/static/khhop0nvuumrtzdakemaab8hsq8emh8e.gz"
3 changes: 1 addition & 2 deletions docs/tutorials/standalone/Soil/evaporation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
19 changes: 6 additions & 13 deletions src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,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,
Expand All @@ -191,18 +191,11 @@ 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",
),],
function lehmann2008_evaporation_data(; context = nothing)
return joinpath(
@clima_artifact("lehmann2008_evaporation", context),
"lehmann2008_fig8_evaporation.csv",
)
evap_datapath = get_data_folder(evap_dataset)
return joinpath(evap_datapath, "lehmann2008_fig8_evaporation.csv")
end

"""
Expand Down

0 comments on commit 61ac397

Please sign in to comment.