<p><b>laura@ucar.edu</b> 2013-03-01 16:18:00 -0700 (Fri, 01 Mar 2013)</p><p>Merged with the latest revisions from the branch atmos_physics<br>
</p><hr noshade><pre><font color="gray">Index: branches/atmphys_gfs_mmm
===================================================================
--- branches/atmphys_gfs_mmm        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm        2013-03-01 23:18:00 UTC (rev 2543)

Property changes on: branches/atmphys_gfs_mmm
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
-/branches/atmos_physics:2282-2525
+/branches/atmos_physics:2282-2540
 /branches/cam_mpas_nh:1260-1270
 /branches/ocean_projects/ale_split_exp:1437-1483
 /branches/ocean_projects/ale_vert_coord:1225-1383
\ No newline at end of property
Modified: branches/atmphys_gfs_mmm/Makefile
===================================================================
--- branches/atmphys_gfs_mmm/Makefile        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/Makefile        2013-03-01 23:18:00 UTC (rev 2543)
@@ -195,7 +195,8 @@
 
 CPPINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
 FCINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
-LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf
+#LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf
+LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf -lnetcdf -L/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/x86_64 -lgcc
 
 NCLIB = -lnetcdf
 NCLIBF = -lnetcdff

Modified: branches/atmphys_gfs_mmm/namelist.input.nhyd_atmos
===================================================================
--- branches/atmphys_gfs_mmm/namelist.input.nhyd_atmos        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/namelist.input.nhyd_atmos        2013-03-01 23:18:00 UTC (rev 2543)
@@ -1,56 +1,56 @@
 &amp;nhyd_model
    config_time_integration = 'SRK3'
    config_dt = 450.0
-   config_start_time = '2010-10-23_00:00:00'
+   config_start_time   = '2010-10-23_00:00:00'
    config_run_duration = '5_00:00:00'
    config_number_of_sub_steps = 6
-   config_h_mom_eddy_visc2 = 0.0
-   config_h_mom_eddy_visc4 = 0.0
-   config_v_mom_eddy_visc2 = 0.0
-   config_h_theta_eddy_visc2 = 0.0
-   config_h_theta_eddy_visc4 = 0.0
-   config_v_theta_eddy_visc2 = 0.0
-   config_horiz_mixing = '2d_smagorinsky'
-   config_len_disp = 120000.0
-   config_theta_adv_order = 3
-   config_scalar_adv_order = 3
-   config_w_adv_order = 3
-   config_u_vadv_order = 3
-   config_w_vadv_order = 3
-   config_theta_vadv_order = 3
-   config_scalar_vadv_order = 3
-   config_coef_3rd_order = 0.25
-   config_positive_definite = .true.
-   config_monotonic = .false.
-   config_epssm = 0.1
-   config_smdiv = 0.1
-   config_h_ScaleWithMesh = .false.
-   config_sfc_update_interval = &quot;none&quot;
-   config_newpx = .false.
+   config_h_mom_eddy_visc2    = 0.0
+   config_h_mom_eddy_visc4    = 0.0
+   config_v_mom_eddy_visc2    = 0.0
+   config_h_theta_eddy_visc2  = 0.0
+   config_h_theta_eddy_visc4  = 0.0
+   config_v_theta_eddy_visc2  = 0.0
+   config_horiz_mixing        = '2d_smagorinsky'
+   config_len_disp            = 120000.0
+   config_visc4_2dsmag        = 0.05
+   config_u_vadv_order        = 3
+   config_w_vadv_order        = 3
+   config_theta_vadv_order    = 3
+   config_scalar_vadv_order   = 3
+   config_w_adv_order         = 3
+   config_theta_adv_order     = 3
+   config_scalar_adv_order    = 3
+   config_scalar_advection    = .true.
+   config_positive_definite   = .false.
+   config_monotonic           = .true.
+   config_coef_3rd_order      = 0.25
+   config_epssm               = 0.1
+   config_smdiv               = 0.1
+   config_h_ScaleWithMesh     = .false.
+   config_newpx               = .false.
+   config_sfc_update_interval = 'none'
 /
    config_stop_time  = '0000-01-16_00:00:00'
 
 &amp;damping
    config_zd = 22000.0
