Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }