Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error message when granules are empty #78

Open
jamesfwood opened this issue Feb 27, 2025 · 0 comments
Open

Update error message when granules are empty #78

jamesfwood opened this issue Feb 27, 2025 · 0 comments

Comments

@jamesfwood
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant