<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inputing NetCDF variables into arcpy script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307869#M23962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since your element variable is part of the dimension that seems to not be working, perhaps knowing what num2date is doing might help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;do you get the same output using only time as a dimension, instead of time and element?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I recall, the help for the multidimension tools is not always quite right,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but should the dimensions be in a list, instead of a tuple?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The 9.3 geoprocessor needed the dimensions in a semi-colon delimited string....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2013 16:49:17 GMT</pubDate>
    <dc:creator>markdenil</dc:creator>
    <dc:date>2013-02-07T16:49:17Z</dc:date>
    <item>
      <title>Inputing NetCDF variables into arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307868#M23961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; element = num2date(item, units='days since 1850-1-1', calendar='365_day') &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am then trying to imput this element which changes with every loop, into the following script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; arcpy.MakeNetCDFFeatureLayer_md(apcp_2100_nc, "prveg", "lon", "lat", apcp_Layer, "lon;lat", "#", "#", ("time", str(element)), "BY_VALUE") &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is running but the output is only the first element of the NetCDF layer which is the default setting in ArcGIS. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am thinking that I am not inputing the dimension_values in correctly which is the ("time", str(element)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas? Let me know if you need to see any more of my code to understand better.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 19:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307868#M23961</guid>
      <dc:creator>AnnaLabetski1</dc:creator>
      <dc:date>2013-02-06T19:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inputing NetCDF variables into arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307869#M23962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since your element variable is part of the dimension that seems to not be working, perhaps knowing what num2date is doing might help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;do you get the same output using only time as a dimension, instead of time and element?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I recall, the help for the multidimension tools is not always quite right,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but should the dimensions be in a list, instead of a tuple?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The 9.3 geoprocessor needed the dimensions in a semi-colon delimited string....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 16:49:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307869#M23962</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-02-07T16:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inputing NetCDF variables into arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307870#M23963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks! It was the tuple issue, I tried lists before but it didn't work, turns out that it has to be a list of lists even if there's only one variable, this is actually quite obvious but I guess I just wasn't thinking. Yeah, the help for this function also organized it as a dictionary which didn't work at all, so I think that threw me off. Using only time gave the same output and it would not accept semi-colons which was really frusterating. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're curious, num2date is a built in function with the NetCDF add on to python, it converts the stored numbers (such as 9567.5) to a date such as 04-12-2100 12:00:00 which is the necessary input for the arcgis tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck to anyone else working with NetCDF data&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 20:09:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inputing-netcdf-variables-into-arcpy-script/m-p/307870#M23963</guid>
      <dc:creator>AnnaLabetski1</dc:creator>
      <dc:date>2013-02-07T20:09:14Z</dc:date>
    </item>
  </channel>
</rss>

