argopy.stores.argo_index_pa.indexstore_pyarrow#
- class indexstore_pyarrow(**kwargs)[source]#
Argo GDAC index store using
pyarrow.Tableas internal storage format.With this store, index and search results are saved as pyarrow/parquet files in cache
- __init__(**kwargs)[source]#
Create an Argo index file store
- Parameters:
host (str, default:
https://data-argo.ifremer.fr) –Local or remote (ftp, https or s3) path to a dac folder (GDAC structure compliant). This takes values like:
https://data-argo.ifremer.frftp://ftp.ifremer.fr/ifremer/argos3://argo-gdac-sandbox/pub/idxa local absolute path
You can also use the following keywords:
http/https,ftpands3/aws, respectively.index_file (str, default:
ar_index_global_prof.txt) –Name of the csv-like text file with the index.
Possible values are standard file name:
ar_index_global_prof.txt,argo_bio-profile_index.txtorargo_synthetic-profile_index.txt.You can also use the following keywords:
core,bgc-b,bgc-s.convention (str, default: None) –
- Set the expected format convention of the index file. This is useful when trying to load index file with custom name. If set to
None, we’ll try to infer the convention from theindex_filevalue. Possible values:
ar_index_global_prof,argo_bio-profile_index, orargo_synthetic-profile_index.
You can also use the following keywords:
core,bgc-s,bgc-b.- Set the expected format convention of the index file. This is useful when trying to load index file with custom name. If set to
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__(**kwargs)Create an Argo index file store
cachepath(path)Return path to a cached file
clear_cache()Clear cache registry and files associated with this store instance.
load([nrows, force])Load an Argo-index file content
read_params([index])Return list of unique PARAMETERs in index or search results
read_wmo([index])Return list of unique WMOs in search results
records_per_wmo([index])Return the number of records per unique WMOs in search results
run([nrows])Filter index with search criteria
search_cyc(CYCs[, nrows])Search index for cycle numbers
search_lat_lon(BOX[, nrows])Search index for a rectangular latitude/longitude domain
search_lat_lon_tim(BOX[, nrows])Search index for a rectangular latitude/longitude domain and time range
search_parameter_data_mode(PARAMs[, nrows, ...])Search index for profiles with a parameter in a specific data mode
search_params(PARAMs[, nrows, logical])Search index for one or a list of parameters
search_tim(BOX[, nrows])Search index for a time range
search_wmo(WMOs[, nrows])Search index for floats defined by their WMO
search_wmo_cyc(WMOs, CYCs[, nrows])Search index for floats defined by their WMO and specific cycle numbers
to_dataframe([nrows, index, completed])Return index or search results as
pandas.DataFrameto_indexfile(file)Save search results on file, following the Argo standard index formats
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
cnameReturn the search constraint(s) as a pretty formatted string
conventionConvention of the index (standard csv file name)
convention_supportedList of supported conventions
convention_titleLong name for the index convention
extStorage file extension
index_pathsearch_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