@@ -151,7 +151,6 @@ function regrid_bathymetry(target_grid;
151151 Nyn = length (φ_data)
152152 Nzn = 1
153153
154-
155154 native_grid = LatitudeLongitudeGrid (arch, Float32;
156155 size = (Nxn, Nyn, Nzn),
157156 latitude = (φ₁_data, φ₂_data),
@@ -195,15 +194,15 @@ function interpolate_bathymetry_in_passes(native_z, target_grid;
195194 resxn = minimum_xspacing (native_z. grid)
196195 resyn = minimum_yspacing (native_z. grid)
197196
198- # Check whether we are coarsening the grid in any directions.
199- # If so, skip interpolation passes.
200- if resxt > resxn || resyt > resyn
197+ # Check whether we are refining the grid in any directions.
198+ # If so, skip interpolation passes, as they are not needed .
199+ if resxt < resxn || resyt < resyn
201200 target_z = Field {Center, Center, Nothing} (target_grid)
202201 interpolate! (target_z, native_z)
203202 @info string (" Skipping passes for interpolating bathymetry of size $Nn " , ' \n ' ,
204203 " to target grid of size $Nt . Interpolation passes may only " , ' \n ' ,
205- " be used to refine bathymetry and require that the bathymetry " , ' \n ' ,
206- " is larger than the target grid in both horizontal directions." )
204+ " be used to coarsen bathymetry and require that the bathymetry " , ' \n ' ,
205+ " is finer than the target grid in both horizontal directions." )
207206 return target_z
208207 end
209208
0 commit comments