WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
WXP::Level Class Reference

This class defines vertical level parameters. More...

#include "../include/Level.h"

Public Member Functions

 Level ()
 
 Level (int t1, float l1, int t2, float l2)
 
 Level (int t, float l1, float l2)
 
 Level (int t, int l)
 
 Level (const char *str)
 
int init ()
 
bool isSet ()
 
int decode (const char *str)
 
int toTypeCode ()
 
int toLevelCode ()
 
int set (int t1, float l1, int t2, float l2)
 
int set (int t, float l1, float l2)
 
int set (int t, float l)
 
int decode (int t, int l)
 
int set (const char *str)
 
int getType ()
 
int getType1 ()
 
int getType2 ()
 
float getLev1 ()
 
float getLev2 ()
 
int getLower (VCoord &vc)
 
int getUpper (VCoord &vc)
 
int toString (String &str)
 
int toLabel (String &str)
 
bool valid ()
 
int print ()
 
bool isLayer ()
 
bool isPres ()
 
bool isHght ()
 
bool isPot ()
 

Static Public Member Functions

static int toTypeCode (int type1, int type2)
 
static int toTypeCode (int type1)
 

Static Public Attributes

static const int NONE = -9999
 
static const int SND = 0
 
static const int SFC = 1
 
static const int CLD_BOT = 2
 
static const int CLD_TOP = 3
 
static const int FRZ = 4
 
static const int LCL = 5
 
static const int MWND = 6
 
static const int TROP = 7
 
static const int TOP = 8
 
static const int SEABOT = 9
 
static const int WHOLE = 10
 
static const int CB_BASE = 11
 
static const int CB_TOP = 12
 
static const int ISOTHERM = 20
 
static const int PR = 100
 
static const int MSL = 101
 
static const int HT = 102
 
static const int HAG = 103
 
static const int SIG = 104
 
static const int HYB = 105
 
static const int HBG = 106
 
static const int POT = 107
 
static const int PAG = 108
 
static const int POT_VORT = 109
 
static const int ETA = 111
 
static const int MISC = 199
 
static const int WHOLEL = 200
 
static const int TOP_FRZ = 204
 
static const int GSCLD_BOT = 206
 
static const int GSCLD_TOP = 207
 
static const int BLCLD_BOT = 209
 
static const int BLCLD_TOP = 210
 
static const int BLCLD_LYR = 211
 
static const int LCLD_BOT = 212
 
static const int LCLD_TOP = 213
 
static const int LCLD_LYR = 214
 
static const int CLD_CEIL = 215
 
static const int PBL = 220
 
static const int MCLD_BOT = 222
 
static const int MCLD_TOP = 223
 
static const int MCLD_LYR = 224
 
static const int HCLD_BOT = 232
 
static const int HCLD_TOP = 233
 
static const int HCLD_LYR = 234
 
static const int CONV_BOT = 242
 
static const int CONV_TOP = 243
 
static const int CONV_LYR = 244
 
static const int WBZERO = 245
 
static const int MAXEPOT = 246
 
static const int EQUILIB = 247
 
static const int SCCLD_BOT = 248
 
static const int SCCLD_TOP = 249
 
static const int DCCLD_BOT = 251
 
static const int DCCLD_TOP = 252
 
static const int SCLW_BOT = 253
 
static const int SCLW_TOP = 254
 

Detailed Description

This class defines vertical level parameters.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ Level() [1/5]

Level::Level ( )

Constructor. Initializes data values

References init().

◆ Level() [2/5]

Level::Level ( int  t1,
float  l1,
int  t2,
float  l2 
)

Constructor. Sets data values for layer

Parameters
t1Type of lower layer
l1Lower level
t2Type of upper layer
l2Upper level

References init(), and set().

◆ Level() [3/5]

Level::Level ( int  t,
float  l1,
float  l2 
)

Constructor. Sets data values for layer

Parameters
tType of layer
l1Lower level
l2Upper level

References init(), and set().

◆ Level() [4/5]

Level::Level ( int  t,
int  l 
)

Constructor. Sets data values for level

Parameters
tType of level
lLevel value

References init(), and set().

◆ Level() [5/5]

Level::Level ( const char *  str)

Constructor. Decoded from string

Parameters
strString to decode level values

References init(), and set().

Member Function Documentation

◆ decode() [1/2]

int Level::decode ( const char *  str)

Decodes level information from string

