pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

avhrr_l1b_gaclac fails with a demand for TLEs #1506

Open simonrp84 opened 3 years ago

simonrp84 commented 3 years ago

Describe the bug On some platforms, the avhrr_l1b_gaclac reader gives an error message stating: RuntimeError: TLE directory not specified! If I manually set the TLE dir (with os.environ) then I get an error stating that TLEs are not available.

However, running the same code on another machine works perfectly with no need for the TLEs.

To Reproduce

scn = Scene([inf], reader='avhrr_l1b_gaclac')
scn.load(['4'])
lons, lats = scn['4'].area.get_lonlats()

This happens for all GAC files downloaded from the NOAA CLASS archive. An example filename is: NSS.GHRR.M1.D18362.S1107.E1202.B3257374.SV

Expected behavior No error message, AVHRR data to be correctly loaded.

Actual results Error message above.

Environment Info: Satpy 0.25.1, pygac from github master (downloaded 11th Jan 2021). Fails on: Ubuntu 18.04 Succeeds on: Windows 10 Home + Pro.

carloshorn commented 3 years ago

I could not reproduce the error on Red Hat Enterprise Linux Server 7.6. However, I would be surprised if it is related to the operating system. I guess it is related to the python environment. Maybe when you installed satpy first, it installed pygac as dependency and when you afterwards updated satpy and installed the latest pygac version, something could have gone wrong. More investigation would require your traceback of the error. Does it crash when importing pygac? This would mean that it is still using an old pygac version that was expecting a TLE directory from the environment variables. The latest version would only ask for TLEs when they are required, e.g. to calculate satellite angles.