<p><b>duda</b> 2011-10-11 17:45:57 -0600 (Tue, 11 Oct 2011)</p><p>BRANCH COMMIT<br>
<br>
Mirror change from trunk (r1064):<br>
Pass uReconstruct{X,Y,Z,Zonal,Meridional} and u (normal velocity) as separate<br>
array arguments to the reconstruct() routine. This allows individual cores to<br>
store these fields in different derived types, making the reconstruction code<br>
effectively core-independent.<br>
<br>
<br>
M    src/core_hyd_atmos/module_mpas_core.F<br>
M    src/core_hyd_atmos/module_time_integration.F<br>
M    src/core_sw/module_mpas_core.F<br>
M    src/core_sw/Registry<br>
M    src/core_sw/module_time_integration.F<br>
M    src/core_nhyd_atmos/module_mpas_core.F<br>
M    src/core_nhyd_atmos/module_time_integration.F<br>
M    src/core_ocean/module_mpas_core.F<br>
M    src/core_ocean/Registry<br>
M    src/core_ocean/module_time_integration.F<br>
M    src/operators/module_vector_reconstruction.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_hyd_atmos/module_mpas_core.F
===================================================================
--- branches/atmos_physics/src/core_hyd_atmos/module_mpas_core.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_hyd_atmos/module_mpas_core.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -130,7 +130,13 @@
       call initialize_advection_rk(mesh)
       call rbfInterp_initialize(mesh)
       call init_reconstruct(mesh)
-      call reconstruct(block % state % time_levs(1) % state, block % diag, mesh)
+      call reconstruct(mesh, block % state % time_levs(1) % state  % u % array,  &amp;
+                       block % diag % uReconstructX % array,                     &amp;
+                       block % diag % uReconstructY % array,                     &amp;
+                       block % diag % uReconstructZ % array,                     &amp;
+                       block % diag % uReconstructZonal % array,                 &amp;
+                       block % diag % uReconstructMeridional % array             &amp;
+                      )
 
 #ifdef DO_PHYSICS
       !check that all the physics options are correctly defined and that at least one physics

Modified: branches/atmos_physics/src/core_hyd_atmos/module_time_integration.F
===================================================================
--- branches/atmos_physics/src/core_hyd_atmos/module_time_integration.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_hyd_atmos/module_time_integration.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -339,7 +339,13 @@
       !
       block =&gt; domain % blocklist
       do while (associated(block))
-         call reconstruct(block % state % time_levs(2) % state, block % diag, block % mesh)
+         call reconstruct(block % mesh, block % state % time_levs(2) % state % u % array, &amp;
+                          block % diag % uReconstructX % array,                           &amp;
+                          block % diag % uReconstructY % array,                           &amp;
+                          block % diag % uReconstructZ % array,                           &amp;
+                          block % diag % uReconstructZonal % array,                       &amp;
+                          block % diag % uReconstructMeridional % array                   &amp;
+                         )
          call compute_w(block % state % time_levs(2) % state, block % state % time_levs(1) % state, block % mesh, dt)
          block =&gt; block % next
       end do

Modified: branches/atmos_physics/src/core_nhyd_atmos/module_mpas_core.F
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/module_mpas_core.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_nhyd_atmos/module_mpas_core.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -211,7 +211,13 @@
 
       call rbfInterp_initialize(mesh)
       call init_reconstruct(mesh)
-      call reconstruct(block % state % time_levs(1) % state, block % diag, mesh)
+      call reconstruct(mesh, block % state % time_levs(1) % state % u % array, &amp;
+                       block % diag % uReconstructX % array,                   &amp;
+                       block % diag % uReconstructY % array,                   &amp;
+                       block % diag % uReconstructZ % array,                   &amp;
+                       block % diag % uReconstructZonal % array,               &amp;
+                       block % diag % uReconstructMeridional % array           &amp;
+                      )
    
    !
    ! Note: The following initialization calls have been moved to mpas_setup_test_case()

Modified: branches/atmos_physics/src/core_nhyd_atmos/module_time_integration.F
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/module_time_integration.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_nhyd_atmos/module_time_integration.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -391,7 +391,13 @@
 !...  compute full velocity vectors at cell centers:
       block =&gt; domain % blocklist
         do while (associated(block))
-           call reconstruct(block % state % time_levs(2) % state, block % diag, block % mesh)
+           call reconstruct(block % mesh, block % state % time_levs(2) % state % u % array, &amp;
+                            block % diag % uReconstructX % array,                           &amp;
+                            block % diag % uReconstructY % array,                           &amp;
+                            block % diag % uReconstructZ % array,                           &amp;
+                            block % diag % uReconstructZonal % array,                       &amp;
+                            block % diag % uReconstructMeridional % array                   &amp;
+                           )
            block =&gt; block % next
         end do
 

