[Dart-dev] [6080] DART/branches/development/models: These are the cleaned up versions of the scripts.

nancy at ucar.edu nancy at ucar.edu
Wed Apr 24 17:37:30 MDT 2013


Revision: 6080
Author:   thoar
Date:     2013-04-24 17:37:29 -0600 (Wed, 24 Apr 2013)
Log Message:
-----------
These are the cleaned up versions of the scripts.
In some cases, it is just putting SVN keywords at the end of the scripts.
I added the 'set nonomatch' flag to prevent 'rm' from complaining if a 
wildcard does not match anything.

The model assimilate.csh scripts look as much like their counterparts in 
CESM/shell_scripts.

The POP model always starts from a hybrid start because this preserves the 
velocity components. 'cold' starts only read T,S from the restart file.
All other model components start from a cold start. CAM has sourcemods
that make it perpetually read from initial files (i.e. a coldstart).

The cam assimilate.csh scripts still use the xmlchange for the RUN_STARTDATE 
and START_TOD despite the fact they are not used at all for continuations.
Doesn't hurt anything.

The CESM start should be a hybrid start so that POP gets the velocity 
components. The CESM setups (hybrid or startup) all use (as much as possible) 
the ensemble members from 'the large ensemble 20th century run'. 

Modified Paths:
--------------
    DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh
    DART/branches/development/models/CESM/shell_scripts/CESM_setup_hybrid.csh
    DART/branches/development/models/CESM/shell_scripts/assimilate.csh
    DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh
    DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh
    DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh
    DART/branches/development/models/CESM/work/input.nml
    DART/branches/development/models/POP/shell_scripts/CESM1_1_setup_hybrid.csh
    DART/branches/development/models/POP/shell_scripts/assimilate.csh
    DART/branches/development/models/cam/shell_scripts/CESM_setup_startup.csh
    DART/branches/development/models/cam/shell_scripts/assimilate.csh
    DART/branches/development/models/cam/shell_scripts/st_archive.sh
    DART/branches/development/models/clm/shell_scripts/CESM1_1_setup.csh
    DART/branches/development/models/clm/shell_scripts/assimilate.csh
    DART/branches/development/models/clm/shell_scripts/st_archive.sh

Added Paths:
-----------
    DART/branches/development/models/CESM/shell_scripts/st_archive.sh
    DART/branches/development/models/POP/shell_scripts/st_archive.sh

-------------- next part --------------
Modified: DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh	2013-04-24 22:41:46 UTC (rev 6079)
+++ DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -13,7 +13,8 @@
 # This script is designed to configure and build a multi-instance CESM model
 # that has XXX,YYY,ZZZZ as active components
 # and will use DART to assimilate observations at regular intervals.
-# This script does not build DART.
+# This script does not build DART. It works best if the appropriate DART
+# executables have been built, however.
 #
 # This script relies heavily on the information in:
 # http://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/usersguide/book1.html
@@ -63,10 +64,10 @@
 #    script names; so consider it's length and information content.
 # num_instances:  Number of ensemble members
 
-setenv case                 cesm_test
-setenv cesmtag              cesm1_1_1
+setenv case                 cesm_startup
 setenv compset              B_2000_CAM5
 setenv resolution           0.9x1.25_gx1v6
+setenv cesmtag              cesm1_1_1
 setenv num_instances        2
 
 # ==============================================================================
@@ -98,8 +99,13 @@
 
 setenv DARTroot     /glade/u/home/${USER}/svn/DART/dev
 
+set RTM_stagedir = /glade/scratch/thoar/DART_POP_RESTARTS/2004-01-01-00000
+set CLM_stagedir = /glade/scratch/thoar/DART_POP_RESTARTS/CLM_2004-01-01-00000/cesm_test
+set CAM_stagedir = /glade/p/cesm/cseg/inputdata/atm/cam/inic/fv
+set POP_stagedir = /glade/p/work/aliciak/DART_IC/CCSM4_ensembles/rest/2004-01-01-00000
+
 # ==============================================================================
-# configure settings
+# configure settings ... run_startdate format is yyyy-mm-dd
 # ==============================================================================
 
 setenv refyear     2004
@@ -132,7 +138,7 @@
 
 setenv ACCOUNT      P8685nnnn
 setenv timewall     0:30
-setenv queue        small
+setenv queue        regular
 setenv ptile        15
 
 # ==============================================================================
@@ -156,6 +162,7 @@
       set   COPY = '/bin/cp -fv --preserve=timestamps'
       set   LINK = '/bin/ln -fvs'
       set REMOVE = '/bin/rm -fr'
+      set nonomatch
 
    breaksw
 endsw
@@ -219,7 +226,9 @@
 
 # Save a copy for debug purposes
 foreach FILE ( *xml )
