You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GRIB files that produce a non-dimension coordinate (for example rotated_ll) crash when attemping to cf2cdm.translate_coords:
>>> cf2cdm.translate_coords(rotated_ll_data, coord_model=cf2cdm.CDS)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/devel/MPY/cfgrib/cf2cdm/cfcoords.py in translate_coords(data, coord_model, errors, coord_translators)
172 try:
--> 173 data = translator(cf_name, data, coord_model=coord_model)
174 except:
~/devel/MPY/cfgrib/cf2cdm/cfcoords.py in coord_translator(default_out_name, default_units, default_direction, is_cf_type, cf_type, data, coord_model)
79 data.coords[out_name].attrs['units'] = units
---> 80 data = translate_direction(data, out_name, stored_direction)
81 return data
~/devel/MPY/cfgrib/cf2cdm/cfcoords.py in translate_direction(data, out_name, stored_direction)
49 values = data.coords[out_name].values
---> 50 if values[-1] > values[0] and stored_direction == 'decreasing':
51 data = data.isel({out_name: slice(None, None, -1)})
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
<ipython-input-25-f05da76a7f8c> in <module>
----> 1 cosmo = cf2cdm.translate_coords(cosmo, coord_model=cf2cdm.CDS)
~/devel/MPY/cfgrib/cf2cdm/cfcoords.py in translate_coords(data, coord_model, errors, coord_translators)
174 except:
175 if errors != 'ignore':
--> 176 raise RuntimeError("error while translating coordinate: %r" % cf_name)
177 return data
178
RuntimeError: error while translating coordinate: 'latitude'
The text was updated successfully, but these errors were encountered:
GRIB files that produce a non-dimension coordinate (for example
rotated_ll
) crash when attemping tocf2cdm.translate_coords
:The text was updated successfully, but these errors were encountered: