
Hi,
Is it possible to query the netcdf file by specifying the range of hrapx and hrapy to return a csv file containing one field ("amountofprecip")?
For example, the netcdf file has 813 (hrapy) and 1051 (hrapx) size. This represents the entire continental US. If I just want to "clip" an area equivalent to the state of Arkansas, starting from hrapx=258 and hrapy=270 through hrapx=713
and hrapy=384, how will I do this?
Thanks in advance,
Marilyn



Hi Marilyn,
You should use GetData with range methods. For example,
DataSet ds = DataSet.Open(...);
double[,] precip = ds.GetData<double[,]>("amountofprecip",
DataSet.Range(258, 713), // takes values with indices from 258 to 713 for hrapx dimension
DataSet.Range(270, 384)); // takes values with indices from 270 to 384 for hrapy dimension
There are a wide range of possible data subsetting; e.g. you can stride data or reduce its dimensionality. See section "GetData" of the documentation
for details.
Regards,
Dmitry.



Hi,
Thanks. This works. I'm able to get the values using the Range function.
Not sure if I should open a new thread. But is it possible to get the range of hrapx, hrapy based on a polygon's SHAPE? I can get values based on range that I specify. But how do I get values that follow the shape of a polygon?
Is it even possible?
Thanks,
Marilyn



Hi,
Found a way to list the hrapx, hrapy values using ArcGIS (clipped the polygon from the continental US polygon to get the list of hrapx and hrapy).
Also figured out how to insert the pcp values from csv file to the polygon. Will try inserting data directly from netcdf into the polygon. Thanks for this awesome library.
Marilyn

