<p><b>mhoffman@lanl.gov</b> 2012-05-09 16:12:47 -0600 (Wed, 09 May 2012)</p><p>BRANCH COMMIT<br>
Setup global diagnostics to print global ice volume, and nothing else (for now).<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_global_diagnostics.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_global_diagnostics.F        2012-05-09 21:51:31 UTC (rev 1883)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_global_diagnostics.F        2012-05-09 22:12:47 UTC (rev 1884)
@@ -68,11 +68,12 @@
 
       real (kind=RKIND) :: sumCellVolume, sumCellArea, sumVertexVolume, sumrefAreaWeightedSurfaceHeight
 
-      real (kind=RKIND) :: globalFluidThickness, globalPotentialVorticity, globalPotentialEnstrophy, globalEnergy 
-      real (kind=RKIND) :: globalCoriolisEnergyTendency, globalKEPETendency, globalPotentialEnstrophyReservoir 
-      real (kind=RKIND) :: globalKineticEnergy, globalPotentialEnergy, globalPotentialEnergyReservoir
-      real (kind=RKIND) :: globalKineticEnergyTendency, globalPotentialEnergyTendency
-      real (kind=RKIND) ::  global_temp, workpv, q
+      real (kind=RKIND) :: globalIceThickness, globalIceMass
+      !real (kind=RKIND) :: globalFluidThickness, globalPotentialVorticity, globalPotentialEnstrophy, globalEnergy 
+      !real (kind=RKIND) :: globalCoriolisEnergyTendency, globalKEPETendency, globalPotentialEnstrophyReservoir 
+      !real (kind=RKIND) :: globalKineticEnergy, globalPotentialEnergy, globalPotentialEnergyReservoir
+      !real (kind=RKIND) :: globalKineticEnergyTendency, globalPotentialEnergyTendency
+      !real (kind=RKIND) ::  global_temp, workpv, q
       real (kind=RKIND) :: volumeCellGlobal, volumeEdgeGlobal, CFLNumberGlobal
 
       integer :: elementIndex, variableIndex, nVariables, nSums, nMaxes, nMins
@@ -121,17 +122,17 @@
       allocate(cellArea(nVertLevels,nCellsSolve))
       allocate(refAreaWeightedSurfaceHeight(nVertLevels,nCellsSolve))
       allocate(refAreaWeightedSurfaceHeight_edge(nVertLevels,nEdgesSolve))
-      allocate(volumeWeightedPotentialVorticity(nVertLevels,nVerticesSolve))
-      allocate(volumeWeightedPotentialEnstrophy(nVertLevels,nVerticesSolve))
-      allocate(potentialEnstrophyReservior(nCellsSolve))
+      !allocate(volumeWeightedPotentialVorticity(nVertLevels,nVerticesSolve))
+      !allocate(volumeWeightedPotentialEnstrophy(nVertLevels,nVerticesSolve))
+      !allocate(potentialEnstrophyReservior(nCellsSolve))
       allocate(vertexVolume(nVertLevels,nVerticesSolve))
-      allocate(volumeWeightedKineticEnergy(nVertLevels,nEdgesSolve))
-      allocate(volumeWeightedPotentialEnergy(nVertLevels,nCellsSolve))
-      allocate(volumeWeightedPotentialEnergyTopography(nVertLevels,nCellsSolve))
-      allocate(volumeWeightedPotentialEnergyReservoir(nCellsSolve))
-      allocate(keTend_CoriolisForce(nVertLevels,nEdgesSolve))
-      allocate(keTend_PressureGradient(nVertLevels,nEdgesSolve))
-      allocate(peTend_DivThickness(nVertLevels,nCells))
+      !allocate(volumeWeightedKineticEnergy(nVertLevels,nEdgesSolve))
+      !allocate(volumeWeightedPotentialEnergy(nVertLevels,nCellsSolve))
+      !allocate(volumeWeightedPotentialEnergyTopography(nVertLevels,nCellsSolve))
+      !allocate(volumeWeightedPotentialEnergyReservoir(nCellsSolve))
+      !allocate(keTend_CoriolisForce(nVertLevels,nEdgesSolve))
+      !allocate(keTend_PressureGradient(nVertLevels,nEdgesSolve))
+      !allocate(peTend_DivThickness(nVertLevels,nCells))
 
       allocate(averageThickness(nCellsSolve))
 
@@ -144,15 +145,15 @@
       vertexVolume = 0
       cellArea = 0
       averageThickness = 0
