[Dart-dev] [6499] DART/trunk/doc/html/boilerplate: update all the formatting for these programs, and add a couple

nancy at ucar.edu nancy at ucar.edu
Tue Oct 8 16:38:57 MDT 2013


Revision: 6499
Author:   nancy
Date:     2013-10-08 16:38:57 -0600 (Tue, 08 Oct 2013)
Log Message:
-----------
update all the formatting for these programs, and add a couple
more for other kinds of repetative sections.  also updated
the template and boilerplate to be more consistent with how
we're formatting the html files in the system now.  this is
all because i found a module with no docs at all and i didn't
want to type it all in from scratch.  so to save that time
i spent a couple hours updating these programs. :/  
now i'll go back and create the html doc page that's missing.

Modified Paths:
--------------
    DART/trunk/doc/html/boilerplate/boilerplate.html
    DART/trunk/doc/html/boilerplate/html_function.f90
    DART/trunk/doc/html/boilerplate/html_namelist.f90
    DART/trunk/doc/html/boilerplate/html_subroutine.f90
    DART/trunk/doc/html/boilerplate/template.html

Added Paths:
-----------
    DART/trunk/doc/html/boilerplate/html_functoc.f90
    DART/trunk/doc/html/boilerplate/html_type.f90

-------------- next part --------------
Modified: DART/trunk/doc/html/boilerplate/boilerplate.html
===================================================================
--- DART/trunk/doc/html/boilerplate/boilerplate.html	2013-10-08 17:15:24 UTC (rev 6498)
+++ DART/trunk/doc/html/boilerplate/boilerplate.html	2013-10-08 22:38:57 UTC (rev 6499)
@@ -2,23 +2,22 @@
           "http://www.w3.org/TR/html4/strict.dtd">
 <HTML>
 <HEAD>
-<TITLE>module xxxxxxx</TITLE>
-<!-- note ... DART/doc/html/doc.css is the true location -->
-<link rel="stylesheet" type="text/css" href="doc.css" />
-<link href="../images/dart.ico" rel="shortcut icon" />
+<TITLE>PROGRAM OR MODULE name_of_thing</TITLE>
+<link rel="stylesheet" type="text/css" href="../doc/html/doc.css" />
+<link href="../doc/images/dart.ico" rel="shortcut icon" />
 </HEAD>
 <BODY>
 <A NAME="TOP"></A>
 
-<H1>MODULE xxxxxxx</H1>
+<H1>PROGRM OR MODULE name_of_thing</H1>
 
-<table border=0 summary="" cellpadding=5>
+<table border=0 summary="dart header" cellpadding=5>
 <tr>
     <td valign=middle>
-    <img src="../../doc/images/Dartboard7.png" alt="DART project logo" height=70 />
+    <img src="../doc/images/Dartboard7.png" alt="DART project logo" height=70 />
     </td>
     <td>
-       <P>Jump to <a href="../../index.html">DART Documentation Main Index</a><br />
+       <P>Jump to <a href="../index.html">DART Documentation Main Index</a><br />
           <small><small>version information for this file: <br />
           <!-- version tag follows, do not edit -->
           $Id$</small></small>
@@ -27,6 +26,7 @@
 </table>
 
 <A HREF="#Namelist">NAMELIST</A> /
+<A HREF="#ModulesUsed">MODULES USED</A> /
 <A HREF="#Interface">INTERFACES</A> /
 <A HREF="#FilesUsed">FILES</A> /
 <A HREF="#References">REFERENCES</A> /
@@ -40,99 +40,71 @@
 <P>
    This is the place for the general description of the module
    or program or whatever.
-   <br><br>
+</P>
+<P>
    overview issues, how/when/why to use this thing, etc.
-   <br><br>
-   Atmospheric driver for the dry B-grid dynamical core and 
-   Held-Suarez benchmark (aka simple_physics).
 </P>
+<P>
+   more stuff about code, usage, etc.
+</P>
 
 <!--==================================================================-->
 <!--=================== DESCRIPTION OF A NAMELIST  ===================-->
 <!--==================================================================-->
 
 <A NAME="Namelist"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>NAMELIST</H2>
+<P>
+DART namelists are
+always read from file <em class=file>input.nml</em>.
+</P>
 <P>We adhere to the F90 standard of starting a namelist with an ampersand
 '&amp;' and terminating with a slash '/' for all our namelist input.
-Consider yourself forewarned that character strings that contain a '/' must be
-enclosed in quotes to prevent them from prematurely terminating the namelist.
-The namelist declaration (i.e. what follows) has a different syntax, naturally.
+Character strings that contain a '/' must be
+enclosed in quotes to prevent them from
+prematurely terminating the namelist.
 </P>
+
 <div class=namelist>
 <pre>
-<em class=call>namelist / model_nml / </em> &amp;
-    ens_size, spin_up_steps, num_steps, output_start, ens_spin_up_steps, &amp;
-    obs_freq, cov_inflate, mean_inflate, restart, add_on, noise_amp
+&amp;NAMELIST_NML 
+   name=value,
+   name=value, 
+   name=value
+/
 </pre>
 </div>
 
-<div class=indent1><!-- Description -->
+<br />
+<br />
 
-<P>
-This namelist is read in a file called <em class=file>input.nml</em>
-</P>
+<div>
+<TABLE border=0 cellpadding=10 width=100% summary='namelist description'>
+<THEAD align=left>
+<TR><TH> Item </TH>
+    <TH> Type </TH>
+    <TH> Description </TH> 
+</TR>
+</THEAD>
 
