| 1 |
C (C) Copyright 1996-2016 ECMWF. |
| 2 |
C |
| 3 |
C This software is licensed under the terms of the Apache Licence Version 2.0 |
| 4 |
C which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 5 |
C In applying this licence, ECMWF does not waive the privileges and immunities |
| 6 |
C granted to it by virtue of its status as an intergovernmental organisation nor |
| 7 |
C does it submit to any jurisdiction. |
| 8 |
C |
| 9 |
|
| 10 |
program magics |
| 11 |
|
| 12 |
C Defines the colours table for the shading |
| 13 |
character*25 colour |
| 14 |
dimension colour(24) |
| 15 |
|
| 16 |
C Defines the lines for the title |
| 17 |
character*100 title |
| 18 |
dimension title(4) |
| 19 |
|
| 20 |
data colour / |
| 21 |
+ 'rgb(0,0,0.5)', |
| 22 |
+ 'rgb(0,0,0.5)', |
| 23 |
+ 'rgb(0,0,0.85)', |
| 24 |
+ 'rgb(0,0,0.5)', |
| 25 |
+ 'rgb(0,0,0.85)', |
| 26 |
+ 'rgb(0.25,0,1)', |
| 27 |
+ 'blue_purple', |
| 28 |
+ 'greenish_blue', |
| 29 |
+ 'blue_green', |
| 30 |
+ 'bluish_green', |
| 31 |
+ 'yellow_green', |
| 32 |
+ 'greenish_yellow', |
| 33 |
+ 'yellow', |
| 34 |
+ 'orangish_yellow', |
| 35 |
+ 'orange_yellow', |
| 36 |
+ 'yellowish_orange', |
| 37 |
+ 'orange', |
| 38 |
+ 'reddish_orange', |
| 39 |
+ 'red_orange', |
| 40 |
+ 'orangish_red', |
| 41 |
+ 'red', |
| 42 |
+ 'magenta', |
| 43 |
+ 'magenta', |
| 44 |
+ 'magenta' / |
| 45 |
|
| 46 |
data title / |
| 47 |
+ "Forecast from <grib_info id='z500' key='base-date'/> ", |
| 48 |
+ "Valid for<grib_info id='z500' key='valid-date'/> ", |
| 49 |
+ "Parameter <grib_info id='z500' key='name'/> at |
| 50 |
+<grib_info id='z500' key='level'/> hPa", |
| 51 |
+ "Parameter <grib_info id='t850' key='name'/> at |
| 52 |
+<grib_info id='t850' key='level'/> hPa"/ |
| 53 |
|
| 54 |
C open magics |
| 55 |
call popen |
| 56 |
|
| 57 |
C Setting of the output file name |
| 58 |
call psetc('output_name', 'z500_t850_europe') |
| 59 |
|
| 60 |
|
| 61 |
C Setting the coordinates of the geographical area |
| 62 |
call psetr('subpage_upper_right_longitude', 62.000000) |
| 63 |
call psetr('subpage_upper_right_latitude', 58.0000) |
| 64 |
call psetr('subpage_lower_left_latitude', 21.510000) |
| 65 |
call psetr('subpage_map_vertical_longitude', 0.000000) |
| 66 |
call psetr('subpage_lower_left_longitude', -37.270000) |
| 67 |
call psetc('subpage_map_projection', 'polar_stereographic') |
| 68 |
|
| 69 |
C Set the legend |
| 70 |
call psetr('legend_box_x_position', 27.5) |
| 71 |
call psetc('legend_display_type', 'continuous') |
| 72 |
call psetr('legend_box_y_position', 1.000000) |
| 73 |
call psetr('legend_box_x_length', 2.000000) |
| 74 |
call psetc('legend_box_mode', 'positional') |
| 75 |
call psetc('legend_text_colour', 'black') |
| 76 |
call psetr('legend_box_y_length', 13.000000) |
| 77 |
call psetc('legend', 'on') |
| 78 |
|
| 79 |
|
| 80 |
C Import the t850 data |
| 81 |
call psetc('grib_id', 't850') |
| 82 |
call psetc('grib_input_file_name', '../t850.grb') |
| 83 |
call pgrib |
| 84 |
|
| 85 |
C Define the shading for t850 |
| 86 |
call psetc('contour_level_selection_type', 'interval') |
| 87 |
call psetc('contour_shade_colour_method', 'list') |
| 88 |
call psetc('contour_shade_method', 'area_fill') |
| 89 |
call psetc('contour_shade', 'on') |
| 90 |
call psetr('contour_shade_max_level', 48.000000) |
| 91 |
call psetc('contour_hilo', 'off') |
| 92 |
call psetc('contour', 'off') |
| 93 |
call psetc('contour_label', 'off') |
| 94 |
call psetr('contour_shade_min_level', -48.000000) |
| 95 |
call psetr('contour_interval', 4.000000) |
| 96 |
call pset1c('contour_shade_colour_list', colour, 24) |
| 97 |
call pcont |
| 98 |
|
| 99 |
|
| 100 |
C Import the z500 data |
| 101 |
call psetc('grib_id', 'z500') |
| 102 |
call psetc('grib_input_file_name', '../z500.grb') |
| 103 |
call pgrib |
| 104 |
|
| 105 |
C Define the contouring for z500 |
| 106 |
call psetc('contour', 'on') |
| 107 |
call psetc('legend', 'off') |
| 108 |
call psetc('contour_shade', 'off') |
| 109 |
call psetc('contour_label', 'on') |
| 110 |
call psetc('contour_level_selection_type', 'interval') |
| 111 |
call psetc('contour_line_colour', 'black') |
| 112 |
call psetr('contour_hilo_height', 0.250000) |
| 113 |
call psetc('contour_hilo', 'on') |
| 114 |
call psetc('contour_hilo_quality', 'high') |
| 115 |
call pseti('contour_line_thickness', 1) |
| 116 |
call psetc('contour_label', 'off') |
| 117 |
call psetc('contour_highlight_colour', 'black') |
| 118 |
call pseti('contour_highlight_thickness', 2) |
| 119 |
call psetr('contour_interval', 5.) |
| 120 |
call pcont |
| 121 |
|
| 122 |
C Add the coastlines |
| 123 |
call psetc('map_grid_colour', 'tan') |
| 124 |
call psetc('map_grid', 'on') |
| 125 |
call psetc('map_coastline_colour', 'tan') |
| 126 |
call pcoast |
| 127 |
|
| 128 |
|
| 129 |
C add a title |
| 130 |
call psetc('text_mode', 'positional') |
| 131 |
call psetr('text_box_y_length', 2.500000) |
| 132 |
call psetc('text_justification', 'left') |
| 133 |
call psetc('text_border', 'on') |
| 134 |
call pset1c('text_lines', title, 4) |
| 135 |
call psetr('text_box_x_length', 20.000000) |
| 136 |
call psetr('text_box_x_position', 1.500000) |
| 137 |
call psetc('text_html', 'true') |
| 138 |
call psetc('text_box_blanking', 'on') |
| 139 |
call psetc('text_border_colour', 'black') |
| 140 |
call psetr('text_box_y_position', 14.000000) |
| 141 |
call psetc('text_colour', 'black') |
| 142 |
call ptext |
| 143 |
|
| 144 |
|
| 145 |
call pclose |
| 146 |
end |