<p><b>duda</b> 2013-04-05 19:22:11 -0600 (Fri, 05 Apr 2013)</p><p>BRANCH COMMIT<br>
<br>
Bug fix to enable restart time to be properly read from the restart_timestamp file <br>
when config_start_time = 'file' and config_do_restart = .true.<br>
<br>
<br>
M    src/core_nhyd_atmos/mpas_atm_mpas_core.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_nhyd_atmos/mpas_atm_mpas_core.F
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/mpas_atm_mpas_core.F        2013-04-05 21:02:57 UTC (rev 2734)
+++ branches/atmos_physics/src/core_nhyd_atmos/mpas_atm_mpas_core.F        2013-04-06 01:22:11 UTC (rev 2735)
@@ -80,9 +80,9 @@
          !     
          ! We need to decide which time slice to read from the surface file - read the most recent time slice that falls before or on the start time
          !
-         sfc_update_obj % time = MPAS_seekStream(sfc_update_obj % io_stream, trim(config_start_time), MPAS_STREAM_LATEST_BEFORE, timeStamp, ierr)
+         sfc_update_obj % time = MPAS_seekStream(sfc_update_obj % io_stream, trim(startTimeStamp), MPAS_STREAM_LATEST_BEFORE, timeStamp, ierr)
          if (ierr == MPAS_IO_ERR) then
-            write(0,*) 'Error: surface update file '//trim(sfc_update_obj % filename)//' did not contain any times at or before '//trim(config_start_time)
+            write(0,*) 'Error: surface update file '//trim(sfc_update_obj % filename)//' did not contain any times at or before '//trim(startTimeStamp)
             call mpas_dmpar_abort(domain % dminfo)
          end if
 
@@ -105,7 +105,14 @@
       type (MPAS_TimeInterval_type) :: runDuration, timeStep, alarmTimeStep
       integer :: ierr
 
-      call mpas_set_time(curr_time=startTime, dateTimeString=config_start_time, ierr=ierr)
+      if(trim(config_start_time) == 'file') then
+         open(22,file='restart_timestamp',form='formatted',status='old')
+         read(22,*) startTimeStamp
+         close(22)
+      else
+        startTimeStamp = config_start_time
+      end if
+      call mpas_set_time(curr_time=startTime, dateTimeString=startTimeStamp, ierr=ierr)
       call mpas_set_timeInterval(timeStep, dt=dt, ierr=ierr)
 
       if (trim(config_run_duration) /= &quot;none&quot;) then

</font>
</pre>