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

Clean up _destag_variable with respect to types and terminology #103

Closed jthielen closed 2 years ago

jthielen commented 2 years ago

Change Summary

Further cleanups of #93 after merge (sorry about that!), this time to help out developers/contributors who wish to build upon the private _destag_variable function:

As discussed in https://github.com/xarray-contrib/xwrf/pull/100#discussion_r973392632 and https://github.com/xarray-contrib/xwrf/pull/100#discussion_r973399431, this adds a type check for xarray.Variable in _destag_variable as a safe guard for xwrf contributors against passing in an xarray.DataArray by accident. Also, updates comments in _destag_variable from the original version in #37 to have a bit more accurate terminology.

Related issue number

Checklist

jthielen commented 2 years ago

Rebased on main after #100 just to be extra careful. With @lpilz review approving, I've enabled auto-merge once CI passes.