NCEPLIBS-g2  3.4.8
gribcreate.F90 File Reference

This subroutines initializes a new GRIB2 message and packs GRIB2 Indicator Section and Identification Section. More...

Go to the source code of this file.

Functions/Subroutines

subroutine gribcreate (cgrib, lcgrib, listsec0, listsec1, ierr)
 This subroutine initializes a new GRIB2 message and packs GRIB2 sections 0 (Indicator Section) and 1 (Identification Section). More...
 

Detailed Description

This subroutines initializes a new GRIB2 message and packs GRIB2 Indicator Section and Identification Section.

Author
Stephen Gilbert
Date
2000-04-28

Definition in file gribcreate.F90.

Function/Subroutine Documentation

◆ gribcreate()

subroutine gribcreate ( character(len = 1), dimension(lcgrib), intent(inout)  cgrib,
integer, intent(in)  lcgrib,
integer, dimension(*), intent(in)  listsec0,
integer, dimension(*), intent(in)  listsec1,
integer, intent(out)  ierr 
)

This subroutine initializes a new GRIB2 message and packs GRIB2 sections 0 (Indicator Section) and 1 (Identification Section).

This routine is used with routines addlocal(), addgrid(), addfield(), and gribend() to create a complete GRIB2 message. Subroutine gribcreate() must be called first to initialize a new GRIB2 message. Also, a call to gribend() is required to complete GRIB2 message after all fields have been added.

Parameters
[in,out]cgribCharacter array to contain the GRIB2 message.
[in]lcgribMaximum Length (in bytes) of array cgrib.
[in]listsec0Contains information needed for GRIB Indicator Section 0. Must be dimensioned >= 2.
  • listsec0(1) Discipline-GRIB Master Table Number (Code Table 0.0).
  • listsec0(2) GRIB Edition Number (currently 2)
[in]listsec1Contains information needed for GRIB Identification Section 1. Must be dimensioned >= 13.
  • listsec1(1) Id of orginating centre (Table 0).
  • listsec1(2) Id of orginating sub-centre (Table C).
  • listsec1(3) GRIB Master Tables Version Number (Table 1.0).
  • listsec1(4) GRIB Local Tables Version Number (Table 1.1).
  • listsec1(5) Significance of Reference Time (Table 1.2)
  • listsec1(6) Reference Time - Year (4 digits)
  • listsec1(7) Reference Time - Month
  • listsec1(8) Reference Time - Day
  • listsec1(9) Reference Time - Hour
  • listsec1(10) Reference Time - Minute
  • listsec1(11) Reference Time - Second
  • listsec1(12) Production status of data (Table 1.3).
  • listsec1(13) Type of processed data (Table 1.4).
[out]ierrError return code.
  • 0 no error
  • 1 Tried to use for version other than GRIB Edition 2
Note
This routine is intended for use with routines addlocal(), addgrid(), addfield(), and gribend() to create a complete GRIB2 message.
Author
Stephen Gilbert
Date
2000-04-28

Definition at line 54 of file gribcreate.F90.

References g2_sbytec().

Referenced by putgb2().