<p><b>laura@ucar.edu</b> 2010-07-23 15:18:59 -0600 (Fri, 23 Jul 2010)</p><p>driver for parameterizations of surface layer<br>
</p><hr noshade><pre><font color="gray">Added: branches/atmos_physics/src/core_physics/module_physics_sfclayer.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_sfclayer.F         (rev 0)
+++ branches/atmos_physics/src/core_physics/module_physics_sfclayer.F        2010-07-23 21:18:59 UTC (rev 414)
@@ -0,0 +1,132 @@
+!=============================================================================================
+ module module_physics_sfclayer
+ use grid_types
+ use module_physics_vars
+
+!from wrf physics:
+ use module_sf_sfclay
+
+ implicit none
+ private
+ public:: sfclayer_allocate, &
+ sfclayer_deallocate, &
+ sfclayer_interface_init
+
+ integer,private:: i,j
+
+ contains
+
+!=============================================================================================
+ subroutine sfclayer_allocate
+!=============================================================================================
+
+ if(.not.allocated(br_p) ) allocate(br_p(ims:ime,jms:jme) )
+ if(.not.allocated(gz1oz0_p) ) allocate(gz1oz0_p(ims:ime,jms:jme) )
+ 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(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) )
+ if(.not.allocated(qfx_p) ) allocate(qfx_p(ims:ime,jms:jme) )
+ if(.not.allocated(qsfc_p) ) allocate(qsfc_p(ims:ime,jms:jme) )
+ if(.not.allocated(regime_p) ) allocate(regime_p(ims:ime,jms:jme) )
+ if(.not.allocated(rmol_p) ) allocate(rmol_p(ims:ime,jms:jme) )
+ if(.not.allocated(t2_p) ) allocate(t2_p(ims:ime,jms:jme) )
+ if(.not.allocated(tsk_p) ) allocate(tsk_p(ims:ime,jms:jme) )
+ if(.not.allocated(th2_p) ) allocate(th2_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) )
+ if(.not.allocated(znt_p) ) allocate(znt_p(ims:ime,jms:jme) )
+
+ end subroutine sfclayer_allocate
+
+!=============================================================================================
+ subroutine sfclayer_deallocate
+!=============================================================================================
+
+ if(allocated(br_p) ) deallocate(br_p )
+ if(allocated(gz1oz0_p) ) deallocate(gz1oz0_p )
+ if(allocated(flhc_p) ) deallocate(flhc_p )
+ if(allocated(flqc_p) ) deallocate(flqc_p )
+ if(allocated(hfx_p) ) deallocate(hfx_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 )
+ if(allocated(qfx_p) ) deallocate(qfx_p )
+ if(allocated(qsfc_p) ) deallocate(qsfc_p )
+ if(allocated(regime_p) ) deallocate(regime_p )
+ if(allocated(rmol_p) ) deallocate(rmol_p )
+ if(allocated(t2_p) ) deallocate(t2_p )
+ if(allocated(tsk_p) ) deallocate(tsk_p )
+ if(allocated(th2_p) ) deallocate(th2_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 )
+ if(allocated(znt_p) ) deallocate(znt_p )
+
+ end subroutine sfclayer_deallocate
+
+!=============================================================================================
+ subroutine sfclayer_interface_init(s)
+!=============================================================================================
+
+!input arguments:
+ type(grid_state),intent(in):: s
+
+!---------------------------------------------------------------------------------------------
+
+ do j = jts,jte
+ do i = its,ite
+
+ br_p(i,j) = 0.
+ gz1oz0_p(i,j) = 0.
+ psih_p(i,j) = 0.
+ psim_p(i,j) = 0.
+ wspd_p(i,j) = 0.
+
+ flhc_p(i,j) = s % flhc % array(i)
+ flqc_p(i,j) = s % flqc % array(i)
+ hfx_p(i,j) = s % hfx % array(i)
+ lh_p(i,j) = s % lh % array(i)
+ mavail_p(i,j) = s % mavail % array(i)
+ mol_p(i,j) = s % mol % array(i)
+ pblh_p(i,j) = s % pblh % array(i)
+ q2_p(i,j) = s % q2 % array(i)
+ qfx_p(i,j) = s % qfx % array(i)
+ qsfc_p(i,j) = s % qsfc % array(i)
+ regime_p(i,j) = s % regime % array(i)
+ rmol_p(i,j) = s % rmol % array(i)
+ t2_p(i,j) = s % t2 % array(i)
+ tsk_p(i,j) = s % tsk % array(i)
+ th2_p(i,j) = s % th2 % array(i)
+ u10_p(i,j) = s % u10 % array(i)
+ ust_p(i,j) = s % ust % array(i)
+ ustm_p(i,j) = s % ustm % array(i)
+ v10_p(i,j) = s % v10 % array(i)
+ xland_p(i,j) = s % xland % array(i)
+ znt_p(i,j) = s % znt % array(i)
+
+ enddo
+ enddo
+
+ end subroutine sfclayer_interface_init
+
+!=============================================================================================
+ end module module_physics_sfclayer
+!=============================================================================================
</font>
</pre>