ocssw
V2022
|
#include <netcdf.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Classes | |
struct | dim_str_nc |
struct | att_str_nc |
struct | var_str_nc |
struct | grp_str_nc |
Macros | |
#define | TRYMEM(file, line, memstat) |
#define | TRY_NC(file, line, ncstat) |
Functions | |
dim_str_nc * | load_dims_nc (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) |
void | check_err (const int stat, const int line, const char *file) |
void | report_err (const int stat, const int line, const char *file) |
int | createNCDF (int ncid, const char *sname, const char *lname, const char *standard_name, const char *units, void *fill_value, const char *flag_values, const char *flag_meanings, double low, double high, int nt, int rank, int *dimids, size_t *chunksize) |
void | nc_init_compress (int32_t nc_id, int32_t var_id, int32_t *dimids, int32_t rank, size_t *chunksize, int deflate_level) |
int | nc_init_compress2 (int32_t nc_id, char *varnam, int32_t var_id, int32_t *dimids, int32_t rank, size_t *chunksize, int type_size, int deflate_level) |
int | check_chunksizes (size_t type_len, int32_t ndims, const size_t *chunksizes) |
Macro Definition Documentation
◆ TRY_NC
#define TRY_NC | ( | file, | |
line, | |||
ncstat | |||
) |
◆ TRYMEM
#define TRYMEM | ( | file, | |
line, | |||
memstat | |||
) |
Function Documentation
◆ check_chunksizes()
int check_chunksizes | ( | size_t | type_len, |
int32_t | ndims, | ||
const size_t * | chunksizes | ||
) |
Definition at line 159 of file nc_init_compress.c.
◆ check_err()
Definition at line 35 of file nc4utils.c.
◆ createNCDF()
int createNCDF | ( | int | ncid, |
const char * | sname, | ||
const char * | lname, | ||
const char * | standard_name, | ||
const char * | units, | ||
void * | fill_value, | ||
const char * | flag_values, | ||
const char * | flag_meanings, | ||
double | low, | ||
double | high, | ||
int | nt, | ||
int | rank, | ||
int * | dimids, | ||
size_t * | chunksize | ||
) |
Definition at line 17 of file createNCDF.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.
◆ 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_dims_nc()
dim_str_nc* load_dims_nc | ( | int | ncid | ) |
◆ load_grp_nc()
int load_grp_nc | ( | grp_str_nc * | grp | ) |
Definition at line 423 of file nc4utils.c.
◆ load_vars_nc()
var_str_nc* load_vars_nc | ( | int | ncid | ) |
Definition at line 254 of file nc4utils.c.
◆ nc_init_compress()
void nc_init_compress | ( | int32_t | nc_id, |
int32_t | var_id, | ||
int32_t * | dimids, | ||
int32_t | rank, | ||
size_t * | chunksize, | ||
int | deflate_level | ||
) |
nc_init_compress
R. Healy 9/26/2016
- Parameters
-
[in]
Definition at line 24 of file nc_init_compress.c.
◆ nc_init_compress2()
int nc_init_compress2 | ( | int32_t | nc_id, |
char * | varnam, | ||
int32_t | var_id, | ||
int32_t * | dimids, | ||
int32_t | rank, | ||
size_t * | chunksize, | ||
int | type_size, | ||
int | deflate_level | ||
) |
nc_init_compress
R. Healy 9/26/2016
- Parameters
-
[in]
Definition at line 94 of file nc_init_compress.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.