diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 45c501db2..4343d5dff 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -4,7 +4,9 @@ !> This module contains the CCPP-compliant Noah land surface scheme driver. module lsm_noah + use machine, only: kind_phys use set_soilveg_mod, only: set_soilveg + use namelist_soilveg implicit none @@ -20,11 +22,14 @@ module lsm_noah !! \htmlinclude lsm_noah_init.html !! subroutine lsm_noah_init(me, isot, ivegsrc, nlunit, - & errmsg, errflg) + & pores, resid, errmsg, errflg) implicit none integer, intent(in) :: me, isot, ivegsrc, nlunit + + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -48,6 +53,9 @@ subroutine lsm_noah_init(me, isot, ivegsrc, nlunit, !--- initialize soil vegetation call set_soilveg(me, isot, ivegsrc, nlunit) + pores (:) = maxsmc (:) + resid (:) = drysmc (:) + end subroutine lsm_noah_init @@ -199,7 +207,7 @@ subroutine lsm_noah_run & & smcwlt2, smcref2, wet1, errmsg, errflg & & ) ! - use machine , only : kind_phys + !use machine , only : kind_phys use funcphys, only : fpvs use surface_perturbation, only : ppfbet diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index eb3f77a98..ff1766774 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -39,6 +39,22 @@ type = integer intent = in optional = F +[pores] + standard_name = maximum_soil_moisture_content_for_land_surface_model + long_name = maximum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys +[resid] + standard_name = minimum_soil_moisture_content_for_land_surface_model + long_name = minimum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index c3ad85a9e..23d99d6ef 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -32,7 +32,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & tsfc_lnd, tsfc_wat, & ! in tg3, smc, slc, stc, & ! in zs, sh2o, smfrkeep, tslb, smois, wetness, & ! out - tsice, errmsg, errflg) + tsice, pores, resid, errmsg, errflg) implicit none ! --- in @@ -65,6 +65,8 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb, smois real (kind=kind_phys), dimension(im,kice), intent(out) :: tsice + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -113,6 +115,9 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & !--- initialize soil vegetation call set_soilveg_ruc(me, isot, ivegsrc, nlunit) + pores (:) = maxsmc (:) + resid (:) = drysmc (:) + soiltyp(:) = 0 vegtype(:) = 0 @@ -138,7 +143,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & endif enddo - call init_soil_depth_3 ( zs , dzs , lsoil_ruc ) + call init_soil_depth_3 ( zs , dzs , lsoil_ruc ) call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in me, master, lsm_ruc, lsm, slmsk, & ! in diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 0aad3157d..229bce1fc 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -263,6 +263,22 @@ kind = kind_phys intent = out optional = F +[pores] + standard_name = maximum_soil_moisture_content_for_land_surface_model + long_name = maximum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys +[resid] + standard_name = minimum_soil_moisture_content_for_land_surface_model + long_name = minimum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfc_noahmp_drv.f b/physics/sfc_noahmp_drv.f index 963810734..ac6eff462 100644 --- a/physics/sfc_noahmp_drv.f +++ b/physics/sfc_noahmp_drv.f @@ -24,14 +24,19 @@ module noahmpdrv !! \section arg_table_noahmpdrv_init Argument Table !! \htmlinclude noahmpdrv_init.html !! - subroutine noahmpdrv_init(me, isot, ivegsrc, nlunit, errmsg, & - & errflg) + subroutine noahmpdrv_init(me, isot, ivegsrc, nlunit, pores, resid, + & errmsg, errflg) + use machine, only: kind_phys use set_soilveg_mod, only: set_soilveg + use namelist_soilveg implicit none integer, intent(in) :: me, isot, ivegsrc, nlunit + + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -54,6 +59,9 @@ subroutine noahmpdrv_init(me, isot, ivegsrc, nlunit, errmsg, & !--- initialize soil vegetation call set_soilveg(me, isot, ivegsrc, nlunit) + + pores (:) = maxsmc (:) + resid (:) = drysmc (:) end subroutine noahmpdrv_init diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index ecfd3e09f..32fc2f15a 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -39,6 +39,22 @@ type = integer intent = in optional = F +[pores] + standard_name = maximum_soil_moisture_content_for_land_surface_model + long_name = maximum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys +[resid] + standard_name = minimum_soil_moisture_content_for_land_surface_model + long_name = minimum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/tracer_sanitizer.F90 b/physics/tracer_sanitizer.F90 deleted file mode 100644 index 668cf6edd..000000000 --- a/physics/tracer_sanitizer.F90 +++ /dev/null @@ -1,113 +0,0 @@ -module tracer_sanitizer - - use machine, only : kind_phys - - implicit none - - private - - public :: tracer_sanitizer_init, tracer_sanitizer_run, tracer_sanitizer_finalize - - real(kind=kind_phys), parameter :: zero = 0.0_kind_phys - real(kind=kind_phys), parameter :: qvmin = 1.0E-6_kind_phys - -contains - - subroutine tracer_sanitizer_init() - end subroutine tracer_sanitizer_init - -!> \section arg_table_tracer_sanitizer_run Argument Table -!! \htmlinclude tracer_sanitizer_run.html -!! - subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & - ntlnc, ntinc, ntrnc, ntsnc, ntgnc, errmsg, errflg) - - ! Interface variables - integer, intent(in ) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & - ntlnc, ntinc, ntrnc, ntsnc, ntgnc - real(kind=kind_phys), intent(inout) :: tracers(:,:,:) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - ! Water vapor specific humidity - if (ntqv>0) then - where (tracers(:,:,ntqv)0) then - where (tracers(:,:,ntcw)0) then - where (tracers(:,:,ntlnc)==zero) - tracers(:,:,ntlnc)=zero - end where - end if - end if - - ! Ice water - if (ntiw>0) then - where (tracers(:,:,ntiw)0) then - where (tracers(:,:,ntinc)==zero) - tracers(:,:,ntinc)=zero - end where - end if - end if - - ! Rain water - if (ntrw>0) then - where (tracers(:,:,ntrw)0) then - where (tracers(:,:,ntrnc)==zero) - tracers(:,:,ntrnc)=zero - end where - end if - end if - - ! Snow - if (ntsw>0) then - where (tracers(:,:,ntsw)0) then - where (tracers(:,:,ntsnc)==zero) - tracers(:,:,ntsnc)=zero - end where - end if - end if - - ! Graupel - if (ntgl>0) then - where (tracers(:,:,ntgl)0) then - where (tracers(:,:,ntgnc)==zero) - tracers(:,:,ntgnc)=zero - end where - end if - end if - - end subroutine tracer_sanitizer_run - - subroutine tracer_sanitizer_finalize() - end subroutine tracer_sanitizer_finalize - -end module tracer_sanitizer \ No newline at end of file diff --git a/physics/tracer_sanitizer.meta b/physics/tracer_sanitizer.meta deleted file mode 100644 index e41d5d03d..000000000 --- a/physics/tracer_sanitizer.meta +++ /dev/null @@ -1,124 +0,0 @@ -[ccpp-table-properties] - name = tracer_sanitizer - type = scheme - dependencies = machine.F - -######################################################################## - -[ccpp-arg-table] - name = tracer_sanitizer_run - type = scheme -[tracers] - standard_name = tracer_concentration_updated_by_physics - long_name = tracer concentration updated by physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = inout - optional = F -[ntqv] - standard_name = index_for_water_vapor - long_name = tracer index for water vapor (specific humidity) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntcw] - standard_name = index_for_liquid_cloud_condensate - long_name = tracer index for cloud condensate (or liquid water) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntiw] - standard_name = index_for_ice_cloud_condensate - long_name = tracer index for ice water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntrw] - standard_name = index_for_rain_water - long_name = tracer index for rain water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntsw] - standard_name = index_for_snow_water - long_name = tracer index for snow water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntgl] - standard_name = index_for_graupel - long_name = tracer index for graupel - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntlnc] - standard_name = index_for_liquid_cloud_number_concentration - long_name = tracer index for liquid number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntinc] - standard_name = index_for_ice_cloud_number_concentration - long_name = tracer index for ice number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntrnc] - standard_name = index_for_rain_number_concentration - long_name = tracer index for rain number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntsnc] - standard_name = index_for_snow_number_concentration - long_name = tracer index for snow number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntgnc] - standard_name = index_for_graupel_number_concentration - long_name = tracer index for graupel number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F