You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VAPOR can't always automatically determine a data file's type (format) when the file is supplied on the command line. Moreover, the current implementation can lead to misleading error messages (see #2842).
The current file format detection algorithm works as follows: for each supported file type attempt to initialize the DC class for that format using the derived DC classes' Initialization method. If DC::Initialize() succeeds, assume that the correct DC class (and thus the format) has been identified.
A couple of problems result from this approach:
Some DC classes will successfully open (initialize) files that are of a different format. For example, the DCCF class will successfully initialize itself with some WRF files. The workaround for this is to test WRF files before CF files. But this problem will only grow as more formats are added.
If a file is corrupt/invalid in some way the DC::Initialize method will fail and thus the file will not be correctly identified. Moreover, the user will only be informed that the file type could not be identified, and not informed of the reason why the initialization failed.
Fixing this problem is tricky. Some of the file formats don't have 'magic numbers' that would enable a reliable file detection method. Thus it might never be possible to have a fool proof method. However, adding a DC::FileDetect() method that looks for specific items expected to be found in a file of a given type could improve the situation.
The text was updated successfully, but these errors were encountered:
Possible solution: Remove auto file detection, and add a consistent flag along the lines of what's already in vapor (some tools use -ftype, others use -filetype, etc) to the command line arguments.
Another option: rather than removing auto-detect, find when there's an ambiguity in data files and throw an error. @shaomeng and @clyne may have more feedback.
VAPOR can't always automatically determine a data file's type (format) when the file is supplied on the command line. Moreover, the current implementation can lead to misleading error messages (see #2842).
The current file format detection algorithm works as follows: for each supported file type attempt to initialize the DC class for that format using the derived DC classes' Initialization method. If DC::Initialize() succeeds, assume that the correct DC class (and thus the format) has been identified.
A couple of problems result from this approach:
Fixing this problem is tricky. Some of the file formats don't have 'magic numbers' that would enable a reliable file detection method. Thus it might never be possible to have a fool proof method. However, adding a DC::FileDetect() method that looks for specific items expected to be found in a file of a given type could improve the situation.
The text was updated successfully, but these errors were encountered: