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 topo_drag.res.nc to a ClimaArtifact #3495

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
9 changes: 8 additions & 1 deletion Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lazy = true
[[earth_orography_60arcseconds.download]]
sha256 = "eca66c0701d1c2b9e271742314915ffbf4a0fae92709df611c323f38e019966e"
url = "https://caltech.box.com/shared/static/4asrxcgl6xsgenfcug9p0wkkyhtqilgk.gz"

[era5_cloud]
git-tree-sha1 = "10742e0a2e343d13bb04df379e300a83402d4106"

Expand All @@ -51,3 +51,10 @@ lazy = true
[[DYAMOND_SUMMER_ICS_p98deg.download]]
sha256 = "9a5efd20d68d9b954af2fd7803bccdda3fc7ef4ff60421ed13d18f768312d2e3"
url = "https://caltech.box.com/shared/static/whn01xr83v0s4p8tc59ds3nvfsfe6ebs.gz"

[topo_drag]
git-tree-sha1 = "9970989c13c2ad015ab5738d42fd9f5b320f1451"

[[topo_drag.download]]
sha256 = "2960d7ee10b3a15203dfa8b05b1b94c9546212230e5828787577864113829d6e"
url = "https://caltech.box.com/shared/static/pflpi9qoay7jknmajlj1uaxqtnp4frj2.gz"
12 changes: 0 additions & 12 deletions artifacts/artifact_funcs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ function era_single_column_dataset_path()
return AW.get_data_folder(era_dataset)
end

function topo_res_path()
topo_data = AW.ArtifactWrapper(
@__DIR__,
"topo-info",
AW.ArtifactFile[AW.ArtifactFile(
url = "https://caltech.box.com/shared/static/isa7l4ow4xvv9vs09bivdwttbnnw5tte.nc",
filename = "topo_drag.res.nc",
),],
)
return AW.get_data_folder(topo_data)
end

function mima_gwf_path()
mima_data = AW.ArtifactWrapper(
@__DIR__,
Expand Down
1 change: 0 additions & 1 deletion artifacts/download_artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include(joinpath(@__DIR__, "artifact_funcs.jl"))
function trigger_download(lazy_download = true)
@info "Era global dataset path:`$(era_global_dataset_path())`"
@info "Era single column dataset path:`$(era_single_column_dataset_path())`"
@info "topo dataset path:`$(topo_res_path())`"
@info "MiMA convective gravity wave path:`$(mima_gwf_path())`"
@info "GFDL OGWD test data:`$(gfdl_ogw_data_path())`"
return nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ function orographic_gravity_wave_cache(Y, ogw::OrographicGravityWave)
(; γ, ϵ, β, h_frac, ρscale, L0, a0, a1, Fr_crit) = ogw

if ogw.topo_info == "gfdl_restart"
orographic_info_rll = joinpath(topo_res_path(), "topo_drag.res.nc")
orographic_info_rll =
AA.topo_res_file_path(; context = ClimaComms.context(Y.c))
topo_info = regrid_OGW_info(Y, orographic_info_rll)
elseif ogw.topo_info == "raw_topo"
# TODO: right now this option may easily crash
Expand Down
11 changes: 10 additions & 1 deletion src/utils/AtmosArtifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ end

Construct the file path for the 60arcsecond orography data NetCDF file.

Downloads the 60arc-second dataset by default.
Downloads the 60arc-second dataset by default.
"""
function earth_orography_file_path(; context = nothing)
filename = "ETOPO_2022_v1_60s_N90W180_surface.nc"
Expand All @@ -82,4 +82,13 @@ function earth_orography_file_path(; context = nothing)
)
end

"""
topo_res_file_path(; context = nothing)

Construct the file path for the topo_res NetCDF file.
"""
function topo_res_file_path(; context = nothing)
return joinpath(@clima_artifact("topo_drag", context), "topo_drag.res.nc")
end

end
Loading