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

Public Member Functions

 GribV2Record (ZUFILE *file, int id_)
 
 GribV2Record (const GribRecord &rec)
 
GribV2RecordGribV2NextDataSet (ZUFILE *file, int id_)
 
bool hasMoreDataSet () const
 
- 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 (const 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 ()
 
bool isFilled ()
 
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 knownData
 Indicates whether the data type in this record is recognized by the parser.
 
bool waveData
 Differentiates wave-related parameters (height, direction, period) from other meteorological data for specialized processing.
 
bool IsDuplicated
 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 dataKey
 Unique string identifier constructed from data type, level type, and level value.
 
char strRefDate [32]
 
char strCurDate [32]
 
int dataCenterModel
 Identifies the numerical weather model that produced this data.
 
bool m_bfilled
 Indicates whether the data array has been populated.
 
zuchar editionNumber
 GRIB edition number, indicating the version of the GRIB specification used.
 
zuchar idCenter
 Originating center ID as defined by WMO common table C-1.
 
zuchar idModel
 Model identifier within the originating center.
 
zuchar idGrid
 Grid identifier used by the originating center.
 
zuchar dataType
 Parameter identifier as defined by GRIB tables.
 
zuchar levelType
 Vertical level type indicator.
 
zuint levelValue
 Numeric value associated with levelType.
 
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 periodP1
 Time range indicators for this forecast step.
 
zuint periodP2
 
zuchar timeRange
 Statistical processing indicator.
 
zuint periodsec
 Forecast period in seconds.
 
time_t refDate
 Unix timestamp of model initialization time.
 
time_t curDate
 Unix timestamp of when this forecast is valid.
 
zuchar NV
 
zuchar PV
 
zuchar gridType
 
zuint Ni
 
zuint Nj
 
double La1
 
double Lo1
 Grid origin coordinates.
 
double La2
 
double Lo2
 Grid end coordinates.
 
double latMin
 
double lonMin
 
double latMax
 
double lonMax
 
double Di
 
double Dj
 
zuchar resolFlags
 
zuchar scanFlags
 
bool hasDiDj
 
bool isEarthSpheric
 
bool isUeastVnorth
 
bool isScanIpositive
 
bool isScanJpositive
 
bool isAdjacentI
 
zuint BMSsize
 
zuchar * BMSbits
 
double * data
 

Detailed Description

Definition at line 40 of file GribV2Record.h.

Constructor & Destructor Documentation

◆ GribV2Record() [1/3]

GribV2Record::GribV2Record ( ZUFILE file,
int  id_ 
)

Definition at line 1710 of file GribV2Record.cpp.

◆ GribV2Record() [2/3]

GribV2Record::GribV2Record ( const GribRecord rec)

Definition at line 1805 of file GribV2Record.cpp.

◆ GribV2Record() [3/3]

GribV2Record::GribV2Record ( )
inline

Definition at line 44 of file GribV2Record.h.

◆ ~GribV2Record()

GribV2Record::~GribV2Record ( )

Definition at line 1810 of file GribV2Record.cpp.

Member Function Documentation

◆ GribV2NextDataSet()

GribV2Record * GribV2Record::GribV2NextDataSet ( ZUFILE file,
int  id_ 
)

Definition at line 1789 of file GribV2Record.cpp.

◆ hasMoreDataSet()

bool GribV2Record::hasMoreDataSet ( ) const

Definition at line 1784 of file GribV2Record.cpp.


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