visad.meteorology
Class WeatherSymbols

java.lang.Object
  extended by visad.meteorology.WeatherSymbols

public class WeatherSymbols
extends Object

Utility class to create shapes for weather symbols. Shapes are stroke generated from the "wmo" HersheyFont.

See Also:
"WMO Manual on Codes for a description of WMO weather codes."

Field Summary
static int HICLD_NUM
          Number of high cloud symbols
static int ICING_NUM
          Number of icing symbols
static int LIGHTNING_NUM
          Number of lightning symbols
static int LOCLD_NUM
          Number of low cloud symbols
static int MIDCLD_NUM
          Number of mid cloud symbols
static int MISC_NUM
          Number of miscellaneous symbols
static int PRESENTWX_NUM
          Number of WMO weather symbols
static int SKY_NUM
          Number of cloud coverage symbols
static int TNDCY_NUM
          Number of pressure tendency symbols
static int TURB_NUM
          Number of turbulence symbols
 
Constructor Summary
WeatherSymbols()
          Default constructor.
 
Method Summary
static VisADLineArray[] getAllMetSymbols()
          Get the array of shapes corresponding to the WMO present weather codes, plus the GEMPAK extensions.
static VisADLineArray getCloudCoverageSymbol(int ccCode)
          Get the shape corresponding to a total sky cover code.
static VisADLineArray[] getCloudCoverageSymbols()
          Get the array of shapes corresponding to the cloud coverage codes.
static VisADLineArray getHighCloudSymbol(int hcCode)
          Get the shape corresponding to a particular high cloud code.
static VisADLineArray[] getHighCloudSymbols()
          Get the array of shapes corresponding to the high cloud codes.
static VisADLineArray getIcingSymbol(int icingCode)
          Get the shape corresponding to a particular icing symbol code.
static VisADLineArray[] getIcingSymbols()
          Get the array of shapes corresponding to the icing codes.
static VisADLineArray getLightningSymbol(int lghtCode)
          Get the shape corresponding to a particular lightning code.
static VisADLineArray[] getLightningSymbols()
          Get the array of shapes corresponding to lightning symbols
static VisADLineArray getLowCloudSymbol(int lcCode)
          Get the shape corresponding to a particular low cloud code.
static VisADLineArray[] getLowCloudSymbols()
          Get the array of shapes corresponding to the low cloud codes.
static VisADLineArray getMidCloudSymbol(int mcCode)
          Get the shape corresponding to a particular mid level cloud code.
static VisADLineArray[] getMidCloudSymbols()
          Get the array of shapes corresponding to the mid cloud codes.
static VisADLineArray getMiscSymbol(int miscCode)
          Get the shape corresponding to a particular miscellaneous symbol.
static VisADLineArray[] getMiscSymbols()
          Get the array of shapes corresponding to the miscellaneous codes.
static VisADLineArray getPresentWeatherSymbol(int wxCode)
          Get the shape corresponding to a particular present weather code.
static VisADLineArray[] getPresentWeatherSymbols()
          Get the array of shapes corresponding to the WMO present weather codes, plus the GEMPAK extensions.
static VisADLineArray getPressureTendencySymbol(int tendencyCode)
          Get the shape corresponding to a particular pressure tendency code.
static VisADLineArray[] getPressureTendencySymbols()
          Get the array of shapes corresponding to the pressure tendency symbol codes.
static VisADLineArray getSymbol(int index)
          Look up the symbol directly in the full array
static VisADLineArray getTurbulenceSymbol(int turbCode)
          Get the shape corresponding to a particular turbulence symbol code.
static VisADLineArray[] getTurbulenceSymbols()
          Get the array of shapes corresponding to the turbulence codes.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRESENTWX_NUM

public static final int PRESENTWX_NUM
Number of WMO weather symbols

See Also:
Constant Field Values

LOCLD_NUM

public static final int LOCLD_NUM
Number of low cloud symbols

See Also:
Constant Field Values

MIDCLD_NUM

public static final int MIDCLD_NUM
Number of mid cloud symbols

See Also:
Constant Field Values

HICLD_NUM

public static final int HICLD_NUM
Number of high cloud symbols

See Also:
Constant Field Values

TNDCY_NUM

public static final int TNDCY_NUM
Number of pressure tendency symbols

See Also:
Constant Field Values

SKY_NUM

public static final int SKY_NUM
Number of cloud coverage symbols

See Also:
Constant Field Values

ICING_NUM

public static final int ICING_NUM
Number of icing symbols

See Also:
Constant Field Values

TURB_NUM

public static final int TURB_NUM
Number of turbulence symbols

See Also:
Constant Field Values

MISC_NUM

public static final int MISC_NUM
Number of miscellaneous symbols

See Also:
Constant Field Values

LIGHTNING_NUM

public static final int LIGHTNING_NUM
Number of lightning symbols

See Also:
Constant Field Values
Constructor Detail

WeatherSymbols

public WeatherSymbols()
Default constructor.

Method Detail

