Skip to content

Commit 9cb19ef

Browse files
committed
Do not emit warning when num_vpts = levels
This commit disables a warning when the number of vertical points is equal to the number of levels when doing vertical interpolation.
1 parent 2355d11 commit 9cb19ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/netcdf_writer.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ function NetCDFWriter(
141141

142142
num_vpts = Meshes.nelements(Grids.vertical_topology(space).mesh)
143143

144-
@warn "Disabling vertical interpolation, the provided number of points is ignored (using $num_vpts)"
144+
# For any configuration, it is reasonable to assume that the last
145+
# value of `num_pts` is the number of vertical points
146+
last(num_points) != num_vpts &&
147+
@warn "Disabling vertical interpolation, the provided number of points is ignored (using $num_vpts)"
145148
num_points =
146149
Tuple([num_points[1:num_horiz_dimensions]..., num_vpts])
147150
end

0 commit comments

Comments
 (0)