[Dart-dev] [6622] DART/trunk/models: The POP setup_pmo had problems with the handling of the TRUTHinstance ...

nancy at ucar.edu nancy at ucar.edu
Tue Nov 26 16:42:39 MST 2013


Revision: 6622
Author:   thoar
Date:     2013-11-26 16:42:38 -0700 (Tue, 26 Nov 2013)
Log Message:
-----------
The POP setup_pmo had problems with the handling of the TRUTHinstance ... the stream files
do not have leading zeros. The CLM stream files DO. Both the CESM and CAM setup scripts
should error out if CESM_DART_config fails. They do now.
Tidied up some whitespace problems from the last commit.

Modified Paths:
--------------
    DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_hybrid
    DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_pmo
    DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_hybrid
    DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_pmo
    DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_hybrid
    DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_pmo
    DART/trunk/models/clm/shell_scripts/CESM1_1_1_setup_hybrid
    DART/trunk/models/clm/shell_scripts/CESM1_1_1_setup_pmo

-------------- next part --------------
Modified: DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_hybrid
===================================================================
--- DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_hybrid	2013-11-25 23:41:56 UTC (rev 6621)
+++ DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_hybrid	2013-11-26 23:42:38 UTC (rev 6622)
@@ -98,13 +98,13 @@
 # ==============================================================================
 # case options:
 #
-# case        The value of "case" will be used many ways; directory and file names, 
-#             both locally and on HPSS, and script names; so consider its length and 
-#             information content.
-# compset     Must be one of the CESM standard names, see the CESM documentation
-#             for supported strings.
-# resolution  Sets the model grid resolution, see the CESM documentation.
-# cesmtag     The version of the CESM source code to use when building the code.
+# case          The value of "case" will be used many ways; directory and file
+#               names both locally and on HPSS, and script names; so consider
+#               its length and information content.
+# compset       Must be one of the CESM standard names, see the CESM documentation
+#               for supported strings.
+# resolution    Sets the model grid resolution, see the CESM documentation.
+# cesmtag       The version of the CESM source code to use when building the code.
 # num_instances The number of ensemble members.
 # ==============================================================================
 
@@ -153,7 +153,7 @@
 # refyear    The specific date/time-of-day in the reference case that this
 # refmon     run will start from.  (Also see 'runtime settings' below for
 # refday     start_year, start_mon, start_day and start_tod.)
-# reftod 
+# reftod
 #
 # stagedir   The directory location of the reference case files.
 # ==============================================================================
@@ -184,7 +184,7 @@
 #
 # resubmit      How many job steps to run on continue runs (should be 0 initially)
 # stop_option   Units for determining the forecast length between assimilations
-# first_stop_n  Number of time units in the first forecast 
+# first_stop_n  Number of time units in the first forecast
 # stop_n        Number of time units in all subsequent forecasts
 #
 # clm_dtime     CLM dynamical timestep (in seconds) ... 1800 is the default
@@ -264,7 +264,7 @@
 # have it run.  however, for running a real experiment there are still many
 # settings below this point - e.g. component namelists, history file options,
 # the processor layout, xml file options, etc - that you will almost certainly
-# want to change before doing a real science run. 
+# want to change before doing a real science run.
 # ==============================================================================
 # ==============================================================================
 
@@ -427,7 +427,7 @@
 # namelists are changed in the hybrid run. In a hybrid initialization, the ocean
 # model does not start until the second ocean coupling (normally the second day),
 # and the coupler does a "cold start" without a restart file."
-
+#
 # TJH:
 # DART's CAM implementation causes a bit more complexity. DART only uses CAM _initial_
 # files, not RESTART files, so there are sourcemods to force a hybrid start for CAM to
@@ -542,7 +542,7 @@
 # correctly given the modifications of CAM for DART. It also copies several
 # required DART files to the caseroot directory.
 
-./CESM_DART_config
+./CESM_DART_config || exit -3
 
 # ==============================================================================
 # Update source files.
@@ -620,6 +620,7 @@
    # ===========================================================================
    set fname = "user_nl_cam${inst_string}"
    # ===========================================================================
+   # ATM Namelist
    # For a HOP TEST ... empty_htapes = .false.
    # For a HOP TEST ... use a default fincl1
    # inithist == 'ENDOFRUN' ensures that CAM writes an initial file every time it stops.
@@ -635,8 +636,7 @@
    # ===========================================================================
    set fname = "user_nl_clm${inst_string}"
    # ===========================================================================
-
-   # Customize the land namelists
+   # LAND Namelist
    # The filename is built using the REFCASE/REFDATE/REFTOD information.
    #
    # This is the time to consider how DART and CESM will interact.  If you intend
