OpenCPN Partial API docs
Loading...
Searching...
No Matches
GribV1Record Class Reference
Inheritance diagram for GribV1Record:
GribRecord

Public Member Functions

 GribV1Record (ZUFILE *file, int id_)
 
 GribV1Record (const GribRecord &rec)
 
- Public Member Functions inherited from GribRecord
 GribRecord (const GribRecord &rec)
 Copy constructor performs a deep copy of the GribRecord.
 
void multiplyAllData (double k)
 
void Substract (const GribRecord &rec, bool positive=true)
 
void Average (const GribRecord &rec)
 
bool IsOk () const
 
bool IsDataKnown () const
 
bool IsEof () const
 
bool isDuplicated () const
 
zuchar GetDataType () const
 Returns the type of meteorological parameter stored in this grid.
 
void SetDataType (zuchar t)
 
zuchar GetLevelType () const
 Returns the type of vertical level for this grid's data.
 
zuint GetLevelValue () const
 Returns the numeric value associated with the level type.
 
zuint GetDataCenterModel () const
 Returns the numerical weather prediction model/center that produced this data.
 
zuchar GetIdCenter () const
 Returns the originating center ID as defined by WMO (World Meteorological Organization).
 
zuchar GetIdModel () const
 Returns the model/process ID within the originating center.
 
zuchar GetIdGrid () const
 Returns the grid definition template number.
 
std::string GetKey () const
 
int GetPeriodP1 () const
 Returns the start of the period (P1) used for this record.
 
int GetPeriodP2 () const
 Returns the end of the period (P2) used for this record.
 
zuint GetPeriodSec () const
 Returns the forecast period in seconds from reference time.
 
zuchar GetTimeRange () const
 Returns the time range indicator that defines how P1 and P2 should be interpreted.
 
int GetNi () const
 Returns the number of points in the longitude (i) direction of the grid.
 
int GetNj () const
 Returns the number of points in the latitude (j) direction of the grid.
 
double GetDi () const
 Returns the grid spacing in longitude (i) direction in degrees.
 
double GetDj () const
 Returns the grid spacing in latitude (j) direction in degrees.
 
double GetValue (int i, int j) const
 Returns the data value at a specific grid point.
 
void SetValue (zuint i, zuint j, double v)
 
double GetInterpolatedValue (double px, double py, bool numericalInterpolation=true, bool dir=false) const
 Get spatially interpolated value at exact lat/lon position.
 
double GetX (int i) const
 Converts grid index i to longitude in degrees.
 
double GetY (int j) const
 Converts grid index j to latitude in degrees.
 
void getXY (int i, int j, double *x, double *y) const
 Converts grid indices to longitude/latitude coordinates.
 
double GetLatMin () const
 
double GetLonMin () const
 
double GetLatMax () const
 
double GetLonMax () const
 
bool HasValue (int i, int j) const
 
bool IsDefined (int i, int j) const
 
time_t GetRecordRefDate () const
 
const char * GetStrRecordRefDate () const
 
time_t GetRecordCurrentDate () const
 
const char * GetStrRecordCurDate () const
 
void SetRecordCurrentDate (time_t t)
 
void Print () const
 
bool IsFilled () const
 
