ARTS  2.4.0(git:4fb77825)
m_nc.h File Reference

Workspace methods and template functions for supergeneric NetCDF IO. More...

#include "arts.h"
#include "agenda_class.h"
#include "exceptions.h"
#include "workspace_ng.h"
#include "nc_io.h"

Go to the source code of this file.

Functions

template<typename T >
void ReadNetCDF (T &v, const String &v_name, const String &f, const String &f_name, const Verbosity &verbosity)
 WORKSPACE METHOD: ReadNetCDF. More...
 
template<typename T >
void WriteNetCDF (const T &v, const String &f, const String &v_name, const String &f_name, const Verbosity &verbosity)
 WORKSPACE METHOD: WriteNetCDF. More...
 
template<typename T >
void WriteNetCDFIndexed (const Index &file_index, const T &v, const String &f, const String &v_name, const String &f_name, const Verbosity &verbosity)
 WORKSPACE METHOD: WriteNetCDFIndexed. More...
 
template<typename T >
void ReadNetCDF (Workspace &ws, T &v, const String &v_name, const String &f, const String &f_name, const Verbosity &verbosity)
 
void WriteNetCDF (Workspace &ws, const Agenda &v, const String &f, const String &v_name, const String &f_name, const Verbosity &verbosity)
 

Detailed Description

Workspace methods and template functions for supergeneric NetCDF IO.

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

Definition in file m_nc.h.

Function Documentation

◆ ReadNetCDF() [1/2]

template<typename T >
void ReadNetCDF ( T &  out,
const String out_wsvname,
const String filename,
const String filename_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: ReadNetCDF.

Reads a workspace variable from a NetCDF file.

This method can read variables of any group.

If the filename is omitted, the variable is read from <basename>.<variable_name>.nc.

Author
Oliver Lemke
Parameters
[out]outSupergeneric output
[in]out_wsvnameGeneric Output Name
[in]filenameGeneric Input
[in]filename_wsvnameGeneric Input Name

Definition at line 42 of file m_nc.h.

References nca_read_from_file(), and ARTS::Var::verbosity().

Referenced by ReadNetCDF(), ReadNetCDF_sg_ArrayOfMatrix_g(), ReadNetCDF_sg_ArrayOfVector_g(), ReadNetCDF_sg_GasAbsLookup_g(), ReadNetCDF_sg_Matrix_g(), ReadNetCDF_sg_Tensor3_g(), ReadNetCDF_sg_Tensor4_g(), ReadNetCDF_sg_Tensor5_g(), and ReadNetCDF_sg_Vector_g().

◆ ReadNetCDF() [2/2]

template<typename T >
void ReadNetCDF ( Workspace ws,
T &  v,
const String v_name,
const String f,
const String f_name,
const Verbosity verbosity 
)

Definition at line 147 of file m_nc.h.

References ReadNetCDF(), and ARTS::Var::verbosity().

◆ WriteNetCDF() [1/2]

template<typename T >
void WriteNetCDF ( const T &  in,
const String filename,
const String in_wsvname,
const String filename_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: WriteNetCDF.

Writes a workspace variable to a NetCDF file.

This method can write variables of limited groups.

If the filename is omitted, the variable is written to <basename>.<variable_name>.nc.

Author
Oliver Lemke
Parameters
[in]inGeneric Input
[in]filenameGeneric Input (Default: "")
[in]in_wsvnameGeneric Input Name
[in]filename_wsvnameGeneric Input Name

Definition at line 56 of file m_nc.h.

References nca_filename(), nca_write_to_file(), and ARTS::Var::verbosity().

Referenced by WriteNetCDF(), WriteNetCDF_sg_ArrayOfMatrix_g(), WriteNetCDF_sg_ArrayOfVector_g(), WriteNetCDF_sg_GasAbsLookup_g(), WriteNetCDF_sg_Matrix_g(), WriteNetCDF_sg_Tensor3_g(), WriteNetCDF_sg_Tensor4_g(), WriteNetCDF_sg_Tensor5_g(), WriteNetCDF_sg_Vector_g(), and WriteNetCDFIndexed().

◆ WriteNetCDF() [2/2]

void WriteNetCDF ( Workspace ws,
const Agenda v,
const String f,
const String v_name,
const String f_name,
const Verbosity verbosity 
)
inline

Definition at line 161 of file m_nc.h.

References ARTS::Var::verbosity(), and WriteNetCDF().

◆ WriteNetCDFIndexed()

template<typename T >
void WriteNetCDFIndexed ( const Index file_index,
const T &  in,
const String filename,
const String in_wsvname,
const String filename_wsvname,
const Verbosity verbosity 
)

WORKSPACE METHOD: WriteNetCDFIndexed.

As WriteNetCDF, but creates indexed file names.

This method can write variables of any group.

If the filename is omitted, the variable is written to <basename>.<variable_name>.nc.

Author
Oliver Lemke
Parameters
[in]file_indexWS Input
[in]inGeneric Input
[in]filenameGeneric Input (Default: "")
[in]in_wsvnameGeneric Input Name
[in]filename_wsvnameGeneric Input Name

Definition at line 75 of file m_nc.h.

References ARTS::Var::file_index(), nca_filename_with_index(), ARTS::Var::verbosity(), and WriteNetCDF().

Referenced by WriteNetCDFIndexed_sg_ArrayOfMatrix_g(), WriteNetCDFIndexed_sg_ArrayOfVector_g(), WriteNetCDFIndexed_sg_GasAbsLookup_g(), WriteNetCDFIndexed_sg_Matrix_g(), WriteNetCDFIndexed_sg_Tensor3_g(), WriteNetCDFIndexed_sg_Tensor4_g(), WriteNetCDFIndexed_sg_Tensor5_g(), and WriteNetCDFIndexed_sg_Vector_g().