Skip to content

Commit

Permalink
Ref #156
Browse files Browse the repository at this point in the history
Fix code review items.
  • Loading branch information
EdwardSafford-NOAA committed Sep 25, 2023
1 parent 7126f32 commit eaf8f98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/eva/data/data_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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')

# ----------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/eva/plotting/emcpy/plot_tools/figure_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit eaf8f98

Please sign in to comment.