<p><b>dwj07@fsu.edu</b> 2013-04-02 11:55:58 -0600 (Tue, 02 Apr 2013)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Adding reading and writing of history attribute.<br>
        Probably not appended the way it's supposed to be, but it now carries (at least some) of the previous history attribute into newly generated output files.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/history_attribute/src/framework/Makefile
===================================================================
--- branches/history_attribute/src/framework/Makefile        2013-04-02 17:39:52 UTC (rev 2704)
+++ branches/history_attribute/src/framework/Makefile        2013-04-02 17:55:58 UTC (rev 2705)
@@ -58,7 +58,7 @@
 
 mpas_io_streams.o: mpas_attlist.o mpas_grid_types.o mpas_timekeeping.o mpas_io.o
 
-mpas_io_input.o: mpas_grid_types.o mpas_dmpar.o mpas_block_decomp.o mpas_block_creator.o mpas_sort.o mpas_configure.o mpas_timekeeping.o mpas_io_streams.o $(ZOLTANOBJ)
+mpas_io_input.o: mpas_grid_types.o mpas_dmpar.o mpas_block_decomp.o mpas_block_creator.o mpas_sort.o mpas_configure.o mpas_timekeeping.o mpas_io_streams.o mpas_constants.o $(ZOLTANOBJ)
 
 mpas_io_output.o: mpas_grid_types.o mpas_dmpar.o mpas_sort.o mpas_configure.o mpas_io_streams.o mpas_constants.o
 

Modified: branches/history_attribute/src/framework/mpas_constants.F
===================================================================
--- branches/history_attribute/src/framework/mpas_constants.F        2013-04-02 17:39:52 UTC (rev 2704)
+++ branches/history_attribute/src/framework/mpas_constants.F        2013-04-02 17:55:58 UTC (rev 2705)
@@ -27,12 +27,11 @@
    real (kind=RKIND), parameter :: cv      = cp - rgas           !&lt; Constant: Specific heat of dry air at constant volume [J kg-1 K-1]
    real (kind=RKIND), parameter :: cvpm    = -cv/cp              !
    real (kind=RKIND), parameter :: prandtl = 1.0                 !&lt; Constant: Prandtl number
+   character (len=StrKIND*2) :: history !&lt; History attribute, read in from input file.
 #include &quot;model_variables.inc&quot;
 
-
    contains
 
-
 !***********************************************************************
 !
 !  routine dummy

Modified: branches/history_attribute/src/framework/mpas_io_input.F
===================================================================
--- branches/history_attribute/src/framework/mpas_io_input.F        2013-04-02 17:39:52 UTC (rev 2704)
+++ branches/history_attribute/src/framework/mpas_io_input.F        2013-04-02 17:55:58 UTC (rev 2705)
@@ -35,6 +35,8 @@
 
    subroutine mpas_input_state_for_domain(domain)!{{{
 
+      use mpas_constants
+
       implicit none
    
       type (domain_type), pointer :: domain
@@ -245,6 +247,15 @@
         end if
       end if
 
+      call MPAS_readStreamAtt(input_obj % io_stream, 'history', history, ierr)
+      if (ierr /= MPAS_STREAM_NOERR) then
+        write(0,*) 'Warning: Attribute History not found in '//trim(input_obj % filename)
+        write(0,*) '   Setting History to '''''
+        history = &quot;&quot;
+      end if
+
+      write(*,*) 'History == ', trim(history)
+
       block_ptr =&gt; domain % blocklist % next
       do while (associated(block_ptr))
         block_ptr % mesh % sphere_radius = domain % blocklist % mesh % sphere_radius

Modified: branches/history_attribute/src/framework/mpas_io_output.F
===================================================================
--- branches/history_attribute/src/framework/mpas_io_output.F        2013-04-02 17:39:52 UTC (rev 2704)
+++ branches/history_attribute/src/framework/mpas_io_output.F        2013-04-02 17:55:58 UTC (rev 2705)
@@ -345,9 +345,13 @@
  
       integer :: nferr, ierr
       integer, dimension(10) :: dimlist
-      character (len=StrKIND) :: runCmd
+      character (len=StrKIND*4) :: runCmd
 
-      write(runCmd,'(a,i0,a,a,a)') 'mpirun -n ',domain % dminfo % nProcs, ' ', trim(coreName), '_model.exe;'
+      if(len(trim(history)) &gt; 0) then
+          write(runCmd,'(a,a,i0,a,a,a)') trim(history),';mpirun -n ',domain % dminfo % nProcs, ' ', trim(coreName), '_model.exe;'
+      else
+          write(runCmd,'(a,i0,a,a,a)') 'mpirun -n ',domain % dminfo % nProcs, ' ', trim(coreName), '_model.exe;'
+      end if
  
       call MPAS_createStream(output_obj % io_stream, trim(output_obj % filename), MPAS_IO_PNETCDF, MPAS_IO_WRITE, 1, nferr)
 
@@ -362,7 +366,7 @@
       call MPAS_writeStreamAtt(output_obj % io_stream, 'model_name', modelName, nferr)
       call MPAS_writeStreamAtt(output_obj % io_stream, 'core_name', coreName, nferr)
       call MPAS_writeStreamAtt(output_obj % io_stream, 'version', version, nferr)
-      call MPAS_writeStreamAtt(output_obj % io_stream, 'History', runCmd, nferr)
+      call MPAS_writeStreamAtt(output_obj % io_stream, 'history', runCmd, nferr)
 
 #include &quot;add_output_atts.inc&quot;
  

</font>
</pre>