Raster To NetCDF (Multidimension) |
|
Release 9.2
Last modified November 9, 2006 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts a raster dataset to a netCDF file.
Usage tips
The input can be any valid raster dataset or raster catalog.
The default variable name is the same as the input raster name.
The output netCDF variable type is either float or integer based on the input raster dataset type.
The default x dimension and y dimension names are x and y, respectively. Band dimension is only applicable for a multiband raster.
Field to dimension mapping is only applicable for a raster catalog.
The following environment settings affect this tool: workspace and scratch workspace.
Command line syntax
An overview of the Command Line window
RasterToNetCDF_md <in_raster> <out_netCDF_file> {variable} {variable_units} {x_dimension} {y_dimension} {band_dimension} {field {dimension} {units};field {dimension} {units}...}
Parameter | Explanation | Data Type |
<in_raster> |
The input raster dataset or raster catalog. |
Raster Layer | Raster Catalog |
<out_netCDF_file> |
The output netCDF file. The filename must have a .nc extension. |
File |
{variable} |
The netCDF variable name that will be used in the output netCDF file. This variable will contain the values of cells in the input raster. |
String |
{variable_units} |
The units of the data contained within the variable. The variable name is specified in the Variable parameter. |
String |
{x_dimension} |
The netCDF dimension name used to specify x, or longitude coordinates. |
String |
{y_dimension} |
The netCDF dimension name used to specify y, or latitude coordinates. |
String |
{band_dimension} |
The netCDF dimension name used to specify bands. |
String |
{field {dimension} {units};field {dimension} {units}...} |
The field or fields used to create dimensions in the netCDF file.
|
(String String String; String String String;...) |
RasterToNetCDF C:\Data\elevation C:\Data\elev.nc elevation # x y # #
Scripting syntax
About getting started with writing geoprocessing scripts
RasterToNetCDF_md (in_raster, out_netCDF_file, variable, variable_units, x_dimension, y_dimension, band_dimension, fields_to_dimensions)
Parameter | Explanation | Data Type |
in_raster (Required) |
The input raster dataset or raster catalog. |
Raster Layer | Raster Catalog |
out_netCDF_file (Required) |
The output netCDF file. The filename must have a .nc extension. |
File |
variable (Optional) |
The netCDF variable name that will be used in the output netCDF file. This variable will contain the values of cells in the input raster. |
String |
variable_units (Optional) |
The units of the data contained within the variable. The variable name is specified in the Variable parameter. |
String |
x_dimension (Optional) |
The netCDF dimension name used to specify x, or longitude coordinates. |
String |
y_dimension (Optional) |
The netCDF dimension name used to specify y, or latitude coordinates. |
String |
band_dimension (Optional) |
The netCDF dimension name used to specify bands. |
String |
fields_to_dimensions (Optional) |
The field or fields used to create dimensions in the netCDF file.
|
(String String String; String String String;...) |
# RasterToNetCDF.py # Description: Converts a raster dataset to a netCDF file. # Requirements: None # Author: ESRI # Create the Geoprocessor object import arcgisscripting, sys, string, os gp = arcgisscripting.create() try: # Set local variables InRaster = "C:/Data/elevation" OutNetCDFFile = "C:/Data/elev.nc" Variable = "elevation " XDimension = "x" YDimension = "y" # Process: RasterToNetCDF gp.RasterToNetCDF(InRaster, OutNetCDFFile , Variable, "", XDimension, YDimension) except: # Print error message if an error occurs print gp.GetMessages()