ARGANS / shellfish_and_algae-MODEL

0 stars 0 forks source link

Dataread scripts throw an exception #5

Closed nmaltsev closed 2 years ago

nmaltsev commented 2 years ago

I got the following exception when I ran dataread scripts:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/opt/src/make_runs.py", line 159, in run_scenario_a_monthly
    if np.ma.core.MaskedConstant() in data.values():
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
"""

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

Traceback (most recent call last):
  File "/opt/start.py", line 103, in <module>
    ) for i in range(n_slices)]).get()
  File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 771, in get
    raise self._value
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
qjutard commented 2 years ago

The lat/lon names for one or more variable used was wrong, I implemented the management of commonly used names in https://github.com/ARGANS/shellfish_and_algae-MODEL/commit/921813e16dd5112fc8dc6a37f52e9521e6bac439 which solves the issue.