OpenCPN Partial API docs
Loading...
Searching...
No Matches
GribV2Record.h
Go to the documentation of this file.
1
/**********************************************************************
2
zyGrib: meteorological GRIB file viewer
3
Copyright (C) 2008 - Jacques Zaninetti - http://www.zygrib.org
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
***********************************************************************/
28
#ifndef GRIBV2RECORD_H
29
#define GRIBV2RECORD_H
30
31
#include <iostream>
32
#include <cmath>
33
34
#include "
zuFile.h
"
35
#include "
GribRecord.h
"
36
37
class
GRIBMessage
;
38
39
//----------------------------------------------
40
class
GribV2Record
:
public
GribRecord
{
41
public
:
42
GribV2Record
(
ZUFILE
* file,
int
id_);
43
GribV2Record
(
const
GribRecord
& rec);
44
GribV2Record
() { grib_msg = 0; }
45
46
~GribV2Record
();
47
48
// return a new record for next data set
49
GribV2Record
* GribV2NextDataSet(
ZUFILE
* file,
int
id_);
50
bool
hasMoreDataSet()
const
;
51
52
private
:
53
zuint periodSeconds(zuchar
unit
, zuint P1, zuint P2, zuchar range);
54
void
readDataSet(
ZUFILE
* file);
55
class
GRIBMessage
* grib_msg;
56
57
//-----------------------------------------
58
void
translateDataType();
// adapte les codes des différents centres météo
59
60
//---------------------------------------------
61
// SECTION 0: THE INDICATOR SECTION (IS)
62
//---------------------------------------------
63
zuint fileOffset0;
64
zuint seekStart, totalSize;
65
// zuchar editionNumber;
66
bool
b_len_add_8;
67
68
// SECTION 1: THE PRODUCT DEFINITION SECTION (PDS)
69
zuint fileOffset1;
70
zuint sectionSize1;
71
zuchar tableVersion;
72
zuchar data1[28];
73
bool
hasGDS;
74
// bool hasBMS;
75
double
decimalFactorD;
76
// SECTION 2: THE GRID DESCRIPTION SECTION (GDS)
77
zuint fileOffset2;
78
zuint sectionSize2;
79
// SECTION 3: BIT MAP SECTION (BMS)
80
zuint fileOffset3;
81
zuint sectionSize3;
82
// zuchar *BMSbits;
83
// SECTION 4: BINARY DATA SECTION (BDS)
84
int
productTemplate;
85
int
productDiscipline;
86
int
gridTemplateNum;
87
int
dataCat;
88
int
dataNum;
89
90
zuint fileOffset4;
91
zuint sectionSize4;
92
zuchar unusedBitsEndBDS;
93
bool
isGridData;
// not spherical harmonics
94
bool
isSimplePacking;
95
bool
isFloatValues;
96
int
scaleFactorE;
97
double
scaleFactorEpow2;
98
double
refValue;
99
zuint nbBitsInPack;
100
// SECTION 5: END SECTION (ES)
101
102
//---------------------------------------------
103
// Data Access
104
//---------------------------------------------
105
bool
readGribSection0_IS(
ZUFILE
* file,
bool
b_skip_initial_GRIB);
106
};
107
108
#endif
GribRecord.h
GRIB Record Base Class Implementation.
GRIBMessage
Definition
GribV2Record.cpp:163
GribRecord
Represents a meteorological data grid from a GRIB (Gridded Binary) file.
Definition
GribRecord.h:182
GribV2Record
Definition
GribV2Record.h:40
ZUFILE
Definition
zuFile.h:63
unit
Definition
TCDataFactory.h:41
zuFile.h
Unified Compressed File Access System.
plugins
grib_pi
src
GribV2Record.h
Generated on Sat Mar 1 2025 02:28:52 for OpenCPN Partial API docs by
1.9.8