[FEATURE]: Make xwrf fall back to XTIME if Times is not included in WRF file
Closed this issue · 1 comments
Description
For now, the processing of WRF files which don't include the Times
variable is not possible even though the data should also be available in the XTIME
coordinate. I would propose that we fall back on the XTIME
variable if the Times
variable is not available.
Implementation
Add this to postprocess.py:_decode_times
. Check if XTIME
already is a datetime variable and if not, call the default xarray cf decoder.
Tests
Drop the Times
variable from the raw dataset before .xwrf.postprocess()
and compare both Time
coordinates.
Questions
Is there anything we have to make transparent to the users? Like could there be floating-point inaccuracies which warrant a warning?
I decided to just error if the XTIME
is not a datetime
dtype as it seemed unnecessarily complicated to implement the default xarray
decoding.