[Dart-dev] DART/branches Revision: 13147
dart at ucar.edu
dart at ucar.edu
Wed May 1 14:22:26 MDT 2019
raeder at ucar.edu
2019-05-01 14:22:25 -0600 (Wed, 01 May 2019)
798
repack_st_arch.csh
Added #SBATCH --ignore-pbs
obs_diags.csh
> Rename the date_string variable with yr_mo, to make the contents more clear.
That implies restriction of the contents, but there is no restriction,
so maybe the previous name will end up being preferable. But yr_mo
will be appropriate for the Reanalysis project, which is the motivation
for this script.
> Fixed a bad ending of a foreach, and mishandling of compressed obs_seq files.
mv_to_campaign.csh
Pared/rewritten and tested version.
> It's designed to be callable by repack_st_archive.csh,
or submitted independently as a batch job.
> Instructions for use have been condensed.
> It moves whole directory contents, instead of counting on lists of file names.
> More clean-up and a review are in order.
Modified: DART/branches/reanalysis/models/cam-fv/shell_scripts/cesm2_1/mv_to_campaign.csh
===================================================================
--- DART/branches/reanalysis/models/cam-fv/shell_scripts/cesm2_1/mv_to_campaign.csh 2019-05-01 20:20:32 UTC (rev 13146)
+++ DART/branches/reanalysis/models/cam-fv/shell_scripts/cesm2_1/mv_to_campaign.csh 2019-05-01 20:22:25 UTC (rev 13147)
@@ -7,88 +7,98 @@
# DART $Id$
-# Script to package output from a CAM+DART assimilation,
-# especially the Reanalysis project (2019),
-# and send it to Campaign storage.
-# It's derived from ./mv_to_campaign.sample.csh.
+# Script to send output from a CAM+DART assimilation,
+# especially the Reanalysis project (2019), to Campaign storage.
+# >>> Before running this script:
+# 1) (re)package the files into a directory containing only files to be archived.
+# The final subdirectory should be a CESM style date string; YYYY-MM-DD-SSSSS
+# 2) You may need to interactively log in to globus.
+# See https://www2.cisl.ucar.edu/resources/storage-and-file-systems/globus-file-transfers
+# for details.
+# > ssh data-access.ucar.edu
+# (alternative: ssh username at data-access.ucar.edu)
+# > globus login
+# Copy the resulting URL into your browser
+# Log in there to get the access code.
+# Enter the code into the interactive globus prompt.
+
+# This script was derived from ./mv_to_campaign.sample.csh.
# Documentation of that script is in
# https://www2.cisl.ucar.edu/sites/default/files/CISL_GlobusCLI_Nov2018.html
-# To get access to the python globus command it seems necessary
-# to do the following from the command line (not in python):
+if ($#argv == 1) then
-# > module load gnu python (even though the python command is available without loading)
-# > ncar_pylib
-# > globus --help
+ # Request for help; any argument will do.
+ echo "Usage: call by user or script:"
+ echo " mv_to_campaign.csh CASE TIME_STR SRC_DIR CS_DIR"
+ echo ' CASE = CESM $CASE name.'
+ echo " TIME_STR = CESM format time string associated with the data; YYYY-MM-DD-SSSSS"
+ echo " SRC_DIR = the directory to archive in Campaign Storage"
+ echo " CS_DIR = Campaign Storage"
+ exit
-# This will show the commands that can be given to globus, like 'endpoint'
-# The subcommands of 'endpoint', like 'search' can be seen with
+else if ($#argv == 0) then
-# > globus list-commands
+ set CASE = Test_mv_to_globus
+ # set CASE = f.e21.FHIST_BGC.f09_025.CAM6assim.003
+ set TIME_STR = 2019-04-23-91800
+ # set TIME_STR = 2017-01-02-00000
+ set SRC_DIR = /glade/scratch/${USER}/${CASE}/${TIME_STR}
+ # set SRC_DIR = /glade/scratch/${USER}/${CASE}/archive/rest/${TIME_STR}
+ # set SRC_DIR = /glade/p/cisl/dares/Reanalyses/CAM6_2017/${CASE}/archive
+ set CS_DIR = /gpfs/csfs1/cisl/dares/Reanalyses/CAM6_2017/${CASE}
-# But that shows subcommands of all commands. Focus the search with
+else if ($#argv == 4) then
-# > globus [command [subcommand]] --help
-# For example
-# > globus endpoint activate --help
+ set CASE = $1
+ set TIME_STR = $2
+ set SRC_DIR = $3
+ set CS_DIR = $4
-# will show obscura such as --myproxy (below).
+else
+
+ echo "ERROR: This script requires 0, 1, or 4 arguments"
+ exit
+endif
-# >> Add error checking on arguments
-# and a "Usage:" section
+# Done with input parameters.
+#=================================================================
-# Case name
-set CASENAME = "$1"
-# or set these explicitly in here?
-# Depends whether it will be run from another script.
-
-# Set analysis time.
-# But we'll be archiving multiple times at once.
-# But maybe by month, so YYYY-MM would be useful.
-set TIMESTR="$2"
-
-# Need log file time stamp time?
-set STAMP = "$3"
-
# Beware: the label cannot contain slashes. valid chars are only:
# A-Z, a-z, 0-9, space, hyphen, underscore, and comma
# No '.'?
# Max length is 128 chars.
More information about the Dart-dev
mailing list