@@ -666,20 +666,19 @@
    # ===========================================================================
    set fname = "user_nl_pop2${inst_string}"
    # ===========================================================================
-
-   # POP Namelists
+   # POP Namelist
    # init_ts_suboption = 'data_assim'   for non bit-for-bit restarting (assimilation mode)
    # init_ts_suboption = 'rest'         --> default behavior
-#
+   #
    # README:
    # Configuring the contents of the history files for POP is best explained in
    # the section marked "POP2: TAVG Settings" in the cesm1_1_1 pop2 namelist documentation
    # http://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/modelnl/nl_pop2.html
-#
+   #
    # and the CESM-specific documentation for the tavg output variables in the pop2
    # online documentation:
    # http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/users/node78.html
-#
+   #
    # In CESM1_1_1 keep the values for tavg_file_freq_opt and tavg_freq_opt identical.
    # pop2/trunk_tags/cesm_pop_2_1_20130412  explains the issue.
    #
@@ -698,14 +697,15 @@
    # ===========================================================================
    set fname = "user_nl_cice${inst_string}"
    # ===========================================================================
-   # CICE Namelists
+   # CICE Namelist
 
    echo "ice_ic = '${refcase}.cice${inst_string}.r.${reftimestamp}.nc'" >> ${fname}
 
    # ===========================================================================
    set fname = "user_nl_rtm${inst_string}"
    # ===========================================================================
-   # RIVER RUNOFF CAN START FROM AN OLD CLM RESTART FILE
+   # RIVERRUNOFF Namelist
+   # River runoff can start from an old clm restart file.
    # you can specify the RTM filename here and override the settings from
    # RUN_REFCASE/RUN_REFDATE/RUN_REFTOD (something you cannot do with CLM).
 
@@ -821,7 +821,7 @@
       end
 
       # There is only a single coupler restart file even in the multi-instance case.
-      echo "${case}.cpl.r.\${restart_time}.nc"     >! rpointer.drv
+      echo "${case}.cpl.r.\${restart_time}.nc" >! rpointer.drv
 
    endif
 
@@ -866,7 +866,7 @@
       @ inst ++
    end
 
-   echo "All files reset to rerun the FIRST experiment step at time" $init_time
+   echo "All files set to run the FIRST experiment step at time" $init_time
 
 endif
 exit 0

Modified: DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_pmo
===================================================================
--- DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_pmo	2013-11-25 23:41:56 UTC (rev 6621)
+++ DART/trunk/models/CESM/shell_scripts/CESM1_1_1_setup_pmo	2013-11-26 23:42:38 UTC (rev 6622)
@@ -109,13 +109,13 @@
 # ==============================================================================
 # case options:
 #
-# case        The value of "case" will be used many ways; directory and file names, 
-#             both locally and on HPSS, and script names; so consider its length and 
-#             information content.
-# compset     Must be one of the CESM standard names, see the CESM documentation
-#             for supported strings.
-# resolution  Sets the model grid resolution, see the CESM documentation.
-# cesmtag     The version of the CESM source code to use when building the code.
+# case          The value of "case" will be used many ways; directory and file
+#               names both locally and on HPSS, and script names; so consider
+#               its length and information content.
+# compset       Must be one of the CESM standard names, see the CESM documentation
+#               for supported strings.
+# resolution    Sets the model grid resolution, see the CESM documentation.
+# cesmtag       The version of the CESM source code to use when building the code.
 # ==============================================================================
 
 setenv case                 cesm_6h_pmo
@@ -162,21 +162,21 @@
 # refyear    The specific date/time-of-day in the reference case that this
 # refmon     run will start from.  (Also see 'runtime settings' below for
 # refday     start_year, start_mon, start_day and start_tod.)
-# reftod 
+# reftod
 #
 # SingleInstanceRefcase
-#            Filenames from a multi-instance CESM run have an instance number 
+#            Filenames from a multi-instance CESM run have an instance number
 #            in them.  Filenames from a single instance CESM run do not.
-#            Setting this helps the script figure out the right filenames to 
+#            Setting this helps the script figure out the right filenames to
 #            generate when copying files from the refernenc case:
 #               1 means the restart files have no instance numbers.
 #               0 means the restart files have strings like .0001. in their names.
 #
-# TRUTHinstance  
+# TRUTHinstance
 #            If SingleInstanceRefcase is 0, this must be set to select the
 #            specific instance you want to use when selecting one instance from
-#            a multi-instance run.  e.g. If you have a reference case run 
-#            with 80 instances, 1<= TRUTHinstance <= 80.
+#            a multi-instance run.  e.g. If you have a reference case run
+#            with 80 instances, 1<= TRUTHinstance <= 80. NO LEADING ZEROS.
 #
 # stagedir   The directory location of the reference case files.
 # ==============================================================================
