|
1 | 1 | import functools |
2 | | -import warnings |
3 | 2 | from enum import IntEnum |
4 | 3 |
|
5 | 4 | import numpy as np |
6 | 5 | import numpy.typing as npt |
7 | 6 |
|
8 | 7 | from parcels._typing import Mesh, UpdateStatus, assert_valid_mesh |
9 | 8 | from parcels.tools.converters import TimeConverter |
10 | | -from parcels.tools.warnings import FieldSetWarning |
11 | 9 |
|
12 | 10 | __all__ = [ |
13 | 11 | "CurvilinearSGrid", |
@@ -68,7 +66,6 @@ def __init__( |
68 | 66 | assert_valid_mesh(mesh) |
69 | 67 | self._mesh = mesh |
70 | 68 | self._zonal_periodic = False |
71 | | - self._lat_flipped = False |
72 | 69 | self._defer_load = False |
73 | 70 | self._lonlat_minmax = np.array( |
74 | 71 | [np.nanmin(lon), np.nanmax(lon), np.nanmin(lat), np.nanmax(lat)], dtype=np.float32 |
@@ -251,16 +248,6 @@ def __init__(self, lon, lat, time, time_origin, mesh: Mesh): |
251 | 248 | super().__init__(lon, lat, time, time_origin, mesh) |
252 | 249 | self.tdim = self.time.size |
253 | 250 |
|
254 | | - if self.ydim > 1 and self.lat[-1] < self.lat[0]: |
255 | | - self._lat = np.flip(self.lat, axis=0) |
256 | | - self._lat_flipped = True |
257 | | - warnings.warn( |
258 | | - "Flipping lat data from North-South to South-North. " |
259 | | - "Note that this may lead to wrong sign for meridional velocity, so tread very carefully", |
260 | | - FieldSetWarning, |
261 | | - stacklevel=2, |
262 | | - ) |
263 | | - |
264 | 251 | @property |
265 | 252 | def xdim(self): |
266 | 253 | return self.lon.size |
@@ -379,8 +366,6 @@ def __init__( |
379 | 366 | ), "depth dimension has the wrong format. It should be [zdim, ydim, xdim]" |
380 | 367 | if not self.depth.dtype == np.float32: |
381 | 368 | self._depth = self.depth.astype(np.float32) |
382 | | - if self._lat_flipped: |
383 | | - self._depth = np.flip(self.depth, axis=-2) |
384 | 369 |
|
385 | 370 | @property |
386 | 371 | def zdim(self): |
|
0 commit comments