-
Notifications
You must be signed in to change notification settings - Fork 10
/
artifacts.jl
46 lines (41 loc) · 1.46 KB
/
artifacts.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import ArtifactWrappers as AW
export cesm2_land_albedo_dataset_path, bareground_albedo_dataset_path
"""
cesm2_land_albedo_dataset_path()
Triggers the download of the CESM2 land albedo dataset, if not
already downloaded, using Julia Artifacts, and returns the path to
this file.
"""
function cesm2_land_albedo_dataset_path()
land_albedo_dataset = AW.ArtifactWrapper(
@__DIR__,
"land_albedo",
AW.ArtifactFile[AW.ArtifactFile(
url = "https://caltech.box.com/shared/static/h3fcq4hlfe0o4kaj7ghftv76tg7v879v.nc",
filename = "esw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2.nc",
),],
)
path = AW.get_data_folder(land_albedo_dataset)
return joinpath(
path,
"esw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2.nc",
)
end
"""
bareground_albedo_dataset_path()
Triggers the download of the average bareground land albedo dataset, if not
already downloaded, using Julia Artifacts, and returns the path to
this file.
"""
function bareground_albedo_dataset_path()
bareground_albedo_dataset = AW.ArtifactWrapper(
@__DIR__,
"bareground_albedo",
AW.ArtifactFile[AW.ArtifactFile(
url = "https://caltech.box.com/shared/static/ga9385kyl82t955dylsbnn4x51b412md.nc",
filename = "bareground_albedo.nc",
),],
)
path = AW.get_data_folder(bareground_albedo_dataset)
return joinpath(path, "bareground_albedo.nc")
end