@@ -210,7 +210,7 @@
 #
 # resubmit      How many job steps to run on continue runs (should be 0 initially)
 # stop_option   Units for determining the forecast length between assimilations
-# first_stop_n  Number of time units in the first forecast 
+# first_stop_n  Number of time units in the first forecast
 # stop_n        Number of time units in all subsequent forecasts
 #
 # clm_dtime     CLM dynamical timestep (in seconds) ... 1800 is the default
@@ -290,7 +290,7 @@
 # have it run.  however, for running a real experiment there are still many
 # settings below this point - e.g. component namelists, history file options,
 # the processor layout, xml file options, etc - that you will almost certainly
-# want to change before doing a real science run. 
+# want to change before doing a real science run.
 # ==============================================================================
 # ==============================================================================
 
@@ -438,7 +438,7 @@
 # namelists are changed in the hybrid run. In a hybrid initialization, the ocean
 # model does not start until the second ocean coupling (normally the second day),
 # and the coupler does a "cold start" without a restart file."
-
+#
 # TJH:
 # DART's CAM implementation causes a bit more complexity. DART only uses CAM _initial_
 # files, not RESTART files, so there are sourcemods to force a hybrid start for CAM to
@@ -553,7 +553,7 @@
 # correctly given the modifications of CAM for DART. It also copies several
 # required DART files to the caseroot directory.
 
-./CESM_DART_config
+./CESM_DART_config || exit -3
 
 # ==============================================================================
 # Update source files.
@@ -631,6 +631,7 @@
    # ===========================================================================
    set fname = "user_nl_cam${inst_string}"
    # ===========================================================================
+   # ATM Namelist
    # For a HOP TEST ... empty_htapes = .false.
    # For a HOP TEST ... use a default fincl1
    # inithist == 'ENDOFRUN' ensures that CAM writes an initial file every time it stops.
@@ -646,9 +647,10 @@
    # ===========================================================================
    set fname = "user_nl_clm${inst_string}"
    # ===========================================================================
-
-   # Customize the land namelists
-   # The filename is built using the REFCASE/REFDATE/REFTOD information.
+   # LAND Namelist
+   # With a RUN_TYPE=hybrid the finidat is automatically specified
+   # using the REFCASE/REFDATE/REFTOD information. i.e.
+   # finidat = ${stagedir}/${refcase}.clm2${inst_string}.r.${reftimestamp}.nc
    #
    # This is the time to consider how DART and CESM will interact.  If you intend
    # on assimilating flux tower observations (nominally at 30min intervals),
@@ -661,10 +663,18 @@
    # from the .h1. file rather than trying to create them from the subset of
    # CLM variables that are available in the DART state vector.
    #
+   # Making a (compact) .h0. file is a good idea, since the clm restart files
+   # do not have all the metadata required to reconstruct a gridded field.
+   #
    # For a HOP TEST ... hist_empty_htapes = .false.
    # For a HOP TEST ... use a default hist_fincl1
    #
-   # FIXME ... add documentation for configuring CLM history files
+   # Every 6 hours
+   # echo "hist_mfilt  = 1"              >> ${fname}
+   # echo "hist_nhtfrq = -$stop_n"       >> ${fname}
+   # Every month
+   # echo "hist_mfilt  = 1"              >> ${fname}
+   # echo "hist_nhtfrq = 0"              >> ${fname}
 
    echo "dtime             = $clm_dtime,"            >> ${fname}
    echo "hist_empty_htapes = .true."   >> ${fname}
@@ -677,20 +687,19 @@
    # ===========================================================================
    set fname = "user_nl_pop2${inst_string}"
    # ===========================================================================
-
-   # POP Namelists
+   # POP Namelist
    # init_ts_suboption = 'data_assim'   for non bit-for-bit restarting (assimilation mode)
    # init_ts_suboption = 'rest'         --> default behavior
-#
+   #
    # README:
    # Configuring the contents of the history files for POP is best explained in
    # the section marked "POP2: TAVG Settings" in the cesm1_1_1 pop2 namelist documentation
    # http://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/modelnl/nl_pop2.html
-#
+   #
    # and the CESM-specific documentation for the tavg output variables in the pop2
    # online documentation:
    # http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/users/node78.html
-#
+   #
    # In CESM1_1_1 keep the values for tavg_file_freq_opt and tavg_freq_opt identical.
    # pop2/trunk_tags/cesm_pop_2_1_20130412  explains the issue.
    #
