Skip to main content

A python library for Argo data beginners and experts

Project description

argopy logo 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
Documentation JOSS
Documentation
Gitter
Usage License Python version
pypi dwn conda dwn
Release PyPI Conda
Development Github Action Status Documentation Status codecov
lifecycle
Data resources Erddap status Argovis status
Profile count
Statuspage

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 latest 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

badge

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(src='erddap')    
    #Local ftp backend 
    #index_loader = ArgoIndexFetcher(src='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

Our next big steps:

  • To provide Bio-geochemical variables

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 (local and online)
  • Argovis
  • Online GDAC ftp
  • any other useful 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 !

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argopy-0.1.8.tar.gz (81.3 kB view details)

Uploaded Source

Built Distribution

argopy-0.1.8-py3-none-any.whl (102.1 kB view details)

Uploaded Python 3

File details

Details for the file argopy-0.1.8.tar.gz.

File metadata

  • Download URL: argopy-0.1.8.tar.gz
  • Upload date:
  • Size: 81.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for argopy-0.1.8.tar.gz
Algorithm Hash digest
SHA256 5af0a2cc0805e3e7c599b3b4e7cded86c39da06eafa0270fb410bf7fa06e08ff
MD5 b913b229af99a0717f5c15a42118b4b2
BLAKE2b-256 f8d92359556fe6174cfcdcff8011edd3334b551a0762d29e36145a80851df001

See more details on using hashes here.

File details

Details for the file argopy-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: argopy-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 102.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for argopy-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 86dfffcbb562ddf498061550f291db4c88919c3a68f11e9bcbe59646bd8e1a0e
MD5 feb3822a2d96c8dad0bf3ed1f8cae3a1
BLAKE2b-256 14d619de50fa97eced3827dbaa7b5981b4f580a3c0acd93a50c1241bf8d47bc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page