<?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: Error in multiple netCDF file processing followed by raster projection in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244154#M18967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code looks much better now thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue now is how your output coordinate system parameter is formatted, as it will not accept the string name for the coordinate system nor the WKID for the coordinate system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The coordinate system to which the input raster will be projected. The default value is set based on the Output Coordinate System environment setting.&lt;/P&gt;&lt;P&gt;Valid values for this parameter are&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A file with the ".prj" extension (the prj files which ship with ArcGIS can be found in "C:\Program Files\ArcGIS\Coordinate Systems").&lt;/LI&gt;&lt;LI&gt;An existing feature class, feature dataset, raster catalog (basically anything with a coordinate system).&lt;/LI&gt;&lt;LI&gt;The string representation of a coordinate system. These lengthy strings can be generated by adding a coordinate system variable to ModelBuilder, setting the variable's value as desired, then exporting the model to a Python script."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a few options, one is to have a .prj file somewhere with the output spatial reference you want and use that as the parameter(&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/project-raster.htm"&gt;http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/project-raster.htm&lt;/A&gt;).&amp;nbsp; Similarly if you had a raster you manually projected into that coordinate system somewhere in your workspace, you could reference that as an input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option I believe is to set the Output Coordinate System environment setting in your script to as it should then become the default value for the output coordinate system variable(you can do this by placing &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;outputCoordinateSystem&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN&gt;(4269) with the rest of your environment variables(Actually I'm curious if this works, someone else had a similar error &lt;A href="https://gis.stackexchange.com/questions/135884/error-when-projecting-rasters-using-arcpy"&gt;here&lt;/A&gt; and I wonder if you left the 3rd parameter blank the environment setting would entirely take care of things.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 17:25:51 GMT</pubDate>
    <dc:creator>IanMurray</dc:creator>
    <dc:date>2017-07-26T17:25:51Z</dc:date>
    <item>
      <title>Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244151#M18964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;I have multiple netCDF files I need to make a "netCDF raster" layer and then "project raster" and save as a ".tif" file. I have the following script but this gives me an error message.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;Please see the code and error message below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# Import system modules&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys 
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; env&amp;nbsp; 
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sa &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; 
&lt;SPAN class="comment token"&gt;# Input data source&amp;nbsp; &lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:/Users/jayaskeradl/Desktop/weekly_avg_project"&lt;/SPAN&gt;&amp;nbsp; 
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;overwriteOutput &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; 
&lt;SPAN class="comment token"&gt;# Set output folder&amp;nbsp; &lt;/SPAN&gt;
OutputFolder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:/Users/jayaskeradl/Desktop/weekly_avg_project/output"&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; 
&lt;SPAN class="comment token"&gt;# Loop through a list of files in the workspace&amp;nbsp; &lt;/SPAN&gt;
NCfiles &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFiles&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*.nc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; 
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; filename &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; NCfiles&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Processing: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; filename&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inNCfiles &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"//"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; filename&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileroot &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; filename&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;filename&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TempLayerFile &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SM_amount"&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; OutputFolder &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"//"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; fileroot&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# Process: Make NetCDF Raster Layer&amp;nbsp; &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeNetCDFRasterLayer_md&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;filename&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"var250"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"lon"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"lat"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; TempLayerFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"BY_VALUE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ProjectRaster_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;filename&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; TempLayerFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NEAREST"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"0.125 0.125"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NAD_1983_To_WGS_1984_1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# Process: Copy Raster&amp;nbsp; &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyRaster_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;TempLayerFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outRaster &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".tif"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; 
&amp;nbsp; 
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"***DONE!!!"&lt;/SPAN&gt;&amp;nbsp; 
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetMessages&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 


‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ExecuteError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Failed to execute&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Parameters are &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; valid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
Undefined coordinate system &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; input dataset&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
Failed to execute &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ProjectRaster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:11:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244151#M18964</guid>
      <dc:creator>DuminduJayasekera</dc:creator>
      <dc:date>2021-12-11T12:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244152#M18965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First off, when posting code to GeoNet please use the code formatting to make your script more legible(See &lt;A href="https://community.esri.com/people/curtvprice/blog/2014/09/25/posting-code-blocks-in-the-new-geonet?sr=search&amp;amp;searchId=33390d5c-862e-4489-8e39-2afae930a01c&amp;amp;searchIndex=2"&gt;https://community.esri.com/people/curtvprice/blog/2014/09/25/posting-code-blocks-in-the-new-geonet?sr=search&amp;amp;searchId=33390d5c-862e-4489-8e39-2afae930a01c&amp;amp;searchIndex=2&lt;/A&gt;‌ for more on that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently you are getting an indent error, so either something is indented where it shouldn't be, you are mixing spaces and tabs for your indenting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not believe that will be the only issue since you code has some fairly serious problems.&amp;nbsp; since the foreslash character is an escape character, the file paths you used in your workspace and output folder will not be read properly.&amp;nbsp; This is easily fixed by placing an r character prior to the string to make it a raw string and treat the foreslash as a raw string not an escape character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r"C:/Users/Desktop/weekly_avg_project"&lt;/P&gt;&lt;P&gt;OutputFolder = r"C:/Users/Desktop/weekly_avg_project/output"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a similar problem with escape characters in the following lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inNCfiles = arcpy.env.workspace + "/" + filename&lt;/P&gt;&lt;P&gt;outRaster = OutputFolder + "/" + fileroot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;they would need to be double foreslashes to end up with a single foreslash character in python(or even better, use os.path.join to concatenate filepaths instead of just string concatentation. See: &lt;A href="https://docs.python.org/2/library/os.path.html"&gt;https://docs.python.org/2/library/os.path.html&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inNCfiles = arcpy.env.workspace + "//" + filename&lt;/P&gt;&lt;P&gt;outRaster = OutputFolder + "//" + fileroot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this gets you closer to the script working, if not repost your updated code with the code formatting and new error message and we can go from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 16:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244152#M18965</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-07-26T16:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244153#M18966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ian.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your reply. I have considered your comments and modified in the script. (Please see the script and error above). My code still does not work. I get a different error now. &amp;nbsp;I really appreciate if you can help me the script working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot again.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 16:42:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244153#M18966</guid>
      <dc:creator>DuminduJayasekera</dc:creator>
      <dc:date>2017-07-26T16:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244154#M18967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code looks much better now thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue now is how your output coordinate system parameter is formatted, as it will not accept the string name for the coordinate system nor the WKID for the coordinate system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The coordinate system to which the input raster will be projected. The default value is set based on the Output Coordinate System environment setting.&lt;/P&gt;&lt;P&gt;Valid values for this parameter are&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A file with the ".prj" extension (the prj files which ship with ArcGIS can be found in "C:\Program Files\ArcGIS\Coordinate Systems").&lt;/LI&gt;&lt;LI&gt;An existing feature class, feature dataset, raster catalog (basically anything with a coordinate system).&lt;/LI&gt;&lt;LI&gt;The string representation of a coordinate system. These lengthy strings can be generated by adding a coordinate system variable to ModelBuilder, setting the variable's value as desired, then exporting the model to a Python script."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a few options, one is to have a .prj file somewhere with the output spatial reference you want and use that as the parameter(&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/project-raster.htm"&gt;http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/project-raster.htm&lt;/A&gt;).&amp;nbsp; Similarly if you had a raster you manually projected into that coordinate system somewhere in your workspace, you could reference that as an input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option I believe is to set the Output Coordinate System environment setting in your script to as it should then become the default value for the output coordinate system variable(you can do this by placing &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;outputCoordinateSystem&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN&gt;(4269) with the rest of your environment variables(Actually I'm curious if this works, someone else had a similar error &lt;A href="https://gis.stackexchange.com/questions/135884/error-when-projecting-rasters-using-arcpy"&gt;here&lt;/A&gt; and I wonder if you left the 3rd parameter blank the environment setting would entirely take care of things.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 17:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244154#M18967</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-07-26T17:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244155#M18968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Ian. I have tried what you mentioned in the above comment. (Please see the code and errors above). I would like to know how I can copy the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;string representation of a coordinate system using the model builder as you noted in 3rd bullet.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I have opened the properties of the raster of same coordinate system but it does not provide &lt;SPAN&gt;string representation of a coordinate system. See the image below.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;Again your help is highly appreciated to make the script working and moving forward.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;IMG __jive_id="364482" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/364482_coordinate.jpg" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 17:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244155#M18968</guid>
      <dc:creator>DuminduJayasekera</dc:creator>
      <dc:date>2017-07-26T17:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244156#M18969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the environmental setting isn't working at all so ignore that.&amp;nbsp; I feel at this point it would just be easiest to write the file path to a dataset or .prj on your computer that has the coordinate system you are wanting to use instead of that long drawn string for the coordinate system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do want the coordinate system string, I saw you had another thread similar to this using Model Builder, you can export your model to a python script from Model Builder and as long as you set the coordinate system properly on the Project Raster Tool in Modelbuilder, it should have the correct string for you to use in python for that coordinate system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:59:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244156#M18969</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-07-26T19:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244157#M18970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. Thanks again for taking your time and reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to export to the model builder&amp;nbsp;to obtain the projection string as you can see in the code. I ran the model and it still gives me an error saying that "Undefined coordinate system for input dataset". The input file is a netCDF file which does not have projection information. How can i solve this problem and make the script running.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the attached sample of netCDF files I am using.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and appreciate your help again.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 20:38:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244157#M18970</guid>
      <dc:creator>DuminduJayasekera</dc:creator>
      <dc:date>2017-07-26T20:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244158#M18971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have the same input for Make NetCDF Layer and for Project Raster(filename or the .nc file), while you should take the output from Make NetCDF Layer (an actual raster layer, which should have a coordinate system) and use that for the input of Project Raster.&amp;nbsp; The output of Project Raster would need a different name than you are currently using for the input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 20:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244158#M18971</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-07-26T20:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error in multiple netCDF file processing followed by raster projection</title>
      <link>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244159#M18972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch again. I made it work. What you suggested was correct. I made the changes and it's correctly projecting the files. Thanks a lot again.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 21:32:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-multiple-netcdf-file-processing-followed/m-p/244159#M18972</guid>
      <dc:creator>DuminduJayasekera</dc:creator>
      <dc:date>2017-07-26T21:32:50Z</dc:date>
    </item>
  </channel>
</rss>

