vgrib2
Version:
[](https://badge.fury.io/js/vgrib2)
51 lines (50 loc) • 1.74 kB
TypeScript
import { Buffer } from 'buffer/';
export declare type IndicatorSectionValues = ReturnType<typeof parseSection0>;
export declare type IndicatorSection = ReturnType<typeof lookupSection0>;
/**
* Indicator Section
*
* [Read more...](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_sect0.shtml)
*/
export declare const parseSection0: (section: Buffer) => {
/** Number of GRIB section */
sectionNumber: number;
/** Name of Grib section */
sectionName: string;
/** Length of GRIB section (Always 16 for Section 0)*/
length: number;
/** Section 0 Contents */
contents: {
/** GRIB string encoded */
gribEncoded: string;
/** Discipline [Table 0.0](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table0-0.shtml) */
discipline: number;
/** Edition number - 2 for GRIB2 */
gribEdition: number;
/** Total length of GRIB message in octets (All sections) */
gribLength: number;
};
};
/**
*
* @param ins Indictor Section
* @returns Indicator Section with corresponding string values
*/
export declare const lookupSection0: (ins: IndicatorSectionValues) => {
contents: {
/** Discipline */
discipline: string;
/** GRIB string encoded */
gribEncoded: string;
/** Edition number - 2 for GRIB2 */
gribEdition: number;
/** Total length of GRIB message in octets (All sections) */
gribLength: number;
};
/** Number of GRIB section */
sectionNumber: number;
/** Name of Grib section */
sectionName: string;
/** Length of GRIB section (Always 16 for Section 0)*/
length: number;
};