Loading...
Searching...
No Matches
g2_miss.c
Go to the documentation of this file.
#include "grib2_int.h"
void
g2_miss(gribfield *gfld, float *rmiss, int *nmiss)
{
g2int itype;
/* Missing value management currnetly only used in DRT's 5.2 and
* 5.3. */
if (gfld->idrtnum != 2 && gfld->idrtnum != 3)
{
*nmiss = 0;
return;
}
itype = gfld->idrtmpl[4];
if (gfld->idrtmpl[6] == 1)
{
*nmiss = 1;
if (itype == 0)
rdieee(gfld->idrtmpl + 7, rmiss + 0, 1);
else
rmiss[0] = (float)gfld->idrtmpl[7];
}
else if (gfld->idrtmpl[6] == 2)
{
*nmiss = 2;
if (itype == 0)
{
rdieee(gfld->idrtmpl + 7, rmiss, 1);
rdieee(gfld->idrtmpl + 8, rmiss + 1, 1);
}
else
{
rmiss[0] = (float)gfld->idrtmpl[7];
rmiss[1] = (float)gfld->idrtmpl[8];
}
}
else
{
*nmiss = 0;
}
}
g2_miss
void g2_miss(gribfield *gfld, float *rmiss, int *nmiss)
Check the Data Representation Template to see if missing value management is used,...
Definition g2_miss.c:24
gribfield::idrtnum
g2int idrtnum
Data Representation Template Number (see Table 5.0).
Definition grib2.h:183
gribfield::idrtmpl
g2int * idrtmpl
Contains the data values for the Data Representation Template specified by idrtnum.
Definition grib2.h:190
g2int
int64_t g2int
Long integer type.
Definition grib2.h:32
gribfield
Struct for GRIB2 field.
Definition grib2.h:46
grib2_int.h
Header file with internal function prototypes NCEPLIBS-g2c library.
rdieee
void rdieee(g2int *rieee, float *a, g2int num)
Read a list of real values in 32-bit IEEE floating point format.
Definition rdieee.c:20