|
WXP C++ Library Version 6.74.9
|
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 | getHours () |
| int | getSeconds () |
| 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 | setOffset (int val) |
| float | getOffset () |
| int | setTypeOffset (float t) |
| float | getTypeOffset () |
| int | setType (int t) |
| int | getType () |
| bool | isTypeComplex () |
| int | setTime1 (float val) |
| float | getTime1 () |
| int | setTime2 (float val) |
| float | getTime2 () |
| DateVal | getEnd () |
| bool | validEnd () |
| bool | valid () |
| int | toCode () |
| int | print () |
Static Public Member Functions | |
| static int | toTimeLabel (float ftime, String &str) |
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 | ANY = 9 |
| 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 | ) |
Decodes forecast time date from string
| str | String to decode |
References ACC, ANAL, ANY, AVG, DIFF, FORE, WXP::StrLib::iequal(), init(), MAX, MIN, WXP::Const::MISS, RNG, and WXP::StrLib::valid().
Referenced by set().
| float ForeTime::getFore | ( | ) |
Return a single time value dependent on type of forecast time
References WXP::Const::MISS.
Referenced by WXP::DateTool::createLabel(), WXP::GridPlot::draw(), WXP::GridPlot::setFilename(), WXP::GridPlot::setFilename(), WXP::GridPlot::setFilename(), WXP::GridPlot::setFilename(), toTimeLabel(), and toTimeLabelDay().
| float ForeTime::getHours | ( | ) |
Return a single time value in hours dependent on type of forecast time
| int ForeTime::getSeconds | ( | ) |
Return a single time value in hours dependent on type of forecast time
Referenced by WXP::GribFile::makeDatim().
| int ForeTime::init | ( | ) |
Initializes class data
References HOUR, and WXP::Const::MISS.
Referenced by decode(), ForeTime(), ForeTime(), and WXP::VarSpec::init().
|
inline |
Returns if object values set
Referenced by WXP::GridPlot::draw(), WXP::GridPlot::setFilename(), WXP::GridPlot::setFilename(), WXP::GridPlot::setFilename(), and WXP::GridPlot::setFilename().
| int ForeTime::print | ( | ) |
Prints class data to standard output
References ACC, ANY, AVG, DIFF, FORE, MAX, MIN, WXP::Const::MISS, and RNG.
Referenced by WXP::VarSpec::printDetails().
| int ForeTime::set | ( | const char * | str | ) |
| 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 ForeTime(), WXP::GribFile::makeDatim(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), and WXP::Grid::setForeTime().
| 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 | val | ) |
| int ForeTime::toCode | ( | ) |
| int ForeTime::toString | ( | String & | str | ) |
Converts forecast time parameters to a string
| str | Output string |
References ACC, ANY, WXP::String::append(), WXP::String::aprintf(), AVG, WXP::String::clear(), WXP::String::copy(), DIFF, MAX, MIN, WXP::Const::MISS, WXP::String::printf(), and RNG.
Referenced by WXP::VarSpec::print().
|
static |
Create a label string
| str | Output string |
References WXP::String::clear(), WXP::Const::MISS, and WXP::String::printf().
Referenced by WXP::DateTool::createLabel(), and WXP::GribFile::makeDatim().
| int ForeTime::toTimeLabel | ( | String & | str | ) |
Create a label string
| str | Output string |
References WXP::String::clear(), getFore(), WXP::Const::MISS, and WXP::String::printf().
| 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().
Referenced by WXP::GribFile::makeDatim().
| 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::VectPlot::drawLabels(), WXP::GribFile::makeInfo(), and WXP::VarSpec::toInfoLabel().
|
static |
Accumulation over forecast time range
Referenced by decode(), WXP::GribFile::makeDatim(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
|
static |
Analysis
Referenced by decode(), WXP::GribFile::makeDatim(), WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
static |
Match any type
Referenced by decode(), print(), toCode(), and toString().
|
static |
Average over forecast time range
Referenced by decode(), WXP::GribFile::makeDatim(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
|
static |
Time in Days
Referenced by WXP::GribFile::readPDB(), set(), and toCode().
|
static |
Difference between two forecast times
Referenced by decode(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
|
static |
Single forecast time
Referenced by decode(), WXP::GribFile::makeDatim(), print(), WXP::GribFile::readPDB(), and WXP::GribFile::readPDS().
|
static |
Time in Hours
Referenced by init(), and WXP::GribFile::readPDB().
|
static |
Maximum over a period
Referenced by decode(), print(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
|
static |
Minimum over a period
Referenced by decode(), print(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
|
static |
Time in Minutes
Referenced by WXP::GribFile::readPDB().
|
static |
Time in Months
Referenced by WXP::GribFile::readPDB(), set(), and toCode().
|
static |
Forecast time range
Referenced by decode(), print(), WXP::GribFile::readPDB(), WXP::GribFile::readPDS(), toCode(), toString(), and toVarLabel().
|
static |
Time in Years