diff --git a/ldt/params/topo/read_MERIT1K_slope.F90 b/ldt/params/topo/read_MERIT1K_slope.F90 index f3afcb554..8aae117c0 100755 --- a/ldt/params/topo/read_MERIT1K_slope.F90 +++ b/ldt/params/topo/read_MERIT1K_slope.F90 @@ -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 ) @@ -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 )