-   ${COPY} $FILE ${FILE}.original
+   if ( ~ -e        ${FILE}.original ) then
+      ${COPY} $FILE ${FILE}.original
+   endif
 end
 
    # This is only for the purpose of debugging the code.
@@ -235,7 +244,7 @@
    @ glc_root = $lnd_pes + $ice_pes
    @ rof_root = $lnd_pes + $ice_pes + $glc_pes
 
-echo "task partitioning ... atm+ocn // lnd+ice+glc+rof"
+#echo "task partitioning ... atm+ocn // lnd+ice+glc+rof"
 echo ""
 echo "ATM  gets $atm_pes"
 echo "CPL  gets $cpl_pes"
@@ -264,12 +273,12 @@
 ./xmlchange NTHRDS_ROF=1,NTASKS_ROF=$rof_pes,NINST_ROF=$num_instances
 ./xmlchange NTHRDS_OCN=1,NTASKS_OCN=$ocn_pes,NINST_OCN=$num_instances
 ./xmlchange ROOTPE_ATM=0
-./xmlchange ROOTPE_OCN=$atm_pes
+./xmlchange ROOTPE_OCN=0
 ./xmlchange ROOTPE_CPL=0
 ./xmlchange ROOTPE_LND=0
-./xmlchange ROOTPE_ICE=$lnd_pes
-./xmlchange ROOTPE_GLC=$glc_root
-./xmlchange ROOTPE_ROF=$rof_root
+./xmlchange ROOTPE_ICE=0
+./xmlchange ROOTPE_GLC=0
+./xmlchange ROOTPE_ROF=0
 
 # http://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/usersguide/c1158.html#run_start_stop
 # "A hybrid run indicates that CESM is initialized more like a startup, but uses
@@ -288,6 +297,9 @@
 ./xmlchange RUN_TYPE=startup
 ./xmlchange RUN_STARTDATE=$run_refdate
 ./xmlchange START_TOD=$run_reftod
+./xmlchange RUN_REFDATE=$run_refdate
+./xmlchange RUN_REFTOD=$run_reftod
+./xmlchange GET_REFCASE=FALSE
 ./xmlchange EXEROOT=${exeroot}
 
 ./xmlchange CALENDAR=GREGORIAN
@@ -296,7 +308,7 @@
 ./xmlchange STOP_N=$stop_n
 ./xmlchange CONTINUE_RUN=FALSE
 ./xmlchange RESUBMIT=$resubmit
-#./xmlchange PIO_TYPENAME=pnetcdf
+./xmlchange PIO_TYPENAME=pnetcdf
 
 ./xmlchange CLM_CONFIG_OPTS='-bgc cn'
 
@@ -309,8 +321,8 @@
 
 # level of debug output, 0=minimum, 1=normal, 2=more, 3=too much, valid values: 0,1,2,3 (integer)
 
-./xmlchange DEBUG=TRUE
-./xmlchange INFO_DBUG=2
+./xmlchange DEBUG=FALSE
+./xmlchange INFO_DBUG=0
 
 # ==============================================================================
 # Set up the case.
@@ -332,9 +344,10 @@
 while ($inst <= $num_instances)
 
    set instance  = `printf %04d $inst`
+   set instance2 = `printf %02d $inst`
 
    # ===========================================================================
-   set fname = "user_nl_cam_$instance"
+   set fname = "user_nl_cam_${instance}"
    # ===========================================================================
    # For a HOP TEST ... empty_htapes = .false.
    # For a HOP TEST ... use a default fincl1 
@@ -347,7 +360,7 @@
    echo " mfilt         = 1 "                           >> ${fname}
 
    # ===========================================================================
-   set fname = "user_nl_pop2_$instance"
+   set fname = "user_nl_pop2_${instance}"
    # ===========================================================================
 
    # POP Namelists
@@ -355,12 +368,20 @@
    # init_ts_suboption = 'null'         for 'perfect' restarting/forecasting
    # For a HOP TEST (untested)... tavg_file_freq_opt = 'nmonth' 'nday' 'once'"
 
-   echo "init_ts_suboption = 'null'" >> $fname
+   echo "init_ts_file = 'b40.20th.005_ens${instance2}.pop.r.2004-01-01-00000'" >> $fname
+   echo "init_ts_suboption = 'spunup'" >> $fname
 
    # ===========================================================================
-   set fname = "user_nl_clm_$instance"
+   set fname = "user_nl_cice_${instance}"
    # ===========================================================================
+   # CICE Namelists
    
