Skip to content

Update error message when granules are empty #78

@jamesfwood

Description

@jamesfwood

Update the error message to display error with granule no data or empty to make it easier to understand why it failed.

This collection and granule is empty:

NASA_SSH_REF_ALONGTRACK_V1
G3408711413-POCLOUD

https://archive.podaac.earthdata.nasa.gov/podaac-ops-cumulus-protected/NASA_SSH_REF_ALONGTRACK_V1/NASA-SSH_alt_ref_at_v1_20250128.nc

Current Error message:

tig_0.13.1rc1:
STDOUT:

STDERR:
Traceback (most recent call last):
File "/usr/local/bin/tig", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/podaac/tig/cli.py", line 29, in main
image_gen.generate_images(granule_id=args.input_file.split('/')[-1])
File "/usr/local/lib/python3.10/site-packages/podaac/tig/tig.py", line 406, in generate_images
output_images = self.generate_images_group(image_format, world_file, granule_id, group=None)
File "/usr/local/lib/python3.10/site-packages/podaac/tig/tig.py", line 438, in generate_images_group
eastern = lon_array.max()
File "/usr/local/lib/python3.10/site-packages/numpy/ma/core.py", line 6083, in max
result = self.filled(fill_value).max(
File "/usr/local/lib/python3.10/site-packages/numpy/_core/_methods.py", line 44, in _amax
return umr_maximum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation maximum which has no identity

New message add like:

Error: No data in this granule.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions