ARTS  2.4.0(git:4fb77825)
nc_io_basic_types.cc File Reference

This file contains functions to handle NetCDF data files. More...

#include "arts.h"
#include "nc_io.h"
#include "nc_io_types.h"

Go to the source code of this file.

Macros

#define TMPL_NC_READ_WRITE_FILE_DUMMY(what)
 

Functions

void nca_read_from_file (const int ncid, Matrix &m, const Verbosity &)
 Reads a Matrix from a NetCDF file. More...
 
void nca_write_to_file (const int ncid, const Matrix &m, const Verbosity &)
 Writes a Matrix to a NetCDF file. More...
 
void nca_read_from_file (const int ncid, Tensor3 &t, const Verbosity &)
 Reads a Tensor3 from a NetCDF file. More...
 
void nca_write_to_file (const int ncid, const Tensor3 &t, const Verbosity &)
 Writes a Tensor3 to a NetCDF file. More...
 
void nca_read_from_file (const int ncid, Tensor4 &t, const Verbosity &)
 Reads a Tensor4 from a NetCDF file. More...
 
void nca_write_to_file (const int ncid, const Tensor4 &t, const Verbosity &)
 Writes a Tensor4 to a NetCDF file. More...
 
void nca_read_from_file (const int ncid, Tensor5 &t, const Verbosity &)
 Reads a Tensor5 from a NetCDF file. More...
 
void nca_write_to_file (const int ncid, const Tensor5 &t, const Verbosity &)
 Writes a Tensor5 to a NetCDF file. More...
 
void nca_read_from_file (const int ncid, Vector &v, const Verbosity &)
 Reads a Vector from a NetCDF file. More...
 
void nca_write_to_file (const int ncid, const Vector &v, const Verbosity &)
 Writes a Vector to a NetCDF file. More...
 

Detailed Description

This file contains functions to handle NetCDF data files.

Author
Oliver Lemke olemk.nosp@m.e@co.nosp@m.re-du.nosp@m.mp.i.nosp@m.nfo
Date
2008-09-26

Definition in file nc_io_basic_types.cc.

Macro Definition Documentation

◆ TMPL_NC_READ_WRITE_FILE_DUMMY

#define TMPL_NC_READ_WRITE_FILE_DUMMY (   what)
Value:
void nca_write_to_file(const int, const what&, const Verbosity&) { \
throw runtime_error("NetCDF support not yet implemented for this type!"); \
} \
void nca_read_from_file(const int, what&, const Verbosity&) { \
throw runtime_error("NetCDF support not yet implemented for this type!"); \
}

Definition at line 232 of file nc_io_basic_types.cc.

Function Documentation

◆ nca_read_from_file() [1/5]

void nca_read_from_file ( const int  ncid,
Matrix m,
const Verbosity  
)

Reads a Matrix from a NetCDF file.

Parameters
ncdiNetCDF file descriptor
mMatrix

Definition at line 44 of file nc_io_basic_types.cc.

References MatrixView::get_c_array(), nc_get_dim(), nca_get_data_double(), ARTS::Var::ncols(), ARTS::Var::nrows(), and Matrix::resize().

◆ nca_read_from_file() [2/5]

void nca_read_from_file ( const int  ncid,
Tensor3 t,
const Verbosity  
)

Reads a Tensor3 from a NetCDF file.

Parameters
ncfNetCDF file descriptor
tTensor3

Definition at line 79 of file nc_io_basic_types.cc.

References Tensor3View::get_c_array(), nc_get_dim(), nca_get_data_double(), ARTS::Var::ncols(), ARTS::Var::npages(), ARTS::Var::nrows(), and Tensor3::resize().

◆ nca_read_from_file() [3/5]

void nca_read_from_file ( const int  ncid,
Tensor4 t,
const Verbosity  
)

Reads a Tensor4 from a NetCDF file.

Parameters
ncfNetCDF file descriptor
tTensor4

Definition at line 117 of file nc_io_basic_types.cc.

References Tensor4View::get_c_array(), ARTS::Var::nbooks(), nc_get_dim(), nca_get_data_double(), ARTS::Var::ncols(), ARTS::Var::npages(), ARTS::Var::nrows(), and Tensor4::resize().

◆ nca_read_from_file() [4/5]

void nca_read_from_file ( const int  ncid,
Tensor5 t,
const Verbosity  
)

◆ nca_read_from_file() [5/5]

void nca_read_from_file ( const int  ncid,
Vector v,
const Verbosity  
)

Reads a Vector from a NetCDF file.

Parameters
ncfNetCDF file descriptor
vVector

Definition at line 202 of file nc_io_basic_types.cc.

References VectorView::get_c_array(), nc_get_dim(), nca_get_data_double(), Absorption::nelem(), and Vector::resize().

◆ nca_write_to_file() [1/5]

void nca_write_to_file ( const int  ncid,
const Matrix m,
const Verbosity  
)

Writes a Matrix to a NetCDF file.

Parameters
ncfNetCDF file descriptor
mMatrix

Definition at line 58 of file nc_io_basic_types.cc.

References MatrixView::get_c_array(), nca_error(), ConstMatrixView::ncols(), and ConstMatrixView::nrows().

◆ nca_write_to_file() [2/5]

void nca_write_to_file ( const int  ncid,
const Tensor3 t,
const Verbosity  
)

Writes a Tensor3 to a NetCDF file.

Parameters
ncfNetCDF file descriptor
tTensor3

Definition at line 94 of file nc_io_basic_types.cc.

References Tensor3View::get_c_array(), nca_error(), ConstTensor3View::ncols(), ConstTensor3View::npages(), and ConstTensor3View::nrows().

◆ nca_write_to_file() [3/5]

void nca_write_to_file ( const int  ncid,
const Tensor4 t,
const Verbosity  
)

Writes a Tensor4 to a NetCDF file.

Parameters
ncfNetCDF file descriptor
tTensor4

Definition at line 133 of file nc_io_basic_types.cc.

References Tensor4View::get_c_array(), ConstTensor4View::nbooks(), nca_error(), ConstTensor4View::ncols(), ConstTensor4View::npages(), and ConstTensor4View::nrows().

◆ nca_write_to_file() [4/5]

void nca_write_to_file ( const int  ncid,
const Tensor5 t,
const Verbosity  
)

◆ nca_write_to_file() [5/5]

void nca_write_to_file ( const int  ncid,
const Vector v,
const Verbosity  
)

Writes a Vector to a NetCDF file.

Parameters
ncidNetCDF file descriptor
vVector

Definition at line 215 of file nc_io_basic_types.cc.

References VectorView::get_c_array(), nca_error(), and ConstVectorView::nelem().

nca_write_to_file
void nca_write_to_file(const int ncid, const Matrix &m, const Verbosity &)
Writes a Matrix to a NetCDF file.
Definition: nc_io_basic_types.cc:58
nca_read_from_file
void nca_read_from_file(const int ncid, Matrix &m, const Verbosity &)
Reads a Matrix from a NetCDF file.
Definition: nc_io_basic_types.cc:44
Verbosity
Definition: messages.h:49