<p><b>laura@ucar.edu</b> 2012-03-26 09:32:06 -0600 (Mon, 26 Mar 2012)</p><p>added the reconstruction of the tendencies of the u-wind and v-wind due to the Tiedtke parameterization of convection from the cell centers to the cell edges. added this new tendency to the physics tendency tend_u.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_todynamics.F
===================================================================
--- branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_todynamics.F        2012-03-26 15:26:33 UTC (rev 1714)
+++ branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_todynamics.F        2012-03-26 15:32:06 UTC (rev 1715)
@@ -40,14 +40,15 @@
  real(kind=RKIND),dimension(:,:),pointer:: rthblten,rqvblten,rqcblten, &amp;
                                            rqiblten,rublten,rvblten
  real(kind=RKIND),dimension(:,:),pointer:: rthcuten,rqvcuten,rqccuten, &amp;
-                                           rqrcuten,rqicuten,rqscuten
+                                           rqrcuten,rqicuten,rqscuten, &amp;
+                                           rucuten,rvcuten
  real(kind=RKIND),dimension(:,:),pointer:: rthratenlw,rthratensw                                    
  
  real(kind=RKIND),dimension(:,:),pointer  :: tend_theta,tend_u
  real(kind=RKIND),dimension(:,:,:),pointer:: tend_scalars
 
  real(kind=RKIND):: tem
- real(kind=RKIND),dimension(:,:),allocatable:: rublten_Edge
+ real(kind=RKIND),dimension(:,:),allocatable:: rublten_Edge,rucuten_Edge
 
 !ldf (2011-12-16):
  real(kind=RKIND),dimension(:,:),allocatable:: theta,tend_th
@@ -74,6 +75,8 @@
  rqcblten   =&gt; tend_physics % rqcblten   % array
  rqiblten   =&gt; tend_physics % rqiblten   % array
 
+ rucuten    =&gt; tend_physics % rucuten    % array
+ rvcuten    =&gt; tend_physics % rvcuten    % array
  rthcuten   =&gt; tend_physics % rthcuten   % array
  rqvcuten   =&gt; tend_physics % rqvcuten   % array
  rqccuten   =&gt; tend_physics % rqccuten   % array
@@ -116,11 +119,29 @@
     enddo
     enddo
  endif
- write(0,*) 'max rthblten = ',maxval(rthblten(:,1:nCellsSolve))
- write(0,*) 'min rthblten = ',minval(rthblten(:,1:nCellsSolve))
+write(0,*) 'max rthblten = ',maxval(rthblten(:,1:nCellsSolve))
+write(0,*) 'min rthblten = ',minval(rthblten(:,1:nCellsSolve))
+!write(0,*) 'max rqvblten = ',maxval(rqvblten(:,1:nCellsSolve))
+!write(0,*) 'min rqvblten = ',minval(rqvblten(:,1:nCellsSolve))
+!write(0,*) 'max tend     = ',maxval(tend_scalars(tend%index_qv,:,1:nCellsSolve))
+!write(0,*) 'min tend     = ',minval(tend_scalars(tend%index_qv,:,1:nCellsSolve))
+!write(0,*)
 
 !add coupled tendencies due to convection:
  if(config_conv_deep_scheme .ne. 'off') then
+
+    if(config_conv_deep_scheme .eq. 'tiedtke') then
+       allocate(rucuten_Edge(nVertLevels,nEdges))
+       rucuten_Edge(:,:) = 0.
+       call tend_toEdges(dminfo,CellsToSend,CellsToRecv,mesh,rucuten,rvcuten,rucuten_Edge)
+       do i = 1, nEdgesSolve
+       do k  = 1, nVertLevels
+          tend_u(k,i)=tend_u(k,i)+rucuten_Edge(k,i)*mass_edge(k,i)
+       enddo
+       enddo
+       deallocate(rucuten_Edge)
+    endif
+
     do i = 1, nCellsSolve
     do k = 1, nVertLevels
        tend_th(k,i)=tend_th(k,i)+rthcuten(k,i)*mass(k,i)
@@ -132,8 +153,13 @@
     enddo
     enddo
  endif
- write(0,*) 'max rthcuten = ',maxval(rthcuten(:,1:nCellsSolve))
- write(0,*) 'min rthcuten = ',minval(rthcuten(:,1:nCellsSolve))
+write(0,*) 'max rthcuten = ',maxval(rthcuten(:,1:nCellsSolve))
+write(0,*) 'min rthcuten = ',minval(rthcuten(:,1:nCellsSolve))
+!write(0,*) 'max rqvcuten = ',maxval(rqvcuten(:,1:nCellsSolve))
+!write(0,*) 'min rqvcuten = ',minval(rqvcuten(:,1:nCellsSolve))
+!write(0,*) 'max tend     = ',maxval(tend_scalars(tend%index_qv,:,1:nCellsSolve))
+!write(0,*) 'min tend     = ',minval(tend_scalars(tend%index_qv,:,1:nCellsSolve))
+!write(0,*)
 
 !add coupled tendencies due to longwave radiation:
  if(config_radt_lw_scheme .ne. 'off') then
@@ -143,8 +169,8 @@
     enddo
     enddo
  endif
- write(0,*) 'max rthratenlw = ',maxval(rthratenlw(:,1:nCellsSolve))
- write(0,*) 'min rthratenlw = ',minval(rthratenlw(:,1:nCellsSolve))
+write(0,*) 'max rthratenlw = ',maxval(rthratenlw(:,1:nCellsSolve))
+write(0,*) 'min rthratenlw = ',minval(rthratenlw(:,1:nCellsSolve))
     
 !add coupled tendencies due to shortwave radiation:
  if(config_radt_sw_scheme .ne. 'off') then
@@ -154,8 +180,8 @@
     enddo
     enddo
  endif
- write(0,*) 'max rthratensw = ',maxval(rthratensw(:,1:nCellsSolve))
- write(0,*) 'min rthratensw = ',minval(rthratensw(:,1:nCellsSolve))
+write(0,*) 'max rthratensw = ',maxval(rthratensw(:,1:nCellsSolve))
+write(0,*) 'min rthratensw = ',minval(rthratensw(:,1:nCellsSolve))
 
 !if non-hydrostatic core, convert the tendency for the potential temperature to a
 !tendency for the modified potential temperature:

</font>
</pre>