diff --git a/clouddrift/adapters/andro.py b/clouddrift/adapters/andro.py index ec9781e2..7b2b7dd6 100644 --- a/clouddrift/adapters/andro.py +++ b/clouddrift/adapters/andro.py @@ -29,9 +29,9 @@ from clouddrift.adapters.utils import download_with_progress # order of the URLs is important -ANDRO_URL = "https://www.seanoe.org/data/00360/47077/data/91950.dat" +ANDRO_URL = "https://www.seanoe.org/data/00360/47077/data/109566.dat" ANDRO_TMP_PATH = os.path.join(tempfile.gettempdir(), "clouddrift", "andro") -ANDRO_VERSION = "2022-03-04" +ANDRO_VERSION = "2024-03-25" def to_xarray(tmp_path: str | None = None): @@ -325,7 +325,7 @@ def to_xarray(tmp_path: str | None = None): # global attributes attrs = { - "title": "ANDRO: An Argo-based deep displacement dataset", + "title": "ANDRO: An Argo-based deep displacement dataset (Quality controlled data)", "history": f"Dataset updated on {ANDRO_VERSION}", "date_created": datetime.now().isoformat(), "publisher_name": "SEANOE (SEA scieNtific Open data Edition)", diff --git a/clouddrift/datasets.py b/clouddrift/datasets.py index b91938ca..d26ed912 100644 --- a/clouddrift/datasets.py +++ b/clouddrift/datasets.py @@ -549,7 +549,7 @@ def yomaha(decode_times: bool = True) -> xr.Dataset: return _dataset_filecache("yomaha.nc", decode_times, adapters.yomaha.to_xarray) -def andro(decode_times: bool = False) -> xr.Dataset: +def andro(decode_times: bool = True) -> xr.Dataset: """Returns the ANDRO as a ragged array Xarray dataset. The function will first look for the ragged-array dataset on the local @@ -573,36 +573,36 @@ def andro(decode_times: bool = False) -> xr.Dataset: >>> from clouddrift.datasets import andro >>> ds = andro() >>> ds - - Dimensions: (obs: 1360753, traj: 9996) + Size: 110MB + Dimensions: (obs: 510630, traj: 3344) Coordinates: - time_d (obs) datetime64[ns] ... - time_s (obs) datetime64[ns] ... - time_lp (obs) datetime64[ns] ... - time_lc (obs) datetime64[ns] ... - id (traj) int64 ... + time_d (obs) datetime64[ns] 4MB ... + time_s (obs) datetime64[ns] 4MB ... + time_lp (obs) datetime64[ns] 4MB ... + time_lc (obs) datetime64[ns] 4MB ... + id (traj) float32 13kB ... Dimensions without coordinates: obs, traj Data variables: (12/33) - lon_d (obs) float64 ... - lat_d (obs) float64 ... - pres_d (obs) float32 ... - temp_d (obs) float32 ... - sal_d (obs) float32 ... - ve_d (obs) float32 ... + lon_d (obs) float64 4MB ... + lat_d (obs) float64 4MB ... + pres_d (obs) float32 2MB ... + temp_d (obs) float32 2MB ... + sal_d (obs) float32 2MB ... + ve_d (obs) float32 2MB ... ... ... - lon_lc (obs) float64 ... - lat_lc (obs) float64 ... - surf_fix (obs) int64 ... - cycle (obs) int64 ... - profile_id (obs) float32 ... - rowsize (traj) int64 ... + lon_lc (obs) float64 4MB ... + lat_lc (obs) float64 4MB ... + surf_fix (obs) float32 2MB ... + cycle (obs) float32 2MB ... + profile_id (obs) float32 2MB ... + rowsize (traj) int64 27kB ... Attributes: - title: ANDRO: An Argo-based deep displacement dataset - history: 2022-03-04 - date_created: 2023-12-08T00:52:00.937120 + title: ANDRO: An Argo-based deep displacement dataset (Quality ... + history: Dataset updated on 2024-03-25 + date_created: 2024-07-02T12:11:50.643492 publisher_name: SEANOE (SEA scieNtific Open data Edition) publisher_url: https://www.seanoe.org/data/00360/47077/ - license: freely available + license: Creative Commons Attribution 4.0 International License (... Reference --------- diff --git a/pyproject.toml b/pyproject.toml index 5db0d8a1..9019f985 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "clouddrift" -version = "0.38.1" +version = "0.39.0" authors = [ { name="Shane Elipot", email="selipot@miami.edu" }, diff --git a/tests/datasets_tests.py b/tests/datasets_tests.py index 14b05663..6d363989 100644 --- a/tests/datasets_tests.py +++ b/tests/datasets_tests.py @@ -49,7 +49,16 @@ def test_subsurface_floats_opens(self): def test_andro_opens(self): with datasets.andro() as ds: - self.assertTrue(ds) + self.assertTrue(ds is not None) + self.assertTrue(len(ds.variables) > 0) + self.assertTrue(len(ds["lon_d"]) > 0) + + self.assertTrue( + len(ds.lat_d[np.logical_or(ds.lat_d > 90, ds.lat_d < -90)]) == 0 + ) + self.assertTrue( + len(ds.lat_d[np.logical_or(ds.lon_d > 180, ds.lon_d < -180)]) == 0 + ) def test_yomaha_opens(self): with datasets.yomaha() as ds: