AnsweredAssumed Answered

Conversion multiple Raster to NetCDF using Arcpy

Question asked by india123 on Jan 18, 2017
Latest reply on Jan 26, 2017 by Dan_Patterson

Dear all,

I have multiples raster files, i am trying to convert it in NetCDF file using Arcpy script . below script i am using for conversion. While  i ran the below script , i am getting the error, 

Below i have attached my raster file also, which i trying to convert in NetCDF format. 

 

Error Code 

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000840: The value is not a Raster Layer.
ERROR 000840: The value is not a Raster Catalog.
Failed to execute (RasterToNetCDF).

Below script i am using for conversion of raster to NetCDF. 

import arcpy
from arcpy import env

# Set environment settings
env.workspace = "D:\2012A"

# Set local variables
inRaster = "D:\2012A"
outNetCDFFile = "D:\2012A/nppnetcdf.nc"
variable = "NPP"
units = "gCSqm"
XDimension = "x"
YDimension = "y"
bandDimension = ""

# Process: RasterToNetCDF
arcpy.RasterToNetCDF_md(inRaster, outNetCDFFile, variable, units,
                        XDimension, YDimension, bandDimension)

Attachments

Outcomes