-   config_xnutr = 0.0
+   config_xnutr = 0.2
 /
 
 &amp;io
-   config_input_name = 'x1.40962.init.nc'
-   config_output_name = 'x1.40962.output.nc'
-   config_restart_name = 'restart.nc'
-   config_output_interval = '1_00:00:00'
+   config_input_name         = 'x1.40962.init.nc'
+   config_output_name        = 'x1.40962.output.nc'
+   config_restart_name       = 'x1.40962.restart.nc'
+   config_output_interval    = '1_00:00:00'
    config_frames_per_outfile = 1
-   config_pio_num_iotasks = 0
-   config_pio_stride      = 1
+   config_pio_num_iotasks    = 0
+   config_pio_stride         = 1
 /
-   config_sfc_update_name = 'sfc_update.nc'
+   config_sfc_update_name    = 'x1.40962.sfc_update.nc'
 
 &amp;decomposition
-   config_number_of_blocks = 0
+   config_number_of_blocks         = 0
    config_block_decomp_file_prefix = 'x1.40962.graph.info.part.'
-   config_explicit_proc_decomp = .false.
-   config_proc_decomp_file_prefix = 'graph.info.part.'
 /
 
 &amp;restart
@@ -59,27 +59,30 @@
 /
 
 &amp;physics
-  config_frac_seaice         =  .false.
-  config_sfc_albedo          =  .true.
-  config_sst_update          =  .false.
-  config_sstdiurn_update     =  .false.
-  config_deepsoiltemp_update =  .false.
-
-  config_n_microp            =   5
-
-  config_radtlw_interval     = '00:30:00'
-  config_radtsw_interval     = '00:30:00'
-  config_conv_interval       = 'none'
-  config_pbl_interval        = 'none'
-
-  config_microp_scheme       =  'wsm6'
-  config_conv_shallow_scheme =  'off'
-  config_conv_deep_scheme    =  'kain_fritsch'
-  config_eddy_scheme         =  'off'
-  config_lsm_scheme          =  'noah'
-  config_pbl_scheme          =  'ysu'
-  config_radt_cld_scheme     =  'off'
-  config_radt_lw_scheme      =  'rrtmg_lw'
-  config_radt_sw_scheme      =  'rrtmg_sw'
-  config_sfclayer_scheme     =  'monin_obukhov'
+   config_frac_seaice         = .false.
+   config_sfc_albedo          = .true.
+   config_sfc_snowalbedo      = .true.
+   config_sst_update          = .false.
+   config_sstdiurn_update     = .false.
+   config_deepsoiltemp_update = .false.
+   config_bucket_update       = 'none'
+   config_bucket_rainc        = 100.0
+   config_bucket_rainnc       = 100.0
+   config_bucket_radt         = 1.0e9
+   config_radtlw_interval     = '00:30:00'
+   config_radtsw_interval     = '00:30:00'
+   config_conv_interval       = 'none'
+   config_pbl_interval        = 'none'
+   config_n_microp            = 5
+   config_microp_scheme       = 'wsm6'
+   config_conv_shallow_scheme = 'off'
+   config_conv_deep_scheme    = 'kain_fritsch'
+   config_eddy_scheme         = 'off'
+   config_lsm_scheme          = 'noah'
+   config_pbl_scheme          = 'ysu'
+   config_gwdo_scheme         = 'off'
+   config_radt_cld_scheme     = 'off'
+   config_radt_lw_scheme      = 'rrtmg_lw'
+   config_radt_sw_scheme      = 'rrtmg_sw'
+   config_sfclayer_scheme     = 'monin_obukhov'
 /

Modified: branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_control.F
===================================================================
--- branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_control.F        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_control.F        2013-03-01 23:18:00 UTC (rev 2543)
@@ -109,14 +109,7 @@
     call physics_error_fatal(mpas_err_message)
 
  endif
- if(config_gwdo_scheme .eq. 'ysu_gwdo') then
 
