argopy.ArgoFloat#
- class ArgoFloat(*args, **kwargs)[source]#
Argo GDAC float store
This store makes it easy to load/read data for a given float from any GDAC location and netcdf files
Examples
Listing 14 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')
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
- __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
ValueError
if not compliant.host (str, optional, default: OPTIONS['gdac']) –
Local or remote (http, ftp or s3) path where a
dac
folder is to be found (compliant with GDAC structure).This parameter takes values like:
a local absolute path
https://data-argo.ifremer.fr
, shortcut withhttp
orhttps
https://usgodae.org/pub/outgoing/argo
, shortcut withus-http
orus-https
ftp://ftp.ifremer.fr/ifremer/argo
, shortcut withftp
s3://argo-gdac-sandbox/pub
, shortcut withs3
oraws
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
Return a
pandas.DataFrame
describing 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
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_point
Euro-Argo fleet-monitoring API points
Name of the DAC responsible for this float
host_protocol
Protocol of the GDAC host
host_sep
Host path separator
A dictionary of float meta-data
Return root path for all float datasets
technicaldata
A dictionary holding float technical data