Argo data python library
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 and play with
argopy before you even install it (thanks Pangeo).
Install
Since this is a library in active development, use direct install from this repo to benefit from the last 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()
Two Argo data fetchers are available.
- The Ifremer erddap (recommended, but requires internet connection):
argo_loader = ArgoDataFetcher(backend='erddap') ds = argo_loader.profile(6902746, 34).to_xarray()
- your own local copy of the GDAC ftp (offline access possible, but more limited than the erddap).
argo_loader = ArgoDataFetcher(backend='localftp', path_ftp='/path/to/your/copy/of/Argo/ftp/dac') ds = argo_loader.float(6902746).to_xarray()
Data manipulation
Data are returned as a collection of measurements.
If you want to convert them into a collection of profiles, you can use the xarray accessor named argo:
from argopy import DataFetcher as ArgoDataFetcher
ds = ArgoDataFetcher().float(5903248).to_xarray() # Dimensions: (N_POINTS: 25656)
ds = ds.argo.point2profile() # Dimensions: (N_LEVELS: 71, N_PROF: 368)
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')
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 (ongoing work here)
- the argovis dataset (help wanted here)
- 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| argopy-0.1.1.tar.gz | 26.0 kB | Without provenance | Details for argopy-0.1.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argopy-0.1.1-py3.6.egg | Legacy Egg format | - | - | Details for argopy-0.1.1-py3.6.egg |
| argopy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for argopy-0.1.1-py3-none-any.whl |
Total release size: 94.2 kB
Release files / argopy-0.1.1.tar.gz
| Download URL | argopy-0.1.1.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e76e83adfe4f5da89827d19cac4852a95ddd9750185bdcf2f74b97504822d4d
|
|
BLAKE2b-256 checksum How to use checksums |
580a683bf651a8b5926984a5d4ee7b6f596acf0cd5fdf78ffe781d9123a0496a
|
| 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.1-py3.6.egg
| Download URL | argopy-0.1.1-py3.6.egg |
|---|---|
| Size | 31.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
1b59b87863c25ee659e6b07d27c0978086f57b4ecb5829bbe14e0dae625ec9fb
|
|
BLAKE2b-256 checksum How to use checksums |
df04ad2c89972772baf4f35a619763825d500d93d49d73830dbc9ec5c1bf7d82
|
| 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.1-py3-none-any.whl
| Download URL | argopy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12d182bf545ce7a12985ef2cb7df88e8ece51708ade9998ebbf37342f2dc3b35
|
|
BLAKE2b-256 checksum How to use checksums |
92adf4af62f938736b48dc64341634b3fc2721dbb80acab9282697f22ae1f211
|
| 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.1
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.