cpc.geofiles.reading Module

Contains methods for reading gridded data.

Functions

read_grib(file, grib_type, grib_var, grib_level, geogrid, yrev=False, grep_fhr=None, debug=False)

Reads a record from a grib file

Uses wgrib for grib1 files, and wgrib2 for grib2 files. For grib1 files, the record in question is written to a temporary binary file, the data is read in, and the file is removed. wgrib2 has the ability to write the record to STDIN, so no temporary file is necessary to read in a record from a grib2 file.

Parameters

Returns

Raises