Parameters
strString to decode
none = no level
miss = no level
snd = whole sounding
sfc = surface level
frz = freezing level
lcl = Lift Condensation Level
sea = surface
sl = mean sea level
mwnd = max wind level
trop = tropopause level
whole = whole atmosphere
wholel = wholel atmosphere layer
top_frz = highest freezing level
cb_base = cumulonimbus base
cb_top = cumulonimbus top
isotherm = isothermal level
gscld_bot = grid scale layer cloud bottom
gscld_top = grid scale layer cloud top
blcld_bot = boundary layer cloud bottom
blcld_top = boundary layer cloud top
blcld_lyr = boundary layer cloud layer
lcld_bot = low cloud bottom
lcld_top = low cloud top
lcld_lyr = low cloud layer
cld_ceil = cloud ceiling
mcld_bot = mid cloud bottom
mcld_top = mid cloud top
mcld_lyr = mid cloud layer
hcld_bot = high cloud bottom
hcld_top = high cloud top
hcld_lyr = high cloud layer
conv_bot = high cloud bottom
conv_top = high cloud top
conv_lyr = high cloud layer
wbzero = wet bulb zero
maxepot = max equiv. pot. temperature
equilib = equilibrium level
pbl = planetary boundary layer
sccld_bot = shallow conv. cloud bottom
sccld_top = shallow conv. cloud top
dccld_bot = deep conv. cloud bottom
dccld_top = deep conv. cloud top
sclw_bot = supercool liquid water bottom
sclw_top = supercool liquid water top
p### = pressure level in mb
p###-### = pressure layer
h### = height level in meters
h###-### = height layer
a### = height above ground level in meters
a###-### = height above ground layer
k### = potential temperature level in K
k###-### = potential temperature layer
s### = sigma level
s###-### = sigma layer

lll = general level\n

-###lll = general layer\n

where lll is:
mb = pressure in mb
mb_ag = pressure above ground in mb
ft = height in feet
m = height in meters
ft_ag = height above ground in feet
m_ag = height above ground in meters
k = potential temperature
sig = sigma level
eta = eta level
pv = potential vorticity
hyb = hydrid level

References HAG, HT, WXP::StrLib::iequal(), init(), MISC, POT, PR, and SIG.

Referenced by set().

◆ decode() [2/2]

int Level::decode ( int  t,
int  l 
)

Sets the level values from level codes

Parameters
tType of level
lLevel value

References ETA, HAG, HBG, HT, HYB, init(), MSL, PAG, POT, POT_VORT, PR, and SIG.

◆ getLev1()

float WXP::Level::getLev1 ( )
inline

Get lower level value

◆ getLev2()

float WXP::Level::getLev2 ( )
inline

Get upper level value

◆ getLower()

int Level::getLower ( VCoord vc)

◆ getType()

int WXP::Level::getType ( )
inline

Get level type

◆ getType1()

int WXP::Level::getType1 ( )
inline

Get lower level type

◆ getType2()

int WXP::Level::getType2 ( )
inline

Get upper level type

◆ getUpper()

int Level::getUpper ( VCoord vc)

◆ init()

int Level::init ( )

Initializes data values

References WXP::Const::MISS, and NONE.

Referenced by decode(), decode(), WXP::VarSpec::init(), Level(), Level(), Level(), Level(), Level(), and set().

◆ isHght()

bool Level::isHght ( )

Is the level a height level

Returns
Whether a height level?

References HAG, and HT.

◆ isLayer()

bool Level::isLayer ( )

Is the level a layer

Returns
Whether a layer?

References NONE.

◆ isPot()

bool Level::isPot ( )

Is the level a potential temperature level

Returns
Whether an isentropic level?

References POT.

◆ isPres()

bool Level::isPres ( )

Is the level a pressure level

Returns
Whether a pressure level?

References PAG, PR, and SFC.

◆ isSet()

bool WXP::Level::isSet ( )
inline

Is level set

References NONE.

◆ print()

int Level::print ( )

Prints data values to standard output

Referenced by WXP::VarSpec::printDetails().

◆ set() [1/4]

int Level::set ( const char *  str)

Sets the level values from a string

Parameters
strString to decode

References decode().

◆ set() [2/4]

int Level::set ( int  t,
float  l 
)

Sets the level values for a single level

Parameters
tType of layer
lLevel

References init().

◆ set() [3/4]

int Level::set ( int  t,
float  lev1,
float  lev2 
)

Sets the level values given a layer

Parameters
tType of layer
l1Lower level
l2Upper level

References WXP::Const::MISS.

◆ set() [4/4]

int Level::set ( int  t1,
float  lev1,
int  t2,
float  lev2 
)

Sets the level values given a layer

Parameters
t1Type of layer
l1Lower level
t2Type of layer
l2Upper level

