NEP 2.7.0
NetCDF Extension Pack
Loading...
Searching...
No Matches
Macros | Functions | Variables
grib2file.c File Reference

GRIB2 file reader functions. More...

#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "nep_nc4.h"
#include "grib2dispatch.h"
#include <grib2.h>

Macros

#define GRIB2_MAX_TEMPLATE_LEN   200
 

Functions

static int nc4_set_var_type (nc_type xtype, int endianness, size_t type_size, char *type_name, NC_TYPE_INFO_T **typep)
 
static int grib2_var_list_add (NC_GRP_INFO_T *grp, const char *name, int ndims, nc_type xtype, int endianness, size_t type_size, char *type_name, void *format_var_info, NC_VAR_INFO_T **var)
 
static int grib2_add_int_att (NCindex *att_list, const char *name, int value)
 
static int grib2_add_str_att (NCindex *att_list, const char *name, const char *value)
 
static int grib2_add_float_att (NCindex *att_list, const char *name, float value)
 
int NC_GRIB2_open (const char *path, int mode, int basepe, size_t *chunksizehintp, void *parameters, const NC_Dispatch *dispatch, int ncid)
 
int NC_GRIB2_abort (int ncid)
 
int NC_GRIB2_close (int ncid, void *ignore)
 
int NC_GRIB2_inq_format (int ncid, int *formatp)
 
int NC_GRIB2_inq_format_extended (int ncid, int *formatp, int *modep)
 
int NC_GRIB2_get_vara (int ncid, int varid, const size_t *start, const size_t *count, void *value, nc_type memtype)
 

Variables

static const int ILLEGAL_OPEN_FLAGS = (NC_MMAP|NC_64BIT_OFFSET|NC_DISKLESS|NC_WRITE)
 

Detailed Description

GRIB2 file reader functions.

Author
Edward Hartnett
Date
2026-03-08

Macro Definition Documentation

◆ GRIB2_MAX_TEMPLATE_LEN

#define GRIB2_MAX_TEMPLATE_LEN   200

Maximum number of PDS/GDS/DRS template entries supported.

Function Documentation

◆ grib2_add_float_att()

static int grib2_add_float_att ( NCindex *  att_list,
const char *  name,
float  value 
)
static

◆ grib2_add_int_att()

static int grib2_add_int_att ( NCindex *  att_list,
const char *  name,
int  value 
)
static

◆ grib2_add_str_att()

static int grib2_add_str_att ( NCindex *  att_list,
const char *  name,
const char *  value 
)
static

◆ grib2_var_list_add()

static int grib2_var_list_add ( NC_GRP_INFO_T *  grp,
const char *  name,
int  ndims,
nc_type  xtype,
int  endianness,
size_t  type_size,
char *  type_name,
void *  format_var_info,
NC_VAR_INFO_T **  var 
)
static

◆ nc4_set_var_type()

static int nc4_set_var_type ( nc_type  xtype,
int  endianness,
size_t  type_size,
char *  type_name,
NC_TYPE_INFO_T **  typep 
)
static

◆ NC_GRIB2_abort()

int NC_GRIB2_abort ( int  ncid)

◆ NC_GRIB2_close()

int NC_GRIB2_close ( int  ncid,
void *  ignore 
)

◆ NC_GRIB2_get_vara()

int NC_GRIB2_get_vara ( int  ncid,
int  varid,
const size_t *  start,
const size_t *  count,
void *  value,
nc_type  memtype 
)

◆ NC_GRIB2_inq_format()

int NC_GRIB2_inq_format ( int  ncid,
int *  formatp 
)

◆ NC_GRIB2_inq_format_extended()

int NC_GRIB2_inq_format_extended ( int  ncid,
int *  formatp,
int *  modep 
)

◆ NC_GRIB2_open()

int NC_GRIB2_open ( const char *  path,
int  mode,
int  basepe,
size_t *  chunksizehintp,
void *  parameters,
const NC_Dispatch *  dispatch,
int  ncid 
)

Variable Documentation

◆ ILLEGAL_OPEN_FLAGS

const int ILLEGAL_OPEN_FLAGS = (NC_MMAP|NC_64BIT_OFFSET|NC_DISKLESS|NC_WRITE)
static