argopy.stores.index.spec.ArgoIndexStoreProto#
- class ArgoIndexStoreProto(host: str | None = None, index_file: str = 'ar_index_global_prof.txt', convention: str | None = None, cache: bool = False, cachedir: str = '', timeout: int = 0, **kwargs)[source]#
- __init__(host: str | None = None, index_file: str = 'ar_index_global_prof.txt', convention: str | None = None, cache: bool = False, cachedir: str = '', timeout: int = 0, **kwargs)[source]#
Create an Argo index store
- Parameters:
host (str, optional, default=OPTIONS["gdac"]) –
Local or remote (http, ftp or s3) path to a dac folder (compliant with GDAC structure).
This parameter takes values like:
httporhttpsforhttps://data-argo.ifremer.frus-httporus-httpsforhttps://usgodae.org/pub/outgoing/argoftpforftp://ftp.ifremer.fr/ifremer/argos3orawsfors3://argo-gdac-sandbox/pub/idxa local absolute path
index_file (str, default:
ar_index_global_prof.txt) –Name of the csv-like text file with the index.
This parameter takes values like:
coreorar_index_global_prof.txtbgc-borargo_bio-profile_index.txtbgc-sorargo_synthetic-profile_index.txtauxoretc/argo-index/argo_aux-profile_index.txtmetaorar_index_global_meta.txta local absolute path toward a file following an Argo index convention. When using a local file, you need to set the
conventionfollowed by the file.
convention (str, default: None) –
Set the expected format convention of the index file.
This is useful when trying to load an index file with a custom name. If set to
None, we’ll try to infer the convention from theindex_filevalue.This parameter takes values like:
coreorar_index_global_profbgc-borargo_bio-profile_indexbgc-sorargo_synthetic-profile_indexauxorargo_aux-profile_indexmetaorar_index_global_meta
cache (bool, default: False) – Use cache or not.
cachedir (str, default: OPTIONS['cachedir']) – Folder where to store cached files.
timeout (int, default: OPTIONS['api_timeout']) – Time out in seconds to connect to a remote host (ftp or http).
Methods
__init__([host, index_file, convention, ...])Create an Argo index store
cachepath(path)Return path to a cached file
clear_cache()Clear cache registry and files associated with this store instance.
copy([deep])Returns a copy of this
ArgoIndexinstanceiterfloats([index, chunksize])Iterate over unique Argo floats in the full index or search results
load([nrows, force])Load an Argo-index file content in memory
read_dac_wmo([index])Return a tuple of unique [DAC, WMO] pairs from the index or search results
read_domain()Read the space/time domain of the index
read_files([index])Return file paths listed in index or search results
read_params()Return list of unique PARAMETERs in index or search results
read_wmo()Return list of unique WMOs in index or search results
records_per_wmo()Return the number of records per unique WMOs in index or search results
run()Execute index search query (internal use)
search_cyc(CYCs[, nrows])Deprecated: this method is replaced by ArgoIndex().query.cyc()
search_lat_lon(BOX[, nrows])Deprecated: this method is replaced by
ArgoIndex().query.lon_lat()search_lat_lon_tim(BOX[, nrows])Deprecated: this method is replaced by
ArgoIndex().query.box()search_parameter_data_mode(PARAMs[, ...])Deprecated: this method is replaced by
ArgoIndex().query.parameter_data_mode()search_params(PARAMs[, logical, nrows])Deprecated: this method is replaced by
ArgoIndex().query.params()search_profiler_label(profiler_label[, nrows])Deprecated: this method is replaced by
ArgoIndex().query.profiler_label()search_profiler_type(profiler_type[, nrows])Deprecated: this method is replaced by
ArgoIndex().query.profiler_type()search_tim(BOX[, nrows])Deprecated: this method is replaced by ArgoIndex().query.date()
search_wmo(WMOs[, nrows])search_wmo_cyc(WMOs, CYCs[, nrows])Deprecated: this method is replaced by ArgoIndex().query.wmo_cyc()
to_dataframe([nrows, index, completed])Return index or search results as
pandas.DataFrameto_indexfile()Save search results on file, following the Argo standard index format
Attributes
N_FILESNumber of rows in search result or index if search not triggered
N_MATCHNumber of rows in search result
N_RECORDSNumber of rows in the full index
backendName of store backend (pandas or pyarrow)
cnameSearch query as a pretty formatted string
conventionConvention of the index (standard csv file name)
convention_columnsCSV file column names for the index convention
convention_supportedList of supported conventions
convention_titleLong name for the index convention
domainSpace/time domain of the index
extStorage file extension
filesFile paths listed in search results
files_full_indexFile paths listed in the index
index_pathAbsolute path to the index file
search_pathPath to search result uri
search_typeDictionary with search meta-data
sha_dfReturns a unique SHA for a cname/dataframe
sha_h5Returns a unique SHA for a cname/hdf5
sha_pqReturns a unique SHA for a cname/parquet
shapeShape of the index array
uriList of URI from search results
uri_full_indexList of URI from index