Skip to content

Commit

Permalink
Update data_sources.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Sep 26, 2023
1 parent 79f4b40 commit 369f5fb
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions docs/user-guide/fetching-argo-data/data_sources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,37 +181,45 @@ Fetched data and variables
| This will depend on the last update of each data sources and of your
local data.
Let's retrieve one float data from a local sample of the GDAC ftp (a sample GDAC ftp is downloaded automatically with the method :meth:`argopy.tutorial.open_dataset`):
.. tabs::

.. ipython:: python
:okwarning:
.. tab:: **GDAC** ftp

# Download ftp sample and get the ftp local path:
ftproot = argopy.tutorial.open_dataset('gdac')[0]
# then fetch data:
with argopy.set_options(src='gdac', ftp=ftproot):
ds = ArgoDataFetcher().float(1900857).load().data
print(ds)
Let's retrieve one float data from a local sample of the GDAC ftp (a sample GDAC ftp is downloaded automatically with the method :meth:`argopy.tutorial.open_dataset`):

Let’s now retrieve the latest data for this float from the ``erddap`` and ``argovis`` sources:
.. ipython:: python
:okwarning:
.. ipython:: python
:okwarning:
# Download ftp sample and get the ftp local path:
ftproot = argopy.tutorial.open_dataset('gdac')[0]
with argopy.set_options(src='erddap'):
ds = ArgoDataFetcher().float(1900857).load().data
print(ds)
# then fetch data:
with argopy.set_options(src='gdac', ftp=ftproot):
ds = ArgoDataFetcher().float(1900857).load().data
print(ds)
.. ipython:: python
:okwarning:
.. tab:: **erddap**

Let’s now retrieve the latest data for this float from the ``erddap``:

.. ipython:: python
:okwarning:
with argopy.set_options(src='erddap'):
ds = ArgoDataFetcher().float(1900857).load().data
print(ds)
.. tab:: **argovis**

And with ``argovis``:

.. ipython:: python
:okwarning:
with argopy.set_options(src='argovis'):
ds = ArgoDataFetcher().float(1900857).load().data
print(ds)
with argopy.set_options(src='argovis'):
ds = ArgoDataFetcher().float(1900857).load().data
print(ds)
We can see some minor differences between ``gdac``/``erddap`` vs the
``argovis`` response.
.. _api-status:

Expand Down

0 comments on commit 369f5fb

Please sign in to comment.