Skip to content

Commit 0e1df14

Browse files
yyoon4jvgeiger
authored andcommitted
Fix bug slope value along the coastal area
(cherry picked from commit 2d68c7c)
1 parent 29b14ec commit 0e1df14

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ldt/params/topo/read_MERIT1K_slope.F90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
! 01 Aug 2012: KR Arsenault; Expanded for elevation tiling
1919
! 30 May 2017: KR Arsenault; Expanded for Antarctica
2020
! 03 Mar 2020: Yeosang Yoon; Modify codes for MERIT DEM
21+
! 04 Apr 2024: Yeosang Yoon; Fix bug slope value along the coastal area
2122
!
2223
! !INTERFACE:
2324
subroutine read_MERIT1K_slope( n, num_bins, fgrd, slopeave )
@@ -279,6 +280,11 @@ subroutine read_MERIT1K_slope( n, num_bins, fgrd, slopeave )
279280
do r = 1, subpnr
280281
do c = 1, subpnc
281282
subset_elev(c,r) = yrev_elev(lon_line(c,r),lat_line(c,r))
283+
284+
! for coastal areas
285+
if (subset_elev(c,r) .eq. LDT_rc%udef) then
286+
subset_elev(c,r) = 0.
287+
endif
282288
enddo
283289
enddo
284290
deallocate( yrev_elev )

0 commit comments

Comments
 (0)