@@ -224,38 +224,6 @@ function interpolate_bathymetry_in_passes(native_z, target_grid;
224224 Nλt, Nφt = Nt = size (target_grid)
225225 Nλn, Nφn = Nn = size (native_z)
226226
227- resxt = minimum_xspacing (target_grid)
228- resyt = minimum_yspacing (target_grid)
229-
230- resxn = minimum_xspacing (native_z. grid)
231- resyn = minimum_yspacing (native_z. grid)
232-
233- # Check whether we are refining the grid in any directions.
234- # If so, skip interpolation passes, as they are not needed.
235- if resxt < resxn || resyt < resyn
236- target_z = Field {Center, Center, Nothing} (target_grid)
237-
238- @info " Interpolating bathymetry of size $Nn onto a $gridtype target grid of size $Nt "
239- interpolate! (target_z, native_z)
240-
241- if passes > 0
242- passes_str = passes == 1 ? " 1 interpolation pass" : " $passes interpolation passes"
243-
244- @info string (" Skipping extra $passes_str for bathymetry." , ' \n ' ,
245- " Extra interpolation passes may only be used to coarsen bathymetry" , ' \n ' ,
246- " and require that the bathymetry is finer than the target grid in" , ' \n ' ,
247- " both horizontal directions." , ' \n ' ,
248- " Grid info:" , ' \n ' ,
249- " target grid" , ' \n ' ,
250- " ├── minimum x-spacings " , @sprintf (" %.3e" , resxt), " m" , ' \n ' ,
251- " └── minimum y-spacings " , @sprintf (" %.3e" , resyt), " m" , ' \n ' ,
252- " bathymetry grid" , ' \n ' ,
253- " ├── minimum x-spacings " , @sprintf (" %.3e" , resxn), " m" , ' \n ' ,
254- " └── minimum y-spacings " , @sprintf (" %.3e" , resyn), " m" )
255- end
256- return target_z
257- end
258-
259227 # Interpolate in passes
260228 latitude = y_domain (native_z. grid)
261229 longitude = x_domain (native_z. grid)
@@ -275,7 +243,7 @@ function interpolate_bathymetry_in_passes(native_z, target_grid;
275243 @info " Interpolation passes of bathymetry size $(size (old_z)) onto a $gridtype target grid of size $Nt :"
276244 for pass = 1 : passes - 1
277245 new_size = (Nλ[pass], Nφ[pass], 1 )
278- @info " pass $pass to size $new_size "
246+ @info " Performing pass $pass to size $new_size . "
279247
280248 new_grid = LatitudeLongitudeGrid (architecture (target_grid), Float32,
281249 size = new_size,
469437retrieve_bathymetry (grid, :: Nothing ; kw... ) = regrid_bathymetry (grid; kw... )
470438retrieve_bathymetry (grid; kw... ) = regrid_bathymetry (grid; kw... )
471439
472- end # module
440+ end # module
0 commit comments