vgrib2
Version:
[](https://badge.fury.io/js/vgrib2)
63 lines (62 loc) • 2.98 kB
TypeScript
import { Buffer } from 'buffer/';
export declare type IdentificationSectionValues = ReturnType<typeof parseSection1>;
export declare type IdentificationSection = ReturnType<typeof lookupSection1>;
/**
* Identification Section
*
* [Read more...](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_sect1.shtml)
*/
export declare const parseSection1: (section: Buffer) => {
/** Number of GRIB section */
sectionNumber: number;
/** Name of Grib section */
sectionName: string;
/** Length of GRIB section */
length: number;
/** Section 1 Contents */
contents: {
/** Identification of originating/generating center [Table 0](https://www.nco.ncep.noaa.gov/pmb/docs/on388/table0.html) */
center: number;
/** Identification of originating/generating subcenter [Table C](https://www.nco.ncep.noaa.gov/pmb/docs/on388/tablec.html) */
subcenter: number;
/** GRIB master tables version number [Table 1.0](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table1-0.shtml) */
gribMasterTablesVersion: number;
/** Version number of GRIB local tables used to augment Master Tables [Table 1.1](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table1-1.shtml) */
gribLocalTablesVersion: number;
/** Significance of reference time [Table 1.2](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table1-2.shtml) */
significanceOfRT: number;
/** Reference Time */
refTime: Date;
/** Type of processed data in this GRIB message [Table 1.4](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table1-4.shtml) */
typeOfProcessedData: number;
};
};
/**
*
* @param ids Identification Section
* @returns Identification Section with corresponding string values
*/
export declare const lookupSection1: (ids: IdentificationSectionValues) => {
contents: {
/** Identification of originating/generating center */
center: string;
/** Identification of originating/generating subcenter */
subcenter: string | null;
/** Significance of reference time */
significanceOfRT: string;
/** Type of processed data in this GRIB message */
typeOfProcessedData: string;
/** GRIB master tables version number [Table 1.0](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table1-0.shtml) */
gribMasterTablesVersion: number;
/** Version number of GRIB local tables used to augment Master Tables [Table 1.1](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table1-1.shtml) */
gribLocalTablesVersion: number;
/** Reference Time */
refTime: Date;
};
/** Number of GRIB section */
sectionNumber: number;
/** Name of Grib section */
sectionName: string;
/** Length of GRIB section */
length: number;
};