Grib1 To Grib2 Converter Box

COPYGB Functionality

The COPYGB tool was developed by the NOAA Environmental Modeling Center, is distributed by the National Weather Service, Climate Prediction Center, and is also distributed as part of the Unified PostProcessor (UPP). It may be run on GRIB files to horizontally interpolate the data from one grid to another. The MET tools which compare gridded forecasts to gridded observations (Grid-Stat, Wavelet-Stat, Ensemble-Stat and, MODE) require that the input forecast and observation data be on the same grid. Therefore the COPYGB tool is very useful in preparing your gridded data for use in MET.

The following copygb commands assume that copygb is installed on your system and has been added to your path.

COPYGB Usage

If you have copygb installed on your machine, view the usage statement by simply typing the following:

Grib1 to grib2 converter box without

GRIB1 & GRIB2 Major Differences. One GRIB2 message can contain multiple fields.Sequences of GRIB sections 2 to 7, sections 3 to 7 or sections 4 to 7 may be repeated within a single GRIB message. Once a section is repeated all the following sections must appear in order. Subject: Bug 257781 New: Review Request: cnvgrib - GRIB1 GRIB2 conversion utility Date: Mon, 27 Aug 2007 15:40:01 -0400 Please do not reply directly to this email.

Usage: copygb
[-g 'grid [kgds]'] [-i 'ip [ipopts]'] [-k 'kpds'] [-v 'uparms']
[-B mapgrib [-b mapindex] [-A '<> mapthreshold'] [-K 'mapkpds']]
[-M 'mask'/mergegrib [-m mergeindex]] [-X] [-a] [-N namelist]
then either: grib1 index1 grib2
or: -x grib1 grib2

COPYGB accepts many optional command line options which control its functionality. In this tutorial, we'll focus on the simplest types of horizontal interpolation using the default interpolation options. For a full description of these command line options, please see the copygb.doc COPYGB documentation file.

GRIB, or 'General Regularly-distributed Information in Binary form,' is a data format maintained by the WMO. sIt is used mainly for encoding outputs from meteorological models. It is a table-driven, binary format, designed for efficient transmission, storage and processing by computers.
Over the years, GRIB has been modified and improved in order to adapt to the changing needs of the meteorological and oceanological communities. The most commonly used editions of GRIB are GRIB Edition 1 and GRIB Edition 2. GRIB Edition 1 is still widely used throughout the world. Its name stands for'GRIdded Binary'. GRIB Edition 2 is the newer version of GRIB which has several advantages over the older one. Its name stands for 'General Regularly-distributed Information in Binary form.' DWD only produces model outputs in GRIB2, but GRIB1 was used for many years and thus a large portion of the historical model data at DWD is stored in GRIB1.
This page presents a short overview of the structure of GRIB2. It is intended to help users understand the content of data stored in GRIB. Technical, in-depth documentation can be found in the WMO's Manual on Codes.

GRIB is designed to be processed using machines, not directly by humans. Therefore, specialized software is required in order to work with it. Some available software packages at the end of this text.

Structure of a GRIB message

Grib1 to grib2 converter box wiringGrib1 To Grib2 Converter Box

Data encoded in GRIB is called a message. A single file can contain as many GRIB messages as desired. The structure of a GRIB2 message is described below. GRIB1 is not described, because it is now considered obsolete. For further technical details on the GRIB, its structure and formatting, see the Manual on Codes.

A GRIB is composed of several sections. The sections contain either integrity data that allow software to learn where the GRIB begins and ends, the data stored in the message itself, or information about the data stored in the message.
Sections that store information about the data in the message can contain differing information. For example, the product definition section needs to contain more information in order to describe an ensemble forecast than it does to describe a deterministic forecast. Decoding software can find out what information a section contains by reading the template it uses. A template describes how long it will be, what data it stores and in what order.about the data stored in the message.
Some sections in a message can be reused. This is done by repeating the following sections and skipping section 8, which signifies the end of the message. In this way, the identification section, local data and grid definitions can be reused to refer to multiple data sets.

A GRIB message contains the following sections:

Section 0: Indicator section
Contains the letters 'GRIB', the type of data stored in the message, the GRIB edition number and the length of the message.

Section 1: Identification section
Contains information about who produced the GRIB, what tables they used to describe the data and what time period the GRIB refers to. Sections following this section can be repeated as described above.

Section 2: Local use section
Contains local data that is not regulated by the WMO. This section is optional. Sections following this section can be repeated as described above.

Section 3: Grid definition section
Contains information about how the data stored in the GRIB can be located on the Earth. Sections following this section can be repeated as described above.

Section 4: Product definition section
Defines what product is stored in the GRIB - for example, if the GRIB stores forecast data, what kind of forecast it describes.

Section 5: Data representation section
Describes how the data in the Section 7 is stored. This makes it possible to use different data compression methods.

Grib1 To Grib2 Converter Boxes

Section 6: Bit-map section
Contains information about an optional bitmap that refers to the data in section 7. A bitmap can be used to mask out areas in the grid the data represents. For example, a GRIB might contain data stored on a regular, rectangular grid over an area in Europe. In section 4, this grid would be defined. However, data might only have been produced for areas over water. In this case, a bitmap could be used which would specify which parts of the grid contained real data and which were empty. Then, in section 7, values over land would be skipped, so that less values were encoded, thus saving space.

Section 7: Data section
Contains the actual data stored in the GRIB.

Section 8: End section
Contains the letters '7777', indicating that the message has come to an end.

Grib1 To Grib2 Converter Box Without

Thus, in order to understand the data stored in section 7 of a GRIB message, section 5 must be read so that the values can be decompressed. Section 3 is necessary to understand what areas of the Earth the data is referring to. Section 6 is needed in order to know how the data from section 7 should be distributed over that area. Section 4 is needed in order to understand what the data means, while section 2 might be needed in order to understand any additional information the author decided to provide. Section 1 tells about the author, and sections 0 and 8 show where the GRIB begins and ends.

Software for working with GRIB

GRIB is designed to be processed using machines, not directly by humans. Therefore, specialized software is required in order to work with it. DWD uses the ecCodes in order to encode and decode GRIB messages. This and other available software packages are described in the following list.

ecCodes
A software library by ECMWF to encode and decode meteorological codes in general, including BUFR.

wgrib2
A tool for working with GRIB2 messages from NCEP.

Grib1 To Grib2 Converter Box Free

wgrib
A tool for working with GRIB1 messages from NCEP.