Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug slope value along the coastal area #1647

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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