Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions clouddrift/adapters/gdp/gdp1h.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,8 @@ def to_raggedarray(
n_random_id : list[int], optional
Randomly select n_random_id drifter NetCDF files
url : str
URL from which to download the data (Default: GDP_DATA_URL).
Alternatively, it can be GDP_DATA_URL_EXPERIMENTAL.
URL from which to download the data (Default: GDP_DATA_URL)
Alternatively, it can be GDP_DATA_URL_EXPERIMENTAL
tmp_path : str, optional
Path to the directory where the individual NetCDF files are stored
(default varies depending on operating system; /tmp/clouddrift/gdp on Linux)
Expand All @@ -567,7 +567,7 @@ def to_raggedarray(
Invoke `to_raggedarray` without any arguments to download all drifter data
from the 2.01 GDP feed:

>>> from clouddrift.adapters.gdp1h import to_raggedarray
>>> from clouddrift.adapters.gdp.gdp1h import to_raggedarray
>>> ra = to_raggedarray()

To download a random sample of 100 drifters, for example for development
Expand All @@ -579,10 +579,9 @@ def to_raggedarray(

>>> ra = to_raggedarray(drifter_ids=[44136, 54680, 83463])

To download the experimental 2.01 GDP feed, use the `url` argument to
To download the experimental 3.00 GDP data, use the `url` argument to
specify the experimental feed URL:

>>> from clouddrift.adapters.gdp1h import GDP_DATA_URL_EXPERIMENTAL, to_raggedarray
>>> from clouddrift.adapters.gdp.gdp1h import GDP_DATA_URL_EXPERIMENTAL, to_raggedarray
>>> ra = to_raggedarray(url=GDP_DATA_URL_EXPERIMENTAL)

Finally, `to_raggedarray` returns a `RaggedArray` instance which provides
Expand Down
8 changes: 2 additions & 6 deletions clouddrift/adapters/gdp/gdp6h.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from clouddrift.adapters.utils import download_with_progress, standard_retry_protocol
from clouddrift.raggedarray import RaggedArray

GDP_VERSION = "September 2023"
GDP_VERSION = "July 2024"

GDP_DATA_URL = "https://www.aoml.noaa.gov/ftp/pub/phod/buoydata/6h"
GDP_TMP_PATH = os.path.join(tempfile.gettempdir(), "clouddrift", "gdp6h")
Expand Down Expand Up @@ -196,10 +196,6 @@ def preprocess(index: int, **kwargs) -> xr.Dataset:
)

# convert attributes to variable
ds["location_type"] = (
("traj"),
[False if ds.attrs.get("location_type") == "Argos" else True],
) # 0 for Argos, 1 for GPS
ds["DeployingShip"] = (("traj"), gdp.cut_str(ds.attrs.get("DeployingShip", ""), 20))
ds["DeploymentStatus"] = (
("traj"),
Expand Down Expand Up @@ -480,7 +476,7 @@ def to_raggedarray(
Invoke `to_raggedarray` without any arguments to download all drifter data
from the 6-hourly GDP feed:

>>> from clouddrift.adapters.gdp6h import to_raggedarray
>>> from clouddrift.adapters.gdp.gdp6h import to_raggedarray
>>> ra = to_raggedarray()

To download a random sample of 100 drifters, for example for development
Expand Down
Loading