@@ -709,14 +718,15 @@
    # ===========================================================================
    set fname = "user_nl_cice${inst_string}"
    # ===========================================================================
-   # CICE Namelists
+   # CICE Namelist
 
    echo "ice_ic = '${refcase}.cice${inst_string}.r.${reftimestamp}.nc'" >> ${fname}
 
    # ===========================================================================
    set fname = "user_nl_rtm${inst_string}"
    # ===========================================================================
-   # RIVER RUNOFF CAN START FROM AN OLD CLM RESTART FILE
+   # RIVERRUNOFF Namelist
+   # River runoff can start from an old clm restart file.
    # you can specify the RTM filename here and override the settings from
    # RUN_REFCASE/RUN_REFDATE/RUN_REFTOD (something you cannot do with CLM).
 
@@ -876,7 +886,7 @@
                           ${refcase}.cice\${inst_string}.r.${init_time}.nc
 
       ${LINK} ${stagedir}/${refcase}.cam\${true_string}.i.${init_time}.nc  \
-                          cam_initial\${inst_string}.nc
+                             cam_initial\${inst_string}.nc
 
       ${LINK} ${stagedir}/${refcase}.rtm\${true_string}.r.${init_time}.nc  \
                           ${refcase}.rtm\${inst_string}.r.${init_time}.nc
@@ -894,7 +904,7 @@
       @ inst ++
    end
 
-   echo "All files reset to rerun the FIRST experiment step at time" $init_time
+   echo "All files set to run the FIRST experiment step at time" $init_time
 
 endif
 exit 0

Modified: DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_hybrid
===================================================================
--- DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_hybrid	2013-11-25 23:41:56 UTC (rev 6621)
+++ DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_hybrid	2013-11-26 23:42:38 UTC (rev 6622)
@@ -90,13 +90,13 @@
 # ==============================================================================
 # case options:
 #
-# case        The value of "case" will be used many ways; directory and file names, 
-#             both locally and on HPSS, and script names; so consider its length and 
-#             information content.
-# compset     Must be one of the CESM standard names, see the CESM documentation
-#             for supported strings.
-# resolution  Sets the model grid resolution, see the CESM documentation.
-# cesmtag     The version of the CESM source code to use when building the code.
+# case          The value of "case" will be used many ways; directory and file
+#               names both locally and on HPSS, and script names; so consider
+#               its length and information content.
+# compset       Must be one of the CESM standard names, see the CESM documentation
+#               for supported strings.
+# resolution    Sets the model grid resolution, see the CESM documentation.
+# cesmtag       The version of the CESM source code to use when building the code.
 # num_instances The number of ensemble members.
 # ==============================================================================
 
@@ -145,7 +145,7 @@
 # refyear    The specific date/time-of-day in the reference case that this
 # refmon     run will start from.  (Also see 'runtime settings' below for
 # refday     start_year, start_mon, start_day and start_tod.)
-# reftod 
+# reftod
 #
 # stagedir   The directory location of the reference case files.
 # ==============================================================================
@@ -180,7 +180,7 @@
 #
 # resubmit      How many job steps to run on continue runs (should be 0 initially)
 # stop_option   Units for determining the forecast length between assimilations
-# first_stop_n  Number of time units in the first forecast 
+# first_stop_n  Number of time units in the first forecast
 # stop_n        Number of time units in all subsequent forecasts
 #
 # If the long-term archiver is off, you get a chance to examine the files before
@@ -256,7 +256,7 @@
 # have it run.  however, for running a real experiment there are still many
 # settings below this point - e.g. component namelists, history file options,
 # the processor layout, xml file options, etc - that you will almost certainly
-# want to change before doing a real science run. 
+# want to change before doing a real science run.
 # ==============================================================================
 # ==============================================================================
 
@@ -420,8 +420,8 @@
 # model does not start until the second ocean coupling (normally the second day),
 # and the coupler does a "cold start" without a restart file."
 #
-# A hybrid start is better for POP because the velocities are used rather than 
-# just T,S. A hybrid start is also more desirable because initial values can be 
+# A hybrid start is better for POP because the velocities are used rather than
+# just T,S. A hybrid start is also more desirable because initial values can be
 # specified for ROF - as opposed to just zeros.
 
 ./xmlchange RUN_TYPE=hybrid
@@ -580,7 +580,7 @@
    # ===========================================================================
    set fname = "user_nl_datm${inst_string}"
    # ===========================================================================
-
+   # DATM Namelist
    echo "dtlimit  = 1.5, 1.5"               >> ${fname}
    echo "fillalgo = 'nn', 'nn'"             >> ${fname}
    echo "fillmask = 'nomask','nomask'"      >> ${fname}
