Re: [netcdfgroup] Spatial subset using NcML...

On 4/17/2011 5:46 PM, Garth.Warren@xxxxxxxx wrote:

Hello all:

I am using NcML to aggregate many hundreds of netCDF files. My data is regularly gridded continental (Australian) daily interpolated rainfall. The dimensions of these files are:

Lat = 681

Lon = 841

Time = 1

I am able to aggregate the existing rainfall files using the following simple NcML:

<?xml version="1.0" encoding="utf-8"?>

<netcdf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>

<aggregation type="joinExisting" dimName="time">

<scan location="\rain\2011\" suffix=".nc" subdirs="false" dateFormatMark="#yyyyMMdd" />

</aggregation>

</netcdf>

In the example above I have 48 netCDF files in the directory '/rain/2011/'. This code is working, however in addition to aggregating these files we also need to be able to apply a spatial subset.

Specifically we would like to get the aggregated data as 1*1 degree tiles, this would equate to 20*20 (400) rainfall cells, rather than the full ~600 000 cells. Ideally we would like to be able to specify a 'bounding box' type of subset by setting a lat/lon range. Is this possible in NcML? We would like to use NcML as the 'interface' to our netCDF data. I've spent hours on the unidata site to no avail so any help would be greatly appreciated.

I've attached some example data.

Kind regards,

Garth


_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/

Hi Garth:

NcML does not do subsetting, that is typically done when you access the data by only asking for the subset that you want. Also there is no regridding capability.

If you use Netcdf-Java library, you can make subset requests in lat/lon if the data can be read into a GridDataset object. Also, if you run a THREDDS server, you can use the Netcdf Subset service to make requests in lat/lon:

http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/reference/NetcdfSubsetService.html

John


  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: