	program magics

	call popen

	call psetc("output_name_first_page_number", "off")
	call pset1c("output_formats", (/"png"/), 1)
	call psetc("output_name", "epswind")
	call pseti("output_width", 600)
	call psetr("super_page_y_length", 10.00)
	call psetr("super_page_x_length", 20.00)

	call psetr("subpage_y_min", -43000.00)
	call psetc("subpage_map_projection", "cartesian")
	call psetr("subpage_y_position", 4.00)
	call psetc("subpage_x_automatic", "on")
	call psetr("subpage_y_max", 43000.00)
	call psetc("subpage_x_axis_type", "date")
	call psetc("subpage_y_axis_type", "regular")
	call psetc("subpage_y_automatic", "off")
	call psetr("subpage_y_length", 2.00)

	call psetc("axis_orientation", "horizontal")
	call psetr("axis_days_label_height", 0.35)
	call psetc("axis_line_colour", "grey")
	call psetc("axis_days_label_colour", "Rgb(0.5, 0.5, 0.5)")
	call psetc("axis_months_label_colour", "Rgb(0.5, 0.5, 0.5)")
	call psetc("axis_minor_tick_colour", "grey")
	call psetc("axis_type", "date")
	call psetc("axis_tick_colour", "grey")
	call psetc("axis_grid", "on")
	call psetr("axis_months_label_height", 0.30)
	call psetr("axis_years_label_height", 0.30)
	call psetc("axis_grid_line_style", "solid")
	call psetc("axis_date_type", "days")
	call psetc("axis_grid_colour", "Rgb(0.5, 0.5, 0.5)")
	call psetc("axis_minor_tick", "on")
	call psetc("axis_years_label_colour", "Rgb(0.5, 0.5, 0.5)")
	call psetc("axis_days_label", "both")
	call paxis

	call preset('axis_orientation')
	call preset('axis_days_label_height')
	call preset('axis_line_colour')
	call preset('axis_days_label_colour')
	call preset('axis_months_label_colour')
	call preset('axis_minor_tick_colour')
	call preset('axis_type')
	call preset('axis_tick_colour')
	call preset('axis_grid')
	call preset('axis_months_label_height')
	call preset('axis_years_label_height')
	call preset('axis_grid_line_style')
	call preset('axis_date_type')
	call preset('axis_grid_colour')
	call preset('axis_minor_tick')
	call preset('axis_years_label_colour')
	call preset('axis_days_label')

	call psetc("axis_orientation", "vertical")
	call psetc("axis_tick", "off")
	call psetc("axis_line_colour", "grey")
	call psetc("axis_line", "on")
	call psetc("axis_grid_line_style", "dash")
	call psetc("axis_grid", "on")
	call psetc("axis_grid_colour", "Rgb(0.5, 0.5, 0.5)")
	call psetc("axis_tick_label", "off")
	call paxis

	call preset('axis_orientation')
	call preset('axis_tick')
	call preset('axis_line_colour')
	call preset('axis_line')
	call preset('axis_grid_line_style')
	call preset('axis_grid')
	call preset('axis_grid_colour')
	call preset('axis_tick_label')

	call psetc("wrepjson_parameter", "249.140")
	call psetc("wrepjson_family", "eps")
	call psetc("wrepjson_parameter_information", "Wind direction")
	call psetc("wrepjson_input_filename", "wind_direction.json")
	call pwrepjson

	call preset('wrepjson_parameter')
	call preset('wrepjson_family')
	call preset('wrepjson_parameter_information')
	call preset('wrepjson_input_filename')

	call psetc("eps_rose_wind_colour", "greenish_blue")
	call psetc("eps_rose_wind_border_colour", "Rgb(0.5000, 0.5000, 0.5000)")
	call pepswind

	call preset('eps_rose_wind_colour')
	call preset('eps_rose_wind_border_colour')

	call psetc("text_mode", "positional")
	call psetr("text_font_size", 0.40)
	call psetc("text_justification", "left")
	call psetc("text_border", "off")
	call pset1c("text_lines", (/"<json_info key='parameter_info'/>                                             ",&
		"Forecast from <json_info key='date'/> for location <json_info key='location'/>"/), 2)
	call psetr("text_box_x_length", 20.00)
	call psetr("text_box_y_length", 2.50)
	call psetc("text_html", "true")
	call psetr("text_box_x_position", 1.00)
	call psetr("text_box_y_position", 6.50)
	call psetc("text_colour", "black")
	call ptext

	call preset('text_mode')
	call preset('text_font_size')
	call preset('text_justification')
	call preset('text_border')
	call preset('text_lines')
	call preset('text_box_x_length')
	call preset('text_box_y_length')
	call preset('text_html')
	call preset('text_box_x_position')
	call preset('text_box_y_position')
	call preset('text_colour')

	call pclose

	end
