<p><b>duda</b> 2010-07-14 14:17:36 -0600 (Wed, 14 Jul 2010)</p><p>BRANCH COMMIT<br>
<br>
For squall-line/supercell test case setup, references to cell 1<br>
in computation of pitop will not be correct when running in<br>
parallel, since cells are re-numbered to local indices. To get<br>
around this problem, have processor 0 broadcast its computed<br>
values (we know in the case of doubly-periodic planar grids that<br>
cell 1 is owned by processor 0 and retains local index 1) to other<br>
processors.<br>
<br>
M    src/core_nhyd_atmos/module_test_cases.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_nonhydrostatic/src/core_nhyd_atmos/module_test_cases.F
===================================================================
--- branches/atmos_nonhydrostatic/src/core_nhyd_atmos/module_test_cases.F        2010-07-13 23:38:14 UTC (rev 375)
+++ branches/atmos_nonhydrostatic/src/core_nhyd_atmos/module_test_cases.F        2010-07-14 20:17:36 UTC (rev 376)
@@ -3,6 +3,7 @@
    use grid_types
    use configure
    use constants
+   use dmpar
 
 
    contains
@@ -51,7 +52,7 @@
          block_ptr =&gt; domain % blocklist
          do while (associated(block_ptr))
             write(0,*) ' calling test case setup '
-            call nhyd_test_case_squall_line(block_ptr % mesh, block_ptr % time_levs(1) % state, config_test_case)
+            call nhyd_test_case_squall_line(domain % dminfo, block_ptr % mesh, block_ptr % time_levs(1) % state, config_test_case)
             write(0,*) ' returned from test case setup '
             do i=2,nTimeLevs
                call copy_state(block_ptr % time_levs(1) % state, block_ptr % time_levs(i) % state)
@@ -674,13 +675,14 @@
 
 !----------------------------------------------------------------------------------------------------------
 
-   subroutine nhyd_test_case_squall_line(grid, state, test_case)
+   subroutine nhyd_test_case_squall_line(dminfo, grid, state, test_case)
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    ! Setup squall line and supercell test case
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
       implicit none
 
+      type (dm_info), intent(in) :: dminfo
       type (grid_meta), intent(inout) :: grid
       type (grid_state), intent(inout) :: state
       integer, intent(in) :: test_case
@@ -977,6 +979,9 @@
             end do
             end if
          end do
+
+         call dmpar_bcast_reals(dminfo, nz1, grid % u_init % array)
+
 !
 !     reference sounding based on dry atmosphere
 !
@@ -989,6 +994,8 @@
       end do
       pitop = pitop-.5*dzw(nz1)*gravity/(cp*tb(nz1,1)*zz(nz1,1))
 
+      call dmpar_bcast_real(dminfo, pitop)
+
       ptopb = p0*pitop**(1./rcp)
       write(6,*) 'ptopb = ',.01*ptopb
                 
@@ -1051,6 +1058,8 @@
         ptop = p0*pitop**(1./rcp)
         write(0,*) 'ptop  = ',.01*ptop
 
+        call dmpar_bcast_real(dminfo, pitop)
+
       do i = 1, grid % nCells
 
           pp(nz1,i) = ptop-ptopb+.5*dzw(nz1)*gravity*   &amp;
@@ -1099,6 +1108,9 @@
         grid % qv_init % array(k) = scalars(index_qv,k,1)
 
       end do
+
+      call dmpar_bcast_reals(dminfo, nz1, grid % t_init % array)
+      call dmpar_bcast_reals(dminfo, nz1, grid % qv_init % array)
                 
 !
       do i=1,grid % ncells

</font>
</pre>