@@ -596,7 +596,7 @@
    # ===========================================================================
    set fname = "user_nl_cice${inst_string}"
    # ===========================================================================
-   # CICE Namelists
+   # CICE Namelist
    # this is only used for a hybrid start, else rpointers are used.
 
    echo "ice_ic = '${refcase}.cice${inst_string}.r.${reftimestamp}.nc'" >> $fname
@@ -604,20 +604,19 @@
    # ===========================================================================
    set fname = "user_nl_pop2${inst_string}"
    # ===========================================================================
-
-   # POP Namelists
+   # POP Namelist
    # init_ts_suboption = 'data_assim'   for non bit-for-bit restarting (assimilation mode)
    # init_ts_suboption = 'rest'         --> default behavior
-#
+   #
    # README:
    # Configuring the contents of the history files for POP is best explained in
    # the section marked "POP2: TAVG Settings" in the cesm1_1_1 pop2 namelist documentation
    # http://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/modelnl/nl_pop2.html
-#
+   #
    # and the CESM-specific documentation for the tavg output variables in the pop2
    # online documentation:
    # http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/users/node78.html
-#
+   #
    # In CESM1_1_1 keep the values for tavg_file_freq_opt and tavg_freq_opt identical.
    # pop2/trunk_tags/cesm_pop_2_1_20130412  explains the issue.
    #
@@ -679,6 +678,7 @@
 
 # Replace each default stream txt file with one that uses the CAM DATM
 # conditions for a default year and modify the instance number.
+# The stream files for POP have no leading zeros in the instance number.
 
 foreach FNAME (user*streams*)
    set name_parse = `echo ${FNAME} | sed 's/\_/ /g'`
@@ -693,7 +693,7 @@
 
       ${COPY} $dartroot/models/POP/shell_scripts/user_$streamname*template ${FNAME}
 
-      sed s/NINST/$instance/g   ${FNAME} >! out.$$
+      sed s/NINST/$instance/g ${FNAME} >! out.$$
       ${MOVE} out.$$ ${FNAME}
 
    else
@@ -812,7 +812,7 @@
       end
 
       # There is only a single coupler restart file even in the multi-instance case.
-      echo "${case}.cpl.r.\${restart_time}.nc"     >! rpointer.drv
+      echo "${case}.cpl.r.\${restart_time}.nc" >! rpointer.drv
 
    endif
 
@@ -847,7 +847,7 @@
       @ inst ++
    end
 
-   echo "All files reset to rerun the FIRST experiment step at time" $init_time
+   echo "All files set to run the FIRST experiment step at time" $init_time
 
 endif
 exit 0

Modified: DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_pmo
===================================================================
--- DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_pmo	2013-11-25 23:41:56 UTC (rev 6621)
+++ DART/trunk/models/POP/shell_scripts/CESM1_1_1_setup_pmo	2013-11-26 23:42:38 UTC (rev 6622)
@@ -23,7 +23,6 @@
 # That means this script performs a lot of manipulation of the 'instance'
 # portion of the filenames, which seems unnecessary initially.
 #
-#
 # This script results in a viable setup for a CESM single instance experiment.
 # You are STRONGLY encouraged to run the single instance CESM a few times and
 # experiment with different settings BEFORE you try to generate 'perfect'
@@ -91,13 +90,13 @@
 # ==============================================================================
 # case options:
 #
-# case        The value of "case" will be used many ways; directory and file names, 
-#             both locally and on HPSS, and script names; so consider its length and 
-#             information content.
-# compset     Must be one of the CESM standard names, see the CESM documentation
-#             for supported strings.
-# resolution  Sets the model grid resolution, see the CESM documentation.
-# cesmtag     The version of the CESM source code to use when building the code.
+# case          The value of "case" will be used many ways; directory and file
+#               names both locally and on HPSS, and script names; so consider
+#               its length and information content.
+# compset       Must be one of the CESM standard names, see the CESM documentation
+#               for supported strings.
+# resolution    Sets the model grid resolution, see the CESM documentation.
+# cesmtag       The version of the CESM source code to use when building the code.
 # ==============================================================================
 
 setenv case                 pop_pmo
@@ -144,21 +143,21 @@
 # refyear    The specific date/time-of-day in the reference case that this
 # refmon     run will start from.  (Also see 'runtime settings' below for
 # refday     start_year, start_mon, start_day and start_tod.)
-# reftod 
+# reftod
 #
 # SingleInstanceRefcase
-#            Filenames from a multi-instance CESM run have an instance number 
+#            Filenames from a multi-instance CESM run have an instance number
 #            in them.  Filenames from a single instance CESM run do not.
