Skip to content

Commit

Permalink
Simplify if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Marilyth committed Jun 11, 2021
1 parent 007313f commit 29e8334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mslib/mswms/mss_plot_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ def _load_interpolate_timestep(self):
cross_section = utils.interpolate_vertsec(var_data, self.lat_data, lon_data, self.lats, self.lons)
# Create vertical interpolation factors and indices for subsequent variables
# TODO: Improve performance for this interpolation in general
if name == "air_pressure" or "air_pressure" not in self.data_vars and len(factors) == 0:
if len(factors) == 0:
for index_lonlat, alt in enumerate(self.alts):
pressures = cross_section[:, index_lonlat] if "air_pressure" in self.data_vars \
else self.vert_data[::-self.vert_order] * 100 if self.vert_units.lower() == "hpa" else 1
Expand Down

0 comments on commit 29e8334

Please sign in to comment.