Skip to content

Commit

Permalink
Merge pull request #71 from tanyasmirnova/gsl_landstoch_withruc
Browse files Browse the repository at this point in the history
Added initialization of pores and resid
  • Loading branch information
DomHeinzeller authored Jan 9, 2021
2 parents 0ac8068 + 0bc4b34 commit acf281a
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 243 deletions.
12 changes: 10 additions & 2 deletions physics/sfc_drv.f
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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


Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions physics/sfc_drv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions physics/sfc_drv_ruc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions physics/sfc_drv_ruc.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions physics/sfc_noahmp_drv.f
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
16 changes: 16 additions & 0 deletions physics/sfc_noahmp_drv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
113 changes: 0 additions & 113 deletions physics/tracer_sanitizer.F90

This file was deleted.

Loading

0 comments on commit acf281a

Please sign in to comment.