Versions Compared

Key

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

...

Setting output formats in macro code

 

Code Block
languagepy
titleSeeting multiple outputs in Metview Macro
linenumberstrue
collapsetrue
output_common = ( 
      output_name            : "/tmp/myOutputTest",
      output_width           : 1000,
      output_title           : "Map of Z500",
      output_debug           : "ON",
      output_filelist        : "ON",
      output_filelist_name   : "/tmp/filelist.txt"
)

ps = ps_output(
      output_common,
      output_ps_scale        : 0.9,
      output_ps_colour_model : "CMYK"
)

png = png_output(
      output_common,
      output_cairo_transparent_background : "ON"
)

svg = svg_output(
      output_common,
      output_svg_fix_size : "ON",
      output_svg_meta     : "Metview map of Z500",
      output_svg_desc     : "This file was generated for the Training course"
)

kml = kml_output(
      output_common,
      kml_description : "This file was generated for the Training course",
      kml_author      : "Stephan Siemen",
      kml_link        : "http://www.ecmwf.int",
      kml_latitude    : 30,
      kml_longitude   : 120,
      kml_coastlines  : "ON"
)

output_drivers = [ps, png, svg, kml]

setoutput(output_drivers)

data = read("z500.grib")

plot(data)

 

KML as output format

KML is a very special output format. It contains the    it has no notion of output size.

...