References WXP::Const::MISS, PR, and SIG.

Referenced by WXP::UpaRaw::compute(), WXP::UpaPlot::draw(), Level(), Level(), Level(), Level(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), and WXP::Grid::setLevel().

◆ toLabel()

int Level::toLabel ( String str)

◆ toLevelCode()

int Level::toLevelCode ( )

Outputs a level code combining both levels into a single number

Returns
Level code

References ETA, HAG, HBG, HT, HYB, WXP::Const::MISS, MSL, NONE, PAG, POT, POT_VORT, PR, SIG, and WHOLEL.

Referenced by WXP::WmoIngest::process().

◆ toString()

int Level::toString ( String str)

◆ toTypeCode() [1/3]

int Level::toTypeCode ( )

Outputs a level type code

Returns
Level type code

References toTypeCode().

Referenced by WXP::WmoIngest::process(), WXP::GribFile::readPDB(), toTypeCode(), and toTypeCode().

◆ toTypeCode() [2/3]

int Level::toTypeCode ( int  type1)
static

Converts type to code (GRIB1 code)

Parameters
type1The type

References NONE, and toTypeCode().

◆ toTypeCode() [3/3]

int Level::toTypeCode ( int  type1,
int  type2 
)
static

Converts types to code (GRIB1 code)

Parameters
type1The first type
type2The second type

References ETA, HAG, HBG, HT, HYB, MSL, NONE, PAG, POT, PR, and SIG.

◆ valid()

bool WXP::Level::valid ( )
inline

Is level valid

References WXP::Const::MISS.

Member Data Documentation

◆ BLCLD_BOT

const int WXP::Level::BLCLD_BOT = 209
static

Boundary layer cloud bottom

Referenced by toLabel(), and toString().

◆ BLCLD_LYR

const int WXP::Level::BLCLD_LYR = 211
static

Boundary layer cloud layer

Referenced by toLabel(), and toString().

◆ BLCLD_TOP

const int WXP::Level::BLCLD_TOP = 210
static

Boundary layer cloud top

Referenced by toLabel(), and toString().

◆ CB_BASE

const int WXP::Level::CB_BASE = 11
static

Cumulnumbus base

Referenced by toLabel(), and toString().

◆ CB_TOP

const int WXP::Level::CB_TOP = 12
static

Cumulnumbus top

Referenced by toLabel(), and toString().

◆ CLD_BOT

const int WXP::Level::CLD_BOT = 2
static

Cloud bottom

Referenced by toLabel(), and toString().

◆ CLD_CEIL

const int WXP::Level::CLD_CEIL = 215
static

Cloud ceiling

Referenced by toLabel(), and toString().

◆ CLD_TOP

const int WXP::Level::CLD_TOP = 3
static

Cloud top

Referenced by toLabel(), and toString().

◆ CONV_BOT

const int WXP::Level::CONV_BOT = 242
static

Convective cloud bottom

Referenced by toLabel(), and toString().

◆ CONV_LYR

const int WXP::Level::CONV_LYR = 244
static

Convective cloud layer

Referenced by toLabel(), and toString().

◆ CONV_TOP

const int WXP::Level::CONV_TOP = 243
static

Convective cloud top

Referenced by toLabel(), and toString().

◆ DCCLD_BOT

const int WXP::Level::DCCLD_BOT = 251
static

Deep convect cloud bottom

Referenced by toLabel(), and toString().

◆ DCCLD_TOP

const int WXP::Level::DCCLD_TOP = 252
static

Deep convect cloud top

Referenced by toLabel(), and toString().

◆ EQUILIB

const int WXP::Level::EQUILIB = 247
static

Equilibrium level

Referenced by toLabel(), and toString().

◆ ETA

const int WXP::Level::ETA = 111
static

Eta level

Referenced by decode(), toLevelCode(), and toTypeCode().

◆ FRZ

const int WXP::Level::FRZ = 4
static

Freezing level

Referenced by getLower(), getUpper(), toLabel(), and toString().

◆ GSCLD_BOT

const int WXP::Level::GSCLD_BOT = 206
static

Grid scale layer cloud bottom

Referenced by toLabel(), and toString().

◆ GSCLD_TOP

const int WXP::Level::GSCLD_TOP = 207
static

Grid scale layer cloud top

Referenced by toLabel(), and toString().

◆ HAG

const int WXP::Level::HAG = 103
static

◆ HBG

const int WXP::Level::HBG = 106
static

◆ HCLD_BOT

const int WXP::Level::HCLD_BOT = 232
static

High cloud bottom

Referenced by toLabel(), and toString().

