Install
Install the last release with conda:
conda install -c conda-forge argopy
or pip:
pip install argopy
But since this is a young library in active development, use direct installation from this repo to benefit from the latest version:
pip install git+http://github.com/euroargodev/argopy.git@master
The argopy library is tested to work under most OS (Linux, Mac, Windows) and with python versions 3.7 and 3.8.
Usage
Fetching Argo Data
Import the data fetcher:
from argopy import DataFetcher as ArgoDataFetcher
and then, set it up to request data for a specific space/time domain:
argo_loader = ArgoDataFetcher().region([-85,-45,10.,20.,0,10.])
argo_loader = ArgoDataFetcher().region([-85,-45,10.,20.,0,1000.,'2012-01','2012-12'])
for profiles of a given float:
argo_loader = ArgoDataFetcher().profile(6902746, 34)
argo_loader = ArgoDataFetcher().profile(6902746, np.arange(12,45))
argo_loader = ArgoDataFetcher().profile(6902746, [1,12])
or for one or a collection of floats:
argo_loader = ArgoDataFetcher().float(6902746)
argo_loader = ArgoDataFetcher().float([6902746, 6902747, 6902757, 6902766])
Once your fetcher is initialized you can trigger fetch/load data like this:
ds = argo_loader.to_xarray() # or:
ds = argo_loader.load().data
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:
df = ArgoDataFetcher().profile(6902746, 34).load().data.to_dataframe()
or to export it to files:
ds = ArgoDataFetcher().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')
Fetching only Argo index
Argo index are returned as pandas dataframe. Index fetchers works similarly to data fetchers.
Load the Argo index fetcher:
from argopy import IndexFetcher as ArgoIndexFetcher
then, set it up to request index for a specific space/time domain:
index_loader = ArgoIndexFetcher().region([-85,-45,10.,20.])
index_loader = ArgoIndexFetcher().region([-85,-45,10.,20.,'2012-01','2014-12'])
or for one or a collection of floats:
index_loader = ArgoIndexFetcher().float(6902746)
index_loader = ArgoIndexFetcher().float([6902746, 6902747, 6902757, 6902766])
Once your fetcher is initialized you can trigger fetch/load index like this:
df = index_loader.to_dataframe() # or
df = index_loader.load().index
Note that like the data fetcher, the index fetcher can use different sources, a local copy of the GDAC ftp for instance:
index_fetcher = ArgoIndexFetcher(src='localftp', path_ftp='/path/to/your/argo/ftp/', index_file='ar_index_global_prof.txt')
Visualisation
For plottings methods, you'll need matplotlib and possibly cartopy and seaborn installed.
Argo Data and Index fetchers provide direct plotting methods, for instance:
ArgoDataFetcher().float([6902745, 6902746]).plot('trajectory')
See the documentation page for more examples.
Development roadmap
See milestone here: https://github.com/euroargodev/argopy/milestone/3
Metadata
Release files for argopy 0.1.10
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.10.tar.gz | 96.6 kB | Without provenance | Details for argopy-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argopy-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for argopy-0.1.10-py3-none-any.whl |
Total release size: 215.8 kB
Release files / argopy-0.1.10.tar.gz
| Download URL | argopy-0.1.10.tar.gz |
|---|---|
| Size | 96.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18cdffd9e1f5837f8ae5a50ea380ea9964dfaf3c1a0b31fe8f0b5c5cb8ef8da9
|
|
BLAKE2b-256 checksum How to use checksums |
98316b4c589fb0320a050edb665b3a06d3ef3768085382244db19a050cba4dcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / argopy-0.1.10-py3-none-any.whl
| Download URL | argopy-0.1.10-py3-none-any.whl |
|---|---|
| Size | 119.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36864b0884e6c0a610234f66405f13d172bb9fcf00e8e849fcbdce01a6889b4b
|
|
BLAKE2b-256 checksum How to use checksums |
2b502bdfcfa0d658869a193eae4170216ab3b2f1a192612ba9fe323edbaaa5c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for argopy 0.1.10
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.