roms-tools 1.0.1__py3-none-any.whl → 1.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import pytest
2
2
  from datetime import datetime
3
- from roms_tools import BoundaryForcing, Grid, VerticalCoordinate
3
+ from roms_tools import BoundaryForcing, Grid
4
4
  import numpy as np
5
5
  import tempfile
6
6
  import os
@@ -14,30 +14,24 @@ def example_grid():
14
14
  Fixture for creating a Grid object.
15
15
  """
16
16
  grid = Grid(
17
- nx=2, ny=2, size_x=500, size_y=1000, center_lon=0, center_lat=55, rot=10
18
- )
19
-
20
- return grid
21
-
22
-
23
- @pytest.fixture
24
- def example_vertical_coordinate(example_grid):
25
- """
26
- Fixture for creating a VerticalCoordinate object.
27
- """
28
- vertical_coordinate = VerticalCoordinate(
29
- grid=example_grid,
17
+ nx=2,
18
+ ny=2,
19
+ size_x=500,
20
+ size_y=1000,
21
+ center_lon=0,
22
+ center_lat=55,
23
+ rot=10,
30
24
  N=3, # number of vertical levels
31
25
  theta_s=5.0, # surface control parameter
32
26
  theta_b=2.0, # bottom control parameter
33
27
  hc=250.0, # critical depth
34
28
  )
35
29
 
36
- return vertical_coordinate
30
+ return grid
37
31
 
38
32
 
39
33
  @pytest.fixture
40
- def boundary_forcing(example_grid, example_vertical_coordinate):
34
+ def boundary_forcing(example_grid):
41
35
  """
42
36
  Fixture for creating a BoundaryForcing object.
43
37
  """
@@ -46,7 +40,6 @@ def boundary_forcing(example_grid, example_vertical_coordinate):
46
40
 
47
41
  return BoundaryForcing(
48
42
  grid=example_grid,
49
- vertical_coordinate=example_vertical_coordinate,
50
43
  start_time=datetime(2021, 6, 29),
51
44
  end_time=datetime(2021, 6, 30),
52
45
  physics_source={"name": "GLORYS", "path": fname},
@@ -54,9 +47,7 @@ def boundary_forcing(example_grid, example_vertical_coordinate):
54
47
 
55
48
 
56
49
  @pytest.fixture
57
- def boundary_forcing_with_bgc_from_climatology(
58
- example_grid, example_vertical_coordinate
59
- ):
50
+ def boundary_forcing_with_bgc_from_climatology(example_grid):
60
51
  """
61
52
  Fixture for creating a BoundaryForcing object.
