diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index dbdc560c2b21931adfe74088343b619bb2120598..63deba14d6400bf957ed3ebec9599da48868dbae 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -90,7 +90,7 @@ def get_goes_datasource(timestamp): def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='scale_factor', add_offset_name='add_offset', - fill_value_name='_FillValue', range_name='actual_range'): + fill_value_name='_FillValue', range_name='actual_range', fill_value=None): hfds = h5f[grid_name] attrs = hfds.attrs if attrs is None: @@ -109,6 +109,8 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca return None grd_vals = hfds[j_l:j_r, i_l:i_r] + if fill_value is not None: + grd_vals = np.where(grd_vals == fill_value, np.nan, grd_vals) if scale_factor_name is not None: attr = attrs.get(scale_factor_name)