Skip To Content

Reading netCDF data as a raster layer

Using the Make NetCDF Raster Layer tool from the Multidimension Tools toolbox, you can create a raster layer from a netCDF variable. The output raster layer can be used in other tools that accept rasters as input for further analysis. To save the output layer, right-click the layer in the Contents pane, click Sharing and then Save As Layer File, or use the Save To Layer File tool from the Data Management Tools toolbox.

You can add a classic netCDF raster layer or a multidimensional raster layer using the Multidimensional Raster Layer Multidimensional raster layer option in the drop-down list of the Add Data button Add Data. For more details, please refer to Working with a multidimensional raster layer.

A raster layer can be created using variables with two or more dimensions. The output raster layer type is either float or integer based on the netCDF variable type. The following example shows a variable, rainfall, with three dimensions:

netcdf annualrainfall {
dimensions:
	latitude = 48 ;
	longitude = 115 ;
	time = UNLIMITED ; 
variables:
	float latitude (latitude) ;
		latitude:units = "degrees_north" ;
	float longitude (longitude) ;
		longitude:units = "degrees_east" ;
	int time(time) ;
		time:units = "days since 1895-01-01" ;
		time:time_step = "annual" ;
		time:calendar = "gregorian" ;
	float rainfall (time, latitude, longitude) ;
		rainfall:units = "mm yr-1" ;
		rainfall:_FillValue = -9999.f ;
		rainfall:missing_value = -9999.f ;
}
  1. Click the Analysis tab.
  2. Click Tools.
  3. Type Make NetCDF Raster Layer in the text box.
  4. Click Make NetCDF Raster Layer in the returned list to open the tool.
  5. Type the name in the Input netCDF File text box, or click the browse button to navigate to the input file.
  6. Click the Variable drop-down arrow and choose a variable from the list.
  7. Click the X Dimension drop-down arrow and choose a dimension from the list, or alternatively, leave the default.
  8. Click the Y Dimension drop-down arrow and choose a dimension from the list, or alternatively, leave the default.
  9. Type the name in the Output Raster Layer text box, or leave the default.
  10. Optionally, to create a multiband raster, click the Band Dimension drop-down arrow and choose a dimension from the list.
  11. To specify a slice other than the default of multidimensional data, click the Dimension Values drop-down arrow, check one or more dimensions from the list, then click Add. For each dimension added, click the Value drop-down list next to the added dimension and choose a value.
  12. Click Run.

    An in-memory raster layer is created. You cannot see this layer in the Catalog tree, but it can be used as input to geoprocessing tools that support it.

Related topics