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

This class stores MOS data. More...

#include "../include/MosData.h"

Public Types

enum  Model {
  NONE , NGM , AVN , GFS ,
  ETA , NAM , MRF , GFSX ,
  LFM , LAMP
}
 

Public Member Functions

 MosData ()
 
int init ()
 
int setId (const char *rid)
 
int setId (const char *rid, float rlat, float rlon)
 
const char * getId ()
 
int getLoc (float &rlat, float &rlon)
 
int getLoc (EarthPoint &ept)
 
EarthPoint getLoc ()
 
float getLat ()
 
float getLon ()
 
int setElev (float relev)
 
float getElev ()
 
int getSeconds ()
 
int setDate (Date &rdate)
 
int getDate (Date &rdate)
 
Date getDate ()
 
int setModel (int val)
 
int getModel ()
 
int setNum (int val)
 
int getNum ()
 
int setHour (int ind, int val)
 
int getHour (int ind)
 
int getInd (float hr)
 
int setT (int ind, int val)
 
int getT (int ind)
 
int setTd (int ind, int val)
 
int getTd (int ind)
 
int setCover (int ind, char val)
 
char getCover (int ind)
 
int setCeiling (int ind, int val)
 
int getCeiling (int ind)
 
int setVis (int ind, int val)
 
int getVis (int ind)
 
int setObvis (int ind, const char *val)
 
int getObvis (int ind, String &str)
 
int setTMax (int ind, int val)
 
int getTMax (int ind)
 
int setTMin (int ind, int val)
 
int getTMin (int ind)
 
int setWDir (int ind, int val)
 
int getWDir (int ind)
 
int setWSpd (int ind, int val)
 
int getWSpd (int ind)
 
int setPop6 (int ind, int val)
 
int getPop6 (int ind)
 
int setPop12 (int ind, int val)
 
int getPop12 (int ind)
 
int setPop24 (int ind, int val)
 
int getPop24 (int ind)
 
int setPot6 (int ind, int val)
 
int getPot6 (int ind)
 
int setPot12 (int ind, int val)
 
int getPot12 (int ind)
 
int setPot24 (int ind, int val)
 
int getPot24 (int ind)
 
int setPost6 (int ind, int val)
 
int getPost6 (int ind)
 
int setPost12 (int ind, int val)
 
int getPost12 (int ind)
 
int setPType (int ind, char val)
 
char getPType (int ind)
 
int setQpf6 (int ind, int val)
 
int getQpf6 (int ind)
 
int setQpf12 (int ind, int val)
 
int getQpf12 (int ind)
 
int setQsf6 (int ind, int val)
 
int getQsf6 (int ind)
 
int setQsf12 (int ind, int val)
 
int getQsf12 (int ind)
 
float cldHght (int ind)
 
float visibility (int ind)
 
float quantPrec6 (int ind)
 
float quantPrec12 (int ind)
 
float quantPrec24 (int ind)
 
float snow6 (int ind)
 
float snow12 (int ind)
 
float snow24 (int ind)
 
int weather6 (int ind, String &wx6)
 
int weather12 (int ind, String &wx12)
 
int getNMax ()
 
int getNMin ()
 
int getNPop ()
 
int print ()
 
int printTable ()
 

Static Public Attributes

static const int NumData = 45
 

Friends

class MosFile
 
class MosDataTool
 

Detailed Description

This class stores MOS data.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ MosData()

MosData::MosData ( )

Constructor. Initializes class data

References init().

Member Function Documentation

◆ cldHght()

float MosData::cldHght ( int  ind)

Converts a cloud ceiling code to actual height

Parameters
indIndex of forecast
Returns
Cloud height in 100s of feet;

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute(), print(), and printTable().

◆ getCeiling()

int MosData::getCeiling ( int  ind)

Gets the cloud ceiling code of a forecast

Parameters
indIndex of forecast to get data
Returns
Cloud ceiling code

References WXP::Const::MISS.

◆ getCover()

char MosData::getCover ( int  ind)

Gets the cloud cover of a forecast

Parameters
indIndex of forecast to get data
Returns
Cloud cover

Referenced by WXP::MosDataTool::compute().

◆ getDate() [1/2]

Date MosData::getDate ( )

Gets the initial date of the filecast

Returns
Date class containing initial date

◆ getDate() [2/2]

int MosData::getDate ( Date rdate)

Gets the initial date of the forecast

Return values
rdateDate of initial data

◆ getElev()

float MosData::getElev ( )

Gets the elevation

Returns
Elevation of station

◆ getHour()

int MosData::getHour ( int  ind)

Gets the forecast hour of a forecast

Parameters
indIndex of forecast to get data
Returns
Forecast hour

References WXP::Const::MISS.

◆ getId()

const char * MosData::getId ( )

Gets the station identifier

Returns
Station identifier string

