Metview's documentation is now on readthedocs!

# Metview Macro

# **************************** LICENSE START ***********************************
#
# Copyright 2012 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 ************************************

# NOTE: THIS EXAMPLE EXISTS FOR THE COMPARISON OF METVIEW 3 AND METVIEW 4
# FEATURES, AND SHOULD NOT BE USED AS A TEMPLATE FOR METVIEW 4 CODE.

# ---------------------------------------------------------------
# Tags: Contour,Metview3,MARS
# Title: Split Contouring Metview 3
# Description: Demonstrates Metview 3's split contouring facility
# ---------------------------------------------------------------


data = retrieve(param:'t', levelist: 1000, grid: [1.5,1.5], date: -10)

split = pcont
(
    contour_line_plotting: "split"
)



# Define the output media

to_psfile = output
(
    format       : "postscript",
    destination  : "file",
    ncopies      : 1,
    file_name    : "plot.ps"
)


# Check the runmode and decide which media to putput the plot to
    
mode = runmode()
if  mode = "execute" or mode = "batch" then setoutput(to_psfile)
else                                        setoutput(to_screen)
end if


dw = plot_superpage ()
plot (dw, data, split)