You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 19
Next »
# Metview Macro
# **************************** LICENSE START ***********************************
#
# Copyright 2015 ECMWF. This software is distributed under the terms
# of the Apache License version 2.0. In applying this license, ECMWF does not
# waive the privileges and immunities granted to it by virtue of its status as
# an Intergovernmental Organization or submit itself to any jurisdiction.
#
# ***************************** LICENSE END ************************************
# ---------------------------------------------------------------
# Tags: Contour,Metview3,MARS
# Title: Split Contouring Metview 4
# Description: Demonstrates how to emulate Metview 3's split
# contouring facility using multiple Contouring
# definitions in Metview 4
# ---------------------------------------------------------------
data = retrieve(param:'t', levelist: 1000, grid: [1.5,1.5], date: -10)
split_below = mcont
(
contour_line_style : "dash",
contour_highlight_style : "dash",
contour_max_level : 0,
contour_level_count : 5
)
split_above = mcont
(
contour_line_colour : "red",
contour_highlight_colour : "red",
contour_min_level : 0,
contour_level_count : 5
)
split_on = mcont
(
contour_line_thickness : 3,
contour_line_colour : "black",
contour_highlight : "off",
contour_max_level : 0,
contour_min_level : 0
)
# Define the output media
to_psfile = ps_output
(
output_name : "plot" # extension is added automatically
)
# Check the runmode and decide which media to putput the plot to
mode = runmode()
if mode = "execute" or mode = "batch" then
setoutput(to_psfile)
end if
plot (data, split_below, split_above, split_on)