-#            Setting this helps the script figure out the right filenames to 
+#            Setting this helps the script figure out the right filenames to
 #            generate when copying files from the refernenc case:
 #               1 means the restart files have no instance numbers.
 #               0 means the restart files have strings like .0001. in their names.
 #
-# TRUTHinstance  
+# TRUTHinstance
 #            If SingleInstanceRefcase is 0, this must be set to select the
 #            specific instance you want to use when selecting one instance from
-#            a multi-instance run.  e.g. If you have a reference case run 
-#            with 80 instances, 1<= TRUTHinstance <= 80.
+#            a multi-instance run.  e.g. If you have a reference case run
+#            with 80 instances, 1<= TRUTHinstance <= 80. NO LEADING ZEROS.
 #
 # stagedir   The directory location of the reference case files.
 # ==============================================================================
@@ -196,7 +195,7 @@
 #
 # resubmit      How many job steps to run on continue runs (should be 0 initially)
 # stop_option   Units for determining the forecast length between assimilations
-# first_stop_n  Number of time units in the first forecast 
+# first_stop_n  Number of time units in the first forecast
 # stop_n        Number of time units in all subsequent forecasts
 #
 # If the long-term archiver is off, you get a chance to examine the files before
@@ -272,7 +271,7 @@
 # have it run.  however, for running a real experiment there are still many
 # settings below this point - e.g. component namelists, history file options,
 # the processor layout, xml file options, etc - that you will almost certainly
-# want to change before doing a real science run. 
+# want to change before doing a real science run.
 # ==============================================================================
 # ==============================================================================
 
@@ -421,8 +420,8 @@
 # model does not start until the second ocean coupling (normally the second day),
 # and the coupler does a "cold start" without a restart file."
 #
-# A hybrid start is better for POP because the velocities are used rather than 
-# just T,S. A hybrid start is also more desirable because initial values can be 
+# A hybrid start is better for POP because the velocities are used rather than
+# just T,S. A hybrid start is also more desirable because initial values can be
 # specified for ROF - as opposed to just zeros.
 
 ./xmlchange RUN_TYPE=hybrid
@@ -581,7 +580,7 @@
    # ===========================================================================
    set fname = "user_nl_datm${inst_string}"
    # ===========================================================================
-
+   # DATM Namelist
    echo "dtlimit  = 1.5, 1.5"               >> ${fname}
    echo "fillalgo = 'nn', 'nn'"             >> ${fname}
    echo "fillmask = 'nomask','nomask'"      >> ${fname}
@@ -597,7 +596,7 @@
    # ===========================================================================
    set fname = "user_nl_cice${inst_string}"
    # ===========================================================================
-   # CICE Namelists
+   # CICE Namelist
    # this is only used for a hybrid start, else rpointers are used.
 
    if ( $SingleInstanceRefcase ) then
@@ -611,20 +610,19 @@
    # ===========================================================================
    set fname = "user_nl_pop2${inst_string}"
    # ===========================================================================
-
-   # POP Namelists
+   # POP Namelist
    # init_ts_suboption = 'data_assim'   for non bit-for-bit restarting (assimilation mode)
    # init_ts_suboption = 'rest'         --> default behavior
-#
+   #
    # README:
    # Configuring the contents of the history files for POP is best explained in
    # the section marked "POP2: TAVG Settings" in the cesm1_1_1 pop2 namelist documentation
    # http://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/modelnl/nl_pop2.html
-#
+   #
    # and the CESM-specific documentation for the tavg output variables in the pop2
    # online documentation:
    # http://www.cesm.ucar.edu/models/cesm1.1/pop2/doc/users/node78.html
-#
+   #
    # In CESM1_1_1 keep the values for tavg_file_freq_opt and tavg_freq_opt identical.
    # pop2/trunk_tags/cesm_pop_2_1_20130412  explains the issue.
    #
@@ -686,15 +684,16 @@
 
 # Replace each default stream txt file with one that uses the CAM DATM
 # conditions for a default year and modify the instance number.
+# The stream files for POP have no leading zeros in the instance number.
 
 foreach FNAME (user*streams*)
    set name_parse = `echo ${FNAME} | sed 's/\_/ /g'`
    @ filename_index = $#name_parse
    set streamname = $name_parse[$filename_index]
    if ( $SingleInstanceRefcase ) then
-      set true_string = ''
+      set instance = ''
    else
-      set true_string = `printf _%04d $TRUTHinstance`
+      set instance = `echo $TRUTHinstance | bc`
    endif
 
    if (-e $dartroot/models/POP/shell_scripts/user_$streamname*template) then
@@ -703,7 +702,7 @@
 
       ${COPY} $dartroot/models/POP/shell_scripts/user_$streamname*template ${FNAME}
 
