<p><b>laura@ucar.edu</b> 2011-04-08 16:42:48 -0600 (Fri, 08 Apr 2011)</p><p>updated physics<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_physics/Makefile
===================================================================
--- branches/atmos_physics/src/core_physics/Makefile        2011-04-08 22:40:46 UTC (rev 792)
+++ branches/atmos_physics/src/core_physics/Makefile        2011-04-08 22:42:48 UTC (rev 793)
@@ -32,6 +32,7 @@
        module_physics_rrtmg_lwinit.o \
        module_physics_rrtmg_swinit.o \
        module_physics_todynamics.o \
+        module_physics_update.o \
        module_physics_utilities.o \
        module_physics_vars.o
@@ -143,6 +144,9 @@
module_physics_todynamics.o: \
        module_physics_vars.o
+module_physics_update.o: \
+        module_driver_convection_deep.o
+
# CORE DEPENDENT DEPENDENCIES:
ifeq ($(CORE),hyd_atmos)
@@ -153,6 +157,7 @@
module__driver_microphysics.o: \
        ./physics_wrf/module_mp_kessler.o \
        ./physics_wrf/module_mp_thompson.o \
+        ./physics_wrf/module_mp_wsm6.o \
        module_physics_constants.o \
        module_physics_interface_hyd.o \
        module_physics_vars.o
@@ -175,6 +180,7 @@
module_driver_microphysics.o: \
        ./physics_wrf/module_mp_kessler.o \
        ./physics_wrf/module_mp_thompson.o \
+        ./physics_wrf/module_mp_wsm6.o \
        module_physics_constants.o \
        module_physics_interface_nhyd.o \
        module_physics_vars.o