+   echo "ice_ic = 'b40.20th.005_ens${instance2}.cice.r.2004-01-01-00000.nc'" >> $fname
+
+   # ===========================================================================
+   set fname = "user_nl_clm_${instance}"
+   # ===========================================================================
+   
    # Customize the land namelists
    # The history tapes are a work in progress. If you write out the instantaneous
    # flux variables every 30 minutes to the .h1. file, the forward observation
@@ -368,7 +389,10 @@
    # than trying to create them from the (incomplete DART) CLM state.
    # For a HOP TEST ... hist_empty_htapes = .false.
    # For a HOP TEST ... use a default hist_fincl1 
+   #
+   # old ... stagedir = /glade/scratch/afox/bptmp/MD_40_PME/run/MD_40_PME
 
+   echo "finidat = '${CLM_stagedir}.clm2_${instance}.r.${run_refdate}-${run_reftod}.nc'" >> $fname
    echo "hist_empty_htapes = .true."                 >> $fname
    echo "hist_fincl1 = 'NEP'"                        >> $fname
    echo "hist_fincl2 = 'NEP','FSH','EFLX_LH_TOT_R'"  >> $fname
@@ -376,6 +400,13 @@
    echo "hist_mfilt  = 1,48"                         >> $fname
    echo "hist_avgflag_pertape = 'A','A'"             >> $fname
 
+   # ===========================================================================
+   set fname = "user_nl_rtm_${instance}"
+   # ===========================================================================
+   # RIVER RUNOFF CAN START FROM AN OLD CLM RESTART FILE
+
+   echo "finidat_rtm = 'b40.20th.005_ens${instance2}.clm2.r.${run_refdate}-${run_reftod}.nc'" >> $fname
+
    @ inst ++
 end
 
@@ -424,23 +455,33 @@
 # initial files come from.
 # ==============================================================================
 
-set stagedir = /glade/p/cesm/cseg/inputdata/atm/cam/inic/fv
+cd ${rundir}
 
 echo ''
-echo "Copying the restart files from ${stagedir}"
+echo "Linking the restart files from the staging directories"
 echo 'into the CESM run directory.'
 echo ''
 
 @ inst = 1
 while ($inst <= $num_instances)
-   set instance  = `printf %04d $inst`
+   set n4 = `printf %04d $inst`
+   set n2 = `printf %02d $inst`
 
    echo ''
    echo "Staging restarts for instance $inst of $num_instances"
 
-   ${COPY} ${stagedir}/cami-mam3_0000-01-01_0.9x1.25_L30_c100618.nc \
-             ${rundir}/cam_initial_${instance}.nc
+   ${LINK} ${CAM_stagedir}/cami-mam3_0000-01-01_0.9x1.25_L30_c100618.nc      cam_initial_${n4}.nc
 
+   ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.pop.r.2004-01-01-00000      .
+   ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.pop.r.2004-01-01-00000.hdr  .
+   ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.cice.r.2004-01-01-00000.nc  .
+   ${LINK} ${RTM_stagedir}/b40.20th.005_ens${n2}.clm2.r.2004-01-01-00000.nc  .
+
+#  ${LINK} ${POP_stagedir}/rpointer.ocn_${n4}.restart                       ${rundir}
+#  ${LINK} ${POP_stagedir}/rpointer.ocn_${n4}.ovf                           ${rundir}
+#  ${LINK} ${POP_stagedir}/rpointer.ice_${n4}                               ${rundir}
+#  ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.pop.ro.2004-01-01-00000    ${rundir}
+#
    @ inst ++
 end
 
@@ -448,11 +489,15 @@
 # Edit the run script to reflect project, queue, and wallclock
 # ==============================================================================
 
+cd ${caseroot}
+
 echo ''
 echo 'Updating the run script to set wallclock and queue.'
 echo ''
 
-${COPY} ${case}.run ${case}.run.orig
+if ( ~ -e  ${case}.run.original ) then
+   ${COPY} ${case}.run ${case}.run.original
+endif
 
 source Tools/ccsm_getenv
 set BATCH = `echo $BATCHSUBMIT | sed 's/ .*$//'`
@@ -542,7 +587,12 @@
    tail -n $lastlines ${case}.run    >> temp.$$
 
    ${MOVE} temp.$$ ${case}.run
+   ${REMOVE} add_to_run.txt
 
+else
+   echo "ERROR in grep of ${case}.run: aborting"
+   echo "status was ${STATUSCHECK}"
+   exit -6
 endif
 
 chmod 0744 ${case}.run
@@ -555,9 +605,9 @@
 # to archive addtional or subsets of things, or to reduce the amount of
 # data that is sent to the long-term archive.  Put a version of st_archive.sh
 # in  ${DARTroot}/models/CESM/shell_scripts when/if necessary
