Skip to content

Commit

Permalink
Fix bug slope value along the coastal area
Browse files Browse the repository at this point in the history
(cherry picked from commit 2d68c7c)
  • Loading branch information
yyoon4 authored and jvgeiger committed Apr 19, 2024
1 parent 29b14ec commit 0e1df14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ldt/params/topo/read_MERIT1K_slope.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
! 01 Aug 2012: KR Arsenault; Expanded for elevation tiling
! 30 May 2017: KR Arsenault; Expanded for Antarctica
! 03 Mar 2020: Yeosang Yoon; Modify codes for MERIT DEM
! 04 Apr 2024: Yeosang Yoon; Fix bug slope value along the coastal area
!
! !INTERFACE:
subroutine read_MERIT1K_slope( n, num_bins, fgrd, slopeave )
Expand Down Expand Up @@ -279,6 +280,11 @@ subroutine read_MERIT1K_slope( n, num_bins, fgrd, slopeave )
do r = 1, subpnr
do c = 1, subpnc
subset_elev(c,r) = yrev_elev(lon_line(c,r),lat_line(c,r))

! for coastal areas
if (subset_elev(c,r) .eq. LDT_rc%udef) then
subset_elev(c,r) = 0.
endif
enddo
enddo
deallocate( yrev_elev )
Expand Down

0 comments on commit 0e1df14

Please sign in to comment.