예제 #1
0
 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;
 }
예제 #2
0
        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);
        }
예제 #3
0
        /// <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;
        }
예제 #4
0
        /// <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);
        }