public static NetCdfFile CreateNew(string path, bool fill = false) { int id; CheckResult(NetCdfWrapper.nc_create(path, FileCreateMode, out id)); var ncFile = new NetCdfFile(path, id); ncFile.SetFill(fill); return ncFile; }
public static NetCdfFile CreateNew(string path, bool fill = false) { int id; CheckResult(NetCdfWrapper.nc_create(path, FileCreateMode, out id)); var ncFile = new NetCdfFile(path, id); ncFile.SetFill(fill); return(ncFile); }
/// <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; }
/// <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); }