[Dart-dev] [5960] DART/branches/development/models/POP/shell_scripts: These successfully advanced and assimilated with a 4-member ensemble.
nancy at ucar.edu
nancy at ucar.edu
Thu Feb 14 16:44:10 MST 2013
Revision: 5960
Author: thoar
Date: 2013-02-14 16:44:10 -0700 (Thu, 14 Feb 2013)
Log Message:
-----------
These successfully advanced and assimilated with a 4-member ensemble.
Tonight the test is with a 30-member ensemble. There will likely be
some tuning for the task geometry in the assimilate.csh script that
is currently not present.
The Precip_template file is currently not used because the CAM DATM files
have the precip and nonSolar variables on the same 6hr schedule and are
included in the same stream file. Apparently there is/may be some cost
with opening a (redundant) set of stream files. The DART CESM setup
only specifies the Solar_template (daily) and nonSolarNonPrecip (6hrly)
stream text files and does not copy the Precip_template into place.
Modified Paths:
--------------
DART/branches/development/models/POP/shell_scripts/assimilate.csh
Added Paths:
-----------
DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Precip_template
DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Solar_template
DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.nonSolarNonPrecip_template
-------------- next part --------------
Modified: DART/branches/development/models/POP/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/POP/shell_scripts/assimilate.csh 2013-02-14 22:57:36 UTC (rev 5959)
+++ DART/branches/development/models/POP/shell_scripts/assimilate.csh 2013-02-14 23:44:10 UTC (rev 5960)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/tcsh
+#!/bin/tcsh
#
# DART software - Copyright 2004 - 2011 UCAR. This open source software is
# provided by UCAR, "as is", without charge, subject to all terms of use at
@@ -6,13 +6,58 @@
#
# $Id$
-# The FORCE options are not optional.
-# the VERBOSE options are useful for debugging.
-set MOVE = '/usr/local/bin/mv -fv'
-set COPY = '/usr/local/bin/cp -fv --preserve=timestamps'
-set LINK = '/usr/local/bin/ln -fvs'
-set REMOVE = '/usr/local/bin/rm -fr'
+# This block is an attempt to localize all the machine-specific
+# changes to this script such that the same script can be used
+# on multiple platforms. This will help us maintain the script.
+echo "starting assimilate script at "`date`
+echo "`date` -- BEGIN ASSIMILATE"
+
+switch ("`hostname`")
+ case be*:
+ # NCAR "bluefire"
+ # The FORCE options are not optional.
+ # the VERBOSE options are useful for debugging.
+ set MOVE = '/usr/local/bin/mv -fv'
+ set COPY = '/usr/local/bin/cp -fv --preserve=timestamps'
+ set FLINK = '/usr/local/bin/ln -fvs'
+ set LINK = '/usr/local/bin/ln -vs'
+ set REMOVE = '/usr/local/bin/rm -fr'
+
+ set BASEOBSDIR = /glade/proj3/image/Observations/WOD09
+ set DARTDIR = ${HOME}/svn/DART/dev
+ set LAUNCHCMD = mpirun.lsf
+ breaksw
+
+ case ys*:
+ # NCAR "yellowstone"
+ # The FORCE options are not optional.
+ # the VERBOSE options are useful for debugging.
+ set MOVE = 'mv -fv'
+ set COPY = 'cp -fv --preserve=timestamps'
+ set FLINK = 'ln -fvs'
+ set LINK = 'ln -vs'
+ set REMOVE = 'rm -fr'
+
+ set BASEOBSDIR = /glade/p/image/Observations/WOD09
+ set DARTDIR = ${HOME}/svn/DART/dev
+ set LAUNCHCMD = mpirun.lsf
+ breaksw
+
+ default:
+ # NERSC "hopper"
+ set MOVE = 'mv -fv'
+ set COPY = 'cp -fv --preserve=timestamps'
+ set FLINK = 'ln -fvs'
+ set LINK = 'ln -vs'
+ set REMOVE = 'rm -fr'
+
+ set BASEOBSDIR = /scratch/scratchdirs/nscollin/ACARS
+ set DARTDIR = ${HOME}/devel
+ set LAUNCHCMD = "aprun -n $NTASKS"
+ breaksw
+endsw
+
set ensemble_size = ${NINST_OCN}
# Create temporary working directory for the assimilation
@@ -32,110 +77,219 @@
# of the form "./${CASE}.pop.$ensemble_member.r.2000-01-06-00000.nc"
#-------------------------------------------------------------------------
-set FILE = `head -1 ../rpointer.ocn.1.restart`
+set FILE = `head -1 ../rpointer.ocn_0001.restart`
set FILE = $FILE:t
set FILE = $FILE:r
+set MYCASE = `echo $FILE | sed -e "s#\..*##"`
set OCN_DATE_EXT = `echo $FILE:e`
-set OCN_DATE_STR = `echo $FILE:e | sed -e "s#-# #g"`
-set OCN_DATE = `echo $OCN_DATE_STR`
-@ OCN_YEAR = $OCN_DATE[1]
-@ OCN_MONTH = $OCN_DATE[2]
-@ OCN_DAY = $OCN_DATE[3]
-@ OCN_SECONDS = $OCN_DATE[4]
+set OCN_DATE = `echo $FILE:e | sed -e "s#-# #g"`
+set OCN_YEAR = $OCN_DATE[1]
+set OCN_MONTH = $OCN_DATE[2]
+set OCN_DAY = $OCN_DATE[3]
+set OCN_SECONDS = $OCN_DATE[4]
+set OCN_HOUR = `echo $OCN_DATE[4] / 3600 | bc`
-echo "valid time of model is $OCN_YEAR $OCN_MONTH $OCN_DAY $OCN_SECONDS"
+echo "valid time of model is $OCN_YEAR $OCN_MONTH $OCN_DAY $OCN_SECONDS (seconds)"
+echo "valid time of model is $OCN_YEAR $OCN_MONTH $OCN_DAY $OCN_HOUR (hours)"
#-----------------------------------------------------------------------------
-# Set variables containing various directory names where we will GET things
+# Get observation sequence file ... or die right away.
+# Cannot specify -f on the link command and still check status.
+# The observation file names have a time that matches the stopping time of POP.
#-----------------------------------------------------------------------------
-set DARTDIR = ${HOME}/DART/models/POP/work
+set YYYYMM = `printf %04d%02d ${OCN_YEAR} ${OCN_MONTH}`
+set OBSFNAME = `printf obs_seq.0Z.%04d%02d%02d ${OCN_YEAR} ${OCN_MONTH} ${OCN_DAY}`
+set OBS_FILE = ${BASEOBSDIR}/${YYYYMM}/${OBSFNAME}
-set DART_OBS_DIR = `printf %04d%02d ${OCN_YEAR} ${OCN_MONTH}`
-set OBSDIR = /ptmp/dart/Obs_sets/WOD/${DART_OBS_DIR}
+${REMOVE} obs_seq.out
+${LINK} ${OBS_FILE} obs_seq.out
-#-------------------------------------------------------------------------
-# DART COPY BLOCK
-# Populate a run-time directory with the bits needed to run DART
-# Either get them from the CCSM 'run' directory or some stock repository
-# The grid files are absolute paths ... so they need not move.
-#-------------------------------------------------------------------------
+set lnstat = $status
+if ($lnstat != 0) then
+ echo "ERROR ... no observation file $OBS_FILE"
+ echo "ERROR ... no observation file $OBS_FILE"
+ echo "ERROR ... ln died with status $lnstat"
+ exit -1
+endif
-foreach FILE ( input.nml filter pop_to_dart dart_to_pop )
+#=========================================================================
+# Block 1: Populate a run-time directory with the input needed to run DART.
+#=========================================================================
- if ( -e ${CASEROOT}/${FILE} ) then
- ${COPY} ${CASEROOT}/${FILE} .
- else if ( -e ../${FILE} ) then
- ${COPY} ../${FILE} .
- else if ( -e ${DARTDIR}/${FILE} ) then
- ${COPY} ${DARTDIR}/${FILE} .
- else
- echo "DART required file $FILE not found ... ERROR"
- exit 1
- endif
+echo "`date` -- BEGIN COPY BLOCK"
-end
+if ( -e ${CASEROOT}/input.nml ) then
+ ${COPY} ${CASEROOT}/input.nml .
+else
+ echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
+ echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
+ exit -1
+endif
-#-------------------------------------------------------------------------
-# This is the file for the sampling error correction.
-# Each ensemble size has its own file.
-# It is static - it does not need to be archived, etc.
+# Since the obs sequence files are small, modify the DART input.nml such
+# that the num_output_obs_members matches the ensemble size.
+#
+# g;num_output_state_members ;s;= .*;= $ensemble_size;
+
+ex input.nml <<ex_end
+g;ens_size ;s;= .*;= $ensemble_size;
+g;num_output_obs_members ;s;= .*;= $ensemble_size;
+wq
+ex_end
+
+# COULD also ERROR OUT if the important setting is not the same.
+# problem is ... there are multiple instances of 'ens_size' in input.nml
+#
+echo "`date` -- END COPY BLOCK"
+
+#=========================================================================
+# Block 2: Stage the files needed for SAMPLING ERROR CORRECTION
+#
+# The sampling error correction is a lookup table.
+# The tables are stored in the DART distribution.
+# Each ensemble size has its own (static) file.
# It is only needed if
# input.nml:&assim_tools_nml:sampling_error_correction = .true.,
-#-------------------------------------------------------------------------
+#=========================================================================
-set SAMP_ERR_FILE = ${DARTDIR}/system_simulation/final_full.${ensemble_size}
+set MYSTRING = `grep sampling_error_correction input.nml`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,'\.]# #g"`
+set MYSTRING = `echo $MYSTRING | sed -e 's#"# #g'`
+set SECSTRING = `echo $MYSTRING[2] | tr '[:upper:]' '[:lower:]'`
-if ( -e ${SAMP_ERR_FILE}/ ) then
- ${COPY} ${SAMP_ERR_FILE} .
+if ( $SECSTRING == true ) then
+ set SAMP_ERR_FILE = ${DARTDIR}/system_simulation/final_full_precomputed_tables/final_full.${ensemble_size}
+ if ( -e ${SAMP_ERR_FILE} ) then
+ ${COPY} ${SAMP_ERR_FILE} .
+ else
+ echo "ERROR: no sampling error correction file for this ensemble size."
+ echo "ERROR: looking for ${SAMP_ERR_FILE}"
+ exit -2
+ endif
else
- echo "WARNING: no sampling error correction file for this ensemble size."
- echo "warning: looking for system_simulation/final_full.${ensemble_size}"
+ echo "Sampling Error Correction not requested for this assimilation."
endif
-#-------------------------------------------------------------------------
-# DART INFLATION BLOCK
+#=========================================================================
+# Block 3: DART INFLATION
+# This stages the files that contain the inflation values.
+# The inflation values change through time and should be archived.
+#
# This file is only relevant if 'inflation' is turned on -
-# i.e. if inf_flavor(1) /= 0 - AND we are in a 'restart' mode.
+# i.e. if inf_flavor(1) /= 0 AND inf_initial_from_restart = .TRUE.
#
# filter_nml
# inf_flavor = 2, 0,
# inf_initial_from_restart = .true., .false.,
# inf_in_file_name = 'prior_inflate_ics', 'post_inflate_ics',
+# inf_out_file_name = 'prior_inflate_restart', 'post_inflate_restart',
+# inf_diag_file_name = 'prior_inflate_diag', 'post_inflate_diag',
#
-# This is a 'test' configuration for this script. We are simply
-# assuming that the namelist values are set such that we need this file,
-# and that it is called 'prior_inflate_ics'. Since the inflation file is
-# essentially a duplicate of the model state ... it is slaved to a specific
-# geometry. I created the file offline for the gx1v6 geometry on bluefire.
-# The inflation values are all unity.
+# NOTICE: the archiving scripts more or less require the names of these
+# files to be as listed above. When being archived, the filenames get a
+# unique extension (describing the assimilation time) appended to them.
#
-# The strategy is to use the LATEST inflation file from CENTRALDIR if one exists -
+# The inflation file is essentially a duplicate of the model state ...
+# it is slaved to a specific geometry. The initial files are created
+# offline with values of unity. For the purpose of this script, they are
+# thought to be the output of a previous assimilation, so they should be
+# named something like prior_inflate_restart.YYYY-MM-DD-SSSSS
#
-# After an assimilation, the output file will be copied back to CENTRALDIR
-# to be used for subsequent assimilations.
-#-------------------------------------------------------------------------
+# The first inflation file can be created with 'fill_inflation_restart'
+# which can be built in the usual DART manner.
+#
+# The strategy is to use the LATEST inflation file from the CESM 'rundir'.
+# After an assimilation, the new inflation values/files will be moved to
+# the CESM rundir to be used for subsequent assimilations. If the short-term
+# archiver has worked correctly, only the LATEST files will available. Of
+# course, it is not required to have short-term archiving turned on, so ...
+#=========================================================================
-foreach FILE ( prior post )
+set MYSTRING = `grep inf_flavor input.nml`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,'\.]# #g"`
+set PRIOR_INF = $MYSTRING[2]
+set POSTE_INF = $MYSTRING[3]
- # These files may or may not exist. This causes some complexity.
- # So - we look for the 'newest' and use it. And Pray.
+set MYSTRING = `grep inf_initial_from_restart input.nml`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,'\.]# #g"`
+set PRIOR_TF = `echo $MYSTRING[2] | tr '[:upper:]' '[:lower:]'`
+set POSTE_TF = `echo $MYSTRING[3] | tr '[:upper:]' '[:lower:]'`
- (ls -rt1 ../${FILE}_inflate.*.restart.* | tail -1 >! latestfile) > & /dev/null
- set nfiles = `cat latestfile | wc -l`
+# its a little tricky to remove both styles of quotes from the string.
- if ( $nfiles > 0 ) then
- set latest = `cat latestfile`
- ${LINK} $latest ${FILE}_inflate_ics
+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]
+
+set MYSTRING = `grep inf_out_file_name input.nml`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,'\.]# #g"`
+set MYSTRING = `echo $MYSTRING | sed -e 's#"# #g'`
+set PRIOR_INF_OFNAME = $MYSTRING[2]
+set POSTE_INF_OFNAME = $MYSTRING[3]
+
+set MYSTRING = `grep inf_diag_file_name input.nml`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,'\.]# #g"`
+set MYSTRING = `echo $MYSTRING | sed -e 's#"# #g'`
+set PRIOR_INF_DIAG = $MYSTRING[2]
+set POSTE_INF_DIAG = $MYSTRING[3]
+
+# IFF we want PRIOR inflation:
+
+if ( $PRIOR_INF > 0 ) then
+
+ if ($PRIOR_TF == false) then
+ echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
- # MUST HAVE inf_initial_from_restart = .false.
- echo "WARNING: no incoming ${FILE}_inflate.YYYY-MM-DD-00000.restart.endiansuffix"
+ # Look for the output from the previous assimilation
+ (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ set nfiles = `cat latestfile | wc -l`
+
+ # If one exists, use it as input for this assimilation
+ if ( $nfiles > 0 ) then
+ set latest = `cat latestfile`
+ ${FLINK} $latest ${PRIOR_INF_IFNAME}
+ else
+ echo "ERROR: Requested PRIOR inflation but specified no incoming inflation file."
+ echo "ERROR: expected something like ../${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ exit 4
+ endif
+
endif
+else
+ echo "Prior Inflation not requested for this assimilation."
+endif
-end
+# POSTERIOR: We look for the 'newest' and use it - IFF we need it.
-#-------------------------------------------------------------------------
-# Block 1: convert N POP restart files to DART initial conditions file(s)
+if ( $POSTE_INF > 0 ) then
+
+ if ($POSTE_TF == false) then
+ echo "inf_flavor(2) = $POSTE_INF, using namelist values."
+ else
+
+ # Look for the output from the previous assimilation
+ (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ set nfiles = `cat latestfile | wc -l`
+
+ # If one exists, use it as input for this assimilation
+ if ( $nfiles > 0 ) then
+ set latest = `cat latestfile`
+ ${FLINK} $latest ${POSTE_INF_IFNAME}
+ else
+ echo "ERROR: Requested POSTERIOR inflation but specified no incoming inflation file."
+ echo "ERROR: expected something like ../${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ exit 6
+ endif
+ endif
+else
+ echo "Posterior Inflation not requested for this assimilation."
+endif
+
+#=========================================================================
+# Block 4: convert N POP restart files to DART initial conditions file(s)
# pop_to_dart is serial code, we can do all of these at the same time
# and just wait for them to finish IFF it were not for the fact we'd have
# to have unique namelists for all of them.
@@ -146,31 +300,35 @@
# DART namelist settings appropriate/required:
# &filter_nml: restart_in_file_name = 'filter_ics'
# &ensemble_manager_nml: single_restart_file_in = '.false.'
-# &pop_to_dart_nml: pop_to_dart_output_file = 'dart.ud',
-#-------------------------------------------------------------------------
+# &pop_to_dart_nml: pop_to_dart_output_file = 'dart_ics',
+#
+#=========================================================================
+echo "`date` -- BEGIN POP TO DART"
+
set member = 1
-while ( $member <= $ensemble_size )
+while ( ${member} <= ${ensemble_size} )
# Each member will do its job in its own directory.
# That way, we can do N of them simultaneously -
- # they all read their OWN 'input.nml' ... the output
- # filenames must inserted into the appropriate input.nml
set MYTEMPDIR = member_${member}
mkdir -p $MYTEMPDIR
cd $MYTEMPDIR
- set OCN_RESTART_FILENAME = `head -1 ../../rpointer.ocn.$member.restart`
- ${LINK} ../../$OCN_RESTART_FILENAME pop.r.nc
- ${LINK} ../../pop2_in.$member pop_in
+ set OCN_RESTART_FILENAME = `printf ../../${MYCASE}.pop_%04d.r.${OCN_DATE_EXT}.nc ${member}`
+ set OCN_NML_FILENAME = `printf ../../pop2_in_%04d ${member}`
+ set DART_IC_FILENAME = `printf filter_ics.%04d ${member}`
+ set DART_RESTART_FILE = `printf filter_restart.%04d ${member}`
- # the slash in the filename screws up 'sed' ... unless
- set DART_IC_FILE = `printf ..\\/filter_ics.%04d $member`
+ sed -e "s/dart_ics/..\/${DART_IC_FILENAME}/" \
+ -e "s/dart_restart/..\/${DART_RESTART_FILE}/" < ../input.nml >! input.nml
- sed -e "s/dart.ud/${DART_IC_FILE}/" < ../input.nml >! input.nml
+ ${FLINK} $OCN_RESTART_FILENAME pop.r.nc
+ ${FLINK} $OCN_NML_FILENAME pop_in
- ../pop_to_dart &
+ echo "starting pop_to_dart for member ${member} at "`date`
+ ${EXEROOT}/pop_to_dart >! output.${member}.pop_to_dart &
cd ..
@@ -179,8 +337,17 @@
wait
-#-------------------------------------------------------------------------
-# Block 2: Actually run the assimilation.
+if ($status != 0) then
+ echo "ERROR ... DART died in 'pop_to_dart' ... ERROR"
+ echo "ERROR ... DART died in 'pop_to_dart' ... ERROR"
+ exit -7
+endif
+
+echo "FINISHED pop_to_dart for all ${ensemble_size} members at"`date`
+echo "`date` -- END POP-TO-DART"
+
+#=========================================================================
+# Block 5: Actually run the assimilation.
# Will result in a set of files : 'filter_restart.xxxx'
#
# DART namelist settings required:
@@ -198,102 +365,53 @@
# &filter_nml: last_obs_seconds = -1,
# &ensemble_manager_nml: single_restart_file_in = '.false.'
#
-#-------------------------------------------------------------------------
+#=========================================================================
# 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.1.restart`
+set OCN_RESTART_FILENAME = `head -1 ../rpointer.ocn_0001.restart`
${LINK} ../$OCN_RESTART_FILENAME pop.r.nc
-${LINK} ../pop2_in.1 pop_in
+${LINK} ../pop2_in_0001 pop_in
-# Determine proper observation sequence file.
+echo "`date` -- BEGIN FILTER"
+${LAUNCHCMD} ${EXEROOT}/filter || exit -2
+echo "`date` -- END FILTER"
-set OBSFNAME = `printf obs_seq.0Z.%04d%02d%02d ${OCN_YEAR} ${OCN_MONTH} ${OCN_DAY}`
-set OBS_FILE = ${OBSDIR}/${OBSFNAME}
-
-${LINK} ${OBS_FILE} obs_seq.out
-
-# FIXME: special for trying out non-monotonic task layouts.
-setenv ORG_PATH "${PATH}"
-setenv LSF_BINDIR /contrib/lsf/tgmpatch
-setenv PATH ${LSF_BINDIR}:${PATH}
-setenv ORG_TASK_GEOMETRY "${LSB_PJL_TASK_GEOMETRY}"
-
-# layout 1: rr by node
-setenv NANCY_GEOMETRY_126_2NODES_RR \
- "{(0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124)(1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125)}";
-
-# layout 2: flat
-setenv NANCY_GEOMETRY_126_2NODES_FL \
- "{(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62)(63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125)}";
-
-# layout 3: rr sub block by stride
-setenv NANCY_GEOMETRY_126_2NODES_STR \
- "{(0,64,2,66,4,68,6,70,8,72,10,74,12,76,14,78,16,80,18,82,20,84,22,86,24,88,26,90,28,92,30,94,32,96,34,98,36,100,38,102,40,104,42,106,44,108,46,110,48,112,50,114,52,116,54,118,56,120,58,122,60,124,62)(1,65,3,67,5,69,7,71,9,73,11,75,13,77,15,79,17,81,19,83,21,85,23,87,25,89,27,91,29,93,31,95,33,97,35,99,37,101,39,103,41,105,43,107,45,109,47,111,49,113,51,115,53,117,55,119,57,121,59,123,61,125,63)}";
-
-setenv NANCY_GEOMETRY_126_3NODES \
- "{(0,29,30,31,1,32,33,34,2,35,36,37,3,38,39,40,4,41,42,43,5,44,45,46,6,47,48,49,7,50,51,52,8,53,54,55,9,56,57,58,10,59)(60,61,11,62,63,64,12,65,66,67,13,68,69,70,14,71,72,73,15,74,75,76,16,77,78,79,17,80,81,82,18,83,84,85,19,86,87,88,20,89,90,91)(21,92,93,94,22,95,96,97,23,98,99,100,24,101,102,103,25,104,105,106,26,107,108,109,27,110,111,112,28,113,114,115,116,117,118,119,120,121,122,123,124,125)}"
-
-setenv NANCY_GEOMETRY_126_6NODES \
- "{(0,29,30,31,1,32,33,34,2,35,36,37,3,38,39,40,4,41,42,43,5)(44,45,46,6,47,48,49,7,50,51,52,8,53,54,55,9,56,57,58,10,59)(60,61,11,62,63,64,12,65,66,67,13,68,69,70,14,71,72,73,15,74,75)(76,16,77,78,79,17,80,81,82,18,83,84,85,19,86,87,88,20,89,90,91)(21,92,93,94,22,95,96,97,23,98,99,100,24,101,102,103,25,104,105,106,26)(107,108,109,27,110,111,112,28,113,114,115,116,117,118,119,120,121,122,123,124,125)}"
-
-setenv NANCY_GEOMETRY_126_7NODES \
- "{(0,7,14,21,28,35,42,49,56,63,70,77,84,91,98,105,112,119)(1,8,15,22,29,36,43,50,57,64,71,78,85,92,99,106,113,120)(2,9,16,23,30,37,44,51,58,65,72,79,86,93,100,107,114,121)(3,10,17,24,31,38,45,52,59,66,73,80,87,94,101,108,115,122)(4,11,18,25,32,39,46,53,60,67,74,81,88,95,102,109,116,123)(5,12,19,26,33,40,47,54,61,68,75,82,89,96,103,110,117,124)(6,13,20,27,34,41,48,55,62,69,76,83,90,97,104,111,118,125)}"
-
-# layout: flat
-setenv NANCY_GEOMETRY_54_1NODE \
- "{(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53)}";
-
-setenv LSB_PJL_TASK_GEOMETRY "${NANCY_GEOMETRY_54_1NODE}"
-
-which mpirun.lsf
-
-mpirun.lsf ./filter || exit 2
-
${MOVE} Prior_Diag.nc ../Prior_Diag.${OCN_DATE_EXT}.nc
${MOVE} Posterior_Diag.nc ../Posterior_Diag.${OCN_DATE_EXT}.nc
${MOVE} obs_seq.final ../obs_seq.${OCN_DATE_EXT}.final
${MOVE} dart_log.out ../dart_log.${OCN_DATE_EXT}.out
-# Accomodate any possible inflation files
+# Accomodate any possible inflation files
+# 1) rename file to reflect current date
+# 2) move to CENTRALDIR so the DART INFLATION BLOCK works next time and
+# that they can get archived.
-foreach INFLATION ( prior post )
-
- if ( -e ${INFLATION}_inflate_restart ) then
- # 1) rename file to reflect current date
- # 2) move to CENTRALDIR so the DART INFLATION BLOCK works next time
-
- ${MOVE} ${INFLATION}_inflate_restart ../${INFLATION}_inflate.${OCN_DATE_EXT}.restart.be
-
+foreach FILE ( ${PRIOR_INF_OFNAME} ${POSTE_INF_OFNAME} ${PRIOR_INF_DIAG} ${POSTE_INF_DIAG} )
+ if ( -e ${FILE} ) then
+ ${MOVE} ${FILE} ../${FILE}.${OCN_DATE_EXT}
else
- echo "No ${INFLATION}_inflate_restart for ${OCN_DATE_EXT}"
+ echo "No ${FILE} for ${OCN_DATE_EXT}"
endif
-
- if ( -e ${INFLATION}_inflate_diag ) then
- ${MOVE} ${INFLATION}_inflate_diag ../${INFLATION}_inflate.${OCN_DATE_EXT}.diag
- else
- echo "No ${INFLATION}_inflate_diag for ${OCN_DATE_EXT}"
- endif
-
end
-# FIXME: special for trying out non-monotonic task layouts.
-setenv PATH "${ORG_PATH}"
-setenv LSB_PJL_TASK_GEOMETRY "${ORG_TASK_GEOMETRY}"
-
-#-------------------------------------------------------------------------
-# Block 3: Update the POP restart files ... simultaneously ...
+#=========================================================================
+# Block 6: Update the POP restart files ... simultaneously ...
#
# DART namelist settings required:
# &filter_nml: restart_out_file_name = 'filter_restart'
# &ensemble_manager_nml: single_restart_file_in = '.false.'
-# &dart_to_pop_nml: dart_to_pop_input_file = 'dart.ic',
+# &dart_to_pop_nml: dart_to_pop_input_file = 'dart_restart',
# &dart_to_pop_nml: advance_time_present = .false.
-#-------------------------------------------------------------------------
+#=========================================================================
+echo "`date` -- BEGIN DART TO POP"
set member = 1
while ( $member <= $ensemble_size )
+ set m4 = `printf %04d $member`
+
# Each member will do its job in its own directory.
# That way, we can do N of them simultaneously -
# they all read their OWN 'input.nml' ... the output
@@ -303,17 +421,14 @@
mkdir -p $MYTEMPDIR
cd $MYTEMPDIR
- set DART_RESTART_FILE = `printf filter_restart.%04d $member`
- ${LINK} ../$DART_RESTART_FILE dart.ic
+ set OCN_RESTART_FILENAME = `head -1 ../../rpointer.ocn_$m4.restart`
- set OCN_RESTART_FILENAME = `head -1 ../../rpointer.ocn.$member.restart`
- ${LINK} ../../$OCN_RESTART_FILENAME pop.r.nc
- ${LINK} ../../pop2_in.$member pop_in
+ ${FLINK} ../../$OCN_RESTART_FILENAME pop.r.nc
+ ${FLINK} ../../pop2_in_$m4 pop_in
- cp -f ../input.nml .
+ echo "starting dart_to_pop for member ${member} at "`date`
+ ${EXEROOT}/dart_to_pop &
- ../dart_to_pop &
-
cd ..
@ member++
@@ -321,6 +436,15 @@
wait
+if ($status != 0) then
+ echo "ERROR ... DART died in 'dart_to_pop' ... ERROR"
+ echo "ERROR ... DART died in 'dart_to_pop' ... ERROR"
+ exit -8
+endif
+
+echo "FINISHED dart_to_pop for all ${ensemble_size} members at"`date`
+echo "`date` -- END DART TO POP"
+
#-------------------------------------------------------------------------
# Cleanup
#-------------------------------------------------------------------------
Added: DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Precip_template
===================================================================
--- DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Precip_template (rev 0)
+++ DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Precip_template 2013-02-14 23:44:10 UTC (rev 5960)
@@ -0,0 +1,37 @@
+ <dataSource>
+ CPL
+ </dataSource>
+ <domainInfo>
+ <variableNames>
+ time time
+ doma_lon lon
+ doma_lat lat
+ doma_area area
+ doma_mask mask
+ </variableNames>
+ <filePath>
+ /glade/p/image/CAMEAKF_POP_FORCING
+ </filePath>
+ <fileNames>
+ FV.domain.6havg.nc
+ </fileNames>
+ </domainInfo>
+ <fieldInfo>
+ <variableNames>
+ a2x6h_Faxa_rainc rainc
+ a2x6h_Faxa_rainl rainl
+ a2x6h_Faxa_snowc snowc
+ a2x6h_Faxa_snowl snowl
+ </variableNames>
+ <filePath>
+ /glade/p/image/CAMEAKF_POP_FORCING/6hourly
+ </filePath>
+ <fileNames>
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1dx6h.2003.nc
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1dx6h.2004.nc
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1dx6h.2005.nc
+ </fileNames>
+ <offset>
+ -5400
+ </offset>
+ </fieldInfo>
Property changes on: DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Precip_template
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Added: DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Solar_template
===================================================================
--- DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Solar_template (rev 0)
+++ DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Solar_template 2013-02-14 23:44:10 UTC (rev 5960)
@@ -0,0 +1,41 @@
+<comment>
+ AK 9/12/13: Stream description template file for CAMASSIM CPL history daily Solar data at 0.9x1.25 resolution for POPDART testing
+ </comment>
+ <dataSource>
+ CPL
+ </dataSource>
+ <domainInfo>
+ <variableNames>
+ time time
+ doma_lon lon
+ doma_lat lat
+ doma_area area
+ doma_mask mask
+ </variableNames>
+ <filePath>
+ /glade/p/image/CAMEAKF_POP_FORCING
+ </filePath>
+ <fileNames>
+ FV.domain.davg.nc
+ </fileNames>
+ </domainInfo>
+ <fieldInfo>
+ <variableNames>
+ a2x6h_Faxa_swndr swndr
+ a2x6h_Faxa_swvdr swvdr
+ a2x6h_Faxa_swndf swndf
+ a2x6h_Faxa_swvdf swvdf
+ a2x6h_Faxa_lwdn lwdn
+ </variableNames>
+ <filePath>
+ /glade/p/image/CAMEAKF_POP_FORCING/daily
+ </filePath>
+ <fileNames>
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1davg.2003.nc
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1davg.2004.nc
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1davg.2005.nc
+ </fileNames>
+ <offset>
+ -5400
+ </offset>
+ </fieldInfo>
Property changes on: DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.Solar_template
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Added: DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.nonSolarNonPrecip_template
===================================================================
--- DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.nonSolarNonPrecip_template (rev 0)
+++ DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.nonSolarNonPrecip_template 2013-02-14 23:44:10 UTC (rev 5960)
@@ -0,0 +1,46 @@
+ <dataSource>
+ CPL
+ </dataSource>
+ <domainInfo>
+ <variableNames>
+ time time
+ doma_lon lon
+ doma_lat lat
+ doma_area area
+ doma_mask mask
+ </variableNames>
+ <filePath>
+ /glade/p/image/CAMEAKF_POP_FORCING
+ </filePath>
+ <fileNames>
+ FV.domain.6havg.nc
+ </fileNames>
+ </domainInfo>
+ <fieldInfo>
+ <variableNames>
+ a2x6h_Sa_z z
+ a2x6h_Sa_u u
+ a2x6h_Sa_v v
+ a2x6h_Sa_tbot tbot
+ a2x6h_Sa_ptem ptem
+ a2x6h_Sa_shum shum
+ a2x6h_Sa_pbot pbot
+ a2x6h_Sa_dens dens
+ a2x6h_Sa_pslv pslv
+ a2x6h_Faxa_rainc rainc
+ a2x6h_Faxa_rainl rainl
+ a2x6h_Faxa_snowc snowc
+ a2x6h_Faxa_snowl snowl
+ </variableNames>
+ <filePath>
+ /glade/p/image/CAMEAKF_POP_FORCING/6hourly
+ </filePath>
+ <fileNames>
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1dx6h.2003.nc
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1dx6h.2004.nc
+ CAM_halo-O2-POP15-NINST.cpl.ha2x1dx6h.2005.nc
+ </fileNames>
+ <offset>
+ -5400
+ </offset>
+ </fieldInfo>
Property changes on: DART/branches/development/models/POP/shell_scripts/user_datm.streams.txt.CPLHIST3HrWx.nonSolarNonPrecip_template
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
More information about the Dart-dev
mailing list