Skip to content
Advertisement

How to avoid unsupported .nc file while reading from different directory

I have several folders in a directory containing .nc files. While reading, I am getting an error:

NETCDF can not read unsupported file

Since there are more than 5 thousand files, I don’t know which file is corrupted or unsupported. Is there any way to read files by jumping into another supported file?

The code that I am using is:

JavaScript

Advertisement

Answer

You could do this using exception handling. I’ve shown this with a simple example based on your code:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement