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
Emerging from ESCOMP/CDEPS#254 - we'd like for PIO to print the filename that leads to netcdf errors that are caught in the check_netcdf2 function. I'm happy to take this on (but I don't have permission to assign myself).
From a quick look through the code, it looks like most / all of the functions that call check_netcdf2 directly have a filename that they could pass in as an extra argument. Then I'm thinking that we'd modify the error message returned from netcdf to append the file name to the output message.
I'm not sure the best way to handle the call from check_netcdf to check_netcdf2. Options I see are:
Don't handle calls to check_netcdf for now. (It looks like the above CDEPS issue would be handled via one of the direct calls to check_netcdf2.)
Extend check_netcdf to also accept a filename argument. However, there are a lot of calls to check_netcdf, so this would be a pretty invasive change.
check_netcdf has a file_desc_t object. (So does check_netcdf2, but the direct calls to check_netcdf2 appear to pass NULL in for that argument.) Currently file_desc_t doesn't contain the filename but I wonder if it makes sense to extend file_desc_t to store the associated filename. Then calls to check_netcdf2 via check_netcdf could get the file name from that file_desc_t object.
I like the idea of (3), but I haven't looked into what it would involve. @jedwards4b do you have thoughts on whether this would be a reasonable solution?
The text was updated successfully, but these errors were encountered:
Emerging from ESCOMP/CDEPS#254 - we'd like for PIO to print the filename that leads to netcdf errors that are caught in the check_netcdf2 function. I'm happy to take this on (but I don't have permission to assign myself).
From a quick look through the code, it looks like most / all of the functions that call check_netcdf2 directly have a filename that they could pass in as an extra argument. Then I'm thinking that we'd modify the error message returned from netcdf to append the file name to the output message.
I'm not sure the best way to handle the call from check_netcdf to check_netcdf2. Options I see are:
I like the idea of (3), but I haven't looked into what it would involve. @jedwards4b do you have thoughts on whether this would be a reasonable solution?
The text was updated successfully, but these errors were encountered: