diff --git a/modules/util/util.py b/modules/util/util.py
index 5f0f80e0725cd35e789a23a953f40a79894a137f..3daecd1d080e0d7798b17986f7464036aacc9acd 100644
--- a/modules/util/util.py
+++ b/modules/util/util.py
@@ -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)