[Dart-dev] [6205] DART/branches/development/models: Increased portability by using more robust syntax for 'head' and 'tail'.
nancy at ucar.edu
nancy at ucar.edu
Thu May 30 15:09:13 MDT 2013
Revision: 6205
Author: thoar
Date: 2013-05-30 15:09:12 -0600 (Thu, 30 May 2013)
Log Message:
-----------
Increased portability by using more robust syntax for 'head' and 'tail'.
Using the -n syntax.
Modified Paths:
--------------
DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh
DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh
DART/branches/development/models/NAAPS/shell_scripts/assimilate.csh
DART/branches/development/models/POP/shell_scripts/assimilate.csh
DART/branches/development/models/cam/shell_scripts/assimilate.Fzagar.csh
DART/branches/development/models/cam/shell_scripts/assimilate.csh
DART/branches/development/models/cam/shell_scripts/assimilate.hopper.csh
DART/branches/development/models/cam/shell_scripts/assimilate.ned.csh
DART/branches/development/models/cam/shell_scripts/assimilate.zagar.csh
DART/branches/development/models/clm/shell_scripts/assimilate.csh
-------------- next part --------------
Modified: DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -254,7 +254,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../cam_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../cam_${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -281,7 +281,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../cam_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../cam_${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
Modified: DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -268,7 +268,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../pop_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../pop_${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -295,7 +295,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../pop_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../pop_${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
Modified: DART/branches/development/models/NAAPS/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/NAAPS/shell_scripts/assimilate.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/NAAPS/shell_scripts/assimilate.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -112,7 +112,7 @@
# These files may or may not exist. This causes some complexity.
# So - we look for the 'newest' and use it. And Pray.
- (ls -rt1 ../${FILE}_inflate.*.restart.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${FILE}_inflate.*.restart.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
if ( $nfiles > 0 ) then
Modified: DART/branches/development/models/POP/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/POP/shell_scripts/assimilate.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/POP/shell_scripts/assimilate.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -76,7 +76,7 @@
# Piping stuff through 'bc' strips off any preceeding zeros.
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.ocn_0001.restart`
+set FILE = `head -n 1 ../rpointer.ocn_0001.restart`
set FILE = $FILE:t
set FILE = $FILE:r
set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -239,7 +239,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../pop_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../pop_${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -266,7 +266,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../pop_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../pop_${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -369,7 +369,7 @@
# POP always needs a pop_in and a pop.r.nc to start.
# Lots of ways to get the filename
-set OCN_RESTART_FILENAME = `head -1 ../rpointer.ocn_0001.restart`
+set OCN_RESTART_FILENAME = `head -n 1 ../rpointer.ocn_0001.restart`
${LINK} ../$OCN_RESTART_FILENAME pop.r.nc
${LINK} ../pop2_in_0001 pop_in
Modified: DART/branches/development/models/cam/shell_scripts/assimilate.Fzagar.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/assimilate.Fzagar.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/cam/shell_scripts/assimilate.Fzagar.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -26,7 +26,7 @@
# of the form "./${CASE}.cam_${ensemble_member}.r.2000-01-06-00000.nc"
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.atm_0001`
+set FILE = `head -n 1 ../rpointer.atm_0001`
set FILE = $FILE:t
set FILE = $FILE:r
set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -182,7 +182,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -209,7 +209,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -253,7 +253,7 @@
cd $MYTEMPDIR
set POINTER_FILENAME = `printf rpointer.atm_%04d ${member}`
- set MODEL_RESTART_FILENAME = `head -1 ../../${POINTER_FILENAME}`
+ set MODEL_RESTART_FILENAME = `head -n 1 ../../${POINTER_FILENAME}`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
${LINK} ../../$MODEL_INITIAL_FILENAME caminput.nc
${LINK} ../cam_phis.nc .
@@ -298,7 +298,7 @@
# cam always needs a cam_initial.nc and a cam_history.nc to start.
-set MODEL_RESTART_FILENAME = `head -1 ../rpointer.atm_0001`
+set MODEL_RESTART_FILENAME = `head -n 1 ../rpointer.atm_0001`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
set MODEL_HISTORY_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.h0\.#"`
@@ -362,7 +362,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
@@ -394,7 +394,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
Modified: DART/branches/development/models/cam/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/assimilate.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/cam/shell_scripts/assimilate.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -236,7 +236,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../cam_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../cam_${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -263,7 +263,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../cam_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../cam_${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
Modified: DART/branches/development/models/cam/shell_scripts/assimilate.hopper.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/assimilate.hopper.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/cam/shell_scripts/assimilate.hopper.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -31,7 +31,7 @@
# of the form "./${CASE}.cam_${ensemble_member}.r.2000-01-06-00000.nc"
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.atm_0001`
+set FILE = `head -n 1 ../rpointer.atm_0001`
set FILE = $FILE:t
set FILE = $FILE:r
set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -189,7 +189,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -216,7 +216,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -260,7 +260,7 @@
cd $MYTEMPDIR
set POINTER_FILENAME = `printf rpointer.atm_%04d ${member}`
- set MODEL_RESTART_FILENAME = `head -1 ../../${POINTER_FILENAME}`
+ set MODEL_RESTART_FILENAME = `head -n 1 ../../${POINTER_FILENAME}`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
${LINK} ../../$MODEL_INITIAL_FILENAME caminput.nc
${LINK} ../cam_phis.nc .
@@ -305,7 +305,7 @@
# cam always needs a cam_initial.nc and a cam_history.nc to start.
-set MODEL_RESTART_FILENAME = `head -1 ../rpointer.atm_0001`
+set MODEL_RESTART_FILENAME = `head -n 1 ../rpointer.atm_0001`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
set MODEL_HISTORY_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.h0\.#"`
@@ -379,7 +379,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
Modified: DART/branches/development/models/cam/shell_scripts/assimilate.ned.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/assimilate.ned.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/cam/shell_scripts/assimilate.ned.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -32,7 +32,7 @@
# of the form "./${CASE}.cam_${ensemble_member}.r.2000-01-06-00000.nc"
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.atm_0001`
+set FILE = `head -n 1 ../rpointer.atm_0001`
set FILE = $FILE:t
set FILE = $FILE:r
set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -102,7 +102,7 @@
# input.nml:&assim_tools_nml:sampling_error_correction = .true.,
#-------------------------------------------------------------------------
-set MYSTRING = `grep -A 50 \&assim_tools_nml input.nml | grep sampling_error_correction | head -1`
+set MYSTRING = `grep -A 50 \&assim_tools_nml input.nml | grep sampling_error_correction | head -n 1`
set SECSTRING = `echo $MYSTRING | sed -e "s#.*= *\.\(.*\)\..*#.\1.#" | tr 'A-Z' 'a-z'`
if ( $SECSTRING == ".true." ) then
@@ -195,7 +195,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -222,7 +222,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -266,7 +266,7 @@
cd $MYTEMPDIR
set POINTER_FILENAME = `printf rpointer.atm_%04d ${member}`
- set MODEL_RESTART_FILENAME = `head -1 ../../${POINTER_FILENAME}`
+ set MODEL_RESTART_FILENAME = `head -n 1 ../../${POINTER_FILENAME}`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
${LINK} ../../$MODEL_INITIAL_FILENAME caminput.nc
${LINK} ../cam_phis.nc .
@@ -317,7 +317,7 @@
# cam always needs a cam_initial.nc and a cam_history.nc to start.
-set MODEL_RESTART_FILENAME = `head -1 ../rpointer.atm_0001`
+set MODEL_RESTART_FILENAME = `head -n 1 ../rpointer.atm_0001`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
set MODEL_HISTORY_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.h0\.#"`
@@ -388,7 +388,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
@@ -423,7 +423,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
Modified: DART/branches/development/models/cam/shell_scripts/assimilate.zagar.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/assimilate.zagar.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/cam/shell_scripts/assimilate.zagar.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -26,7 +26,7 @@
# of the form "./${CASE}.cam_${ensemble_member}.r.2000-01-06-00000.nc"
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.atm_0001`
+set FILE = `head -n 1 ../rpointer.atm_0001`
set FILE = $FILE:t
set FILE = $FILE:r
set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -179,7 +179,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -206,7 +206,7 @@
endif
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -250,7 +250,7 @@
cd $MYTEMPDIR
set POINTER_FILENAME = `printf rpointer.atm_%04d ${member}`
- set MODEL_RESTART_FILENAME = `head -1 ../../${POINTER_FILENAME}`
+ set MODEL_RESTART_FILENAME = `head -n 1 ../../${POINTER_FILENAME}`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
${LINK} ../../$MODEL_INITIAL_FILENAME caminput.nc
${LINK} ../cam_phis.nc .
@@ -295,7 +295,7 @@
# cam always needs a cam_initial.nc and a cam_history.nc to start.
-set MODEL_RESTART_FILENAME = `head -1 ../rpointer.atm_0001`
+set MODEL_RESTART_FILENAME = `head -n 1 ../rpointer.atm_0001`
set MODEL_INITIAL_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.i\.#"`
set MODEL_HISTORY_FILENAME = `echo ${MODEL_RESTART_FILENAME} | sed "s#\.r\.#\.h0\.#"`
@@ -358,7 +358,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
@@ -390,7 +390,7 @@
set LND_POINTER_FILENAME = `printf rpointer.lnd_%04d ${member}`
set ICE_POINTER_FILENAME = `printf rpointer.ice_%04d ${member}`
- set ATM_RESTART_FILENAME = `head -1 ../../${ATM_POINTER_FILENAME}`
+ set ATM_RESTART_FILENAME = `head -n 1 ../../${ATM_POINTER_FILENAME}`
set LND_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.clm2_#"`
set ICE_RESTART_FILENAME = `echo ${ATM_RESTART_FILENAME} | sed "s#\.cam_#\.cice_#"`
Modified: DART/branches/development/models/clm/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/clm/shell_scripts/assimilate.csh 2013-05-30 20:01:10 UTC (rev 6204)
+++ DART/branches/development/models/clm/shell_scripts/assimilate.csh 2013-05-30 21:09:12 UTC (rev 6205)
@@ -100,7 +100,7 @@
# Piping stuff through 'bc' strips off any preceeding zeros.
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.lnd_0001`
+set FILE = `head -n 1 ./rpointer.lnd_0001`
set FILE = $FILE:t
set FILE = $FILE:r
set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -266,7 +266,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../clm_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../clm_${PRIOR_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -293,7 +293,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../clm_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../clm_${POSTE_INF_OFNAME}.* | tail -n 1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
More information about the Dart-dev
mailing list