<p><b>laura@ucar.edu</b> 2013-03-07 16:30:26 -0700 (Thu, 07 Mar 2013)</p><p>Added the local variables cd_p,cda_p,ck_p,cka_p,ustm_p, and scm_force_flux. THese variables are optional in module_sf_sfclay.F, but need to be passed in the argument list. Results are unchanged relative to previous revision (tested using pgi DEBUG=true on yellowstone. If not in the argument lsit, MPAS crashes when compiled with gfortran (but not with pgi).<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_driver_sfclayer.F
===================================================================
--- branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_driver_sfclayer.F        2013-03-07 23:27:25 UTC (rev 2569)
+++ branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_driver_sfclayer.F        2013-03-07 23:30:26 UTC (rev 2570)
@@ -17,7 +17,9 @@
 
  integer,parameter,private:: isfflx   = 1        !=1 for surface heat and moisture fluxes.
  integer,parameter,private:: isftcflx = 0        !=0,(Charnock and Carlson-Boland).
- integer,parameter,private:: iz0tlnd  = 0        !=0,(Carlson-Boland)
+ integer,parameter,private:: iz0tlnd  = 0        !=0,(Carlson-Boland).
+ integer,parameter,private:: scm_force_flux = 0  !SCM surface forcing by surface fluxes.
+                                                 !0=no 1=yes (WRF single column model option only).
 
  integer,private:: i,j
 
@@ -29,8 +31,12 @@
 
  if(.not.allocated(area_p)   ) allocate(area_p(ims:ime,jms:jme)   )
  if(.not.allocated(br_p)     ) allocate(br_p(ims:ime,jms:jme)     )
+ if(.not.allocated(cd_p)     ) allocate(cd_p(ims:ime,jms:jme)     )
+ if(.not.allocated(cda_p)    ) allocate(cda_p(ims:ime,jms:jme)    )
  if(.not.allocated(chs_p)    ) allocate(chs_p(ims:ime,jms:jme)    )
  if(.not.allocated(chs2_p)   ) allocate(chs2_p(ims:ime,jms:jme)   )
+ if(.not.allocated(ck_p)     ) allocate(ck_p(ims:ime,jms:jme)     )
+ if(.not.allocated(cka_p)    ) allocate(cka_p(ims:ime,jms:jme)    )
  if(.not.allocated(cpm_p)    ) allocate(cpm_p(ims:ime,jms:jme)    )
  if(.not.allocated(cqs2_p)   ) allocate(cqs2_p(ims:ime,jms:jme)   )
  if(.not.allocated(gz1oz0_p) ) allocate(gz1oz0_p(ims:ime,jms:jme) )
@@ -56,6 +62,7 @@
  if(.not.allocated(th2m_p)   ) allocate(th2m_p(ims:ime,jms:jme)   )
  if(.not.allocated(u10_p)    ) allocate(u10_p(ims:ime,jms:jme)    )
  if(.not.allocated(ust_p)    ) allocate(ust_p(ims:ime,jms:jme)    )
+ if(.not.allocated(ustm_p)   ) allocate(ustm_p(ims:ime,jms:jme)   )
  if(.not.allocated(v10_p)    ) allocate(v10_p(ims:ime,jms:jme)    )
  if(.not.allocated(wspd_p)   ) allocate(wspd_p(ims:ime,jms:jme)   )
  if(.not.allocated(xland_p)  ) allocate(xland_p(ims:ime,jms:jme)  )
@@ -70,8 +77,12 @@
 
  if(allocated(area_p)   ) deallocate(area_p   )
  if(allocated(br_p)     ) deallocate(br_p     )
+ if(allocated(cd_p)     ) deallocate(cd_p     )
+ if(allocated(cda_p)    ) deallocate(cda_p    )
  if(allocated(chs_p)    ) deallocate(chs_p    )
  if(allocated(chs2_p)   ) deallocate(chs2_p   )
+ if(allocated(ck_p)     ) deallocate(ck_p     )
+ if(allocated(cka_p)    ) deallocate(cka_p    )
  if(allocated(cpm_p)    ) deallocate(cpm_p    )
  if(allocated(cqs2_p)   ) deallocate(cqs2_p   )
  if(allocated(gz1oz0_p) ) deallocate(gz1oz0_p )
@@ -97,6 +108,7 @@
  if(allocated(th2m_p)   ) deallocate(th2m_p   )
  if(allocated(u10_p)    ) deallocate(u10_p    )
  if(allocated(ust_p)    ) deallocate(ust_p    )
+ if(allocated(ustm_p)   ) deallocate(ustm_p   )
  if(allocated(v10_p)    ) deallocate(v10_p    )
  if(allocated(wspd_p)   ) deallocate(wspd_p   )
  if(allocated(xland_p)  ) deallocate(xland_p  )
@@ -129,6 +141,7 @@
     qfx_p(i,j)    = diag_physics % qfx    % array(i)
     qsfc_p(i,j)   = diag_physics % qsfc   % array(i) 
     mol_p(i,j)    = diag_physics % mol    % array(i) 
+    regime_p(i,j) = diag_physics % regime % array(i)
     ust_p(i,j)    = diag_physics % ust    % array(i)
     znt_p(i,j)    = diag_physics % znt    % array(i) 
     zol_p(i,j)    = diag_physics % zol    % array(i) 
@@ -147,7 +160,6 @@
     psim_p(i,j)   = 0._RKIND
     psih_p(i,j)   = 0._RKIND
     qgh_p(i,j)    = 0._RKIND
-    regime_p(i,j) = 0._RKIND
     rmol_p(i,j)   = 0._RKIND
     wspd_p(i,j)   = 0._RKIND
     q2_p(i,j)     = 0._RKIND
@@ -275,7 +287,10 @@
                    svp2     = svp2       , svp3     = svp3       , svpt0    = svpt0      , &amp;
                    ep1      = ep_1       , ep2      = ep_2       , karman   = karman     , &amp;
                    eomeg    = eomeg      , stbolt   = stbolt     , P1000mb  = P0         , &amp;
-                   isftcflx = isftcflx   , iz0tlnd  = iz0tlnd    , areaCell = area_p     , &amp; 
+                   areaCell = area_p     , ustm     = ustm_p     , ck       = ck_p       , &amp; 
+                   cka      = cka_p      , cd       = cd_p       , cda      = cda_p      , &amp; 
+                   isftcflx = isftcflx   , iz0tlnd  = iz0tlnd    ,                         &amp;
+                   scm_force_flux = scm_force_flux               ,                         &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;
@@ -302,7 +317,10 @@
                    svp2     = svp2       , svp3     = svp3       , svpt0    = svpt0      , &amp;
                    ep1      = ep_1       , ep2      = ep_2       , karman   = karman     , &amp;
                    eomeg    = eomeg      , stbolt   = stbolt     , P1000mb  = P0         , &amp;
-                   isftcflx = isftcflx   , iz0tlnd  = iz0tlnd    , areaCell = area_p     , &amp; 
+                   areaCell = area_p     , ustm     = ustm_p     , ck       = ck_p       , &amp; 
+                   cka      = cka_p      , cd       = cd_p       , cda      = cda_p      , &amp; 
+                   isftcflx = isftcflx   , iz0tlnd  = iz0tlnd    ,                         &amp;
+                   scm_force_flux = scm_force_flux               ,                         &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;

</font>
</pre>