# 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 ************************************

toplat   = 65
botlat   = 51
leftlon  = -5
rightlon = 26

red_line = mgraph(
    graph_line_colour    : "red",
    graph_line_thickness : 5
    )

increment = 0.1
line1 = mvl_geoline(toplat, leftlon,  toplat, rightlon, increment)
line2 = mvl_geoline(toplat, rightlon, botlat, rightlon, increment)
line3 = mvl_geoline(botlat, rightlon, botlat, leftlon,  increment)
line4 = mvl_geoline(botlat, leftlon,  toplat, leftlon, increment)

geo_area_box = input_visualiser(
    input_plot_type        : "geo_points",
    input_longitude_values : [leftlon,rightlon,rightlon,leftlon,leftlon],
    input_latitude_values  : [toplat,toplat,botlat,botlat,toplat]
    )


land_sea_shade = mcoast(
    map_coastline_land_shade        : "on",
    map_coastline_land_shade_colour : "RGB(0.98,0.95,0.82)",
    map_coastline_sea_shade         : "on",
    map_coastline_sea_shade_colour  : "RGB(0.85,0.93,1)"
    )

polar = geoview(
    map_projection      : "polar_stereographic",
    map_area_definition : "corners",
    area                : [44.28,-20.69,55.27,55.76],
    coastlines          : land_sea_shade
    )

page = plot_page(
    bottom : 100,
    right  : 50,
    view   : polar
    )

page_1 = plot_page(
    bottom : 100,
    left   : 50,
    right  : 100,
    view   : polar
    )

viewsx2 = plot_superpage(
    pages : [page,page_1]
    )

title1 = mtext(text_line_1: "Using Input Visualiser")
title2 = mtext(text_line_1: "Using mvl_geoline")


plot(viewsx2[1], geo_area_box, red_line, title1)
plot(viewsx2[2], line1, line2, line3, line4, red_line, title2)

