A python library for Argo data beginners and experts
Project description
Argo data python library
argopy
is a python library that aims to easy 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 merging and structuring these libraries to have a single powerfull tool.
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
Examples
Examples of data fetching, manipulation and visualisation are available on the erddap examples repository.
You can run and test live example notebooks on Binder (thanks Pangeo) here:
Usage
The primary data model used to manipulate Argo data is xarray.
Argo Data Fetcher
API usage:
from argopy import DataFetcher as ArgoDataFetcher
argo_loader = ArgoDataFetcher()
argo_loader = ArgoDataFetcher(backend='erddap')
argo_loader = ArgoDataFetcher(cachedir='tmp')
argo_loader.region([-85,-45,10.,20.,0,1000.]).to_xarray()
argo_loader.region([-85,-45,10.,20.,0,1000.,'2012-01','2014-12']).to_xarray()
argo_loader.profile(6902746, 34).to_xarray()
argo_loader.profile(6902746, np.arange(12,45)).to_xarray()
argo_loader.profile(6902746, [1,12]).to_xarray()
argo_loader.float(6902746).to_xarray()
argo_loader.float([6902746, 6902747, 6902757, 6902766]).to_xarray()
argo_loader.float([6902746, 6902747, 6902757, 6902766], CYC=1).to_xarray()
Devlopment roadmap:
We aim to provide high level helper methods to load Argo data from:
- Ifremer erddap
- local copy of the GDAC ftp folder (help wanted)
- the argovis dataset (help wanted)
- any other usefull access point to Argo data ?
At this point data are fetched in memory as xarray.DataSet. From there, it is easy to convert it to other formats like a Pandas dataframe:
ds = argo_loader.profile(6902746, 34).to_xarray()
df = ds.to_dataframe()
and to export it to files:
ds = argo_loader.region([-85,-45,10.,20.,0,1000.]).to_xarray()
ds.to_netcdf('my_selection.nc')
# or by profiles:
ds.argo.point2profile().to_netcdf('my_selection.nc')
Argo data manipulation with xarray
The argopy
library provides an xarray accessor named argo
to help manipulate and analyse data.
Example: Convert a collection of points to a collections of profiles:
from argopy import DataFetcher as ArgoDataFetcher
ds = ArgoDataFetcher(ds='bgc').float(5903248).to_xarray()
ds = ds.argo.point2profile()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file argopy-0.1.0.tar.gz
.
File metadata
- Download URL: argopy-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc8c29a451c6f643d51979cf68ec98d611f359e7c000040636f5f635406b1235 |
|
MD5 | 623e98d44a4008191e295b72aa635309 |
|
BLAKE2b-256 | 5faf7ac2272680532168f63df13b295f7fae5bc42adaeb89211c2924c57da7aa |
File details
Details for the file argopy-0.1.0-py3.6.egg
.
File metadata
- Download URL: argopy-0.1.0-py3.6.egg
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 047360d46d09adc2748342f7218fac63393eb37cd44a6c9ff069a40219bd53ea |
|
MD5 | bf581aa896122630694ac86e2ec3b2c5 |
|
BLAKE2b-256 | 418c249ef79b6c352cd7bf8964452cd82d4c2a8c04d198180d69ba114f78880a |
File details
Details for the file argopy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: argopy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83cc3fc23c94022e3fb38615fe762178b89c637cf651da8d5311994366ce8b12 |
|
MD5 | e0834573b5e769a5ddb67ae7b420a56d |
|
BLAKE2b-256 | 6e5bbb15efe6a6f0e041ab8b4ceae163598e60e5f175805365579fc48c1005a0 |