-      sed s/NINST/$true_string/g   ${FNAME} >! out.$$
+      sed s/NINST/$instance/g ${FNAME} >! out.$$
       ${MOVE} out.$$ ${FNAME}
 
    else
@@ -822,7 +821,7 @@
       end
 
       # The coupler file has no instance string.
-      echo "${case}.cpl.r.\${restart_time}.nc"     >! rpointer.drv
+      echo "${case}.cpl.r.\${restart_time}.nc" >! rpointer.drv
 
    endif
 
@@ -857,7 +856,7 @@
       @ inst ++
    end
 
-   echo "All files reset to rerun the FIRST experiment step at time" $init_time
+   echo "All files set to run the FIRST experiment step at time" $init_time
 
 endif
 exit 0

Modified: DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_hybrid
===================================================================
--- DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_hybrid	2013-11-25 23:41:56 UTC (rev 6621)
+++ DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_hybrid	2013-11-26 23:42:38 UTC (rev 6622)
@@ -13,7 +13,7 @@
 # ---------------------
 #
 # This script is designed to set up, stage, and build a multi-instance run
-# of CESM using an F compset where CAM and CLM are active. The initial states
+# of CESM using an F compset where CAM, CLM and CICE are active. The initial state
 # come from a single multi-instance reference case so a CESM hybrid setup
 # is used.
 #
@@ -99,17 +99,17 @@
 # ==============================================================================
 # case options:
 #
-# case        The value of "case" will be used many ways; directory and file names, 
-#             both locally and on HPSS, and script names; so consider its length and 
-#             information content.
-# compset     Must be one of the CESM standard names, see the CESM documentation
-#             for supported strings.
-# resolution  Sets the model grid resolution, see the CESM documentation.
-# cesmtag     The version of the CESM source code to use when building the code.
+# case          The value of "case" will be used many ways; directory and file
+#               names both locally and on HPSS, and script names; so consider
+#               its length and information content.
+# compset       Must be one of the CESM standard names, see the CESM documentation
+#               for supported strings.
+# resolution    Sets the model grid resolution, see the CESM documentation.
+# cesmtag       The version of the CESM source code to use when building the code.
 # num_instances The number of ensemble members.
 #
 # BUG 1384 applies here, so ocean and atm/land must be at same resolution.
-#   0.9x1.25_0.9x1.25 (f09_f09).  This is roughly a 1 deg grid for atm/lnd, 
+#   0.9x1.25_0.9x1.25 (f09_f09).  This is roughly a 1 deg grid for atm/lnd,
 #   gx1v6 mask. Normally used for CAM with prescribed lnd, ocn and ice.
 # ==============================================================================
 
@@ -160,7 +160,7 @@
 # refyear    The specific date/time-of-day in the reference case that this
 # refmon     run will start from.  (Also see 'runtime settings' below for
 # refday     start_year, start_mon, start_day and start_tod.)
-# reftod 
+# reftod
 #
 # stagedir   The directory location of the reference case files.
 # ==============================================================================
@@ -273,7 +273,7 @@
 # have it run.  however, for running a real experiment there are still many
 # settings below this point - e.g. component namelists, history file options,
 # the processor layout, xml file options, etc - that you will almost certainly
-# want to change before doing a real science run. 
+# want to change before doing a real science run.
 # ==============================================================================
 # ==============================================================================
 
@@ -443,7 +443,7 @@
 # namelists are changed in the hybrid run. In a hybrid initialization, the ocean
 # model does not start until the second ocean coupling (normally the second day),
 # and the coupler does a "cold start" without a restart file."
-
+#
 # TJH:
 # DART's CAM implementation causes a bit more complexity. DART only uses CAM _initial_
 # files, not RESTART files, so there are sourcemods to force a hybrid start for CAM to
@@ -558,7 +558,7 @@
 # correctly given the modifications of CAM for DART. It also copies several
 # required DART files to the caseroot directory.
 
-./CESM_DART_config
+./CESM_DART_config || exit -3
 
 # ==============================================================================
 # Update source files.
@@ -631,6 +631,7 @@
    # ===========================================================================
    set fname = "user_nl_cam${inst_string}"
    # ===========================================================================
+   # ATM Namelist
    # For a HOP TEST ... empty_htapes = .false.
    # For a HOP TEST ... use a default fincl1
    # inithist == 'ENDOFRUN' ensures that CAM writes an initial file every time it stops.
@@ -686,16 +687,19 @@
    # ===========================================================================
    set fname = "user_nl_clm${inst_string}"
    # ===========================================================================
