Skip to content

Commit

Permalink
stop if invalid grid_type in topography_number_seas
Browse files Browse the repository at this point in the history
  • Loading branch information
aekiss committed Nov 3, 2024
1 parent 29cb4f5 commit 6c49dd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/topography.f90
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ subroutine topography_number_seas(this, sea_number, number_of_seas, silent)
mask=[choke_west, choke_east, choke_south, choke_north]))
case ('C')
new_sea = min(sea(i, j), sea(im, j), sea(ip, j), sea(i, jm), sea(i, jp))
case default
write(error_unit, '(a)') "topogtools: grid_type must be B or C"
error stop
end select
if (sea(i, j) /= new_sea) then
sea(i, j) = new_sea
Expand Down Expand Up @@ -397,6 +400,9 @@ subroutine topography_number_seas(this, sea_number, number_of_seas, silent)
mask=[choke_west, choke_east, choke_south, choke_north]))
case ('C')
new_sea = min(sea(i, j), sea(im, j), sea(ip, j), sea(i, jm), sea(i, jp))
case default
write(error_unit, '(a)') "topogtools: grid_type must be B or C"
error stop
end select
if (sea(i, j) /= new_sea) then
sea(i, j) = new_sea
Expand Down

0 comments on commit 6c49dd9

Please sign in to comment.