Skip to content
Snippets Groups Projects
Commit e54eaa00 authored by tomrink's avatar tomrink
Browse files

hook for manual set of fillValue

parent 3fffe2af
No related branches found
No related tags found
No related merge requests found
......@@ -215,7 +215,7 @@ def check_oblique(satzen, test_angle=70.0):
def get_grid_values_all(h5f, grid_name, 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
......@@ -223,6 +223,8 @@ def get_grid_values_all(h5f, grid_name, scale_factor_name='scale_factor', add_of
raise GenericException('No attributes object for: '+grid_name)
grd_vals = hfds[:,]
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment