[Dart-dev] [5507] DART/branches/development/models/cam/shell_scripts/st_archive.sh: Modified the script to use the date-time information from the

nancy at ucar.edu nancy at ucar.edu
Thu Jan 12 20:34:33 MST 2012


Revision: 5507
Author:   thoar
Date:     2012-01-12 20:34:33 -0700 (Thu, 12 Jan 2012)
Log Message:
-----------
Modified the script to use the date-time information from the
Posterior_Diag.YYYY-MM-DD-SSSSS.nc file. It used to get it from the
coupler file but with the proposed changes to NOT write the
coupler restart file, this was a problem and everything piled up
in the archive/rest directory with no unique directory.

Modified Paths:
--------------
    DART/branches/development/models/cam/shell_scripts/st_archive.sh

-------------- next part --------------
Modified: DART/branches/development/models/cam/shell_scripts/st_archive.sh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/st_archive.sh	2012-01-12 23:38:49 UTC (rev 5506)
+++ DART/branches/development/models/cam/shell_scripts/st_archive.sh	2012-01-13 03:34:33 UTC (rev 5507)
@@ -115,9 +115,12 @@
 fi
 
 #create directory for restart files
-set ${CASE}.cpl.r.*
+#set ${CASE}.cpl.r.*
+#cplfile=`ls -rt $* 2> /dev/null | tail -1`
+#dname=`echo $cplfile | sed "s/\.nc//; s/^.*\.r\.//;"`
+set Posterior_Diag.*.nc
 cplfile=`ls -rt $* 2> /dev/null | tail -1`
-dname=`echo $cplfile | sed "s/\.nc//; s/^.*\.r\.//;"`
+dname=`echo "$cplfile" | cut -f2 -d'.'`
 if [ -d ${sta}/rest/${dname} ]; then
     rm -rf ${sta}/rest/${dname}
 fi
@@ -178,7 +181,7 @@
     set ${CASE}.cam${inst_suffix}.h4.*;                                                                                            dispose ifiles_n ${sta}/atm/hist $*
     set ${CASE}.cam${inst_suffix}.h5.*;                                                                                            dispose ifiles_n ${sta}/atm/hist $*
     set ${CASE}.cam${inst_suffix}.hs.*;                                                                                            dispose ifiles_n ${sta}/atm/hist $*
-    set ${CASE}.cam${inst_suffix}.i.*;                                                                                             dispose ifiles_n ${sta}/atm/init $*
+    set ${CASE}.cam${inst_suffix}.i.*;                                                                                             dispose ifiles_n ${sta}/atm/rest $*
     set cam_initial_${IDX}.nc;            latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/rest $*
     set ${CASE}.camice${inst_suffix}.r.*;                                                                                          dispose ifiles_y ${sta}/ice/rest $*
     set ${CASE}.camdom${inst_suffix}.r.*;                                                                                          dispose ifiles_y ${sta}/ocn/rest $*


More information about the Dart-dev mailing list