I am required to read time-series data (csv for example) in Modelica, specifically using the open modelica compiler (omc). I did some internet search and found a ncReader library on the net. It works on dymola but not with the open modelica compiler. My test code is like this:
der(x) = t;
t = NcDataReader2.ncEasyGet1D("datafile.nc", "temperature", time);
der(y) = q;
q = NcDataReader2.ncEasyGet1D("datafile.nc", "flow", time);
When I try to run it on open modelica, I get the following error:
Translation 09:21:41 0:0-0:0 Error building simulator. Build log: gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.0//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o TimeSeries.NcTest.o TimeSeries.NcTest.c TimeSeries.NcTest.c:19:28: error: ncDataReaderEA.h: No such file or directory mingw32-make: *** [TimeSeries.NcTest.o] Error 1
I think the reason it works on dymola is because dymola uses a C compiler and maybe compiling the c file of the library on the fly. Unfortunately, I have to use open modelica.
Can anyone help if this error can be fixed for using with the open modelica compiler OR if there is any other alternative to read-time series data file in modelica (open modelica compiler)?
Thanks in advance