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

IndexError in PODReader._adjust_clock_drift #76

Closed
carloshorn opened this issue Aug 14, 2020 · 3 comments · Fixed by #84
Closed

IndexError in PODReader._adjust_clock_drift #76

carloshorn opened this issue Aug 14, 2020 · 3 comments · Fixed by #84

Comments

@carloshorn
Copy link
Collaborator

I could not process the following files:

NSS.GHRR.NC.D82038.S2015.E2207.B0323839.GC
NSS.GHRR.NC.D82039.S1655.E1825.B0325051.WI
NSS.GHRR.NC.D82041.S0251.E0445.B0327071.WI
NSS.GHRR.NC.D82041.S0812.E1006.B0327374.GC
NSS.GHRR.NC.D82042.S0428.E0622.B0328586.WI
NSS.GHRR.NC.D82044.S0211.E0405.B0331213.WI
NSS.GHRR.NC.D82045.S0014.E0203.B0332526.GC
NSS.GHRR.NC.D82046.S0524.E0718.B0334243.WI
NSS.GHRR.NC.D82046.S1844.E2024.B0335051.WI
NSS.GHRR.NC.D82047.S0134.E0328.B0335455.WI
NSS.GHRR.NC.D82048.S0122.E0316.B0336869.WI
NSS.GHRR.NC.D82048.S1148.E1334.B0337475.GC
NSS.GHRR.NC.D82049.S0637.E0823.B0338586.WI
NSS.GHRR.NC.D82049.S1137.E1322.B0338889.GC
NSS.GHRR.NC.D82050.S0435.E0629.B0339899.WI
NSS.GHRR.NC.D82050.S1627.E1757.B0340506.WI
NSS.GHRR.NC.D82051.S1253.E1440.B0341718.GC
NSS.GHRR.NC.D82052.S1100.E1246.B0343031.GC
NSS.GHRR.NC.D83183.S0343.E0537.B1042930.WI
NSS.GHRR.NC.D83183.S1721.E1850.B1043738.WI
NSS.GHRR.NC.D83184.S1834.E2019.B1045253.WI
NSS.GHRR.NC.D83185.S0128.E0322.B1045657.WI
NSS.GHRR.NC.D83185.S1656.E1827.B1046566.WI
NSS.GHRR.NC.D83186.S2138.E2326.B1048283.GC
NSS.GHRR.NC.D83187.S0812.E0959.B1048889.WI
NSS.GHRR.NC.D83187.S2302.E2314.B1049697.GC
NSS.GHRR.NC.D83189.S0748.E0934.B1051617.WI
NSS.GHRR.NC.D83190.S1605.E1741.B1053536.GC
NSS.GHRR.NC.D83191.S1723.E1853.B1055051.WI
NSS.GHRR.NC.D83192.S1350.E1536.B1056263.GC
NSS.GHRR.NC.D83193.S1320.E1343.B1057676.GC
NSS.GHRR.NC.D83193.S1519.E1704.B1057778.GC
NSS.GHRR.NJ.D97187.S0423.E0441.B1296262.WI

due to an IndexError in PODReader._adjust_clock_drift giving a traceback like:

Traceback (most recent call last):
  File "../venv/bin/pygac-run", line 164, in <module>
    pygac.process_file(filename, start_line, end_line)
  File ".../venv/lib/python3.7/site-packages/pygac/runner.py", line 113, in process_file
    sunsatangles_dir=sunsatangles_dir
  File ".../venv/lib/python3.7/site-packages/pygac/reader.py", line 324, in save
    self.get_lonlat()
  File ".../venv/lib/python3.7/site-packages/pygac/reader.py", line 621, in get_lonlat
    self._adjust_clock_drift()
  File ".../venv/lib/python3.7/site-packages/pygac/pod_reader.py", line 460, in _adjust_clock_drift
    complete_lons[self.scans["scan_line_number"] - min_idx] = self.lons
IndexError: index 1448 is out of bounds for axis 0 with size 1448

This might be related to the following doc-string comment in PODReader._adjust_clock_drift:

TODO: bad things might happen when scanlines are skipped.

@sfinkens
Copy link
Member

Seems like the Cloud_cci team hit this, too: https://github.com/cschlund/pytAVHRRGACl1c/blob/master/post_blacklist.py#L76

@mraspaud
Copy link
Member

@carloshorn ouch. Do I need to have a look at this or are you on it @carloshorn ?

@carloshorn
Copy link
Collaborator Author

Unfortunately, I did not have much time this week to look into it. Help with this one would be very welcome, because I do not know the details of clock drift adjustment yet.

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