-#
-if ( ~ -e  Tools/st_archive.sh.orig ) then
-   ${MOVE} Tools/st_archive.sh      Tools/st_archive.sh.orig
+
+if ( ~ -e  Tools/st_archive.sh.original ) then
+   ${COPY} Tools/st_archive.sh Tools/st_archive.sh.original
 else
    echo "a Tools/st_archive.sh backup copy already exists"
 endif
@@ -625,3 +675,10 @@
 echo "CaseDocs or ${rundir} directories."
 echo ''
 
+exit 0
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+

Modified: DART/branches/development/models/CESM/shell_scripts/CESM_setup_hybrid.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/CESM_setup_hybrid.csh	2013-04-24 22:41:46 UTC (rev 6079)
+++ DART/branches/development/models/CESM/shell_scripts/CESM_setup_hybrid.csh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -64,11 +64,11 @@
 #    script names; so consider it's length and information content.
 # num_instances:  Number of ensemble members
 
-setenv case                 cesm_hybrid0
+setenv case                 cesm_hybrid
 setenv compset              B_2000_CAM5
 setenv resolution           0.9x1.25_gx1v6
 setenv cesmtag              cesm1_1_1
-setenv num_instances        2
+setenv num_instances        30
 
 # ==============================================================================
 # define machines and directories
@@ -136,9 +136,9 @@
 # TJH: How many T62_gx1v6 CESM instances can fit on 1 node?
 # ==============================================================================
 
-setenv ACCOUNT      P86850054
-setenv timewall     4:00
-setenv queue        small
+setenv ACCOUNT      P8685nnnn
+setenv timewall     0:30
+setenv queue        regular
 setenv ptile        15
 
 # ==============================================================================
@@ -231,6 +231,8 @@
    endif
 end
 
+if ( $num_instances < 10) then
+
    # This is only for the purpose of debugging the code.
    # A more efficient layout must be found
    @ atm_pes = $ptile * $num_instances * 4
@@ -241,9 +243,21 @@
    @ rof_pes = $ptile * $num_instances
    @ cpl_pes = $ptile * 4
 
-   @ glc_root = $lnd_pes + $ice_pes
-   @ rof_root = $lnd_pes + $ice_pes + $glc_pes
+else
 
+   # This is only for the purpose of debugging the code.
+   # A more efficient layout must be found
+   #
+   @ atm_pes = $ptile * $num_instances * 2
+   @ ocn_pes = $ptile * $num_instances * 2
+   @ lnd_pes = $ptile * $num_instances * 2
+   @ ice_pes = $ptile * $num_instances
+   @ glc_pes = $ptile * $num_instances
+   @ rof_pes = $ptile * $num_instances
+   @ cpl_pes = $ptile * $num_instances
+
+endif
+
 #echo "task partitioning ... atm+ocn // lnd+ice+glc+rof"
 echo ""
 echo "ATM  gets $atm_pes"
@@ -255,16 +269,6 @@
 echo "OCN  gets $ocn_pes"
 echo ""
 
-#   total number of hw pes = 240
-#   cpl hw pe range ~ from 0 to 59
-#   cam hw pe range ~ from 0 to 119
-#   pop2 hw pe range ~ from 120 to 239
-#   clm hw pe range ~ from 0 to 59
-#   cice hw pe range ~ from 60 to 89
-#   sglc hw pe range ~ from 90 to 119
-#   rtm hw pe range ~ from 120 to 149
-#   TJH FIXME ... CLM could use a lot more processors.
-
 ./xmlchange NTHRDS_CPL=1,NTASKS_CPL=$cpl_pes
 ./xmlchange NTHRDS_GLC=1,NTASKS_GLC=$glc_pes,NINST_GLC=1
 ./xmlchange NTHRDS_ATM=1,NTASKS_ATM=$atm_pes,NINST_ATM=$num_instances
@@ -312,7 +316,7 @@
 
 ./xmlchange CLM_CONFIG_OPTS='-bgc cn'
 
-./xmlchange DOUT_S=FALSE
+./xmlchange DOUT_S=TRUE
 ./xmlchange DOUT_S_ROOT=${archdir}
 ./xmlchange DOUT_S_SAVE_INT_REST_FILES=FALSE
 ./xmlchange DOUT_L_MS=FALSE
@@ -347,7 +351,7 @@
    set instance2 = `printf %02d $inst`
 
    # ===========================================================================
-   set fname = "user_nl_cam_$instance"
+   set fname = "user_nl_cam_${instance}"
    # ===========================================================================
    # For a HOP TEST ... empty_htapes = .false.
    # For a HOP TEST ... use a default fincl1 
@@ -360,25 +364,28 @@
    echo " mfilt         = 1 "                           >> ${fname}
 
    # ===========================================================================
