<p><b>duda</b> 2012-07-13 12:27:29 -0600 (Fri, 13 Jul 2012)</p><p>BRANCH COMMIT<br>
<br>
Update hydrostatic, non-hydrostatic, and initialization cores: temporary fields on which we<br>
perform halo updates need to be pointers to fields.<br>
<br>
<br>
M src/core_hyd_atmos/mpas_atmh_time_integration.F<br>
M src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F<br>
M src/core_atmos_physics/mpas_atmphys_todynamics.F<br>
M src/core_nhyd_atmos/mpas_atm_time_integration.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/omp_blocks/multiple_blocks/src/core_atmos_physics/mpas_atmphys_todynamics.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/core_atmos_physics/mpas_atmphys_todynamics.F        2012-07-13 18:22:49 UTC (rev 2023)
+++ branches/omp_blocks/multiple_blocks/src/core_atmos_physics/mpas_atmphys_todynamics.F        2012-07-13 18:27:29 UTC (rev 2024)
@@ -227,7 +227,8 @@
!local variables:
!-----------------
type(block_type),pointer :: block
- type (field2DReal):: tempField
+ type (field2DReal), pointer :: tempField
+ type (field2DReal), target :: tempFieldTarget
integer:: iCell,iEdge,k,j,nCells,nCellsSolve,nVertLevels
integer,dimension(:),pointer :: nEdgesOnCell
integer,dimension(:,:),pointer:: edgesOnCell
@@ -249,8 +250,8 @@
nEdgesOnCell => mesh % nEdgesOnCell % array
edge_normal => mesh % edgeNormalVectors % array
- allocate(Ux_tend_halo(nVertLevels,nCells))
- allocate(Uy_tend_halo(nVertLevels,nCells))
+ allocate(Ux_tend_halo(nVertLevels,nCells+1))
+ allocate(Uy_tend_halo(nVertLevels,nCells+1))
Ux_tend_halo(:,:) = 0.
Uy_tend_halo(:,:) = 0.
@@ -261,11 +262,15 @@
enddo
enddo
+ tempField => tempFieldTarget
tempField % block => block
tempField % dimSizes(1) = nVertLevels
tempField % dimSizes(2) = nCellsSolve
tempField % sendList => block % parinfo % cellsToSend
tempField % recvList => block % parinfo % cellsToRecv
+ tempField % copyList => block % parinfo % cellsToCopy
+ tempField % prev => null()
+ tempField % next => null()
tempField % array => Ux_tend_halo
call mpas_dmpar_exch_halo_field(tempField)
Modified: branches/omp_blocks/multiple_blocks/src/core_hyd_atmos/mpas_atmh_time_integration.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/core_hyd_atmos/mpas_atmh_time_integration.F        2012-07-13 18:22:49 UTC (rev 2023)
+++ branches/omp_blocks/multiple_blocks/src/core_hyd_atmos/mpas_atmh_time_integration.F        2012-07-13 18:27:29 UTC (rev 2024)
@@ -1420,7 +1420,8 @@
real (kind=RKIND), dimension(:), pointer :: dvEdge, dcEdge, areaCell
integer, dimension(:,:), pointer :: cellsOnEdge
- type (field3DReal) :: tempField
+ type (field3DReal), pointer :: tempField
+ type (field3DReal), target :: tempFieldTarget
real (kind=RKIND), dimension( s_old % num_scalars, grid % nEdges+1) :: h_flux
real (kind=RKIND), dimension(2, s_old % num_scalars, grid % nCells+1) :: v_flux, v_flux_upwind, s_update
@@ -1628,12 +1629,16 @@
end do ! end loop over cells to compute scale factor
+ tempField => tempFieldTarget
tempField % block => block
tempField % dimSizes(1) = 2
tempField % dimSizes(2) = num_scalars
tempField % dimSizes(3) = grid % nCells
tempField % sendList => block % parinfo % cellsToSend
tempField % recvList => block % parinfo % cellsToRecv
+ tempField % copyList => block % parinfo % cellsToCopy
+ tempField % prev => null()
+ tempField % next => null()
tempField % array => scale_in
call mpas_dmpar_exch_halo_field(tempField)
Modified: branches/omp_blocks/multiple_blocks/src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F        2012-07-13 18:22:49 UTC (rev 2023)
+++ branches/omp_blocks/multiple_blocks/src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F        2012-07-13 18:27:29 UTC (rev 2024)
@@ -2219,7 +2219,8 @@
real (kind=RKIND), dimension(:,:), pointer :: v
real (kind=RKIND), dimension(:,:), pointer :: sorted_arr
- type (field1DReal):: tempField
+ type (field1DReal), pointer :: tempField
+ type (field1DReal), target :: tempFieldTarget
real(kind=RKIND), dimension(:), pointer :: hs, hs1
real(kind=RKIND) :: hm, zh, dzmin, dzmina, dzmina_global, dzminf, sm
@@ -3193,11 +3194,15 @@
end do
+ tempField => tempFieldTarget
tempField % block => block
tempField % dimSizes(1) = grid % nCells
tempField % sendList => parinfo % cellsToSend
tempField % recvList => parinfo % cellsToRecv
+ tempField % copyList => parinfo % cellsToCopy
tempField % array => hs
+ tempField % prev => null()
+ tempField % next => null()
call mpas_timer_start("EXCHANGE_1D_REAL")
call mpas_dmpar_exch_halo_field(tempField)
Modified: branches/omp_blocks/multiple_blocks/src/core_nhyd_atmos/mpas_atm_time_integration.F
===================================================================
--- branches/omp_blocks/multiple_blocks/src/core_nhyd_atmos/mpas_atm_time_integration.F        2012-07-13 18:22:49 UTC (rev 2023)
+++ branches/omp_blocks/multiple_blocks/src/core_nhyd_atmos/mpas_atm_time_integration.F        2012-07-13 18:27:29 UTC (rev 2024)
@@ -1433,7 +1433,8 @@
integer, dimension(:), pointer :: nAdvCellsForEdge
real (kind=RKIND), dimension(:,:), pointer :: adv_coefs, adv_coefs_3rd
- type (field2DReal) :: tempField
+ type (field2DReal), pointer :: tempField
+ type (field2DReal), target :: tempFieldTarget
real (kind=RKIND), dimension( grid % nVertLevels, grid % nCells ) :: scalar_old, scalar_new
real (kind=RKIND), dimension( grid % nVertLevels, grid % nCells ) :: s_max, s_min, s_update
@@ -1699,12 +1700,16 @@
!
! WCS_halo_opt_2 - communicate only first halo row in these next two exchanges
!
+ tempField => tempFieldTarget
tempField % block => block
tempField % dimSizes(1) = grid % nVertLevels
tempField % dimSizes(2) = grid % nCells
tempField % sendList => block % parinfo % cellsToSend
tempField % recvList => block % parinfo % cellsToRecv
+ tempField % copyList => block % parinfo % cellsToCopy
+ tempField % prev => null()
+ tempField % next => null()
tempField % array => scale_in
call mpas_dmpar_exch_halo_field(tempField, (/ 1 /))
</font>
</pre>