Versions Compared

Key

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

...

Code Block
languagepy
precip = read("precip.grib")

n = count(precip) # the number of fields in the fieldset
precip_3h = precip[2, n] - precip[1, n-1]
return precip_3h

Visualise the macro.

...

If you drop the precip_shade visdef icon into the plot, it may become blank! There is one more trick: we have created a derived field, and this changes the automatic scaling algorithm used when plotting. Precipitation is stored in metres, but we want to display it in mm. Modify the precip_shade icon and set:

Grib Scaling of Derived FieldsOn

...