<p><b>duda</b> 2011-12-06 12:36:47 -0700 (Tue, 06 Dec 2011)</p><p>BRANCH COMMIT<br>
<br>
Enable restart runs with PIO by disabling check against xtime when<br>
restarting the model; for now, it's safe to assume that the time stamp<br>
in the restart filename is the valid time of the fields in the restart<br>
file, since we only write one restart frame per file.<br>
<br>
<br>
M    src/framework/mpas_io_input.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/pio/src/framework/mpas_io_input.F
===================================================================
--- branches/pio/src/framework/mpas_io_input.F        2011-12-06 18:16:37 UTC (rev 1237)
+++ branches/pio/src/framework/mpas_io_input.F        2011-12-06 19:36:47 UTC (rev 1238)
@@ -755,44 +755,46 @@
          ! If doing a restart, we need to decide which time slice to read from the 
          !   restart file
          !
-         if (input_obj % rdLocalTime &lt;= 0) then
-            write(0,*) 'Error: Couldn''t find any times in restart file.'
-            call mpas_dmpar_abort(domain % dminfo)
-         end if
-         if (domain % dminfo % my_proc_id == IO_NODE) then
-            allocate(xtime % ioinfo)
-            xtime % ioinfo % start(1) = 1
-            xtime % ioinfo % count(1) = input_obj % rdLocalTime
-            allocate(xtime % array(input_obj % rdLocalTime))
-
-            xtime % ioinfo % fieldName = 'xtime'
-            call mpas_io_input_field(input_obj, xtime)
-
-            call mpas_set_timeInterval(interval=minTimeDiff, DD=10000)
-            call mpas_set_time(curr_time=startTime, dateTimeString=config_start_time)
-
-            do i=1,input_obj % rdLocalTime
-               call mpas_set_time(curr_time=sliceTime, dateTimeString=xtime % array(i))
-               timeDiff = abs(sliceTime - startTime)
-               if (timeDiff &lt; minTimeDiff) then
-                  minTimeDiff = timeDiff
-                  input_obj % time = i
-               end if
-            end do
-
-            ! require restart time to exactly match start time (this error should never be reached as we have by this point opened the restart file with a name containing the startTime)
-            if(sliceTime /= startTime) then
-               write(0,*) &quot;Error: restart file &quot;, filename, &quot; did not contain time &quot;, config_start_time
-               call mpas_dmpar_abort(domain % dminfo)
-            end if
-
-            timeStamp = xtime % array(input_obj % time)
-
-            deallocate(xtime % ioinfo)
-            deallocate(xtime % array)
-         end if
-
-         call mpas_dmpar_bcast_int(domain % dminfo, input_obj % time)
+! MGD -- for now, just use the data from the restart file, and assume it is valid at 
+!        the time in its restart filename (which should be true, anyway)
+!         if (input_obj % rdLocalTime &lt;= 0) then
+!            write(0,*) 'Error: Couldn''t find any times in restart file.'
+!            call mpas_dmpar_abort(domain % dminfo)
+!         end if
+!         if (domain % dminfo % my_proc_id == IO_NODE) then
+!            allocate(xtime % ioinfo)
+!            xtime % ioinfo % start(1) = 1
+!            xtime % ioinfo % count(1) = input_obj % rdLocalTime
+!            allocate(xtime % array(input_obj % rdLocalTime))
+!
+!            xtime % ioinfo % fieldName = 'xtime'
+!            call mpas_io_input_field(input_obj, xtime)
+!
+!            call mpas_set_timeInterval(interval=minTimeDiff, DD=10000)
+!            call mpas_set_time(curr_time=startTime, dateTimeString=config_start_time)
+!
+!            do i=1,input_obj % rdLocalTime
+!               call mpas_set_time(curr_time=sliceTime, dateTimeString=xtime % array(i))
+!               timeDiff = abs(sliceTime - startTime)
+!               if (timeDiff &lt; minTimeDiff) then
+!                  minTimeDiff = timeDiff
+!                  input_obj % time = i
+!               end if
+!            end do
+!
+!            ! require restart time to exactly match start time (this error should never be reached as we have by this point opened the restart file with a name containing the startTime)
+!            if(sliceTime /= startTime) then
+!               write(0,*) &quot;Error: restart file &quot;, filename, &quot; did not contain time &quot;, config_start_time
+!               call mpas_dmpar_abort(domain % dminfo)
+!            end if
+!
+!            timeStamp = xtime % array(input_obj % time)
+!
+!            deallocate(xtime % ioinfo)
+!            deallocate(xtime % array)
+!         end if
+!
+!         call mpas_dmpar_bcast_int(domain % dminfo, input_obj % time)
          call mpas_dmpar_bcast_char(domain % dminfo, timeStamp)
 
          write(0,*) 'Restarting model from time ', timeStamp

</font>
</pre>