nc_open(input_file.c_str(), NC_NOWRITE , &ncid)
Here the input_file is the file path. The file is opening only when the netcdf file is placed in the bin folder where the executable is present. When the netcdf file(.nc) is not placed in the bin folder then the netcdf file does not open. why is this happening?