[Dart-dev] DART/branches Revision: 13180

dart at ucar.edu dart at ucar.edu
Thu Jun 6 14:05:12 MDT 2019


thoar at ucar.edu
2019-06-06 14:05:12 -0600 (Thu, 06 Jun 2019)
71
Removed the 'force' from the link/copy so we can use the error codes.




Modified: DART/branches/cesm_clm/models/clm/shell_scripts/cesm1_x/assimilate.csh
===================================================================
--- DART/branches/cesm_clm/models/clm/shell_scripts/cesm1_x/assimilate.csh	2019-06-06 16:34:05 UTC (rev 13179)
+++ DART/branches/cesm_clm/models/clm/shell_scripts/cesm1_x/assimilate.csh	2019-06-06 20:05:12 UTC (rev 13180)
@@ -21,7 +21,7 @@
    case be*:
       # NCAR "bluefire"
       set   MOVE = '/usr/local/bin/mv -fv'
-      set   COPY = '/usr/local/bin/cp -fv --preserve=timestamps'
+      set   COPY = '/usr/local/bin/cp -v --preserve=timestamps'
       set   LINK = '/usr/local/bin/ln -vs'
       set REMOVE = '/usr/local/bin/rm -fr'
 
@@ -31,7 +31,7 @@
    case ys*:
       # NCAR "yellowstone"
       set   MOVE = 'mv -fv'
-      set   COPY = 'cp -fv --preserve=timestamps'
+      set   COPY = 'cp -v --preserve=timestamps'
       set   LINK = 'ln -vs'
       set REMOVE = 'rm -fr'
       set TASKS_PER_NODE = `echo $LSB_SUB_RES_REQ | sed -ne '/ptile/s#.*\[ptile=\([0-9][0-9]*\)]#\1#p'`
@@ -43,7 +43,7 @@
    case lone*:
       # UT lonestar
       set   MOVE = '/bin/mv -fv'
-      set   COPY = '/bin/cp -fv --preserve=timestamps'
+      set   COPY = '/bin/cp -v --preserve=timestamps'
       set   LINK = '/bin/ln -vs'
       set REMOVE = '/bin/rm -fr'
 
@@ -53,7 +53,7 @@
    case la*:
       # LBNL "lawrencium"
       set   MOVE = 'mv -fv'
-      set   COPY = 'cp -fv --preserve=timestamps'
+      set   COPY = 'cp -v --preserve=timestamps'
       set   LINK = 'ln -vs'
       set REMOVE = 'rm -fr'
       set TASKS_PER_NODE = $MAX_TASKS_PER_NODE
@@ -62,9 +62,9 @@
    breaksw
 
    default:
-      # NERSC "hopper"
+      # all others
       set   MOVE = 'mv -fv'
-      set   COPY = 'cp -fv --preserve=timestamps'
+      set   COPY = 'cp -v --preserve=timestamps'
       set   LINK = 'ln -fvs'
       set REMOVE = 'rm -fr'
 
@@ -132,12 +132,14 @@
 
 echo "`date` -- BEGIN COPY BLOCK"
 
+${REMOVE} input.nml input.nml.$$
+
 if (  -e   ${CASEROOT}/input.nml ) then
-   ${COPY} ${CASEROOT}/input.nml .
+   ${COPY} ${CASEROOT}/input.nml . || exit 3
 else
    echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
    echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
-   exit -2
+   exit 3
 endif
 
 echo "`date` -- END COPY BLOCK"
@@ -205,14 +207,6 @@
 set  PRIOR_TF = `echo $MYSTRING[2] | tr '[:upper:]' '[:lower:]'`
 set  POSTE_TF = `echo $MYSTRING[3] | tr '[:upper:]' '[:lower:]'`
 
-# its a little tricky to remove both styles of quotes from the string.
-
-set  MYSTRING = `grep inf_in_file_name input.nml`
-set  MYSTRING = `echo $MYSTRING | sed -e "s#[=,'\.]# #g"`
-set  MYSTRING = `echo $MYSTRING | sed -e 's#"# #g'`
-set  PRIOR_INF_IFNAME = $MYSTRING[2]
-set  POSTE_INF_IFNAME = $MYSTRING[3]
-
 # IFF we want PRIOR inflation:
 
 if ( $PRIOR_INF > 0 ) then
@@ -221,7 +215,7 @@
       # we are not using an existing inflation file.
       echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
 
-   else if ( -e ../clm_inflation_cookie ) then
+   else if ( -e clm_inflation_cookie ) then
       # We want to use an existing inflation file, but this is
       # the first assimilation so there is no existing inflation
       # file. This is the signal we need to to coerce the namelist
@@ -278,7 +272,7 @@
       # we are not using an existing inflation file.
       echo "inf_flavor(2) = $POSTE_INF, using namelist values."
 
-   else if ( -e ../clm_inflation_cookie ) then
+   else if ( -e clm_inflation_cookie ) then
       # We want to use an existing inflation file, but this is
       # the first assimilation so there is no existing inflation


More information about the Dart-dev mailing list