-<TABLE border=0 cellpadding=3 width=100%>
-<TR><TH align=left>Contents    </TH>
-    <TH align=left>Type        </TH>
-    <TH align=left>Description </TH></TR>
-<TR><!--contents--><TD valign=top>ens_size             </TD>
-    <!--  type  --><TD valign=top>integer <em class="unit">[default: 0]</em></TD>
-    <!--descript--><TD>The number of "i" and "j" rows processed each time the 
-                       modular physics is called.      </TD></TR>
-
-<TR><!--contents--><TD valign=top>spin_up_steps        </TD>
-    <!--  type  --><TD valign=top>integer              </TD>
-    <!--descript--><TD>the month                       </TD></TR>
-
-<TR><!--contents--><TD valign=top>num_steps            </TD>
-    <!--  type  --><TD valign=top>real(r8)             </TD>
-    <!--descript--><TD>the day-of-month                </TD></TR>
-
-<TR><!--contents--><TD valign=top>output_start         </TD>
-    <!--  type  --><TD valign=top>real(r4)             </TD>
-    <!--descript--><TD>the hour-of-day                 </TD></TR>
-
-<TR><!--contents--><TD valign=top>ens_spin_up_steps    </TD>
-    <!--  type  --><TD valign=top>real(r4)             </TD>
-    <!--descript--><TD>the minute                      </TD></TR>
-
-<TR><!--contents--><TD valign=top>obs_freq,            </TD>
-    <!--  type  --><TD valign=top>real(r4)             </TD>
-    <!--descript--><TD>the second                      </TD></TR>
-
-<TR><!--contents--><TD valign=top>cov_inflate          </TD>
-    <!--  type  --><TD valign=top>real(r8)             </TD>
-    <!--descript--><TD>uniformly monotonic time        </TD></TR>
-
-<TR><!--contents--><TD valign=top>mean_inflate         </TD>
-    <!--  type  --><TD valign=top>character(len=80)    </TD>
-    <!--descript--><TD>the type of calendar being used </TD></TR>
-
-<TR><!--contents--><TD valign=top>restart              </TD>
-    <!--  type  --><TD valign=top>integer              </TD>
-    <!--descript--><TD>the type of calendar being used </TD></TR>
-
-<TR><!--contents--><TD valign=top>add_on               </TD>
-    <!--  type  --><TD valign=top>integer              </TD>
-    <!--descript--><TD>the type of calendar being used </TD></TR>
-
-<TR><!--contents--><TD valign=top>noise_amp            </TD>
-    <!--  type  --><TD valign=top>integer              </TD>
-    <!--descript--><TD>the type of calendar being used </TD></TR>
-
+<TBODY valign=top>
+<TR><TD>name</TD>
+    <TD>type</TD>
+    <TD>(often multi-line) description
+    </TD>
+</TR>
+<!-- repeat until done -->
+</TBODY>
 </TABLE>
 
 </div>
-<br>
+<br />
 
-
 <!--==================================================================-->
 
 <A NAME="Interface"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>OTHER MODULES USED</H2>
 <PRE>
 types_mod
@@ -150,10 +122,11 @@
 <!--Note to authors. The first row of the table is different.         -->
 <!--==================================================================-->
 
-<HR>
+<A NAME="Interface"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>PUBLIC INTERFACES</H2>
 
-<TABLE>
+<TABLE summary='interface list'>
 <TR><TD><em class=call>use xxxxxxx, only : </em></TD>
                    <TD><A HREF="#yyypubtype1">yyypubtype1</A></TD></TR>
 <TR><TD>&nbsp;</TD><TD><A HREF="#yyyroutine1">yyyroutine1</A></TD></TR>
@@ -167,8 +140,9 @@
    <em class=optionalcode>[like this]</em>.
 </P>
 
-<!--=================== DESCRIPTION OF A LOCAL TYPE ==================-->
+<!-- replicate sections below as needed -->
 
+<!--=================== DESCRIPTION OF A LOCAL TYPE ==================-->
 <A NAME="yyypubtype1"></A>
 <br>
 <div class=routine>
@@ -186,96 +160,35 @@
    If we don't know where we are, how do we know which exit to take?
 </P>
 
-<TABLE border=0 cellpadding=3 width=100%>
+<TABLE border=0 cellpadding=3 width=100% summary='argument details'>
+<THEAD align=left>
+<TR><TH> Component </TH>
+    <TH> Description </TH>
+</TR>
+</THEAD>
 
-<TR><TH align=left>Component   </TH>
-    <TH align=left>Description </TH></TR>
-
-<TR><TD valign=top> x                       </TD>
-    <TD>is the nondimensional distance [0,1]</TD></TR>
-
+<TBODY valign=top>
+<TR><TD> x </TD>
+    <TD> is the nondimensional distance [0,1] </TD>
+</TR>
+</TBODY>
 </TABLE>
 
 </div>
 <br>
 
-<!--=================== DESCRIPTION OF A LOCAL TYPE ==================-->
-
-<A NAME="yyypubtype2"></A>
-<br>
-<div class=routine>
-<pre>
-<em class=call>type time_type</em>
-   private
-   integer           :: year
-   integer           :: month
-   integer           :: day
-   integer           :: hour
-   integer           :: minute
-   integer           :: second
-   real(r8)          :: umt
-   character(len=80) :: calendar
-end type time_type
-</pre>
-</div>
-
-<div class=indent1><!-- Description -->
-
-<P>The time type is ubiquitous throughout the module. Given the value
-of <em class=code>calendar</em>, everything should be pretty clear. 
-<em class=code>calendar</em> may take on several values:
-<em class=code>julian</em>,
-<em class=code>nondimensional</em>,
-<em class=code>uniformleap</em>,
-<em class=code>threesixty</em>.
-</P>
-
-<TABLE border=0 cellpadding=3 width=100%>
-
-<TR><TH align=left>Component  </TH>
-    <TH align=left>Description          </TH></TR>
-
-<TR><TD valign=top>year                 </TD>
-    <TD>the (non-negative) year         </TD></TR>
-
-<TR><TD valign=top>month                </TD>
-    <TD>the month                       </TD></TR>
-
-<TR><TD valign=top>day                  </TD>
-    <TD>the day-of-month                </TD></TR>
-
-<TR><TD valign=top>hour                 </TD>
-    <TD>the hour-of-day                 </TD></TR>
-
-<TR><TD valign=top>minute               </TD>
-    <TD>the minute                      </TD></TR>
-
-<TR><TD valign=top>second               </TD>
-    <TD>the second                      </TD></TR>
-
-<TR><TD valign=top>umt                  </TD>
-    <TD>uniformly monotonic time        </TD></TR>
-
-<TR><TD valign=top>calendar             </TD>
-    <TD>the type of calendar being used </TD></TR>
-
-</TABLE>
-
-</div>
-<br>
-
 <!--===================== DESCRIPTION OF A ROUTINE =====================-->
 
 <A NAME="yyyroutine1"></A>
 <br>
 <div class=routine>
