	program magics

	call popen

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

	call psetr("subpage_lower_left_longitude", 105.00)
	call psetr("subpage_upper_right_longitude", 180.00)
	call psetr("subpage_upper_right_latitude", -5.00)
	call psetc("subpage_map_projection", "cylindrical")
	call psetr("subpage_lower_left_latitude", -55.00)

	call psetc("map_coastline_sea_shade", "on")
	call psetc("map_coastline_sea_shade_colour", "white")
	call psetc("map_label", "off")
	call psetc("map_coastline_land_shade_colour", "cream")
	call psetc("map_grid", "off")
	call psetc("map_coastline_colour", "tan")
	call psetc("map_coastline_land_shade", "on")
	call pcoast

	call psetc("grib_id", "t850")
	call psetc("grib_input_file_name", "./speed200.grb")
	call pgrib

	call psetc("contour_shade_method", "area_fill")
	call psetr("contour_hi_min_value", 15.00)
	call psetr("contour_reference_level", 0.00)
	call psetc("contour_hilo_format", "(F3.0)")
	call psetc("contour_label", "off")
	call psetr("contour_hilo_suppress_radius", 30.00)
	call psetc("legend", "on")
	call psetc("contour_shade_min_level_colour", "yellow")
	call psetc("contour_level_selection_type", "level_list")
	call psetc("contour_shade", "on")
	call pset1r("contour_level_list", (/30.00, 40.00, 50.00, 60.00, 70.00, 80.00, 90.00, 100.00/), 8)
	call psetc("contour_hilo", "on")
	call psetr("contour_hilo_height", 0.20)
	call psetc("contour_highlight", "off")
	call psetc("contour_hilo_type", "number")
	call psetc("contour_shade_max_level_colour", "evergreen")
	call pcont

	call psetc("grib_id", "uv200")
	call psetc("grib_input_file_name", "./uv200.grb")
	call pgrib

	call pseti("wind_arrow_thickness", 1)
	call psetr("wind_thinning_factor", 3.00)
	call psetc("legend", "on")
	call psetc("wind_arrow_colour", "gold")
	call psetc("wind_field_type", "arrows")
	call pwind

	call psetc("grib_id", "z500")
	call psetc("grib_input_file_name", "./msl.grb")
	call pgrib

	call psetc("contour_level_selection_type", "interval")
	call psetc("contour_line_colour", "black")
	call psetc("contour_lo_colour", "black")
	call pseti("contour_highlight_thickness", 2)
	call psetc("contour_hi_colour", "black")
	call psetc("contour_hilo", "on")
	call psetr("contour_hilo_height", 0.25)
	call pseti("contour_line_thickness", 1)
	call psetc("contour_label", "off")
	call psetc("contour_highlight_colour", "black")
	call psetc("contour_hilo_quality", "high")
	call psetc("legend", "off")
	call psetr("contour_interval", 5.00)
	call pcont

	call psetc("map_label", "off")
	call psetc("map_grid_colour", "tan")
	call psetc("map_grid", "on")
	call psetc("map_coastline_colour", "tan")
	call pcoast

	call pset1c("text_lines", (/"<font size='1'>Wind arrows with legend</font>", "", "<grib_info id='z500' key='name' format='%s'/>"/), 3)
	call psetr("text_font_size", 0.50)
	call psetc("text_justification", "left")
	call psetc("text_colour", "charcoal")
	call ptext

	call psetr("legend_box_x_position", 27.50)
	call psetc("legend_display_type", "continuous")
	call psetc("legend_box_blanking", "on")
	call psetr("legend_box_y_position", 4.00)
	call psetr("legend_box_x_length", 2.00)
	call psetc("legend_border", "off")
	call psetc("legend_title", "on")
	call psetc("legend_text_font_size", "0.5")
	call psetc("legend_border_colour", "black")
	call psetc("legend_box_mode", "positional")
	call psetc("legend_text_colour", "black")
	call psetr("legend_box_y_length", 12.00)
	call psetc("legend", "on")
	call psetc("legend_title_text", "Wind speed at 200 hPa")

	call pclose

	end
