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

Gravity wave artifacts #7

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
4 changes: 4 additions & 0 deletions gfdl_ogw/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
ClimaArtifactsHelper = "6ffa2572-8378-4377-82eb-ea11db28b255"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
25 changes: 25 additions & 0 deletions gfdl_ogw/create_artifact.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Downloads
using NCDatasets
using ProgressMeter

using ClimaArtifactsHelper

const FILE_URL = "https://caltech.box.com/shared/static/zubipz298q5ar5rpfais8c0ymtfyz2oc.nc"
const FILE_PATH = "gfdl_ogw.nc"

output_dir = "gfdl_orographic_gravity_wave_artifact"
if isdir(output_dir)
@warn "$output_dir already exists. Content will end up in the artifact and may be overwritten."
@warn "Abort this calculation, unless you know what you are doing."
else
mkdir(output_dir)
end

if !isfile(FILE_PATH)
@info "$FILE_PATH not found, downloading it (might take a while)"
gfdl_ogw_file = Downloads.download(FILE_URL)
Base.mv(gfdl_ogw_file, FILE_PATH)
end

@info "Orographic gravity-wave (GFDL) dataset is ready!"
create_artifact_guided(output_dir; artifact_name = basename(@__DIR__))
4 changes: 4 additions & 0 deletions mima_gwf/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
ClimaArtifactsHelper = "6ffa2572-8378-4377-82eb-ea11db28b255"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
25 changes: 25 additions & 0 deletions mima_gwf/create_artifact.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Downloads
using NCDatasets
using ProgressMeter

using ClimaArtifactsHelper

const FILE_URL = "https://caltech.box.com/shared/static/6r566rv4631ibfbr5p5vtv4ls7vl5fge.nc"
const FILE_PATH = "mima_gwf.nc"

output_dir = "gfdl_orographic_gravity_wave_artifact"
if isdir(output_dir)
@warn "$output_dir already exists. Content will end up in the artifact and may be overwritten."
@warn "Abort this calculation, unless you know what you are doing."
else
mkdir(output_dir)
end

if !isfile(FILE_PATH)
@info "$FILE_PATH not found, downloading it (might take a while)"
gfdl_ogw_file = Downloads.download(FILE_URL)
Base.mv(gfdl_ogw_file, FILE_PATH)
end

@info "MIMA gravity-wave forcing dataset is ready!"
create_artifact_guided(output_dir; artifact_name = basename(@__DIR__))