xarray-contrib / xwrf

A lightweight interface for working with the Weather Research and Forecasting (WRF) model output in Xarray.
https://xwrf.readthedocs.io/
Apache License 2.0
59 stars 16 forks source link

[MISC]: Improve Testing (Coverage and Cross-Package Integration) #49

Closed jthielen closed 2 years ago

jthielen commented 2 years ago

What is your issue?

A few good comments came up in #14 about improving our tests, so re-recording them here so as to not loose track of them:


Looks good to me! 👍🏽

The code coverage for postprocess.py is relatively low but we can address this in a separate PR

Originally posted by @andersy005 in https://github.com/ncar-xdev/xwrf/pull/14#pullrequestreview-881734593


Unfortunately, with the new changes metpy.parse_cf() breaks for me as it seems to try to cast XTIME to meters. I am getting a DimensionalityError

var = var.metpy.convert_coordinate_units(coord_name, 'meters') DimensionalityError: Cannot convert from 'dimensionless' (dimensionless) to 'meter' ([length]) I tried adding some units attributes and setting the coordinates kwarg of metpy.parse_cf(), but nothing helped. Does anybody have a hint as to what is happening here?

@lpilz: This sound like a good test to add.

Originally posted by @kmpaul in https://github.com/ncar-xdev/xwrf/issues/14#issuecomment-1040854371