[Dart-dev] [3697] DART/trunk/utilities: Added documentation for namelist, added option to set gregorian calendar

nancy at ucar.edu nancy at ucar.edu
Tue Dec 9 18:26:54 MST 2008


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20081209/22116ea9/attachment.html
-------------- next part --------------
Modified: DART/trunk/utilities/restart_file_tool.f90
===================================================================
--- DART/trunk/utilities/restart_file_tool.f90	2008-12-09 23:09:51 UTC (rev 3696)
+++ DART/trunk/utilities/restart_file_tool.f90	2008-12-10 01:26:54 UTC (rev 3697)
@@ -16,7 +16,8 @@
 use types_mod,           only : r8
 use time_manager_mod,    only : time_type, operator(<), operator(==), &
                                 set_time_missing, set_time,           &
-                                operator(/=), print_time, print_date
+                                operator(/=), print_time, print_date, &
+                                set_calendar_type, GREGORIAN
 
 use utilities_mod,       only : initialize_utilities, register_module,    &
                                 error_handler, nmlfileunit, E_MSG, E_ERR,  &
@@ -66,6 +67,7 @@
 logical               :: overwrite_advance_time       = .false.
 type(time_type)       :: advance_time, old_advance_time
 integer               :: new_advance_days = -1, new_advance_secs = -1
+logical               :: gregorian_cal = .true.
 
 namelist /restart_file_tool_nml/  &
    input_file_name,              &
@@ -81,7 +83,8 @@
    output_is_model_advance_file, &
    overwrite_advance_time,       &
    new_advance_days,             &
-   new_advance_secs
+   new_advance_secs,             &
+   gregorian_cal
 
 
 !----------------------------------------------------------------
@@ -103,6 +106,11 @@
 if (do_output()) write(nmlfileunit, nml=restart_file_tool_nml)
 if (do_output()) write(     *     , nml=restart_file_tool_nml)
 
+! if you are not using a gregorian cal, set this to false
+! in the namelist
+if (gregorian_cal) call set_calendar_type(GREGORIAN)
+
+
 ! ens_size is in the filter namelist, and the single restart file flags
 ! are in the ensemble manager namelist.  how do i get access to them
 ! here without replication?  write accessor routines for those parms

Modified: DART/trunk/utilities/restart_file_tool.html
===================================================================
--- DART/trunk/utilities/restart_file_tool.html	2008-12-09 23:09:51 UTC (rev 3696)
+++ DART/trunk/utilities/restart_file_tool.html	2008-12-10 01:26:54 UTC (rev 3697)
@@ -78,7 +78,7 @@
 
 <P>
 The files named <em class=code>temp_ic</em> or 
-<em class=code>assim_model_state_ic00001</em> contain the same
+<em class=code>assim_model_state_ic.0001</em> contain the same
 information as a normal restart file but the data for each
 ensemble is preceeded by an additional
 timestamp which indicates to the model advance code how far in time
@@ -88,10 +88,16 @@
 
 <P>
 Note that the output from the model advance, <em class=code>temp_ud</em>
-or <em class=code>assim_model_state_ud00001</em>, are normal restart
+or <em class=code>assim_model_state_ud.0001</em>, are normal restart
 files without the extra timestamp.
 </P>
 
+<P>
+Optional namelist interface
+<A HREF="#Namelist"><em class=code>&amp;restart_file_tool_nml</em> </A>
+may be read from file <em class=file>input.nml</em>.
+</P>
+
 <!--==================================================================-->
 
 <A NAME="OTHER MODULES USED"></A>
@@ -120,6 +126,111 @@
 </P>
 
 