Referenced by WXP::MosDataTool::compute(), and WXP::MosRaw::compute().

◆ getInd()

int MosData::getInd ( float  hr)

Returns the index given the forecast hour

Parameters
hrThe forecast hour
Returns
The index in the data arrays for that forecast

Referenced by WXP::MosDataTool::compute().

◆ getLat()

float WXP::MosData::getLat ( )
inline

Returns the latitude of the station

◆ getLoc() [1/3]

EarthPoint MosData::getLoc ( )

Gets the location of the station

Returns
EarthPoint class with location

References WXP::EarthPoint::set().

◆ getLoc() [2/3]

int MosData::getLoc ( EarthPoint ept)

Gets the location of the station

Return values
eptThe EarthPoint class to put location

References WXP::EarthPoint::set().

◆ getLoc() [3/3]

int MosData::getLoc ( float &  rlat,
float &  rlon 
)

Gets the location of the station

Return values
rlatLatitude of station
rlonLongitude of station

◆ getLon()

float WXP::MosData::getLon ( )
inline

Returns the longitude of the station

◆ getModel()

int MosData::getModel ( )

Gets the model designator

Returns
Integral model designator

◆ getNMax()

int WXP::MosData::getNMax ( )
inline

Returns the normal maximum temperature

Referenced by WXP::MosDataTool::compute().

◆ getNMin()

int WXP::MosData::getNMin ( )
inline

Returns the normal minimum temperature

Referenced by WXP::MosDataTool::compute().

◆ getNPop()

int WXP::MosData::getNPop ( )
inline

Returns the normal probability of precipitation

◆ getNum()

int MosData::getNum ( )

Gets the number of forecast times

Returns
Number of forecast times

◆ getObvis()

int MosData::getObvis ( int  ind,
String str 
)

Gets the obscuration type of a forecast

Parameters
indIndex of forecast to get data
Returns
Obscuration type (F,H,B)

References WXP::String::copy().

Referenced by WXP::MosDataTool::compute().

◆ getPop12()

int MosData::getPop12 ( int  ind)

Gets the 12 hour probability or precip of a forecast

Parameters
indIndex of forecast to get data
Returns
12 hour POP

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPop24()

int MosData::getPop24 ( int  ind)

Gets the 24 hour probability or precip of a forecast

Parameters
indIndex of forecast to get data
Returns
12 hour POP

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPop6()

int MosData::getPop6 ( int  ind)

Gets the 6 hour probability or precip of a forecast

Parameters
indIndex of forecast to get data
Returns
6 hour POP

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPost12()

int MosData::getPost12 ( int  ind)

Gets the 12 hour probability of severe storms of a forecast

Parameters
indIndex of forecast to get data
Returns
12 hour prob of severe

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPost6()

int MosData::getPost6 ( int  ind)

Gets the 6 hour probability of severe storms of a forecast

Parameters
indIndex of forecast to get data
Returns
6 hour prob of severe

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPot12()

int MosData::getPot12 ( int  ind)

Gets the 12 hour probability of thunderstorms of a forecast

Parameters
indIndex of forecast to get data
Returns
12 hour prob of thunder

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPot24()

int MosData::getPot24 ( int  ind)

Gets the 24 hour probability of thunderstorms of a forecast

Parameters
indIndex of forecast to get data
Returns
24 hour prob of thunder

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPot6()

int MosData::getPot6 ( int  ind)

Gets the 6 hour probability of thunderstorms of a forecast

Parameters
indIndex of forecast to get data
Returns
6 hour prob of thunder

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getPType()

char MosData::getPType ( int  ind)

Gets the precipitation type of a forecast

Parameters
indIndex of forecast to get data
Returns
Precipitation type (R,S,Z)

Referenced by WXP::MosDataTool::compute().

◆ getQpf12()

int MosData::getQpf12 ( int  ind)

Gets the 12 hour quantitative precipitation code of a forecast

Parameters
indIndex of forecast to get data
Returns
12 hour QPF code

References WXP::Const::MISS.

◆ getQpf6()

int MosData::getQpf6 ( int  ind)

Gets the 6 hour quantitative precipitation code of a forecast

Parameters
indIndex of forecast to get data
Returns
6 hour QPF code

References WXP::Const::MISS.

◆ getQsf12()

int MosData::getQsf12 ( int  ind)

Gets the 12 hour quantitative snow code of a forecast

Parameters
indIndex of forecast to get data
Returns
12 hour QSF code

References WXP::Const::MISS.

◆ getQsf6()

int MosData::getQsf6 ( int  ind)

Gets the 6 hour quantitative snow code of a forecast

Parameters
indIndex of forecast to get data
Returns
6 hour QSF code

References WXP::Const::MISS.

◆ getSeconds()

int MosData::getSeconds ( )

Gets Unix time in seconds for initial forecast time