-    write(mpas_err_message,'(A,A10)') 'gwdo_scheme being tested - do not use right now: ', &amp;
-          trim(config_gwdo_scheme)
-    call physics_error_fatal(mpas_err_message)
-
- endif
-
 !diffusion scheme:
  if(.not. (config_eddy_scheme .eq. 'off')) then
  

Modified: branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_driver_gwdo.F
===================================================================
--- branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_driver_gwdo.F        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_driver_gwdo.F        2013-03-01 23:18:00 UTC (rev 2543)
@@ -23,7 +23,7 @@
  subroutine allocate_gwdo
 !=============================================================================================
 
- if(.not.allocated(area_p)  ) allocate(area_p(ims:ime,jms:jme)  )
+ if(.not.allocated(dx_p)    ) allocate(dx_p(ims:ime,jms:jme)    )
  if(.not.allocated(var2d_p) ) allocate(var2d_p(ims:ime,jms:jme) )
  if(.not.allocated(con_p)   ) allocate(con_p(ims:ime,jms:jme)   )
  if(.not.allocated(oa1_p)   ) allocate(oa1_p(ims:ime,jms:jme)   )
@@ -49,7 +49,7 @@
  subroutine deallocate_gwdo
 !=============================================================================================
 
- if(allocated(area_p)  ) deallocate(area_p  )
+ if(allocated(dx_p)    ) deallocate(dx_p    )
  if(allocated(var2d_p) ) deallocate(var2d_p )
  if(allocated(con_p)   ) deallocate(con_p   )
  if(allocated(oa1_p)   ) deallocate(oa1_p   )
@@ -81,11 +81,20 @@
  type(diag_physics_type),intent(in):: diag_physics
  type(tend_physics_type),intent(in):: tend_physics
 
+!local variables:
+ integer:: iEdge
+
 !---------------------------------------------------------------------------------------------
 
  do j = jts,jte
  do i = its,ite
-    area_p(i,j)  = mesh % areaCell % array(i)
+    iEdge = mesh%nEdgesOnCell%array(i)
+    dx_p(i,j) = maxval(mesh%dcEdge%array(mesh%edgesOnCell%array(1:iEdge,i)))
+ enddo
+ enddo
+
+ do j = jts,jte
+ do i = its,ite
     var2d_p(i,j) = sfc_input % var2d % array(i)
     con_p(i,j)   = sfc_input % con   % array(i)
     oa1_p(i,j)   = sfc_input % oa1   % array(i)
@@ -142,12 +151,22 @@
  do i = its,ite
     diag_physics % dtaux3d % array(k,i) = dtaux3d_p(i,k,j)
     diag_physics % dtauy3d % array(k,i) = dtauy3d_p(i,k,j)
+    diag_physics % rubldiff % array(k,i) = rublten_p(i,k,j)-tend_physics%rublten%array(k,i)
+    diag_physics % rvbldiff % array(k,i) = rvblten_p(i,k,j)-tend_physics%rvblten%array(k,i) 
+
     tend_physics % rublten % array(k,i) = rublten_p(i,k,j)
     tend_physics % rvblten % array(k,i) = rvblten_p(i,k,j)
  enddo
  enddo
  enddo
 
+!write(0,*)
+!write(0,*) '--- end subroutine gwdo_to_MPAS:'
+!do i = its,ite
+!   write(0,101) i,diag_physics%dusfcg%array(i),diag_physics%dvsfcg%array(i)
+!enddo
+!101 format(i8,2(1x,e15.8))
+
  end subroutine gwdo_to_MPAS
  
 !=============================================================================================
@@ -163,6 +182,10 @@
  type(diag_physics_type),intent(inout):: diag_physics
  type(tend_physics_type),intent(inout):: tend_physics
 
+!local variables:
+ integer:: i,iCell,iEdge
+ real(kind=RKIND),dimension(:),allocatable:: dx_max
+
 !--------------------------------------------------------------------------------------------- 
  write(0,*)
  write(0,*) '--- enter subroutine driver_gwdo: dt_pbl=',dt_pbl
@@ -176,21 +199,21 @@
 #if defined(do_hydrostatic_pressure)
 !... REARRANGED CALL USING HYDROSTATIC PRESSURE:
        call gwdo ( &amp;
-                  p3d      = pres_hydd_p , p3di      = pres2_hydd_p , pi3d    = pi_p      , &amp;
-                  u3d      = u_p         , v3d       = v_p          , t3d     = t_p       , &amp; 
-                  qv3d     = qv_p        , z         = z_p          , rublten = rublten_p , &amp;
-                  rvblten  = rvblten_p   , dtaux3d   = dtaux3d_p    , dtauy3d = dtauy3d_p , &amp;
-                  dusfcg   = dusfcg_p    , dvsfcg    = dvsfcg_p     , kpbl2d  = kpbl_p    , &amp;
-                  areaCell = area_p      , itimestep = itimestep    , dt      = dt_pbl    , &amp;       
-                  dx       = len_disp    , cp        = cp           , g       = g         , &amp; 
-                  rd       = R_d         , rv        = R_v          , ep1     = ep_1      , &amp;       
-                  pi       = pii         , var2d     = var2d_p      , oc12d   = con_p     , &amp;        
-                  oa2d1    = oa1_p       , oa2d2     = oa2_p        , oa2d3   = oa3_p     , &amp;
-                  oa2d4    = oa4_p       , ol2d1     = ol1_p        , ol2d2   = ol2_p     , &amp;
-                  ol2d3    = ol3_p       , ol2d4     = ol4_p        ,                       &amp;
-                  ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde ,   &amp;
-                  ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme ,   &amp;
-                  its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte     &amp;
+                  p3d       = pres_hydd_p , p3di      = pres2_hydd_p , pi3d    = pi_p      , &amp;
+                  u3d       = u_p         , v3d       = v_p          , t3d     = t_p       , &amp; 
+                  qv3d      = qv_p        , z         = z_p          , rublten = rublten_p , &amp;
+                  rvblten   = rvblten_p   , dtaux3d   = dtaux3d_p    , dtauy3d = dtauy3d_p , &amp;
+                  dusfcg    = dusfcg_p    , dvsfcg    = dvsfcg_p     , kpbl2d  = kpbl_p    , &amp;
+                  itimestep = itimestep   , dt        = dt_pbl       , dx      = dx_p      , &amp; 
+                  cp        = cp          , g         = g            , rd      = R_d       , &amp; 
+                  rv        = R_v         , ep1       = ep_1         , pi      = pii       , &amp; 
+                  var2d     = var2d_p     , oc12d     = con_p        , oa2d1   = oa1_p     , &amp; 
+                  oa2d2     = oa2_p       , oa2d3     = oa3_p        , oa2d4   = oa4_p     , &amp;
+                  ol2d1     = ol1_p       , ol2d2     = ol2_p        , ol2d3   = ol3_p     , &amp; 
+                  ol2d4     = ol4_p       ,                                                  &amp;
+                  ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde ,    &amp;
+                  ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme ,    &amp;
+                  its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte      &amp;
                  )
 #else
 !... REARRANGED CALL:

Modified: branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_update_surface.F
===================================================================
--- branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_update_surface.F        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_update_surface.F        2013-03-01 23:18:00 UTC (rev 2543)
@@ -54,7 +54,7 @@
  shdmax     =&gt; sfc_input % shdmax     % array
 
 !updates the surface background albedo for the current date as a function of the monthly-mean
-!surface background albedo valid on the 15th day of the month, if input_sfc_albedo is true:
+!surface background albedo valid on the 15th day of the month, if config_sfc_albedo is true:
  if(config_sfc_albedo) then
 
     call monthly_interp_to_date(nCellsSolve,current_date,albedo12m,sfc_albbck)

Modified: branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_vars.F
===================================================================
--- branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_vars.F        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_atmos_physics/mpas_atmphys_vars.F        2013-03-01 23:18:00 UTC (rev 2543)
@@ -245,6 +245,9 @@
     ol4_p              !orographic direction asymmetry function                            (-)
 
  real(kind=RKIND),dimension(:,:),allocatable:: &amp;
