<p><b>duda</b> 2011-05-26 15:09:12 -0600 (Thu, 26 May 2011)</p><p>BRANCH COMMIT<br>
<br>
Fix bit-for-bit restartability in the non-hydrostatic model that was<br>
broken by commits 786 (changes to the computation of ke) and 795<br>
(removing halo updates for vorticity and divergence). Changes in this<br>
fix involve calling compute_solve_diagnostics() when doing a model<br>
restart, and removing fields produced by compute_solve_diagnostics from<br>
the restart file.<br>
<br>
The issue with restartability arose from the fact that, when we read<br>
fields from the restart file, those fields automatically have their<br>
halos updated. We previously removed halo updates for vorticity and<br>
divergence in 795, leading to slightly different yet still correct<br>
results due to order of summation; however, doing a restart effectively<br>
added the halo exchanges back in at the first time step, leading to<br>
different results.<br>
<br>
<br>
M    src/core_nhyd_atmos/module_mpas_core.F<br>
M    src/core_nhyd_atmos/Registry<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_nhyd_atmos/Registry
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/Registry        2011-05-26 18:23:08 UTC (rev 855)
+++ branches/atmos_physics/src/core_nhyd_atmos/Registry        2011-05-26 21:09:12 UTC (rev 856)
@@ -193,14 +193,14 @@
 
 # Diagnostic fields: only written to output
 var persistent real    rh ( nVertLevels nCells Time ) 1 iro rh diag - -
-var persistent real    v ( nVertLevels nEdges Time ) 1 ro v diag - -
-var persistent real    divergence ( nVertLevels nCells Time ) 1 ro divergence diag - -
-var persistent real    vorticity ( nVertLevels nVertices Time ) 1 ro vorticity diag - -
-var persistent real    pv_edge ( nVertLevels nEdges Time ) 1 ro pv_edge diag - -
-var persistent real    rho_edge ( nVertLevels nEdges Time ) 1 ro rho_edge diag - -
-var persistent real    ke ( nVertLevels nCells Time ) 1 ro ke diag - -
-var persistent real    pv_vertex ( nVertLevels nVertices Time ) 1 ro pv_vertex diag - -
-var persistent real    pv_cell ( nVertLevels nCells Time ) 1 ro pv_cell diag - -
+var persistent real    v ( nVertLevels nEdges Time ) 1 o v diag - -
+var persistent real    divergence ( nVertLevels nCells Time ) 1 o divergence diag - -
+var persistent real    vorticity ( nVertLevels nVertices Time ) 1 o vorticity diag - -
+var persistent real    pv_edge ( nVertLevels nEdges Time ) 1 o pv_edge diag - -
+var persistent real    rho_edge ( nVertLevels nEdges Time ) 1 o rho_edge diag - -
+var persistent real    ke ( nVertLevels nCells Time ) 1 o ke diag - -
+var persistent real    pv_vertex ( nVertLevels nVertices Time ) 1 o pv_vertex diag - -
+var persistent real    pv_cell ( nVertLevels nCells Time ) 1 o pv_cell diag - -
 var persistent real    uReconstructX ( nVertLevels nCells Time ) 1 o uReconstructX diag - -
 var persistent real    uReconstructY ( nVertLevels nCells Time ) 1 o uReconstructY diag - -
 var persistent real    uReconstructZ ( nVertLevels nCells Time ) 1 o uReconstructZ diag - -

Modified: branches/atmos_physics/src/core_nhyd_atmos/module_mpas_core.F
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/module_mpas_core.F        2011-05-26 18:23:08 UTC (rev 855)
+++ branches/atmos_physics/src/core_nhyd_atmos/module_mpas_core.F        2011-05-26 21:09:12 UTC (rev 856)
@@ -68,8 +68,8 @@
    
       if (.not. config_do_restart) then
          call init_coupled_diagnostics( block % state % time_levs(1) % state, block % diag, mesh)
-         call compute_solve_diagnostics(dt, block % state % time_levs(1) % state, block % diag, mesh)
       end if
+      call compute_solve_diagnostics(dt, block % state % time_levs(1) % state, block % diag, mesh)
 
       call dmpar_exch_halo_field2dReal(dminfo, block % diag % pv_edge % array(:,:), &amp;
                                        block % mesh % nVertLevels, block % mesh % nEdges, &amp;

</font>
</pre>