Modified: branches/atmos_physics/src/core_ocean/Registry
===================================================================
--- branches/atmos_physics/src/core_ocean/Registry        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_ocean/Registry        2011-10-11 23:45:57 UTC (rev 1066)
@@ -172,11 +172,11 @@
 var persistent real    ke_edge ( nVertLevels nEdges Time ) 2 - ke_edge state - -
 var persistent real    pv_vertex ( nVertLevels nVertices Time ) 2 - pv_vertex state - -
 var persistent real    pv_cell ( nVertLevels nCells Time ) 2 o pv_cell state - -
-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 - -
-var persistent real    uReconstructZonal ( nVertLevels nCells Time ) 1 o uReconstructZonal diag - -
-var persistent real    uReconstructMeridional ( nVertLevels nCells Time ) 1 o uReconstructMeridional diag - -
+var persistent real    uReconstructX ( nVertLevels nCells Time ) 2 o uReconstructX state - -
+var persistent real    uReconstructY ( nVertLevels nCells Time ) 2 o uReconstructY state - -
+var persistent real    uReconstructZ ( nVertLevels nCells Time ) 2 o uReconstructZ state - -
+var persistent real    uReconstructZonal ( nVertLevels nCells Time ) 2 o uReconstructZonal state - -
+var persistent real    uReconstructMeridional ( nVertLevels nCells Time ) 2 o uReconstructMeridional state - -
 var persistent real    MontPot ( nVertLevels nCells Time ) 2 o MontPot state - -
 var persistent real    pressure ( nVertLevels nCells Time ) 2 o pressure state - -
 var persistent real    wTop ( nVertLevelsP1 nCells Time ) 2 o wTop state - -

Modified: branches/atmos_physics/src/core_ocean/module_mpas_core.F
===================================================================
--- branches/atmos_physics/src/core_ocean/module_mpas_core.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_ocean/module_mpas_core.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -155,7 +155,13 @@
  
       call rbfInterp_initialize(mesh)
       call init_reconstruct(mesh)
-      call reconstruct(block % state % time_levs(1) % state, block % diag, mesh)
+      call reconstruct(mesh, block % state % time_levs(1) % state % u % array,                  &amp;
+                       block % state % time_levs(1) % state % uReconstructX % array,            &amp;
+                       block % state % time_levs(1) % state % uReconstructY % array,            &amp;
+                       block % state % time_levs(1) % state % uReconstructZ % array,            &amp;
+                       block % state % time_levs(1) % state % uReconstructZonal % array,        &amp;
+                       block % state % time_levs(1) % state % uReconstructMeridional % array    &amp;
+                      )
 
       ! initialize velocities and tracers on land to be -1e34
       ! The reconstructed velocity on land will have values not exactly

Modified: branches/atmos_physics/src/core_ocean/module_time_integration.F
===================================================================
--- branches/atmos_physics/src/core_ocean/module_time_integration.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_ocean/module_time_integration.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -239,7 +239,13 @@
 
          call compute_solve_diagnostics(dt, block % state % time_levs(2) % state, block % mesh)
 
-         call reconstruct(block % state % time_levs(2) % state, block % diag, block % mesh)
+         call reconstruct(block % mesh, block % state % time_levs(2) % state % u % array,          &amp;
+                          block % state % time_levs(2) % state % uReconstructX % array,            &amp;
+                          block % state % time_levs(2) % state % uReconstructY % array,            &amp;
+                          block % state % time_levs(2) % state % uReconstructZ % array,            &amp;
+                          block % state % time_levs(2) % state % uReconstructZonal % array,        &amp;
+                          block % state % time_levs(2) % state % uReconstructMeridional % array    &amp;
+                         )
 
          block =&gt; block % next
       end do

Modified: branches/atmos_physics/src/core_sw/Registry
===================================================================
--- branches/atmos_physics/src/core_sw/Registry        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_sw/Registry        2011-10-11 23:45:57 UTC (rev 1066)
@@ -144,11 +144,11 @@
 var persistent real    ke ( nVertLevels nCells Time ) 2 o ke state - -
 var persistent real    pv_vertex ( nVertLevels nVertices Time ) 2 o pv_vertex state - -
 var persistent real    pv_cell ( nVertLevels nCells Time ) 2 o pv_cell state - -
-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 - -
-var persistent real    uReconstructZonal ( nVertLevels nCells Time ) 1 o uReconstructZonal diag - -
-var persistent real    uReconstructMeridional ( nVertLevels nCells Time ) 1 o uReconstructMeridional diag - -
+var persistent real    uReconstructX ( nVertLevels nCells Time ) 2 o uReconstructX state - -
+var persistent real    uReconstructY ( nVertLevels nCells Time ) 2 o uReconstructY state - -
+var persistent real    uReconstructZ ( nVertLevels nCells Time ) 2 o uReconstructZ state - -
+var persistent real    uReconstructZonal ( nVertLevels nCells Time ) 2 o uReconstructZonal state - -
+var persistent real    uReconstructMeridional ( nVertLevels nCells Time ) 2 o uReconstructMeridional state - -
 
 # Other diagnostic variables: neither read nor written to any files
 var persistent real    vh ( nVertLevels nEdges Time ) 2 - vh state - -

