[Dart-dev] [6616] DART/trunk/models/CESM/shell_scripts/cam_no_assimilate.csh: Making the CESM version of this consistent with the CAM version.
nancy at ucar.edu
nancy at ucar.edu
Tue Nov 19 10:16:49 MST 2013
Revision: 6616
Author: thoar
Date: 2013-11-19 10:16:49 -0700 (Tue, 19 Nov 2013)
Log Message:
-----------
Making the CESM version of this consistent with the CAM version.
This supports single instance runs.
Modified Paths:
--------------
DART/trunk/models/CESM/shell_scripts/cam_no_assimilate.csh
-------------- next part --------------
Modified: DART/trunk/models/CESM/shell_scripts/cam_no_assimilate.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/cam_no_assimilate.csh 2013-11-15 18:04:31 UTC (rev 6615)
+++ DART/trunk/models/CESM/shell_scripts/cam_no_assimilate.csh 2013-11-19 17:16:49 UTC (rev 6616)
@@ -33,8 +33,12 @@
# of the form "./${CASE}.cam_${ensemble_member}.i.2000-01-06-00000.nc"
#-------------------------------------------------------------------------
-set FILE = `head -n 1 rpointer.atm_0001`
-set FILE = $FILE:t
+if ( $ensemble_size == 1 ) then
+ set FILE = `head -n 1 rpointer.atm`
+else
+ set FILE = `head -n 1 rpointer.atm_0001`
+endif
+
set FILE = $FILE:r
set ATM_DATE_EXT = `echo $FILE:e`
@@ -44,19 +48,20 @@
# the short-term archiver 'restores' the CESM files, the links are right.
#=========================================================================
-set member = 1
-while ( ${member} <= ${ensemble_size} )
+if ( $ensemble_size == 1 ) then
+ set inst_string = ''
+ set ATM_INITIAL_FILENAME = ${CASE}.cam${inst_string}.i.${ATM_DATE_EXT}.nc
+ ${LINK} ${ATM_INITIAL_FILENAME} cam_initial${inst_string}.nc || exit -9
+else
+ set member = 1
+ while ( ${member} <= ${ensemble_size} )
+ set inst_string = `printf _%04d $member`
+ set ATM_INITIAL_FILENAME = ${CASE}.cam${inst_string}.i.${ATM_DATE_EXT}.nc
+ ${LINK} ${ATM_INITIAL_FILENAME} cam_initial${inst_string}.nc || exit -9
+ @ member++
+ end
+endif
- set inst_string = `printf _%04d $member`
-
- set ATM_INITIAL_FILENAME = ${CASE}.cam${inst_string}.i.${ATM_DATE_EXT}.nc
-
- ${LINK} ${ATM_INITIAL_FILENAME} cam_initial${inst_string}.nc || exit -9
-
- @ member++
-
-end
-
echo "`date` -- END CAM_NO_ASSIMILATE"
exit 0
More information about the Dart-dev
mailing list