<p><b>mhoffman@lanl.gov</b> 2012-04-30 13:54:09 -0600 (Mon, 30 Apr 2012)</p><p>BRANCH COMMIT<br>
Added halo updates for thickness tendency and velocity.<br>
These will have to be redone with the new format once we merge the trunk to our branch, but adding them now allows us to test the various velocity solvers prior to doing the merge.<br>
I have tested the halo updates with the SIA velocity solver in MPAS, but not the LifeV velocity solvers.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/implement_core/src/core_land_ice/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-04-30 18:44:34 UTC (rev 1842)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-04-30 19:54:09 UTC (rev 1843)
@@ -139,7 +139,7 @@
% Tendency variables
var persistent real tend_layerThickness ( nVertLevels nCells Time ) 1 - layerThickness tend - -
-var persistent real tend_thickness ( nCells Time ) 1 - thickness tend - -
+var persistent real tend_thickness ( nCells Time ) 1 o thickness tend - -
var persistent real tend_temperature ( nVertLevels nCells Time ) 1 - temperature tend tracers dynamics
% Diagnostic fields: only written to output
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-04-30 18:44:34 UTC (rev 1842)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-04-30 19:54:09 UTC (rev 1843)
@@ -55,6 +55,10 @@
do while (associated(block))
! Initialize blocks
call mpas_init_block(block, block % mesh, dt)
+ ! update halos on velocity
+ call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % state % time_levs(1) % state % normalVelocity % array, &
+ block % mesh % nVertLevels, block % mesh % nEdges, &
+ block % parinfo % edgesToSend, block % parinfo % edgesToRecv)
! Assign initial time stamp
block % state % time_levs(1) % state % xtime % scalar = startTimeStamp
@@ -178,7 +182,6 @@
! Calculate an initial (diagnostic) velocity field consistent with the initial thickness field
! \todo: skip this step if a velocity field was supplied in the I.C. input file
call land_ice_vel_solve(mesh, state, err)
- ! (halo update of velocity field)
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F        2012-04-30 18:44:34 UTC (rev 1842)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F        2012-04-30 19:54:09 UTC (rev 1843)
@@ -104,26 +104,30 @@
! Calculate thickness tendency using state at time n
call lice_tend_h(mesh, normalVelocityOld, layerThicknessOld, thicknessOld, thickness_tend, dt, err)
+ ! Commented lines below calculate the thickness tendency per layer instead of for the whole column (last 2 lines should be moved to following 'section' of code)
+ !call lice_tend_h_layers(mesh, normalVelocity, layerThickness, layerThickness_tend, dt, err)
+ !layerThickness = layerThickness + layerThickness_tend * dt / SecondsInYear
+ !thickness = sum(layerThickness, 1)
+
! update halos on thickness tend
- !call ()
+ call mpas_dmpar_exch_halo_field1d_real(dminfo, thickness_tend, &
+ mesh % nCells, &
+ block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
! (Calculate tracer tendencies)
!call ()
- ! Commented lines below calculate the thickness tendency per layer instead of for the whole column (last 2 lines should be moved to following 'section' of code)
- !call lice_tend_h_layers(mesh, normalVelocity, layerThickness, layerThickness_tend, dt, err)
- !layerThickness = layerThickness + layerThickness_tend * dt / SecondsInYear
- !thickness = sum(layerThickness, 1)
-
! === Compute new state for prognostic variables ==================================
! (once implicit column physics are added (i.e. temp diffusion), these calculations will need to be adjusted to apply to the new values as needed)
! Update thickness (and tracers eventually)
thicknessNew = thicknessOld + thickness_tend * dt / SecondsInYear
!Optionally print some information about the new state
- print *, 'thickness maxval:', maxval(thicknessNew)
+ !print *, 'thickness_tend maxval:', maxval(thickness_tend(1:mesh % nCellsSolve))
+ !print *, 'thicknessOld maxval:', maxval(thicknessOld(1:mesh % nCellsSolve))
+ print *, 'thicknessNew maxval:', maxval(thicknessNew(1:mesh % nCellsSolve))
mask = 0
where (thicknessNew .lt. 0.0)
mask = 1
@@ -151,7 +155,7 @@
else
blockVertexMaskChanged = 0
endif
- print *, 'blockVertexMaskChanged ', blockVertexMaskChanged
+ !print *, 'blockVertexMaskChanged ', blockVertexMaskChanged
! Determine if any blocks on this processor had a change to the vertex mask
procVertexMaskChanged = max(procVertexMaskChanged, blockVertexMaskChanged)
@@ -167,14 +171,16 @@
! Assign the vertex-changed flag to each block
stateNew % anyVertexMaskChanged % scalar = anyVertexMaskChanged
- print *, 'anyVertexMaskChanged: ', anyVertexMaskChanged
+ !print *, 'anyVertexMaskChanged: ', anyVertexMaskChanged
! Compute the diagnostic velocity for this time step using the updated (new) state
! Pass in the old velocity to be used as an initial guess for velocity solvers that need one.
normalVelocityNew = normalVelocityOld
call land_ice_vel_solve(mesh, stateNew, err)
! update halos on velocity
- ! call ()
+ call mpas_dmpar_exch_halo_field2d_real(dminfo, normalVelocityNew, &
+ nVertLevels, mesh % nEdges, &
+ block % parinfo % edgesToSend, block % parinfo % edgesToRecv)
block => block % next
end do
</font>
</pre>