/// <summary> /// /// </summary> /// <param name="path"></param> /// <param name="writeAccess">opens readonly when true</param> /// <returns></returns> public static NetCdfFile OpenExisting(string path, bool writeAccess = false) { int id; var mode = writeAccess ? NetCdfWrapper.CreateMode.NC_WRITE : NetCdfWrapper.CreateMode.NC_NOWRITE; CheckResult(NetCdfWrapper.nc_open(path, mode, out id)); var netcdf = new NetCdfFile(path, id); netcdf.BuildVariableLookup(); return(netcdf); }