getPresentWeatherSymbols

public static VisADLineArray[] getPresentWeatherSymbols()
Get the array of shapes corresponding to the WMO present weather codes, plus the GEMPAK extensions.

Returns:
the array of shapes

getAllMetSymbols

public static VisADLineArray[] getAllMetSymbols()
Get the array of shapes corresponding to the WMO present weather codes, plus the GEMPAK extensions.

Returns:
the array of shapes

getPresentWeatherSymbol

public static VisADLineArray getPresentWeatherSymbol(int wxCode)
Get the shape corresponding to a particular present weather code. The number of codes are too numerous to list here.

Parameters:
wxCode - weather code
Returns:
shape for code

getPressureTendencySymbols

public static VisADLineArray[] getPressureTendencySymbols()
Get the array of shapes corresponding to the pressure tendency symbol codes.

Returns:
the array of shapes
See Also:
for the indices

getPressureTendencySymbol

public static VisADLineArray getPressureTendencySymbol(int tendencyCode)
Get the shape corresponding to a particular pressure tendency code. Codes are:
   0  -  rising then falling
   1  -  rising then steady; or rising, then rising more slowly
   2  -  rising steadily or unsteadily
   3  -  falling or steady, then rising; or rising, 
           then rising more quickly
   4  -  steady, same as 3 hours ago
   5  -  falling then rising, same or lower than 3 hours ago
   6  -  falling then steady; or falling, then falling more slowly
   7  -  falling steadily, or unsteadily
   8  -  steady or rising, then falling; or falling, 
           then falling more quickly
 

Parameters:
tendencyCode - tendency code to use
Returns:
corresponding shape

getCloudCoverageSymbols

public static VisADLineArray[] getCloudCoverageSymbols()
Get the array of shapes corresponding to the cloud coverage codes.

Returns:
the array of shapes
See Also:
for codes

getSymbol

public static VisADLineArray getSymbol(int index)
Look up the symbol directly in the full array

Parameters:
index - array index
Returns:
The symbol

getCloudCoverageSymbol

public static VisADLineArray getCloudCoverageSymbol(int ccCode)
Get the shape corresponding to a total sky cover code. Codes are:
   0  -  No clouds
   1  -  Less than one-tenth or one-tenth
   2  -  two-tenths or three-tenths
   3  -  four-tenths
   4  -  five-tenths
   5  -  six-tenths
   6  -  seven-tenths or eight-tenths
   7  -  nine-tenths or overcast with openings
   8  -  completely overcast
   9  -  sky obscured
  10  -  missing
 

Parameters:
ccCode - cloud coverage code to use
Returns:
corresponding shape

getLowCloudSymbols

public static VisADLineArray[] getLowCloudSymbols()
Get the array of shapes corresponding to the low cloud codes.

Returns:
the array of shapes
See Also:
for codes

getLowCloudSymbol

public static VisADLineArray getLowCloudSymbol(int lcCode)
Get the shape corresponding to a particular low cloud code. Codes are:
   1  -  Cu of fair weather, little vertical development,
            seemingly flattened
   2  -  Cu of considerable development, generally towering,
            with or without other Cu or Sc bases all at same level
   3  -  Cb with tops lacking clear cut outlines, but distinctly
            no cirriform or anvil-shaped; with or without Cu, Sc, or St
   4  -  Sc formed by spreading out of Cu; Cu often present also
   5  -  Sc not formed by spreading out of Cu
   6  -  St or Fs or both, but no Fs of bad weather
   7  -  Fs and/or Fc of bad weather (scud)
   8  -  Cu and Sc (not formed by spreading out of Cu) with bases 
            at different levels
   9  -  Cb having a clearly fibrous (cirriform) top, often anvil-shaped,
            with or without Cu, Sc, St, or scud
 

Parameters:
lcCode - low cloud code to use
Returns:
corresponding shape

getMidCloudSymbols

public static VisADLineArray[] getMidCloudSymbols()
Get the array of shapes corresponding to the mid cloud codes.

Returns:
the array of shapes
See Also:
for codes

getMidCloudSymbol

public static VisADLineArray getMidCloudSymbol(int mcCode)
Get the shape corresponding to a particular mid level cloud code. Codes are:
   1  -  Thin As (most of cloud layer semi-transparent)
   2  -  Thick As, greater part sufficiently dense to hide sun 
           (or moon), or Ns
   3  -  Thin Ac, mostly semi-transparent; cloud elements not changing
           much and at a single level
   4  -  Thin Ac in patches; cloud elements continually changing and/or
           occurring at more than one level
   5  -  Thin Ac in bands or in a layer gradually spreading over sky
           and usually thickening as a whole
   6  -  Ac formed by spreading out of Cu
   7  -  Double-layered Ac, or a thick layer of Ac, not increasing;
           or Ac with As and/or Ns
   8  -  Ac in the form of Cu-shaped tufts or Ac with turrets
   9  -  Ac of a chaotic sky, usually at different levels; patches of
           dense Ci are usually present also
 

