Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change albedo artifacts to use ClimaArtifacts #820

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[cesm2_albedo]
git-tree-sha1 = "316096635acaa8102477820f480ca02fe66eb828"

[[cesm2_albedo.download]]
sha256 = "5ac358d4485f6ba7bae129d4570cabc712b793d4a3e22caa8808de147b2c8f9b"
url = "https://caltech.box.com/shared/static/awz2lku3ngoto6t78muktzfk3kjloxsw.gz"

[clm_data]
git-tree-sha1 = "5fcb868a751f4a2e32181612bb0c123e9a8e7e97"

Expand Down
41 changes: 19 additions & 22 deletions src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,20 @@ function mizoguchi1990_soil_freezing_data(; context = nothing)
return dataset_path
end

"""
cesm2_albedo_dataset_folder()
Triggers the download of the CESM2 albedo folder, if not
already downloaded, using Julia Artifacts, and returns the path to
this file.
This dataset contains monthly albedo data from 15/01/1850
to 15/12/2014.
"""
function cesm2_albedo_dataset_folder(; context = nothing)
return artifact_path = @clima_artifact("cesm2_albedo", context)
end

"""
cesm2_albedo_dataset_path()
Expand All @@ -304,19 +318,9 @@ This dataset contains monthly albedo data from 15/01/1850
to 15/12/2014.
"""
function cesm2_albedo_dataset_path(; context = nothing)
dir = joinpath(@__DIR__, "../")
land_albedo_dataset = ArtifactWrapper(
dir,
"land_albedo",
ArtifactFile[ArtifactFile(
url = "https://caltech.box.com/shared/static/1uhqspj4xujkyz661x0pio59hvmgsi5c.nc",
filename = "esw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2.nc",
),],
)
path = get_data_folder(land_albedo_dataset)
return joinpath(
path,
"esw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2.nc",
cesm2_albedo_dataset_folder(; context),
"sw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2_no-nans.nc",
)
end

Expand All @@ -330,17 +334,10 @@ this file.
This dataset does not contain a time component.
"""
function bareground_albedo_dataset_path(; context = nothing)
dir = joinpath(@__DIR__, "../")
bareground_albedo_dataset = ArtifactWrapper(
dir,
"bareground_albedo",
ArtifactFile[ArtifactFile(
url = "https://caltech.box.com/shared/static/ga9385kyl82t955dylsbnn4x51b412md.nc",
filename = "bareground_albedo.nc",
),],
return joinpath(
cesm2_albedo_dataset_folder(; context),
"bareground_albedo.nc",
)
path = get_data_folder(bareground_albedo_dataset)
return joinpath(path, "bareground_albedo.nc")
end

end
3 changes: 0 additions & 3 deletions src/standalone/Bucket/Bucket.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ export BucketModelParameters,
surface_albedo,
partition_snow_surface_fluxes

include(
joinpath(pkgdir(ClimaLand), "src/standalone/Bucket/artifacts/artifacts.jl"),
)

abstract type AbstractBucketModel{FT} <: AbstractExpModel{FT} end

Expand Down
51 changes: 0 additions & 51 deletions src/standalone/Bucket/artifacts/artifacts.jl

This file was deleted.

Loading