Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Metview's Python interface also provides a more object-oriented way of using the wrapper classes such as Fieldset. The following two snippets of code are equivalent:

FunctionObject method

# find the locations where t is > 310K

t = mv.retrieve(param = 't', grid = [1,1])
hot = t > 310
locs = find(hot, 1)

# find the locations where t is > 310K

t = mv.retrieve(param = 't', grid = [1,1])
hot = t > 310
locs = hot.find(1)