/home/runner/work/kynema-fmb/kynema-fmb/kynema-fmb/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.
94 void AddAttribute(const std::string& var_name, const std::string& attr_name, double value) const;
Definition netcdf_file.hpp:18
int AddDimension(const std::string &name, size_t length) const
Adds a dimension to the NetCDF file.
Definition netcdf_file.cpp:59
NetCdfFile(const NetCdfFile &)=delete
Explicitly prevent copying and moving – rule of 5.
void ReadVariable(const std::string &name, float *data) const
Reads data from a variable in the NetCDF file.
Definition netcdf_file.cpp:309
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:121
~NetCdfFile()
Destructor to close the NetCDF file.
Definition netcdf_file.cpp:34
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:292
size_t GetDimensionLength(int dim_id) const
Gets the length of a dimension in the NetCDF file.
Definition netcdf_file.cpp:282
int AddVariable(const std::string &name, std::span< const int > dim_ids) const
Adds a variable to the NetCDF file.
int GetVariableId(const std::string &name) const
Returns the variable ID for a given variable name.
Definition netcdf_file.cpp:264
int GetNetCDFId() const
Returns the NetCDF file ID.
Definition netcdf_file.cpp:252
NetCdfFile & operator=(NetCdfFile &&)=delete
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:359
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:272
void Sync() const
Synchronizes (flushes) the NetCDF file to disk.
Definition netcdf_file.cpp:38
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:196
void SetChunking(const std::string &var_name, std::span< const size_t > chunk_sizes) const
Configures chunking for a NetCDF variable to optimize I/O and compression performance.
Definition netcdf_file.cpp:242
NetCdfFile(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:330
int GetDimensionId(const std::string &name) const
Returns the dimension ID for a given dimension name.
Definition netcdf_file.cpp:256
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:164
NetCdfFile & operator=(const NetCdfFile &)=delete
void Close()
Manually flushes and closes the NetCDF file.
Definition netcdf_file.cpp:42
void Open()
Manually (re)opens the NetCDF file in write mode.
Definition netcdf_file.cpp:50
bool IsOpen() const
Checks if the NetCDF file is open.
Definition netcdf_file.hpp:63
Definition aerodyn_inflow.hpp:14
Generated by