NASA Logo
Ocean Color Science Software

ocssw V2022
find_variable.c File Reference
#include "find_variable.h"
#include "stdio.h"
Include dependency graph for find_variable.c:

Go to the source code of this file.

Macros

#define MAXNUMNCGRP   100
 

Functions

int32_t find_nc_variable_parent_grp_c_interface_id_ncid (const char *var_name, int32_t ncid, int32_t *netcdf_c_var_id, int32_t *netcdf_c_grp_id)
 
int32_t find_nc_variable_possible_names (const char *possible_names[], int32_t number_of_names, int32_t ncid, int32_t *netcdf_c_var_id, int32_t *netcdf_c_grp_id, int32_t *file_index_name)
 

Macro Definition Documentation

◆ MAXNUMNCGRP

#define MAXNUMNCGRP   100

Definition at line 3 of file find_variable.c.

Function Documentation

◆ find_nc_variable_parent_grp_c_interface_id_ncid()

int32_t find_nc_variable_parent_grp_c_interface_id_ncid ( const char *  var_name,
int32_t  ncid,
int32_t *  netcdf_c_var_id,
int32_t *  netcdf_c_grp_id 
)

Recursively searches for a netcdf variable within an NC file or group. Search is recursive ( DFS tree traversal)

Parameters
var_namevariable name
ncidfile or group id
netcdf_c_var_idoutput variable nc id
netcdf_c_grp_idoutput parent group nc id. Can be the file root
Returns

Definition at line 4 of file find_variable.c.

◆ find_nc_variable_possible_names()

int32_t find_nc_variable_possible_names ( const char *  possible_names[],
int32_t  number_of_names,
int32_t  ncid,
int32_t *  netcdf_c_var_id,
int32_t *  netcdf_c_grp_id,
int32_t *  file_index_name 
)

Definition at line 29 of file find_variable.c.