Versions Compared

Key

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

...

# Metview Macro

#  **************************** LICENSE START ***********************************
# 
#  Copyright 20122013 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,MARSmvl
# Title: Split Contouring Metview 4
# Description: Demonstrates how to emulateplot Metviewa 3's split
#              contouring facility using multiple Contouringline on any map
#              definitions in Metview 4projection
# ---------------------------------------------------------------


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

split_below = mcontset up the shaded coastlines
land_sea_shade = mcoast
(
    contourmap_coastline_lineland_styleshade        : "dashon",
    contour_highlight_stylemap_coastline_land_shade_colour : "dashRGB(0.98,0.95,0.82)",
    contourmap_coastline_maxsea_levelshade         : 0"on",
    contour_level_count   map_coastline_sea_shade_colour  : 5"RGB(0.85,0.93,1)"
)

split_above# define the geographic view
view = mcontgeoview
(
    contourmap_line_colourprojection      : "redpolar_stereographic",
    contourmap_highlightarea_colourdefinition : "redcorners",
    area      contour_min_level          : 0, [-5,-30,10,84],  # S,W,N,E
    contour_level_countcoastlines          : 5land_sea_shade
)

split_on = mcont
(
    contour_line_thickness : 3,
    contour_line_colour    : "black",
    contour_highlight  # create a geoline broken into 1-degree segments
line_increment_in_degrees = 1
geoline = mvl_geoline(-40, 57, 16, 59, line_increment_in_degrees)


# define the plotting attributes for the line
line_visdef = mgraph
(
    graph_line_colour    : "offred",
    contourgraph_max_level     line_thickness : 0"4",
    contourgraph_minline_levelstyle      : 0'dash'
)


# 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")    then setoutput(to_psfile)
else if  (mode = "batch")      then setoutput(to_psfile)
else if  (mode = "visualise")  then print('screen')
else     fail("Only execute, batch and visualise allowed")
end if



# plot (data, split_below, split_above, split_onthe line on the map
plot(view, geoline, line_visdef)