+<!--============== DESCRIPTION OF A NAMELIST ========================-->
+ <A NAME="Namelist"></A>
+<BR><HR><BR>
+<H2>NAMELIST</H2>
+ <P>We adhere to the F90 standard of starting a namelist with an ampersand
+ '&amp;' and terminating with a slash '/'.
+ <div class=namelist><pre>
+ <em class=call>namelist / restart_file_tool / </em> 
+   input_file_name, output_file_name, ens_size, single_restart_file_in,
+   single_restart_file_out, write_binary_restart_files, overwrite_data_time,
+   new_data_days, new_data_secs, input_is_model_advance_file, output_is_model_advance_file,
+   overwrite_advance_time, new_advance_days, new_advance_secs, gregorian_cal  /
+
+
+
+ </pre></div>
+ <H3 class=indent1>Discussion</H3>
+ <P>
+The namelist sets the behavior of this tool.
+ </em>
+ </P>
+ <P>This namelist is read in a file called <em class=file>input.nml</em>
+ </P>
+ <TABLE border=0 cellpadding=10 width=100%>
+ <TR><TH align=left>Contents    </TH>
+     <TH align=left>Type        </TH>
+     <TH align=left>Description </TH></TR>
+ <TR><!--contents--><TD valign=top>input_file_name</TD>
+     <!--  type  --><TD valign=top>character</TD>
+     <!--descript--><TD valign=top>Filename containing the DART restart data.  If
+                   'single_restart_file_in' is .true., this is the exact filename.
+                   If 'single_restart_file_in' is .false. this is the base name and
+                   '.ens_num' will be appended to each name before being opened.
+                   Default "filter_restart"</TD></TR>
+ <TR><!--contents--><TD valign=top>output_file_name</TD>
+     <!--  type  --><TD valign=top>character</TD>
+     <!--descript--><TD valign=top>Filename to be created.  If
+                   'single_restart_file_out' is .true., this is the exact filename.
+                   If 'single_restart_file_out' is .false. this is the base name and
+                   '.ens_num' will be appended to each name before being created.
+                   Default "filter_updated_restart"</TD></TR>
+ <TR><!--contents--><TD valign=top>ens_size</TD>
+     <!--  type  --><TD valign=top>integer</TD>
+     <!--descript--><TD valign=top>Number of ensemble members.
+                   Default 1</TD></TR>
+ <TR><!--contents--><TD valign=top>single_restart_file_in</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>Whether the input filename contains a single ensemble 
+                   member or multiple members concatinated in the same file.
+                   Default .true.</TD></TR>
+ <TR><!--contents--><TD valign=top>single_restart_file_out</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>Whether to create an output file which contains a single
+                   member or multiple members concatinated in the same file.
+                   Default .true.</TD></TR>
+ <TR><!--contents--><TD valign=top>write_binary_restart_files</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>Whether to write the data in ascii or binary.  The
+                   format of the input file will be detected automatically.
+                   Default .true.</TD></TR>
+ <TR><!--contents--><TD valign=top>overwrite_data_time</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>Whether to replace the timestamp in the input with a 
+                   new time.  If true, new_data_days and new_data_secs must be set to valid values.
+                   Default .false.</TD></TR>
+ <TR><!--contents--><TD valign=top>new_data_days</TD>
+     <!--  type  --><TD valign=top>integer</TD>
+     <!--descript--><TD valign=top>Day number if replacing the timestamp in the file.
+                   Default -1</TD></TR>
+ <TR><!--contents--><TD valign=top>new_data_secs</TD>
+     <!--  type  --><TD valign=top>integer</TD>
+     <!--descript--><TD valign=top>Seconds if replacing the timestamp in the file.
+                   Default -1</TD></TR>
+ <TR><!--contents--><TD valign=top>input_is_model_advance_file</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>If true, this file was written to be read by a
+                   model advance conversion program and contains two timestamps.
+                   Default .false.</TD></TR>
+ <TR><!--contents--><TD valign=top>output_is_model_advance_file</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>Whether to write a file with two timestamps as output.
+                   Default .false.</TD></TR>
+ <TR><!--contents--><TD valign=top>overwrite_advance_time</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>Replace existing advance time.
+                   Default .false.</TD></TR>
+ <TR><!--contents--><TD valign=top>new_advance_days</TD>
+     <!--  type  --><TD valign=top>integer</TD>
+     <!--descript--><TD valign=top>If overwrite_advance_time is true, replace time with this value.
+                   Default -1</TD></TR>
+ <TR><!--contents--><TD valign=top>new_advance_secs</TD>
+     <!--  type  --><TD valign=top>integer</TD>
+     <!--descript--><TD valign=top>Seconds for replacement time.
+                   Default -1</TD></TR>
+ <TR><!--contents--><TD valign=top>gregorian_cal</TD>
+     <!--  type  --><TD valign=top>logical</TD>
+     <!--descript--><TD valign=top>If model uses the gregorian calendar, this program will
+                   print out the date in both day number and seconds, but also in calendar
+                   year/month/date etc format. Set to false if this model does not use this
+                   calendar.
+                   Default .true.</TD></TR>
+ </TABLE>
+ <BR>
+
+
 <!--==================================================================-->
 
 <!--==================================================================-->

Modified: DART/trunk/utilities/restart_file_tool.nml
===================================================================
--- DART/trunk/utilities/restart_file_tool.nml	2008-12-09 23:09:51 UTC (rev 3696)
+++ DART/trunk/utilities/restart_file_tool.nml	2008-12-10 01:26:54 UTC (rev 3697)
@@ -13,7 +13,8 @@
    output_is_model_advance_file = .false.,
    overwrite_advance_time       = .false.,
    new_advance_days             = -1, 
-   new_advance_secs             = -1
+   new_advance_secs             = -1,
+   gregorian_cal                = .true.
 /
 
 


More information about the Dart-dev mailing list