noaa-oar-arl / monetio

The Model and ObservatioN Evaluation Tool I/O package
https://monetio.readthedocs.io
MIT License
17 stars 19 forks source link

RRFS-CMAQ reader should error when PM2.5 ds coords don't match #78

Closed zmoon closed 1 year ago

zmoon commented 2 years ago

https://github.com/NOAA-CSL/MELODIES-MONET/issues/94#issuecomment-1219797459

Currently this reader supports adding separate PM2.5 files, as it currently isn't in the default output. If the coords don't match, the merge https://github.com/noaa-oar-arl/monetio/blob/9bb2a013fe6e8907b80a206041dfced14cf73cd7/monetio/models/_rrfs_cmaq_mm.py#L165 leads to skipped plots or plots with confusing results in MM, as mentioned in the thread above.

It would be better to do some checks before the merge and raise a nice error message if necessary.

cc @rschwant

zmoon commented 2 years ago

Adding join='exact' to the merge seems like a good starting place.

ValueError: cannot align objects with join='exact' where index/labels/sizes are not equal along these coordinates (dimensions): 'grid_xt' ('grid_xt',)