public double[] GetSeries(string ncVarName, string identifier) { // TODO: check is daily ucar.nc2.Variable v = getVariable(ncVarName); int[] origin; int[] shape; GetTimeSeriesSpecForIdentifier(identifier, out origin, out shape); var temp = v.read(origin, shape); return(NetCdfHelper.GetOneDimArray <double>(v.read(origin, shape))); }
public PointTimeSeriesNcFile(string location, string ncSeriesIdentifier) : base(location) { this.ncVarnameIdentifier = ncSeriesIdentifier; this.identifiers = NetCdfHelper.GetOneDimArray <string>(this.findVariable(ncVarnameIdentifier).read()); this.identifiersIndices = identifiers.ToDictionary(x => x, y => Array.IndexOf(identifiers, y)); //if (timeSeriesIdentifierVar == null) // throw new NullReferenceException(string.Format("Could not find variable '{0}' in the netcdf file", ncVarnameIdentifier)); this.timeCoords = NetCdfHelper.GetTimeCoordinates(this); variables = new Dictionary <string, ucar.nc2.Variable>(); missingValueCodes = new Dictionary <string, double>(); }