Debian Codegraph @

regression/wind/north-hemisphere-north.py

raw symbols SCIP
1 # (C) Copyright 1996-2016 ECMWF.
2 #
3 # This software is licensed under the terms of the Apache Licence Version 2.0
4 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5 # In applying this licence, ECMWF does not waive the privileges and immunities
6 # granted to it by virtue of its status as an intergovernmental organisation nor
7 # does it submit to any jurisdiction.
8
9 # importing Magics module
10
11 from Magics.macro import *
12
13 # Setting the coordinates of the geographical area
14 south = {
15 'subpage_map_projection':'polar_stereographic',
16 'subpage_map_hemisphere':'south',
17 'subpage_lower_left_latitude':-3.,
18 'subpage_lower_left_longitude':60.,
19 'subpage_upper_right_latitude':-30.,
20 'subpage_upper_right_longitude':-100.,
21 }
22
23 north = {
24 'subpage_map_projection':'polar_stereographic',
25 'subpage_map_hemisphere':'north',
26 }
27
28 mollweide = {
29 'subpage_map_projection':'mollweide',
30 'subpage_map_hemisphere':'mollweide',
31 }
32 polar_north = {
33 'subpage_map_projection':'polar_north',
34 'subpage_map_hemisphere':'polar_north',
35 }
36
37 robinson = {
38 'subpage_map_projection':'robinson',
39 'subpage_map_hemisphere':'robinson',
40 }
41
42 # Coastlines setting
43
44
45 # Example reference
46
47 for i in [ "north"]:
48 for area in [north,]:
49 ref = '%s-hemisphere-%s' % (area["subpage_map_hemisphere"], i)
50
51
52 # Setting of the output file name
53
54 png = output(output_formats=['png'],
55 output_name_first_page_number='off',
56 output_name=ref)
57
58 coast = mcoast(map_grid='on', map_grid_colour='tan',
59 map_coastline_colour='tan',
60 )
61
62 # Import andthe data
63
64
65 obs = mobs(obs_input_file_name='bufr-synop-%s-winds.bufr'%i)
66
67
68
69 title = \
70 mtext(text_lines=["<font size='1'>Observation Plotting [Synop]: %s winds </font>" % i
71 , '',
72 ], text_justification='left', text_font_size=0.5,
73 text_colour='charcoal')
74
75
76
77 # To the plot
78 plot( png, mmap(area), obs, coast, title)
79