<p><b>laura@ucar.edu</b> 2012-10-11 11:28:10 -0600 (Thu, 11 Oct 2012)</p><p>Added hyper-diffusion to the 2d Smagorinsky diffusion for u, w, and theta, and config_visc4_2dsmag is greater than zero.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_nhyd_atmos/mpas_atm_time_integration.F
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/mpas_atm_time_integration.F        2012-10-11 17:26:26 UTC (rev 2204)
+++ branches/atmos_physics/src/core_nhyd_atmos/mpas_atm_time_integration.F        2012-10-11 17:28:10 UTC (rev 2205)
@@ -1973,10 +1973,10 @@
       nCellsSolve = grid % nCellsSolve
 
       h_mom_eddy_visc2 = config_h_mom_eddy_visc2
-      h_mom_eddy_visc4 = config_h_mom_eddy_visc4
+!     h_mom_eddy_visc4 = config_h_mom_eddy_visc4
       v_mom_eddy_visc2 = config_v_mom_eddy_visc2
       h_theta_eddy_visc2 = config_h_theta_eddy_visc2
-      h_theta_eddy_visc4 = config_h_theta_eddy_visc4
+!     h_theta_eddy_visc4 = config_h_theta_eddy_visc4
       v_theta_eddy_visc2 = config_v_theta_eddy_visc2
 
       nAdvCellsForEdge =&gt; grid % nAdvCellsForEdge % array
@@ -2011,9 +2011,18 @@
                kdiff(k,iCell) = min(kdiff(k,iCell),(0.01*config_len_disp**2)/dt)
             end do
          end do
+!ldf (2012-10-10):
+         h_mom_eddy_visc4   = config_visc4_2dsmag * config_len_disp**3
+         h_theta_eddy_visc4 = h_mom_eddy_visc4
          delsq_horiz_mixing = .true.
+         write(0,*) '... config_visc4_2dsmag = ', config_visc4_2dsmag
+         write(0,*) '... h_mom_eddy_visc4    = ', h_mom_eddy_visc4
+         write(0,*) '... h_theta_eddy_visc4  = ', h_theta_eddy_visc4
       else if ( config_horiz_mixing == &quot;2d_fixed&quot;) then
+         h_mom_eddy_visc4   = config_h_mom_eddy_visc4
+         h_theta_eddy_visc4 = config_h_theta_eddy_visc4
          delsq_horiz_mixing = .true.
+!ldf (2012-10-10):
       end if
 
       tend_u(:,:) = 0.0
@@ -2230,7 +2239,10 @@
 
       end if ! delsq_horiz_mixing for u
 
-      if ((h_mom_eddy_visc4 &gt; 0.0) .and. (config_horiz_mixing == &quot;2d_fixed&quot;)) then
+!ldf (2012-10-10): Modified loop below to allow hyper-diffusion when 2d_smagorinsky is set to true.
+!     if ((h_mom_eddy_visc4 &gt; 0.0) .and. (config_horiz_mixing == &quot;2d_fixed&quot;)) then
+      if ((h_mom_eddy_visc4 &gt; 0.0 .and. config_horiz_mixing == &quot;2d_fixed&quot;) .or. &amp;
+          (h_mom_eddy_visc4 &gt; 0.0 .and. config_horiz_mixing == &quot;2d_smagorinsky&quot;)) then
 
          allocate(delsq_divergence(nVertLevels, nCells+1))
          allocate(delsq_u(nVertLevels, nEdges+1))
@@ -2591,7 +2603,10 @@
  
       end if
 
-      if ( (h_mom_eddy_visc4 &gt; 0.0) .and. (config_horiz_mixing == &quot;2d_fixed&quot;)) then
+!ldf (2010-10-10):
+!     if ( (h_mom_eddy_visc4 &gt; 0.0) .and. (config_horiz_mixing == &quot;2d_fixed&quot;)) then
+      if ((h_mom_eddy_visc4 &gt; 0.0 .and. config_horiz_mixing == &quot;2d_fixed&quot;) .or. &amp;
+          (h_mom_eddy_visc4 &gt; 0.0 .and. config_horiz_mixing == &quot;2d_smagorinsky&quot;)) then
 
          allocate(delsq_theta(nVertLevels, nCells+1))
 
@@ -2886,7 +2901,10 @@
 
       end if
 
-      if ( (h_theta_eddy_visc4 &gt; 0.0) .and. (config_horiz_mixing == &quot;2d_fixed&quot;) ) then
+!ldf (2010-10-10):
+!     if ( (h_theta_eddy_visc4 &gt; 0.0) .and. (config_horiz_mixing == &quot;2d_fixed&quot;) ) then
+      if ((h_theta_eddy_visc4 &gt; 0.0 .and. config_horiz_mixing == &quot;2d_fixed&quot;) .or. &amp;
+          (h_theta_eddy_visc4 &gt; 0.0 .and. config_horiz_mixing == &quot;2d_smagorinsky&quot;)) then
 
          allocate(delsq_theta(nVertLevels, nCells+1))
 

</font>
</pre>