+    dx_p               !maximum distance between cell centers                              (m)
+
+ real(kind=RKIND),dimension(:,:),allocatable:: &amp;
     dusfcg_p,         &amp;!vertically-integrated gwdo u-stress                         (Pa m s-1)
     dvsfcg_p           !vertically-integrated gwdo v -stress                        (Pa m s-1)
 

Modified: branches/atmphys_gfs_mmm/src/core_atmos_physics/physics_wrf/module_bl_gwdo.F
===================================================================
--- branches/atmphys_gfs_mmm/src/core_atmos_physics/physics_wrf/module_bl_gwdo.F        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_atmos_physics/physics_wrf/module_bl_gwdo.F        2013-03-01 23:18:00 UTC (rev 2543)
@@ -16,7 +16,6 @@
                   znu,znw,mut,p_top, &amp;
                   cp,g,rd,rv,ep1,pi, &amp;
                   dt,dx,kpbl2d,itimestep, &amp;
-                  areaCell, &amp;
                   ids,ide, jds,jde, kds,kde, &amp;
                   ims,ime, jms,jme, kms,kme, &amp;
                   its,ite, jts,jte, kts,kte)
@@ -67,7 +66,14 @@
                                      its,ite, jts,jte, kts,kte
   integer, intent(in ) :: itimestep
 !
+!MPAS specific (Laura D. Fowler 2013-02-12):
+#if defined(non_hydrostatic_core)
+  real, intent(in ) :: dt,cp,g,rd,rv,ep1,pi
+  real, intent(in), dimension(ims:ime,jms:jme):: dx
+#else
   real, intent(in ) :: dt,dx,cp,g,rd,rv,ep1,pi
+#endif
+!MPAS  specific end.
 !
   real, dimension( ims:ime, kms:kme, jms:jme ) , &amp;
             intent(in ) :: qv3d, &amp;
@@ -111,11 +117,6 @@
                                                                           znw
 !
   real, optional, intent(in ) :: p_top
-
-!MPAS specific (Laura D. Fowler):
- real,intent(in),dimension(ims:ime,jms:jme),optional:: areaCell
-!MPAS specific end.
-
 !
 !local
 !
@@ -170,9 +171,14 @@
               ,var=var2d(ims,j),oc1=oc12d(ims,j) &amp;
               ,oa4=oa4,ol4=ol4 &amp;
               ,g=g,cp=cp,rd=rd,rv=rv,fv=ep1,pi=pi &amp;
+!MPAS specific (Laura D. Fowler 2013-02-12): 
+#if defined(non_hydrostatic_core)
+              ,dxmeter=dx(ims,j),deltim=dt &amp;
+#else
               ,dxmeter=dx,deltim=dt &amp;
+#endif
+!MPAS specific end. 
               ,kpbl=kpbl2d(ims,j),kdt=itimestep,lat=j &amp;
-              ,areaCell=areaCell(ims,j) &amp;
               ,ids=ids,ide=ide, jds=jds,jde=jde, kds=kds,kde=kde &amp;
               ,ims=ims,ime=ime, jms=jms,jme=jme, kms=kms,kme=kme &amp;
               ,its=its,ite=ite, jts=jts,jte=jte, kts=kts,kte=kte )
@@ -191,7 +197,6 @@
                     prsi,del,prsl,prslk,zl,rcl, &amp;
                     var,oc1,oa4,ol4,dusfc,dvsfc, &amp;
                     g,cp,rd,rv,fv,pi,dxmeter,deltim,kpbl,kdt,lat, &amp;
-                    areaCell, &amp;
                     ids,ide, jds,jde, kds,kde, &amp;
                     ims,ime, jms,jme, kms,kme, &amp;
                     its,ite, jts,jte, kts,kte)
@@ -244,7 +249,15 @@
                             ims,ime, jms,jme, kms,kme, &amp;
                             its,ite, jts,jte, kts,kte
 !
+!MPAS specific (Laura D. Fowler 2013-02-12):
+#if defined(non_hydrostatic_core)
+   real :: g,rd,rv,fv,cp,pi,deltim,rcl
+   real, dimension(ims:ime):: dxmeter
+#else
    real :: g,rd,rv,fv,cp,pi,dxmeter,deltim,rcl
