Skip to content

Plotting with no lpo #25

Description

@brandonwkerns

Plotting does not work when there are no LPOs. The script seems to crash. Error message:

"lpt_run.py" [dos] 258L, 13150C                                                                                                       117,37        44%
"""
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/site-packages/matplotlib/transforms.py", line 2772, in get_transformed_points_and_affine
    self._revalidate()
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/site-packages/matplotlib/transforms.py", line 2757, in _revalidate
    self._transform.transform_path_non_affine(self._path)
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/site-packages/matplotlib/transforms.py", line 2431, in transform_path_non_affine
    return self._a.transform_path_non_affine(path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py", line 170, in transform_path_non_affine
    new_vertices = self.target_projection.quick_vertices_transform(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/site-packages/cartopy/crs.py", line 1377, in quick_vertices_transform
    self.y_limits[0] <= ys.min() and
                        ^^^^^^^^
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/site-packages/numpy/core/_methods.py", line 45, in _amin
    return umr_minimum(a, axis, None, out, keepdims, initial, where)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation minimum which has no identity
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/disk/orca/bkerns/lib/lpt/lpt-python-public/ERA5/lpt_run.py", line 258, in <module>
    lpt_driver(dataset,plotting,output,lpo_options,lpt_options, merge_split_options, mjo_id_options, sys.argv)
  File "/home/disk/orca/bkerns/lib/lpt/lpt-python-public/lpt/lpt_driver.py", line 49, in lpt_driver
    p.starmap(lpt.helpers.do_lpo_calc,
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/multiprocessing/pool.py", line 375, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/disk/orca/bkerns/anaconda3/envs/meteo_3.11/lib/python3.11/multiprocessing/pool.py", line 774, in get
    raise self._value
ValueError: zero-size array to reduction operation minimum which has no identity
(meteo_3.11) FAIL

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions