Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Inputing NetCDF variables into arcpy script

$
0
0
Hi all,

I'm working with NetCDF data that it organized by month, I only need a certain portion, within the range I specified I am converting their date format to the ArcMap recognized date and time format with this:

Code:

element = num2date(item, units='days since 1850-1-1', calendar='365_day')
I am then trying to imput this element which changes with every loop, into the following script:

Code:

arcpy.MakeNetCDFFeatureLayer_md(apcp_2100_nc, "prveg", "lon", "lat", apcp_Layer, "lon;lat", "#", "#", ("time", str(element)), "BY_VALUE")
This is running but the output is only the first element of the NetCDF layer which is the default setting in ArcGIS.

I am thinking that I am not inputing the dimension_values in correctly which is the ("time", str(element)).

Any ideas? Let me know if you need to see any more of my code to understand better.

Thanks!

Viewing all articles
Browse latest Browse all 2485

Trending Articles