AixLib.Obsolete.Year2022.Utilities.NcDataReader

# .AixLib.Obsolete.Year2022.Utilities.NcDataReader

File reader for external data

## Information

#### Overview

The model NcDataReader reads data from netCDF files (based on HDF) to Modelica. You can read attributes of type integer or double/float/Real as well as one dimensional vectors. Therefore, the NcDataReader represents an alternative for the CombiTimeTable.

You have to select the *.nc file your data is stored in and define the variable's names (varName). With the checkboxes, you can select what type of data/attributes should be read in by the model and define afterwards the names of the variables/attributes.

IMPORTANT: This model needs the external library NcDataReader2. Clone or download the repository and load the Modelica library package (netCDF-DataReader/NcDataReader2/package.mo). Alternatively, if dymosim crashes or simulation does not work, please test the EBC fork of the repository, which uses different binaries.

DDE: DDE needs to find external binaries explicitly. This means either binaries from modelica://NcDataReader2/Resources/Library have to be copied into the current working directy, or the path has to be added to a certain environment variable of operating system. In the example of NcDataReader scripts are added that can also be found in modelica://AixLib\Resources\Scripts\Dymola\Utilities\Examples.

Further external information

For further information please consider netCDF-DataReader GitHub repository.

Have a look directly at the documentation on how to create netCDF-files (*.nc files) and the different interpolation and extrapolation types.

More information can be found here.

Outlook

If the function NcEasyGetScattered2D works in the future, an implementation to this model should follow. It would substitute CombiTable2D. Please have a look at the documentation on how to create netCDF-files and the different interpolation types. More information on that you find here.

#### Example Function

AixLib.Utilities.Examples.NcDataReader

## Revisions

- November 12, 2018 by Philipp Mehrfeld:
  Enhance documentation for script to add binary paths to environment varialbe. Important for DDE simulations #658.
- Feburary 6, 2017 by Philipp Mehrfeld:
  Revised documentation.
- December 14, 2016 by Fabian Wuellhorst:
  Implemented.

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos