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.
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.
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)