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 = indexfilter_wmo(WMO=13857) filt = indexfilter_wmo(WMO=13857, CYC=np.arange(1,10)) filt = indexfilter_wmo(WMO=[13857, 13858, 12], CYC=12) filt = indexfilter_wmo(WMO=[13857, 13858, 12], CYC=[1, 12]) filt = indexfilter_wmo(CYC=250) filt = indexfilter_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”).read_csv(filt)

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

Create Argo index filter for WMOs/CYCs

Parameters
  • WMO (list(int)) – The list of WMOs to search

  • CYC (int, np.array(int), list(int)) – The cycle numbers to search for each WMO

Methods

__init__([WMO, CYC])

Create Argo index filter for WMOs/CYCs

define_search_this(cyc)

Return a search function for a given cycle number

run(index_file)

Run search on an Argo index file

search_any_wmo_cyc(index, cyc)

Search for a WMO in an argo index file

search_null(index)

Perform a null search, ie return the full argo index file

search_one_wmo(index, wmo)

Search for a WMO in an argo index file

search_one_wmo_cyc(index, wmo, cyc)

Search for a WMO and CYC in an argo index file

Attributes

sha

Unique filter hash string

uri

Return a unique name for this filter instance