I have the following code in my main function to read the prediction:
NcFile ncfile("GWprediction.nc", NcFile::read)
rvector<std::complex<double>> predicted(ncfile.getDim("nt").getSize());
ncfile.getVar("f").getVar(predicted.data());
When I run the code, it compiles fine, but I get this error:
./ligo
terminate called after throwing an instance of 'netCDF::exceptions::NcException'
what(): No such file or directory
file: ncFile.cpp line:88
make: *** [all] Aborted
Is there a reason this is happening? The netCDF files are all in the same folder as the code, and they are included at the header of the cpp file as well as linked in the makefile.