diff --git a/Artifacts.toml b/Artifacts.toml index 0c57f5440f..2eab117db4 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -38,3 +38,9 @@ git-tree-sha1 = "b849eb95c09190095e7bf021494ddeda8858af01" [[modis_clumping_index.download]] sha256 = "e4c766a93a673e5dc22540687ef5616416d65bb13a0f4a67789b95d49ccbb158" url = "https://caltech.box.com/shared/static/ec2y3k5kqpl9wjvtsx3584wgkp5q8dyw.gz" + +[bonan_richards_eqn] +git-tree-sha1 = "043f9354b961fd3ef6ac4cf71d0c99930e177a92" + [[bonan_richards_eqn.download]] + sha256 = "50f1739dfd8193742488f249bd1ba8a157dfc7c1d8a27392ba7edbe9b4c0db03" + url = "https://caltech.box.com/shared/static/4jcz9c1lp6rt750q28kx3qvihi8393tv.gz" diff --git a/experiments/standalone/Soil/richards_comparison.jl b/experiments/standalone/Soil/richards_comparison.jl index d6d42d98a3..2eea990257 100644 --- a/experiments/standalone/Soil/richards_comparison.jl +++ b/experiments/standalone/Soil/richards_comparison.jl @@ -16,8 +16,9 @@ import ClimaUtilities.OutputPathGenerator: generate_output_path import ClimaLand import ClimaLand.Parameters as LP -clay_datapath, sand_datapath = - ClimaLand.Artifacts.richards_eqn_bonan_data_path() +bonan_data_folder = ClimaLand.Artifacts.richards_eqn_bonan_data_path() +clay_datapath = joinpath(bonan_data_folder, "bonan_data_clay.txt") +sand_datapath = joinpath(bonan_data_folder, "bonan_data_sand.txt") context = ClimaComms.context() device_suffix = @@ -207,7 +208,7 @@ end if FT == Float64 && context.device isa ClimaComms.CPUSingleThreaded N = length(sol.t) ϑ_l = parent(sol.u[N].soil.ϑ_l) - ds_bonan = readdlm(sand_datapath, ',') + ds_bonan = readdlm(sand_datapath) bonan_moisture = reverse(ds_bonan[:, 1]) bonan_z = reverse(ds_bonan[:, 2]) ./ 100.0 @test sqrt.(mean((bonan_moisture .- ϑ_l) .^ 2.0)) < FT(1e-3) diff --git a/src/Artifacts.jl b/src/Artifacts.jl index 37d9948435..c66c8501ff 100644 --- a/src/Artifacts.jl +++ b/src/Artifacts.jl @@ -153,6 +153,8 @@ end Returns the file path for data created solving Richards equation with G. Bonan's matlab code, found here: https://github.com/gbonan/bonanmodeling/tree/master/sp_08_01 +This folder contains two data files: bonan_data_clay.txt and +bonan_data_sand.txt. The data files correspond to the clay and sand data set described in that code and in G. Bonan's book, @@ -162,31 +164,7 @@ Publisher: Cambridge University Press Print publication year: 2019 """ function richards_eqn_bonan_data_path(; context = nothing) - dir = joinpath(@__DIR__, "../") - bonan_clay_dataset = ArtifactWrapper( - dir, - "richards_clay_bonan_ref_soln", - ArtifactFile[ArtifactFile( - url = "https://caltech.box.com/shared/static/nk89znth59gcsdb65lnywnzjnuno3h6k.txt", - filename = "clay_bonan_sp801_22323.txt", - ),], - ) - clay_datapath = joinpath( - get_data_folder(bonan_clay_dataset), - "clay_bonan_sp801_22323.txt", - ) - - bonan_sand_dataset = ArtifactWrapper( - dir, - "richards_sand_bonan_ref_soln", - ArtifactFile[ArtifactFile( - url = "https://caltech.box.com/shared/static/2vk7bvyjah8xd5b7wxcqy72yfd2myjss.csv", - filename = "sand_bonan_sp801.csv", - ),], - ) - sand_datapath = - joinpath(get_data_folder(bonan_sand_dataset), "sand_bonan_sp801.csv") - return clay_datapath, sand_datapath + return @clima_artifact("bonan_richards_eqn", context) end """