	program magics

	call popen

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

	call psetc("subpage_map_projection", "cylindrical")

	call psetc("map_coastline_land_shade_colour", "cream")
	call psetc("map_grid_colour", "tan")
	call psetc("map_grid", "on")
	call psetc("map_coastline_colour", "tan")
	call psetc("map_coastline_land_shade", "on")
	call pcoast

	call preset('map_coastline_land_shade_colour')
	call preset('map_grid_colour')
	call preset('map_grid')
	call preset('map_coastline_colour')
	call preset('map_coastline_land_shade')

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

	call preset('grib_id')
	call preset('grib_input_file_name')

	call psetc("contour_line_colour", "navy")
	call pseti("contour_line_thickness", 2)
	call psetc("contour_label", "on")
	call psetc("contour_highlight_colour", "navy")
	call psetc("legend", "off")
	call pseti("contour_highlight_thickness", 6)
	call pcont

	call preset('contour_line_colour')
	call preset('contour_line_thickness')
	call preset('contour_label')
	call preset('contour_highlight_colour')
	call preset('legend')
	call preset('contour_highlight_thickness')

	call pset1c("text_lines", (/"<font size='1'>Simple Contouring...</font>                                              ",&
		"<font colour='evergreen'>contour_level_selection_type = count</font>                    ",&
		"    calculate a reasonable  contour interval from the min and max of the displayed field"/), 3)
	call psetr("text_font_size", 0.80)
	call psetc("text_justification", "left")
	call psetc("text_colour", "charcoal")
	call ptext

	call preset('text_lines')
	call preset('text_font_size')
	call preset('text_justification')
	call preset('text_colour')

	call pclose

	end
