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

Tig fails for some VIIRS_NPP-NAVO-L2P-v3.0 granules #72

Open
jamesfwood opened this issue Jan 13, 2025 · 0 comments
Open

Tig fails for some VIIRS_NPP-NAVO-L2P-v3.0 granules #72

jamesfwood opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jamesfwood
Copy link
Contributor

jamesfwood commented Jan 13, 2025

empty granules can't make tig images

Traceback (most recent call last):
  File "/Users/simonl/Library/Caches/pypoetry/virtualenvs/podaac-tig-55lOuxh_-py3.8/bin/tig", line 5, in <module>
    main()
  File "/Users/simonl/Desktop/work/tig/podaac/tig/cli.py", line 29, in main
    image_gen.generate_images(granule_id=args.input_file.split('/')[-1])
  File "/Users/simonl/Desktop/work/tig/podaac/tig/tig.py", line 186, in generate_images
    output_dimensions = (int(height_deg * self.ppd), int(width_deg * self.ppd))
  File "/Users/simonl/Library/Caches/pypoetry/virtualenvs/podaac-tig-55lOuxh_-py3.8/lib/python3.8/site-packages/numpy/ma/core.py", line 4386, in __int__
    raise MaskError('Cannot convert masked element to a Python int.')
numpy.ma.core.MaskError: Cannot convert masked element to a Python int. 

Traceback (most recent call last):
File "/Users/simonl/Library/Caches/pypoetry/virtualenvs/podaac-tig-55lOuxh_-py3.8/bin/tig", line 5, in
main()
File "/Users/simonl/Desktop/work/tig/podaac/tig/cli.py", line 29, in main
image_gen.generate_images(granule_id=args.input_file.split('/')[-1])
File "/Users/simonl/Desktop/work/tig/podaac/tig/tig.py", line 186, in generate_images
output_dimensions = (int(height_deg * self.ppd), int(width_deg * self.ppd))
File "/Users/simonl/Library/Caches/pypoetry/virtualenvs/podaac-tig-55lOuxh_-py3.8/lib/python3.8/site-packages/numpy/ma/core.py", line 4386, in int
raise MaskError('Cannot convert masked element to a Python int.')
numpy.ma.core.MaskError: Cannot convert masked element to a Python int.
Seems like some of the granules are empty which will create the above error. Tested with the below granule.

20180226053734-NAVO-L2P_GHRSST-SST1m-VIIRS_NPP-v02.0-fv03.0

https://search.earthdata.nasa.gov/search/granules?p=C1996881636-POCLOUD&pg[0][v]=f&pg[0][id]=20180226053734-NAVO-L2P_GHRSST-SST1m-VIIRS_NPP-v02.0-fv03.0&pg[0][gsk]=-start_date&tl=1660683274.928!3

From Simon:
I believe what we are seeing is that we have empty granules, it seems the lon and lat 2d array is all full of NaNs, so im not sure we even have images to generate. Unsure what solution should be for these types of granules.

Moved from https://jira.jpl.nasa.gov/browse/PODAAC-4776

@jamesfwood jamesfwood added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant