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

Contrib data script's wget verbosity #526

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
32 changes: 31 additions & 1 deletion contrib/get_aerosol_climo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
#!/bin/bash

# Function to display help message
print_help() {
echo "get_aerosol_climo.sh: contrib/get_aerosol_climo.sh [-v,--verbose]"
echo " Script for downloading/extracting the GOCART climatological aerosol data."
echo ""
echo "Options:"
echo " -v, --verbose Turn on wget verbose output."
echo " --help Show this help message and exit."
}

verbose="-nv"
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--help)
print_help
exit 0
;;
-v|--verbose)
verbose="-v"
;;
*)
echo "Unknown option: $1"
print_help
exit 1
;;
esac
shift
done

#set -ex

# Directory where this script is located
Expand All @@ -20,7 +50,7 @@ data_files=("FV3_aeroclim1" "FV3_aeroclim2" "FV3_aeroclim3" "FV3_aeroclim_optics
cd $BASEDIR/scm/data/physics_input_data/
for file in "${data_files[@]}"; do
echo "Retrieving $file.tar.gz"
wget https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/${file}.tar.gz
wget ${verbose} https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/${file}.tar.gz
tar -xvf ${file}.tar.gz
rm -f ${file}.tar.gz
done
Expand Down
32 changes: 31 additions & 1 deletion contrib/get_all_static_data.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
#!/bin/bash

# Function to display help message
print_help() {
echo "get_all_static_data.sh: contrib/get_all_static_data.sh [-v,--verbose]"
echo " Script for downloading/extracting the processed SCM case data."
echo ""
echo "Options:"
echo " -v, --verbose Turn on wget verbose output."
echo " --help Show this help message and exit."
}

verbose="-nv"
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--help)
print_help
exit 0
;;
-v|--verbose)
verbose="-v"
;;
*)
echo "Unknown option: $1"
print_help
exit 1
;;
esac
shift
done

#set -ex

# Directory where this script is located
Expand All @@ -21,7 +51,7 @@ for file in "${data_files[@]}"; do
mkdir -p $BASEDIR/scm/data/$file
cd $BASEDIR/scm/data/$file
echo "Retrieving $file"
wget https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/${file}.tar.gz
wget ${verbose} https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/${file}.tar.gz
tar -xf ${file}.tar.gz
rm -f ${file}.tar.gz
done
Expand Down
32 changes: 31 additions & 1 deletion contrib/get_mg_inccn_data.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
#!/bin/bash

# Function to display help message
print_help() {
echo "get_mg_inccn_data.sh: contrib/get_mg_inccn_data.sh [-v,--verbose]"
echo " Script for downloading/extracting the Morrison-Gettelman data."
echo ""
echo "Options:"
echo " -v, --verbose Turn on wget verbose output."
echo " --help Show this help message and exit."
}

verbose="-nv"
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--help)
print_help
exit 0
;;
-v|--verbose)
verbose="-v"
;;
*)
echo "Unknown option: $1"
print_help
exit 1
;;
esac
shift
done

set -ex

# Directory where this script is located
Expand All @@ -16,7 +46,7 @@ BASEDIR=$MYDIR/..

# Change to directory containing the physics input data, download and extract archive
cd $BASEDIR/scm/data/physics_input_data/
wget https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/MG_INCCN_data.tar.gz
wget ${verbose} https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/MG_INCCN_data.tar.gz
tar -xvf MG_INCCN_data.tar.gz
rm -f MG_INCCN_data.tar.gz
cd $BASEDIR/
Expand Down
33 changes: 32 additions & 1 deletion contrib/get_thompson_tables.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
#!/bin/bash

# Function to display help message
print_help() {
echo "get_thompson_tables.sh: contrib/get_thompson_tables.sh [-v,--verbose]"
echo " Script for downloading/extracting the Thompson lookup tables."
echo ""
echo "Options:"
echo " -v, --verbose Turn on wget verbose output."
echo " --help Show this help message and exit."
}

verbose="-nv"
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--help)
print_help
exit 0
;;
-v|--verbose)
verbose="-v"
;;
*)
echo "Unknown option: $1"
print_help
exit 1
;;
esac
shift
done

set -ex

if [[ $(uname -s) == Darwin ]]; then
Expand All @@ -15,7 +45,8 @@ BASEDIR=$MYDIR/..

# Change to directory containing the physics input data, download and extract archive
cd $BASEDIR/scm/data/physics_input_data/
wget https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/thompson_tables.tar.gz

wget ${verbose} https://github.com/NCAR/ccpp-scm/releases/download/v7.0.0-beta/thompson_tables.tar.gz
tar -xvf thompson_tables.tar.gz
rm -f thompson_tables.tar.gz
cd $BASEDIR/
Expand Down
Loading