<?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: Problem with reading NetCDF file in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36087#M2820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Checking my old NetCDF import scripts, I see they use arcgisscripting(9.3) and not arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so the syntax is "lon;lat" instead of a list...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it works using the MakeNetCDFFeatureLayer tool, you could set it up in Model builder and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;export the model as a python script. That is one way of nailing down syntax issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You really only need the one MakeNetCDFFeatureLayer step in the model, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'cuz you just want to see the syntax for the one tool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 14:56:26 GMT</pubDate>
    <dc:creator>markdenil</dc:creator>
    <dc:date>2013-04-26T14:56:26Z</dc:date>
    <item>
      <title>Problem with reading NetCDF file</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36086#M2819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working with the Make NetCDF Feature Layer (Multidimension) tool with Python.&amp;nbsp; I can get it to work properly outside of Python (but have a lot of data to process, so doing it manually is not really an option).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having a problem with entering the {row_dimension}.&amp;nbsp; I need to enter two dimensions, "lat" and "lon", but I can't get it to accept a list.&amp;nbsp; It will accept either variable alone and not give an error message, but if I try to enter a list, I get the following error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000237: One or more dimensions are invalid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000237: One or more dimensions are invalid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (MakeNetCDFFeatureLayer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The help file suggests that a list would be the input?&amp;nbsp; Is there something obvious that I am missing, or is this a bug?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Make_NetCDF_Feature_Layer/004300000005000000/" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Make_NetCDF_Feature_Layer/004300000005000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also tried using the raster tool, but receive an error message that my data have irregular spacing and that I need to use the make feature layer tool and interpolate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A simplified version of my code is below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;#Import arcpy import arcpy&amp;nbsp; #Set up paths bpath = "C:\\docs\\Work\\historical_climate\\ESRL\\" dpath = bpath + "ncfiles\\" vpath = bpath + "vector\\"&amp;nbsp; #Set up file names ncfile = dpath + "air.sfc.1871.nc" nclyr = "nclyr" ncfilout = vpath + "test.shp"&amp;nbsp; #Set up inputs for NetCDF to Feature layer variable = ["air","time"] x_variable = "lon" y_variable = "lat"&amp;nbsp; #THIS IS THE PROBLEM. x_variable alone works (but does not give the needed output). [x_variable] does not. This apparently can't take a list. row_dimension = [x_variable,y_variable]&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeNetCDFFeatureLayer_md (ncfile, variable, x_variable, y_variable, nclyr, row_dimension) arcpy.CopyFeatures_management (nclyr, ncfilout)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 13:40:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36086#M2819</guid>
      <dc:creator>AlexanderKeyel</dc:creator>
      <dc:date>2013-04-26T13:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with reading NetCDF file</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36087#M2820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Checking my old NetCDF import scripts, I see they use arcgisscripting(9.3) and not arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so the syntax is "lon;lat" instead of a list...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it works using the MakeNetCDFFeatureLayer tool, you could set it up in Model builder and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;export the model as a python script. That is one way of nailing down syntax issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You really only need the one MakeNetCDFFeatureLayer step in the model, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'cuz you just want to see the syntax for the one tool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 14:56:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36087#M2820</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-04-26T14:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with reading NetCDF file</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36088#M2821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The semi-colon worked - many thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's been so long since I've used model builder that I didn't think to use it to try to check the syntax, and in part, I thought it was a bug since the help file showed the inputs as a list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 15:19:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-reading-netcdf-file/m-p/36088#M2821</guid>
      <dc:creator>AlexanderKeyel</dc:creator>
      <dc:date>2013-04-26T15:19:54Z</dc:date>
    </item>
  </channel>
</rss>

