From eaf8f98ef0267f854a3891b34f21bdb6c7f22e5c Mon Sep 17 00:00:00 2001 From: "edward.safford" Date: Mon, 25 Sep 2023 17:12:46 +0000 Subject: [PATCH] Ref #156 Fix code review items. --- src/eva/data/data_collections.py | 10 ++++++---- src/eva/plotting/emcpy/plot_tools/figure_driver.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/eva/data/data_collections.py b/src/eva/data/data_collections.py index 7572ada4..28326ef5 100644 --- a/src/eva/data/data_collections.py +++ b/src/eva/data/data_collections.py @@ -208,6 +208,9 @@ def get_variable_data_array(self, collection_name, group_name, variable_name, # Create a new DataArray with the requested channels data_array_channels = data_array.sel(Channel=channels_sel) return data_array_channels + else: + self.logger.abort('In get_variable_data_array channels is neither none ' + + 'nor a list of integers') elif levels is not None: if isinstance(levels, int) or not any(not isinstance(lev, int) for lev in levels): @@ -222,10 +225,9 @@ def get_variable_data_array(self, collection_name, group_name, variable_name, # Create a new DataArray with the requested channels data_array_levels = data_array.sel(Level=levels_sel) return data_array_levels - - else: - self.logger.abort('In get_variable_data_array channels is neither none or list of ' + - 'integers') + else: + self.logger.abort('In get_variable_data_array levels is neither none ' + + 'nor a list of integers') # ---------------------------------------------------------------------------------------------- diff --git a/src/eva/plotting/emcpy/plot_tools/figure_driver.py b/src/eva/plotting/emcpy/plot_tools/figure_driver.py index 33ef2d26..706c65e9 100644 --- a/src/eva/plotting/emcpy/plot_tools/figure_driver.py +++ b/src/eva/plotting/emcpy/plot_tools/figure_driver.py @@ -80,7 +80,7 @@ def figure_driver(config, data_collections, timing, logger): if levels: step_vars = levels step_var_name = 'level' - title_fill = ' Lv. ' + title_fill = ' Lev. ' # Set some fake values to ensure the loops are entered if not variables: