-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added classes to download, decode and query GRIB wind layers. GRIB code can be disabled with variable ATOOLS_NO_GRIB. albar965/littlenavmap#283
- Loading branch information
Showing
68 changed files
with
12,871 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
glib-1.0 - August 2003 - Original version | ||
|
||
g2libc-1.0.1 - May 2004 - Changed the library name from "libg2c.a" to | ||
"libgrib2c.a" to avoid conflict with the g77 libg2c | ||
library. | ||
- Added support for Grid Definition Template 3.31, | ||
Albers Equal Area. | ||
- Changed most PDT templates in module pdstemplates to | ||
allow negative surface values. | ||
- Many minor changes to help get clean compiles. | ||
|
||
g2libc-1.0.2 - December 2004 - WMO approved the JPEG2000 and PNG Data | ||
Representation Templates ( 5.40000 and 5.40010, | ||
respectively ) for operational use. The templates | ||
were assigned WMO values of 5.40 and 5.41, | ||
respectively. Changes were made to the source to | ||
recognize either template number. | ||
- Fixed bug encountered when packing a near constant | ||
field with DRT 5.40 or 5.40000 (JPEG2000). | ||
- Added consistency check, provided by | ||
Arthur Taylor/MDL, used when unpacking Data | ||
Templates 7.2 and 7.3. | ||
- Added functionality to support encoding of | ||
"Missing" data values within the data field when | ||
using Data Representation Templates 5.2 | ||
(complex packing) and 5.3 (complex packing and | ||
spatial differencing). See octets 23 - 31 in DRTs | ||
5.2 and 5.3 for more info on missing value | ||
management. | ||
- Increased the packing efficiency of Data | ||
Representation Templates 5.2 and 5.3 by adding | ||
MDL/Glahn algorithm for determining effective | ||
groupings. | ||
|
||
g2libc-1.0.3 - December 2005 - Two bug fixes: 1) Error encoding constant | ||
data field. 2) Error encoding grid with | ||
large bitmap using DRT 5.40 - JPEG2000. | ||
|
||
g2libc-1.0.5 - August 2007 - Added GDT 3.204 Curvilinear Orthogonal Grid | ||
|
||
g2libc-1.1.7 - August 2008 - Added GDT 3.32768 Rot Lat/Lon E-grid (Arakawa) | ||
|
||
g2libc-1.1.8 - January 2009 - Initialize variable lencsec2 in routine g2_unpack2.c | ||
variable ndpts in routine g2_unpack7.c | ||
- Changed the structure name template to gtemplate to avoid | ||
of reserved word in C++ | ||
- Change routine seekgb.c to use 4 bytes instead of sizeof(g2int) | ||
|
||
g2libc-1.1.9 - June 2009 - Updated version jasper-1.900.1, libpng-1.2.35 and zlib-1.2.3 | ||
- Fixed bug causing seg fault when using PNG 1.2.35 | ||
|
||
g2libc-1.2.0 - March 2010 - Added PDT 4.31 Satellite Product | ||
- Added PDT 4.15 WAFS Product | ||
|
||
g2libc-1.2.1 - August 2010 - Added PDT 4.40,4.41,4.42,4.43 for Atmospheric Chemical Constituents | ||
- Added GDT 3.32769 Rot Lat/Lon None E-grid (Arakawa) | ||
- If section 2 has zero length, return IERR=0 | ||
|
||
g2libc-1.2.2 - March 2011 - Corrected PDT 4.42,4.43 for Atmospheric Chemical Constituents | ||
|
||
g2libc-1.2.3 - November 2011 - Fixed bugs in routines dec_png.c and enc_png.c | ||
|
||
g2libc-1.4.0 - May 2012 - Added PDT 4.44,4.45,4.46,4.47,4.48 for Aerosol products | ||
- PDT 4.50,4.51,4.52 iand 4.91 for Categorical forecast at a horizonal | ||
|
||
g2libc-1.5.0 - Sept. 2013 - Added PDT 4.33,4.34,4.53,4.54,4.50 | ||
- Added GDT 3.4,3.5,3.12,3.101,3.140 | ||
- Free up memory igds | ||
|
||
g2libc-1.6.0 - October 2015 - Added PDT 4.57, 4.60, 4.61 and | ||
- Allow a forecast time to be negative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
August 06, 2013 | ||
W/SIB:VUONG | ||
|
||
|
||
g2clib Library. | ||
|
||
This library contains "C" decoder/encoder | ||
routines for GRIB edition 2. The user API for the GRIB2 routines | ||
is described in file "grib2c.doc". | ||
|
||
This "C" source code conatins many uses of the C++ | ||
comment style "//". Please make sure you include the | ||
appropriate compiler option in the CFLAGS variable in the | ||
makefile to allow the use of "//" comment indicators. | ||
|
||
|
||
We have added support for PNG and JPEG2000 image compression | ||
algorithms within the GRIB2 standard. If you would like | ||
to compile this library to utilize these GRIB2 Templates, | ||
make sure that -DUSE_PNG and -DUSE_JPEG2000 are specified | ||
in the DEFS variable in the makefile. You will also need | ||
to download and install the external libraries listed below, | ||
if they are not already installed on your system. | ||
|
||
If you do not wish to bother with the external libs and | ||
don't need PNG and JPEG2000 support, you can remove the | ||
-DUSE_PNG and -DUSE_JPEG2000 flags from the DEFS variable | ||
in the makefile. | ||
|
||
|
||
------------------------------------------------------------------------------- | ||
|
||
External Libraries: | ||
|
||
libjasper.a - This library is a C implementation of the JPEG-2000 Part-1 | ||
standard (i.e., ISO/IEC 15444-1). This library is required | ||
if JPEG2000 support in GRIB2 is desired. If not, remove | ||
the -DUSE_JPEG2000 option from the DEFS variable | ||
in the makefile. | ||
|
||
Download version jasper-1.900.1 from the JasPer Project's | ||
home page, http://www.ece.uvic.ca/~mdadams/jasper/. | ||
|
||
More information about JPEG2000 can be found at | ||
http://www.jpeg.org/JPEG2000.html. | ||
|
||
libpng.a This library is a C implementation of the Portable Network | ||
Graphics PNG image compression format. This library is required | ||
if PNG support in GRIB2 is desired. If not, remove | ||
the -DUSE_PNG option from the DEFS variable | ||
in the makefile. | ||
|
||
If not already installed on your system, download version | ||
libpng-1.2.44 from http://www.libpng.org/pub/png/libpng.html. | ||
|
||
More information about PNG can be found at | ||
http://www.libpng.org/pub/png/. | ||
|
||
libz.a This library contains compression/decompression routines | ||
used by libpng.a for PNG image compression support. | ||
This library is required if PNG support in GRIB2 is desired. | ||
If not, remove the -DUSE_PNG option from the DEFS variable | ||
in g2lib/makefile. | ||
|
||
If not already installed on your system, download version | ||
zlib-1.2.6 from http://www.gzip.org/zlib/. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include "grib2.h" | ||
|
||
void cmplxpack(g2float *fld,g2int ndpts, g2int idrsnum,g2int *idrstmpl, | ||
unsigned char *cpack, g2int *lcpack) | ||
//$$$ SUBPROGRAM DOCUMENTATION BLOCK | ||
// . . . . | ||
// SUBPROGRAM: cmplxpack | ||
// PRGMMR: Gilbert ORG: W/NP11 DATE: 2004-08-27 | ||
// | ||
// ABSTRACT: This subroutine packs up a data field using a complex | ||
// packing algorithm as defined in the GRIB2 documention. It | ||
// supports GRIB2 complex packing templates with or without | ||
// spatial differences (i.e. DRTs 5.2 and 5.3). | ||
// It also fills in GRIB2 Data Representation Template 5.2 or 5.3 | ||
// with the appropriate values. | ||
// | ||
// PROGRAM HISTORY LOG: | ||
// 2004-08-27 Gilbert | ||
// | ||
// USAGE: cmplxpack(g2float *fld,g2int ndpts, g2int idrsnum,g2int *idrstmpl, | ||
// unsigned char *cpack, g2int *lcpack) | ||
// INPUT ARGUMENT LIST: | ||
// fld[] - Contains the data values to pack | ||
// ndpts - The number of data values in array fld[] | ||
// idrsnum - Data Representation Template number 5.N | ||
// Must equal 2 or 3. | ||
// idrstmpl - Contains the array of values for Data Representation | ||
// Template 5.2 or 5.3 | ||
// [0] = Reference value - ignored on input | ||
// [1] = Binary Scale Factor | ||
// [2] = Decimal Scale Factor | ||
// . | ||
// . | ||
// [6] = Missing value management | ||
// [7] = Primary missing value | ||
// [8] = Secondary missing value | ||
// . | ||
// . | ||
// [16] = Order of Spatial Differencing ( 1 or 2 ) | ||
// . | ||
// . | ||
// | ||
// OUTPUT ARGUMENT LIST: | ||
// idrstmpl - Contains the array of values for Data Representation | ||
// Template 5.3 | ||
// [0] = Reference value - set by compack routine. | ||
// [1] = Binary Scale Factor - unchanged from input | ||
// [2] = Decimal Scale Factor - unchanged from input | ||
// . | ||
// . | ||
// cpack - The packed data field (character*1 array) | ||
// lcpack - length of packed field cpack[]. | ||
// | ||
// REMARKS: None | ||
// | ||
// ATTRIBUTES: | ||
// LANGUAGE: C | ||
// MACHINE: IBM SP | ||
// | ||
//$$$ | ||
{ | ||
|
||
|
||
if ( idrstmpl[6] == 0 ) { // No internal missing values | ||
compack(fld,ndpts,idrsnum,idrstmpl,cpack,lcpack); | ||
} | ||
else if ( idrstmpl[6] == 1 || idrstmpl[6] == 2) { | ||
misspack(fld,ndpts,idrsnum,idrstmpl,cpack,lcpack); | ||
} | ||
else { | ||
printf("cmplxpack: Don:t recognize Missing value option."); | ||
*lcpack=-1; | ||
} | ||
|
||
} |
Oops, something went wrong.