Select to view content in your preferred language

Iterate Files

2701
9
01-04-2017 09:28 PM
GotreGotrewyan
Emerging Contributor

I have a folder with many raster files in .nc format. I want to build a model to do some proccessing on each raster and finally export an excel file for each raster with the same name. The model screen shot is 

The model

when I run the model its stopping with no result as picture shows:

Result

but the model work fine for one raster file.

Is something wrong with iterator files? and how can I fix it?

please help me

Tags (1)
0 Kudos
9 Replies
DanPatterson_Retired
MVP Emeritus

Do .nc files appear as datasets in Catalog? if so, then they may be being skipped Iterate Files—Help | ArcGIS Desktop I think you have to use the iterator on Reading netCDF data using geoprocessing tools—Help | ArcGIS Desktop rather than on the files directly

0 Kudos
GotreGotrewyan
Emerging Contributor

No, the .nc files does not appear in ArcCatalog. As you see I already imported the netCDF geoprocessing tool (make netCDF raster layer) in the model. I'm quite not sure about what to do. Can you explain how to fix it?

Sorry for my weak English and thank you  for answering

0 Kudos
DanPatterson_Retired
MVP Emeritus

sorry... missed that tool in the model... I can't find anything specific to modelbuilder, only the basis from a solution using python https://community.esri.com/message/535067 

GotreGotrewyan
Emerging Contributor

Thank you Mr Patterson, I will try that and send feedback to you.

0 Kudos
curtvprice
MVP Esteemed Contributor

I highly recommend getting rid of the iterator in the model and getting it work for one dataset. Then add try adding the iterator once you have it working.

0 Kudos
GotreGotrewyan
Emerging Contributor

As I mentioned above(in the question), the model works fine for one dataset but any way thanks for answering.

0 Kudos
curtvprice
MVP Esteemed Contributor

Wasn't clear to me that that was what you meant (you can iterate on just one input too. 

You may want to make the input file and name parameters put this model as a submodel of a another model that contains the iterator. This may avoid your validation problems.

0 Kudos
GotreGotrewyan
Emerging Contributor

I'm not sure what is your mean exactly!! Anyway I mean that if I remove the iterate file in the model and give it just one raster (nc format) file the whole process works good. Now I want to run this model for 5000 rasters. So I placed the 5000 rasters in one folder (folder name: "nc") and introduce it as a input. Now when I run the model the error comes up

I hope I'm clearly explained the issue.

0 Kudos
DanPatterson_Retired
MVP Emeritus

the 'name' oval is connected to the export to excel oval.  you can't export a *nc file's name to excel.  look at the example of an iterator here Example of using an iterator in a model—Help | ArcGIS Desktop 

0 Kudos