Parameters:
mcCode - mid cloud code to use
Returns:
corresponding shape

getHighCloudSymbols

public static VisADLineArray[] getHighCloudSymbols()
Get the array of shapes corresponding to the high cloud codes.

Returns:
the array of shapes
See Also:
for codes

getHighCloudSymbol

public static VisADLineArray getHighCloudSymbol(int hcCode)
Get the shape corresponding to a particular high cloud code. Codes are:
   1  -  Filaments of Ci, or "mares tails", scattered and not increasing
   2  -  Dense Ci in patches or twisted sheaves, usually not increasing,
           sometimes like remains of Cb; or towers or tufts
   3  -  Dense Ci, often anvil shaped derived from or associated with Cb
   4  -  Ci, often hook shaped, spreading over the sky and usually
           thickening as a whole
   5  -  Ci and Cs, often in converging bands, or Cs alone; generally
           overspreading and growing denser; the continuous layer 
           not reaching 45 degrees altitude
   6  -  Ci and Cs, often in converging bands, or Cs alone; generally
           overspreading and growing denser; the continuous layer 
           exceeding 45 degrees altitude
   7  -  Veil of Cs covering the entire sky
   8  -  Cs not increasing and not covering the entire sky
   9  -  Cc alone or Cc with some Ci or Cs, but the Cc being the main
           cirriform cloud
 

Parameters:
hcCode - high cloud code to use
Returns:
corresponding shape

getIcingSymbols

public static VisADLineArray[] getIcingSymbols()
Get the array of shapes corresponding to the icing codes.

Returns:
the array of shapes
See Also:
for codes

getIcingSymbol

public static VisADLineArray getIcingSymbol(int icingCode)
Get the shape corresponding to a particular icing symbol code. Codes are:
   0  -  No icing
   1  -  Trace icing
   2  -  Trace to light icing
   3  -  Light icing
   4  -  Light to moderate icing
   5  -  Moderate icing
   6  -  Moderate to heavy icing
   7  -  Heavy or moderate to severe icing
   8  -  Severe icing
   9  -  Light superstructure icing
  10  -  Heavy superstructure icing
 

Parameters:
icingCode - icing code to use
Returns:
corresponding shape

getTurbulenceSymbols

public static VisADLineArray[] getTurbulenceSymbols()
Get the array of shapes corresponding to the turbulence codes.

Returns:
the array of shapes
See Also:
for codes

getTurbulenceSymbol

public static VisADLineArray getTurbulenceSymbol(int turbCode)
Get the shape corresponding to a particular turbulence symbol code. Codes are:
   0  -  No turbulence
   1  -  Light turbulence
   2  -  Light turbulence
   3  -  Light to moderate turbulence
   4  -  Moderate turbulence
   5  -  Moderate to severe turbulence
   6  -  Severe turbulence
   7  -  Extreme turbulence
   8  -  Extreme turbulence
 

Parameters:
turbCode - turbulence code to use
Returns:
corresponding shape

getMiscSymbols

public static VisADLineArray[] getMiscSymbols()
Get the array of shapes corresponding to the miscellaneous codes.

Returns:
the array of shapes
See Also:
for codes

getMiscSymbol

public static VisADLineArray getMiscSymbol(int miscCode)
Get the shape corresponding to a particular miscellaneous symbol. Codes are:
   0  -  Square (outline)            16 - Tropical Storm (NH)
   1  -  Square (filled)             17 - Hurricane (NH)
   2  -  Circle (outline)            18 - Tropical Storm (SH)
   3  -  Circle (filled)             19 - Hurricane (SH)
   4  -  Triangle (outline)          20 - Triangle with antenna
   5  -  Triangle (filled)           21 - Mountain obscuration
   6  -  Diamond (outline)           22 - Slash
   7  -  Diamond (filled)            23 - Storm Center
   8  -  Star (outline)              24 - Tropical Depression
   9  -  Star (filled)               25 - Tropical Cyclone
  10  - High Pressure (outline)      26 - Flame
  11  - Low Pressure (outline)       27 - "X" Cross
  12  - High Pressure (filled)       28 - Low pressure with X (outline)
  13  - Low Pressure (filled)        29 - Low pressure with X (filled)
  14  - Plus sign                    30 - Tropical Storm (NH)
  15  - Minus sign                   31 - Tropical Storm (SH)
  32  - Volcanic activity            33 - Blowing spray
 

Parameters:
miscCode - miscellaneous code to use
Returns:
corresponding shape

getLightningSymbols

public static VisADLineArray[] getLightningSymbols()
Get the array of shapes corresponding to lightning symbols

Returns:
the array of shapes
See Also:
for codes

getLightningSymbol

public static VisADLineArray getLightningSymbol(int lghtCode)
Get the shape corresponding to a particular lightning code. Codes are:
   0  -  Negative flash
   1  -  Positive flash
 

Parameters:
lghtCode - lightning code to use
Returns:
corresponding shape

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception