NetCDF Assembler documentation 1.0.0
All Data Structures Files Functions Pages
nc_assembler.hh File Reference

The header file of the project. More...

#include <algorithm>
#include <cerrno>
#include <cmath>
#include <cstdbool>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <iostream>
#include <libgen.h>
#include <linux/limits.h>
#include <netcdf.h>
#include <stdexcept>
#include <unistd.h>
#include <variant>
#include <vector>
#include <wait.h>

Go to the source code of this file.

Data Structures

struct  dimension_information_s
 
struct  variable_information_s
 
struct  file_information_s
 
class  assembler
 

Macros

#define RED   "\033[0;31m"
 
#define YELLOW   "\033[0;33m"
 
#define BOLD   "\033[1m"
 
#define UNDERLINE   "\033[4m"
 
#define RESET   "\033[0m"
 
#define DEBUG
 
#define ERROR(ec)   check_error(ec, __FILE__, __LINE__, __PRETTY_FUNCTION__)
 

Typedefs

using var_type = std::variant<signed char, char, short, int, float, double, unsigned char, unsigned short, unsigned int, long long, unsigned long long, char *>
 
typedef struct dimension_information_s dimension_information_t
 
typedef struct variable_information_s variable_information_t
 
typedef struct file_information_s file_information_t
 

Functions

void check_error (int in_i_error, const char *in_ac_file, const int in_i_line, const char *in_ac_func)
 Check if there is an error.
 
void open_file (file_information_t &in_s_file_info, int in_i_mode)
 Open a NetCDF or a GRIB file.
 
void create_file (file_information_t &in_s_file_info, int in_i_mode)
 Create a NetCDF file.
 
void get_info (file_information_t &in_s_file_info)
 Get the file information.
 
void close_file (file_information_t &in_s_file_info)
 Close a NetCDF file.
 
size_t get_dimension_size (file_information_t &in_s_file_info, size_t in_i_dim_id)
 Get the dimension size.
 

Detailed Description

The header file of the project.

Author
Nicolas TORO

Function Documentation

◆ check_error()

void check_error ( int in_i_error,
const char * in_ac_file,
const int in_i_line,
const char * in_ac_func )

Check if there is an error.

Parameters
in_i_errorThe error code
in_ac_fileThe file name
in_i_lineThe line number
in_ac_funcThe function name
Returns
void

◆ close_file()

void close_file ( file_information_t & in_s_file_info)

Close a NetCDF file.

Parameters
in_s_file_infoThe file information
Returns
void

◆ create_file()

void create_file ( file_information_t & in_s_file_info,
int in_i_mode )

Create a NetCDF file.

Parameters
in_s_file_infoThe file information
in_i_modeThe mode to open the file
Returns
void

◆ get_dimension_size()

size_t get_dimension_size ( file_information_t & in_s_file_info,
size_t in_i_dim_id )

Get the dimension size.

Parameters
in_s_file_infoThe file information
in_i_dim_idThe dimension id
Returns
size_t The dimension size

◆ get_info()

void get_info ( file_information_t & in_s_file_info)

Get the file information.

Parameters
in_s_file_infoThe file information
Returns
void

◆ open_file()

void open_file ( file_information_t & in_s_file_info,
int in_i_mode )

Open a NetCDF or a GRIB file.

Parameters
in_s_file_infoThe file information
in_i_modeThe mode to open the file
Returns
void