<p><b>laura@ucar.edu</b> 2011-02-09 10:06:39 -0700 (Wed, 09 Feb 2011)</p><p>revised driver for surface parameterization<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_physics/module_driver_sfclayer.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_driver_sfclayer.F        2011-02-09 17:04:59 UTC (rev 733)
+++ branches/atmos_physics/src/core_physics/module_driver_sfclayer.F        2011-02-09 17:06:39 UTC (rev 734)
@@ -24,7 +24,7 @@
  real(kind=RKIND),parameter,private:: xmava   = 0.3    !surface moisture availability (0-&gt;1).
  real(kind=RKIND),parameter,private:: ust_min = 0.0001 !min. u* in similarity theory.
  real(kind=RKIND),parameter,private:: zzlnd   = 0.1    !roughness length over land.
- real(kind=RKIND),parameter,private:: zzwtr   = 0.0001 !roughness lenght over water.
+ real(kind=RKIND),parameter,private:: zzwtr   = 0.0001 !roughness length over water.
 
  integer,private:: i,iCell,j
 
@@ -47,10 +47,10 @@
  if(.not.allocated(flhc_p)   ) allocate(flhc_p(ims:ime,jms:jme)   )
  if(.not.allocated(flqc_p)   ) allocate(flqc_p(ims:ime,jms:jme)   )
  if(.not.allocated(hfx_p)    ) allocate(hfx_p(ims:ime,jms:jme)    )
+ if(.not.allocated(hpbl_p)   ) allocate(hpbl_p(ims:ime,jms:jme)   )
  if(.not.allocated(lh_p)     ) allocate(lh_p(ims:ime,jms:jme)     )
  if(.not.allocated(mavail_p) ) allocate(mavail_p(ims:ime,jms:jme) )
  if(.not.allocated(mol_p)    ) allocate(mol_p(ims:ime,jms:jme)    )
- if(.not.allocated(pblh_p)   ) allocate(pblh_p(ims:ime,jms:jme)   )
  if(.not.allocated(psih_p)   ) allocate(psih_p(ims:ime,jms:jme)   )
  if(.not.allocated(psim_p)   ) allocate(psim_p(ims:ime,jms:jme)   )
  if(.not.allocated(q2_p)     ) allocate(q2_p(ims:ime,jms:jme)     )
@@ -90,10 +90,10 @@
  if(allocated(flhc_p)   ) deallocate(flhc_p   )
  if(allocated(flqc_p)   ) deallocate(flqc_p   )
  if(allocated(hfx_p)    ) deallocate(hfx_p    )
+ if(allocated(hpbl_p)   ) deallocate(hpbl_p   )
  if(allocated(lh_p)     ) deallocate(lh_p     )
  if(allocated(mavail_p) ) deallocate(mavail_p )
  if(allocated(mol_p)    ) deallocate(mol_p    )
- if(allocated(pblh_p)   ) deallocate(pblh_p   )
  if(allocated(psih_p)   ) deallocate(psih_p   )
  if(allocated(psim_p)   ) deallocate(psim_p   )
  if(allocated(q2_p)     ) deallocate(q2_p     )
@@ -142,10 +142,10 @@
     flhc_p(i,j)   = diag_physics % flhc   % array(i)
     flqc_p(i,j)   = diag_physics % flqc   % array(i)
     hfx_p(i,j)    = diag_physics % hfx    % array(i)
+    hpbl_p(i,j)   = diag_physics % hpbl   % array(i)
     lh_p(i,j)     = diag_physics % lh     % array(i)
     mavail_p(i,j) = diag_physics % mavail % array(i)
     mol_p(i,j)    = diag_physics % mol    % array(i)
-    pblh_p(i,j)   = diag_physics % pblh   % array(i)
     psim_p(i,j)   = diag_physics % psim   % array(i)
     psih_p(i,j)   = diag_physics % psih   % array(i)
     q2_p(i,j)     = diag_physics % q2     % array(i)
@@ -196,10 +196,10 @@
     diag_physics % flhc   % array(i) = flhc_p(i,j)
     diag_physics % flqc   % array(i) = flqc_p(i,j)
     diag_physics % hfx    % array(i) = hfx_p(i,j)
+    diag_physics % hpbl   % array(i) = hpbl_p(i,j)
     diag_physics % lh     % array(i) = lh_p(i,j)
     diag_physics % mavail % array(i) = mavail_p(i,j)
     diag_physics % mol    % array(i) = mol_p(i,j)
-    diag_physics % pblh   % array(i) = pblh_p(i,j)
     diag_physics % psim   % array(i) = psim_p(i,j)
     diag_physics % psih   % array(i) = psih_p(i,j)
     diag_physics % q2     % array(i) = q2_p(i,j)
@@ -221,7 +221,7 @@
 
  enddo
  enddo

+
  end subroutine sfclayer_to_MPAS
 
 !=============================================================================================
@@ -236,7 +236,7 @@
 
 !---------------------------------------------------------------------------------------------
 
- write(0,*) '    begin sfclayer_initialization:'
+ write(0,*) '--- enter sfclayer_initialization:'
  do iCell = 1, mesh % nCells
     diag_physics % ust % array(iCell) = ust_min
     
@@ -249,7 +249,7 @@
     endif
 
  enddo
- write(0,*) '    end sfclayer_initialization:'
+ write(0,*) '--- end sfclayer_initialization'
 
  end subroutine init_sfclayer
 
@@ -283,15 +283,6 @@
        !other scheme needing the same arrays was used):
        dx = sqrt(maxval(mesh % areaCell % array))
 
-       do j = jts, jte
-       do i = its, ite
-          chs_p(i,j)  = 0.0
-          chs2_p(i,j) = 0.0
-          cqs2_p(i,j) = 0.0
-          cpm_p(i,j)  = 0.0
-       enddo
-       enddo
-
        write(0,*) '--- begin subroutine sfclay:'
        call sfclay( &amp;
                    u3d      = u_p      , v3d     = v_p      , t3d    = t_p     , &amp;
@@ -300,7 +291,7 @@
                    R        = R_d      , xlv     = xlv      , psfc   = psfc_p  , &amp;
                    chs      = chs_p    , chs2    = chs2_p   , cqs2   = cqs2_p  , &amp;
                    cpm      = cpm_p    , znt     = znt_p    , ust    = ust_p   , &amp;
-                   pblh     = pblh_p   , mavail  = mavail_p , zol    = zol_p   , &amp;
+                   pblh     = hpbl_p   , mavail  = mavail_p , zol    = zol_p   , &amp;
                    mol      = mol_p    , regime  = regime_p , psim   = psim_p  , &amp;
                    psih     = psih_p   , xland   = xland_p  , hfx    = hfx_p   , &amp;
                    qfx      = qfx_p    , lh      = lh_p     , tsk    = tsk_p   , &amp;

</font>
</pre>