Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Multidimensional toolbox > Tools

Raster To NetCDF (Multidimension)

Release 9.2
Last modified November 9, 2006
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Converts a raster dataset to a netCDF file.


Usage tips

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.

  • field — A field in the input feature attribute table.
  • {dimension} — The netCDF dimension name.
  • {unit} — The unit of the data represented by the field.

(String String String; String String String;...)
Data types for geoprocessing tool parameters


Command line example

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.

  • field — A field in the input feature attribute table.
  • {dimension} — The netCDF dimension name.
  • {unit} — The unit of the data represented by the field.

(String String String; String String String;...)

Data types for geoprocessing tool parameters


Script example

# 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()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.