#include <GRIB.h>
Public Methods | |
GRIB_TIME () | |
Constructor. | |
void | Decode (unsigned char *pds) |
Decode time from pds. Not to be used. | |
unsigned char * | Encode () |
Encode time to 13 characters. Not to be used. | |
void | set (int year, int month, int day, int hour, int minute, t_enum_GRIB_TIMEUNIT tu, t_enum_GRIB_TIMERANGE tr, int time1, int time2, int nave, int nmiss) |
Set time. Complete interface. | |
void | set_referencetime (int year, int month, int day, int hour, int minute) |
Set reference time. | |
void | set_analysis () |
Set analysis at reference time. | |
void | set_forecast_hour (int hforecast) |
Set forecast at reference time + hforecast hours. | |
std::string | Reftime () |
Obtain reference time. | |
std::string | Reftime2000 () |
Obtain reference time as "2000-01-01 00:00:00 UTC". | |
std::string | TimeString () |
Obtain current time as a full descriptive string. | |
std::string | ValidTime () |
Obtain current time as "2000-01-01 00:00:00 UTC". Note this is menaingful only for analysis and forecasts. | |
time_t | ForecastSeconds () |
Obtain forecast seconds from reference time. | |
time_t | ForecastSeconds2000 () |
Obtain forecast seconds from 2000-01-01 00:00:00 UTC. | |
Public Attributes | |
t_enum_GRIB_TIMEUNIT | timeunit |
Used timeunit. | |
t_enum_GRIB_TIMERANGE | timerange |
Used timerange. | |
std::string | reftime |
reference reference time string | |
std::string | timestring |
reference time string | |
int | year |
Local storage for year. | |
int | month |
Local storage for month. | |
int | day |
Local storage for day. | |
int | hour |
Local storage for hour. | |
int | minute |
Local storage for minute. | |
int | p1 |
Local sorage for encoded time. | |
int | p2 |
Local sorage for encoded time. | |
int | p1p2 |
Local sorage for encoded time. | |
int | naveraged |
Local sorage for encoded time. | |
int | nmissing |
Local sorage for encoded time. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, GRIB_TIME &t) |
overloaded output to stream operator |
All string times are encoded as in
YYYY-MM-DD hh:mm:ss TZD / | \ ISO8601 date ISO8601 time time zone designator (UTC)
Definition at line 342 of file GRIB.h.
|
Constructor.
Definition at line 43 of file GRIB.cpp. References day, GRIB_TIMERANGE_UNKNOWN, GRIB_TIMEUNIT_UNKNOWN, hour, minute, month, naveraged, nmissing, p1, p1p2, p2, reftime, timerange, timestring, timeunit, and year. |
|
Decode time from pds. Not to be used.
Definition at line 220 of file GRIB.cpp. References day, hour, minute, month, naveraged, nmissing, p1, p1p2, p2, PDS_Day, PDS_ForecastTimeUnit, PDS_Hour, PDS_Minute, PDS_Month, PDS_NumAve, PDS_NumMissing, PDS_P1, PDS_P1P2, PDS_P2, PDS_TimeRange, PDS_Year4, timerange, timeunit, and year. Referenced by GRIB_MESSAGE::Decode(). |
|
Encode time to 13 characters. Not to be used.
Definition at line 242 of file GRIB.cpp. References day, hour, minute, month, naveraged, nmissing, p1, p2, timerange, timeunit, and year. Referenced by GRIB_MESSAGE::Encode(). |
|
Obtain forecast seconds from reference time.
Definition at line 433 of file GRIB.cpp. References GRIB_TIMERANGE_ANALYSIS_AT_REFTIME, GRIB_TIMERANGE_AVERAGE_IN_REFTIME_MINUS_P1_REFTIME_MINUS_P2, GRIB_TIMERANGE_VALID_AT_REFTIME_PLUS_P1P2, GRIB_TIMEUNIT_DAY, GRIB_TIMEUNIT_HOUR, GRIB_TIMEUNIT_HOURS12, GRIB_TIMEUNIT_HOURS3, GRIB_TIMEUNIT_HOURS6, GRIB_TIMEUNIT_MINUTE, GRIB_TIMEUNIT_MONTH, GRIB_TIMEUNIT_SECOND, p1, p1p2, p2, timerange, and timeunit. Referenced by ForecastSeconds2000(), and ValidTime(). |
|
Obtain forecast seconds from 2000-01-01 00:00:00 UTC.
Definition at line 475 of file GRIB.cpp. References day, ForecastSeconds(), hour, minute, month, and year. |
|
Obtain reference time.
Definition at line 465 of file GRIB.cpp. References reftime. |
|
Obtain reference time as "2000-01-01 00:00:00 UTC".
|
|
Set time. Complete interface.
Definition at line 261 of file GRIB.cpp. References day, hour, minute, month, set_referencetime(), and year. |
|
Set analysis at reference time.
Definition at line 270 of file GRIB.cpp. References GRIB_TIMERANGE_ANALYSIS_AT_REFTIME, GRIB_TIMEUNIT_HOUR, naveraged, nmissing, p1, p1p2, p2, timerange, and timeunit. |
|
Set forecast at reference time + hforecast hours.
Definition at line 278 of file GRIB.cpp. References GRIB_TIMERANGE_FORECAST_AT_REFTIME_PLUS_P1, GRIB_TIMERANGE_VALID_AT_REFTIME_PLUS_P1P2, GRIB_TIMEUNIT_HOUR, naveraged, nmissing, p1, p1p2, p2, timerange, and timeunit. |
|
Set reference time.
Definition at line 301 of file GRIB.cpp. References day, hour, minute, month, and year. Referenced by set(). |
|
Obtain current time as a full descriptive string.
Definition at line 466 of file GRIB.cpp. References timestring. |
|
Obtain current time as "2000-01-01 00:00:00 UTC". Note this is menaingful only for analysis and forecasts.
Definition at line 493 of file GRIB.cpp. References day, ForecastSeconds(), hour, minute, month, and year. |
|
overloaded output to stream operator
|
|
Local storage for day.
Definition at line 424 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds2000(), GRIB_TIME(), set(), set_referencetime(), GRIB_MESSAGE::set_time(), and ValidTime(). |
|
Local storage for hour.
Definition at line 426 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds2000(), GRIB_TIME(), set(), set_referencetime(), GRIB_MESSAGE::set_time(), and ValidTime(). |
|
Local storage for minute.
Definition at line 428 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds2000(), GRIB_TIME(), set(), set_referencetime(), GRIB_MESSAGE::set_time(), and ValidTime(). |
|
Local storage for month.
Definition at line 422 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds2000(), GRIB_TIME(), set(), set_referencetime(), GRIB_MESSAGE::set_time(), and ValidTime(). |
|
Local sorage for encoded time.
Definition at line 436 of file GRIB.h. Referenced by Decode(), Encode(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
Local sorage for encoded time.
Definition at line 436 of file GRIB.h. Referenced by Decode(), Encode(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
Local sorage for encoded time.
Definition at line 430 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
Local sorage for encoded time.
Definition at line 434 of file GRIB.h. Referenced by Decode(), ForecastSeconds(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
Local sorage for encoded time.
Definition at line 432 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
reference reference time string
Definition at line 414 of file GRIB.h. Referenced by GRIB_TIME(), Reftime(), and GRIB_MESSAGE::set_time(). |
|
Used timerange.
Definition at line 408 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
reference time string
Definition at line 417 of file GRIB.h. Referenced by GRIB_TIME(), operator<<(), GRIB_MESSAGE::set_time(), and TimeString(). |
|
Used timeunit.
Definition at line 405 of file GRIB.h. Referenced by Decode(), GRIB_MESSAGE::Encode(), Encode(), ForecastSeconds(), GRIB_TIME(), set_analysis(), set_forecast_hour(), and GRIB_MESSAGE::set_time(). |
|
Local storage for year.
Definition at line 420 of file GRIB.h. Referenced by Decode(), Encode(), ForecastSeconds2000(), GRIB_TIME(), set(), set_referencetime(), GRIB_MESSAGE::set_time(), and ValidTime(). |