-   set fname = "user_nl_pop2_$instance"
+   set fname = "user_nl_pop2_${instance}"
    # ===========================================================================
 
    # POP Namelists
    # init_ts_suboption = 'data_assim'   for non bit-for-bit restarting (assimilation mode)
-   # init_ts_suboption = 'null'         for 'perfect' restarting/forecasting
+   # init_ts_suboption = 'rest'         for
+   # init_ts_suboption = 'spunup'       for 
+   # init_ts_suboption = 'null'         for 
    # For a HOP TEST (untested)... tavg_file_freq_opt = 'nmonth' 'nday' 'once'"
+   # For a HOP TEST ... cool to have restart files every day, not just for end.
 
    echo "init_ts_suboption = 'null'" >> $fname
 
    # ===========================================================================
-   set fname = "user_nl_cice_$instance"
+   set fname = "user_nl_cice_${instance}"
    # ===========================================================================
    # CICE Namelists
    
-   echo "ice_ic = 'b40.20th.005_ens$instance2.cice.r.2004-01-01-00000.nc'" >> $fname
+   echo "ice_ic = 'b40.20th.005_ens${instance2}.cice.r.2004-01-01-00000.nc'" >> $fname
 
    # ===========================================================================
-   set fname = "user_nl_clm_$instance"
+   set fname = "user_nl_clm_${instance}"
    # ===========================================================================
    
    # Customize the land namelists
@@ -391,7 +398,7 @@
    #
 #  set CLM_stagedir = /glade/scratch/afox/bptmp/MD_40_PME/run/MD_40_PME
 
-   echo "finidat = '${CLM_stagedir}.clm2_$instance.r.${run_refdate}-${run_reftod}.nc'" >> $fname
+   echo "finidat = '${CLM_stagedir}.clm2_${instance}.r.${run_refdate}-${run_reftod}.nc'" >> $fname
    echo "hist_empty_htapes = .true."                 >> $fname
    echo "hist_fincl1 = 'NEP'"                        >> $fname
    echo "hist_fincl2 = 'NEP','FSH','EFLX_LH_TOT_R'"  >> $fname
@@ -400,7 +407,7 @@
    echo "hist_avgflag_pertape = 'A','A'"             >> $fname
 
    # ===========================================================================
-   set fname = "user_nl_rtm_$instance"
+   set fname = "user_nl_rtm_${instance}"
    # ===========================================================================
    # RIVER RUNOFF CAN START FROM AN OLD CLM RESTART FILE
 
@@ -481,12 +488,13 @@
    echo "Staging restarts for instance $inst of $num_instances"
 
    ${LINK} ${CAM_stagedir}/cami-mam3_0000-01-01_0.9x1.25_L30_c100618.nc      cam_initial_${n4}.nc
-#  ${LINK} ${CLM_stagedir}.clm2_$instance.r.${run_refdate}-${run_reftod}.nc  .
    ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.pop.r.2004-01-01-00000      .
    ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.pop.r.2004-01-01-00000.hdr  .
    ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.pop.ro.2004-01-01-00000     .
    ${LINK} ${POP_stagedir}/b40.20th.005_ens${n2}.cice.r.2004-01-01-00000.nc  .
+
 #  ${LINK} ${RTM_stagedir}/b40.20th.005_ens${n2}.clm2.r.2004-01-01-00000.nc  .
+#  ${LINK} ${CLM_stagedir}.clm2_$instance.r.${run_refdate}-${run_reftod}.nc  .
 
    echo "cam_initial_${n4}.nc"                                         >! rpointer.atm_${n4}
 #  echo "${stagedir}.clm2_$instance.r.${run_refdate}-${run_reftod}.nc" >! rpointer.lnd_${n4}
@@ -560,7 +568,7 @@
 
 grep 'SUCCESSFUL TERMINATION' $CplLogFile
 if ( $status == 0 ) then
-#  ${CASEROOT}/assimilate.csh
+   ${CASEROOT}/assimilate.csh
 
    if ( $status == 0 ) then
       echo "`date` -- DART HAS FINISHED"
@@ -627,7 +635,7 @@
    echo "a Tools/st_archive.sh backup copy already exists"
 endif
 
-# ${COPY} ${DARTroot}/models/CESM/shell_scripts/st_archive.sh   Tools/ TJH DEBUG
+${COPY} ${DARTroot}/models/CESM/shell_scripts/st_archive.sh       Tools/.
 ${COPY} ${DARTroot}/models/CESM/shell_scripts/assimilate.csh          assimilate.csh
 ${COPY} ${DARTroot}/models/CESM/shell_scripts/cam_assimilate.csh  cam_assimilate.csh
 ${COPY} ${DARTroot}/models/CESM/shell_scripts/pop_assimilate.csh  pop_assimilate.csh