-
-   # Customize the land namelists
-   # The filename is built using the REFCASE/REFDATE/REFTOD information.
-   # Making a compact .h0. file is a good idea, since the clm restart files
-   # do not have all the metadata required to reconstruct a gridded field.
-   # 'TSA' is 2m surface air temperature.
+   # LAND Namelist
+   # With a RUN_TYPE=hybrid the finidat is automatically specified
+   # using the REFCASE/REFDATE/REFTOD information. i.e.
+   # finidat = ${stagedir}/${refcase}.clm2${inst_string}.r.${reftimestamp}.nc
+   #
    # TJH ... should make monthly average file or something ...
    # 1.3 MB is 100x bigger than CAM history file. See page 65 of
    # http://www.cesm.ucar.edu/models/cesm1.1/clm/models/lnd/clm/doc/UsersGuide/clm_ug.pdf
    #
+   # Making a (compact) .h0. file is a good idea, since the clm restart files
+   # do not have all the metadata required to reconstruct a gridded field.
+   # 'TSA' is 2m surface air temperature.
+   #
    # Every 6 hours
    # echo "hist_mfilt  = 1"              >> ${fname}
    # echo "hist_nhtfrq = -$stop_n"       >> ${fname}
@@ -712,7 +716,7 @@
    # ===========================================================================
    set fname = "user_nl_cice${inst_string}"
    # ===========================================================================
-   # CICE Namelists
+   # CICE Namelist
 
    echo "ice_ic = '${refcase}.cice${inst_string}.r.${reftimestamp}.nc'" >> ${fname}
 
@@ -857,7 +861,7 @@
       @ inst ++
    end
 
-   echo "All files reset to rerun the FIRST experiment step at time" $init_time
+   echo "All files set to run the FIRST experiment step at time" $init_time
 
 endif
 exit 0

Modified: DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_pmo
===================================================================
--- DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_pmo	2013-11-25 23:41:56 UTC (rev 6621)
+++ DART/trunk/models/cam/shell_scripts/CESM1_1_1_setup_pmo	2013-11-26 23:42:38 UTC (rev 6622)
@@ -13,7 +13,7 @@
 # ---------------------
 #
 # This script is designed to set up, stage, and build a single-instance run
-# of CESM using an F compset where CAM and CLM are active. The initial state
+# of CESM using an F compset where CAM, CLM and CICE are active. The initial state
 # can come from a single multi-instance reference case so a CESM hybrid setup
 # is used.
 #
@@ -101,16 +101,16 @@
 # ==============================================================================
 # case options:
 #
-# case        The value of "case" will be used many ways; directory and file names, 
-#             both locally and on HPSS, and script names; so consider its length and 
-#             information content.
-# compset     Must be one of the CESM standard names, see the CESM documentation
-#             for supported strings.
-# resolution  Sets the model grid resolution, see the CESM documentation.
-# cesmtag     The version of the CESM source code to use when building the code.
+# case          The value of "case" will be used many ways; directory and file
+#               names both locally and on HPSS, and script names; so consider
+#               its length and information content.
+# compset       Must be one of the CESM standard names, see the CESM documentation
+#               for supported strings.
+# resolution    Sets the model grid resolution, see the CESM documentation.
+# cesmtag       The version of the CESM source code to use when building the code.
 #
 # BUG 1384 applies here, so ocean and atm/land must be at same resolution.
-#   0.9x1.25_0.9x1.25 (f09_f09).  This is roughly a 1 deg grid for atm/lnd, 
+#   0.9x1.25_0.9x1.25 (f09_f09).  This is roughly a 1 deg grid for atm/lnd,
 #   gx1v6 mask. Normally used for CAM with prescribed lnd, ocn and ice.
 # ==============================================================================
 
@@ -160,21 +160,21 @@
 # refyear    The specific date/time-of-day in the reference case that this
 # refmon     run will start from.  (Also see 'runtime settings' below for
 # refday     start_year, start_mon, start_day and start_tod.)
-# reftod 
+# reftod
 #
 # SingleInstanceRefcase
-#            Filenames from a multi-instance CESM run have an instance number 
+#            Filenames from a multi-instance CESM run have an instance number
 #            in them.  Filenames from a single instance CESM run do not.
-#            Setting this helps the script figure out the right filenames to 
+#            Setting this helps the script figure out the right filenames to
 #            generate when copying files from the refernenc case:
 #               1 means the restart files have no instance numbers.
 #               0 means the restart files have strings like .0001. in their names.
 #
-# TRUTHinstance  
+# TRUTHinstance
 #            If SingleInstanceRefcase is 0, this must be set to select the
 #            specific instance you want to use when selecting one instance from

@@ Diff output truncated at 40000 characters. @@


More information about the Dart-dev mailing list