void SetFilled (bool val=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from GribRecord
static GribRecordInterpolatedRecord (const GribRecord &rec1, const GribRecord &rec2, double d, bool dir=false)
 Creates a new GribRecord by temporally interpolating between two time points.
 
static GribRecordInterpolated2DRecord (GribRecord *&rety, const GribRecord &rec1x, const GribRecord &rec1y, const GribRecord &rec2x, const GribRecord &rec2y, double d)
 Creates temporally interpolated records for vector fields (wind, currents).
 
static GribRecordMagnitudeRecord (const GribRecord &rec1, const GribRecord &rec2)
 
static void Polar2UV (GribRecord *pDIR, GribRecord *pSPEED)
 Converts wind or current values from polar (direction/speed) to cartesian (U/V) components.
 
static std::string MakeKey (int dataType, int levelType, int levelValue)
 
static bool GetInterpolatedValues (double &M, double &A, const GribRecord *GRX, const GribRecord *GRY, double px, double py, bool numericalInterpolation=true)
 Gets spatially interpolated wind or current vector values at a specific latitude/longitude point.
 
- Protected Member Functions inherited from GribRecord
time_t MakeDate (zuint year, zuint month, zuint day, zuint hour, zuint min, zuint sec)
 
- Static Protected Member Functions inherited from GribRecord
static bool GetInterpolatedParameters (const GribRecord &rec1, const GribRecord &rec2, double &La1, double &Lo1, double &La2, double &Lo2, double &Di, double &Dj, int &im1, int &jm1, int &im2, int &jm2, int &Ni, int &Nj, int &rec1offi, int &rec1offj, int &rec2offi, int &rec2offj)
 
- Protected Attributes inherited from GribRecord
int id
 Unique identifier for this record.
 
bool ok
 Indicates record validity.
 
bool known_data
 Indicates whether the data type in this record is recognized by the parser.
 
bool wave_data
 Differentiates wave-related parameters (height, direction, period) from other meteorological data for specialized processing.
 
bool is_duplicated
 Indicates if this record was created through copying rather than direct reading.
 
bool eof
 Signals when the end of the GRIB file has been reached during parsing.
 
std::string data_key
 Unique string identifier constructed from data type, level type, and level value.
 
char str_ref_date [32]
 
char str_cur_date [32]
 
int data_center_model
 Identifies the numerical weather model that produced this data.
 
bool is_filled
 Indicates whether the data array has been populated.
 
zuchar edition_number
 GRIB edition number, indicating the version of the GRIB specification used.
 
zuchar id_center
 Originating center ID as defined by WMO common table C-1.
 
zuchar id_model
 Model identifier within the originating center.
 
zuchar id_grid
 Grid identifier used by the originating center.
 
zuchar data_type
 Parameter identifier as defined by GRIB tables.
 
zuchar level_type
 Vertical level type indicator.
 
zuint level_value
 Numeric value associated with level_type.
 
bool hasBMS
 Indicates presence of a bitmap section.
 
zuint refyear
 Components of the reference time for this forecast.
 
zuint refmonth
 
zuint refday
 
zuint refhour
 
zuint refminute
 
zuint period_p1
 Time range indicators for this forecast step.
 
zuint period_p2
 
zuchar time_range
 Statistical processing indicator.
 
zuint periodsec
 Forecast period in seconds.
 
time_t ref_date
 Unix timestamp of model initialization time.
 
time_t cur_date
 Unix timestamp of when this forecast is valid.
 
zuchar NV
 
zuchar PV
 
zuchar grid_type
 
zuint Ni
 
zuint Nj
 
double La1
 
double Lo1
 Grid origin coordinates.
 
double La2
 
double Lo2
 Grid end coordinates.
 
double lat_min
 
double lon_min
 
double lat_max
 
double lon_max
 
double Di
 
double Dj
 
zuchar resol_flags
 
zuchar scan_flags
 
bool has_di_dj
 
bool is_earth_spheric
 
bool is_ueast_vnorth
 
bool is_scan_i_positive
 
bool is_scan_j_positive
 
bool is_adjacent_i
 
zuint bms_size
 
zuchar * bms_bits
 
double * data
 

Detailed Description

Definition at line 39 of file grib_v1_record.h.

Constructor & Destructor Documentation

◆ GribV1Record() [1/2]

GribV1Record::GribV1Record ( ZUFILE file,
int  id_ 
)

Definition at line 324 of file grib_v1_record.cpp.

◆ GribV1Record() [2/2]

GribV1Record::GribV1Record ( const GribRecord rec)

Definition at line 417 of file grib_v1_record.cpp.

◆ ~GribV1Record()

GribV1Record::~GribV1Record ( )
override

Definition at line 422 of file grib_v1_record.cpp.


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