Wind Plotting
Introduction Wind plotting facilities allow users to plot wind and wind related parameters as follows: Wind fields may be presented to Magics in matrix form, as U/V velocity components or as speed/direction components. Wind fields may also be passed in GRIB code data as U/V or speed/direction or vorticity/divergence. These wind fields may be plotted in one of two ways: Wind arrows; represented by a vector whose length is proportional to the speed of the wind. WMO standard wind flags; represented by barbs and solid pennants. Streamlines; a line that is everywhere tangential to the instantaneous wind vectors. Isotachs; a contour line of wind speed. Wind arrow and wind flag plotting are described in this chapter. Streamline and isotach plotting are described in Chapter VIII- Streamline / Isotach Plotting . Magics also permits wind related parameters, which are generated from differential properties of the wind field, to be plotted using normal contouring facilities. These related parameters are Divergence, Vorticity, Stream Functions and Velocity Potential. Fields other than recognised wind fields (u/v, vorticity/divergence and speed/direction) may be plotted as wind vectors; describes how to achieve this.
Data Input To plot a wind field, users may pass the wind component fields either in GRIB code format or in matrix form, each component field being in a separate matrix.
GRIB Code To pass the wind components in GRIB format, the name (including the path) of the file containing the components should be passed as follows: CALL PSETC('GRIB_INPUT_FILE_NAME', 'wind_data'). The position of the wind components on the file should be indicated as follows: Diagram 1 here CALL PSETI ('GRIB_WIND_POSITION_1',N) CALL PSETI ('GRIB_WIND_POSITION_2',M) where N and M are the positions (record numbers on the file). When passing GRIB code data, it is possible to pass fields other than recognised wind fields (u/v, vorticity/divergence and speed/direction) to Magics and request that they are plotted as wind fields. To achieve this, the parameter GRIB_WIND_MODE should be set by the user to specify which way the input fields are to be interpolated, i.e. as u/v, vorticity/divergence or strength/direction. The valid values are 'UV' (default) , 'VD' and 'SD'. Following is an example of setting GRIB_WIND_MODE : CALL PSETC ('GRIB_WIND_MODE','UV') The fields should be passed to Magics in the usual way, as if they were recognised wind fields, e.g. CALL PSETC ('GRIB_INPUT_FILE_NAME','wind_data') CALL PSETI ('GRIB_WIND_POSITION_1', 1) CALL PSETI ('GRIB_WIND_POSITION_2', 2). It is possible to have the two fields necessary for wind plotting, in two different input files. If this is the case, the parameter GRIB_INPUT_FILE_NAME should be used to pass one of the file names and GRIB_INPUT_FILE_NAME should be used to pass the second file name. The parameter GRIB_INPUT_FILE_NUMBER must be set to 'TWO' , the default being 'ONE' . For further information concerning GRIB code data, see .
Matrix Data Input field parameters, as described in , must be used to describe the organisation of the data in the matrices. After the relevant parameters are properly set, the wind data may be passed in the following way: For u and v components: CALL PSET2R ('INPUT_WIND_U_COMPONENT',ARRAY1,M,N) CALL PSET2R ('INPUT_WIND_V_COMPONENT',ARRAY2,M,N) For wind speed and direction: CALL PSET2R ('INPUT_WIND_SPEED',ARRAY1,M,N) CALL PSET2R ('INPUT_WIND_DIRECTION',ARRAY2,M,N) For wind speed when plotting isotachs only: CALL PSET2R ('INPUT_WIND_SPEED',ARRAY1,M,N) where all arrays must be dimensioned as ARRAY(M,N) in the calling program. The units of INPUT_WIND_U_COMPONENT , INPUT_WIND_V_COMPONENT and INPUT_WIND_SPEED are metres per second. Those of INPUT_WIND_DIRECTION are degrees measured in an anticlockwise direction from the eastern point of the compass.
Plotting Methods To plot a wind field, the action routine PWIND must be called. The type of wind plot required is indicated by setting the parameter WIND_FIELD_TYPE to one of the following values, the default value being 'ARROWS'. 'ARROWS' : The speed and direction of the wind is plotted using an arrow whose length is proportional to the speed of the wind and whose orientation is in the direction of the wind at the grid position. 'FLAGS' : Will plot the speed and direction of the wind using the WMO standard wind flags representation (barbs and solid pennants). 'STREAMLINES' : Will plot streamlines tangential to the instantaneous wind vectors.
Wind Field Projection Magics will automatically project the wind field from the regular input field onto the requested projection. In the cases of wind flags and wind arrows, each flag or arrow will be directly projected, taking the necessary rotation into consideration. This means that wind arrows and wind flags will be plotted along lines of latitude and longitude on polar stereographic maps and not in columns and rows. No interpolation is performed during the projection. A thinning procedure may be applied to wind flags and arrows close to the poles. It should be noted that cylindrical projection is not angle-conformal, which means that the angle of the wind arrows or flags is not conserved in this projection. It is advisable not to use cylindrical projection for wind plotting outside the tropics.
Wind Field Thinning In some cases, wind arrows (and wind flags) may overlap. This depends on the length of the arrows or flags, the grid size of the input matrix and on the size of the subpage. With a polar stereographic projection, the distance between projected grid points will be smaller at higher latitudes. Therefore on polar stereographic projections for grid points close to the pole, a thinning procedure will be automatically applied to latitudes above 60 degrees. The parameter WIND_THINNING_FACTOR controls the thinning of wind fields plotted in different projections. For Cylindrical, Mercator and Satellite projections, for which there is no automatic thinning, the thinning factor corresponds to the rounded up value of the parameter WIND_THINNING_FACTOR. For a factor rounded to N, every Nth grid point in both X and Y directions, is plotted, e.g. the statement : CALL PSETR('WIND_THINNING_FACTOR', 2.6) will cause Magics to plot wind flags or wind arrows for every third grid point value in the input matrix, in both the X and Y directions. For Polar Stereographic projections, the thinning factor is the distance, in both X and Y directions, corresponding to the projected INPUT_FIELD_LONGITUDE_STEP, along 60 degrees latitude, multiplied by the value of WIND_THINNING_FACTOR . After plotting at a grid point, all subsequent grid points, whose distance from the current grid point is less than the thinning factor, will be ignored. The default value is 2.0, e.g. the statement : CALL PSETR('WIND_THINNING_FACTOR', 1.0) will cause Magics to plot wind flags or wind arrows with no thinning until 60 degree latitude. Above the 60 degree latitude, thinning will be applied automatically. For all projections, if WIND_THINNING_FACTOR has the value 0.0, no thinning will be applied. This also means that the automatic thinning is not applied in polar stereographic. In the case of streamlines, this thinning procedure is not applied. Chapter VIII- Streamline / Isotach Plotting for details concerning streamline thinning.
Plotting Wind Flags Wind fields comprising U and V components or speed and direction, may be plotted with WMO standard wind flags. A wind flag is represented by barbs and solid pennants, a full barb representing a wind speed of 5 m/s, a half barb representing a wind speed of 2.5 m/s, and a pennant representing a wind speed of 25 m/s. All barbs and pennants lie to the left of the wind shaft in the Northern hemisphere and to the right of the wind shaft in the Southern hemisphere. The wind flag points towards the direction the wind is coming from.
Unit Length The default length of the wind flag shaft is 1.0 centimetre. The parameter WIND_FLAG_LENGTH may be used to set another length (in centimetres).
Plot Suppression To suppress the plotting of wind flags above and below certain wind speed values, the parameters WIND_FLAG_MAX_SPEED and WIND_FLAG_MIN_SPEED may be used. The default values of these parameters are set to very high and very low, respectively, so that all wind speeds will be plotted. The parameter WIND_FLAG_CROSS_BOUNDARY controls the plotting of wind flags on and outside the subpage boundary. It may be set to 'ON' or 'OFF' . When set to 'ON' (default) wind flags are not plotted on or outside the boundary.
Origin Markers The origin point may be plotted in various ways. The parameter WIND_FLAG_ORIGIN_MARKER controls this feature. It can take three values, 'CIRCLE' , 'DOT' or 'OFF' . 'CIRCLE' (default) : will plot a circle around the origin point and the wind flag shaft will start at the perimeter of the circle. 'DOT' : The origin will be plotted as a dot and the wind shaft will start a short distance from the dot. 'OFF' : The origin is not plotted but the wind shaft will start at the origin point.
Calm Indicator According to the WMO standard, calm is indicated by a circle around the origin marker. If the parameter WIND_FLAG_CALM_INDICATOR is set to 'ON' (default), a calm indicator will be plotted when plotting wind flags. The calm indicator can have different forms depending upon the WIND_FLAG_ORIGIN_MARKER parameter. If WIND_FLAG_ORIGIN_MARKER is set to 'CIRCLE', then the calm indicator will be plotted as a circle around the origin circle. If WIND_FLAG_ORIGIN_MARKER is set to 'DOT' , then the calm indicator will be plotted as a circle around a dot. If WIND_FLAG_ORIGIN_MARKER is set to 'OFF' , then the calm indicator will also be plotted as a circle around a dot, as it is regarded as being necessary to show the exact location of the calm. The parameter WIND_FLAG_CALM_INDICATOR_SIZE controls the size of diameter of the calm indicator circle, the default being 0.3 centimetres. Control of the calm indicator size should be used to avoid congestion of wind symbols caused by the size of the users subpage and/or the map projection. Diagram 3
Colour and Thickness The parameters WIND_FLAG_THICKNESS and WIND_FLAG_COLOUR are used to distinguish wind flag plotting from other wind fields in the same subpage. The parameter WIND_FLAG_THICKNESS will draw lines n times thicker than the default value. It will affect only the thickness of the wind flag shaft, not the barbs or pennants. The parameter WIND_FLAG_COLOUR controls the colour of the wind flags. Observe that only one colour at a time can be used to plot flags each time PWIND is called. The default value for WIND_FLAG_THICKNESS is 1 and the default colour for WIND_FLAG_COLOUR is 'BLUE'.
Plotting Wind Arrows A wind arrow is represented by a vector whose length and head size is proportional to the speed of the wind, and whose thickness remains constant (except for low wind speeds). The vector either starts at the exact location of the current grid point, or is centred on it. The orientation of the vector represents the direction of the wind.
Unit Velocity WIND_ARROW_UNIT_VELOCITY is used to define the wind speed. A unit vector (1.0 cm) on the unscaled output plot represents the default value of 25 m/s. When WIND_ARROW_UNIT_VELOCITY is set to 0.0, Magics will calculate the maximum wind speed for the geographical area requested and will use this maximum for the unit velocity. This means that the unit velocity will vary depending on the area being plotted. It should be noted that if a scaling factor is applied to the output plot using postprocessor or hardware scaling facilities, the unit length of the wind arrow will also be scaled by the same factor.
Plot Suppression To suppress the plotting of wind arrows above and below certain wind speed values, the parameters WIND_ARROW_MAX_SPEED and WIND_ARROW_MIN_SPEED may be used. The default values of these parameters are set to very high and very low values so that all wind speeds will be plotted. The suppression of wind arrows may be useful to isolate certain wind speeds or to plot them in a different style to other winds.
Calm Winds Generally, winds below 0.5 m/s are regarded as calm. The parameter WIND_ARROW_CALM_BELOW sets the upper limit for calm winds. The default value is 0.5.
Calm Indicator Calm winds may be plotted by setting the parameter WIND_ARROW_CALM_INDICATOR to 'ON', default being 'OFF'. These will be plotted by a circle round a dot, where the dot indicates the exact position of the current grid point. The parameter WIND_ARROW_CALM_INDICATOR_SIZE controls the size of the diameter of the calm indicator circle, default 0.3 centimetres. Control of the calm indicator size should be used to avoid congestion of wind symbols caused by the size of the users subpage and/or the map projection.
Origin Position The Parameter WIND_ARROW_ORIGIN_POSITION places the wind arrows at different positions relative to the origin of the wind. It can take two values, 'TAIL' or 'CENTRE', the default being 'TAIL'. 'TAIL' : The tails of the arrows will be plotted at the origin points of the wind. 'CENTRE' : The centre points of the wind arrows will be plotted at the origin points. The position of the origin will be indicated in the wind arrow legend by a cross.
Colour Wind arrow colour is set by the parameter WIND_ARROW_COLOUR (default 'BLUE').
Arrow Thickness The thickness of wind arrow shafts can be controlled by the parameter WIND_ARROW_THICKNESS, the value of which defaults to 1. As the size of the arrow head is proportional to the overall length of the arrow, it is possible, in the case of low wind speeds, that the height of the arrow head may grow smaller than the thickness of the shaft. Magics prevents this from happening by examining the ratio of the height of the arrow head to the thickness of the shaft for all arrows whose length is less than that of the unit vector. Thus if the arrow head height falls below three times the shaft thickness, the shaft thickness is said to have violated the arrow head. When violation occurs, Magics will reduce the shaft thickness so that it is exactly one third of the arrow head height. The shaft thickness will remain constant, at the user specified or default value, for all arrows whose length is greater than that of the unit vector. Diagram 5
Arrow Head Style Magics++ Magics++ uses an easier system of specifying arrow head styles than previous versions. The old parameter, WIND_ARROW_HEAD_INDEX, is still supported but is now deprecated. Wind arrow heads can be configured through two parameters: WIND_ARROW_HEAD_SHAPE (integer from 0 to 3) and WIND_ARROW_HEAD_RATIO (real from 0 to 1). The first of these parameters specifies which type of head the wind arrow will have, and the second specifies the ratio of the width of the arrow head compared to its length. The following diagram illustrates the effect of these parameters:
Wind Arrow Heads
Wind Arrow Legend A wind arrow legend box containing a plot of a unit vector and its unit value will be plotted, by default, in the upper right hand corner of the page, just outside the subpage. The attributes colour, line style, thickness and arrowhead style of the unit vector will be the same as for wind arrows plotted in the subpage. The frame of the wind arrow legend box will be plotted with the same attributes as the subpage frame. By default, the legend will be plotted just outside the top right hand corner of the subpage. The wind arrow legend box may be placed in any position within the user's page using the WIND_ARROW_LEGEND_X_POSITION and WIND_ARROW_LEGEND_Y_POSITION parameters to define the position of the lower left hand corner of the wind arrow legend box. The size of the legend is controlled by the two parameters WIND_ARROW_LEGEND_X_LENGTH and WIND_ARROW_LEGEND_Y_LENGTH , whose values default to 1.2cm and 0.6cm respectively. To request blanking behind the legend box, the parameter WIND_ARROW_LEGEND_BLANKING may be set to 'ON', the default being 'OFF'. Blanking is only effective when the legend is partially or totally inside the subpage. To obtain full blanking, the action routine PWIND should be called before any other action routines. To suppress the plotting of the wind arrow legend box, the parameter WIND_ARROW_LEGEND should be set to 'OFF', the default being 'ON' . The wind arrow legend may also be plotted by the general legend drawing facilities in Magics. This can be achieved by setting the parameter LEGEND to 'ON' before calling PWIND. When this is required, WIND_ARROW_LEGEND should be set to 'OFF' to avoid having the arrow legend drawn twice.
Program Examples The following examples illustrate the plotting of wind.