Returns
Seconds since 1/1/1970 (Unix time)

References WXP::Date::getSeconds().

◆ getT()

int MosData::getT ( int  ind)

Gets the temperature of a forecast

Parameters
indIndex of forecast to get data
Returns
Temperature

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getTd()

int MosData::getTd ( int  ind)

Gets the dewpoint of a forecast

Parameters
indIndex of forecast to get data
Returns
Dewpoint

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getTMax()

int MosData::getTMax ( int  ind)

Gets the maximum temperature hour of a forecast

Parameters
indIndex of forecast to get data
Returns
Extreme temperature

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getTMin()

int MosData::getTMin ( int  ind)

Gets the maximum temperature hour of a forecast

Parameters
indIndex of forecast to get data
Returns
Extreme temperature

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getVis()

int MosData::getVis ( int  ind)

Gets the visibility code of a forecast

Parameters
indIndex of forecast to get data
Returns
Integral visibility code

References WXP::Const::MISS.

◆ getWDir()

int MosData::getWDir ( int  ind)

Gets the wind direction of a forecast

Parameters
indIndex of forecast to get data
Returns
Wind direction in degrees

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ getWSpd()

int MosData::getWSpd ( int  ind)

Gets the wind speed of a forecast

Parameters
indIndex of forecast to get data
Returns
Wind speed

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute().

◆ init()

int MosData::init ( )

Initializes class data

References WXP::Const::MISS.

Referenced by MosData(), and WXP::MosFile::read().

◆ print()

int MosData::print ( )

◆ printTable()

int MosData::printTable ( )

◆ quantPrec12()

float MosData::quantPrec12 ( int  ind)

Converts the 12 hour QPF code to rainfall

Parameters
indIndex of forecast
Returns
Actual rainfall in inches

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute(), and print().

◆ quantPrec24()

float MosData::quantPrec24 ( int  ind)

Converts the 24 hour QPF code to rainfall

Parameters
indIndex of forecast
Returns
Actual rainfall in inches

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute(), and print().

◆ quantPrec6()

float MosData::quantPrec6 ( int  ind)

Converts the 6 hour QPF code to rainfall

Parameters
indIndex of forecast
Returns
QPF in inches

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute(), and print().

◆ setCeiling()

int MosData::setCeiling ( int  ind,
int  val 
)

Sets the cloud ceiling code of a forecast

Parameters
indIndex of forecast
valCloud ceiling code

◆ setCover()

int MosData::setCover ( int  ind,
char  val 
)

Sets the clour cover of a forecast

Parameters
indIndex of forecast
valCloud cover characeter (C,S,B,O)

◆ setDate()

int MosData::setDate ( Date rdate)

Sets the initial date of the forecast

Parameters
rdateDate of initial data

◆ setElev()

int MosData::setElev ( float  relev)

Sets the elevation

Parameters
relevElevation of station

◆ setHour()

int MosData::setHour ( int  ind,
int  val 
)

Sets the forecast hour of a forecast

Parameters
indIndex of forecast
valForecast hour

◆ setId() [1/2]

int MosData::setId ( const char *  rid)

Sets the station identifier

Parameters
ridStation identifier string

References WXP::StrLib::copy().

◆ setId() [2/2]

int MosData::setId ( const char *  rid,
float  rlat,
float  rlon 
)

Sets the station information

Parameters
ridStation identifier string
rlatLatitude of station
rlonLongitude of station

References WXP::StrLib::copy().

◆ setModel()

int MosData::setModel ( int  rmodel)

Sets the model designator

Parameters
rmodelIntegral model designator

◆ setNum()

int MosData::setNum ( int  val)

Sets the number of forecast times

Parameters
valNumber of forecast times

◆ setObvis()

int MosData::setObvis ( int  ind,
const char *  val 
)

Sets the obscuration type of a forecast

Parameters
indIndex of forecast
valObscuration type (F,H,B)

References WXP::StrLib::copy().

◆ setPop12()

int MosData::setPop12 ( int  ind,
int  val 
)

Sets the 12 hour probability of precip of a forecast

Parameters
indIndex of forecast
val12 hour POP

◆ setPop24()

int MosData::setPop24 ( int  ind,
int  val 
)

Sets the 24 hour probability of precip of a forecast

Parameters
indIndex of forecast
val12 hour POP

◆ setPop6()

int MosData::setPop6 ( int  ind,
int  val 
)

Sets the 6 hour probability of precip of a forecast

Parameters
indIndex of forecast
val6 hour POP

◆ setPost12()

int MosData::setPost12 ( int  ind,
int  val 
)

Sets the 12 hour probability of severe storms of a forecast

Parameters
indIndex of forecast
val12 hour prob of severe

◆ setPost6()

int MosData::setPost6 ( int  ind,
int  val 
)

Sets the 6 hour probability of severe storms of a forecast

