USDA-ARS-NWRC / smrf

SMRF was designed to increase the flexibility of taking measured weather data, or atmospheric models, and distributing the data across a watershed.
Other
12 stars 4 forks source link

Raise error when no gridded data is loaded #212

Open scotthavens opened 3 years ago

scotthavens commented 3 years ago

When loading a gridded dataset whose domain does not match the topo.nc domain, it will show that 0 cells within model domain but SMRF will continue on and try to interpolate. Suggest raising an error to alert users that their input data doesn't match the model domain.

scotthavens commented 3 years ago

HRRR Just check if metadata is not empty. https://github.com/USDA-ARS-NWRC/smrf/blob/465d42cca85820e76a50bc311d101c7dc506df8c/smrf/data/hrrr_grib.py#L81

WRF https://github.com/USDA-ARS-NWRC/smrf/blob/465d42cca85820e76a50bc311d101c7dc506df8c/smrf/data/wrf.py#L76

NetCDF https://github.com/USDA-ARS-NWRC/smrf/blob/465d42cca85820e76a50bc311d101c7dc506df8c/smrf/data/netcdf.py#L64