argopy.ArgoFloat#
- class ArgoFloat(*args, **kwargs)[source]#
Argo GDAC float store
This store makes it easy to load/read/visualize data for a given float from any GDAC location and netcdf files
Examples
Listing 19 A float store is instantiated with float WMO number and a host (any access path: local, http, ftp or s3) where float files are to be found.#from argopy import ArgoFloat af = ArgoFloat(WMO) # Use argopy 'gdac' option by default af = ArgoFloat(WMO, host='/home/ref-argo/gdac') # Use your local GDAC copy af = ArgoFloat(WMO, host='http') # Shortcut for https://data-argo.ifremer.fr af = ArgoFloat(WMO, host='ftp') # shortcut for ftp://ftp.ifremer.fr/ifremer/argo af = ArgoFloat(WMO, host='s3') # Shortcut for s3://argo-gdac-sandbox/pub
af.ls_dataset() # Return a dictionary with all available datasets for this float ds = af.open_dataset('prof') # Use keys from the available datasets dictionary ds = af.open_dataset('meta') ds = af.open_dataset('tech') ds = af.open_dataset('Rtraj') ds = af.open_dataset('Sprof') ds = af.open_dataset('Sprof', netCDF4=True) # Return a netCDF4 Dataset instead of an xarray
af.N_CYCLES # Number of cycles (estimated) af.path # root path for all float datasets af.dac # name of the DAC this float belongs to af.metadata # a dictionary with all available metadata for this file (from netcdf or fleetmonitoring API) af.ls() # list af.path folder content
af.lsprofiles() # list float "profiles" folder content af.describe_profiles() # Pandas DataFrame describing all available float profile files
af.plot.trajectory() af.plot.trajectory(figsize=(18,18), padding=[1, 5]) af.plot.map('TEMP', pres=450, cmap='Spectral_r') af.plot.map('DATA_MODE') af.plot.scatter('TEMP') af.plot.scatter('PSAL_QC') af.plot.scatter('DOXY', ds='Sprof') af.plot.scatter('MEASUREMENT_CODE', ds='Rtraj')
- __init__(*args, **kwargs)[source]#
Create an Argo float store
- Parameters:
wmo (int or str) – The float WMO number. It will be validated against the Argo convention and raise an
ValueErrorif not compliant.host (str, optional, default: OPTIONS['gdac']) –
Local or remote (http, ftp or s3) path where a
dacfolder is to be found (compliant with GDAC structure).This parameter takes values like:
a local absolute path
https://data-argo.ifremer.fr, shortcut withhttporhttpshttps://usgodae.org/pub/outgoing/argo, shortcut withus-httporus-httpsftp://ftp.ifremer.fr/ifremer/argo, shortcut withftps3://argo-gdac-sandbox/pub, shortcut withs3oraws
aux (bool, default = False) – Should we include dataset from the auxiliary data folder. The ‘aux’ folder is expected to be at the same path level as the ‘dac’ folder on the GDAC host.
cache (bool, optional, default: False) – Use cache or not.
cachedir (str, optional, default: OPTIONS['cachedir']) – Folder where to store cached files.
timeout (int, optional, default: OPTIONS['api_timeout']) – Time out in seconds to connect to a remote host (ftp or http).
Methods
__init__(*args, **kwargs)Create an Argo float store
dataset([name])Return a
pandas.DataFramedescribing profile filesload_dac()Load the DAC short name for this float
load_index()Load the Argo full index in memory and trigger search for this float
load_metadata()Load float metadata from Euro-Argo fleet-monitoring API
load_metadata_from_meta_file()Method to load float meta-data from the netcdf file
load_technicaldata()Load float technical data from Euro-Argo fleet-monitoring API
ls()Return the list of files in float path
List all available dataset for this float in a dictionary
Return the list of files in float profiles path
open_dataset([name, cast])Open and decode a dataset
Attributes
Number of cycles
api_pointEuro-Argo fleet-monitoring API points
Name of the DAC responsible for this float
host_protocolProtocol of the GDAC host
host_sepHost path separator
A dictionary of float meta-data
Return root path for all float datasets
technicaldataA dictionary holding float technical data