[Dart-dev] [6302] DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh: fix the scripting to be consistent with the initial script.
nancy at ucar.edu
nancy at ucar.edu
Thu Jul 11 09:56:09 MDT 2013
Revision: 6302
Author: nancy
Date: 2013-07-11 09:56:08 -0600 (Thu, 11 Jul 2013)
Log Message:
-----------
fix the scripting to be consistent with the initial script.
that includes generating a shell script to re-sed the input
namelists when copying over new ones from the dart build dir.
also added missing backslashes in the archive scripts.
Modified Paths:
--------------
DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh
-------------- next part --------------
Modified: DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh 2013-07-11 15:46:41 UTC (rev 6301)
+++ DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh 2013-07-11 15:56:08 UTC (rev 6302)
@@ -809,9 +809,9 @@
# using the variables set in that script
lastarchivedir=\`ls -1dt ${archdir}/.sta2/* | head -n 1\`
-if [[ ! -d $lastarchivedir ]]; then
+if [[ ! -d \$lastarchivedir ]]; then
lastarchivedir=\`ls -1dt ${archdir}/rest/* | head -n 1\`
- if [[ ! -d $lastarchivedir ]]; then
+ if [[ ! -d \$lastarchivedir ]]; then
echo cannot find last archive directory in ${archdir}/.sta2
echo or in ${archdir}/rest. exiting.
exit -1
@@ -853,6 +853,10 @@
#-----
+# ==============================================================================
+# Stage the DART executables in the CESM execution root directory: EXEROOT
+# ==============================================================================
+
cat << EndOfText >! refresh_dart_files.sh
#!/bin/sh
@@ -882,15 +886,15 @@
${COPY} ${DARTroot}/models/CESM/work/filter ${exeroot}/filter_cesm
${COPY} ${DARTroot}/models/CESM/work/input.nml input.nml
+if [[ -x update_namelists.sh ]]; then
+ ./update_namelists.sh
+fi
+
exit 0
EndOfText
chmod 0775 refresh_dart_files.sh
-# ==============================================================================
-# Stage the DART executables in the CESM execution root directory: EXEROOT
-# ==============================================================================
-
./refresh_dart_files.sh
@@ -901,6 +905,14 @@
# setup and before running.
# ==============================================================================
+cat << EndOfText >! update_namelists.sh
+#!/bin/sh
+
+# this script makes certain namelist settings consistent with the number
+# of ensemble members built by the setup script.
+# this script was autogenerated by $0
+# using the variables set in that script
+
# Ensure that the input.nml ensemble size matches the number of instances.
# WARNING: the output files contain ALL ensemble members ==> BIG
@@ -933,6 +945,13 @@
wq
ex_end
+exit 0
+
+EndOfText
+chmod 0775 update_namelists.sh
+
+./update_namelists.sh
+
#=========================================================================
# Stage the files needed for SAMPLING ERROR CORRECTION
#
More information about the Dart-dev
mailing list