@@ -16,30 +16,30 @@ using KernelAbstractions.Extras.LoopInfo: @unroll
1616using JLD2
1717
1818# Implementation of 3-dimensional regridding
19- # TODO : move all the following to Oceananigans!
19+ # TODO : move all the following to Oceananigans!
2020
2121using Oceananigans. Fields: regrid!, interpolate!
22- using Oceananigans. Grids: cpu_face_constructor_x,
23- cpu_face_constructor_y,
22+ using Oceananigans. Grids: cpu_face_constructor_x,
23+ cpu_face_constructor_y,
2424 cpu_face_constructor_z,
2525 topology
2626
2727# Should we move this to grids??
28- construct_grid (:: Type{<:RectilinearGrid} , arch, size, extent, topology) =
28+ construct_grid (:: Type{<:RectilinearGrid} , arch, size, extent, topology) =
2929 RectilinearGrid (arch; size, x = extent[1 ], y = extent[2 ], z = extent[2 ], topology)
3030
31- construct_grid (:: Type{<:LatitudeLongitudeGrid} , arch, size, extent, topology) =
31+ construct_grid (:: Type{<:LatitudeLongitudeGrid} , arch, size, extent, topology) =
3232 LatitudeLongitudeGrid (arch; size, longitude = extent[1 ], latitude = extent[2 ], z = extent[3 ], topology)
3333
3434# Regrid a field in three dimensions
3535function three_dimensional_regrid! (a, b)
3636 target_grid = a. grid isa ImmersedBoundaryGrid ? a. grid. underlying_grid : a. grid
37- source_grid = b. grid isa ImmersedBoundaryGrid ? b. grid. underlying_grid : b. grid
37+ source_grid = b. grid isa ImmersedBoundaryGrid ? b. grid. underlying_grid : b. grid
3838
3939 topo = topology (target_grid)
4040 arch = architecture (target_grid)
4141 arch = child_architecture (arch)
42-
42+
4343 target_y = yt = cpu_face_constructor_y (target_grid)
4444 target_z = zt = cpu_face_constructor_z (target_grid)
4545
@@ -56,7 +56,7 @@ function three_dimensional_regrid!(a, b)
5656 field_z = Field (location (b), zgrid)
5757 regrid! (field_z, zgrid, source_grid, b)
5858
59- # regrid in y
59+ # regrid in y
6060 @debug " Regridding in y"
6161 ygrid = construct_grid (typeof (target_grid), arch, (Ns[1 ], Nt[2 ], Nt[3 ]), (xs, yt, zt), topo)
6262 field_y = Field (location (b), ygrid);
0 commit comments