Modified: branches/atmos_physics/src/core_physics/module_driver_convection_deep.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_driver_convection_deep.F        2011-04-08 22:40:46 UTC (rev 792)
+++ branches/atmos_physics/src/core_physics/module_driver_convection_deep.F        2011-04-08 22:42:48 UTC (rev 793)
@@ -12,7 +12,8 @@
public:: convection_deep_allocate, &
convection_deep_deallocate, &
convection_deep_init, &
- convection_deep_driver
+ convection_deep_driver, &
+ update_convection_deep
integer, private:: i,k,j
@@ -22,70 +23,24 @@
subroutine convection_deep_allocate
!=============================================================================================
-!mixing ratios:
- if(.not.allocated(qv_p) ) allocate(qv_p(ims:ime,kms:kme,jms:jme) )
+ if(.not.allocated(cu_act_flag)) allocate(cu_act_flag(ims:ime,jms:jme) )
+ if(.not.allocated(rthcuten_p) ) allocate(rthcuten_p(ims:ime,kms:kme,jms:jme))
+ if(.not.allocated(rqvcuten_p) ) allocate(rqvcuten_p(ims:ime,kms:kme,jms:jme))
+ if(.not.allocated(rqccuten_p) ) allocate(rqccuten_p(ims:ime,kms:kme,jms:jme))
+ if(.not.allocated(rqrcuten_p) ) allocate(rqrcuten_p(ims:ime,kms:kme,jms:jme))
+ if(.not.allocated(rqicuten_p) ) allocate(rqicuten_p(ims:ime,kms:kme,jms:jme))
+ if(.not.allocated(rqscuten_p) ) allocate(rqscuten_p(ims:ime,kms:kme,jms:jme))
+ if(.not.allocated(cubot_p) ) allocate(cubot_p(ims:ime,jms:jme) )
+ if(.not.allocated(cutop_p) ) allocate(cutop_p(ims:ime,jms:jme) )
+ if(.not.allocated(pratec_p) ) allocate(pratec_p(ims:ime,jms:jme) )
+ if(.not.allocated(raincv_p) ) allocate(raincv_p(ims:ime,jms:jme) )
-!tendencies:
- if(.not.allocated(rthcuten_p)) allocate(rthcuten_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rqvcuten_p)) allocate(rqvcuten_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rqccuten_p)) allocate(rqccuten_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rqrcuten_p)) allocate(rqrcuten_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rqicuten_p)) allocate(rqicuten_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rqscuten_p)) allocate(rqscuten_p(ims:ime,kms:kme,jms:jme) )
-
-!surface precipitation:
- if(.not.allocated(rainc_p) ) allocate(rainc_p(ims:ime,jms:jme) )
- if(.not.allocated(raincv_p) ) allocate(raincv_p(ims:ime,jms:jme) )
-
- do j = jms,jme
- do i = ims,ime
- rainc_p(i,j) = 0.
- raincv_p(i,j) = 0.
- enddo
- enddo
-
- do j = jms,jme
- do k = kms,kme
- do i = ims,ime
- qv_p(i,k,j) = 0.
- rthcuten_p(i,k,j) = 0.
- rqvcuten_p(i,k,j) = 0.
- rqccuten_p(i,k,j) = 0.
- rqrcuten_p(i,k,j) = 0.
- rqicuten_p(i,k,j) = 0.
- rqscuten_p(i,k,j) = 0.
- enddo
- enddo
- enddo
-
convection_select: select case(conv_deep_scheme)
case ("kain_fritsch")
+ if(.not.allocated(nca_p) ) allocate(nca_p(ims:ime,jms:jme) )
+ if(.not.allocated(w0avg_p)) allocate(w0avg_p(ims:ime,kms:kme,jms:jme))
- if(.not.allocated(pratec_p) ) allocate(pratec_p(ims:ime,jms:jme) )
- if(.not.allocated(cu_act_flag) ) allocate(cu_act_flag(ims:ime,jms:jme) )
- if(.not.allocated(cubot_p) ) allocate(cubot_p(ims:ime,jms:jme) )
- if(.not.allocated(cutop_p) ) allocate(cutop_p(ims:ime,jms:jme) )
- if(.not.allocated(nca_p) ) allocate(nca_p(ims:ime,jms:jme) )
- if(.not.allocated(w0avg_p) ) allocate(w0avg_p(ims:ime,kms:kme,jms:jme))
-
- do j = jms,jme
- do i = ims,ime
- cu_act_flag(i,j) = .false.
- pratec_p(i,j) = 0.
- cubot_p(i,j) = 0.
- cutop_p(i,j) = 0.
- nca_p(i,j) = 0.
- enddo
- enddo
- do j = jms,jme
- do k = kms,kme
- do i = ims,ime
- w0avg_p(i,k,j) = 0.
- enddo
- enddo
- enddo
-
case default
end select convection_select
@@ -96,32 +51,24 @@
subroutine convection_deep_deallocate
!=============================================================================================
-!mixing ratios:
- if(allocated(qv_p)) deallocate(qv_p)
+ if(allocated(cu_act_flag)) deallocate(cu_act_flag)
+ if(allocated(rthcuten_p) ) deallocate(rthcuten_p )
+ if(allocated(rqvcuten_p) ) deallocate(rqvcuten_p )
+ if(allocated(rqccuten_p) ) deallocate(rqccuten_p )
+ if(allocated(rqrcuten_p) ) deallocate(rqrcuten_p )
+ if(allocated(rqicuten_p) ) deallocate(rqicuten_p )
+ if(allocated(rqscuten_p) ) deallocate(rqscuten_p )
+ if(allocated(cubot_p) ) deallocate(cubot_p )
+ if(allocated(cutop_p) ) deallocate(cutop_p )
+ if(allocated(pratec_p) ) deallocate(pratec_p )
+ if(allocated(raincv_p) ) deallocate(raincv_p )
-!tendencies:
- if(allocated(rthcuten_p)) deallocate(rthcuten_p)
- if(allocated(rqvcuten_p)) deallocate(rqvcuten_p)
- if(allocated(rqccuten_p)) deallocate(rqccuten_p)
- if(allocated(rqrcuten_p)) deallocate(rqrcuten_p)
- if(allocated(rqicuten_p)) deallocate(rqicuten_p)
- if(allocated(rqscuten_p)) deallocate(rqscuten_p)
-
-!surface precipitation:
- if(allocated(rainc_p) ) deallocate(rainc_p )
- if(allocated(raincv_p) ) deallocate(raincv_p )
-
convection_select: select case(conv_deep_scheme)
case ("kain_fritsch")
+ if(allocated(nca_p) ) deallocate(nca_p )
+ if(allocated(w0avg_p)) deallocate(w0avg_p)
- if(allocated(pratec_p) ) deallocate(pratec_p )
- if(allocated(cu_act_flag) ) deallocate(cu_act_flag)
- if(allocated(cubot_p) ) deallocate(cubot_p )
- if(allocated(cutop_p) ) deallocate(cutop_p )
- if(allocated(nca_p) ) deallocate(nca_p )
- if(allocated(w0avg_p) ) deallocate(w0avg_p )
-
case default
end select convection_select
@@ -129,15 +76,14 @@
end subroutine convection_deep_deallocate
!=============================================================================================
- subroutine convection_deep_init(state)
+ subroutine convection_deep_init(mesh,diag_physics)
!=============================================================================================
- type (state_type), intent(in) :: state
+ type(mesh_type),intent(in):: mesh
+ type(diag_physics_type),intent(inout):: diag_physics
!local variables and arrays:
-!---------------------------
- logical:: allowed_to_read
- integer:: p_qi,p_qs,p_first
+ integer:: iCell
!---------------------------------------------------------------------------------------------
@@ -145,23 +91,10 @@
case ("kain_fritsch")
write(0,*) ' begin kain-fritsch initialization:'
-
- allowed_to_read = .false.
- p_first = state % moist_start + 1
- p_qi = state % index_qi
- p_qs = state % index_qs
-
- call kf_eta_init( &
- rthcuten = rthcuten_p , rqvcuten = rqvcuten_p , rqccuten = rqccuten_p , &
- rqrcuten = rqrcuten_p , rqicuten = rqicuten_p , rqscuten = rqscuten_p , &
- nca = nca_p , w0avg = w0avg_p , p_qi = p_qi , &
- p_qs = p_qs , svp1 = svp1 , svp2 = svp2 , &
- svp3 = svp3 , svpt0 = svpt0 , p_first_scalar = p_first , &
- restart = restart , allowed_to_read = allowed_to_read , &
- ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
- ims = ims , ime = ime , jms = jms , jme = jme , kms = kds , kme = kme , &
- its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
- )
+ do iCell = 1, mesh % nCells
+ diag_physics % nca % array(iCell) = -100.
+ enddo
+ call kf_lutab(svp1,svp2,svp3,svpt0)
write(0,*) ' end kain-kritsch initialization:'
case default
@@ -170,7 +103,6 @@
end subroutine convection_deep_init
-
!=============================================================================================
subroutine convection_deep_driver(itimestep,mesh,diag_physics,tend_physics)
!=============================================================================================
@@ -191,6 +123,7 @@
!variables specific to Kain_Fritsch parameterization:
logical:: warm_rain,adapt_step_flag
real(kind=RKIND):: curr_secs
+ real(kind=RKIND):: cudt
!=============================================================================================
write(0,*)
@@ -199,29 +132,51 @@
!initialize instantaneous precipitation, and copy convective tendencies from the dynamics to
!the physics grid:
- call convection_from_MPAS(diag_physics,tend_physics)
+ call convection_from_MPAS(dt_dyn,diag_physics,tend_physics)
-!call convection scheme:
+!... convert the convection time-step to minutes:
+ cudt = dt_cu/60.
+!... call to convection schemes:
+ dx = sqrt(maxval(mesh % areaCell % array))
+
+ do j = jts, jte
+ do i = its, ite
+ cu_act_flag(i,j) = .false.
+ enddo
+ enddo
+
convection_select: select case(conv_deep_scheme)
case ("kain_fritsch")
!initialization:
curr_secs = -1
- warm_rain = .false.
adapt_step_flag = .false.
- dx = sqrt(maxval(mesh % areaCell % array))
-
- !copy physics variables from the geodesic grid to the "wrf" grid:
- do j = jts, jtf
- do i = its, itf
- pratec_p(i,j) = 0.
- cu_act_flag(i,j) = .false.
- enddo
- enddo
-
+! write(0,*) 'max val nca=',maxval(nca_p(:,:))
+! write(0,*) 'min val nca=',minval(nca_p(:,:))
+! write(0,*)
+! write(0,*) '--- deep convection:'
+! do j = jts,jte
+! do i = its,ite
+! if(nca_p(i,j).gt.0. .and. raincv_p(i,j).gt.0.) then
+! write(0,201) j,i,cu_act_flag(i,j),nca_p(i,j),raincv_p(i,j), &
+! raincv_p(i,j)/dt_dyn,pratec_p(i,j)
+! endif
+! enddo
+! enddo
+! write(0,*) '--- shallow convection:'
+! do j = jts,jte
+! do i = its,ite
+! if(nca_p(i,j).gt.0. .and. raincv_p(i,j).eq.0.) then
+! write(0,201) j,i,cu_act_flag(i,j),nca_p(i,j),raincv_p(i,j), &
+! raincv_p(i,j)/dt_dyn,pratec_p(i,j)
+! endif
+! enddo
+! enddo
+! write(0,*)
+ write(0,*) '--- enter subroutine kf_eta_cps:'
call kf_eta_cps ( &
dt = dt_dyn , ktau = itimestep , &
dx = dx , cudt = dt_cu , &
@@ -252,6 +207,27 @@
ims = ims , ime = ime , jms = jms , jme = jme , kms = kds , kme = kme , &
its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
)
+ 201 format(i3,i6,1x,l1,5(1x,e15.8))
+ write(0,*) '--- end subroutine kf_eta_cps:'
+! write(0,*)
+! write(0,*) '--- deep convection:'
+! do j = jts,jte
+! do i = its,ite
+! if(nca_p(i,j).gt.0. .and. raincv_p(i,j).gt.0.) then
+! write(0,201) j,i,cu_act_flag(i,j),nca_p(i,j),raincv_p(i,j), &
+! raincv_p(i,j)/dt_dyn,pratec_p(i,j)
+! endif
+! enddo
+! enddo
+! write(0,*) '--- shallow convection:'
+! do j = jts,jte
+! do i = its,ite
+! if(nca_p(i,j).gt.0. .and. raincv_p(i,j).eq.0.) then
+! write(0,201) j,i,cu_act_flag(i,j),nca_p(i,j),raincv_p(i,j), &
+! raincv_p(i,j)/dt_dyn,pratec_p(i,j)
+! endif
+! enddo
+! enddo
case default
@@ -267,21 +243,22 @@
end subroutine convection_deep_driver
!=============================================================================================
- subroutine convection_from_MPAS(diag_physics,tend_physics)
+ subroutine convection_from_MPAS(dt_dyn,diag_physics,tend_physics)
!=============================================================================================
!input arguments:
type(diag_physics_type),intent(in):: diag_physics
type(tend_physics_type),intent(in):: tend_physics
+ real(kind=RKIND),intent(in):: dt_dyn
!---------------------------------------------------------------------------------------------
do j = jts,jte
do i = its,ite
-
- raincv_p(i,j) = 0.
- rainc_p(i,j) = diag_physics % rainc % array(i)
-
- do k = kts, ktf
+ cubot_p(i,j) = diag_physics % cubot % array(i)
+ cutop_p(i,j) = diag_physics % cutop % array(i)
+ raincv_p(i,j) = diag_physics % raincv % array(i)
+ pratec_p(i,j) = diag_physics % cuprec % array(i)
+ do k = kts, kte
rthcuten_p(i,k,j) = tend_physics % rthcuten % array(k,i)
rqvcuten_p(i,k,j) = tend_physics % rqvcuten % array(k,i)
rqccuten_p(i,k,j) = tend_physics % rqccuten % array(k,i)
@@ -289,7 +266,6 @@
rqicuten_p(i,k,j) = tend_physics % rqicuten % array(k,i)
rqscuten_p(i,k,j) = tend_physics % rqscuten % array(k,i)
enddo
-
enddo
enddo
@@ -299,22 +275,40 @@
do j = jts,jte
do i = its,ite
+ nca_p(i,j) = diag_physics % nca % array(i)
- nca_p(i,j) = diag_physics % nca % array(i)
- cubot_p(i,j) = diag_physics % cubot % array(i)
- cutop_p(i,j) = diag_physics % cutop % array(i)
+ !decreases the characteristic time period that convection remains active. When nca_p
+ !becomes less than the convective timestep, convective tendencies and precipitation
+ !are reset to zero (note that this is also done in subroutine kf_eta_cps).
+ if(nca_p(i,j) .gt. 0.) then
+ nca_p(i,j) = nca_p(i,j) - dt_dyn
+
+ if(nca_p(i,j) .lt. 0.5*dt_dyn) then
+ do k = kts,kte
+ rthcuten_p(i,k,j) = 0.
+ rqvcuten_p(i,k,j) = 0.
+ rqccuten_p(i,k,j) = 0.
+ rqrcuten_p(i,k,j) = 0.
+ rqicuten_p(i,k,j) = 0.
+ rqscuten_p(i,k,j) = 0.
+ enddo
+ raincv_p(i,j) = 0.
+ pratec_p(i,j) = 0.
+ cubot_p(i,j) = kte+1
+ cutop_p(i,j) = kts
+ endif
+ endif
- do k = kts, ktf
+ do k = kts, kte
w0avg_p(i,k,j) = diag_physics % w0avg % array(k,i)
enddo
-
enddo
enddo
case default
end select convection_select
-
+
end subroutine convection_from_MPAS
!=============================================================================================
@@ -328,10 +322,11 @@
do j = jts,jte
do i = its,ite
-
diag_physics % raincv % array(i) = raincv_p(i,j)
-
- do k = kts, ktf
+ diag_physics % cuprec % array(i) = pratec_p(i,j)
+ diag_physics % cubot % array(i) = cubot_p(i,j)
+ diag_physics % cutop % array(i) = cutop_p(i,j)
+ do k = kts, kte
tend_physics % rthcuten % array(k,i) = rthcuten_p(i,k,j)
tend_physics % rqvcuten % array(k,i) = rqvcuten_p(i,k,j)
tend_physics % rqccuten % array(k,i) = rqccuten_p(i,k,j)
@@ -339,30 +334,18 @@
tend_physics % rqicuten % array(k,i) = rqicuten_p(i,k,j)
tend_physics % rqscuten % array(k,i) = rqscuten_p(i,k,j)
enddo
-
enddo
enddo
- do i = its,ite
- diag_physics % rainc % array(i) = diag_physics % rainc % array(i) &
- + diag_physics % raincv % array(i)
- enddo
-
convection_select: select case(conv_deep_scheme)
case ("kain_fritsch")
-
do j = jts,jte
do i = its,ite
-
diag_physics % nca % array(i) = nca_p(i,j)
- diag_physics % cubot % array(i) = cubot_p(i,j)
- diag_physics % cutop % array(i) = cutop_p(i,j)
-
- do k = kts, ktf
+ do k = kts, kte
diag_physics % w0avg % array(k,i) = w0avg_p(i,k,j)
- enddo
-
+ enddo
enddo
enddo
@@ -370,11 +353,32 @@
end select convection_select
-!formats:
- 201 format('--- rainc:',i6,10(1x,e15.8))
-
end subroutine convection_to_MPAS
!=============================================================================================
+ subroutine update_convection_deep(dt_dyn,mesh,diag_physics)
+!=============================================================================================
+
+!input arguments:
+ type(mesh_type),intent(in):: mesh
+ real(kind=RKIND),intent(in):: dt_dyn
+
+!inout arguments:
+ type(diag_physics_type),intent(inout):: diag_physics
+
+!local variables:
+ integer:: iCell
+
+!---------------------------------------------------------------------------------------------
+
+!update the accumuluted precipitation rate at the end of each dynamic time-step:
+ do iCell = 1, mesh % nCells
+ diag_physics % rainc % array(iCell) = diag_physics % rainc % array(iCell) &
+ + diag_physics % cuprec % array(iCell) * dt_dyn
+ enddo
+
+ end subroutine update_convection_deep
+
+!=============================================================================================
end module module_driver_convection_deep
!=============================================================================================
Modified: branches/atmos_physics/src/core_physics/module_physics_constants.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_constants.F        2011-04-08 22:40:46 UTC (rev 792)
+++ branches/atmos_physics/src/core_physics/module_physics_constants.F        2011-04-08 22:42:48 UTC (rev 793)
@@ -11,35 +11,44 @@
!=============================================================================================
- real(kind=RKIND),parameter:: P0 = 100000. !reference pressure [Pa]
- real(kind=RKIND),parameter:: t00 = 273.15 !reference temperarure [K]
- real(kind=RKIND),parameter:: R_v = 461.6 !gas constant for water vapor [J/kg/K]
- real(kind=RKIND),parameter:: ep_1 = R_v/R_d-1.
- real(kind=RKIND),parameter:: ep_2 = R_d/R_v
- real(kind=RKIND),parameter:: rdg = R_d/g
- real(kind=RKIND),parameter:: rcp = R_d/cp
- real(kind=RKIND),parameter:: rcv = R_d/(cp-R_d)
+ real(kind=RKIND),parameter:: P0 = 100000. !reference pressure [Pa]
+ real(kind=RKIND),parameter:: t00 = 273.15 !reference temperarure [K]
+ real(kind=RKIND),parameter:: R_v = 461.6 !gas constant for water vapor [J/kg/K]
+ real(kind=RKIND),parameter:: ep_1 = R_v/R_d-1.
+ real(kind=RKIND),parameter:: ep_2 = R_d/R_v
+ real(kind=RKIND),parameter:: cpv = 4.*R_v
+ real(kind=RKIND),parameter:: rdg = R_d/g
+ real(kind=RKIND),parameter:: rcp = R_d/cp
+ real(kind=RKIND),parameter:: rcv = R_d/(cp-R_d)
- real(kind=RKIND),parameter:: rho_w = 1000.0
+ real(kind=RKIND),parameter:: rho_a = 1.28
+ real(kind=RKIND),parameter:: rho_r = 1000.0
+ real(kind=RKIND),parameter:: rho_s = 100.0
+ real(kind=RKIND),parameter:: rho_w = 1000.0
- real(kind=RKIND),parameter:: svp1 = 0.6112
- real(kind=RKIND),parameter:: svp2 = 17.67
- real(kind=RKIND),parameter:: svp3 = 29.65
- real(kind=RKIND),parameter:: svpt0 = 273.15
+ real(kind=RKIND),parameter:: svp1 = 0.6112
+ real(kind=RKIND),parameter:: svp2 = 17.67
+ real(kind=RKIND),parameter:: svp3 = 29.65
+ real(kind=RKIND),parameter:: svpt0 = 273.15
- real(kind=RKIND),parameter:: xlv = 2.15e6 !latent heat of vaporization [J/kg]
- real(kind=RKIND),parameter:: xlf = 3.50e5 !latent heat of fusion [J/kg]
- real(kind=RKIND),parameter:: xls = xlv + xlf !latent heat of sublimation [J/kg]
+ real(kind=RKIND),parameter:: xlv = 2.15e6 !latent heat of vaporization [J/kg]
+ real(kind=RKIND),parameter:: xlf = 3.50e5 !latent heat of fusion [J/kg]
+ real(kind=RKIND),parameter:: xls = xlv + xlf !latent heat of sublimation [J/kg]
- real(kind=RKIND),parameter:: xlv0 = 3.15e6
- real(kind=RKIND),parameter:: xlv1 = 2370.
- real(kind=RKIND),parameter:: xls0 = 2.905e6
- real(kind=RKIND),parameter:: xls1 = 259.532
+ real(kind=RKIND),parameter:: xlv0 = 3.15e6
+ real(kind=RKIND),parameter:: xlv1 = 2370.
+ real(kind=RKIND),parameter:: xls0 = 2.905e6
+ real(kind=RKIND),parameter:: xls1 = 259.532
- real(kind=RKIND),parameter:: karman = 0.4 !Von Karman constant
- real(kind=RKIND),parameter:: eomeg = 7.29210e-5
- real(kind=RKIND),parameter:: stbolt = 5.67051e-8
+ real(kind=RKIND),parameter:: karman = 0.4 !Von Karman constant
+ real(kind=RKIND),parameter:: eomeg = 7.29210e-5
+ real(kind=RKIND),parameter:: stbolt = 5.67051e-8
+ real(kind=RKIND),parameter:: cliq = 4190.
+ real(kind=RKIND),parameter:: cice = 2106.
+ real(kind=RKIND),parameter:: epsilon = 1.e-15
+ real(kind=RKIND),parameter:: psat = 610.78
+
!constants specific to long- and short-wave radiation codes:
real(kind=RKIND),parameter:: solcon_0 = 1365. !solar constant [W/m2]
real(kind=RKIND),parameter:: degrad = 3.1415926/180. !conversion from degree to radiant [-]
Modified: branches/atmos_physics/src/core_physics/module_physics_control.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_control.F        2011-04-08 22:40:46 UTC (rev 792)
+++ branches/atmos_physics/src/core_physics/module_physics_control.F        2011-04-08 22:42:48 UTC (rev 793)
@@ -51,9 +51,10 @@
write(0,*) ' config_sfclayer_scheme = ', config_sfclayer_scheme
!cloud microphysics scheme:
- if(.not. (config_microp_scheme .eq. 'off' .or. &
- config_microp_scheme .eq. 'kessler' .or. &
- config_microp_scheme .eq. 'thompson')) then
+ if(.not. (config_microp_scheme .eq. 'off' .or. &
+ config_microp_scheme .eq. 'kessler' .or. &
+ config_microp_scheme .eq. 'thompson' .or. &
+ config_microp_scheme .eq. 'wsm6' )) then
write(errmess,'(A,A10)') 'illegal value for config_microp_scheme:', &
trim(config_microp_scheme)
Modified: branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F        2011-04-08 22:40:46 UTC (rev 792)
+++ branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F        2011-04-08 22:42:48 UTC (rev 793)
@@ -292,7 +292,17 @@
write(0,*) '--- subroutine MPAS_to_phys: pres2:',j,i
do k = kts,kte+1
write(0,201) j,i,k,pres2_p(i,k,j)
- enddo
+ enddo
+! write(0,*)
+! do k = kts,kte
+! write(0,201) j,i,k,pressure_b(k,i),pressure_p(k,i),pres_p(i,k,j),zz(k,i), &
+! rho_p(i,k,j),th_p(i,k,j),t_p(i,k,j),qv_p(i,k,j)
+! enddo
+! write(0,*)
+! do k = kts,kte
+! write(0,201) j,i,k,qv_p(i,k,j),qc_p(i,k,j),qr_p(i,k,j),qi_p(i,k,j),qs_p(i,k,j), &
+! qg_p(i,k,j)
+! enddo
stop
endif
enddo
@@ -408,6 +418,20 @@
enddo
enddo
+ case ("wsm6")
+ do j = jts, jtf
+ do k = kts, ktf
+ do i = its, itf
+! qi_p(i,k,j) = max(0.,vars % scalars % array(vars%index_qi,k,i))
+! qs_p(i,k,j) = max(0.,vars % scalars % array(vars%index_qs,k,i))
+! qg_p(i,k,j) = max(0.,vars % scalars % array(vars%index_qg,k,i))
+ qi_p(i,k,j) = state % scalars % array(state%index_qi,k,i)
+ qs_p(i,k,j) = state % scalars % array(state%index_qs,k,i)
+ qg_p(i,k,j) = state % scalars % array(state%index_qg,k,i)
+ enddo
+ enddo
+ enddo
+
case default
end select microp_select_init
@@ -515,6 +539,21 @@
enddo
enddo
+ case ("wsm6")
+
+ do j = jts, jtf
+ do k = kts, ktf
+ do i = its, itf
+
+ !mass mixing ratios:
+ state % scalars % array(state%index_qi,k,i) = qi_p(i,k,j)
+ state % scalars % array(state%index_qs,k,i) = qs_p(i,k,j)
+ state % scalars % array(state%index_qg,k,i) = qg_p(i,k,j)
+
+ enddo
+ enddo
+ enddo
+
case default
end select microp_select_init
</font>
</pre>