+#endif
+!MPAS specific end.
+
    real :: dudt(ims:ime,kms:kme),dvdt(ims:ime,kms:kme), &amp;
                             dtaux2d(ims:ime,kms:kme),dtauy2d(ims:ime,kms:kme), &amp;
                             u1(ims:ime,kms:kme),v1(ims:ime,kms:kme), &amp;
@@ -257,13 +270,6 @@
    integer :: kpbl(ims:ime)
    real :: var(ims:ime),oc1(ims:ime), &amp;
                             dusfc(ims:ime),dvsfc(ims:ime)
-
-!MPAS specific (Laura D. Fowler): We take into accound the actual size of individual
-!grid-boxes:
-   real,intent(in),dimension(ims:ime),optional:: areaCell
-   real,dimension(its:ite):: cleff_area
-!MPAS specific end.
-
 ! critical richardson number for wave breaking : ! larger drag with larger value
 !
    real,parameter :: ric = 0.25
@@ -287,10 +293,19 @@
    integer :: i,k,lcap,lcapp1,nwd,idir,kpblmin,kpblmax, &amp;
                             klcap,kp1,ikount,kk
 !
+!MPAS specific (Laura D. Fowler 2013-02-12):
+#if defined(non_hydrostatic_core)
+   real :: rcs,rclcs,csg,fdir,cs,rcsks, &amp;
+                            wdir,ti,rdz,temp,tem2,dw2,shr2,bvf2,rdelks, &amp;
+                            wtkbj,coefm,tem,gfobnv,hd,fro,rim,temc,tem1,efact, &amp;
+                            temv,dtaux,dtauy
+   real, dimension(its:ite):: cleff
+#else
    real :: rcs,rclcs,csg,fdir,cleff,cs,rcsks, &amp;
                             wdir,ti,rdz,temp,tem2,dw2,shr2,bvf2,rdelks, &amp;
                             wtkbj,coefm,tem,gfobnv,hd,fro,rim,temc,tem1,efact, &amp;
                             temv,dtaux,dtauy
+#endif        
 !
    logical :: ldrag(its:ite),icrilv(its:ite), &amp;
                             flag(its:ite),kloop1(its:ite)
@@ -334,7 +349,15 @@
 !!!!!!! cleff (subgrid mountain scale ) is highly tunable parameter
 !!!!!!! the bigger (smaller) value produce weaker (stronger) wave drag
 !
+!MPAS specific (Laura D. Fowler 2013-02-13):
+#if defined(non_hydrostatic_core)
+   do i = its, ite
+      cleff(i) = max(dxmeter(i),50.e3)
+   enddo
+#else
    cleff = max(dxmeter,50.e3)
+#endif
+!MPAS specific end.
 !
 ! initialize!!
 !
@@ -368,15 +391,6 @@
    do i = its,ite
      zlowtop(i) = 2. * var(i)
    enddo
-
-!MPAS specific (Laura D. Fowler)::
-   if(present(areaCell)) then
-      do i = its,ite
-         cleff_area(i) = max(sqrt(areaCell(i)),50.e3)
-      enddo
-   endif
-!MPAS specific end.
-
 !
 !--- determine new reference level &gt; 2*var
 !
@@ -586,11 +600,12 @@
        efact = (oa(i) + 2.) ** (ce*fr(i)/frc)
        efact = min( max(efact,efmin), efmax )
        coefm = (1. + ol(i)) ** (oa(i)+1.)
-       if(present(areaCell)) then
-          xlinv(i) = coefm / cleff_area(i)
-       else
-          xlinv(i) = coefm / cleff
-       endif
+!MPAS specific (Laura D. Fowler 2013-02-12):
+#if defined (non_hydrostatic_core)
+       xlinv(i) = coefm / cleff(i)
+#else
+       xlinv(i) = coefm / cleff
+#endif
        tem = fr(i) * fr(i) * oc1(i)
        gfobnv = gmax * tem / ((tem + cg)*bnv(i))
        taub(i) = xlinv(i) * roll(i) * ulow(i) * ulow(i) &amp;

