<p><b>laura@ucar.edu</b> 2011-05-09 11:55:22 -0600 (Mon, 09 May 2011)</p><p>latest physics updates<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_physics/Makefile
===================================================================
--- branches/atmos_physics/src/core_physics/Makefile        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/Makefile        2011-05-09 17:55:22 UTC (rev 820)
@@ -94,7 +94,6 @@
        ./physics_wrf/module_ra_rrtmg_sw.o
module_driver_sfclayer.o: \
-        module_physics_aquaplanet.o \
        module_physics_constants.o \
        module_physics_vars.o \
        ./physics_wrf/module_sf_sfclay.o
@@ -125,10 +124,6 @@
        ./physics_wrf/module_sf_noahlsm.o
module_physics_manager.o: \
-        module_driver_convection_deep.o \
-        module_driver_microphysics.o \
-        module_driver_pbl.o \
-        module_driver_sfclayer.o \
        module_physics_vars.o
module_physics_rrtmg_lwinit.o: \
Modified: branches/atmos_physics/src/core_physics/module_physics_control.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_control.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_control.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -17,7 +17,6 @@
use configure
use grid_types
- use module_physics_constants
use module_physics_utilities
implicit none
@@ -164,16 +163,12 @@
end subroutine physics_namelist_check
!=============================================================================================
- subroutine physics_registry_init(config_do_restart,mesh,state,diag,diag_physics,sfc_input)
+ subroutine physics_registry_init(config_do_restart,mesh,sfc_input)
!=============================================================================================
!input and output arguments:
-!---------------------------
-logical,intent(in):: config_do_restart
+ logical,intent(in):: config_do_restart
type(mesh_type),intent(in):: mesh
- type(state_type),intent(inout):: state
- type(diag_type),intent(inout) :: diag
- type(diag_physics_type),intent(inout) :: diag_physics
type(sfc_input_type),intent(inout):: sfc_input
!local variables:
@@ -181,26 +176,28 @@
!---------------------------------------------------------------------------------------------
- write(0,*) '--- enter physics_registry_init'
+!initialization of input variables, if needed:
-!initialization of restart variables, if needed:
if(.not. config_do_restart) then
- do iCell = 1, mesh % nCells
+ lsm_select: select case(trim(config_lsm_scheme))
- !land-surface parameterization: initialize the thickness of the soil layers for the
- !Noah scheme:
- if(sfc_input % landmask % array(iCell) == 1) then
- sfc_input % dzs % array(1,iCell) = 0.10
- sfc_input % dzs % array(2,iCell) = 0.30
- sfc_input % dzs % array(3,iCell) = 0.60
- sfc_input % dzs % array(4,iCell) = 1.00
- endif
+ case("noah")
+ !initialize the thickness of the soil layers for the Noah scheme:
+ do iCell = 1, mesh % nCells
+ if(sfc_input % landmask % array(iCell) == 1) then
+ sfc_input % dzs % array(1,iCell) = 0.10
+ sfc_input % dzs % array(2,iCell) = 0.30
+ sfc_input % dzs % array(3,iCell) = 0.60
+ sfc_input % dzs % array(4,iCell) = 1.00
+ endif
+ enddo
- enddo
+ case default
+ end select lsm_select
+
endif
- write(0,*) '--- exit physics_registry_init'
end subroutine physics_registry_init
Modified: branches/atmos_physics/src/core_physics/module_physics_driver.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_driver.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_driver.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -95,7 +95,7 @@
!call to surface-layer scheme:
if(config_sfclayer_scheme .ne. 'off') then
call allocate_sfclayer
- call sfclayer_driver(itimestep,block%mesh,block%diag_physics,block%sfc_input,&
+ call driver_sfclayer(block%mesh,block%diag_physics,block%sfc_input,&
block%sfc_physics)
call deallocate_sfclayer
endif
@@ -110,13 +110,16 @@
!call to pbl schemes:
if(config_pbl_scheme .ne. 'off' .and. config_sfclayer_scheme .ne. 'off') then
call allocate_pbl
- call pbl_driver(block%mesh,block%diag_physics,block%sfc_physics,block%tend_physics)
+ call driver_pbl(block%diag_physics,block%sfc_physics,block%tend_physics)
call deallocate_pbl
endif
!call to convection scheme:
- if(config_conv_deep_scheme .ne. 'off') &
- call convection_deep_driver(itimestep,block%mesh,block%diag_physics,block%tend_physics)
+ if(config_conv_deep_scheme .ne. 'off') then
+ call allocate_convection_deep
+ call driver_convection_deep(itimestep,block%mesh,block%diag_physics,block%tend_physics)
+ call deallocate_convection_deep
+ endif
!deallocate arrays shared by all physics parameterizations:
call deallocate_forall_physics
Modified: branches/atmos_physics/src/core_physics/module_physics_init.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_init.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_init.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -9,7 +9,7 @@
config_radt_lw_scheme, &
config_radt_sw_scheme
- use module_driver_convection_deep
+ use module_driver_convection_deep, only: init_convection_deep
use module_driver_lsm,only: init_lsm
use module_driver_microphysics
use module_driver_radiation_lw, only: init_radiation_lw
@@ -25,11 +25,13 @@
contains
!=============================================================================================
- subroutine physics_init(dminfo,mesh,state,diag_physics,sfc_physics,sfc_input)
+ subroutine physics_init(dminfo,config_do_restart,mesh,state,diag_physics,sfc_physics, &
+ sfc_input)
!=============================================================================================
!input and output arguments:
!---------------------------
+ logical,intent(in):: config_do_restart
type (dm_info), intent(in):: dminfo
type(mesh_type),intent(in):: mesh
type(state_type),intent(inout):: state
@@ -46,20 +48,23 @@
!initialization of global surface properties. set here for now, but may be moved when time
!manager is implemented:
- call landuse_init_forMPAS(dminfo,mesh,diag_physics,sfc_physics,sfc_input)
+ if(.not. config_do_restart) &
+ call landuse_init_forMPAS(dminfo,mesh,diag_physics,sfc_physics,sfc_input)
!initialization of parameterized deep convective processes:
- if(config_conv_deep_scheme .ne. 'off') then
- call convection_deep_init(mesh,diag_physics)
- endif
+ if(config_conv_deep_scheme .ne. 'off') &
+ call init_convection_deep(config_do_restart,mesh,diag_physics)
!initialization of cloud microphysics processes:
if(config_microp_scheme .ne. 'off') call microphysics_init
!initialization of surface layer processes:
- if(config_sfclayer_scheme .ne. 'off') call init_sfclayer(mesh,diag_physics,sfc_physics)
+ if(config_sfclayer_scheme .ne. 'off') call init_sfclayer
!initialization of land-surface model:
+!if(.not. config_do_restart) then
+! if(config_lsm_scheme .ne. 'off') call init_lsm(dminfo,mesh,diag_physics,sfc_input)
+!endif
if(config_lsm_scheme .ne. 'off') call init_lsm(dminfo,mesh,diag_physics,sfc_input)
!initialization of shortwave radiation processes:
Modified: branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_interface_nhyd.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -369,9 +369,9 @@
qv => state % scalars % array(state%index_qv,:,:)
!copy sounding variables from the geodesic grid to the wrf-physics grid:
- do j = jts, jtf
- do k = kts, ktf
- do i = its, itf
+ do j = jts, jte
+ do k = kts, kte
+ do i = its, ite
rho_p(i,k,j) = zz(k,i) * rho(k,i)
th_p(i,k,j) = theta(k,i) / (1. + R_v/R_d * max(0.,qv(k,i)))
@@ -396,9 +396,9 @@
case ("thompson")
- do j = jts, jtf
- do k = kts, ktf
- do i = its, itf
+ do j = jts, jte
+ do k = kts, kte
+ do i = its, ite
!mass mixing ratios:
! qi_p(i,k,j) = max(0.,vars % scalars % array(vars%index_qi,k,i))
@@ -419,9 +419,9 @@
enddo
case ("wsm6")
- do j = jts, jtf
- do k = kts, ktf
- do i = its, itf
+ do j = jts, jte
+ do k = kts, kte
+ do i = its, ite
! 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))
@@ -487,9 +487,9 @@
!variables common to all cloud microphysics schemes:
- do j = jts, jtf
- do k = kts, ktf
- do i = its, itf
+ do j = jts, jte
+ do k = kts, kte
+ do i = its, ite
!potential temperature and diabatic forcing:
rt_diabatic_tend(k,i) = theta(k,i)
@@ -522,9 +522,9 @@
case ("thompson")
- do j = jts, jtf
- do k = kts, ktf
- do i = its, itf
+ do j = jts, jte
+ do k = kts, kte
+ do i = its, ite
!mass mixing ratios:
state % scalars % array(state%index_qi,k,i) = qi_p(i,k,j)
@@ -541,9 +541,9 @@
case ("wsm6")
- do j = jts, jtf
- do k = kts, ktf
- do i = its, itf
+ do j = jts, jte
+ do k = kts, kte
+ do i = its, ite
!mass mixing ratios:
state % scalars % array(state%index_qi,k,i) = qi_p(i,k,j)
Modified: branches/atmos_physics/src/core_physics/module_physics_landuse.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_landuse.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_landuse.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -10,6 +10,7 @@
use module_physics_aquaplanet !for now,we set the julian day to March 21.
use module_physics_utilities
+ use module_physics_vars
implicit none
private
@@ -36,10 +37,8 @@
!.. thermal inertia (thc).
!.. surface moisture availability (mavail).
- integer,parameter:: frac_seaice = 0. ! = 1: treats seaice as fractional field.
+ integer,parameter:: frac_seaice = 0 ! = 1: treats seaice as fractional field.
! = 0: ice/no-ice flag.
- real(kind=RKIND),public:: xice_threshold
-
contains
!=============================================================================================
@@ -101,7 +100,7 @@
thc => diag_physics % thc % array
z0 => diag_physics % z0 % array
znt => diag_physics % znt % array
-
+
!reads in the landuse properties from landuse.tbl:
if(dminfo % my_proc_id == IO_NODE) then
open(land_unit,file='LANDUSE.TBL',action='READ',status='OLD',iostat=istat)
@@ -133,10 +132,15 @@
do is = 1, luseas
read(unit=land_unit,fmt=*,iostat=ierr)
- do ic = 1, lucats
- read(unit=land_unit,fmt=*) li,albd(ic,is),slmo(ic,is),sfem(ic,is),sfz0(ic,is), &
- therin(ic,is),scfx(ic,is),sfhc(ic,is)
- enddo
+ do ic = 1, lucats
+ read(unit=land_unit,fmt=*) li,albd(ic,is),slmo(ic,is),sfem(ic,is),sfz0(ic,is), &
+ therin(ic,is),scfx(ic,is),sfhc(ic,is)
+ enddo
+ do ic = 1, lucats
+ write(0,101) ic,albd(ic,is),slmo(ic,is),sfem(ic,is),sfz0(ic,is), &
+ therin(ic,is),scfx(ic,is),sfhc(ic,is)
+ enddo
+ if(is .lt. luseas) write(0,*)
enddo
!defines the index iswater and isice as a function of sfc_input_data:
@@ -173,16 +177,6 @@
DM_BCAST_MACRO(sfhc)
DM_BCAST_MACRO(scfx)
- write(mess,*) trim(lutype)
- call physics_message(mess)
- do is = 1, luseas
- do ic = 1, lucats
- write(0,101) ic,albd(ic,is),slmo(ic,is),sfem(ic,is),sfz0(ic,is), &
- therin(ic,is),scfx(ic,is),sfhc(ic,is)
- enddo
- if(is .lt. luseas) write(0,*)
- enddo
-
!defines sea-ice threshold:
if(frac_seaice == 0) then
xice_threshold = 0.5
@@ -226,7 +220,7 @@
! else
! xland(iCell) = 2.0
! endif
- if(landmask(icell) == 1) then
+ if(landmask(iCell) == 1) then
xland(iCell) = 1.0
else
xland(iCell) = 2.0
@@ -258,7 +252,8 @@
write(0,*) '--- end subroutine landuse_init_forMPAS'
!formats:
- 101 format(i4,8e15.8)
+ 101 format(i6,8e15.8)
+ 102 format(i6,1x,8e15.8)
end subroutine landuse_init_forMPAS
Modified: branches/atmos_physics/src/core_physics/module_physics_manager.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_manager.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_manager.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -3,15 +3,11 @@
use configure
use grid_types
- use module_driver_convection_deep
- use module_driver_microphysics
- use module_driver_pbl
- use module_driver_sfclayer
use module_physics_vars
implicit none
private
- public:: physics_timetracker,physics_wrf_interface,physics_wrf_deallocate
+ public:: physics_timetracker,physics_run_init
logical, public:: l_physics
integer, private:: i,k,j,n
@@ -53,7 +49,7 @@
end subroutine physics_timetracker
!=============================================================================================
- subroutine physics_wrf_interface(mesh)
+ subroutine physics_run_init(mesh)
!=============================================================================================
!input arguments:
@@ -65,15 +61,6 @@
!initialization of wrf dimensions:
-!ldf (09-23-2010) :changed initialization.
-!ims=1 ; ime = mesh % ncellssolve
-!jms=1 ; jme=1
-!kms=1 ; kme = mesh % nvertlevels+1
-
-!ids=ims ; jds=jms ; kds=kms ; its=ims ; jts=jms ; kts=kms
-!ide=ime ; jde=jme ; kde=kme ; ite=ime ; jte=jme ; kte=kme
-!itf=ite ; jtf=jte ; ktf=kte-1
-
!ldf (10-10-201): changed initialization
ims=1 ; ime = mesh % nCellsSolve
jms=1 ; jme=1
@@ -87,8 +74,6 @@
jts=jms ; jte = jme
kts=kms ; kte = kme-1
- itf=ite ; jtf=jte ; ktf=kte
-
write(0,*) ' ims= ',ims,' ime=',ime
write(0,*) ' jms= ',jms,' jme=',jme
write(0,*) ' kms= ',kms,' kme=',kme
@@ -124,6 +109,12 @@
lsm_scheme = trim(config_lsm_scheme)
num_soils = mesh% nSoilLevels
+ if(config_frac_seaice == 0) then
+ xice_threshold = 0.5
+ else
+ xice_threshold = 0.02
+ endif
+
!allocation of all physics arrays:
!call physics_allocate_all
@@ -137,10 +128,8 @@
!initialization of variables and allocation of arrays related to deep convection:
- if(config_conv_deep_scheme .ne. 'off') then
+ if(config_conv_deep_scheme .ne. 'off') &
conv_deep_scheme = trim(config_conv_deep_scheme)
- call convection_deep_allocate
- endif
!initialization of variables and allocation of arrays related to shallow convection:
@@ -155,116 +144,9 @@
if(config_pbl_scheme .ne. 'off' .and. config_sfclayer_scheme .ne. 'off') &
pbl_scheme = trim(config_pbl_scheme)
- end subroutine physics_wrf_interface
+ end subroutine physics_run_init
!=============================================================================================
- subroutine physics_allocate_all
-!=============================================================================================
-
- if(.not.allocated(psfc_p) ) allocate(psfc_p(ims:ime,jms:jme) )
- if(.not.allocated(ptop_p) ) allocate(ptop_p(ims:ime,jms:jme) )
-
- if(.not.allocated(u_p) ) allocate(u_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(v_p) ) allocate(v_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(zz_p) ) allocate(zz_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(pres_p) ) allocate(pres_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(pi_p) ) allocate(pi_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(z_p) ) allocate(z_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(dz_p) ) allocate(dz_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(t_p) ) allocate(t_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(th_p) ) allocate(th_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(al_p) ) allocate(al_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rho_p) ) allocate(rho_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(rh_p) ) allocate(rh_p(ims:ime,kms:kme,jms:jme) )
-
- if(.not.allocated(w_p) ) allocate(w_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(pres2_p) ) allocate(pres2_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(t2_p) ) allocate(t2_p(ims:ime,kms:kme,jms:jme) )
-
- if(.not.allocated(pres_hyd_p) ) allocate(pres_hyd_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(pres2_hyd_p)) allocate(pres2_hyd_p(ims:ime,kms:kme,jms:jme) )
-
- do j = jms,jme
- do i = ims,ime
- psfc_p(i,j) = 0.
- ptop_p(i,j) = 0.
- enddo
- enddo
-
- do j = jms,jme
- do k = kms,kme
- do i = ims,ime
- u_p(i,k,j) = 0.
- v_p(i,k,j) = 0.
- w_p(i,k,j) = 0.
- pres_p(i,k,j) = 0.
- pi_p(i,k,j) = 0.
- z_p(i,k,j) = 0.
- dz_p(i,k,j) = 0.
- t_p(i,k,j) = 0.
- th_p(i,k,j) = 0.
- al_p(i,k,j) = 0.
- rho_p(i,k,j) = 0.
- rh_p(i,k,j) = 0.
-
- w_p(i,k,j) = 0.
- pres2_p(i,k,j) = 0.
- t2_p(i,k,j) = 0.
-
- pres_hyd_p(i,k,j) = 0.
- pres2_hyd_p(i,k,j) = 0.
- enddo
- enddo
- enddo
-
-!allocate moist species (to be revisited!):
- if(.not.allocated(qv_p) ) allocate(qv_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(qc_p) ) allocate(qc_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(qr_p) ) allocate(qr_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(qi_p) ) allocate(qi_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(qs_p) ) allocate(qs_p(ims:ime,kms:kme,jms:jme) )
- if(.not.allocated(qg_p) ) allocate(qg_p(ims:ime,kms:kme,jms:jme) )
-
- end subroutine physics_allocate_all
-
-!=============================================================================================
- subroutine physics_wrf_deallocate
-!=============================================================================================
-
-!de-allocation of all physics arrays:
- if(allocated(psfc_p) ) deallocate(psfc_p )
- if(allocated(ptop_p) ) deallocate(ptop_p )
-
- if(allocated(u_p) ) deallocate(u_p )
- if(allocated(v_p) ) deallocate(v_p )
- if(allocated(zz_p) ) deallocate(zz_p )
- if(allocated(pres_p) ) deallocate(pres_p )
- if(allocated(pi_p) ) deallocate(pi_p )
- if(allocated(z_p) ) deallocate(z_p )
- if(allocated(dz_p) ) deallocate(dz_p )
- if(allocated(t_p) ) deallocate(t_p )
- if(allocated(th_p) ) deallocate(th_p )
- if(allocated(al_p) ) deallocate(al_p )
- if(allocated(rho_p) ) deallocate(rho_p )
- if(allocated(rh_p) ) deallocate(rh_p )
-
- if(allocated(w_p) ) deallocate(w_p )
- if(allocated(pres2_p) ) deallocate(pres2_p )
- if(allocated(t2_p) ) deallocate(t2_p )
-
- if(allocated(pres_hyd_p) ) deallocate(pres_hyd_p )
- if(allocated(pres2_hyd_p)) deallocate(pres2_hyd_p )
-
- if(allocated(qv_p) ) deallocate(qv_p )
- if(allocated(qc_p) ) deallocate(qc_p )
- if(allocated(qr_p) ) deallocate(qr_p )
- if(allocated(qi_p) ) deallocate(qi_p )
- if(allocated(qs_p) ) deallocate(qs_p )
- if(allocated(qg_p) ) deallocate(qg_p )
-
- end subroutine physics_wrf_deallocate
-
-!=============================================================================================
end module module_physics_manager
!=============================================================================================
Modified: branches/atmos_physics/src/core_physics/module_physics_utilities.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_utilities.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_utilities.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -17,10 +17,11 @@
!---------------------------------------------------------------------------------------------
-#ifdef _MPI
- write(0,*) trim(str)
-#endif
- print*,trim(str)
+!#ifdef _MPI
+! write(0,*) trim(str)
+!#endif
+!print*,trim(str)
+write(0,*) trim(str)
end subroutine physics_message
Modified: branches/atmos_physics/src/core_physics/module_physics_vars.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_vars.F        2011-05-09 17:50:41 UTC (rev 819)
+++ branches/atmos_physics/src/core_physics/module_physics_vars.F        2011-05-09 17:55:22 UTC (rev 820)
@@ -30,7 +30,6 @@
integer,public:: ids,ide,jds,jde,kds,kde
integer,public:: ims,ime,jms,jme,kms,kme
integer,public:: its,ite,jts,jte,kts,kte
- integer,public:: itf,jtf,ktf
integer,public:: n_physics,n_microp
real(kind=RKIND),public:: dt_dyn !time-step for dynamics
@@ -39,6 +38,8 @@
real(kind=RKIND),public:: dt_radtlw !time-step for longwave radiation parameterization [mns]
real(kind=RKIND),public:: dt_radtsw !time-step for shortwave radiation parameterization [mns]
+ real(kind=RKIND),public:: xice_threshold
+
!... arrays related to surface:
real(kind=RKIND),dimension(:,:),allocatable:: &
psfc_p, &!surface pressure [Pa]
</font>
</pre>