[Dart-dev] [6311] DART/trunk: Changed inconsistent use of dart.ic dart. ics dart_ic to dart_ics.
nancy at ucar.edu
nancy at ucar.edu
Wed Jul 17 16:04:55 MDT 2013
Revision: 6311
Author: thoar
Date: 2013-07-17 16:04:54 -0600 (Wed, 17 Jul 2013)
Log Message:
-----------
Changed inconsistent use of dart.ic dart.ics dart_ic to dart_ics.
Changed inconsistent use of dart.ud dart_ud etc. to dart_restart.
Any of the model_to_dart routines should produce input to DART, i.e. a dart_ics
Any of the dart_to_model routines work on output from DART, i.e., a dart_restart
Modified Paths:
--------------
DART/trunk/models/CESM/cesm_to_dart.html
DART/trunk/models/CESM/dart_to_cesm.html
DART/trunk/models/CESM/matlab/Check_pop_to_dart.m
DART/trunk/models/CESM/matlab/Check_ud.m
DART/trunk/models/CESM/model_mod.html
DART/trunk/models/CESM/shell_scripts/run_perfect_model_obs.csh
DART/trunk/models/NAAPS/dart_to_naaps.f90
DART/trunk/models/NAAPS/dart_to_naaps.nml
DART/trunk/models/NAAPS/model_mod_check.f90
DART/trunk/models/NAAPS/model_mod_check.nml
DART/trunk/models/NAAPS/naaps_to_dart.f90
DART/trunk/models/NAAPS/naaps_to_dart.nml
DART/trunk/models/NAAPS/shell_scripts/assimilate.csh
DART/trunk/models/NAAPS/work/input.nml
DART/trunk/models/NCOMMAS/dart_to_ncommas.f90
DART/trunk/models/NCOMMAS/dart_to_ncommas.html
DART/trunk/models/NCOMMAS/dart_to_ncommas.nml
DART/trunk/models/NCOMMAS/model_mod.html
DART/trunk/models/NCOMMAS/ncommas_to_dart.f90
DART/trunk/models/NCOMMAS/ncommas_to_dart.html
DART/trunk/models/NCOMMAS/ncommas_to_dart.nml
DART/trunk/models/NCOMMAS/shell_scripts/advance_model.csh
DART/trunk/models/NCOMMAS/shell_scripts/run_filter.batch
DART/trunk/models/NCOMMAS/shell_scripts/run_perfect_model_obs.batch
DART/trunk/models/NCOMMAS/work/input.nml
DART/trunk/models/POP/dart_to_pop.f90
DART/trunk/models/POP/dart_to_pop.html
DART/trunk/models/POP/dart_to_pop.nml
DART/trunk/models/POP/matlab/Check_pop_to_dart.m
DART/trunk/models/POP/matlab/Check_ud.m
DART/trunk/models/POP/model_mod.html
DART/trunk/models/POP/pop_to_dart.f90
DART/trunk/models/POP/pop_to_dart.html
DART/trunk/models/POP/pop_to_dart.nml
DART/trunk/models/POP/shell_scripts/MakeInitialEnsemble.csh
DART/trunk/models/POP/shell_scripts/advance_model.csh
DART/trunk/models/POP/shell_scripts/run_filter.csh
DART/trunk/models/POP/shell_scripts/run_perfect_model_obs.csh
DART/trunk/models/clm/model_mod_check.f90
DART/trunk/models/clm/shell_scripts/GenerateEnsemble.csh
DART/trunk/models/gitm/dart_to_gitm.f90
DART/trunk/models/gitm/gitm_to_dart.f90
DART/trunk/models/gitm/model_mod.html
DART/trunk/models/gitm/model_mod_check.f90
DART/trunk/models/gitm/work/input.nml
DART/trunk/models/mpas_atm/dart_to_model.f90
DART/trunk/models/mpas_atm/exhaustion.f90
DART/trunk/models/mpas_atm/model_mod.html
DART/trunk/models/mpas_atm/model_mod_check.f90
DART/trunk/models/mpas_atm/model_to_dart.f90
DART/trunk/models/mpas_atm/model_to_dart.html
DART/trunk/models/mpas_atm/model_to_dart.nml
DART/trunk/models/mpas_atm/work/input.nml
DART/trunk/models/mpas_ocn/dart_to_model.f90
DART/trunk/models/mpas_ocn/model_mod.html
DART/trunk/models/mpas_ocn/model_mod_check.f90
DART/trunk/models/mpas_ocn/model_to_dart.f90
DART/trunk/models/mpas_ocn/model_to_dart.html
DART/trunk/models/mpas_ocn/shell_scripts/input.nml.template
DART/trunk/models/noah/model_mod_check.f90
DART/trunk/models/template/dart_to_model.f90
DART/trunk/models/template/full_model_mod_check.f90
DART/trunk/models/template/model_mod_check.f90
DART/trunk/models/template/model_to_dart.f90
DART/trunk/utilities/model_mod_check.f90
DART/trunk/utilities/model_mod_check.html
DART/trunk/utilities/model_mod_check.nml
Removed Paths:
-------------
DART/trunk/models/CESM/shell_scripts/MakeInitialEnsemble.csh
DART/trunk/models/CESM/shell_scripts/run_filter.csh
-------------- next part --------------
Modified: DART/trunk/models/CESM/cesm_to_dart.html
===================================================================
--- DART/trunk/models/CESM/cesm_to_dart.html 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/cesm_to_dart.html 2013-07-17 22:04:54 UTC (rev 6311)
@@ -50,10 +50,8 @@
</UL>
<P>
-Since this program is called repeatedly for every ensemble member,
-we have found it convenient to link the DART output file
-to the default output filename, e.g. (<em class=file>dart_ics</em>).
-The same thing is true for the model input filenames.
+Since this program is invoked from a unique directory for every ensemble member,
+we have found it convenient to link to default filenames, e.g. (<em class=file>dart_ics</em>).
</P>
<!--==================================================================-->
@@ -81,7 +79,7 @@
/
&pop_to_dart_nml
- pop_to_dart_output_file = 'dart.ud'
+ pop_to_dart_output_file = 'dart_ics'
/
&clm_to_dart_nml
Modified: DART/trunk/models/CESM/dart_to_cesm.html
===================================================================
--- DART/trunk/models/CESM/dart_to_cesm.html 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/dart_to_cesm.html 2013-07-17 22:04:54 UTC (rev 6311)
@@ -48,10 +48,8 @@
</UL>
<P>
-Since this program is called repeatedly for every ensemble member,
-we have found it convenient to link the DART input file
-to the default input filename, e.g. (<em class=file>dart_restart</em>).
-The same thing is true for the model output filenames.
+Since this program is invoked from a unique directory for every ensemble member,
+we have found it convenient to link to default filenames, e.g. (<em class=file>dart_restart</em>).
</P>
<!--==================================================================-->
@@ -74,13 +72,13 @@
<pre>
&dart_to_cam_nml
- dart_to_cam_input_file = 'dart_ics',
+ dart_to_cam_input_file = 'dart_restart',
dart_to_cam_output_file = 'caminput.nc',
- advance_time_present = .true.,
+ advance_time_present = .false.,
/
&dart_to_pop_nml
- dart_to_pop_input_file = 'dart.ic',
+ dart_to_pop_input_file = 'dart_restart',
advance_time_present = .false.
/
Modified: DART/trunk/models/CESM/matlab/Check_pop_to_dart.m
===================================================================
--- DART/trunk/models/CESM/matlab/Check_pop_to_dart.m 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/matlab/Check_pop_to_dart.m 2013-07-17 22:04:54 UTC (rev 6311)
@@ -2,7 +2,7 @@
%% Check_pop_to_dart : check pop_to_dart.f90 ... the conversion of a POP restart to a DART state vector file.
%
% popfile = 'pop.r.nc';
-% dartfile = 'dart.ics';
+% dartfile = 'dart_ics';
% x = Check_pop_to_dart(popfile, dartfile);
%
% popfile = '~DART/models/POP/work/cx3.dart.001.pop.r.0002-01-01-00000.nc';
Modified: DART/trunk/models/CESM/matlab/Check_ud.m
===================================================================
--- DART/trunk/models/CESM/matlab/Check_ud.m 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/matlab/Check_ud.m 2013-07-17 22:04:54 UTC (rev 6311)
@@ -2,7 +2,7 @@
%% Check_ud : check pop_to_dart.f90 ... the conversion of a POP restart to a DART state vector file.
%
% popfile = 'pop.r.nc'
-% dartfile = 'dart.ics';
+% dartfile = 'dart_ics';
% x = Check_pop_to_dart(popfile, dartfile);
%
% popfile = '~DART/models/POP/work/cx3.dart.001.pop.r.0002-01-01-00000.nc';
Modified: DART/trunk/models/CESM/model_mod.html
===================================================================
--- DART/trunk/models/CESM/model_mod.html 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/model_mod.html 2013-07-17 22:04:54 UTC (rev 6311)
@@ -193,7 +193,7 @@
<table width="100%" cellpadding="10">
<tr><td valign="top"><a href="pop_to_dart.html">pop_to_dart.f90</a></td>
<td>converts the POP restart file <em class=file>pop.r.nc</em> into a
- DART-compatible file normally called <em class=file>dart.ud</em> .
+ DART-compatible file normally called <em class=file>dart_ics</em> .
There must also be a <em class=file>pop_in</em> namelist for POP
(since this specifies the names of the grid files).
We usually wind up linking the dereferenced
@@ -235,55 +235,8 @@
<a name="InitialEnsemble"></a>
<div class=indent1>
<h3>Generating the initial ensemble.</h3>
- <P>
- Creating the initial ensemble of ocean states is an area of active research.
- The POP model cannot take one single model state and generate its own
- ensemble (typically done with <a href="#pert_model_state">pert_model_state</a>).
- <br />
- <br />
- The ensemble has to come from 'somewhere else'.
- At present, it may be sufficient to use a climatological ensemble; e.g.,
- using the POP restarts for '1 January 00Z' from 50 consecutive years
- from a hindcast experiment.
- <br />
- <br />
- There is a <em class=program>shell_scripts/MakeInitialEnsemble.csh</em>
- script that is intended to demonstrate how to convert a set of POP netCDF
- restart files into a set of DART files that have a consistent timestamp.
- If you simply convert each POP file to a DART file using
- <em class=program>dart_to_pop</em>, each DART file will have a 'valid time'
- that reflects the POP time of that state - instead of an ensemble of states
- reflecting one single time. The
- <a href="../../../utilities/restart_file_utility.f90">restart_file_utility</a>
- can be used to overwrite the timestep in the header of each DART initial
- conditions file. The namelist for this program must look something like:
+ <P> Under development ...
</P>
- <pre>
- &restart_file_tool_nml
- input_file_name = "<em class=changed>dart.ics</em>",
- output_file_name = "filter_updated_restart",
- ens_size = 1,
- single_restart_file_in = .true.,
- single_restart_file_out = .true.,
- write_binary_restart_files = .true.,
- overwrite_data_time = <em class=changed>.true.</em>,
- new_data_days = <em class=changed>145731</em>,
- new_data_secs = <em class=changed>0</em>,
- input_is_model_advance_file = .false.,
- output_is_model_advance_file = .false.,
- overwrite_advance_time = .false.,
- new_advance_days = -1,
- new_advance_secs = -1,
- gregorian_cal = .true. /</pre>
- <P>
- The time of days = <em class=changed>145731</em>
- seconds = <em class=changed>0</em> relates to 00Z 1 Jan 2000 in the DART world.
- <br />
- <br />
- BTW - Experience has shown that having a paired (unique) atmospheric forcing
- maintains the ensemble spread better than simply forcing all the ocean
- ensemble members with one single atmospheric state.
- </P>
</div>
<a name="POP_OSSE"></a>
Deleted: DART/trunk/models/CESM/shell_scripts/MakeInitialEnsemble.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/MakeInitialEnsemble.csh 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/shell_scripts/MakeInitialEnsemble.csh 2013-07-17 22:04:54 UTC (rev 6311)
@@ -1,223 +0,0 @@
-#!/bin/tcsh
-#
-# DART software - Copyright 2004 - 2013 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$
-#
-#=============================================================================
-# So the background is that I want 40 restart files to create an initial
-# conditions file with 40 ensemble members.
-#
-# For lack of a better idea: I ran the model starting from 1996 01 01 ??Z
-# for 20 days with a 900 second timestep and a dumpFreq of 12 hours.
-# This actually generates 41 restart files, but who's counting.
-# I just deleted the LAST restart before running this script.
-#
-# We're just going to make the first restart into ensemble member 1.
-# Second restart will be ensemble member 2 ... I'm just not going to use
-# the last restart. This may not be the greatest idea - I don't know
-# how much spread we will have to start. There must be SOME ...
-# depends on the nonlinearity of the model.
-#
-# Repeatedly call pop_to_dart to turn each restart into a
-# DART initial condition file. Each DART initial conditions file
-# starts with a timestamp that reflects the valid time for the ensuing
-# model state. To generate an ensemble of initial conditions files
-# from successive restart files ... we will need to overwrite this
-# timestamp so that ALL the DART initial conditions files reflect
-# the same timestamp rather than the true timestamp.
-#
-# The call to restart_file_tool changes the time tag in the file
-# to be whatever is in the namelist. In this case, we want the time
-# tag to be 1996 01 01 00Z ... in DART-speak ... 144270 days 0 seconds.
-# tag to be 2000 01 01 00Z ... in DART-speak ... 145731 days 0 seconds.
-#
-# TJH - 28 July 2008
-
-# WARNING: You should run this in an 'empty' directory
-# WARNING: You should run this in an 'empty' directory
-# WARNING: You should run this in an 'empty' directory
-
-# Get input for this execution
-
-set RESTARTDIR = /ptmp/thoar/POP/CCSM_x3/rest
-set POPDIR = /fs/image/home/thoar/SVN/DART/models/POP/input
-set DARTEXE = /fs/image/home/thoar/SVN/DART/models/POP/work
-set DARTNML = /fs/image/home/thoar/SVN/DART/models/POP/work/input.nml
-
-# Check to see if all the pieces exist
-
-set checkstat = 0
-
-if ( -d ${RESTARTDIR} ) then
- echo "Using restart files from ${RESTARTDIR}"
-else
- echo "ERROR:restart files directory ${RESTARTDIR} does not exist."
- set checkstat = 1
-endif
-
-if ( -f ${DARTNML} ) then
- echo "Using ${DARTNML}"
-else
- echo "ERROR: ${DARTNML} does not exist."
- set checkstat = 1
-endif
-
-if ( -f ${DARTEXE}/pop_to_dart ) then
- echo "Using DART pop_to_dart from ${DARTEXE}"
-else
- echo "ERROR: ${DARTEXE}/pop_to_dart does not exist."
- echo " Build ${DARTEXE}/pop_to_dart"
- set checkstat = 1
-endif
-
-if ( -f ${DARTEXE}/restart_file_tool ) then
- echo "Using DART restart_file_tool from ${DARTEXE}"
-else
- echo "ERROR: ${DARTEXE}/restart_file_tool does not exist."
- echo " Build ${DARTEXE}/restart_file_tool"
- set checkstat = 1
-endif
-
-if ( $checkstat > 0 ) then
- echo "ERROR: required input failure."
- exit 9
-endif
-
-#-------------------------------------------------------------------------
-# The whole operation relies on the fact that there is a directory
-# somewhere that has the restart files and the corresponding input
-# files: data, data.cal - as well as (potentially) another directory
-# that has the DART namelists and executables.
-#
-# We will create a little subdirectory off the DARTEXE directory to
-# contain the DART restart files, etc.
-#-------------------------------------------------------------------------
-# pop_to_dart needs files:
-
-cp ${DARTNML} .
-cp ${POPDIR}/pop_in .
-cp ${POPDIR}/horiz_grid.gx3v5.r8ieee.le .
-cp ${POPDIR}/topography.gx3v5.i4ieee.le .
-cp ${POPDIR}/vert_grid.gx3v5 .
-
-#-------------------------------------------------------------------------
-# Ensure the namelists have the right values.
-#-------------------------------------------------------------------------
-# Need to modify rest of input.nml for test run
-# Essentially, we want the namelist block to look like:
-#&restart_file_tool_nml
-# input_file_name = "dart.ics",
-# output_file_name = "filter_updated_restart",
-# ens_size = 1,
-# single_restart_file_in = .true.,
-# single_restart_file_out = .true.,
-# write_binary_restart_files = .true.,
-# overwrite_data_time = .true.,
-# new_data_days = 145731,
-# new_data_secs = 0,
-# input_is_model_advance_file = .false.,
-# output_is_model_advance_file = .false.,
-# overwrite_advance_time = .false.,
-# new_advance_days = -1,
-# new_advance_secs = -1 /
-
-echo ':0' >! ex_commands
-echo '/restart_file_tool_nml' >> ex_commands
-echo '/input_file_name' >> ex_commands
-echo ':s/filter_restart/dart.ics/' >> 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
-
-( ex input.nml < ex_commands) >& /dev/null
-\rm -f ex_commands
-
-#-------------------------------------------------------------------------
-# Loop over all the restart files.
-#-------------------------------------------------------------------------
-
-@ member = 0
-
-foreach FILE ( ${RESTARTDIR}/*/cx3.dart.001.pop.r.*.nc )
-
- #----------------------------------------------------------------------
- # link each file to the expected name, and make sure the pop pointer
- # file has the same name.
-
- ln -sf $FILE pop.r.nc
-
- echo "pop.r.nc" >! rpointer.ocn.restart
- echo "RESTART_FMT=nc" >> rpointer.ocn.restart
-
- echo "Converting restart $FILE ..."
-
- #----------------------------------------------------------------------
- # Convert each restart file to a (single) DART restart file that has the
- # timetag for the state ... which we want to overwrite with a generic one.
- # each restart file is called assim_model_state_ud
- #----------------------------------------------------------------------
-
- ${DARTEXE}/pop_to_dart || exit 1
-
- #----------------------------------------------------------------------
- # Use the input.nml:restart_file_tool_nml value for the 'valid time'
- # The expected input filename is : assim_model_state_ud
- # The output filename is : filter_updated_restart
- #----------------------------------------------------------------------
-
- ${DARTEXE}/restart_file_tool || exit 2
-
- #----------------------------------------------------------------------
- # Rename 'generic' output file to reflect the ensemble member number.
- # At the end of the day, we need three things:
- # 1) a DART ics file for each ensemble member : ens_mem.xxxx
- # 2) a pointer file for each ensmeble member : rpointer.ocn.xxx.restart
- # 3) a POP netCDF restart file (for each ensemble member) actually,
- # since we're just grabbing the grid dimensions and calendar info
- # we could probably use just one, but we've got them, and we're just
- # creating links ... it's easy enough.
- #----------------------------------------------------------------------
- @ member = $member + 1
- set OFNAME = `printf ens_mem.%03d $member`
-
- mv filter_updated_restart $OFNAME
- echo $FILE:t >! rpointer.ocn.${member}.restart
- echo "RESTART_FMT=nc" >> rpointer.ocn.${member}.restart
- ln -sf $FILE $FILE:t
-
- #----------------------------------------------------------------------
- # remove input files to prep for next iteration
- #----------------------------------------------------------------------
-
- \rm -f pop.r.nc dart.ics
-
-end
-
-#-------------------------------------------------------------------------
-# Convert restart files to a (single) DART restart file.
-#-------------------------------------------------------------------------
-
-# cat ens_mem_* >! filter_ics
-
-#-------------------------------------------------------------------------
-# Clean out the big files that are no longer needed.
-#-------------------------------------------------------------------------
-
-#\rm -f ens_mem_*
-
-exit 0
-
-# <next few lines under version control, do not edit>
-# $URL$
-# $Revision$
-# $Date$
-
Deleted: DART/trunk/models/CESM/shell_scripts/run_filter.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/run_filter.csh 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/shell_scripts/run_filter.csh 2013-07-17 22:04:54 UTC (rev 6311)
@@ -1,522 +0,0 @@
-#!/bin/csh
-#
-# DART software - Copyright 2004 - 2013 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$
-#
-# Script to assimilate observations using DART and the POP ocean model.
-# This presumes two directories exists that contain all the required bits
-# for POP and for DART.
-#
-#=============================================================================
-# This block of directives constitutes the preamble for the LSF queuing system
-# LSF is used on the IMAGe Linux cluster 'coral'
-# LSF is used on the IBM 'bluefire'
-#
-# the normal way to submit to the queue is: bsub < run_filter
-#
-# an explanation of the most common directives follows:
-# -J Job name (master script job.csh presumes filter_server.xxxx.log)
-# -o STDOUT filename
-# -e STDERR filename
-# -P account
-# -q queue cheapest == [standby, economy, (regular,debug), premium] == $$$$
-# -n number of processors (really)
-##=============================================================================
-#
-#BSUB -J filter
-#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
-#
-##=============================================================================
-## This block of directives constitutes the preamble for the PBS queuing system
-## PBS is used on the CGD Linux cluster 'bangkok'
-## PBS is used on the CGD Linux cluster 'calgary'
-##
-## the normal way to submit to the queue is: qsub run_filter
-##
-## an explanation of the most common directives follows:
-## -N Job name
-## -r n Declare job non-rerunable
-## -e <arg> filename for standard error
-## -o <arg> filename for standard out
-## -q <arg> Queue name (small, medium, long, verylong)
-## -l nodes=xx:ppn=2 requests BOTH processors on the node. On both bangkok
-## and calgary, there is no way to 'share' the processors
-## on the node with another job, so you might as well use
-## them both. (ppn == Processors Per Node)
-##=============================================================================
-#
-#PBS -N filter
-#PBS -r n
-#PBS -e filter.err
-#PBS -o filter.log
-#PBS -q medium
-#PBS -l nodes=8:ppn=2
-
-#----------------------------------------------------------------------
-# Turns out the scripts are a lot more flexible if you don't rely on
-# the queuing-system-specific variables -- so I am converting them to
-# 'generic' names and using the generics throughout the remainder.
-#----------------------------------------------------------------------
-
-if ($?LSB_QUEUE) then
-
- #-------------------------------------------------------------------
- # This is used by LSF
- #-------------------------------------------------------------------
-
- setenv ORIGINALDIR $LS_SUBCWD
- setenv JOBNAME $LSB_JOBNAME
- setenv JOBID $LSB_JOBID
- setenv MYQUEUE $LSB_QUEUE
- setenv MYHOST $LSB_SUB_HOST
- setenv MPI mpirun.lsf
-
-else if ($?PBS_QUEUE) then
-
- #-------------------------------------------------------------------
- # This is used by PBS
- #-------------------------------------------------------------------
-
- setenv ORIGINALDIR $PBS_O_WORKDIR
- setenv JOBNAME $PBS_JOBNAME
- setenv JOBID $PBS_JOBID
- setenv MYQUEUE $PBS_QUEUE
- setenv MYHOST $PBS_O_HOST
- setenv MPI mpirun
-
-else
-
- #-------------------------------------------------------------------
- # You can run this interactively to check syntax, file motion, etc.
- #-------------------------------------------------------------------
-
- setenv ORIGINALDIR `pwd`
- setenv JOBNAME POP
- setenv JOBID $$
- setenv MYQUEUE Interactive
- setenv MYHOST $HOST
- setenv MPI csh
-
-endif
-
-#----------------------------------------------------------------------
-# Just an echo of the job attributes
-#----------------------------------------------------------------------
-
-echo
-echo "${JOBNAME} ($JOBID) submitted from $ORIGINALDIR"
-echo "${JOBNAME} ($JOBID) submitted from $MYHOST"
-echo "${JOBNAME} ($JOBID) running in queue $MYQUEUE"
-echo "${JOBNAME} ($JOBID) running on $HOST"
-echo "${JOBNAME} ($JOBID) started at "`date`
-echo
-
-#----------------------------------------------------------------------
-# Make a unique, (empty, clean) temporary directory.
-#----------------------------------------------------------------------
-
-setenv TMPDIR /ptmp/${user}/${JOBNAME}/job_${JOBID}
-
-mkdir -p ${TMPDIR}
-cd ${TMPDIR}
-
-set CENTRALDIR = `pwd`
-set myname = $0 # this is the name of this script
-
-# some systems don't like the -v option to any of the following
-
-set OSTYPE = `uname -s`
-switch ( ${OSTYPE} )
- case IRIX64:
- setenv REMOVE 'rm -rf'
- setenv COPY 'cp -p'
- setenv MOVE 'mv -f'
- breaksw
- case AIX:
- setenv REMOVE 'rm -rf'
- setenv COPY 'cp -p'
- setenv MOVE 'mv -f'
- breaksw
- default:
- setenv REMOVE 'rm -rvf'
- setenv COPY 'cp -vp'
- setenv MOVE 'mv -fv'
- breaksw
-endsw
-
-echo "${JOBNAME} ($JOBID) CENTRALDIR == $CENTRALDIR"
-
-#-----------------------------------------------------------------------------
-# Set variables containing various directory names where we will GET things
-#-----------------------------------------------------------------------------
-
-set DARTDIR = /fs/image/home/${user}/SVN/DART/models/POP
-set POPDIR = /ptmp/${user}/POP/osse
-set OBSERVATIONDIR = /ptmp/${user}/POP_OSSE/1_7_Jan2000
-
-#-----------------------------------------------------------------------------
-# Get the DART executables, scripts, and input files
-#-----------------------------------------------------------------------------
-
-# executables
- ${COPY} ${DARTDIR}/work/filter .
- ${COPY} ${DARTDIR}/work/wakeup_filter .
- ${COPY} ${DARTDIR}/work/dart_to_pop .
- ${COPY} ${DARTDIR}/work/pop_to_dart .
- ${COPY} ${DARTDIR}/work/restart_file_tool .
-
-# shell scripts
- ${COPY} ${DARTDIR}/shell_scripts/advance_model.csh .
-
-# data files
- ${COPY} ${DARTDIR}/work/input.nml .
- ${COPY} ${OBSERVATIONDIR}/obs_seq.out .
-
-#-----------------------------------------------------------------------------
-# Get the POP executable, control files, and data files.
-# trying to use the CCSM naming conventions
-#-----------------------------------------------------------------------------
-
- ${COPY} ${POPDIR}/pop .
- ${COPY} ${POPDIR}/pop_in.part1 .
- ${COPY} ${POPDIR}/pop_in.part2 .
-
- ${COPY} ${POPDIR}/gx3v5_tavg_contents .
- ${COPY} ${POPDIR}/gx3v5_movie_contents .
- ${COPY} ${POPDIR}/gx3v5_history_contents .
- ${COPY} ${POPDIR}/gx3v5_transport_contents .
-
- ${COPY} ${POPDIR}/vert_grid.gx3v5 .
- ${COPY} ${POPDIR}/horiz_grid.gx3v5.r8ieee.le .
- ${COPY} ${POPDIR}/topography.gx3v5.i4ieee.le .
-
-#-----------------------------------------------------------------------------
-# Determine the number of ensemble members from input.nml,
-# It may exist in more than one place - we will use the first instance.
-# Parse out the filter_nml string and use the next hunk of lines.
-# ditto for the advance command
-#-----------------------------------------------------------------------------
-
-set ENSEMBLESTRING = `grep -A 42 filter_nml input.nml | grep ens_size`
-set ADVANCESTRING = `grep -A 42 filter_nml input.nml | grep adv_ens_command`
-set ensemble_size = `echo $ENSEMBLESTRING[3] | sed -e "s#,##"`
-set ADV_CMD = `echo $ADVANCESTRING[3] | sed -e 's#,##' -e 's#"##g'`
-
-echo "The model advance command is ${ADV_CMD}"
-
-#-----------------------------------------------------------------------------
-# detect whether the model is supposed to run as an MPI job or not
-# by reading the "async = " from the &filter_nml namelist in input.nml.
-#-----------------------------------------------------------------------------
-
-set ASYNCSTRING = `grep -A 42 filter_nml input.nml | grep async`
-set ASYNC_TYPE = `echo $ASYNCSTRING[3] | sed -e 's#,##'`
-
-if ( "${ASYNC_TYPE}" == "0" || "${ASYNC_TYPE}" == "2") then
- set parallel_model = "false"
- echo "The model is believed to be single-threaded."
-else if ( "${ASYNC_TYPE}" == "4") then
- set parallel_model = "true"
- echo "The model is believed to be MPI-aware."
-else
- echo 'ERROR - Cannot autodetect async value in the filter_nml namelist in input.nml.'
- echo 'ERROR - hardcode the parallel_model shell variable and comment out these lines.'
- exit -1
- set parallel_model = "false"
-endif
-
-#-----------------------------------------------------------------------------
-# Block 1: convert N POP restart files to DART initial conditions file(s).
-# Since the initial ensemble may not all have the desired timestamp, we
-# will use restart_file_tool to use a consistent date in the header of
-# all the DART initial conditions files. At the end of this block,
-# we have DART restart files filter_ics.[1-N] that
-# came from pointer files rpointer.ocn.[1-N].restart
-#
-# DART requires that POP uses pointer files and that the POP restart files
-# are netCDF format. The experiment should be initialized such that there
-# are "ensemble_size" number of POP restart files and matching pointer files.
-# The pointer files should have the absolute path to the restart file.
-#
-# 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',
-#
-# &restart_file_tool_nml: <see list that follows>
-# input_file_name = "filter_restart",
-# output_file_name = "filter_updated_restart",
-# ens_size = 1,
-# single_restart_file_in = .true.,
-# single_restart_file_out = .true.,
-# overwrite_data_time = .true.,
-# overwrite_advance_time = .true.,
-# new_data_days = 144731, [1 january 2000]
-# new_data_secs = 0, [midnight]
-# input_is_model_advance_file = .false.,
-# output_is_model_advance_file = .false.,
-# gregorian_cal = .true.
-# new_advance_days = -1,
-# new_advance_secs = -1
-#-----------------------------------------------------------------------------
-# ensure namelists have desired values ...
-#-----------------------------------------------------------------------------
-
-# Gregorian 1 Jan 2000 <==> DART 145731
-
-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
-
-( ex input.nml < ex_commands ) >& /dev/null
-\rm -f ex_commands
-
-cat pop_in.part1 pop_in.part2 >! pop_in
-
-set member = 1
-while ($member <= $ensemble_size)
-
- # grap the POP pointer file and dereference it
- # Copy the POP restart file ... we will be updating it.
- # then link the POP restart file to the name for 'pop_to_dart'
- ${COPY} ${POPDIR}/rpointer.ocn.$member.restart .
- set OCN_RESTART_FILENAME = `head -1 rpointer.ocn.$member.restart`
- ${COPY} ${POPDIR}/${OCN_RESTART_FILENAME} .
- ln -sf ${OCN_RESTART_FILENAME} pop.r.nc
-
-# echo "Changing iyear of ${OCN_RESTART_FILENAME} to 2000"
-# ncatted -O -h -a iyear,global,o,l,2000 ${OCN_RESTART_FILENAME}
-
- ./pop_to_dart || exit 1
-
- ${MOVE} dart.ud filter_restart
-
- ./restart_file_tool || exit 1
-
- # set the filename expected by DART for the initial conditions
- set DART_IC_FILE = `printf filter_ics.%04d $member`
-
- ${MOVE} filter_updated_restart ${DART_IC_FILE}
-
- @ member++
-end
-
-#-----------------------------------------------------------------------------
-# A common strategy for the beginning is to check for the existence of
-# some variables that get set by the different queuing mechanisms.
-# This way, we know which queuing mechanism we are working with,
-# and can set 'queue-independent' variables for use for the remainder
-# of the script.
-
-if ($?LSB_QUEUE || $?PBS_QUEUE) then
-
- # Must be using LSF or PBS as the queueing system.
- echo "Using ${MPI} for execution"
-
- # each filter task advances the ensembles, each running on 1 proc.
- if ( "$parallel_model" == "false" ) then
-
- ${MPI} ./filter
-
- else
-
- # 1) filter runs in parallel until time to do a model advance.
- # 2) advance_model.csh successively runs N POP instances,
- # each using the entire processor set.
- # 3) wakeup_filter wakes up filter so it can continue.
-
- \rm -f model_to_filter.lock filter_to_model.lock
- mkfifo model_to_filter.lock filter_to_model.lock
-
- set filterhome = ~/.filter$$
- if ( ! -e $filterhome) mkdir $filterhome
-
- # this starts filter but also returns control back to
- # this script immediately.
-
- ( setenv HOME $filterhome; ${MPI} ./filter ) &
-
- while ( -e filter_to_model.lock )
-
- set todo=`cat < filter_to_model.lock`
- echo "todo received, value = ${todo}"
-
- if ( "${todo}" == "finished" ) then
- echo "main script: filter done."
- wait
- break
-
- else if ( "${todo}" == "advance" ) then
-
- echo "calling model advance now:"
- ./advance_model.csh 0 ${ensemble_size} filter_control00000 || exit 9
-
- echo "restarting filter."
- ${MPI} ./wakeup_filter
-
- else
-
- echo "main script: unexpected value received."
- break
-
- endif
-
- end
-
- echo "filter finished, removing pipes."
- \rm -f model_to_filter.lock filter_to_model.lock
-
- if ( -d $filterhome) rmdir $filterhome
- endif
-
-else
-
- # If you have a linux cluster with no queuing software, use this
- # section. The list of computational nodes is given to the mpirun
- # command and it assigns them as they appear in the file. In some
- # cases it seems to be necessary to wrap the command in a small
- # script that changes to the current directory before running.
-
- echo "running with no queueing system"
- echo "This is untested for POP -- ending now."
- exit
-
- # before running this script, do this once. the syntax is
- # node name : how many tasks you can run on it
- #setenv MYNODEFILE ~/nodelist
- #echo "node7:2" >! $MYNODEFILE
- #echo "node5:2" >> $MYNODEFILE
- #echo "node3:2" >> $MYNODEFILE
- #echo "node1:2" >> $MYNODEFILE
-
-# for compas
- setenv NUM_PROCS `cat nodelist-pgi | wc -l`
- set MPIRUN = /opt/mpich/myrinet/pgi/bin/mpirun
- setenv MPI "$MPIRUN -np $NUM_PROCS -nolocal -machinefile nodelist-pgi"
-
-# for atlas-pgi
- setenv NUM_PROCS `cat nodelist-pgi | wc -l`
- set MPIRUN = /share/apps/mpich1/pgi/bin/mpirun
- setenv MPI "$MPIRUN -np $NUM_PROCS -nolocal -machinefile nodelist-pgi"
-
-# for atlas-gfortran
- set MPIRUN = /share/apps/openmpi/gfortran/bin/mpirun
- setenv MPI "$MPIRUN --hostfile nodelist-gfortran --mca mtl mx --mca pml cm -np 72"
-
- echo "MPI = ${MPI}"
-
- # filter runs in parallel until time to do a model advance,
- # and then this script starts up the mitgcmuv jobs, each one
- # running in parallel. then it runs wakeup_filter to wake
- # up filter so it can continue.
-
- \rm -f model_to_filter.lock filter_to_model.lock
- mkfifo model_to_filter.lock filter_to_model.lock
-
- set filterhome = ~/.filter$$
- if ( ! -e $filterhome) mkdir $filterhome
-
- # this starts filter but also returns control back to
- # this script immediately.
-
- (setenv HOME $filterhome; ${MPI} ./filter) &
-
- while ( -e filter_to_model.lock )
-
- set todo=`cat < filter_to_model.lock`
- echo "todo received, value = ${todo}"
-
- if ( "${todo}" == "finished" ) then
- echo "main script: filter done."
- wait
- break
-
- else if ( "${todo}" == "advance" ) then
-
- # the second number below must match the number
- # of ensembles. Also, in input.nml, the advance model
- # command must have -np N with N equal to the number
- # of processors this job is using.
-
- echo "calling model advance now:"
- ./advance_model.csh 0 ${ensemble_size} filter_control00000 || exit 9
-
- echo "restarting filter."
- ${MPI} ./wakeup_filter
-
- else
-
- echo "main script: unexpected value received."
- break
-
- endif
-
- end
-
- echo "filter finished, removing pipes."
- \rm -f model_to_filter.lock filter_to_model.lock
-
- if ( -d $filterhome) rmdir $filterhome
-
-endif
-
-#-----------------------------------------------------------------------------
-# Move the output to storage after filter completes.
-# At this point, all the restart,diagnostic files are in the CENTRALDIR
-# and need to be moved to the 'experiment permanent' directory.
-# We have had problems with some, but not all, files being moved
-# correctly, so we are adding bulletproofing to check to ensure the filesystem
-# has completed writing the files, etc. Sometimes we get here before
-# all the files have finished being written.
-#-----------------------------------------------------------------------------
-
-echo "${JOBNAME} ($JOBID) finished at "`date`
-echo "Listing contents of CENTRALDIR before archiving"
-ls -l
-
-exit 0
-
-${MOVE} *.data *.meta ${experiment}/POP
-${MOVE} data data.cal ${experiment}/POP
-${MOVE} STD* ${experiment}/POP
-
-${MOVE} filter_restart* ${experiment}/DART
-${MOVE} assim_model_state_ud[1-9]* ${experiment}/DART
-${MOVE} assim_model_state_ic[1-9]* ${experiment}/DART
-${MOVE} Posterior_Diag.nc ${experiment}/DART
-${MOVE} Prior_Diag.nc ${experiment}/DART
-${MOVE} obs_seq.final ${experiment}/DART
-${MOVE} dart_log.out ${experiment}/DART
-
-# Good style dictates that you save the scripts so you can see what worked.
-
-${COPY} input.nml ${experiment}/DART
-${COPY} *.csh ${experiment}/DART
-${COPY} $myname ${experiment}/DART
-
-ls -lrt
-
-exit 0
-
-# <next few lines under version control, do not edit>
-# $URL$
-# $Revision$
-# $Date$
-
Modified: DART/trunk/models/CESM/shell_scripts/run_perfect_model_obs.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/run_perfect_model_obs.csh 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/CESM/shell_scripts/run_perfect_model_obs.csh 2013-07-17 22:04:54 UTC (rev 6311)
@@ -219,7 +219,7 @@
./pop_to_dart || exit 1
-${MOVE} dart.ud perfect_ics
+${MOVE} dart_ics perfect_ics
#-----------------------------------------------------------------------------
# Run perfect_model_obs ... harvest the observations to populate obs_seq.out
Modified: DART/trunk/models/NAAPS/dart_to_naaps.f90
===================================================================
--- DART/trunk/models/NAAPS/dart_to_naaps.f90 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/dart_to_naaps.f90 2013-07-17 22:04:54 UTC (rev 6311)
@@ -43,7 +43,7 @@
! The namelist variables
!------------------------------------------------------------------
-character(len=128) :: dart_to_naaps_input_file = 'dart.ic'
+character(len=128) :: dart_to_naaps_input_file = 'dart_restart'
logical :: advance_time_present = .true.
logical :: verbose = .false.
namelist /dart_to_naaps_nml/ dart_to_naaps_input_file, &
Modified: DART/trunk/models/NAAPS/dart_to_naaps.nml
===================================================================
--- DART/trunk/models/NAAPS/dart_to_naaps.nml 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/dart_to_naaps.nml 2013-07-17 22:04:54 UTC (rev 6311)
@@ -1,5 +1,5 @@
&dart_to_naaps_nml
- dart_to_naaps_input_file = 'dart.ic',
+ dart_to_naaps_input_file = 'dart_restart',
advance_time_present = .true.,
verbose = .false.,
/
Modified: DART/trunk/models/NAAPS/model_mod_check.f90
===================================================================
--- DART/trunk/models/NAAPS/model_mod_check.f90 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/model_mod_check.f90 2013-07-17 22:04:54 UTC (rev 6311)
@@ -53,7 +53,7 @@
! The namelist variables
!------------------------------------------------------------------
-character (len = 129) :: dart_input_file = 'dart.ics'
+character (len = 129) :: dart_input_file = 'dart_ics'
character (len = 129) :: output_file = 'check_me'
logical :: advance_time_present = .FALSE.
logical :: verbose = .FALSE.
Modified: DART/trunk/models/NAAPS/model_mod_check.nml
===================================================================
--- DART/trunk/models/NAAPS/model_mod_check.nml 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/model_mod_check.nml 2013-07-17 22:04:54 UTC (rev 6311)
@@ -1,5 +1,5 @@
&model_mod_check_nml
- dart_input_file = 'dart.ud',
+ dart_input_file = 'dart_ics',
output_file = 'check_me',
advance_time_present = .FALSE.,
verbose = .FALSE.,
Modified: DART/trunk/models/NAAPS/naaps_to_dart.f90
===================================================================
--- DART/trunk/models/NAAPS/naaps_to_dart.f90 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/naaps_to_dart.f90 2013-07-17 22:04:54 UTC (rev 6311)
@@ -43,7 +43,7 @@
! namelist parameters with default values.
!-----------------------------------------------------------------------
-character(len=128) :: naaps_to_dart_output_file = 'dart.ud'
+character(len=128) :: naaps_to_dart_output_file = 'dart_ics'
namelist /naaps_to_dart_nml/ naaps_to_dart_output_file
Modified: DART/trunk/models/NAAPS/naaps_to_dart.nml
===================================================================
--- DART/trunk/models/NAAPS/naaps_to_dart.nml 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/naaps_to_dart.nml 2013-07-17 22:04:54 UTC (rev 6311)
@@ -1,4 +1,4 @@
&naaps_to_dart_nml
- naaps_to_dart_output_file = 'dart.ud',
+ naaps_to_dart_output_file = 'dart_ics',
/
Modified: DART/trunk/models/NAAPS/shell_scripts/assimilate.csh
===================================================================
--- DART/trunk/models/NAAPS/shell_scripts/assimilate.csh 2013-07-17 19:40:39 UTC (rev 6310)
+++ DART/trunk/models/NAAPS/shell_scripts/assimilate.csh 2013-07-17 22:04:54 UTC (rev 6311)
@@ -134,9 +134,9 @@
# At the end of the block, we have DART restart files filter_ics.[1-N]
#
# DART namelist settings appropriate/required:
-# &filter_nml: restart_in_file_name = 'filter_ics'
-# &ensemble_manager_nml: single_restart_file_in = '.false.'
-# &naaps_to_dart_nml: naaps_to_dart_output_file = 'dart.ud',
+# &ensemble_manager_nml: single_restart_file_in = '.false.'
+# &filter_nml: restart_in_file_name = 'filter_ics'
+# &naaps_to_dart_nml: naaps_to_dart_output_file = 'dart_ics',
#-------------------------------------------------------------------------
set member = 1
@@ -154,7 +154,7 @@
# the slash in the filename screws up 'sed' ... unless
@@ Diff output truncated at 40000 characters. @@
More information about the Dart-dev
mailing list