[Dart-dev] [4406] DART/trunk/models/POP/shell_scripts: Changed run_filter to use 'ex' instead of some variant of 'vi' - and removed
nancy at ucar.edu
nancy at ucar.edu
Thu Jul 1 13:30:55 MDT 2010
Revision: 4406
Author: thoar
Date: 2010-07-01 13:30:55 -0600 (Thu, 01 Jul 2010)
Log Message:
-----------
Changed run_filter to use 'ex' instead of some variant of 'vi' - and removed
the whole 'vi' debacle. In both run_filter and advance_model - disposed of
run-time unprintable character from 'ex' so it does not make its way into
log files.
Fixed the MPI commands in run_perfect_model_obs.batch.
Modified Paths:
--------------
DART/trunk/models/POP/shell_scripts/advance_model.csh
DART/trunk/models/POP/shell_scripts/run_filter.batch
DART/trunk/models/POP/shell_scripts/run_perfect_model_obs.batch
-------------- next part --------------
Modified: DART/trunk/models/POP/shell_scripts/advance_model.csh
===================================================================
--- DART/trunk/models/POP/shell_scripts/advance_model.csh 2010-07-01 13:50:56 UTC (rev 4405)
+++ DART/trunk/models/POP/shell_scripts/advance_model.csh 2010-07-01 19:30:55 UTC (rev 4406)
@@ -56,7 +56,7 @@
echo ':s/\.false\./\.true\./' >> ex_commands
echo ':wq' >> ex_commands
-( ex input.nml < ex_commands )
+( ex input.nml < ex_commands ) >& /dev/null
\rm -f ex_commands
# copy the files used by
@@ -64,7 +64,7 @@
../topography.gx3v5.* \
../vert_grid.gx3v5 \
../*_contents )
- ln -sf $FILE . || exit 1
+ ln -sfv $FILE . || exit 1
end
echo 'listing now that the table has been set ...'
Modified: DART/trunk/models/POP/shell_scripts/run_filter.batch
===================================================================
--- DART/trunk/models/POP/shell_scripts/run_filter.batch 2010-07-01 13:50:56 UTC (rev 4405)
+++ DART/trunk/models/POP/shell_scripts/run_filter.batch 2010-07-01 19:30:55 UTC (rev 4406)
@@ -30,6 +30,7 @@
#BSUB -o filter.%J.log
#BSUB -q regular
#BSUB -n 16
+#BSUB -R "span[ptile=2]"
#BSUB -P 86850054
#BSUB -W 2:00
#BSUB -N -u ${USER}@ucar.edu
@@ -103,6 +104,7 @@
setenv JOBID $$
setenv MYQUEUE Interactive
setenv MYHOST $HOST
+ setenv MPI csh
endif
@@ -154,33 +156,6 @@
echo "${JOBNAME} ($JOBID) CENTRALDIR == $CENTRALDIR"
#-----------------------------------------------------------------------------
-# ensure namelists have desired values ...
-#-----------------------------------------------------------------------------
-# We need to run the editor in batch mode. If you have 'vim' it needs
-# one flag; if you have only the older vanilla 'vi' you need another.
-# On several systems 'vi' is a link to 'vim' and uses the newer syntax
-# so you cannot distinguish which flag will be needed based only on name.
-# First try to run 'vim' by full name and then back off to plain 'vi'
-# if it is not found. Punt if neither is found.
-#-------------------------------------------------------------------------
-set VI_EXE = `which vim`
-if ( -x "${VI_EXE}" ) then
- setenv VI 'vim -e'
-else
- set VI_EXE = `which vi`
- if ( -x "${VI_EXE}" ) then
- setenv VI 'vi -s'
- else
- echo ""
- echo "Neither the vim nor the vi editor were found. This script"
- echo "cannot continue unless it can use one of them to update"
- echo "the test input namelist files."
- echo ""
- exit 2
- endif
-endif
-
-#-----------------------------------------------------------------------------
# Set variables containing various directory names where we will GET things
#-----------------------------------------------------------------------------
@@ -293,25 +268,26 @@
# new_advance_days = -1,
# new_advance_secs = -1
#-----------------------------------------------------------------------------
+# ensure namelists have desired values ...
+#-----------------------------------------------------------------------------
# Gregorian 1 Jan 2000 <==> DART 145731
-echo ':0' >! vi_script
-echo '/restart_file_tool_nml' >> vi_script
-echo '/write_binary_restart_files' >> vi_script
-echo ':s/.false./.true./' >> vi_script
-echo '/overwrite_data_time' >> vi_script
-echo ':s/.false./.true./' >> vi_script
-echo '/new_data_days' >> vi_script
-echo ':s/-1/145731/' >> vi_script
-echo '/new_data_secs' >> vi_script
-echo ':s/-1/0/' >> vi_script
-echo ':wq' >> vi_script
+echo ':0' >! ex_commands
+echo '/restart_file_tool_nml' >> ex_commands
+echo '/write_binary_restart_files' >> ex_commands
+echo ':s/.false./.true./' >> ex_commands
+echo '/overwrite_data_time' >> ex_commands
+echo ':s/.false./.true./' >> ex_commands
+echo '/new_data_days' >> ex_commands
+echo ':s/-1/145731/' >> ex_commands
+echo '/new_data_secs' >> ex_commands
+echo ':s/-1/0/' >> ex_commands
+echo ':wq' >> ex_commands
-( ${VI} input.nml < vi_script )
+( ex input.nml < ex_commands ) >& /dev/null
+\rm -f ex_commands
-\rm -f vi_script
-
cat pop_in.part1 pop_in.part2 >! pop_in
set member = 1
@@ -511,10 +487,11 @@
# all the files have finished being written.
#-----------------------------------------------------------------------------
+echo "${JOBNAME} ($JOBID) finished at "`date`
echo "Listing contents of CENTRALDIR before archiving"
ls -l
-exit
+exit 0
${MOVE} *.data *.meta ${experiment}/POP
${MOVE} data data.cal ${experiment}/POP
Modified: DART/trunk/models/POP/shell_scripts/run_perfect_model_obs.batch
===================================================================
--- DART/trunk/models/POP/shell_scripts/run_perfect_model_obs.batch 2010-07-01 13:50:56 UTC (rev 4405)
+++ DART/trunk/models/POP/shell_scripts/run_perfect_model_obs.batch 2010-07-01 19:30:55 UTC (rev 4406)
@@ -34,12 +34,12 @@
#BXXX -b 18:00
#BSUB -J POP_OSSE
#BSUB -o POP_OSSE.%J.log
-#BSUB -N -u ${USER}@ucar.edu
#BSUB -q economy
#BSUB -n 16
#BSUB -R "span[ptile=2]"
+#BSUB -P 86850054
#BSUB -W 2:00
-#BSUB -m "cr0128en cr0129en cr0130en cr0131en cr0132en cr0133en cr0134en cr0135en cr0136en cr0137en cr0138en cr0139en cr0140en cr0141en cr0202en cr0201en"
+#BSUB -N -u ${USER}@ucar.edu
#
##=============================================================================
## This block of directives constitutes the preamble for the PBS queuing system
@@ -84,7 +84,7 @@
setenv JOBID $LSB_JOBID
setenv MYQUEUE $LSB_QUEUE
setenv MYHOST $LSB_SUB_HOST
- setenv MPI csh
+ setenv MPI mpirun.lsf
else if ($?PBS_QUEUE) then
@@ -97,7 +97,7 @@
setenv JOBID $PBS_JOBID
setenv MYQUEUE $PBS_QUEUE
setenv MYHOST $PBS_O_HOST
- setenv MPI csh
+ setenv MPI mpirun
else
@@ -140,7 +140,7 @@
# some systems don't like the -v option to any of the following
-set OSTYPE = `uname -s`
+set OSTYPE = `uname -s`
switch ( ${OSTYPE} )
case IRIX64:
setenv REMOVE 'rm -rf'
More information about the Dart-dev
mailing list