copy https://github.com/NREL/rdtools/pull/248
copy NatLabRockies/rdtools#248