USDA-ARS-NWRC / weather_forecast_retrieval

Weather forecast retrieval gathers relavant gridded weather forecasts to ingest into physically based models for water supply forecasts
Other
6 stars 1 forks source link

Small differences in the data from v0.5.4 to v0.6.8 #9

Open scotthavens opened 5 years ago

scotthavens commented 5 years ago

There are small differences in the data when moving from v0.5.4 to v0.6.8. The older version used pygrib and the new version uses xarray. The small differences appear to be float precision (see figure below, upper right) in how the two packages read the float numbers.

When using the opendap netcdf's, grib2nc we chose to save storage space and reduced the latitude and longitude from float64 to float32. This creates a less than 1 meter difference when converted to UTM coordinates. However, this can have some affect in the interpolation of SMRF as seen in the lower left figure. Using the original float64 coordinates and the netcdf, produce float precision errors.

image

While this can have an affect on the snow model (up to 1% difference in SWE) this is a small uncertainty in the overall modeling and not a priority. Converting latitude and longitude to a float64 precision on a 3 kilometer grid cell is not needed and would take more time than it is worth. This issue exists just to let those know of the small errors introduced when using grib2nc.