This class defines forecast time parameters. More...
#include "../include/ForeTime.h"
Public Member Functions | |
| ForeTime () | |
| ForeTime (int t, int t1, int t2) | |
| ForeTime (int t) | |
| ForeTime (const char *str) | |
| int | init () |
| bool | isSet () |
| int | decode (const char *str) |
| int | toString (String &str) |
| float | getFore () |
| float | getHour () |
| int | getSecs () |
| int | toTimeLabelDay (String &str) |
| int | toTimeLabel (String &str) |
| int | toVarLabel (String &str) |
| int | set (int t, float t1, float t2) |
| int | set (int t, int u, float t1, float t2) |
| int | set (int val) |
| int | set (const char *str) |
| int | setEnd (DateVal &dv) |
| int | getType () |
| float | getTim1 () |
| float | getTim2 () |
| DateVal | getEnd () |
| bool | validEnd () |
| bool | valid () |
| int | toCode () |
| int | print () |
Static Public Attributes | |
| static const int | NONE = -9999 |
| static const int | FORE = 0 |
| static const int | ANAL = 1 |
| static const int | RNG = 2 |
| static const int | AVG = 3 |
| static const int | ACC = 4 |
| static const int | DIFF = 5 |
| static const int | MAX = 6 |
| static const int | MIN = 7 |
| static const int | MINUTE = 0 |
| static const int | HOUR = 1 |
| static const int | DAY = 2 |
| static const int | MONTH = 3 |
| static const int | YEAR = 4 |
This class defines forecast time parameters.
| ForeTime::ForeTime | ( | ) |
Constructor. Initializes values
References init().
| ForeTime::ForeTime | ( | const char * | str | ) |
| int ForeTime::decode | ( | const char * | str | ) |
| float ForeTime::getFore | ( | ) |
Return a single time value dependent on type of forecast time
Referenced by WXP::DateTool::createLabel(), toTimeLabel(), and toTimeLabelDay().
| float ForeTime::getHour | ( | ) |
Return a single time value in hours dependent on type of forecast time
Referenced by WXP::GribFile::makeDatim().
| int ForeTime::getSecs | ( | ) |
Return a single time value in hours dependent on type of forecast time
| int ForeTime::init | ( | ) |
Initializes class data
References HOUR, and WXP::Const::MISS.
Referenced by decode(), ForeTime(), and WXP::VarSpec::init().
| int ForeTime::print | ( | ) |
| int ForeTime::set | ( | const char * | str | ) |
| int ForeTime::set | ( | int | val | ) |
| int ForeTime::set | ( | int | t, | |
| int | u, | |||
| float | t1, | |||
| float | t2 | |||
| ) |
Sets the forecast time parameters individually
| t | Type of time | |
| u | Unit of time (HOUR, DAY, ...) | |
| t1 | First time value | |
| t2 | Second time value |
| int ForeTime::set | ( | int | t, | |
| float | t1, | |||
| float | t2 | |||
| ) |
Sets the forecast time parameters individually
| t | Type of time | |
| t1 | First time value | |
| t2 | Second time value |
Referenced by WXP::GribFile::makeDatim(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), and WXP::Grid::setForeTime().
| int ForeTime::toCode | ( | ) |
| int ForeTime::toString | ( | String & | str | ) |
Converts forecast time parameters to a string
| str | Output string |
References ACC, WXP::String::append(), AVG, WXP::String::clear(), WXP::String::copy(), DIFF, MAX, MIN, WXP::Const::MISS, WXP::String::printf(), and RNG.
Referenced by WXP::VarSpec::print().
| int ForeTime::toTimeLabel | ( | String & | str | ) |
Create a label string
| str | Output string |
References WXP::String::clear(), getFore(), WXP::Const::MISS, and WXP::String::printf().
Referenced by WXP::DateTool::createLabel(), and WXP::GribFile::makeDatim().
| int ForeTime::toTimeLabelDay | ( | String & | str | ) |
Create a label string with time in days
| str | Output string |
References WXP::String::clear(), getFore(), WXP::Const::MISS, and WXP::String::printf().
| int ForeTime::toVarLabel | ( | String & | str | ) |
Create a label string for combination with variable data
| str | Output string |
References ACC, WXP::String::append(), AVG, DIFF, MAX, MIN, WXP::String::printf(), and RNG.
Referenced by WXP::GribFile::makeInfo(), and WXP::VarSpec::toInfoLabel().
const int WXP::ForeTime::ACC = 4 [static] |
Accumulation over forecast time range
Referenced by decode(), WXP::GribFile::makeDatim(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
const int WXP::ForeTime::ANAL = 1 [static] |
Analysis
Referenced by decode(), WXP::GribFile::makeDatim(), WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
const int WXP::ForeTime::AVG = 3 [static] |
Average over forecast time range
Referenced by decode(), WXP::GribFile::makeDatim(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
const int WXP::ForeTime::DAY = 2 [static] |
Time in Days
Referenced by WXP::GribFile::readPDB(), set(), and toCode().
const int WXP::ForeTime::DIFF = 5 [static] |
Difference between two forecast times
Referenced by decode(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
const int WXP::ForeTime::FORE = 0 [static] |
Single forecast time
Referenced by decode(), WXP::GribFile::makeDatim(), print(), WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
const int WXP::ForeTime::HOUR = 1 [static] |
Time in Hours
Referenced by init(), and WXP::GribFile::readPDB().
const int WXP::ForeTime::MAX = 6 [static] |
Maximum over a period
Referenced by decode(), print(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
const int WXP::ForeTime::MIN = 7 [static] |
Minimum over a period
Referenced by decode(), print(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
const int WXP::ForeTime::MINUTE = 0 [static] |
Time in Minutes
const int WXP::ForeTime::MONTH = 3 [static] |
Time in Months
Referenced by WXP::GribFile::readPDB(), set(), and toCode().
const int WXP::ForeTime::RNG = 2 [static] |
Forecast time range
Referenced by decode(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
const int WXP::ForeTime::YEAR = 4 [static] |
Time in Years
1.6.1