I was trying to extract the time-series data from the netcdf using grid points (lat/long) by MakeNetCDFTableView. I have more than 100 grid points and I want to extract the data from the netcdf file. I was trying the following pyscript, but couldn't save the output table.

Could you please help me fix my problem?

#Import system modules
import arcpy

# Set local variables
inNetCDFFile = "F:/VIC_FORCINGS/7071.nc"
variable = "prec"
outTableView = "F:/VIC_FORCINGS/precipm"
rowDimension = "time"
dimensionValue = "64;-146"
valueSelectionMethod = ""

# Execute MakeNetCDFTableView
arcpy.MakeNetCDFTableView_md(inNetCDFFile, variable, outTableView, rowDimension, dimensionValue,valueSelectionMethod)

outTable = arcpy.CopyRows_management(outTableView)

Use the Copy Rows Tool to save the table view.

  • Thank you for your suggestion. I am able to save the table. The problem is still I couldn't save in txt or csv or xls file. The output is gdf. The other issues I found is the value are not changing for different grid points. I couldn't figureout why. I may have problem when giving the dimension value. Any suggestion? – Abraham Aug 28 '14 at 18:09
  • @Abraham Your question makes no mention of outputting to *.txt or *.csv, and you seem to have incorporated this answer into your question. Consequently, I think you should consider accepting this answer and then researching/asking the new question separately. – PolyGeo Aug 29 '14 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.