From 2d68c7c6f930a613dc875e97a1c37e578dff5138 Mon Sep 17 00:00:00 2001 From: Yeosang Yoon Date: Fri, 5 Apr 2024 10:07:58 -0400 Subject: [PATCH] Fix bug slope value along the coastal area --- ldt/params/topo/read_MERIT1K_slope.F90 | 6 ++++++ 1 file changed, 6 insertions(+) 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 )