Modified: branches/atmphys_gfs_mmm/src/core_nhyd_atmos/Registry
===================================================================
--- branches/atmphys_gfs_mmm/src/core_nhyd_atmos/Registry        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_nhyd_atmos/Registry        2013-03-01 23:18:00 UTC (rev 2543)
@@ -539,22 +539,25 @@
 % dtaux3d    : gravity wave drag over orography u-stress                                    (m s-1)
 % dtauy3d    : gravity wave drag over orography v-stress                                    (m s-1)
 
-var persistent real    var2d    ( nCells                    ) 0  ro var2d          sfc_input    - -
-var persistent real    con      ( nCells                    ) 0  ro con            sfc_input    - -
-var persistent real    oa1      ( nCells                    ) 0  ro oa1            sfc_input    - -
-var persistent real    oa2      ( nCells                    ) 0  ro oa2            sfc_input    - -
-var persistent real    oa3      ( nCells                    ) 0  ro oa3            sfc_input    - -
-var persistent real    oa4      ( nCells                    ) 0  ro oa4            sfc_input    - -
-var persistent real    ol1      ( nCells                    ) 0  ro ol1            sfc_input    - -
-var persistent real    ol2      ( nCells                    ) 0  ro ol2            sfc_input    - -
-var persistent real    ol3      ( nCells                    ) 0  ro ol3            sfc_input    - -
-var persistent real    ol4      ( nCells                    ) 0  ro ol4            sfc_input    - -
+var persistent real    var2d    ( nCells                    ) 0  iro var2d         sfc_input    - -
+var persistent real    con      ( nCells                    ) 0  iro con           sfc_input    - -
+var persistent real    oa1      ( nCells                    ) 0  iro oa1           sfc_input    - -
+var persistent real    oa2      ( nCells                    ) 0  iro oa2           sfc_input    - -
+var persistent real    oa3      ( nCells                    ) 0  iro oa3           sfc_input    - -
+var persistent real    oa4      ( nCells                    ) 0  iro oa4           sfc_input    - -
+var persistent real    ol1      ( nCells                    ) 0  iro ol1           sfc_input    - -
+var persistent real    ol2      ( nCells                    ) 0  iro ol2           sfc_input    - -
+var persistent real    ol3      ( nCells                    ) 0  iro ol3           sfc_input    - -
+var persistent real    ol4      ( nCells                    ) 0  iro ol4           sfc_input    - -
 
 var persistent real    dusfcg   ( nCells Time               ) 1  ro dusfcg         diag_physics - -
 var persistent real    dvsfcg   ( nCells Time               ) 1  ro dvsfcg         diag_physics - -
 var persistent real    dtaux3d  ( nVertLevels nCells Time   ) 1  ro dtaux3d        diag_physics - -
 var persistent real    dtauy3d  ( nVertLevels nCells Time   ) 1  ro dtauy3d        diag_physics - -
 
+var persistent real    rubldiff ( nVertLevels nCells Time   ) 1  ro rubldiff       diag_physics - -
+var persistent real    rvbldiff ( nVertLevels nCells Time   ) 1  ro rvbldiff       diag_physics - -
+
 %--------------------------------------------------------------------------------------------------
 %... PARAMETERIZATION OF SURFACE LAYER PROCESSES:
 %--------------------------------------------------------------------------------------------------

Index: branches/atmphys_gfs_mmm/src/core_ocean
===================================================================
--- branches/atmphys_gfs_mmm/src/core_ocean        2013-03-01 23:17:57 UTC (rev 2542)
+++ branches/atmphys_gfs_mmm/src/core_ocean        2013-03-01 23:18:00 UTC (rev 2543)

Property changes on: branches/atmphys_gfs_mmm/src/core_ocean
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
-/branches/atmos_physics/src/core_ocean:2282-2525
+/branches/atmos_physics/src/core_ocean:2282-2540
 /branches/cam_mpas_nh/src/core_ocean:1260-1270
 /branches/ocean_projects/ale_split_exp/src/core_ocean:1437-1483
 /branches/ocean_projects/ale_vert_coord/src/core_ocean:1225-1383
\ No newline at end of property
</font>
</pre>