-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running a case with files with zero size doesn't give a graceful error #254
Comments
It looks like this error is generated from PIO's |
I think that it might be better to add this as a feature to check_input_data so that the error is captured before the model starts. The unknown file error comes from the underlying netcdf layer, I'm not sure how you would change it without significant affect on performance. |
I like the idea of catching this particular error in check_input_data. At the same time, I think it would be helpful for PIO to output as much information as it can when it hits an error like this. From my quick look through the PIO code, it looks like PIO knows the file name at the point where this error is generated (in this case, from PIOc_openfile_retry), so it seems like PIO could pass the filename into check_netcdf2 where it could be appended to the error message that comes out of the NetCDF layer. @jedwards4b I'm curious what you think about that approach. If it would be easier to discuss this over Zoom, we can do that. |
Adding the file name to the error message would be a good addition and I support that. Trying to determine if I am opening a 0 length file would, I think, be expensive. |
I ran a case with some forcing files that had zero size. Obviously that is a problem and I shouldn't expect it to run. The problem is that I don't see an error that I can figure out what the problem is. There's nothing in the atm.log file, and the cesm.log contains nothing informative. Since, most files were fine, my spot checking a few files didn't spot the issue. It would be helpful if when it encounters such a problem a useful error message is given about the zero size file. So I know what the problem is, what file it is, and how to fix it.
The test is:
SMS_D_Ld1_PS.nldas2_rnldas2_mnldas2.I2000Ctsm50NwpSpNldasRs.cheyenne_gnu.clm-default
Where many of the files had zero size, such as...
cesm..log:
The only other file with content is the med.log file, which doesn't have anything remarkable.
Turning on the PET files I see this:
So we can see it's in the datm and in stream forcing files, but we can't tell what specific file(s) it's failing in.
The text was updated successfully, but these errors were encountered: