ocssw
V2022
|
#include "nc4utils.h"
Go to the source code of this file.
Macros | |
#define | FAIL 1 |
#define | SUCCESS 0 |
Functions | |
void | report_err (const int stat, const int line, const char *file) |
void | check_err (const int stat, const int line, const char *file) |
char * | format_ncval (void *value, nc_type type, size_t nvals) |
dim_str_nc * | load_grpdims (int ncid) |
void | print_dims_nc (dim_str_nc *dim, int ndims) |
void | free_dims_nc (dim_str_nc *dim) |
int | find_dimid_nc (int ncid, int *dimid, const char *dimnames[]) |
att_str_nc * | load_atts_nc (int ncid, int varid) |
void | print_atts_nc (att_str_nc *att, int natts, char *varname) |
void | free_atts_nc (att_str_nc *att, int natts) |
var_str_nc * | load_vars_nc (int ncid) |
var_str_nc * | find_var_byname_nc (grp_str_nc nc, const char *varname, const char *grpname) |
int | readall_var (var_str_nc *var) |
void | print_vars_nc (var_str_nc *var, int nvars) |
void | free_vars_nc (var_str_nc *var, int nvars) |
int | find_varid_nc (int ncid, int *varid, const char *varnames[]) |
int | load_grp_nc (grp_str_nc *grp) |
void | print_grp_nc (grp_str_nc grp) |
void | free_grp_nc (grp_str_nc *grp) |
Macro Definition Documentation
◆ FAIL
#define FAIL 1 |
Definition at line 3 of file nc4utils.c.
◆ SUCCESS
#define SUCCESS 0 |
Definition at line 6 of file nc4utils.c.
Function Documentation
◆ check_err()
Definition at line 35 of file nc4utils.c.
◆ find_dimid_nc()
int find_dimid_nc | ( | int | ncid, |
int * | dimid, | ||
const char * | dimnames[] | ||
) |
Find ID of first dimension found in input list.
- Parameters
-
[in] ncid NetCDF file or group ID, [in] dimnames Null-terminated list of possible dimension names. [out] dimid NetCDF dimension ID
- Returns
- Error if no matching dimension found.
Definition at line 161 of file nc4utils.c.
◆ find_var_byname_nc()
var_str_nc* find_var_byname_nc | ( | grp_str_nc | nc, |
const char * | varname, | ||
const char * | grpname | ||
) |
Definition at line 314 of file nc4utils.c.
◆ find_varid_nc()
int find_varid_nc | ( | int | ncid, |
int * | varid, | ||
const char * | varnames[] | ||
) |
Find ID of first variable found in input list.
- Parameters
-
[in] ncid NetCDF file or group ID, [in] varnames Null-terminated list of possible variable names. [out] varid NetCDF variable ID
- Returns
- Error if no variable found.
Definition at line 407 of file nc4utils.c.
◆ format_ncval()
char* format_ncval | ( | void * | value, |
nc_type | type, | ||
size_t | nvals | ||
) |
Definition at line 43 of file nc4utils.c.
◆ free_atts_nc()
void free_atts_nc | ( | att_str_nc * | att, |
int | natts | ||
) |
Definition at line 236 of file nc4utils.c.
◆ free_dims_nc()
void free_dims_nc | ( | dim_str_nc * | dim | ) |
Definition at line 147 of file nc4utils.c.
◆ free_grp_nc()
void free_grp_nc | ( | grp_str_nc * | grp | ) |
Definition at line 495 of file nc4utils.c.
◆ free_vars_nc()
void free_vars_nc | ( | var_str_nc * | var, |
int | nvars | ||
) |
Definition at line 384 of file nc4utils.c.
◆ load_atts_nc()
att_str_nc* load_atts_nc | ( | int | ncid, |
int | varid | ||
) |
Definition at line 177 of file nc4utils.c.
◆ load_grp_nc()
int load_grp_nc | ( | grp_str_nc * | grp | ) |
Definition at line 423 of file nc4utils.c.
◆ load_grpdims()
dim_str_nc* load_grpdims | ( | int | ncid | ) |
Definition at line 109 of file nc4utils.c.
◆ load_vars_nc()
var_str_nc* load_vars_nc | ( | int | ncid | ) |
Definition at line 254 of file nc4utils.c.
◆ print_atts_nc()
void print_atts_nc | ( | att_str_nc * | att, |
int | natts, | ||
char * | varname | ||
) |
Definition at line 224 of file nc4utils.c.
◆ print_dims_nc()
void print_dims_nc | ( | dim_str_nc * | dim, |
int | ndims | ||
) |
Definition at line 139 of file nc4utils.c.
◆ print_grp_nc()
void print_grp_nc | ( | grp_str_nc | grp | ) |
Definition at line 466 of file nc4utils.c.
◆ print_vars_nc()
void print_vars_nc | ( | var_str_nc * | var, |
int | nvars | ||
) |
Definition at line 362 of file nc4utils.c.
◆ readall_var()
int readall_var | ( | var_str_nc * | var | ) |
Definition at line 334 of file nc4utils.c.
◆ report_err()
Definition at line 28 of file nc4utils.c.