diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py
index f0379b307d27f7c01cc879cca7b0846471948d9d..7652f68204335a53c1542e74d441d5ee18b5bc8e 100644
--- a/modules/util/viirs_l1b_l2.py
+++ b/modules/util/viirs_l1b_l2.py
@@ -161,7 +161,7 @@ def run(data_h5f, param_s, train_tiles, valid_tiles, num_keep_x_tiles=8, tile_wi
     num_lines = data_h5f[param_name].shape[0]
     num_pixels = data_h5f[param_name].shape[1]  # Must be even
 
-    if day_night != 'BOTH':
+    if day_night != 'ANY':
         solzen = get_grid_values(data_h5f, solzen_name, 0, 0, None, num_lines, num_pixels)
 
     grd_s = []