62
53
  """
@@ -66,7 +57,6 @@ def boundary_forcing_with_bgc_from_climatology(
66
57
 
67
58
  return BoundaryForcing(
68
59
  grid=example_grid,
69
- vertical_coordinate=example_vertical_coordinate,
70
60
  start_time=datetime(2021, 6, 29),
71
61
  end_time=datetime(2021, 6, 30),
72
62
  physics_source={"name": "GLORYS", "path": fname},
@@ -98,6 +88,7 @@ def test_boundary_forcing_creation(bdry_forcing_fixture, request):
98
88
  assert f"u_{direction}" in bdry_forcing.ds["physics"]
99
89
  assert f"v_{direction}" in bdry_forcing.ds["physics"]
100
90
  assert f"zeta_{direction}" in bdry_forcing.ds["physics"]
91
+ assert len(bdry_forcing.ds["physics"].bry_time) == 1
101
92
 
102
93
 
103
94
  def test_boundary_forcing_creation_with_bgc(boundary_forcing_with_bgc_from_climatology):
@@ -116,6 +107,8 @@ def test_boundary_forcing_creation_with_bgc(boundary_forcing_with_bgc_from_clima
116
107
  in boundary_forcing_with_bgc_from_climatology.ds["bgc"]
117
108
  )
118
109
 
110
+ assert len(boundary_forcing_with_bgc_from_climatology.ds["bgc"].bry_time) == 12
111
+
119
112
 
120
113
  def test_boundary_forcing_data_consistency_plot_save(
121
114
  boundary_forcing_with_bgc_from_climatology,
@@ -141,10 +134,9 @@ def test_boundary_forcing_data_consistency_plot_save(
141
134
  expected_temp_south = np.array(
142
135
  [
143
136
  [
144
- [16.84414, 16.905312, 16.967817],
145
- [18.088203, 18.121834, 18.315424],
146
- [18.431192, 18.496748, 18.718002],
147
- [19.294329, 19.30358, 19.439777],
137
+ [16.84414, 18.088203, 18.431192, 19.294329],
138
+ [16.905312, 18.121834, 18.496748, 19.30358],
139
+ [16.967817, 18.315424, 18.718002, 19.439777],
148
140
  ]
149
141
  ],
150
142
  dtype=np.float32,
@@ -152,10 +144,9 @@ def test_boundary_forcing_data_consistency_plot_save(
152
144
  expected_temp_east = np.array(
153
145
  [
154
146
  [
155
- [19.294329, 19.30358, 19.439777],
156
- [18.633307, 18.637077, 18.667465],
157
- [8.710737, 11.25943, 13.111585],
158
- [9.20282, 10.667074, 11.752404],
147
+ [19.294329, 18.633307, 8.710737, 9.20282],
148
+ [19.30358, 18.637077, 11.25943, 10.667074],
149
+ [19.439777, 18.667465, 13.111585, 11.752404],
159
150
  ]
160
151
  ],
161
152
  dtype=np.float32,
@@ -163,10 +154,9 @@ def test_boundary_forcing_data_consistency_plot_save(
163
154
  expected_temp_north = np.array(
164
155
  [
165
156
  [
166
- [10.233599, 10.546486, 10.671082],
167
- [10.147332, 10.502733, 10.68275],
168
- [10.458557, 11.209945, 11.377164],
169
- [9.20282, 10.667074, 11.752404],
157
+ [10.233599, 10.147332, 10.458557, 9.20282],
158
+ [10.546486, 10.502733, 11.209945, 10.667074],
159
+ [10.671082, 10.68275, 11.377164, 11.752404],
170
160
  ]
171
161
  ],
172
162
  dtype=np.float32,
@@ -174,10 +164,9 @@ def test_boundary_forcing_data_consistency_plot_save(
174
164
  expected_temp_west = np.array(
175
165
  [
176
166
  [
177
- [16.84414, 16.905312, 16.967817],
178
- [12.639833, 13.479691, 14.426711],
179
- [11.027701, 11.650267, 12.200586],
180
- [10.233599, 10.546486, 10.671082],
167
+ [16.84414, 12.639833, 11.027701, 10.233599],
168
+ [16.905312, 13.479691, 11.650267, 10.546486],
169
+ [16.967817, 14.426711, 12.200586, 10.671082],
181
170
  ]
182
171
  ],
183
172
  dtype=np.float32,
@@ -189,57 +178,58 @@ def test_boundary_forcing_data_consistency_plot_save(
189
178
  expected_u_east = np.array(
190
179
  [
191
180
  [
192
- [0.0, -0.0, -0.0],
193
- [-0.0, -0.0, -0.0],
194
- [0.06979556, 0.06167743, -0.02247071],
195
- [0.0211786, 0.03679834, 0.0274788],
181
+ [0.0, -0.0, 0.06979556, 0.0211786],
182
+ [-0.0, -0.0, 0.06167743, 0.03679834],
183
+ [-0.0, -0.0, -0.02247071, 0.0274788],
196
184
  ]
197
185
  ],
198
186
  dtype=np.float32,
199
187
  )
188
+
200
189
  expected_u_north = np.array(
201
190
  [
202
191
  [
203
- [0.04268532, 0.03889201, 0.03351666],
204
- [0.04645353, 0.04914769, 0.03673013],
205
- [0.0211786, 0.03679834, 0.0274788],
192
+ [0.04268532, 0.04645353, 0.0211786],
193
+ [0.03889201, 0.04914769, 0.03679834],
194
+ [0.03351666, 0.03673013, 0.0274788],
206
195
  ]
207
196
  ],
208
197
  dtype=np.float32,
209
198
  )
199
+
210
200
  expected_u_west = np.array(
211
201
  [
212
202
  [
213
- [-0.0, -0.0, -0.0],
214
- [0.0, -0.0, -0.0],
215
- [0.0, 0.0, -0.0],
216
- [0.04268532, 0.03889201, 0.03351666],
203
+ [-0.0, 0.0, 0.0, 0.04268532],
204
+ [-0.0, -0.0, 0.0, 0.03889201],
205
+ [-0.0, -0.0, -0.0, 0.03351666],
217
206
  ]
218
207
  ],
219
208
  dtype=np.float32,
220
209
  )
221
210
 
222
211
  expected_v_south = np.array(
223
- [[[0.0, 0.0, 0.0], [0.0, 0.0, -0.0], [-0.0, -0.0, -0.0], [-0.0, -0.0, -0.0]]],
212
+ [[[0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, -0.0], [0.0, -0.0, -0.0, -0.0]]],
224
213
  dtype=np.float32,
225
214
  )
215
+
226
216
  expected_v_east = np.array(
227
217
  [
228
218
  [
229
- [-0.0, -0.0, -0.0],
230
- [-0.0, -0.0, -0.0],
231
- [-0.06720348, -0.08354441, -0.13835917],
219
+ [-0.0, -0.0, -0.06720348],
220
+ [-0.0, -0.0, -0.08354441],
221
+ [-0.0, -0.0, -0.13835917],
232
222
  ]
233
223
  ],
234
224
  dtype=np.float32,
235
225
  )
226
+
236
227
  expected_v_north = np.array(
237
228
  [
238
229
  [
239
- [-0.00951457, -0.00576979, -0.02147919],
240
- [-0.0, -0.0, -0.0],
241
- [0.01915873, 0.02625698, 0.01757628],
242
- [-0.06720348, -0.08354441, -0.13835917],
230
+ [-0.00951457, -0.0, 0.01915873, -0.06720348],
231
+ [-0.00576979, -0.0, 0.02625698, -0.08354441],
232
+ [-0.02147919, -0.0, 0.01757628, -0.13835917],
243
233
  ]
244
234
  ],
245
235
  dtype=np.float32,
@@ -247,9 +237,9 @@ def test_boundary_forcing_data_consistency_plot_save(
247
237
  expected_v_west = np.array(
248
238
  [
249
239
  [
250
- [0.0, 0.0, 0.0],
251
- [-0.0, -0.0, -0.0],
252
- [-0.00951457, -0.00576979, -0.02147919],
240
+ [0.0, -0.0, -0.00951457],
241
+ [0.0, -0.0, -0.00576979],
242
+ [0.0, -0.0, -0.02147919],
253
243
  ]
254
244
  ],
255
245
  dtype=np.float32,
@@ -274,76 +264,64 @@ def test_boundary_forcing_data_consistency_plot_save(
274
264
  expected_alk_south = np.array(
275
265
  [
276
266
  [
277
- [2352.1636, 2352.128, 2352.091],
278
- [2333.1094, 2332.9932, 2332.8738],
279
- [2308.618, 2308.4705, 2308.3032],
280
- [2286.2327, 2286.0442, 2285.8623],
267
+ [2352.1636, 2333.1094, 2308.618, 2286.2327],
268
+ [2352.128, 2332.9932, 2308.4705, 2286.0442],
269
+ [2352.091, 2332.8738, 2308.3032, 2285.8623],
281
270
  ],
282
271
  [
283
- [2354.7297, 2354.6863, 2354.6414],
284
- [2337.391, 2337.259, 2337.1223],
285
- [2314.0232, 2313.8638, 2313.6616],
286
- [2294.0876, 2293.8918, 2293.6626],
272
+ [2354.7297, 2337.391, 2314.0232, 2294.0876],
273
+ [2354.6863, 2337.259, 2313.8638, 2293.8918],
274
+ [2354.6414, 2337.1223, 2313.6616, 2293.6626],
287
275
  ],
288
276
  [
289
- [2355.02, 2354.9158, 2354.817],
290
- [2336.321, 2336.117, 2335.9214],
291
- [2312.7905, 2312.4849, 2312.2444],
292
- [2292.2637, 2291.8752, 2291.6702],
277
+ [2355.02, 2336.321, 2312.7905, 2292.2637],
278
+ [2354.9158, 2336.117, 2312.4849, 2291.8752],
279
+ [2354.817, 2335.9214, 2312.2444, 2291.6702],
293
280
  ],
294
281
  [
295
- [2355.2583, 2355.052, 2354.9163],
296
- [2334.3098, 2333.913, 2333.651],
297
- [2309.5273, 2308.292, 2307.8772],
298
- [2287.4226, 2285.5466, 2285.0479],
282
+ [2355.2583, 2334.3098, 2309.5273, 2287.4226],
283
+ [2355.052, 2333.913, 2308.292, 2285.5466],
284
+ [2354.9163, 2333.651, 2307.8772, 2285.0479],
299
285
  ],
300
286
  [
301
- [2354.1216, 2353.7737, 2353.6316],
302
- [2330.6604, 2329.948, 2329.6023],
303
- [2304.88, 2302.105, 2301.4136],
304
- [2280.6, 2276.278, 2275.2761],
287
+ [2354.1216, 2330.6604, 2304.88, 2280.6],
288
+ [2353.7737, 2329.948, 2302.105, 2276.278],
289
+ [2353.6316, 2329.6023, 2301.4136, 2275.2761],
305
290
  ],
306
291
  [
307
- [2346.881, 2345.7993, 2345.4675],
308
- [2322.218, 2320.3225, 2319.691],
309
- [2301.2046, 2291.6438, 2290.308],
310
- [2279.729, 2265.0488, 2263.0654],
292
+ [2346.881, 2322.218, 2301.2046, 2279.729],
293
+ [2345.7993, 2320.3225, 2291.6438, 2265.0488],
294
+ [2345.4675, 2319.691, 2290.308, 2263.0654],
311
295
  ],
312
296
  [
313
- [2336.2632, 2335.273, 2334.9324],
314
- [2312.938, 2310.7412, 2310.055],
315
- [2293.6711, 2279.314, 2277.593],
316
- [2272.6418, 2250.8848, 2248.0718],
297
+ [2336.2632, 2312.938, 2293.6711, 2272.6418],
298
+ [2335.273, 2310.7412, 2279.314, 2250.8848],
299
+ [2334.9324, 2310.055, 2277.593, 2248.0718],
317
300
  ],
318
301
  [
319
- [2333.8801, 2333.265, 2333.0667],
320
- [2311.3232, 2309.5337, 2309.034],
321
- [2289.1548, 2276.1438, 2274.885],
322
- [2266.9172, 2246.1714, 2244.1096],
302
+ [2333.8801, 2311.3232, 2289.1548, 2266.9172],
303
+ [2333.265, 2309.5337, 2276.1438, 2246.1714],
304
+ [2333.0667, 2309.034, 2274.885, 2244.1096],
323
305
  ],
324
306
  [
325
- [2336.8193, 2336.5115, 2336.4402],
326
- [2314.2544, 2313.1343, 2312.9004],
327
- [2288.887, 2280.0654, 2279.546],
328
- [2263.7944, 2249.8926, 2249.0842],
307
+ [2336.8193, 2314.2544, 2288.887, 2263.7944],
308
+ [2336.5115, 2313.1343, 2280.0654, 2249.8926],
309
+ [2336.4402, 2312.9004, 2279.546, 2249.0842],
329
310
  ],
330
311
  [
331
- [2341.18, 2341.0679, 2341.025],
332
- [2317.8801, 2317.4556, 2317.3325],
333
- [2289.4714, 2286.2214, 2285.9263],
334
- [2262.6213, 2257.4502, 2256.9663],
312
+ [2341.18, 2317.8801, 2289.4714, 2262.6213],
313
+ [2341.0679, 2317.4556, 2286.2214, 2257.4502],
314
+ [2341.025, 2317.3325, 2285.9263, 2256.9663],
335
315
  ],
336
316
  [
337
- [2344.9026, 2344.86, 2344.8218],
338
- [2323.6404, 2323.5337, 2323.442],
339
- [2297.1284, 2296.8164, 2296.6846],
340
- [2273.7996, 2273.2507, 2273.0938],
317
+ [2344.9026, 2323.6404, 2297.1284, 2273.7996],
318
+ [2344.86, 2323.5337, 2296.8164, 2273.2507],
319
+ [2344.8218, 2323.442, 2296.6846, 2273.0938],
341
320
  ],
342
321
  [
343
- [2349.1636, 2349.1338, 2349.1035],
344
- [2329.3665, 2329.2893, 2329.2102],
345
- [2304.1536, 2304.0178, 2303.9006],
346
- [2281.6301, 2281.4062, 2281.269],
322
+ [2349.1636, 2329.3665, 2304.1536, 2281.6301],
323
+ [2349.1338, 2329.2893, 2304.0178, 2281.4062],
324
+ [2349.1035, 2329.2102, 2303.9006, 2281.269],
347
325
  ],
348
326
  ],
349
327
  dtype=np.float32,
@@ -352,76 +330,64 @@ def test_boundary_forcing_data_consistency_plot_save(
352
330
  expected_alk_east = np.array(
353
331
  [
354
332
  [
355
- [2286.2327, 2286.0442, 2285.8623],
356
- [2268.2373, 2268.162, 2268.0366],
357
- [2297.2825, 2296.5747, 2296.2695],
358
- [2349.247, 2349.1697, 2349.0938],
333
+ [2286.2327, 2268.2373, 2297.2825, 2349.247],
334
+ [2286.0442, 2268.162, 2296.5747, 2349.1697],
335
+ [2285.8623, 2268.0366, 2296.2695, 2349.0938],
359
336
  ],
360
337
  [
361
- [2294.0876, 2293.8918, 2293.6626],
362
- [2272.6245, 2272.5269, 2272.3384],
363
- [2301.072, 2300.6504, 2300.4255],
364
- [2352.814, 2352.756, 2352.6907],
338
+ [2294.0876, 2272.6245, 2301.072, 2352.814],
339
+ [2293.8918, 2272.5269, 2300.6504, 2352.756],
340
+ [2293.6626, 2272.3384, 2300.4255, 2352.6907],
365
341
  ],
366
342
  [
367
- [2292.2637, 2291.8752, 2291.6702],
368
- [2272.901, 2272.7153, 2272.5413],
369
- [2304.492, 2303.8516, 2303.6313],
370
- [2352.8616, 2352.795, 2352.7444],
343
+ [2292.2637, 2272.901, 2304.492, 2352.8616],
344
+ [2291.8752, 2272.7153, 2303.8516, 2352.795],
345
+ [2291.6702, 2272.5413, 2303.6313, 2352.7444],
371
346
  ],
372
347
  [
373
- [2287.4226, 2285.5466, 2285.0479],
374
- [2269.8926, 2269.2112, 2268.8284],
375
- [2310.2466, 2307.2576, 2306.0806],
376
- [2350.9084, 2350.3499, 2350.0247],
348
+ [2287.4226, 2269.8926, 2310.2466, 2350.9084],
349
+ [2285.5466, 2269.2112, 2307.2576, 2350.3499],
350
+ [2285.0479, 2268.8284, 2306.0806, 2350.0247],
377
351
  ],
378
352
  [
379
- [2280.6, 2276.278, 2275.2761],
380
- [2266.4937, 2264.7148, 2263.8596],
381
- [2309.5537, 2297.2288, 2293.6697],
382
- [2350.1707, 2348.5422, 2347.7415],
353
+ [2280.6, 2266.4937, 2309.5537, 2350.1707],
354
+ [2276.278, 2264.7148, 2297.2288, 2348.5422],
355
+ [2275.2761, 2263.8596, 2293.6697, 2347.7415],
383
356
  ],
384
357
  [
385
- [2279.729, 2265.0488, 2263.0654],
386
- [2263.0278, 2254.806, 2253.1594],
387
- [2311.0305, 2290.098, 2284.9631],
388
- [2350.3872, 2345.0693, 2342.4902],
358
+ [2279.729, 2263.0278, 2311.0305, 2350.3872],
359
+ [2265.0488, 2254.806, 2290.098, 2345.0693],
360
+ [2263.0654, 2253.1594, 2284.9631, 2342.4902],
389
361
  ],
390
362
  [
391
- [2272.6418, 2250.8848, 2248.0718],
392
- [2256.4866, 2239.6753, 2237.9412],
393
- [2309.7383, 2284.9133, 2277.729],
394
- [2349.7207, 2339.6501, 2335.4924],
363
+ [2272.6418, 2256.4866, 2309.7383, 2349.7207],
364
+ [2250.8848, 2239.6753, 2284.9133, 2339.6501],
365
+ [2248.0718, 2237.9412, 2277.729, 2335.4924],
395
366
  ],
396
367
  [
397
- [2266.9172, 2246.1714, 2244.1096],
398
- [2249.1013, 2234.224, 2232.722],
399
- [2307.639, 2275.4429, 2266.299],
400
- [2347.7605, 2330.1702, 2325.427],
368
+ [2266.9172, 2249.1013, 2307.639, 2347.7605],
369
+ [2246.1714, 2234.224, 2275.4429, 2330.1702],
370
+ [2244.1096, 2232.722, 2266.299, 2325.427],
401
371
  ],
402
372
  [
403
- [2263.7944, 2249.8926, 2249.0842],
404
- [2246.2002, 2236.0933, 2235.4578],
405
- [2301.0461, 2269.4448, 2263.889],
406
- [2338.5127, 2321.7393, 2316.971],
373
+ [2263.7944, 2246.2002, 2301.0461, 2338.5127],
374
+ [2249.8926, 2236.0933, 2269.4448, 2321.7393],
375
+ [2249.0842, 2235.4578, 2263.889, 2316.971],
407
376
  ],
408
377
  [
409
- [2262.6213, 2257.4502, 2256.9663],
410
- [2244.3662, 2241.8052, 2241.589],
411
- [2292.1316, 2274.763, 2272.2124],
412
- [2331.162, 2322.5522, 2320.8901],
378
+ [2262.6213, 2244.3662, 2292.1316, 2331.162],
379
+ [2257.4502, 2241.8052, 2274.763, 2322.5522],
380
+ [2256.9663, 2241.589, 2272.2124, 2320.8901],
413
381
  ],
414
382
  [
415
- [2273.7996, 2273.2507, 2273.0938],
416
- [2254.6848, 2254.4407, 2254.3308],
417
- [2290.5637, 2286.885, 2286.088],
418
- [2333.583, 2332.7646, 2332.3955],
383
+ [2273.7996, 2254.6848, 2290.5637, 2333.583],
384
+ [2273.2507, 2254.4407, 2286.885, 2332.7646],
385
+ [2273.0938, 2254.3308, 2286.088, 2332.3955],
419
386
  ],
420
387
  [
421
- [2281.6301, 2281.4062, 2281.269],
422
- [2262.4211, 2262.3313, 2262.2532],
423
- [2296.095, 2293.6157, 2293.1213],
424
- [2340.852, 2340.6072, 2340.4978],
388
+ [2281.6301, 2262.4211, 2296.095, 2340.852],
389
+ [2281.4062, 2262.3313, 2293.6157, 2340.6072],
390
+ [2281.269, 2262.2532, 2293.1213, 2340.4978],
425
391
  ],
426
392
  ],
427
393
  dtype=np.float32,
@@ -430,76 +396,64 @@ def test_boundary_forcing_data_consistency_plot_save(
430
396
  expected_alk_north = np.array(
431
397
  [
432
398
  [
433
- [2376.7993, 2376.7961, 2376.7932],
434
- [2375.0688, 2375.0647, 2375.0596],
435
- [2372.2307, 2372.2188, 2372.201],
436
- [2349.247, 2349.1697, 2349.0938],
399
+ [2376.7993, 2375.0688, 2372.2307, 2349.247],
400
+ [2376.7961, 2375.0647, 2372.2188, 2349.1697],
401
+ [2376.7932, 2375.0596, 2372.201, 2349.0938],
437
402
  ],
438
403
  [
439
- [2376.757, 2376.7537, 2376.7478],
440
- [2374.8325, 2374.8286, 2374.825],
441
- [2371.8342, 2371.8257, 2371.814],
442
- [2352.814, 2352.756, 2352.6907],
404
+ [2376.757, 2374.8325, 2371.8342, 2352.814],
405
+ [2376.7537, 2374.8286, 2371.8257, 2352.756],
406
+ [2376.7478, 2374.825, 2371.814, 2352.6907],
443
407
  ],
444
408
  [
445
- [2377.0188, 2377.0137, 2377.0073],
446
- [2374.9753, 2374.9707, 2374.9666],
447
- [2371.7104, 2371.7085, 2371.707],
448
- [2352.8616, 2352.795, 2352.7444],
409
+ [2377.0188, 2374.9753, 2371.7104, 2352.8616],
410
+ [2377.0137, 2374.9707, 2371.7085, 2352.795],
411
+ [2377.0073, 2374.9666, 2371.707, 2352.7444],
449
412
  ],
450
413
  [
451
- [2377.3914, 2377.383, 2377.3792],
452
- [2375.5757, 2375.5718, 2375.57],
453
- [2371.869, 2371.8706, 2371.8743],
454
- [2350.9084, 2350.3499, 2350.0247],
414
+ [2377.3914, 2375.5757, 2371.869, 2350.9084],
415
+ [2377.383, 2375.5718, 2371.8706, 2350.3499],
416
+ [2377.3792, 2375.57, 2371.8743, 2350.0247],
455
417
  ],
456
418
  [
457
- [2378.4722, 2378.5, 2378.5017],
458
- [2377.151, 2377.2292, 2377.2666],
459
- [2373.7805, 2373.9, 2374.0066],
460
- [2350.1707, 2348.5422, 2347.7415],
419
+ [2378.4722, 2377.151, 2373.7805, 2350.1707],
420
+ [2378.5, 2377.2292, 2373.9, 2348.5422],
421
+ [2378.5017, 2377.2666, 2374.0066, 2347.7415],
461
422
  ],
462
423
  [
463
- [2381.3555, 2383.3838, 2383.9692],
464
- [2380.8108, 2382.6125, 2383.3374],
465
- [2378.7131, 2379.7717, 2380.4094],
466
- [2350.3872, 2345.0693, 2342.4902],
424
+ [2381.3555, 2380.8108, 2378.7131, 2350.3872],
425
+ [2383.3838, 2382.6125, 2379.7717, 2345.0693],
426
+ [2383.9692, 2383.3374, 2380.4094, 2342.4902],
467
427
  ],
468
428
  [
469
- [2388.7502, 2389.4453, 2389.6758],
470
- [2387.0815, 2388.0613, 2388.3323],
471
- [2381.9631, 2383.4429, 2383.521],
472
- [2349.7207, 2339.6501, 2335.4924],
429
+ [2388.7502, 2387.0815, 2381.9631, 2349.7207],
430
+ [2389.4453, 2388.0613, 2383.4429, 2339.6501],
431
+ [2389.6758, 2388.3323, 2383.521, 2335.4924],
473
432
  ],
474
433
  [
475
- [2386.29, 2385.9524, 2385.863],
476
- [2383.9194, 2383.5654, 2383.4429],
477
- [2380.237, 2377.2883, 2376.6057],
478
- [2347.7605, 2330.1702, 2325.427],
434
+ [2386.29, 2383.9194, 2380.237, 2347.7605],
435
+ [2385.9524, 2383.5654, 2377.2883, 2330.1702],
436
+ [2385.863, 2383.4429, 2376.6057, 2325.427],
479
437
  ],
480
438
  [
481
- [2375.1409, 2373.7124, 2373.2695],
482
- [2370.7205, 2368.2014, 2367.7415],
483
- [2371.8071, 2365.7, 2365.1226],
484
- [2338.5127, 2321.7393, 2316.971],
439
+ [2375.1409, 2370.7205, 2371.8071, 2338.5127],
440
+ [2373.7124, 2368.2014, 2365.7, 2321.7393],
441
+ [2373.2695, 2367.7415, 2365.1226, 2316.971],
485
442
  ],
486
443
  [
487
- [2371.951, 2371.8308, 2371.786],
488
- [2365.2358, 2364.598, 2364.4639],
489
- [2365.8464, 2362.7102, 2362.5464],
490
- [2331.162, 2322.5522, 2320.8901],
444
+ [2371.951, 2365.2358, 2365.8464, 2331.162],
445
+ [2371.8308, 2364.598, 2362.7102, 2322.5522],
446
+ [2371.786, 2364.4639, 2362.5464, 2320.8901],
491
447
  ],
492
448
  [
493
- [2373.2239, 2373.2004, 2373.1711],
494
- [2370.007, 2369.9714, 2369.9507],
495
- [2367.3286, 2367.2654, 2367.2217],
496
- [2333.583, 2332.7646, 2332.3955],
449
+ [2373.2239, 2370.007, 2367.3286, 2333.583],
450
+ [2373.2004, 2369.9714, 2367.2654, 2332.7646],
451
+ [2373.1711, 2369.9507, 2367.2217, 2332.3955],
497
452
  ],
498
453
  [
499
- [2374.99, 2374.9817, 2374.9717],
500
- [2373.9058, 2373.8901, 2373.8748],
501
- [2370.9688, 2370.9421, 2370.907],
502
- [2340.852, 2340.6072, 2340.4978],
454
+ [2374.99, 2373.9058, 2370.9688, 2340.852],
455
+ [2374.9817, 2373.8901, 2370.9421, 2340.6072],
456
+ [2374.9717, 2373.8748, 2370.907, 2340.4978],
503
457
  ],
504
458
  ],
505
459
  dtype=np.float32,
@@ -508,82 +462,70 @@ def test_boundary_forcing_data_consistency_plot_save(
508
462
  expected_alk_west = np.array(
509
463
  [
510
464
  [
511
- [2352.1636, 2352.128, 2352.091],
512
- [2335.311, 2335.1162, 2334.924],
513
- [2362.5132, 2362.5088, 2362.4663],
514
- [2376.7993, 2376.7961, 2376.7932],
465
+ [2352.1636, 2335.311, 2362.5132, 2376.7993],
466
+ [2352.128, 2335.1162, 2362.5088, 2376.7961],
467
+ [2352.091, 2334.924, 2362.4663, 2376.7932],
515
468
  ],
516
469
  [
517
- [2354.7297, 2354.6863, 2354.6414],
518
- [2335.165, 2334.9695, 2334.78],
519
- [2363.018, 2363.0068, 2362.965],
520
- [2376.757, 2376.7537, 2376.7478],
470
+ [2354.7297, 2335.165, 2363.018, 2376.757],
471
+ [2354.6863, 2334.9695, 2363.0068, 2376.7537],
472
+ [2354.6414, 2334.78, 2362.965, 2376.7478],
521
473
  ],
522
474
  [
523
- [2355.02, 2354.9158, 2354.817],
524
- [2334.8015, 2334.5276, 2334.272],
525
- [2365.7913, 2365.8025, 2365.7432],
526
- [2377.0188, 2377.0137, 2377.0073],
475
+ [2355.02, 2334.8015, 2365.7913, 2377.0188],
476
+ [2354.9158, 2334.5276, 2365.8025, 2377.0137],
477
+ [2354.817, 2334.272, 2365.7432, 2377.0073],
527
478
  ],
528
479
  [
529
- [2355.2583, 2355.052, 2354.9163],
530
- [2335.5789, 2335.267, 2335.0227],
531
- [2370.7808, 2370.754, 2370.6836],
532
- [2377.3914, 2377.383, 2377.3792],
480
+ [2355.2583, 2335.5789, 2370.7808, 2377.3914],
481
+ [2355.052, 2335.267, 2370.754, 2377.383],
482
+ [2354.9163, 2335.0227, 2370.6836, 2377.3792],
533
483
  ],
534
484
  [
535
- [2354.1216, 2353.7737, 2353.6316],
536
- [2335.7122, 2335.1372, 2334.8125],
537
- [2375.5793, 2375.3132, 2375.1387],
538
- [2378.4722, 2378.5, 2378.5017],
485
+ [2354.1216, 2335.7122, 2375.5793, 2378.4722],
486
+ [2353.7737, 2335.1372, 2375.3132, 2378.5],
487
+ [2353.6316, 2334.8125, 2375.1387, 2378.5017],
539
488
  ],
540
489
  [
541
- [2346.881, 2345.7993, 2345.4675],
542
- [2332.2158, 2331.5295, 2331.2346],
543
- [2378.4954, 2376.4001, 2375.9187],
544
- [2381.3555, 2383.3838, 2383.9692],
490
+ [2346.881, 2332.2158, 2378.4954, 2381.3555],
491
+ [2345.7993, 2331.5295, 2376.4001, 2383.3838],
492
+ [2345.4675, 2331.2346, 2375.9187, 2383.9692],
545
493
  ],
546
494
  [
547
- [2336.2632, 2335.273, 2334.9324],
548
- [2328.7188, 2327.8726, 2327.576],
549
- [2374.763, 2370.0576, 2369.491],
550
- [2388.7502, 2389.4453, 2389.6758],
495
+ [2336.2632, 2328.7188, 2374.763, 2388.7502],
496
+ [2335.273, 2327.8726, 2370.0576, 2389.4453],
497
+ [2334.9324, 2327.576, 2369.491, 2389.6758],
551
498
  ],
552
499
  [
553
- [2333.8801, 2333.265, 2333.0667],
554
- [2326.699, 2326.0037, 2325.771],
555
- [2356.8801, 2352.0618, 2351.4526],
556
- [2386.29, 2385.9524, 2385.863],
500
+ [2333.8801, 2326.699, 2356.8801, 2386.29],
501
+ [2333.265, 2326.0037, 2352.0618, 2385.9524],
502
+ [2333.0667, 2325.771, 2351.4526, 2385.863],
557
503
  ],
558
504
  [
559
- [2336.8193, 2336.5115, 2336.4402],
560
- [2325.9893, 2325.512, 2325.2942],
561
- [2346.735, 2344.9722, 2344.6653],
562
- [2375.1409, 2373.7124, 2373.2695],
505
+ [2336.8193, 2325.9893, 2346.735, 2375.1409],
506
+ [2336.5115, 2325.512, 2344.9722, 2373.7124],
507
+ [2336.4402, 2325.2942, 2344.6653, 2373.2695],
563
508
  ],
564
509
  [
565
- [2341.18, 2341.0679, 2341.025],
566
- [2328.2231, 2327.9817, 2327.8281],
567
- [2352.159, 2351.6226, 2351.4314],
568
- [2371.951, 2371.8308, 2371.786],
510
+ [2341.18, 2328.2231, 2352.159, 2371.951],
511
+ [2341.0679, 2327.9817, 2351.6226, 2371.8308],
512
+ [2341.025, 2327.8281, 2351.4314, 2371.786],
569
513
  ],
570
514
  [
571
- [2344.9026, 2344.86, 2344.8218],
572
- [2331.0703, 2330.9097, 2330.7537],
573
- [2356.0095, 2355.9424, 2355.8538],
574
- [2373.2239, 2373.2004, 2373.1711],
515
+ [2344.9026, 2331.0703, 2356.0095, 2373.2239],
516
+ [2344.86, 2330.9097, 2355.9424, 2373.2004],
517
+ [2344.8218, 2330.7537, 2355.8538, 2373.1711],
575
518
  ],
576
519
  [
577
- [2349.1636, 2349.1338, 2349.1035],
578
- [2334.3328, 2334.043, 2333.749],
579
- [2359.3823, 2359.3276, 2359.2634],
580
- [2374.99, 2374.9817, 2374.9717],
520
+ [2349.1636, 2334.3328, 2359.3823, 2374.99],
521
+ [2349.1338, 2334.043, 2359.3276, 2374.9817],
522
+ [2349.1035, 2333.749, 2359.2634, 2374.9717],
581
523
  ],
582
524
  ],
583
525
  dtype=np.float32,
584
526
  )
585
527
 
586
- ds = boundary_forcing_with_bgc_from_climatology.ds["physics"]
528
+ ds = boundary_forcing_with_bgc_from_climatology.ds["physics"].compute()
587
529
  ds_bgc = boundary_forcing_with_bgc_from_climatology.ds["bgc"]
588
530
 
589
531
  # Check the values in the dataset
@@ -616,14 +558,24 @@ def test_boundary_forcing_data_consistency_plot_save(
616
558
  assert np.allclose(ds_bgc["ALK_north"].values, expected_alk_north)
617
559
  assert np.allclose(ds_bgc["ALK_west"].values, expected_alk_west)
618
560
 
619
- boundary_forcing_with_bgc_from_climatology.plot(varname="temp_south")
620
- boundary_forcing_with_bgc_from_climatology.plot(varname="temp_east")
621
- boundary_forcing_with_bgc_from_climatology.plot(varname="temp_north")
622
- boundary_forcing_with_bgc_from_climatology.plot(varname="temp_west")
561
+ boundary_forcing_with_bgc_from_climatology.plot(
562
+ varname="temp_south", layer_contours=True
563
+ )
564
+ boundary_forcing_with_bgc_from_climatology.plot(
565
+ varname="temp_east", layer_contours=True
566
+ )
567
+ boundary_forcing_with_bgc_from_climatology.plot(
568
+ varname="temp_north", layer_contours=True
569
+ )
570
+ boundary_forcing_with_bgc_from_climatology.plot(
571
+ varname="temp_west", layer_contours=True
572
+ )
623
573
  boundary_forcing_with_bgc_from_climatology.plot(varname="zeta_south")
624
574
  boundary_forcing_with_bgc_from_climatology.plot(varname="zeta_east")
625
575
  boundary_forcing_with_bgc_from_climatology.plot(varname="zeta_north")
626
576
  boundary_forcing_with_bgc_from_climatology.plot(varname="zeta_west")
577
+ boundary_forcing_with_bgc_from_climatology.plot(varname="vbar_north")
578
+ boundary_forcing_with_bgc_from_climatology.plot(varname="ubar_west")
627
579
  boundary_forcing_with_bgc_from_climatology.plot(varname="ALK_south")
628
580
  boundary_forcing_with_bgc_from_climatology.plot(varname="ALK_east")
629
581
  boundary_forcing_with_bgc_from_climatology.plot(varname="ALK_north")