Make NetCDF Raster Layer (Multidimension) |
|
Release 9.2
Last modified November 9, 2006 |
![]() ![]() ![]() Print all topics in : "Tools" |
Makes an in-memory raster layer from a netCDF file.
Usage tips
To create a netCDF raster layer from a netCDF variable, the spacing between x-coordinates must be equal and the spacing between y-coordinates must be equal. If the coordinates are unequally spaced, create a netCDF feature layer, then interpolate to raster.
The output raster layer type is either float or integer based on the netCDF variable type.
The first variable in the netCDF file suitable for creating a raster is selected as the default variable.
Auxiliary coordinate variables are listed in the X Dimension and Y Dimension dropdown lists and used during execution if specified. They are not listed in the Dimension Values parameter dropdown list and cannot be set as the value of this parameter at the command line or in a script.
Band dimension is specified to create a multiband raster.
The first value of a non-spatial dimension is used to create a default view of a multidimensional variable.
To save the output layer, right-click the layer in the ArcMap table of contents and click Save As Layer File, or use the Save To Layer File tool.
The calender attribute values noleap and 365_day, assigned to the time coordinate variable of the netCDF file, are not honored in ArcGIS.
The following environment settings affect this tool: workspace and scratch workspace.
Command line syntax
An overview of the Command Line window
MakeNetCDFRasterLayer_md <in_netcdf_file> <variable> <x_dimension> <y_dimension> <out_raster_layer> {band_dimension} {dimension {value};dimension {value}...} {BY_VALUE | BY_INDEX}
Parameter | Explanation | Data Type |
<in_netcdf_file> |
The input netCDF file. |
File |
<variable> |
The variable of the netCDF file used to assign cell values to the output raster. This is the variable that will be displayed, such as temperature or rainfall. |
String |
<x_dimension> |
A netCDF dimension used to define the x, or longitude coordinates of the output layer. |
String |
<y_dimension> |
A netCDF dimension used to define the y, or latitude coordinates of the output layer. |
String |
<out_raster_layer> |
The name of the output raster layer. |
Raster Layer |
{band_dimension} |
A netCDF dimension used to create bands in the output raster. Set this dimension if a multiband raster layer is required. For instance, altitude might be set as the band dimension to create a multiband raster where each band represents temperature at that altitude. |
String |
{dimension {value};dimension {value}...} |
The value (such as 01/30/05) of the dimension (such as Time) or dimensions to use when displaying the variable in the output layer. By default, the first value of the dimension or dimensions will be used. This default value can also be altered on the netCDF tab of the Layer Properties dialog box. |
(String String; String String;...) |
{BY_VALUE | BY_INDEX} |
Specifies the dimension value selection method.
|
String |
MakeNetCDFRasterLayer C:\Data\vemap.nc pptx lon lat pptx_Layer # "time '1900-12-31 00:00:0'"
Scripting syntax
About getting started with writing geoprocessing scripts
MakeNetCDFRasterLayer_md (in_netcdf_file, variable, x_dimension, y_dimension, out_raster_layer, band_dimension, dimension_values, value_selection_method)
Parameter | Explanation | Data Type |
in_netcdf_file (Required) |
The input netCDF file. |
File |
variable (Required) |
The variable of the netCDF file used to assign cell values to the output raster. This is the variable that will be displayed, such as temperature or rainfall. |
String |
x_dimension (Required) |
A netCDF dimension used to define the x, or longitude coordinates of the output layer. |
String |
y_dimension (Required) |
A netCDF dimension used to define the y, or latitude coordinates of the output layer. |
String |
out_raster_layer (Required) |
The name of the output raster layer. |
Raster Layer |
band_dimension (Optional) |
A netCDF dimension used to create bands in the output raster. Set this dimension if a multiband raster layer is required. For instance, altitude might be set as the band dimension to create a multiband raster where each band represents temperature at that altitude. |
String |
dimension_values (Optional) |
The value (such as 01/30/05) of the dimension (such as Time) or dimensions to use when displaying the variable in the output layer. By default, the first value of the dimension or dimensions will be used. This default value can also be altered on the netCDF tab of the Layer Properties dialog box. |
(String String; String String;...) |
value_selection_method (Optional) |
Specifies the dimension value selection method.
|
String |
# MakeNetCDFRasterLayer.py # Description: Create a raster layer from a netCDF file. # Requirements: None # Author: ESRI # Create the Geoprocessor object import arcgisscripting, sys, string, os gp = arcgisscripting.create() try: # Set local variables InNetCDFFile = "D:/NetCDFSupport/NetCDFScriptSamples/Data/vemap.nc" InVariable = "pptx" InXDimension = "lon" InYDimension = "lat" OutRasterLayer = "pptx_Layer" # Process: MakeNetCDFRasterLayer gp.MakeNetCDFRasterLayer(InNetCDFFile, InVariable, InXDimension, InYDimension, OutRasterLayer) except: # Print error message if an error occurs print gp.GetMessages()