Tuesday, January 26, 2010

Netcdf in JGrass, the non spatial part

JGrass at some point got integrated with the geotools library to read netcdf files both for visualization and for analysis purposes. The geotools library is a spatial library and therefore it gives the possibility to extract multi-time and multi-depth rastermaps from local file or remote opendap. We have seen that and it looks like this:



Well, very soon we will have also a way to view the other datasets contained in a netcdf.

The rightclick now brings up a new menu Open Netcdf Viewer on this dataset:



which opens the Netcdf Viewer. The viewer has on its left a list of all the variables contained in the netcdf and that are non raster maps (grids). The variables are marked as:

  • G: global attributes
  • 0: 0 dimensional variables (scalars)
  • 1: 1 dimensional variables
  • 2: 2 dimensional variables
  • 3: 3 dimensional variables
The below shows a global attribute selected. The right panel will show informations about the selected variable.



In the case of 0D variables, the variable definition is dumped.




In the case of 1D variables, it is already possible to chart the variable against its dimension (axis).




In the case of 2D variables, again, the content can be charted. In the case the X axis contains time values, the proper time label is computed (those who know netcdf know what that means).




It is possible to zoom into the charts and check the values.




The viewer currently supports up to 3 dimensions. In the upper combo boxes it is possible to switch the axes in the case of 2 or 3 dimensions available.




There is also a filter box available for easier browsing of many variables.




Enjoy.

No comments: