@@ -52,28 +52,15 @@ function OceananigansSimulation(area_fraction, start_date, stop_date; output_dir
52
52
download_dataset (ecco_salinity)
53
53
end
54
54
55
- # Set up ocean grid (1 degree)
56
- resolution_points = (360 , 160 , 32 )
57
- Nz = last (resolution_points)
58
- z_faces = CO. exponential_z_faces (; Nz, depth = 6000 , h = 34 )
59
-
60
- # Regular LatLong because we know how to do interpolation there
61
-
62
- # TODO : When moving to TripolarGrid, note that we need to be careful about
63
- # ensuring the coordinate systems align (ie, rotate vectors on the OC grid)
64
-
65
- underlying_grid = OC. LatitudeLongitudeGrid (
66
- arch;
67
- size = resolution_points,
68
- longitude = (- 180 , 180 ),
69
- latitude = (- 80 , 80 ), # NOTE: Don't goo to high up when using LatLongGrid, or the cells will be too small
70
- z = z_faces,
71
- halo = (7 , 7 , 7 ),
72
- )
55
+ # Set up tripolar ocean grid (1 degree)
56
+ Nx = 360
57
+ Ny = 180
58
+ Nz = 40
73
59
60
+ z = CO. exponential_z_faces (; Nz, depth = 4000 , h = 34 )
61
+ underlying_grid = OC. TripolarGrid (arch; size = (Nx, Ny, Nz), halo = (5 , 5 , 4 ), z)
74
62
bottom_height =
75
63
CO. regrid_bathymetry (underlying_grid; minimum_depth = 30 , interpolation_passes = 20 , major_basins = 1 )
76
-
77
64
grid = OC. ImmersedBoundaryGrid (underlying_grid, OC. GridFittedBottom (bottom_height); active_cells_map = true )
78
65
79
66
if use_ecco
@@ -98,13 +85,9 @@ function OceananigansSimulation(area_fraction, start_date, stop_date; output_dir
98
85
OC. set! (ocean. model, T = T_init, S = S_init)
99
86
end
100
87
88
+ # Construct a remapper from the exchange grid to `Center, Center` fields
101
89
long_cc = OC. λnodes (grid, OC. Center (), OC. Center (), OC. Center ())
102
90
lat_cc = OC. φnodes (grid, OC. Center (), OC. Center (), OC. Center ())
103
-
104
-
105
- # TODO : Go from 0 to Nx+1, Ny+1 (for halos) (for LatLongGrid)
106
-
107
- # Construct a remapper from the exchange grid to `Center, Center` fields
108
91
long_cc = reshape (long_cc, length (long_cc), 1 )
109
92
lat_cc = reshape (lat_cc, 1 , length (lat_cc))
110
93
target_points_cc = @. CC. Geometry. LatLongPoint (lat_cc, long_cc)
0 commit comments