|
WXP C++ Library Version 6.74.9
|
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 |
This class stores MOS data.
| MosData::MosData | ( | ) |
Constructor. Initializes class data
References init().
| float MosData::cldHght | ( | int | ind | ) |
Converts a cloud ceiling code to actual height
| ind | Index of forecast |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute(), print(), and printTable().
| int MosData::getCeiling | ( | int | ind | ) |
Gets the cloud ceiling code of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| char MosData::getCover | ( | int | ind | ) |
Gets the cloud cover of a forecast
| ind | Index of forecast to get data |
Referenced by WXP::MosDataTool::compute().
| Date MosData::getDate | ( | ) |
Gets the initial date of the filecast
| int MosData::getDate | ( | Date & | rdate | ) |
Gets the initial date of the forecast
| rdate | Date of initial data |
| float MosData::getElev | ( | ) |
Gets the elevation
| int MosData::getHour | ( | int | ind | ) |
Gets the forecast hour of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| const char * MosData::getId | ( | ) |
Gets the station identifier
Referenced by WXP::MosDataTool::compute(), and WXP::MosRaw::compute().
| int MosData::getInd | ( | float | hr | ) |
Returns the index given the forecast hour
| hr | The forecast hour |
Referenced by WXP::MosDataTool::compute().
|
inline |
Returns the latitude of the station
| EarthPoint MosData::getLoc | ( | ) |
Gets the location of the station
References WXP::EarthPoint::set().
| int MosData::getLoc | ( | EarthPoint & | ept | ) |
Gets the location of the station
| ept | The EarthPoint class to put location |
References WXP::EarthPoint::set().
| int MosData::getLoc | ( | float & | rlat, |
| float & | rlon | ||
| ) |
Gets the location of the station
| rlat | Latitude of station |
| rlon | Longitude of station |
|
inline |
Returns the longitude of the station
| int MosData::getModel | ( | ) |
Gets the model designator
|
inline |
Returns the normal maximum temperature
Referenced by WXP::MosDataTool::compute().
|
inline |
Returns the normal minimum temperature
Referenced by WXP::MosDataTool::compute().
|
inline |
Returns the normal probability of precipitation
| int MosData::getNum | ( | ) |
Gets the number of forecast times
| int MosData::getObvis | ( | int | ind, |
| String & | str | ||
| ) |
Gets the obscuration type of a forecast
| ind | Index of forecast to get data |
References WXP::String::copy().
Referenced by WXP::MosDataTool::compute().
| int MosData::getPop12 | ( | int | ind | ) |
Gets the 12 hour probability or precip of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPop24 | ( | int | ind | ) |
Gets the 24 hour probability or precip of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPop6 | ( | int | ind | ) |
Gets the 6 hour probability or precip of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPost12 | ( | int | ind | ) |
Gets the 12 hour probability of severe storms of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPost6 | ( | int | ind | ) |
Gets the 6 hour probability of severe storms of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPot12 | ( | int | ind | ) |
Gets the 12 hour probability of thunderstorms of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPot24 | ( | int | ind | ) |
Gets the 24 hour probability of thunderstorms of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getPot6 | ( | int | ind | ) |
Gets the 6 hour probability of thunderstorms of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| char MosData::getPType | ( | int | ind | ) |
Gets the precipitation type of a forecast
| ind | Index of forecast to get data |
Referenced by WXP::MosDataTool::compute().
| int MosData::getQpf12 | ( | int | ind | ) |
Gets the 12 hour quantitative precipitation code of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| int MosData::getQpf6 | ( | int | ind | ) |
Gets the 6 hour quantitative precipitation code of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| int MosData::getQsf12 | ( | int | ind | ) |
Gets the 12 hour quantitative snow code of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| int MosData::getQsf6 | ( | int | ind | ) |
Gets the 6 hour quantitative snow code of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| int MosData::getSeconds | ( | ) |
Gets Unix time in seconds for initial forecast time
References WXP::Date::getSeconds().
| int MosData::getT | ( | int | ind | ) |
Gets the temperature of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getTd | ( | int | ind | ) |
Gets the dewpoint of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getTMax | ( | int | ind | ) |
Gets the maximum temperature hour of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getTMin | ( | int | ind | ) |
Gets the maximum temperature hour of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getVis | ( | int | ind | ) |
Gets the visibility code of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
| int MosData::getWDir | ( | int | ind | ) |
Gets the wind direction of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::getWSpd | ( | int | ind | ) |
Gets the wind speed of a forecast
| ind | Index of forecast to get data |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute().
| int MosData::init | ( | ) |
Initializes class data
References WXP::Const::MISS.
Referenced by MosData(), and WXP::MosFile::read().
| int MosData::print | ( | ) |
Prints the contents of the class to standard output.
References WXP::Date::addHours(), cldHght(), WXP::DateTool::createLabel(), WXP::String::get(), WXP::Date::getDay(), WXP::Date::getHour(), WXP::Const::MISS, quantPrec12(), quantPrec24(), quantPrec6(), snow12(), snow24(), snow6(), visibility(), and weather6().
| int MosData::printTable | ( | ) |
Prints the contents of the class to standard output.
References WXP::Date::addHours(), cldHght(), WXP::DateTool::createLabel(), WXP::String::get(), WXP::Date::getDay(), WXP::Date::getHour(), WXP::Const::MISS, snow12(), snow6(), visibility(), and weather6().
| float MosData::quantPrec12 | ( | int | ind | ) |
Converts the 12 hour QPF code to rainfall
| ind | Index of forecast |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute(), and print().
| float MosData::quantPrec24 | ( | int | ind | ) |
Converts the 24 hour QPF code to rainfall
| ind | Index of forecast |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute(), and print().
| float MosData::quantPrec6 | ( | int | ind | ) |
Converts the 6 hour QPF code to rainfall
| ind | Index of forecast |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute(), and print().
| int MosData::setCeiling | ( | int | ind, |
| int | val | ||
| ) |
Sets the cloud ceiling code of a forecast
| ind | Index of forecast |
| val | Cloud ceiling code |
| int MosData::setCover | ( | int | ind, |
| char | val | ||
| ) |
Sets the clour cover of a forecast
| ind | Index of forecast |
| val | Cloud cover characeter (C,S,B,O) |
| int MosData::setDate | ( | Date & | rdate | ) |
Sets the initial date of the forecast
| rdate | Date of initial data |
| int MosData::setElev | ( | float | relev | ) |
Sets the elevation
| relev | Elevation of station |
| int MosData::setHour | ( | int | ind, |
| int | val | ||
| ) |
Sets the forecast hour of a forecast
| ind | Index of forecast |
| val | Forecast hour |
| int MosData::setId | ( | const char * | rid | ) |
| int MosData::setId | ( | const char * | rid, |
| float | rlat, | ||
| float | rlon | ||
| ) |
Sets the station information
| rid | Station identifier string |
| rlat | Latitude of station |
| rlon | Longitude of station |
References WXP::StrLib::copy().
| int MosData::setModel | ( | int | rmodel | ) |
Sets the model designator
| rmodel | Integral model designator |
| int MosData::setNum | ( | int | val | ) |
Sets the number of forecast times
| val | Number of forecast times |
| int MosData::setObvis | ( | int | ind, |
| const char * | val | ||
| ) |
Sets the obscuration type of a forecast
| ind | Index of forecast |
| val | Obscuration type (F,H,B) |
References WXP::StrLib::copy().
| int MosData::setPop12 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 12 hour probability of precip of a forecast
| ind | Index of forecast |
| val | 12 hour POP |
| int MosData::setPop24 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 24 hour probability of precip of a forecast
| ind | Index of forecast |
| val | 12 hour POP |
| int MosData::setPop6 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 6 hour probability of precip of a forecast
| ind | Index of forecast |
| val | 6 hour POP |
| int MosData::setPost12 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 12 hour probability of severe storms of a forecast
| ind | Index of forecast |
| val | 12 hour prob of severe |
| int MosData::setPost6 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 6 hour probability of severe storms of a forecast
| ind | Index of forecast |
| val | 6 hour prob of severe |
| int MosData::setPot12 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 12 hour probability of thunderstorms of a forecast
| ind | Index of forecast |
| val | 12 hour prob of thunder |
| int MosData::setPot24 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 24 hour probability of thunderstorms of a forecast
| ind | Index of forecast |
| val | 24 hour prob of thunder |
| int MosData::setPot6 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 6 hour probability of thunderstorms of a forecast
| ind | Index of forecast |
| val | 6 hour prob of thunder |
| int MosData::setPType | ( | int | ind, |
| char | val | ||
| ) |
Sets the precipitation type of a forecast
| ind | Index of forecast |
| val | Precipitation type (R,S,Z) |
| int MosData::setQpf12 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 12 hour quantitative precipitation code of a forecast
| ind | Index of forecast |
| val | 12 hour QPF code |
| int MosData::setQpf6 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 6 hour quantitative precipitation code of a forecast
| ind | Index of forecast |
| val | Integral 6 hour QPF code |
| int MosData::setQsf12 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 12 hour quantitative snow code of a forecast
| ind | Index of forecast |
| val | 12 hour QSF code |
| int MosData::setQsf6 | ( | int | ind, |
| int | val | ||
| ) |
Sets the 6 hour quantitative snow code of a forecast
| ind | Index of forecast |
| val | 6 hour QSF code |
| int MosData::setT | ( | int | ind, |
| int | val | ||
| ) |
Sets the temperature of a forecast
| ind | Index of forecast |
| val | Temperature |
| int MosData::setTd | ( | int | ind, |
| int | val | ||
| ) |
Sets the dewpoint of a forecast
| ind | Index of forecast |
| val | Dewpoint |
| int MosData::setTMax | ( | int | ind, |
| int | val | ||
| ) |
Sets the maximum temperature of a forecast
| ind | Index of forecast |
| val | Extreme temperature |
| int MosData::setTMin | ( | int | ind, |
| int | val | ||
| ) |
Sets the maximum temperature of a forecast
| ind | Index of forecast |
| val | Extreme temperature |
| int MosData::setVis | ( | int | ind, |
| int | val | ||
| ) |
Sets the visibility code of a forecast
| ind | Index of forecast |
| val | Integral visibility code |
| int MosData::setWDir | ( | int | ind, |
| int | val | ||
| ) |
Sets the wind direction of a forecast
| ind | Index of forecast |
| val | Wind direction in degrees |
| int MosData::setWSpd | ( | int | ind, |
| int | val | ||
| ) |
Sets the wind speed of a forecast
| ind | Index of forecast |
| val | Wind speed |
| float MosData::snow12 | ( | int | ind | ) |
Converts the 12 hour QSF code into snowfall
| ind | Index of forecast |
Referenced by WXP::MosDataTool::compute(), print(), and printTable().
| float MosData::snow24 | ( | int | ind | ) |
Converts the 24 hour QSF code into snowfall
| ind | Index of forecast |
Referenced by print().
| float MosData::snow6 | ( | int | ind | ) |
Converts the 6 hour QSF code to actual snowfall
| ind | Index of forecast |
Referenced by WXP::MosDataTool::compute(), print(), and printTable().
| float MosData::visibility | ( | int | ind | ) |
Converts the visibility code to actual visibility
| ind | Index of forecast |
References WXP::Const::MISS.
Referenced by WXP::MosDataTool::compute(), print(), and printTable().
| int MosData::weather12 | ( | int | ind, |
| String & | wx12 | ||
| ) |
Computes a weather type from existing MOS 12 hour forecast data
| ind | Index of forecast |
| wx12 | String 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().
| int MosData::weather6 | ( | int | ind, |
| String & | wx6 | ||
| ) |
Computes a weather type from existing MOS 6 hour forecast data
| ind | Index of forecast |
| wx6 | String 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().
|
static |
Maximum number of reports