xoa
v0.3.0

Getting Started

  • Installation
  • Configuration

User Guide

  • Using the modules
  • Practical examples
  • Commandline interface

Reference

  • API Reference
    • xoa
    • xoa.accessors
    • xoa.cf
      • xoa.cf.are_similar
      • xoa.cf.assign_cf_specs
      • xoa.cf.get_cf_specs
      • xoa.cf.get_cf_specs_encoding
      • xoa.cf.get_cf_specs_from_encoding
      • xoa.cf.get_cf_specs_from_name
      • xoa.cf.get_cf_specs_matching_score
      • xoa.cf.get_default_cf_specs
      • xoa.cf.get_matching_item_specs
      • xoa.cf.get_registered_cf_specs
      • xoa.cf.infer_cf_specs
      • xoa.cf.infer_coords
      • xoa.cf.is_registered_cf_specs
      • xoa.cf.register_cf_specs
      • xoa.cf.reset_cache
      • xoa.cf.search_similar
      • xoa.cf.show_cache
      • xoa.cf.CFCoordSpecs
      • xoa.cf.CFSpecs
      • xoa.cf.CFVarSpecs
        • xoa.cf.CFVarSpecs.format_dataarray
        • xoa.cf.CFVarSpecs.get
        • xoa.cf.CFVarSpecs.get_attrs
        • xoa.cf.CFVarSpecs.get_name
        • xoa.cf.CFVarSpecs.get_specs
        • xoa.cf.CFVarSpecs.items
        • xoa.cf.CFVarSpecs.keys
        • xoa.cf.CFVarSpecs.match
        • xoa.cf.CFVarSpecs.rename_dataarray
        • xoa.cf.CFVarSpecs.search
        • xoa.cf.CFVarSpecs.set_specs
        • xoa.cf.CFVarSpecs.set_specs_from_cfg
        • xoa.cf.CFVarSpecs.attrs_exclude
        • xoa.cf.CFVarSpecs.attrs_first
        • xoa.cf.CFVarSpecs.category
        • xoa.cf.CFVarSpecs.dims
        • xoa.cf.CFVarSpecs.names
        • xoa.cf.CFVarSpecs.sglocator
      • xoa.cf.SGLocator
      • xoa.cf.set_cf_specs
      • xoa.cf.XoaCFError
    • xoa.cfgm
    • xoa.cli
    • xoa.color
    • xoa.coords
    • xoa.dyn
    • xoa.filter
    • xoa.geo
    • xoa.grid
    • xoa.interp
    • xoa.misc
    • xoa.plot
    • xoa.regrid
    • xoa.sigma
  • What’s new
  • Development roadmap
  • Appendices
xoa
  • »
  • API Reference »
  • xoa.cf »
  • xoa.cf.CFVarSpecs »
  • xoa.cf.CFVarSpecs.search
  • Edit on GitHub

xoa.cf.CFVarSpecs.search¶

CFVarSpecs.search(dsa, name=None, loc='any', get='obj', single=True, errors='raise')¶

Search for a data_var or coord that maches given or any specs

Parameters
  • dsa (DataArray or Dataset) –

  • name (str, dict) – A CF name. If not provided, all CF names are scaned.

  • loc (str, {"any", None}, {"", False}) –

    • str: one of these locations

    • None or “any”: any

    • False or ‘””: no location

  • get ({"obj", "name"}) – When found, get the object found or its name.

  • single (bool) – If True, return the first item found or None. If False, return a possible empty list of found items. A warning is emitted when set to True and multiple item are found.

  • errors ({'ignore', 'warn', 'raise'}) –

    In case of errors

    • ignore: silently ignore

    • warn: emit a warning

    • raise: raise an exception

Returns

None or str or object

Next Previous

© Copyright 2020-2021, Shom. Revision d71b04c8.

Built with Sphinx using a theme provided by Read the Docs.