@@ -666,10 +674,8 @@
 echo "Time to check the case."
 echo ''
 echo "cd into ${caseroot}"
-
-
-echo "1) edit ${caseroot}/Buildconf/clm.buildnml.csh line 86 ... remove 'hybrid'"
-echo "2) comment out line 36 of  ${caseroot}/Buildconf/rtm.buildnml.csh"
+echo "1) edit ${caseroot}/Buildconf/clm.buildnml.csh ... remove 'hybrid' portion of line 86"
+echo "2) edit ${caseroot}/Buildconf/rtm.buildnml.csh ... comment out line 36"
 echo ''
 echo "Modify what you like in input.nml, make sure the observation directory"
 echo "names set in assimilate.csh match those on your system, and submit"
@@ -695,3 +701,10 @@
 echo "CaseDocs or ${rundir} directories."
 echo ''
 
+exit 0
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+

Modified: DART/branches/development/models/CESM/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/assimilate.csh	2013-04-24 22:41:46 UTC (rev 6079)
+++ DART/branches/development/models/CESM/shell_scripts/assimilate.csh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -20,3 +20,8 @@
 
 exit 0
 
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+

Modified: DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh	2013-04-24 22:41:46 UTC (rev 6079)
+++ DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -35,6 +35,7 @@
       set   COPY = 'cp -fv --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
+      set nonomatch
 
       set BASEOBSDIR = /glade/p/image/Observations/ACARS
       set DARTDIR    = ${HOME}/svn/DART/dev
@@ -47,6 +48,7 @@
       set   COPY = 'cp -fv --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
+      set nonomatch
 
       set BASEOBSDIR = /scratch/scratchdirs/nscollin/ACARS
       set DARTDIR    = ${HOME}/devel

Modified: DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh	2013-04-24 22:41:46 UTC (rev 6079)
+++ DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -35,6 +35,7 @@
       set   COPY = 'cp -fv --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
+      set nonomatch
 
       set BASEOBSDIR = /glade/p/image/Observations/FluxTower
       set DARTDIR    = ${HOME}/svn/DART/dev
@@ -47,6 +48,7 @@
       set   COPY = 'cp -fv --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
+      set nonomatch
 
       set BASEOBSDIR = /scratch/scratchdirs/nscollin/ACARS
       set DARTDIR    = ${HOME}/devel

Modified: DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh	2013-04-24 22:41:46 UTC (rev 6079)
+++ DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -35,6 +35,7 @@
       set   COPY = 'cp -fv --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
+      set nonomatch
 
       set BASEOBSDIR = /glade/p/image/Observations/WOD09
       set DARTDIR    = ${HOME}/svn/DART/dev
@@ -47,6 +48,7 @@
       set   COPY = 'cp -fv --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
+      set nonomatch
 
       set BASEOBSDIR = /scratch/scratchdirs/nscollin/ACARS
       set DARTDIR    = ${HOME}/devel

