Open ellgil82 opened 1 month ago
Update: looking at the data with iris has shown this is probably related to WGDOS packing errors.
Hi @ellgil82, thanks for your question. I can't immediately see what the issue might be from your traceback - you are right it isn't the most informative error report that emerges, and we will look to improve on it.
Unless we have the specific dataset to play around with, we can't recreate the specific issue you might be hitting - so if there's a way you can point us to the datasets in question (do you use or have access to JASMIN, since a path to the datasets there would?) else share it, that would be particularly useful.
For now, if you specify verbose=-1
or equivalently verbose="DEBUG"
to your collapse
call (e.g. f.collapse("minimum", verbose=-1)
), this turns the verbosity 'up to 11' (for info see https://ncas-cms.github.io/cf-python/tutorial.html#controlling-output-messages if useful) and should provide more information that might help to pinpoint the issue, though since most of our UM reading capability is done in C under-the-hood, I am not sure how much useful information may emerge... Worth a try though, so please share the output here (or relevant parts of it, the debug output can be very dense).
thanks Sadie for this - I've tried with the verbose output option but not getting much more in the error description. Just seems to pop up halfway through the collapse.
Did a bit more digging and it seems like one of my files has been corrupted / data is packed incorrectly. Will re-make that file and see if it changes anything. Thanks for your help!
OK thanks for trying that Ella. I can't say for sure, but your hypothesis of incorrect packing or corruption of data could well be the case given the context. Sorry if we can't pinpoint anything more specific - it is considerably more difficult to diagnose a precise issue from the C code component of the library (which is mostly for reading UM) than the Python part (the rest of the functionality in cf-python).
If you are still having difficulty getting cf-pytohn to do what you want it to after re-making, please comment here again and we can think what else we can try.
I'm getting an error when trying to collapse UM files to go from sub-daily to daily frequency. The data are 6-hourly maximum air temperature (max across all timesteps).
I'm new to cf-python so unsure about where/how to start with debugging this, and read_record_data doesn't tell me much about the source of the error:
Any help would be appreciated!