[Dart-dev] DART/branches Revision: 12071
dart at ucar.edu
dart at ucar.edu
Wed Nov 8 17:44:07 MST 2017
thoar at ucar.edu
2017-11-08 17:44:05 -0700 (Wed, 08 Nov 2017)
71
Script to perturb a single coamps file into an ensemble using filter.
Added: DART/branches/coamps/models/coamps_nest/shell_scripts/create_ensemble.csh
===================================================================
--- DART/branches/coamps/models/coamps_nest/shell_scripts/create_ensemble.csh (rev 0)
+++ DART/branches/coamps/models/coamps_nest/shell_scripts/create_ensemble.csh 2017-11-09 00:44:05 UTC (rev 12071)
@@ -0,0 +1,185 @@
+#!/bin/tcsh
+#
+# DART software - Copyright UCAR. This open source software is provided
+# by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# DART $Id$
+#
+# The DART program 'filter' has the ability to take a single model state and
+# perturb it to create an ensemble of model states.
+#
+# The intent of the this script is to take a single coamps state and make N ensemble
+# members using the DART program 'filter'. Each ensemble member will differ from the
+# parent in that noise will be added to each of the variables defined in the state.vars.
+# The nature of the noise is defined in the filter namelist. It is not expected that
+# these files are valid for coamps, but they will enable testing of the assimilation.
+#
+# FIXME: Someone should take the logic from perturb_init.f90 and put it in
+# model_mod:pert_model_copies(). At present, pert_model_copies() uses a default routine.
+#
+# The steps are basically:
+# 1) create an empty directory for the ensemble and copy all the bits needed to
+# create the ensemble into it.
+# 2) run trans_coamps_to_dart to create a netCDF file - required by DART
+# 3) create an observation sequence file (required by filter) by running pmo
+# 4) create a bunch of output files that filter will update.
+# 5) convert all those output files into coamps hdf5 restart files
+# 6) clean up the garbage?
+#
+#===============================================================================
+# This block of directives constitutes the preamble for the SLURM queuing system.
+# the normal way to submit with slurm: sbatch perturb_single.csh
+# and to check on the job status : squeue --users=thoar
+#
+#SBATCH --job-name=ensemble
+#SBATCH --output=ensemble%A.log
+#SBATCH --error=ensemble%A.err
+#SBATCH --ntasks=16
+#SBATCH --time=00:30:00
+#SBATCH --error=ensemble%A.err
+#SBATCH --output=ensemble%A.log
+#===============================================================================
+
+if ($?SLURM_JOB_ID) then
+ set ORIGINALDIR = $SLURM_SUBMIT_DIR
+ set JOBNAME = $SLURM_JOB_NAME
+ set JOBID = $SLURM_JOBID
+ set MYQUEUE = $SLURM_JOB_PARTITION
+ set MYHOST = $SLURM_SUBMIT_HOST
+ set NODELIST = $SLURM_NODELIST
+ set LAUNCHCMD = "mpirun -np $SLURM_NTASKS -bind-to core"
+else
+ set ORIGINALDIR = `pwd`
+ set JOBNAME = ensemble
+ set JOBID = $$
+ set MYQUEUE = Interactive
+ set MYHOST = $host
+ set LAUNCHCMD = " "
+endif
+
+#==============================================================================
+# Just an echo of job attributes
+#==============================================================================
+
+echo
+echo "${JOBNAME} ($JOBID) submit directory ${ORIGINALDIR}"
+echo "${JOBNAME} ($JOBID) submit host ${MYHOST}"
+echo "${JOBNAME} ($JOBID) running in queue ${MYQUEUE}"
+echo "${JOBNAME} ($JOBID) running on ${NODELIST}"
+echo "${JOBNAME} ($JOBID) started at "`date`
+echo
+
+set ORIGIN = /home/nopp/COAMPS_hdf5_files
+set DESTINATION = /home/thoar/COAMPS_hdf5_files/Ensemble2
+set ENSEMBLE_SIZE = 4
+set TEMPLATE = coamps_2013011000.hdf5
+
+#==============================================================================
+# Must convert a single state to a netcdf file for filter, perturb it,
+# take the output netcdf files and update the hdf5 files ...
+#==============================================================================
+
+mkdir -p ${DESTINATION}
+cd ${DESTINATION}
+\rm -f dart_log.out dart_log.nml
+
+ln -sf /home/thoar/DART/coamps/models/coamps_nest/work/trans_coamps_to_dart . || exit 1
+ln -sf /home/thoar/DART/coamps/models/coamps_nest/work/trans_dart_to_coamps . || exit 1
+ln -sf /home/thoar/DART/coamps/models/coamps_nest/work/perfect_model_obs . || exit 1
+ln -sf /home/thoar/DART/coamps/models/coamps_nest/work/filter . || exit 1
+cp /home/thoar/DART/coamps/models/coamps_nest/work/input.nml . || exit 1
+cp /home/thoar/DART/coamps/models/coamps_nest/work/convert.nml . || exit 1
+cp /home/thoar/DART/coamps/models/coamps_nest/work/state.vars.full state.vars || exit 1
+cp /home/thoar/DART/coamps/assimilation_code/programs/get_sampling_err_table/work/sampling_error_correction_table.nc .
+
+# enforce the assumptions
More information about the Dart-dev
mailing list