Skip to main content

argopy logo Argo data python library

Documentation Status build codecov Requirements Status

argopy is a python library that aims to ease Argo data access, visualisation and manipulation for regular users as well as Argo experts and operators.

Several python packages exist: we are currently in the process of analysing how to merge these libraries toward a single powerfull tool.
List your tool here !

Click here to badge and play with argopy before you even install it (thanks Pangeo).

Install

Install the last release with pip:

pip install argopy

But since this is a young library in active development, use direct install from this repo to benefit from the lastest version:

pip install git+http://github.com/euroargodev/argopy.git@master

The argopy library should work under all OS (Linux, Mac and Windows) and with python versions 3.6, 3.7 and 3.8.

Usage

Fetching Argo Data

Init the default data fetcher like:

from argopy import DataFetcher as ArgoDataFetcher
argo_loader = ArgoDataFetcher()

and then, request data for a specific space/time domain:

ds = argo_loader.region([-85,-45,10.,20.,0,10.]).to_xarray()
ds = argo_loader.region([-85,-45,10.,20.,0,1000.,'2012-01','2012-12']).to_xarray()

for profiles of a given float:

ds = argo_loader.profile(6902746, 34).to_xarray()
ds = argo_loader.profile(6902746, np.arange(12,45)).to_xarray()
ds = argo_loader.profile(6902746, [1,12]).to_xarray()

or for one or a collection of floats:

ds = argo_loader.float(6902746).to_xarray()
ds = argo_loader.float([6902746, 6902747, 6902757, 6902766]).to_xarray()

By default fetched data are returned in memory as xarray.DataSet. From there, it is easy to convert it to other formats like a Pandas dataframe:

ds = ArgoDataFetcher().profile(6902746, 34).to_xarray()
df = ds.to_dataframe()

or to export it to files:

ds = argo_loader.region([-85,-45,10.,20.,0,100.]).to_xarray()
ds.to_netcdf('my_selection.nc')
# or by profiles:
ds.argo.point2profile().to_netcdf('my_selection.nc')

Argo Index Fetcher

Index object is returned as a pandas dataframe.

Init the fetcher:

    from argopy import IndexFetcher as ArgoIndexFetcher

    index_loader = ArgoIndexFetcher()
    index_loader = ArgoIndexFetcher(backend='erddap')    
    #Local ftp backend 
    #index_loader = ArgoIndexFetcher(backend='localftp',path_ftp='/path/to/your/argo/ftp/',index_file='ar_index_global_prof.txt')

and then, set the index request index for a domain:

    idx=index_loader.region([-85,-45,10.,20.])
    idx=index_loader.region([-85,-45,10.,20.,'2012-01','2014-12'])

or for a collection of floats:

    idx=index_loader.float(6902746)
    idx=index_loader.float([6902746, 6902747, 6902757, 6902766])   

then you can see you index as a pandas dataframe or a xarray dataset :

    idx.to_dataframe()
    idx.to_xarray()

For plottings methods, you'll need matplotlib, cartopy and seaborn installed (they're not in requirements).
For plotting the map of your query :

    idx.plot('trajectory)    

index_traj

For plotting the distribution of DAC or profiler type of the indexed profiles :

    idx.plot('dac')    
    idx.plot('profiler')`

dac

Development roadmap

We aim to provide high level helper methods to load Argo data and meta-data from:

  • Ifremer erddap
  • local copy of the GDAC ftp folder
  • Index files
  • any other usefull access point to Argo data ?

We also aim to provide high level helper methods to visualise and plot Argo data and meta-data:

  • Map with trajectories
  • Waterfall plots
  • T/S diagram
  • etc !

Metadata

Release files for argopy 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argopy 0.1.3
File Size Uploaded Provenance Actions
argopy-0.1.3.tar.gz 37.1 kB Without provenance Details for argopy-0.1.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for argopy 0.1.3
File Interpreter ABI Platform Actions
argopy-0.1.3-py3.6.egg Legacy Egg format - - Details for argopy-0.1.3-py3.6.egg
argopy-0.1.3-py3-none-any.whl Python 3 none any Details for argopy-0.1.3-py3-none-any.whl

Total release size: 134.2 kB

Release files / argopy-0.1.3.tar.gz

Download URL argopy-0.1.3.tar.gz
Size 37.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f004f555ad4cae5ea40a27b7821eb793966a535b69396acf8003b53178104265
BLAKE2b-256 checksum
How to use checksums
5f78c46c9bafa4cb6d4fc094da1b762c2b70a402912fb4ec4b0e3cb92baf79b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

Release files / argopy-0.1.3-py3.6.egg

Download URL argopy-0.1.3-py3.6.egg
Size 46.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
7f7820faedd16012f94c74dbeaa7030b1176ecaff31848702b084145fbde0496
BLAKE2b-256 checksum
How to use checksums
87c9dd7579387b8ea0b4c80d12cad1d1d8c6a9a8cdca3c09a25761a9a596b184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

Release files / argopy-0.1.3-py3-none-any.whl

Download URL argopy-0.1.3-py3-none-any.whl
Size 51.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ba81f97c6616a729ac75cf1f3237f12c0833db9ca7a42683b39696d1dd21e49
BLAKE2b-256 checksum
How to use checksums
a8cab571acb8825c1f88fadc966747bce0dff99813a7c3c2f47f3c2a58aa82b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

Security for argopy 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page