Modified: branches/atmos_physics/src/core_sw/module_mpas_core.F
===================================================================
--- branches/atmos_physics/src/core_sw/module_mpas_core.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_sw/module_mpas_core.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -130,7 +130,13 @@
 
       call rbfInterp_initialize(mesh)
       call init_reconstruct(mesh)
-      call reconstruct(block % state % time_levs(1) % state, block % diag, mesh)
+      call reconstruct(mesh, block % state % time_levs(1) % state % u % array,                  &amp;
+                       block % state % time_levs(1) % state % uReconstructX % array,            &amp;
+                       block % state % time_levs(1) % state % uReconstructY % array,            &amp;
+                       block % state % time_levs(1) % state % uReconstructZ % array,            &amp;
+                       block % state % time_levs(1) % state % uReconstructZonal % array,        &amp;
+                       block % state % time_levs(1) % state % uReconstructMeridional % array    &amp;
+                      )
    
    end subroutine mpas_init_block
    

Modified: branches/atmos_physics/src/core_sw/module_time_integration.F
===================================================================
--- branches/atmos_physics/src/core_sw/module_time_integration.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/core_sw/module_time_integration.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -229,7 +229,13 @@
 
          call compute_solve_diagnostics(dt, block % state % time_levs(2) % state, block % mesh)
 
-         call reconstruct(block % state % time_levs(2) % state, block % diag, block % mesh)
+         call reconstruct(block % mesh, block % state % time_levs(2) % state % u % array,          &amp;
+                          block % state % time_levs(2) % state % uReconstructX % array,            &amp;
+                          block % state % time_levs(2) % state % uReconstructY % array,            &amp;
+                          block % state % time_levs(2) % state % uReconstructZ % array,            &amp;
+                          block % state % time_levs(2) % state % uReconstructZonal % array,        &amp;
+                          block % state % time_levs(2) % state % uReconstructMeridional % array    &amp;
+                         )
 
          block =&gt; block % next
       end do

Modified: branches/atmos_physics/src/operators/module_vector_reconstruction.F
===================================================================
--- branches/atmos_physics/src/operators/module_vector_reconstruction.F        2011-10-11 23:30:45 UTC (rev 1065)
+++ branches/atmos_physics/src/operators/module_vector_reconstruction.F        2011-10-11 23:45:57 UTC (rev 1066)
@@ -112,7 +112,7 @@
 
   end subroutine init_reconstruct
 
-  subroutine reconstruct(state, diag, grid)
+  subroutine reconstruct(grid, u, uReconstructX, uReconstructY, uReconstructZ, uReconstructZonal, uReconstructMeridional)
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   ! Purpose: reconstruct vector field at cell centers based on radial basis functions
   !
@@ -123,19 +123,17 @@
 
     implicit none
 
-    type (state_type), intent(in) :: state 
-    type (diag_type), intent(inout) :: diag 
     type (mesh_type), intent(in) :: grid
+    real (kind=RKIND), dimension(:,:), intent(in) :: u
+    real (kind=RKIND), dimension(:,:), intent(out) :: uReconstructX, uReconstructY, uReconstructZ
+    real (kind=RKIND), dimension(:,:), intent(out) :: uReconstructZonal, uReconstructMeridional
 
     !   temporary arrays needed in the compute procedure
     integer :: nCellsSolve
     integer, dimension(:,:), pointer :: edgesOnCell
     integer, dimension(:), pointer :: nEdgesOnCell
     integer :: iCell,iEdge, i
-    real (kind=RKIND), dimension(:,:), pointer :: u
     real(kind=RKIND), dimension(:), pointer :: latCell, lonCell
-    real (kind=RKIND), dimension(:,:), pointer :: uReconstructX, uReconstructY, uReconstructZ
-    real (kind=RKIND), dimension(:,:), pointer :: uReconstructZonal, uReconstructMeridional
 
     real (kind=RKIND), dimension(:,:,:), pointer :: coeffs_reconstruct
 
@@ -151,15 +149,9 @@
     edgesOnCell =&gt; grid % edgesOnCell % array
     nEdgesOnCell=&gt; grid % nEdgesOnCell % array
     nCellsSolve = grid % nCellsSolve
-    u =&gt; state % u % array
-    uReconstructX =&gt; diag % uReconstructX % array
-    uReconstructY =&gt; diag % uReconstructY % array
-    uReconstructZ =&gt; diag % uReconstructZ % array
 
     latCell       =&gt; grid % latCell % array
     lonCell       =&gt; grid % lonCell % array
-    uReconstructZonal =&gt; diag % uReconstructZonal % array
-    uReconstructMeridional =&gt; diag % uReconstructMeridional % array
     on_a_sphere = grid % on_a_sphere
 
     ! init the intent(out)

</font>
</pre>