Skip to content

Commit

Permalink
remove restart flag from noahmpdrv_init
Browse files Browse the repository at this point in the history
  • Loading branch information
HelinWei-NOAA committed Jan 10, 2024
1 parent cf2be29 commit de58149
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
23 changes: 14 additions & 9 deletions physics/module_soil_init.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ subroutine noahmp_soil_init(im , & ! in
real (kind=kind_phys), dimension( lsoil_lsm) :: level_wilting_point
real (kind=kind_phys), dimension( lsoil_lsm) :: level_water

integer :: iloc, ilev, lhave, lwant
integer :: iloc, ilev, lhave, lwant,styp
real (kind=kind_phys) :: porosity, bexp, psisat, soil_matric_potential
real (kind=kind_phys) :: supercool_water, field_capacity, wilting_point

Expand Down Expand Up @@ -95,6 +95,7 @@ subroutine noahmp_soil_init(im , & ! in
( soil_temperature_interp(iloc,lsoil_input-1) - soil_temperature_interp(iloc,lsoil_input) ) / &
( interp_levels(lsoil_input-1) - interp_levels(lsoil_input) )


soil_moisture_interp(iloc,0) = soil_moisture_interp(iloc,1) + &
( interp_levels(0) - interp_levels(1) ) * &
( soil_moisture_interp(iloc,1) - soil_moisture_interp(iloc,2) ) / &
Expand All @@ -114,7 +115,7 @@ subroutine noahmp_soil_init(im , & ! in
soil_temperature_output(iloc,lwant) = soil_temperature_interp(iloc,lsoil_input+1)
soil_moisture_output (iloc,lwant) = soil_moisture_interp(iloc,lsoil_input+1)
end do
exit level_want1
! exit level_want1
end if

level_have1 : do lhave = 0 , lsoil_input
Expand All @@ -135,6 +136,7 @@ subroutine noahmp_soil_init(im , & ! in
end do level_have1
end do level_want1


! Some arbitrary limits to temperature

where(soil_temperature_output < 200.0) soil_temperature_output = 200.0
Expand All @@ -148,10 +150,11 @@ subroutine noahmp_soil_init(im , & ! in
end do

do iloc = 1 , im

wilting_point = smcwlt_table(soil_type(iloc))
field_capacity = smcref_table(soil_type(iloc))
porosity = smcmax_table(soil_type(iloc))
styp = soil_type(iloc)
if(styp .le. 0) styp = 16
wilting_point = smcwlt_table(styp)
field_capacity = smcref_table(styp)
porosity = smcmax_table(styp)
level_wilting_point = level_thickness_output * wilting_point ! meters of water
level_field_capacity = level_thickness_output * field_capacity
level_porosity = level_thickness_output * porosity
Expand Down Expand Up @@ -182,9 +185,11 @@ subroutine noahmp_soil_init(im , & ! in
! Initialize liquid soil moisture from total soil moisture and soil temperature using Niu and Yang (2006)

do iloc = 1 , im
porosity = smcmax_table(soil_type(iloc))
bexp = bexp_table(soil_type(iloc))
psisat = psisat_table(soil_type(iloc))
styp = soil_type(iloc)
if(styp .le. 0) styp = 16
porosity = smcmax_table(styp)
bexp = bexp_table(styp)
psisat = psisat_table(styp)
do ilev = 1 , lsoil_lsm
if(soil_temperature_output(iloc,ilev) >= temperature_freezing) then
soil_liquid_output(iloc,ilev) = soil_moisture_output(iloc,ilev)
Expand Down
10 changes: 1 addition & 9 deletions physics/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module noahmpdrv
!!
subroutine noahmpdrv_init(im,lsm, lsm_noahmp, me, isot, ivegsrc, &
nlunit, pores, resid, &
lsm_cold_start,lsoil,zsi,lsoil_lsm, &
lsoil,zsi,lsoil_lsm, &
zs,soiltyp,vegtype, &
tskin,tg3, &
smc,slc,stc, &
Expand All @@ -53,7 +53,6 @@ subroutine noahmpdrv_init(im,lsm, lsm_noahmp, me, isot, ivegsrc, &

real (kind=kind_phys), dimension(:), intent(out) :: pores, resid

logical, intent(in) :: lsm_cold_start
integer, intent(in) :: lsoil, lsoil_lsm
real (kind=kind_phys), dimension(:), intent(in) :: zsi,zs

Expand Down Expand Up @@ -165,13 +164,6 @@ subroutine noahmpdrv_init(im,lsm, lsm_noahmp, me, isot, ivegsrc, &

! -- call to init n-layer Noah MP soil layers from coldstart

! if ( lsoil /= lsoil_lsm) then

! call noahmpsoilinit (lsm_cold_start, im, lsoil_lsm,lsoil,&
! zsin,zsout,dzsout,tskin,tg3,smc,slc,stc, &
! sh2o,tslb,smois,soiltyp,vegtype, &
! errmsg, errflg)
! endif
if ( lsoil /= lsoil_lsm) then
call noahmp_soil_init ( im , & ! in
lsoil_lsm , & ! in
Expand Down

0 comments on commit de58149

Please sign in to comment.