Skip to content

Commit

Permalink
add stc to the module_soil_init
Browse files Browse the repository at this point in the history
  • Loading branch information
HelinWei-NOAA committed Nov 20, 2023
1 parent 4d3e75c commit cf2be29
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 17 additions & 1 deletion physics/module_soil_init.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ subroutine noahmp_soil_init(im , & ! in
soil_depth_input , & ! in
soil_depth_output , & ! in
soil_moisture_input , & ! in
soil_liquid_input , & ! in
soil_temperature_input , & ! in
soil_type , & ! in
soil_moisture_output , & ! out
Expand All @@ -29,6 +30,7 @@ subroutine noahmp_soil_init(im , & ! in
real (kind=kind_phys), dimension(lsoil_input), intent(in ) :: soil_depth_input
real (kind=kind_phys), dimension(lsoil_lsm), intent(in ) :: soil_depth_output
real (kind=kind_phys), dimension(im,lsoil_input), intent(in ) :: soil_moisture_input
real (kind=kind_phys), dimension(im,lsoil_input), intent(in ) :: soil_liquid_input
real (kind=kind_phys), dimension(im,lsoil_input), intent(in ) :: soil_temperature_input

integer, dimension(im), intent(in ) :: soil_type
Expand Down Expand Up @@ -66,6 +68,7 @@ subroutine noahmp_soil_init(im , & ! in
errmsg = ''
errflg = 0

if(lsoil_lsm > lsoil_input)then
! interp_levels includes the top(0m) and bottom of the input soil column

level_bottom_input(1) = 2.0 * soil_depth_input(1)
Expand Down Expand Up @@ -193,7 +196,20 @@ subroutine noahmp_soil_init(im , & ! in
end if
end do
end do


else
! no need to do any interpolation if lsoil_input=lsoil_lsm

do iloc = 1 , im
do ilev = 1 , lsoil_lsm
soil_moisture_output(iloc,ilev) = soil_moisture_input(iloc,ilev)
soil_liquid_output(iloc,ilev) = soil_liquid_input(iloc,ilev)
soil_temperature_output(iloc,ilev)= soil_temperature_input(iloc,ilev)
enddo
enddo

endif

end subroutine noahmp_soil_init

end module module_soil_init
1 change: 1 addition & 0 deletions physics/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ subroutine noahmpdrv_init(im,lsm, lsm_noahmp, me, isot, ivegsrc, &
zsin , & ! in
zsout , & ! in
smc , & ! in
slc , & ! in
stc , & ! in
soiltyp , & ! in
smois , & ! out
Expand Down

0 comments on commit cf2be29

Please sign in to comment.