Struct WindBarb
The feathers of a WMO wind barb for one speed: pennants (50 kn), full barbs (10 kn) and half barbs (5 kn), with the speed rounded to the nearest 5 kn.
public readonly record struct WindBarb : IEquatable<WindBarb>
- Implements
- Inherited Members
Remarks
A barb's staff points into the wind, from the station toward the direction the wind blows from. Its feathers sit at the outer end, largest first: pennants, then full barbs, then at most one half barb. A half barb on its own (5 kn) is drawn one feather spacing in from the end, so it isn't read as a full barb. Below 2.5 kn the wind is calm and drawn as a circle with no staff (WMO Manual on Codes; WMO-No. 485).
WindBarbStyle draws one symbol per 5 kn band, named by
SymbolName; the symbols are generated from this
decomposition by tools/GenerateWeatherSymbols.
Constructors
WindBarb(int, int, int, int)
The feathers of a WMO wind barb for one speed: pennants (50 kn), full barbs (10 kn) and half barbs (5 kn), with the speed rounded to the nearest 5 kn.
public WindBarb(int Knots, int Pennants, int FullBarbs, int HalfBarbs)
Parameters
KnotsintThe speed the barb stands for: a multiple of 5 kn from 0 (calm) to MaxKnots.
PennantsintThe number of pennants (flags), 50 kn each.
FullBarbsintThe number of full barbs, 10 kn each.
HalfBarbsintThe number of half barbs (0 or 1), 5 kn each.
Remarks
A barb's staff points into the wind, from the station toward the direction the wind blows from. Its feathers sit at the outer end, largest first: pennants, then full barbs, then at most one half barb. A half barb on its own (5 kn) is drawn one feather spacing in from the end, so it isn't read as a full barb. Below 2.5 kn the wind is calm and drawn as a circle with no staff (WMO Manual on Codes; WMO-No. 485).
WindBarbStyle draws one symbol per 5 kn band, named by
SymbolName; the symbols are generated from this
decomposition by tools/GenerateWeatherSymbols.
Fields
CalmBelowKnots
The speed below which the wind is calm, in knots: 2.5.
public const double CalmBelowKnots = 2.5
Field Value
CalmSymbol
The symbol name of the calm circle.
public const string CalmSymbol = "WXCALM"
Field Value
MaxKnots
The highest barb, in knots: 200. Faster winds are drawn with it.
public const int MaxKnots = 200
Field Value
NorthernSymbolPrefix
The symbol name prefix of the northern-hemisphere barbs, followed by the
speed in knots to three digits: WXBARBN005 to WXBARBN200.
public const string NorthernSymbolPrefix = "WXBARBN"
Field Value
SouthernSymbolPrefix
The symbol name prefix of the southern-hemisphere barbs, followed by the
speed in knots to three digits: WXBARBS005 to WXBARBS200.
Each is the mirror image of its northern barb, with the feathers on the
anticlockwise side of the staff.
public const string SouthernSymbolPrefix = "WXBARBS"
Field Value
StepKnots
The speed step between barbs, in knots: 5.
public const int StepKnots = 5
Field Value
Properties
All
public static IReadOnlyList<WindBarb> All { get; }
Property Value
FullBarbs
The number of full barbs, 10 kn each.
public int FullBarbs { get; init; }
Property Value
HalfBarbs
The number of half barbs (0 or 1), 5 kn each.
public int HalfBarbs { get; init; }
Property Value
IsCalm
Whether this is the calm symbol (0 kn): no staff and no feathers.
public bool IsCalm { get; }
Property Value
Knots
The speed the barb stands for: a multiple of 5 kn from 0 (calm) to MaxKnots.
public int Knots { get; init; }
Property Value
Pennants
The number of pennants (flags), 50 kn each.
public int Pennants { get; init; }
Property Value
SouthernSymbolName
The southern-hemisphere symbol name: CalmSymbol (calm has
no side), or SouthernSymbolPrefix and the speed, e.g.
WXBARBS065.
public string SouthernSymbolName { get; }
Property Value
SymbolName
The northern-hemisphere symbol name: CalmSymbol, or
NorthernSymbolPrefix and the speed, e.g. WXBARBN065.
public string SymbolName { get; }
Property Value
Methods
FromKnots(double)
The barb for a wind speed in knots: rounded to the nearest StepKnots (halves round up, so 2.5 kn is a 5 kn barb), calm below CalmBelowKnots, and the MaxKnots barb for anything faster.
public static WindBarb FromKnots(double knots)
Parameters
knotsdoubleThe speed in knots; zero or more.
Returns
Exceptions
- ArgumentOutOfRangeException
knotsis negative or NaN.
FromSpeed(Speed)
The barb for a wind speed; see FromKnots(double).
public static WindBarb FromSpeed(Speed speed)
Parameters
speedSpeedThe speed; zero or more.
Returns
SymbolNameAt(double)
The symbol name for a station at latitude:
SouthernSymbolName south of the equator
(IsSouthern(double)), SymbolName otherwise.
public string SymbolNameAt(double latitude)
Parameters
latitudedoubleThe station's latitude in degrees.