From 37bcc96aa5943ab39cea3618e59b04bc5ff808e3 Mon Sep 17 00:00:00 2001 From: Rachel Wegener Date: Thu, 2 Nov 2023 18:54:20 +0000 Subject: [PATCH] skip appending required vars for ATL14, 15, and 23 --- icepyx/core/read.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/icepyx/core/read.py b/icepyx/core/read.py index 1a653f40f..842eab51f 100644 --- a/icepyx/core/read.py +++ b/icepyx/core/read.py @@ -730,22 +730,22 @@ def load(self): ) # Append the minimum variables needed for icepyx to merge the datasets - var_list=[ - "sc_orient", - "atlas_sdp_gps_epoch", - "cycle_number", - "rgt", - "data_start_utc", - "data_end_utc", - ] - - # Adjust the nec_varlist for individual products - if self.product == "ATL11": - var_list.remove("sc_orient") - - # Note: This fails if we are reading a file that doesn't have the var_list - # variables in it. - self.vars.append(defaults=False, var_list=var_list) + # Skip products which do not contain required variables + if self.product not in ['ATL14', 'ATL15', 'ATL23']: + var_list=[ + "sc_orient", + "atlas_sdp_gps_epoch", + "cycle_number", + "rgt", + "data_start_utc", + "data_end_utc", + ] + + # Adjust the nec_varlist for individual products + if self.product == "ATL11": + var_list.remove("sc_orient") + + self.vars.append(defaults=False, var_list=var_list) try: groups_list = list_of_dict_vals(self.vars.wanted)