/home/runner/work/kynema/kynema/kynema/src/utilities/netcdf/netcdf_file.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Loading...
Searching...
No Matches
netcdf_file.hpp
Go to the documentation of this file.
65 void AddAttribute(const std::string& var_name, const std::string& attr_name, double value) const;
Class for managing NetCDF files for writing outputs.
Definition netcdf_file.hpp:12
void Sync() const
Synchronizes (flushes) the NetCDF file to disk.
Definition netcdf_file.cpp:219
size_t GetNumberOfDimensions(const std::string &var_name) const
Gets the number of dimensions of a variable in the NetCDF file.
Definition netcdf_file.cpp:243
void ReadVariable(const std::string &name, float *data) const
Reads data from a variable in the NetCDF file.
Definition netcdf_file.cpp:280
NetCDFFile & operator=(const NetCDFFile &)=delete
NetCDFFile(NetCDFFile &&)=delete
size_t GetDimensionLength(int dim_id) const
Gets the length of a dimension in the NetCDF file.
Definition netcdf_file.cpp:253
~NetCDFFile()
Destructor to close the NetCDF file.
Definition netcdf_file.cpp:31
std::vector< size_t > GetShape(const std::string &var_name) const
Gets the shape (dimension lengths) of a variable in the NetCDF file.
Definition netcdf_file.cpp:263
int GetNetCDFId() const
Returns the NetCDF file ID.
Definition netcdf_file.cpp:223
int GetDimensionId(const std::string &name) const
Returns the dimension ID for a given dimension name.
Definition netcdf_file.cpp:227
int GetVariableId(const std::string &name) const
Returns the variable ID for a given variable name.
Definition netcdf_file.cpp:235
void ReadVariableWithStride(const std::string &name, std::span< const size_t > start, std::span< const size_t > count, std::span< const ptrdiff_t > stride, float *data) const
Reads data from a variable with specified stride in the NetCDF file.
Definition netcdf_file.cpp:330
void AddAttribute(const std::string &var_name, const std::string &attr_name, float value) const
Adds an attribute to a variable in the NetCDF file.
Definition netcdf_file.cpp:100
NetCDFFile & operator=(NetCDFFile &&)=delete
void ReadVariableAt(const std::string &name, std::span< const size_t > start, std::span< const size_t > count, float *data) const
Reads data from a variable at specific indices in the NetCDF file.
Definition netcdf_file.cpp:301
int AddVariable(const std::string &name, std::span< const int > dim_ids) const
Adds a variable to the NetCDF file.
int AddDimension(const std::string &name, size_t length) const
Adds a dimension to the NetCDF file.
Definition netcdf_file.cpp:39
NetCDFFile(const NetCDFFile &)=delete
void WriteVariableAt(const std::string &name, std::span< const size_t > start, std::span< const size_t > count, std::span< const float > data) const
Writes data to a variable at specific indices in the NetCDF file.
Definition netcdf_file.cpp:173
void WriteVariable(const std::string &name, std::span< const float > data) const
Writes data to a variable in the NetCDF file.
Definition netcdf_file.cpp:141
Definition aerodyn_inflow.hpp:15
Generated by