argopy.stores.indexfilter_wmo

class indexfilter_wmo(WMO: list = [], CYC=None, **kwargs)[source]

Index filter based on WMO and/or CYCLE_NUMER

This is intended to be used by instances of an indexstore

Examples

# Create filters: filt = index_filter_wmo(WMO=13857) filt = index_filter_wmo(WMO=13857, CYC=np.arange(1,10)) filt = index_filter_wmo(WMO=[13857, 13858, 12], CYC=12) filt = index_filter_wmo(WMO=[13857, 13858, 12], CYC=[1, 12]) filt = index_filter_wmo(CYC=250) filt = index_filter_wmo()

# Filter name: print(filt.uri())

# Direct usage:
with open(“/Volumes/Data/ARGO/ar_index_global_prof.txt”, “r”) as f:

results = filt.run(f)

# With the indexstore:

indexstore(cache=1, index_file=”/Volumes/Data/ARGO/ar_index_global_prof.txt”).open_dataframe(filt)

__init__(WMO: list = [], CYC=None, **kwargs)[source]

Create Argo index filter for WMOs/CYCs

Parameters
WMOlist(int)

The list of WMOs to search

CYCint, np.array(int), list(int)

The cycle numbers to search for each WMO

Methods

__init__([WMO, CYC])

Create Argo index filter for WMOs/CYCs

run(index_file)

Run search on an Argo index file

uri()

Return a unique name for this filter instance

Attributes

sha

Unique filter hash string