	program magics

	call popen

	call pset1c("output_formats", (/"png"/), 1)
	call psetc("output_name", "contour5")
	call psetc("output_name_first_page_number", "off")

	call psetr("subpage_upper_right_longitude", 50.00)
	call psetr("subpage_upper_right_latitude", 65.00)
	call psetr("subpage_lower_left_latitude", 25.00)
	call psetr("subpage_lower_left_longitude", -20.00)
	call psetr("subpage_x_length", 23.00)
	call psetc("subpage_map_projection", "cylindrical")

	call pseti("grib_field_position", 1)
	call psetc("grib_input_file_name", "t850.grb")
	call pgrib

	call psetc("contour_level_selection_type", "level_list")
	call psetc("contour_shade_colour_method", "calculate")
	call psetc("contour_shade_method", "area_fill")
	call psetc("contour_shade", "on")
	call psetc("contour_line_colour", "grey")
	call psetc("contour_shade_colour_direction", "clockwise")
	call pseti("contour_line_thickness", 2)
	call psetc("contour_highlight", "off")
	call psetc("contour_label", "off")
	call psetc("contour_shade_max_level_colour", "red")
	call psetc("legend", "on")
	call psetc("contour_shade_min_level_colour", "blue")
	call pcont

	call pseti("map_coastline_thickness", 3)
	call psetc("map_grid_colour", "charcoal")
	call psetc("map_coastline_colour", "charcoal")
	call psetc("map_grid", "on")
	call pcoast

	call psetr("legend_box_x_position", 26.00)
	call psetc("legend_display_type", "continuous")
	call psetc("legend_title_orientation", "vertical")
	call psetc("legend_title", "on")
	call psetr("legend_box_x_length", 2.00)
	call psetc("legend_border", "off")
	call psetr("legend_text_height", 0.50)
	call psetr("legend_box_y_position", 2.00)
	call psetc("legend_box_mode", "positional")
	call psetc("legend_text_colour", "navy")
	call psetr("legend_box_y_length", 10.00)
	call psetc("legend", "on")
	call psetc("legend_title_text", "My Title")

	call pclose

	end
