from datetime import datetime, timezone
from pyorbital import orbital
from pyhdf.SD import SD, SDC
t = datetime(2005, 6, 16, 1, 20, 0, 0, tzinfo=timezone.utc)
terra = orbital.Orbital("EOS-TERRA")
terra.get_lonlatalt(t)
Above code yields:
(166.84878227675836, 60.28586375275336, 718.455146236583)
Terra MODIS is a nadir looking instrument, so those coordinates (or relatively close to them) should be present in the data from the sensor... but...
pass1 = SD('MOD07_L2.A2005167.0115.061.2017291020316.hdf', SDC.READ)
pass2 = SD('MOD07_L2.A2005167.0120.061.2017291020310.hdf', SDC.READ)
lats1 = pass1.select('Latitude')
lons1 = pass1.select('Longitude')
lats2 = pass2.select('Latitude')
lons2 = pass2.select('Longitude')
print(np.max(lats1[:]),np.min(lats1[:]),np.max(lats2[:]),np.min(lats2[:]))
returns:
(-54.213318 -77.61293 -38.029873 -59.76777)
All the latitudes are in the southern hemisphere, while the pyorbital thinks that the satellite is close to the arctic circle in the northern hemisphere, so that's not great...
Above code yields:
(166.84878227675836, 60.28586375275336, 718.455146236583)Terra MODIS is a nadir looking instrument, so those coordinates (or relatively close to them) should be present in the data from the sensor... but...
returns:
(-54.213318 -77.61293 -38.029873 -59.76777)All the latitudes are in the southern hemisphere, while the pyorbital thinks that the satellite is close to the arctic circle in the northern hemisphere, so that's not great...