Exemplo n.º 1
0
        private int[] GetDimensionIds(NetCdfVariable ncVariable)
        {
            int nDims;

            CheckResult(NetCdfWrapper.nc_inq_varndims(id, ncVariable, out nDims));

            var dimIds = new int[nDims];

            NetCdfWrapper.nc_inq_vardimid(id, ncVariable, dimIds);
            return(dimIds);
        }
Exemplo n.º 2
0
        public bool IsCharArray(NetCdfVariable ncVariable)
        {
            int nDims;

            NetCdfWrapper.nc_inq_varndims(id, ncVariable, out nDims);
            if (nDims < 2)
            {
                return(false);
            }

            NetCdfDataType ncType;

            CheckResult(NetCdfWrapper.nc_inq_vartype(id, ncVariable, out ncType));
            return(ncType == NetCdfDataType.NC_CHAR);
        }
Exemplo n.º 3
0
        public bool IsVariableUnlimited(NetCdfVariable ncVariable)
        {
            int nDims;

            CheckResult(NetCdfWrapper.nc_inq_varndims(id, ncVariable, out nDims));

            var dimIds = new int[nDims];

            CheckResult(NetCdfWrapper.nc_inq_vardimid(id, ncVariable, dimIds));

            int unlimitedDimId;

            CheckResult(NetCdfWrapper.nc_inq_unlimdim(id, out unlimitedDimId));

            return(dimIds.Contains(unlimitedDimId));
        }