Skip to content

Commit

Permalink
Check if number of points in MOM5 vertical grid is odd, stop otherwise.
Browse files Browse the repository at this point in the history
  • Loading branch information
micaeljtoliveira committed Sep 18, 2024
1 parent 8c7fd1d commit e1374f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vgrid.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ type(vgrid_t) function vgrid_constructor(filename, type) result(vgrid)
! Handle the different types of grids
select case (type)
case ("mom5")
if (mod(zeta_len, 2) == 0) then
write(error_unit,'(a)') "ERROR: MOM5 vertical grid has an even number of points, which should never happen."
error stop
end if
vgrid%nlevels = zeta_len/2
allocate(vgrid%zeta_super(zeta_len))
allocate(vgrid%zeta(0:vgrid%nlevels))
Expand Down

0 comments on commit e1374f5

Please sign in to comment.