Added: DART/branches/development/models/CESM/shell_scripts/st_archive.sh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/st_archive.sh	                        (rev 0)
+++ DART/branches/development/models/CESM/shell_scripts/st_archive.sh	2013-04-24 23:37:29 UTC (rev 6080)
@@ -0,0 +1,310 @@
+#!/bin/sh
+
+#short-term archive script - move model output out of run directory
+#to free disc space for next invocation of model run
+#must be executed from run directory
+
+#function dispose:
+#moves output files to specified area of st archive and will
+#process interim files along the way:
+#arg1 => interim files flag
+#arg2 => destination
+#remaining args => actual files to be processed
+dispose() {
+    if [ "$1" == "ifiles_y" ] && [ "$DOUT_S_SAVE_INT_REST_FILES" != "TRUE" ]; then
+	shift
+	shift
+	rm $*       2> /dev/null
+    else
+	shift
+	dest=$1
+	mkdir -p $dest
+	shift
+	mv $* $dest 2> /dev/null
+    fi
+}
+
+#function get_inst_suffix:
+#Gets a string corresponding to the current instance index of a given
+#component, with a leading '.'; this can be appended to a file name.
+#In the general case, the returned string is something like ".###",
+#but if there is only a single instance of the given component, then
+#the returned string is empty, because in that case the file names
+#don't have any instance number (or the associated extra '_').
+#
+#arg1 => instance index for a given component
+#arg2 => number of instances of this component
+#
+#result is returned in $inst_suffix
+get_inst_suffix() {
+#   echo "get_inst_suffixa $1 $2 ${inst_suffix}"
+    if [ $2 -eq 1 ]; then   # only one instance of this component
+	inst_suffix=""
+    else                    # multiple instances of this component
+        inst_suffix=`printf _%04d $1`
+    fi
+#   echo "get_inst_suffixb $1 $2 ${inst_suffix}"
+}
+
+echo ""
+echo "st_archive.sh: start of short-term archiving"
+
+#validate required env var settings
+if [ -z "$DOUT_S_ROOT" ]; then
+    echo "st_archive.sh: error, environment variable DOUT_S_ROOT is required "
+    echo "               for root location of short-term archive"
+    echo "st_archive.sh: exiting"
+    exit 1
+fi
+
+sta=${DOUT_S_ROOT}/.sta-$$-`date +%Y%m%d%H%M%S%N`
+mkdir -p ${sta} 2> /dev/null
+
+if [ $? -ne 0 ]; then
+    echo "st_archive.sh: error, unable to create short-term archive directory"
+    echo "st_archive.sh: exiting"
+    exit 1
+fi
+mv ${DOUT_S_ROOT}/* ${sta}
+
+if [ -z "$DOUT_S_SAVE_INT_REST_FILES" ]; then
+    echo "st_archive.sh: warning, environment variable DOUT_S_SAVE_INT_REST_FILES is not "
+    echo "               set - using "FALSE" as default for saving interim restart files"
+    export DOUT_S_SAVE_INT_REST_FILES=FALSE
+fi
+
+if [ "$DOUT_S_SAVE_INT_REST_FILES" == "FALSE" ]; then
+    echo "st_archive.sh: restart files from end of run will be saved, "
+    echo "               interim restart files will be deleted"
+fi
+
+## Check component instance counts
+
+if [ -z "$NINST_ATM" ]; then
+    echo "st_archive.sh: warning, NINST_ATM not set -- using 1 instance"
+    export NINST_ATM=1
+fi
+
+if [ -z "$NINST_LND" ]; then
+    echo "st_archive.sh: warning, NINST_LND not set -- using 1 instance"
+    export NINST_LND=1
+fi
+
+if [ -z "$NINST_ICE" ]; then
+    echo "st_archive.sh: warning, NINST_ICE not set -- using 1 instance"
+    export NINST_ICE=1
+fi
+
+if [ -z "$NINST_OCN" ]; then
+    echo "st_archive.sh: warning, NINST_OCN not set -- using 1 instance"
+    export NINST_OCN=1
+fi
+
+if [ -z "$NINST_GLC" ]; then
+    echo "st_archive.sh: warning, NINST_GLC not set -- using 1 instance"
+    export NINST_GLC=1
+fi
+
+#create directory for restart files
+set ${CASE}.cpl.r.*
+cplfile=`ls -rt $* 2> /dev/null | tail -1`
+dname=`echo $cplfile | sed "s/\.nc//; s/^.*\.r\.//;"`
+if [ -d ${sta}/rest/${dname} ]; then
+    rm -rf ${sta}/rest/${dname}
+fi
+mkdir -p ${sta}/rest/${dname}
+if [ $? -ne 0 ]; then
+    echo "st_archive.sh: error, unable to create rest directory"
+    echo "st_archive.sh: exiting"
+    exit 1
+fi
+
+#populate temp directory with pointer files
+set rpointer.*
+if [ $# -le 0 ]; then
+    echo "st_archive.sh: error, script should be invoked from run directory..."
+    echo "               expecting restart pointer files of the form 'rpointer.<component>'"
+    echo "               but did not find any: $*"
+    echo "st_archive.sh: exiting"
+    exit 1
+fi
+mv $* ${sta}/rest/${dname}
+
+set cpl.log.*;                                                                                                        dispose ifiles_n ${sta}/cpl/logs $*
+set ccsm*.log.*;                                                                                                      dispose ifiles_n ${sta}/cpl/logs $*
+set ${CASE}.cpl.r.*;         latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/cpl/rest $*
+set ${CASE}.cpl.h* ;                                                                                                  dispose ifiles_n ${sta}/cpl/hist $*
+
+
+# TJH FIXME possible tweaking - remove assimilate_dir/member_* directories? anything else?
+set assimilate_???/*/*dart_log.*;                                                                                     dispose ifiles_n ${sta}/dart/logs $*
+set assimilate_???/*/output.*;                                                                                        dispose ifiles_n ${sta}/dart/logs $*
+set *dart_log.*;                                                                                                      dispose ifiles_n ${sta}/dart/logs $*
+set *True_State.*.nc;                                                                                                 dispose ifiles_n ${sta}/dart/hist $*
+set *Prior_Diag.*.nc;                                                                                                 dispose ifiles_n ${sta}/dart/hist $*
+set *Posterior_Diag.*.nc;                                                                                             dispose ifiles_n ${sta}/dart/hist $*
+set *obs_seq.*.out;                                                                                                   dispose ifiles_n ${sta}/dart/hist $*
+set *obs_seq.*.final;                                                                                                 dispose ifiles_n ${sta}/dart/hist $*
+set *pr*inflate_restart*;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null;   dispose ifiles_n ${sta}/dart/rest $*
+set *po*inflate_restart*;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null;   dispose ifiles_n ${sta}/dart/rest $*
+
+
+IDX=1
+while [ $IDX -le $NINST_ATM ]
+do
+    get_inst_suffix $IDX $NINST_ATM
+    set atm${inst_suffix}.log.*;                                                                                                   dispose ifiles_n ${sta}/atm/logs $*
+#   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}.cam*${inst_suffix}.r.*;   latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rs.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.ra.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rh0.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rh1.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rh2.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rh3.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rh4.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.rh5.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.cam*${inst_suffix}.h0.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.h1.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.h2.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.h3.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.h4.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.h5.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.hs.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.cam*${inst_suffix}.i.*;   latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/init $*
+    set ${CASE}.datm${inst_suffix}.r.* ;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.datm${inst_suffix}.rs* ;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.datm${inst_suffix}.h.* ;                                                                                           dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.r01.*;                latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.wrf.r02.*;                latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.wrf.r03.*;                latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/atm/rest $*
+    set ${CASE}.wrf.h01.*;                                                                                                         dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h02.*;                                                                                                         dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h03.*;                                                                                                         dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h1aux01.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h1aux02.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h1aux03.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h2aux01.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h2aux02.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h2aux03.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h3aux01.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h3aux02.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+    set ${CASE}.wrf.h3aux03.*;                                                                                                     dispose ifiles_n ${sta}/atm/hist $*
+ 
+    IDX=`expr $IDX + 1`
+done
+
+
+IDX=1
+while [ $IDX -le $NINST_LND ]
+do
+    get_inst_suffix $IDX $NINST_LND
+    set lnd${inst_suffix}.log.*;                                                                                                   dispose ifiles_n ${sta}/lnd/logs $*
+    set ${CASE}.clm?${inst_suffix}.r.*;   latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.rh0.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.rh1.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.rh2.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.rh3.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.rh4.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.rh5.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.clm?${inst_suffix}.h0.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.h1.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.h2.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.h3.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.h4.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.h5.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.hv.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/lnd/hist $*
+    set ${CASE}.clm?${inst_suffix}.i.*;                                                                                            dispose ifiles_y ${sta}/lnd/init $*
+    set ${CASE}.dlnd${inst_suffix}.r.* ;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.dlnd${inst_suffix}.rs* ;  latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/lnd/rest $*
+    set ${CASE}.dlnd${inst_suffix}.h.* ;                                                                                           dispose ifiles_n ${sta}/lnd/hist $*
+    IDX=`expr $IDX + 1`
+done
+
+
+IDX=1
+while [ $IDX -le $NINST_ROF ]
+do
+    get_inst_suffix $IDX $NINST_ROF
+    set rof${inst_suffix}.log.*;                                                                                                  dispose ifiles_n ${sta}/rof/logs $*
+    set ${CASE}.rtm${inst_suffix}.r.*;   latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/rof/rest $*
+    set ${CASE}.rtm${inst_suffix}.rh0.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/rof/rest $*
+    set ${CASE}.rtm${inst_suffix}.rh1.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/rof/rest $*
+    set ${CASE}.rtm${inst_suffix}.rh2.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/rof/rest $*
+    set ${CASE}.rtm${inst_suffix}.rh3.*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/rof/rest $*
+    set ${CASE}.rtm${inst_suffix}.h0.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/rof/hist $*
+    set ${CASE}.rtm${inst_suffix}.h1.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/rof/hist $*
+    set ${CASE}.rtm${inst_suffix}.h2.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/rof/hist $*
+    set ${CASE}.rtm${inst_suffix}.h3.*;  latest=`ls -rt $* 2> /dev/null | tail -1`; cp $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_n ${sta}/rof/hist $*
+    IDX=`expr $IDX + 1`
+done
+
+
+IDX=1
+while [ $IDX -le $NINST_ICE ]
+do
+    get_inst_suffix $IDX $NINST_ICE
+    set ice${inst_suffix}.log.*;                                                                                                      dispose ifiles_n ${sta}/ice/logs $*
+    set ${CASE}.cice${inst_suffix}.r.[0-9]*; latest=`ls -rt $* 2> /dev/null | tail -1`; mv $latest ${sta}/rest/${dname} 2> /dev/null; dispose ifiles_y ${sta}/ice/rest $*

@@ Diff output truncated at 40000 characters. @@


More information about the Dart-dev mailing list