NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
putgb.f File Reference

Packs and writes a grib message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine putgb (lugb, kf, kpds, kgds, lb, f, iret)
 This subprogram is nearly the inverse of getgb.
 

Detailed Description

Packs and writes a grib message.

Author
Mark Iredell
1994-04-01

Definition in file putgb.f.

Function/Subroutine Documentation

◆ putgb()

subroutine putgb (   lugb,
  kf,
integer, dimension(200)  kpds,
integer, dimension(200)  kgds,
logical*1, dimension(kf)  lb,
real, dimension(kf)  f,
  iret 
)

This subprogram is nearly the inverse of getgb.

Program history log:

  • Mark Iredell 1994-04-01
  • Mark Iredell 1995-10-31 Removed saves and prints.
  • George Gayno 2009-10-15 Increased maxbit from 16 to 32.
Parameters
[in]LUGBInteger unit of the unblocked grib data file.
[in]KFInteger number of data points.
[in]KPDSInteger (200) pds parameters.
  • 1: id of center.
  • 2: generating process id number.
  • 3: grid definition.
  • 4: gds/bms flag (right adj copy of octet 8).
  • 5: indicator of parameter.
  • 6: type of level.
  • 7: height/pressure , etc of level.
  • 8: year including (century-1).
  • 9: month of year.
  • 10: day of month.
  • 11: hour of day.
  • 12: minute of hour.
  • 13: indicator of forecast time unit.
  • 14: time range 1.
  • 15: time range 2.
  • 16: time range flag.
  • 17: number included in average.
  • 18: version nr of grib specification.
  • 19: version nr of parameter table.
  • 20: nr missing from average/accumulation.
  • 21: century of reference time of data.
  • 22: units decimal scale factor.
  • 23: subcenter number.
  • 24: pds byte 29, for nmc ensemble products.
    • 128 if forecast field error.
    • 64 if bias corrected fcst field.
    • 32 if smoothed field.
    • warning: can be combination of more than 1.
  • 25: pds byte 30, not used.
[in]kgdsInteger (200) gds parameters
  • 1: data representation type.
  • 19: number of vertical coordinate parameters.
  • 20: octet number of the list of vertical coordinate parameters or octet number of the list of numbers of points in each row or 255 if neither are present.
  • 21: for grids with pl, number of points in grid.
  • 22: number of words in each row.
  • Latitude/longitude grids.
    • 2: n(i) nr points on latitude circle.
    • 3: n(j) nr points on longitude meridian.
    • 4: la(1) latitude of origin.
    • 5: lo(1) longitude of origin.
    • 6: resolution flag (right adj copy of octet 17).
    • 7: la(2) latitude of extreme point.
    • 8: lo(2) longitude of extreme point.
    • 9: di longitudinal direction of increment.
    • 10: dj latitudinal direction increment.
    • 11: scanning mode flag (right adj copy of octet 28).
  • Gaussian grids.
    • 2: n(i) nr points on latitude circle.
    • 3: n(j) nr points on longitude meridian.
    • 4: la(1) latitude of origin.
    • 5: lo(1) longitude of origin.
    • 6: resolution flag (right adj copy of octet 17).
    • 7: la(2) latitude of extreme point.
    • 8: lo(2) longitude of extreme point.
    • 9: di longitudinal direction of increment.
    • 10: n - nr of circles pole to equator.
    • 11: scanning mode flag (right adj copy of octet 28).
    • 12: nv - nr of vert coord parameters.
    • 13: pv - octet nr of list of vert coord parameters or pl - location of the list of numbers of points in each row (if no vert coord parameters are present) or 255 if neither are present.
  • Polar stereographic grids.
    • 2: n(i) nr points along lat circle.
    • 3: n(j) nr points along lon circle.
    • 4: la(1) latitude of origin.
    • 5: lo(1) longitude of origin.
    • 6: resolution flag (right adj copy of octet 17).
    • 7: lov grid orientation.
    • 8: dx - x direction increment.
    • 9: dy - y direction increment.
    • 10: projection center flag.
    • 11: scanning mode (right adj copy of octet 28).
  • Spherical harmonic coefficients.
    • 2: j pentagonal resolution parameter.
    • 3: k pentagonal resolution parameter.
    • 4: m pentagonal resolution parameter.
    • 5: representation type.
    • 6: coefficient storage mode.
  • Mercator grids.
    • 2: n(i) nr points on latitude circle.
    • 3: n(j) nr points on longitude meridian.
    • 4: la(1) latitude of origin.
    • 5: lo(1) longitude of origin.
    • 6: resolution flag (right adj copy of octet 17).
    • 7: la(2) latitude of last grid point.
    • 8: lo(2) longitude of last grid point.
    • 9: latit - latitude of projection intersection.
    • 10: reserved.
    • 11: scanning mode flag (right adj copy of octet 28).
    • 12: longitudinal dir grid length.
    • 13: latitudinal dir grid length.
  • Lambert conformal grids.
    • 2: nx nr points along x-axis.
    • 3: ny nr points along y-axis.
    • 4: la1 lat of origin (lower left).
    • 5: lo1 lon of origin (lower left).
    • 6: resolution (right adj copy of octet 17).
    • 7: lov - orientation of grid.
    • 8: dx - x-dir increment.
    • 9: dy - y-dir increment.
    • 10: projection center flag.
    • 11: scanning mode flag (right adj copy of octet 28).
    • 12: latin 1 - first lat from pole of secant cone inter.
    • 13: latin 2 - second lat from pole of secant cone inter.
[in]lblogical*1 (kf) bitmap if present
[in]freal (kf) data
[out]iretinteger return code.
  • 0 all ok.
  • other w3fi72 grib packer return code.
Note
Subprogram can be called from a multiprocessing environment. Do not engage the same logical unit from more than one processor.
Author
Mark Iredell
1994-04-01

Definition at line 134 of file putgb.f.