-      volumeWeightedPotentialVorticity = 0
-      volumeWeightedPotentialEnstrophy = 0
-      volumeWeightedKineticEnergy = 0
-      volumeWeightedPotentialEnergy = 0
-      volumeWeightedPotentialEnergyTopography = 0
-      volumeWeightedPotentialEnergyReservoir = 0
-      keTend_PressureGradient = 0
-      peTend_DivThickness = 0
-      keTend_CoriolisForce = 0
+      !volumeWeightedPotentialVorticity = 0
+      !volumeWeightedPotentialEnstrophy = 0
+      !volumeWeightedKineticEnergy = 0
+      !volumeWeightedPotentialEnergy = 0
+      !volumeWeightedPotentialEnergyTopography = 0
+      !volumeWeightedPotentialEnergyReservoir = 0
+      !keTend_PressureGradient = 0
+      !peTend_DivThickness = 0
+      !keTend_CoriolisForce = 0
 !!!      h_s_edge = 0
 
       ! Build Arrays for Global Integrals
@@ -176,7 +177,7 @@
 !!!        refAreaWeightedSurfaceHeight(iLevel,:) = areaCell(1:nCellsSolve)*(layerThickness(iLevel,1:nCellsSolve)+h_s(1:nCellsSolve))
 
         do iEdge = 1,nEdgesSolve
-            q = 0.0
+            !q = 0.0
             do j = 1,nEdgesOnEdge(iEdge)
 !!!               eoe = edgesOnEdge(j,iEdge)
 !!!               workpv = 0.5 * (pv_edge(iLevel,iEdge) + pv_edge(iLevel,eoe))
@@ -223,7 +224,7 @@
 
       ! Step 5
       ! 5. Finish computing the global stat/integral
-      globalFluidThickness = sumCellVolume/sumCellArea
+      !globalFluidThickness = sumCellVolume/sumCellArea
 
       ! Compute Average Sea Surface Height for Potential Energy and Enstrophy
       ! Reservoir computations
@@ -279,9 +280,10 @@
          else
              open(fileID, file='GlobalIntegrals.txt',POSITION='append')
          endif 
-         write(fileID,'(1i0, 100es24.16)') timeIndex, timeIndex*dt, globalFluidThickness, globalPotentialVorticity, globalPotentialEnstrophy, &amp;
-                        globalEnergy, globalCoriolisEnergyTendency, globalKineticEnergyTendency+globalPotentialEnergyTendency, &amp;
-                        globalKineticEnergy, globalPotentialEnergy
+!         write(fileID,'(1i0, 100es24.16)') timeIndex, timeIndex*dt, globalFluidThickness, globalPotentialVorticity, globalPotentialEnstrophy, &amp;
+!                        globalEnergy, globalCoriolisEnergyTendency, globalKineticEnergyTendency+globalPotentialEnergyTendency, &amp;
+!                        globalKineticEnergy, globalPotentialEnergy
+         write(fileID,'(1i0, 100es24.16)') timeIndex, timeIndex*dt, sumCellVolume
          close(fileID)
       end if
 

Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_tendency.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_tendency.F        2012-05-09 21:51:31 UTC (rev 1883)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_tendency.F        2012-05-09 22:12:47 UTC (rev 1884)
@@ -110,6 +110,7 @@
 
      select case (config_advection)
      case ('FO-Upwind')
+        !print *,'Using FO Upwind for thickness advection'
         call land_ice_tend_h_fo_upwind(mesh, state % normalVelocity % array, &amp;
            state % layerThickness % array, state % thickness % array, 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)
@@ -314,6 +315,8 @@
       dcEdge =&gt; grid % dcEdge % array
       areaCell =&gt; grid % areaCell % array
 
+      !print *,'Max velocity magn.:', maxval(abs(normalVelocity))
+
       ! Zero the tendency before accumulating
       thickness_tend = 0.0
 
@@ -338,7 +341,7 @@
                  enddo
                  ubar = flux / thickness(cellUpwind)
                  if ( (abs(ubar) * dt/SecondsInYear) .gt. (0.5 * dcEdge(iEdge))) then
-                      print *, 'CFL violation at edge', iEdge
+                      write(0,*) 'CFL violation at edge', iEdge
                       !err = 1
                  endif
                  thickness_tend(cellUpwind) = thickness_tend(cellUpwind) - flux * dvEdge(iEdge) / areaCell(cellUpwind)

Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration.F        2012-05-09 21:51:31 UTC (rev 1883)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration.F        2012-05-09 22:12:47 UTC (rev 1884)
@@ -41,9 +41,6 @@
       type (block_type), pointer :: block
       type (state_type), pointer :: state
 
-      real (kind=RKIND), dimension(:,:), pointer :: normalVelocity, uReconstructX, &amp;
-         uReconstructY, uReconstructZ, uReconstructZonal, uReconstructMeridional
-
       integer :: err
       
 

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-05-09 21:51:31 UTC (rev 1883)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F        2012-05-09 22:12:47 UTC (rev 1884)
@@ -111,6 +111,8 @@
                                             mesh % nCells, &amp;
                                             block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
 
+         !print *,'  Max abs thickness tend:', maxval(abs(thickness_tend(1:mesh % nCellsSolve)))
+
          ! (Calculate tracer tendencies)
          !call ()
          call mpas_timer_stop(&quot;calculate tendencies&quot;)

</font>
</pre>