cdms2.axis

axisMatches(axis, specification)[source]

Axis Matches

Parameters
axisSee note below
specificationsSee note below
Returns
1 or 0 depending on whether axis matches the specification.
Notes
Specification must be one of:
  1. a string representing an axis id or one of the keywords time,

    fctau0, latitude or lat, longitude or lon, or lev or level.

  2. Axis may be surrounded with parentheses or spaces.
    • We first attempt to match the axis id and the specification.

    • Keywords try to match using isTime, isLatitude, etc.

    • Comparisons to keywords and axis ids is case-insensitive.

  3. a function that takes an axis as an argument and returns a value.
    • if the value returned is true, the axis matches.

  4. an axis object; will match if it is the same object as axis.