-<em class=call>call yyyroutine1( var1, var2, var3
+<em class=call>subroutine yyyroutine1( var1, var2, var3
                <em class=optionalcode>[,&nbsp;global]</em>)</em>
 <pre>
 type(time_type),          intent(in)    :: <em class=code> var1 </em>
 real(r8), dimension(:),   intent(inout) :: <em class=code> var2 </em>
 real(r8), dimension(:,:), intent(out)   :: <em class=code> var3 </em>
-real(r8), OPTIONAL,       intent(in)    :: <em class=optionalcode> global </em>
+real(r8), optional,       intent(in)    :: <em class=optionalcode> global </em>
 </pre>
 </div>
 
@@ -290,24 +203,25 @@
    slices, dices and makes julienne fries. <em>But wait!</em> There's more!
 </P>
 
-<TABLE width=100% border=0 summary="" cellpadding=3>
-
-<TR><TD valign=top><em class=code>var1</em></TD>
-    <TD>is the number of spark plugs in a '67 Cuda.</TD></TR>
-
-<TR><TD valign=top><em class=code>var2</em></TD>
+<TABLE width=100% border=0 summary="" cellpadding=3 summary='argument details'>
+<TBODY valign=top>
+<TR><TD><em class=code>var1</em></TD>
+    <TD>is the number of spark plugs in a '67 Cuda.</TD>
+</TR>
+<TR><TD><em class=code>var2</em></TD>
     <TD>is used for both input and output. Upon input, this contains the furlongs 
         per weekday for every vertical level. Upon exit, we now have the number of 
-        spotted gobies per square hectare at that level. </TD></TR>
-
-<TR><TD valign=top><em class=code>var3</em></TD>
+        spotted gobies per square hectare at that level. </TD>
+</TR>
+<TR><TD><em class=code>var3</em></TD>
     <TD>The leftmost dimension pertains to the number of feet in an orange-footed 
         brush fowl, indiginous to Australia. The next dimension is the number of 
-        feathers on said fowl, naturally.</TD></TR>
-
-<TR><TD valign=top><em class=optionalcode>global</em></TD>
-    <TD>is really, REALLY useful in certain situations.</TD></TR>
-
+        feathers on said fowl, naturally.</TD>
+</TR>
+<TR><TD><em class=optionalcode>global</em></TD>
+    <TD>is really, REALLY useful in certain situations.</TD>
+</TR>
+</TBODY>
 </TABLE>
 
 <P>
@@ -322,14 +236,14 @@
 <A NAME="yyyroutine2"></A>
 <br>
 <div class=routine>
-<em class=call> var = yyyroutine2( var1, var2, var3,
+<em class=call> function yyyroutine2( var1, var2, var3,
                <em class=optionalcode>[,bob]</em> )</em>
 <pre>
 type(time_type),          intent(in)  :: <em class=code> var1 </em>
 real(r8), dimension(:),   intent(in)  :: <em class=code> var2 </em>
 real(r8), dimension(:,:), intent(in)  :: <em class=code> var3 </em>
-real(r8), OPTIONAL,       intent(in)  :: <em class=optionalcode> bob </em>
-integer, dimension(size(var2))        :: <em class=code> var </em>
+real(r8), optional,       intent(in)  :: <em class=optionalcode> bob </em>
+integer, dimension(size(var2))        :: <em class=code> yyyroutine2 </em>
 </pre>
 </div>
 
@@ -345,24 +259,24 @@
    deep fries.
 </P>
 
-<TABLE width=100% border=0 summary="" cellpadding=3>
-
-<TR><TD valign=top><em class=code>var1&nbsp;&nbsp;</em></TD>
+<TABLE width=100% border=0 summary="" cellpadding=3 summary='argument details'>
+<TBODY valign=top>
+<TR><TD><em class=code>var1</em></TD>
     <TD>the first time you changed your oil.</TD></TR>
 
-<TR><TD valign=top><em class=code>var2</em></TD>
+<TR><TD><em class=code>var2</em></TD>
     <TD>miles between every oil change you've ever done. Don't lie.</TD></TR>
 
-<TR><TD valign=top><em class=code>var3</em></TD>
+<TR><TD><em class=code>var3</em></TD>
     <TD>the distances you've ridden. Each row corresponds to the hour-of-day,
         each column is a different day-of-the-week.</TD></TR>
 
-<TR><TD valign=top><em class=optionalcode>bob</em></TD>
+<TR><TD><em class=optionalcode>bob</em></TD>
     <TD>mean time between failures. in msec.</TD></TR>
 
-<TR><TD valign=top><em class=code>var</em></TD>
+<TR><TD><em class=code>yyroutine2</em></TD>
     <TD>number of gray hairs as a function of time. in kilohairs.</TD></TR>
-
+</TBODY>
 </TABLE>
 
 <P>
@@ -377,16 +291,21 @@
 <!--==================================================================-->
 
 <A NAME="FilesUsed"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>FILES</H2>
 <P>This is the place to discuss the files that are associated with
    this module. They could be input files, output files, data files,
    shell scripts ... anything.
 </P>
 
-<TABLE border=0 >
-<TR><TH align=left>filename</TH>
-    <TH align=left>purpose</TH></TR>
+<TABLE border=0  summary='files used'>
+<THEAD align=left>
+<TR><TH>filename</TH>
+    <TH>purpose</TH>
+</TR>
+</THEAD>
+
+<TBODY>
 <TR><TD>inputfile1</TD>
     <TD>to read some input </TD></TR>
 <TR><TD>input.nml</TD>
@@ -400,6 +319,7 @@
 <TR><TD>dart_log.nml [default name]</TD>
     <TD>the record of all the namelists actually USED - 
         contains the default values</TD></TR>
+</TBODY>
 </TABLE>
 
 <!--==================================================================-->
@@ -407,12 +327,11 @@
 <!--==================================================================-->
 
 <A NAME="References"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>REFERENCES</H2>
 <ul>
-<li>Anderson,&nbsp;J.,&nbsp;T.&nbsp;Hoar,&nbsp;K.&nbsp;Raeder,
-    H.&nbsp;Liu,&nbsp;N.&nbsp;Collins,&nbsp;R.&nbsp;Torn,
-    and&nbsp;A.&nbsp;Arellano,&nbsp;2009:<br>
+<li>Anderson,&nbsp;J., T.&nbsp;Hoar, K.&nbsp;Raeder, H.&nbsp;Liu, 
+    N.&nbsp;Collins, R.&nbsp;Torn, and A.&nbsp;Arellano, 2009:<br>
     The Data Assimilation Research Testbed: A Community Facility. 
     <span style="font-style: italic;">Bull. Amer. Meteor. Soc.</span>,
     <span style="font-weight: bold;">90</span>, 1283-1296.<br>
@@ -427,10 +346,10 @@
 <!--==================================================================-->
 
 <A NAME="Errors"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>ERROR CODES and CONDITIONS</H2>
 <div class=errors>
-<TABLE border=1 cellspacing=1 cellpadding=10 width=100%>
+<TABLE border=1 cellspacing=1 cellpadding=10 width=100% summary='error codes'>
 <TR><TH>Routine</TH><TH>Message</TH><TH>Comment</TH></TR>
 
 <TR><!-- routine --><TD VALIGN=top>xxxx</TD>
@@ -455,7 +374,7 @@
 <!--==================================================================-->
 
 <A NAME="FuturePlans"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>FUTURE PLANS</H2>
 <P>
 none at this time
@@ -466,7 +385,7 @@
 <!--==================================================================-->
 
 <A NAME="PrivateComponents"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>PRIVATE COMPONENTS</H2>
 <P>
 N/A
@@ -490,7 +409,7 @@
 <!--==================================================================-->
 
 <A NAME="Legalese"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>Terms of Use</H2>
 
 <P>
@@ -506,7 +425,7 @@
 <TR><TD valign=top>Revision:      </TD><TD> $Revision$ </TD></TR>
 <TR><TD valign=top>Source:        </TD><TD> $URL$ </TD></TR>
 <TR><TD valign=top>Change Date:   </TD><TD> $Date$ </TD></TR>
-<TR><TD valign=top>Change&nbsp;history:&nbsp;</TD><TD> try "svn&nbsp;log" or "svn&nbsp;diff" </TD></TR>
+<TR><TD valign=top>Change history:</TD><TD> try "svn log" or "svn diff" </TD></TR>
 </TABLE>
 
 <!--==================================================================-->

Modified: DART/trunk/doc/html/boilerplate/html_function.f90
===================================================================
--- DART/trunk/doc/html/boilerplate/html_function.f90	2013-10-08 17:15:24 UTC (rev 6498)
+++ DART/trunk/doc/html/boilerplate/html_function.f90	2013-10-08 22:38:57 UTC (rev 6499)
@@ -12,8 +12,10 @@
 integer :: num, num_args, i, max_len, len, j
 character(len = 299) :: c1, c2, function_name, function_type, spaces
 character(len = 299), allocatable :: arg_name(:), arg_type(:)
+logical :: ispointer
 
 write(22, *) '<!--============= DESCRIPTION OF A FUNCTION ========================-->'
+write(22, *) ''
 
 spaces = '                                                                      '
 
@@ -25,7 +27,7 @@
 read(*, *) arg_name(0)
 write(22, *) '<A NAME="' // trim(arg_name(0)) // '"></A>'
 
-write(22, *) '<P></P><HR><P></P>'
+write(22, *) '<br />'
 write(22, *) '<div class=routine>'
 
 ! Loop to read in the argument names
@@ -41,23 +43,26 @@
 end do
 
 ! Write out the command line
-write(22, *) '<em class=call> var = ', trim(arg_name(0)), '(', trim(c1), ') </em>'
+write(22, *) '<em class=call> function ', trim(arg_name(0)), '(', trim(c1), ') </em>'
 write(22, *) '<pre>'
 
 max_len = 0
 do i = 0, num_args
    write(*, *) 'input the type for ', trim(arg_name(i))
    read(*, *) arg_type(i)
-   write(*, *) 'input 1 if allocatable'
-   read(*, *) j
-   if(j == 1) arg_type(i) = trim(arg_type(i)) // ', allocatable'
-   write(*, *) 'input 1 if optional'
-   read(*, *) j
-   if(j == 1) arg_type(i) = trim(arg_type(i)) // ', optional'
+   if (i > 0) then
+      write(*, *) 'input 1 if allocatable'
+      read(*, *) j
+      if(j == 1) arg_type(i) = trim(arg_type(i)) // ', allocatable'
+      write(*, *) 'input 1 if optional'
+      read(*, *) j
+      if(j == 1) arg_type(i) = trim(arg_type(i)) // ', optional'
+   endif
    write(*, *) 'input 1 if pointer'
    read(*, *) j
-   if(j == 1) arg_type(i) = trim(arg_type(i)) // ', pointer'
-   write(*, *) 'input dimesnion (0, 1, 2, 3)'
+   ispointer = (j == 1)
+   if(ispointer) arg_type(i) = trim(arg_type(i)) // ', pointer'
+   write(*, *) 'input dimension (0, 1, 2, 3)'
    read(*, *) j
    if(j == 1) then
       arg_type(i) = trim(arg_type(i)) // ', dimension(:)'
@@ -66,14 +71,16 @@
    else if (j == 3) then
       arg_type(i) = trim(arg_type(i)) // ', dimension(:, :, :)'
    endif
-   write(*, *) '1=intent(in); 2=intent(out); 3=intent(inout)'
-   read(*, *) j
-   if(j == 1) then
-      arg_type(i) = trim(arg_type(i)) // ', intent(in)'
-   elseif(j == 2) then
-      arg_type(i) = trim(arg_type(i)) // ', intent(out)'
-   elseif(j == 3) then
-      arg_type(i) = trim(arg_type(i)) // ', intent(inout)'
+   if (i > 0 .or. ispointer) then   ! cannot give intent on pointer args
+      write(*, *) '1=intent(in); 2=intent(out); 3=intent(inout)'
+      read(*, *) j
+      if(j == 1) then
+         arg_type(i) = trim(arg_type(i)) // ', intent(in)'
+      elseif(j == 2) then
+         arg_type(i) = trim(arg_type(i)) // ', intent(out)'
+      elseif(j == 3) then
+         arg_type(i) = trim(arg_type(i)) // ', intent(inout)'
+      endif
    endif
 
    len = len_trim(arg_type(i))
@@ -85,16 +92,21 @@
    write(22, *) c1(1:max_len) // ' :: <em class=code>' // trim(arg_name(i)) // '</em>'
 end do
 
-write(22, *) '</pre></div>'
+write(22, *) '</pre>'
+write(22, *) '</div>'
+write(22, *) ' '
+write(22, *) '<div class=indent1>'
+write(22, *) '<!-- Description -->'
 
-write(22, *) '<H3 class=indent1>Description</H3>'
-
+write(22, *) ' '
 write(22, *) '<P>'
-write(22, *) 'input module description here ????????????????????'
+write(22, *) 'input function description here '
 write(22, *) '</P>'
+write(22, *) ' '
 
 ! Write table header
-write(22, *) '<TABLE width=100% border=0 summary="" celpadding=3>'
+write(22, *) '<TABLE width=100% border=0 summary="argument description" cellpadding=3>'
+write(22, *) '<TBODY valign=top>'
 
 
 ! Write the table of argument descriptions
@@ -102,17 +114,27 @@
    write(*, *) 'input description of ', trim(arg_name(i))
    read(*, 31) c1
    31 format(a299)
-   write(22, *) '<TR><TD valign=top><em class=code>' // trim(arg_name(i)) // &
-      '&nbsp; &nbsp; </em></TD>' 
-   write(22, *) '    <TD>' // trim(c1) // '</TD></TR>'
+   write(22, *) '<TR><TD><em class=code> ' // trim(arg_name(i)) // &
+      '  </em></TD>' 
+   if (i == 0) then
+      write(22, *) '    <TD> Function return value. ' // trim(c1) // '</TD>'
+   else
+      write(22, *) '    <TD>' // trim(c1) // '</TD>'
+   endif
+   write(22, *) '</TR>'
 end do
 
 
 !End of table
+write(22, *) '</TBODY>'
 write(22, *) '</TABLE>'
-write(22, *) '<P>'
+write(22, *) '</div>'
+write(22, *) '<br />'
+write(22, *) ''
 write(22, *) '<!--================================================================-->'
 
+write(*,*) 'output file is fort.22 -- move or rename before running program again'
+
 end program html_function
 
 ! <next few lines under version control, do not edit>

Added: DART/trunk/doc/html/boilerplate/html_functoc.f90
===================================================================
--- DART/trunk/doc/html/boilerplate/html_functoc.f90	                        (rev 0)
+++ DART/trunk/doc/html/boilerplate/html_functoc.f90	2013-10-08 22:38:57 UTC (rev 6499)
@@ -0,0 +1,65 @@
+! DART software - Copyright 2004 - 2013 UCAR. This open source software is
+! provided by UCAR, "as is", without chiteme, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+!
+! $Id$
+
+program html_functoc
+
+implicit none
+
+! Interactive creation of html for interface list documentation for DART
+integer :: num, num_items, i, max_len, len, j
+character(len = 299) :: c1, c2, module_name, item_name, spaces
+
+write(22, *) '<!--============== DESCRIPTION OF PUBLIC INTERFACES ================-->'
+write(22, *) ''
+
+spaces = '                                                                      '
+
+! get the name of the module
+write(*, *) 'input the name of this module'
+read(*, *) module_name
+
+! Put in the standard header stuff
+write(22, *) '<A NAME="Interface"></A>'
+write(22, *) '<div class="top">[<a href="#">top</a>]</div><hr />'
+write(22, *) '<H2><PUBLIC INTERFACES</H2>'
+write(22, *) ''
+write(22, *) "<TABLE summary='public interfaces'>"
+write(22, *) '<TR><TD><em class=call>use ' // trim(module_name), ', only : </em></TD>'
+
+write(*, *) 'input the names of the subroutines and functions in this module'
+write(*, *) 'input "end" when done'
+readloop: do i=1, 10000
+   write(*, *) 'next routine name ("end" to finish)'
+   read(*, *) item_name
+   if (trim(item_name) == "end") exit readloop
+   if (i==1) then
+      write(22, *) '                   <TD><A HREF="#'//trim(item_name)//'"> '//trim(item_name)//' </A></TD></TR>'
+   else
+      write(22, *) '<TR><TD>&nbsp;</TD><TD><A HREF="#'//trim(item_name)//'"> '//trim(item_name)//' </A></TD></TR>'
+   endif
+end do readloop
+
+write(22, *) '</TABLE>'
+
+write(22, *) ''
+write(22, *) '<P>'
+write(22, *) '   A note about documentation style.'
+write(22, *) '   Optional arguments are enclosed in brackets'
+write(22, *) '   <em class=optionalcode>[like this]</em>.'
+write(22, *) '</P>'
+write(22, *) ''
+
+write(22, *) '<!--================================================================-->'
+
+write(*,*) 'output file is fort.22 -- move or rename before running program again'
+
+end program html_functoc
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$


Property changes on: DART/trunk/doc/html/boilerplate/html_functoc.f90
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author HeadURL Id
Added: svn:eol-style
   + native

Modified: DART/trunk/doc/html/boilerplate/html_namelist.f90
===================================================================
--- DART/trunk/doc/html/boilerplate/html_namelist.f90	2013-10-08 17:15:24 UTC (rev 6498)
+++ DART/trunk/doc/html/boilerplate/html_namelist.f90	2013-10-08 22:38:57 UTC (rev 6499)
@@ -8,21 +8,30 @@
 
 implicit none
 
-! Interactive creation of html for function documentation for DART
+! Interactive creation of html for namelist documentation for DART
 integer :: num, num_args, i, max_len, len, j
-character(len = 299) :: c1, c2, function_name, function_type, spaces, default_value
+character(len = 299) :: c1, c2, function_name, function_type, spaces
 character(len = 299), allocatable :: arg_name(:), arg_type(:)
 
-write(22, *) '<!--============== DESCRIPTION OF A NAMELIST ========================-->'
+write(22, *) '<!--============== DESCRIPTION OF A NAMELIST =======================-->'
+write(22, *) ''
 
 spaces = '                                                                      '
 
 ! Put in the standard header stuff
 write(22, *) '<A NAME="Namelist"></A>'
-write(22, *) '<BR><HR><BR>'
-write(22, *) '<P>We adhere to the F90 standard of starting a namelist with an ampersand'
-write(22, *) "'&' and terminating with a slash '/'."
-write(22, *) "<div class=namelist><pre>"
+write(22, *) '<div class="top">[<a href="#">top</a>]</div><hr />'
+write(22, *) '<H2>NAMELIST</H2>'
+write(22, *) '<P>'
+write(22, *) 'This namelist is read from the file <em class=file>input.nml</em>.'
+write(22, *) 'Namelists start with an ampersand'
+write(22, *) "'&amp;' and terminate with a slash '/'."
+write(22, *) "Character strings that contain a '/' must be"
+write(22, *) 'enclosed in quotes to prevent them from'
+write(22, *) 'prematurely terminating the namelist.'
+write(22, *) '</P>'
+write(22, *) "<div class=namelist>"
+write(22, *) "<pre>"
 
 ! Now write the namelist sequence
 write(*, *) 'input the number of namelist entries'
@@ -31,63 +40,62 @@
 write(*, *) 'input the namelist name'
 read(*, *) arg_name(0)
 
+! Write out the namelist start
+write(22, *) '&amp;' , trim(arg_name(0))
+
 ! Loop to read in the argument names
 do i = 1, num_args
-   write(*, *) 'input namelist entry name ', i
-   read(*, *) arg_name(i)
+   write(*, *) 'input namelist entry ', i, ' as name = value '
+   read(*, 31) c1
+   read(c1, *) arg_name(i)
+   write(22, *) '   ' // trim(c1) // ', '
 end do
 
-c1 = ''
-do i = 1, num_args
-   c1 = trim(c1) // trim(arg_name(i))
-   if(i /= num_args) c1 = trim(c1) // ', '
-end do
-
-! Write out the command line if possible
-write(22, *) '<em class=call>namelist / ' , trim(arg_name(0)), ' / </em>'
-write(22, *) c1
+write(22, *) '/'
 write(22, *) '</pre></div>'
 
-write(22, *) '<H3 class=indent1>Discussion</H3>'
 write(22, *) '<P>'
-write(22, *) 'put in general discussion ????????'
-write(22, *) '</em>'
+write(22, *) 'put in any general namelist discussion information'
 write(22, *) '</P>'
+write(22, *) '<br /><br />'
 
-write(22, *) '<P>This namelist is read in a file called <em class=file>input.nml</em>'
-write(22, *) '</P>'
-
-
 ! Prepare the table header
-write(22, *) '<TABLE border=0 cellpadding=3 width=100%>'
-write(22, *) '<TR><TH align=left>Contents    </TH>'
-write(22, *) '    <TH align=left>Type        </TH>'
-write(22, *) '    <TH align=left>Description </TH></TR>'
-
+write(22, *) '<div>'
+write(22, *) '<TABLE border=0 cellpadding=3 width=100% summary="namelist description">'
+write(22, *) '<THEAD align=left>'
+write(22, *) '<TR><TH> Item </TH>'
+write(22, *) '    <TH> Type </TH>'
+write(22, *) '    <TH> Description </TH>'
+write(22, *) '</TR>'
+write(22, *) ''
+write(22, *) '<TBODY valign=top>'
 do i = 1, num_args
    write(*, *) 'input the type for ', trim(arg_name(i))
    read(*, *) arg_type(i)
 end do
 do i = 1, num_args
-   write(*, *) 'input default value for ', trim(arg_name(i))
-   read(*, *) default_value
    write(*, *) 'input description for ', trim(arg_name(i))
    read(*, 31) c1
    31 format(a299)
-   c1 = trim(c1) // ' Default: ' // trim(default_value)
    
-   write(22, *) '<TR><!--contents--><TD valign=top>' // trim(arg_name(i)) // '</TD>'
-   write(22, *) '    <!--  type  --><TD>' // trim(arg_type(i)) // '</TD>'
-   write(22, *) '<!--descript--><TD>' // trim(c1) // '</TD></TR>'
+   write(22, *) '<TR><TD> ' // trim(arg_name(i)) // ' </TD>'
+   write(22, *) '    <TD> ' // trim(arg_type(i)) // ' </TD>'
+   write(22, *) '    <TD> ' // trim(c1) // ' </TD>'
+   write(22, *) '</TR>'
 end do
 
 
 ! Write the end of the table
+write(22, *) '</TBODY>'
 write(22, *) '</TABLE>'
+write(22, *) '</div>'
 
-write(22, *) '<P>'
+write(22, *) '<br /><br />'
+
 write(22, *) '<!--================================================================-->'
 
+write(*,*) 'output file is fort.22 -- move or rename before running program again'
+
 end program html_namelist
 
 ! <next few lines under version control, do not edit>

Modified: DART/trunk/doc/html/boilerplate/html_subroutine.f90
===================================================================
--- DART/trunk/doc/html/boilerplate/html_subroutine.f90	2013-10-08 17:15:24 UTC (rev 6498)
+++ DART/trunk/doc/html/boilerplate/html_subroutine.f90	2013-10-08 22:38:57 UTC (rev 6499)
@@ -8,12 +8,13 @@
 
 implicit none
 
-! Interactive creation of html for function documentation for DART
+! Interactive creation of html for subroutine documentation for DART
 integer :: num, num_args, i, max_len, len, j
 character(len = 299) :: c1, c2, function_name, function_type, spaces
 character(len = 299), allocatable :: arg_name(:), arg_type(:)
 
-write(22, *) '<!--============= DESCRIPTION OF A SUBROUTINE =======================-->'
+write(22, *) '<!--============= DESCRIPTION OF A SUBROUTINE ======================-->'
+write(22, *) ''
 
 spaces = '                                                                      '
 
@@ -25,7 +26,7 @@
 read(*, *) arg_name(0)
 write(22, *) '<A NAME="' // trim(arg_name(0)) // '"></A>'
 
-write(22, *) '<P></P><HR><P></P>'
+write(22, *) '<br />'
 write(22, *) '<div class=routine>'
 
 ! Loop to read in the argument names
@@ -40,8 +41,8 @@
    if(i /= num_args) c1 = trim(c1) // ', '
 end do
 
-! Write out the command line if possible
-write(22, *) '<em class=call> call ', trim(arg_name(0)), '(', trim(c1), ') </em>'
+! Write out the command line
+write(22, *) '<em class=call> subroutine ', trim(arg_name(0)), '(', trim(c1), ') </em>'
 write(22, *) '<pre>'
 
 max_len = 0
@@ -57,7 +58,7 @@
    write(*, *) 'input 1 if pointer'
    read(*, *) j
    if(j == 1) arg_type(i) = trim(arg_type(i)) // ', pointer'
-   write(*, *) 'input dimesnion (0, 1, 2, 3)'
+   write(*, *) 'input dimension (0, 1, 2, 3)'
    read(*, *) j
    if(j == 1) then
       arg_type(i) = trim(arg_type(i)) // ', dimension(:)'
@@ -86,16 +87,21 @@
    write(22, *) c1(1:max_len) // ' :: <em class=code>' // trim(arg_name(i)) // '</em>'
 end do
 
-write(22, *) '</pre></div>'
+write(22, *) '</pre>'
+write(22, *) '</div>'
+write(22, *) ' '
+write(22, *) '<div class=indent1>'
+write(22, *) '<!-- Description -->'
 
-write(22, *) '<H3 class=indent1>Description</H3>'
-
+write(22, *) ' '
 write(22, *) '<P>'
-write(22, *) 'input module description here ????????????????????'
+write(22, *) 'input subroutine description here '
 write(22, *) '</P>'
+write(22, *) ' '
 
 ! Write table header
-write(22, *) '<TABLE width=100% border=0 summary="" celpadding=3>'
+write(22, *) '<TABLE width=100% border=0 summary="argument description" cellpadding=3>'
+write(22, *) '<TBODY valign=top>'
 
 
 ! Write the table of argument descriptions
@@ -103,17 +109,23 @@
    write(*, *) 'input description of ', trim(arg_name(i))
    read(*, 31) c1
    31 format(a299)
-   write(22, *) '<TR><TD valign=top><em class=code>' // trim(arg_name(i)) // &
-      '&nbsp; &nbsp; </em></TD>' 
-   write(22, *) '    <TD>' // trim(c1) // '</TD></TR>'
+   write(22, *) '<TR><TD><em class=code> ' // trim(arg_name(i)) // &
+      '  </em></TD>' 
+   write(22, *) '    <TD>' // trim(c1) // '</TD>'
+   write(22, *) '</TR>'
 end do
 
 
 !End of table
+write(22, *) '</TBODY>'
 write(22, *) '</TABLE>'
-write(22, *) '<P>'
+write(22, *) '</div>'
+write(22, *) '<br />'
+write(22, *) ''
 write(22, *) '<!--================================================================-->'
 
+write(*,*) 'output file is fort.22 -- move or rename before running program again'
+
 end program html_subroutine
 
 ! <next few lines under version control, do not edit>

Added: DART/trunk/doc/html/boilerplate/html_type.f90
===================================================================
--- DART/trunk/doc/html/boilerplate/html_type.f90	                        (rev 0)
+++ DART/trunk/doc/html/boilerplate/html_type.f90	2013-10-08 22:38:57 UTC (rev 6499)
@@ -0,0 +1,96 @@
+! DART software - Copyright 2004 - 2013 UCAR. This open source software is
+! provided by UCAR, "as is", without chiteme, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+!
+! $Id$
+
+program html_type
+
+implicit none
+
+! Interactive creation of html for derived type documentation for DART
+integer :: num, num_items, i, max_len, len, j
+character(len = 299) :: c1, c2, type_name, spaces
+character(len = 299), allocatable :: item_name(:), item_type(:)
+
+write(22, *) '<!--============== DESCRIPTION OF A DERIVED TYPE ===================-->'
+write(22, *) ''
+
+spaces = '                                                                      '
+
+! get the count and name of the type
+write(*, *) 'input the number of items in this type'
+read(*, *) num_items
+allocate(item_name(0:num_items), item_type(0:num_items))
+write(*, *) 'input the derived type name'
+read(*, *) item_name(0)
+write(*, *) 'enter 1 if contents are private'
+read(*, *) j
+
+! Put in the standard header stuff
+write(22, *) '<A NAME="' // trim(item_name(0)) // '"></A>'
+write(22, *) '<br />'
+write(22, *) '<div class=type><pre>'
+write(22, *) '<em class=call>type ' // trim(item_name(0)) // '</em>'
+if (j==1) write(22, *) '   private'
+
+! Loop to read in the item names
+do i = 1, num_items
+   write(*, *) 'input name for item ', i
+   read(*, *) item_name(i)
+   write(*, *) 'input the type for ', trim(item_name(i))
+   read(*, *) item_type(i)
+   write(22, *) '   ' // trim(item_type(i)) // ' :: ' // trim(item_name(i))
+end do
+
+write(22, *) 'end type ' // trim(item_name(0))
+write(22, *) '</pre>'
+write(22, *) '</div>'
+
+write(22, *) ''
+write(22, *) '<div class=indent1>'
+write(22, *) '<!-- Description -->'
+write(22, *) ''
+write(22, *) '<P>'
+write(22, *) 'put in any general type discussion information'
+write(22, *) '</P>'
+
+! Prepare the table header
+write(22, *) '<TABLE border=0 cellpadding=3 width=100% summary="derived type description">'
+write(22, *) '<THEAD align=left>'
+write(22, *) '<TR><TH> Component </TH>'
+write(22, *) '    <TH> Description </TH>'
+write(22, *) '</TR>'
+write(22, *) '</THEAD>'
+write(22, *) ''
+write(22, *) '<TBODY valign=top>'
+do i = 1, num_items
+   write(*, *) 'input description for ', trim(item_name(i))
+   read(*, 31) c1
+   31 format(a299)
+   
+   write(22, *) '<TR><TD> ' // trim(item_name(i)) // ' </TD>'
+   write(22, *) '    <TD> ' // trim(c1) // ' </TD>'
+   write(22, *) '</TR>'
+end do
+
+
+! Write the end of the table
+write(22, *) '</TBODY>'
+write(22, *) '</TABLE>'
+write(22, *) ''
+write(22, *) '</div>'
+write(22, *) '<br />'
+write(22, *) ''
+
+write(22, *) '<!--================================================================-->'
+
+write(*,*) 'output file is fort.22 -- move or rename before running program again'
+
+end program html_type
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$


Property changes on: DART/trunk/doc/html/boilerplate/html_type.f90
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author HeadURL Id
Added: svn:eol-style
   + native

Modified: DART/trunk/doc/html/boilerplate/template.html
===================================================================
--- DART/trunk/doc/html/boilerplate/template.html	2013-10-08 17:15:24 UTC (rev 6498)
+++ DART/trunk/doc/html/boilerplate/template.html	2013-10-08 22:38:57 UTC (rev 6499)
@@ -18,7 +18,7 @@
 
 <H1>PROGRM OR MODULE name_of_thing</H1>
 
-<table border=0 summary="" cellpadding=5>
+<table border=0 summary="dart header" cellpadding=5>
 <tr>
     <td valign=middle>
     <img src="../doc/images/Dartboard7.png" alt="DART project logo" height=70 />
@@ -56,8 +56,10 @@
 <!-- Description of the namelist                                      -->
 <!--==================================================================-->
 
+<!-- see the html programs in DART/doc/html/boilerplate to generate this table -->
+
 <A NAME="Namelist"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>NAMELIST</H2>
 <P>
 DART namelists are
@@ -68,40 +70,50 @@
 Character strings that contain a '/' must be
 enclosed in quotes to prevent them from prematurely terminating the namelist.
 </P>
+
 <div class=namelist>
 <pre>
-<em class=call>&amp;bob_nml</em>
-  bob1 = 2
-  bob3 = 4,
+&amp;NAMELIST_NML 
+   name=value,
+   name=value, 
+   name=value
 /
 </pre>
 </div>
 
-<div class=indent1>
-<!-- Description -->
-
 <P>
 Any comments about the namelist as a whole.
 </P>
 
-<TABLE border=0 cellpadding=3 width=100%>
-<TR><TH align=left>Contents    </TH>
-    <TH align=left>Type        </TH>
-    <TH align=left>Description </TH></TR>
+<br />
+<br />
 
-<TR><!--contents--><TD valign=top>bob1</TD>
-    <!--  type  --><TD valign=top>integer</TD>
-    <!--descript--><TD>what it does, what valid values are.
-                       Default value is XX</TD></TR>
+<div>
+<TABLE border=0 cellpadding=10 width=100% summary='namelist description'>
+<THEAD align=left>
+<TR><TH> Item </TH>
+    <TH> Type </TH>
+    <TH> Description </TH> 
+</TR>
+</THEAD>
 
+<TBODY valign=top>
+<TR><TD>name</TD>
+    <TD>type</TD>
+    <TD>(often multi-line) description
+    </TD>
+</TR>
 <!-- repeat until done -->
+</TBODY>
 </TABLE>
+
 </div>
+<br />
 
 <!--==================================================================-->
 
 <A NAME="ModulesUsed"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>MODULES USED</H2>
 <PRE>
 types_mod
@@ -112,39 +124,35 @@
 </PRE>
 
 <!--==================================================================-->
-<!--Note to authors. The first row of the table is different.         -->
-<!--==================================================================-->
 
 <A NAME="Interface"></A>
-<HR>
+<div class="top">[<a href="#">top</a>]</div><hr />
 <H2>PUBLIC INTERFACES</H2>
 
-<!-- see the html programs in DART/doc/html to generate this table -->
+<!-- see the html programs in DART/doc/html/boilerplate to generate this table -->
 
-<TABLE>
-<TR><TD><em class=call>use adaptive_inflate_mod, only : </em></TD>
-                   <TD><A HREF="#tag">subr/function name  </A></TD></TR>
-<TR><TD>&nbsp;</TD><TD><A HREF="#tag2">name2</A></TD></TR>
+<TABLE summary='public interfaces'>
+<TR><TD><em class=call>use this_module_name_mod, only : </em></TD>
+                   <TD><A HREF="#tag"> subr/function name  </A></TD></TR>
+<TR><TD>&nbsp;</TD><TD><A HREF="#tag2"> name2 </A></TD></TR>
+<TR><TD>&nbsp;</TD><TD><A HREF="#tag3"> name3 </A></TD></TR>
+<!-- repeat until done -->
 </TABLE>
 
 <P>
-Optional namelist interface
-<a href="#Namelist"><em class=code>&amp;bob_nml</em></a>
-may be read from file <em class=file>input.nml</em>.
-</P>
-
-<P>
-   A note about documentation style. 
-   Optional arguments are enclosed in brackets 
+   A note about documentation style.
+   Optional arguments are enclosed in brackets
    <em class=optionalcode>[like this]</em>.
 </P>
 
 <!--===================== DESCRIPTION OF A ROUTINE =====================-->
 
+<!-- see the html programs in DART/doc/html/boilerplate to generate this table -->
+
 <A NAME="subroutine1"></A>
-<br>
+<br />
 <div class=routine>
-<em class=call> call subroutine1(arg1, <em class=optionalcode>[, arg2]</em>)</em>

@@ Diff output truncated at 40000 characters. @@


More information about the Dart-dev mailing list