Parameters
indIndex of forecast
val6 hour prob of severe

◆ setPot12()

int MosData::setPot12 ( int  ind,
int  val 
)

Sets the 12 hour probability of thunderstorms of a forecast

Parameters
indIndex of forecast
val12 hour prob of thunder

◆ setPot24()

int MosData::setPot24 ( int  ind,
int  val 
)

Sets the 24 hour probability of thunderstorms of a forecast

Parameters
indIndex of forecast
val24 hour prob of thunder

◆ setPot6()

int MosData::setPot6 ( int  ind,
int  val 
)

Sets the 6 hour probability of thunderstorms of a forecast

Parameters
indIndex of forecast
val6 hour prob of thunder

◆ setPType()

int MosData::setPType ( int  ind,
char  val 
)

Sets the precipitation type of a forecast

Parameters
indIndex of forecast
valPrecipitation type (R,S,Z)

◆ setQpf12()

int MosData::setQpf12 ( int  ind,
int  val 
)

Sets the 12 hour quantitative precipitation code of a forecast

Parameters
indIndex of forecast
val12 hour QPF code

◆ setQpf6()

int MosData::setQpf6 ( int  ind,
int  val 
)

Sets the 6 hour quantitative precipitation code of a forecast

Parameters
indIndex of forecast
valIntegral 6 hour QPF code

◆ setQsf12()

int MosData::setQsf12 ( int  ind,
int  val 
)

Sets the 12 hour quantitative snow code of a forecast

Parameters
indIndex of forecast
val12 hour QSF code

◆ setQsf6()

int MosData::setQsf6 ( int  ind,
int  val 
)

Sets the 6 hour quantitative snow code of a forecast

Parameters
indIndex of forecast
val6 hour QSF code

◆ setT()

int MosData::setT ( int  ind,
int  val 
)

Sets the temperature of a forecast

Parameters
indIndex of forecast
valTemperature

◆ setTd()

int MosData::setTd ( int  ind,
int  val 
)

Sets the dewpoint of a forecast

Parameters
indIndex of forecast
valDewpoint

◆ setTMax()

int MosData::setTMax ( int  ind,
int  val 
)

Sets the maximum temperature of a forecast

Parameters
indIndex of forecast
valExtreme temperature

◆ setTMin()

int MosData::setTMin ( int  ind,
int  val 
)

Sets the maximum temperature of a forecast

Parameters
indIndex of forecast
valExtreme temperature

◆ setVis()

int MosData::setVis ( int  ind,
int  val 
)

Sets the visibility code of a forecast

Parameters
indIndex of forecast
valIntegral visibility code

◆ setWDir()

int MosData::setWDir ( int  ind,
int  val 
)

Sets the wind direction of a forecast

Parameters
indIndex of forecast
valWind direction in degrees

◆ setWSpd()

int MosData::setWSpd ( int  ind,
int  val 
)

Sets the wind speed of a forecast

Parameters
indIndex of forecast
valWind speed

◆ snow12()

float MosData::snow12 ( int  ind)

Converts the 12 hour QSF code into snowfall

Parameters
indIndex of forecast
Returns
Actual snowfall in inches

Referenced by WXP::MosDataTool::compute(), print(), and printTable().

◆ snow24()

float MosData::snow24 ( int  ind)

Converts the 24 hour QSF code into snowfall

Parameters
indIndex of forecast
Returns
Actual snowfall in inches

Referenced by print().

◆ snow6()

float MosData::snow6 ( int  ind)

Converts the 6 hour QSF code to actual snowfall

Parameters
indIndex of forecast
Returns
Snowfall in inches

Referenced by WXP::MosDataTool::compute(), print(), and printTable().

◆ visibility()

float MosData::visibility ( int  ind)

Converts the visibility code to actual visibility

Parameters
indIndex of forecast
Returns
Visiblity in miles

References WXP::Const::MISS.

Referenced by WXP::MosDataTool::compute(), print(), and printTable().

◆ weather12()

int MosData::weather12 ( int  ind,
String wx12 
)

Computes a weather type from existing MOS 12 hour forecast data

Parameters
indIndex of forecast
Return values
wx12String to put weather type (R,S,TRW,F,etc)

References WXP::StrLib::equal(), WXP::Const::MISS, and WXP::String::set().

Referenced by WXP::MosDataTool::compute().

◆ weather6()

int MosData::weather6 ( int  ind,
String wx6 
)

Computes a weather type from existing MOS 6 hour forecast data

Parameters
indIndex of forecast
Return values
wx6String to put weather type (R,S,TRW,F,etc)

References WXP::StrLib::equal(), WXP::Const::MISS, and WXP::String::set().

Referenced by WXP::MosDataTool::compute(), print(), and printTable().

Member Data Documentation

◆ NumData

const int WXP::MosData::NumData = 45
static

Maximum number of reports


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