◆ HCLD_LYR

const int WXP::Level::HCLD_LYR = 234
static

High cloud layer

Referenced by toLabel(), and toString().

◆ HCLD_TOP

const int WXP::Level::HCLD_TOP = 233
static

High cloud top

Referenced by toLabel(), and toString().

◆ HT

const int WXP::Level::HT = 102
static

◆ HYB

const int WXP::Level::HYB = 105
static

Hybrid level

Referenced by decode(), toLabel(), toLevelCode(), toString(), and toTypeCode().

◆ ISOTHERM

const int WXP::Level::ISOTHERM = 20
static

Isothermal level

Referenced by toLabel(), and toString().

◆ LCL

const int WXP::Level::LCL = 5
static

◆ LCLD_BOT

const int WXP::Level::LCLD_BOT = 212
static

Low cloud bottom

Referenced by toLabel(), and toString().

◆ LCLD_LYR

const int WXP::Level::LCLD_LYR = 214
static

Low cloud layer

Referenced by toLabel(), and toString().

◆ LCLD_TOP

const int WXP::Level::LCLD_TOP = 213
static

Low cloud top

Referenced by toLabel(), and toString().

◆ MAXEPOT

const int WXP::Level::MAXEPOT = 246
static

Maximum equiv potential temp level

Referenced by toLabel(), and toString().

◆ MCLD_BOT

const int WXP::Level::MCLD_BOT = 222
static

Middle cloud bottom

Referenced by toLabel(), and toString().

◆ MCLD_LYR

const int WXP::Level::MCLD_LYR = 224
static

Middle cloud layer

Referenced by toLabel(), and toString().

◆ MCLD_TOP

const int WXP::Level::MCLD_TOP = 223
static

Middle cloud top

Referenced by toLabel(), and toString().

◆ MISC

const int WXP::Level::MISC = 199
static

Misc level

Referenced by decode(), toLabel(), and toString().

◆ MSL

const int WXP::Level::MSL = 101
static

◆ MWND

const int WXP::Level::MWND = 6
static

Maximum wind level

Referenced by getLower(), getUpper(), toLabel(), and toString().

◆ NONE

const int WXP::Level::NONE = -9999
static

◆ PAG

const int WXP::Level::PAG = 108
static

◆ PBL

const int WXP::Level::PBL = 220
static

Planetary boundary layer

Referenced by toLabel(), and toString().

◆ POT

const int WXP::Level::POT = 107
static

◆ POT_VORT

const int WXP::Level::POT_VORT = 109
static

Potential vorticty level

Referenced by decode(), WXP::GribFile::readPDS(), toLabel(), toLevelCode(), and toString().

◆ PR

const int WXP::Level::PR = 100
static

◆ SCCLD_BOT

const int WXP::Level::SCCLD_BOT = 248
static

Shallow convect cloud bottom

Referenced by toLabel(), and toString().

◆ SCCLD_TOP

const int WXP::Level::SCCLD_TOP = 249
static

Shallow convect cloud top

Referenced by toLabel(), and toString().

◆ SCLW_BOT

const int WXP::Level::SCLW_BOT = 253
static

Supercool liquid water bottom

Referenced by toLabel(), and toString().

◆ SCLW_TOP

const int WXP::Level::SCLW_TOP = 254
static

Supercool liquid water top

Referenced by toLabel(), and toString().

◆ SEABOT

const int WXP::Level::SEABOT = 9
static

Sea bottom

◆ SFC

const int WXP::Level::SFC = 1
static

◆ SIG

const int WXP::Level::SIG = 104
static

◆ SND

const int WXP::Level::SND = 0
static

Whole sounding

Referenced by toLabel(), and toString().

◆ TOP

const int WXP::Level::TOP = 8
static

Top of atmosphere

Referenced by toLabel(), and toString().

◆ TOP_FRZ

const int WXP::Level::TOP_FRZ = 204
static

Top freezing level

Referenced by toLabel(), and toString().

◆ TROP

const int WXP::Level::TROP = 7
static

Tropopause

Referenced by getLower(), getUpper(), toLabel(), and toString().

◆ WBZERO

const int WXP::Level::WBZERO = 245
static

Wet bulb zero

Referenced by toLabel(), and toString().

◆ WHOLE

const int WXP::Level::WHOLE = 10
static

Whole atmosphere

Referenced by toLabel(), and toString().

◆ WHOLEL

const int WXP::Level::WHOLEL = 200
static

Whole atmosphere layer

Referenced by toLabel(), toLevelCode(), and toString().


The documentation for this class was generated from the following files: