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

Cannot read AVHRR in AAPP format #179

Closed howff closed 6 years ago

howff commented 6 years ago

satpy 0.8.1 pyresample 1.7.1

Trying to load and resample AVHRR in AAPP format I get an image like the attached - the projection is wrong and there are vertical stripes (probably both the same cause).

2018_1_20_1524_unknown_4_s1_grid

djhoese commented 6 years ago

Could you please provide the commands you are using to run this? Which satellite is this data from? @adybbroe Aren't there some AVHRRs that have degraded data quality?

Edit: Next time, please follow the github issue template as much as possible and when it makes sense. It exists specifically so I don't have to ask the above questions.

adybbroe commented 6 years ago

@davidh-ssec Yes, NOAA-15 in particular, but this manifests through drop out of scan lines. This I believe is something else

howff commented 6 years ago

global_scene = Scene(reader='aapp_l1b', filenames=['hrpt_noaa19_20180120_1524_46109.l1b']) global_scene.load(['4']) local_scene = global_scene.resample('euro4') local_scene.save_dataset('4', filename='ch4.png')

adybbroe commented 6 years ago

@howff I can't reproduce your issue. I did this:

import os
from satpy import Scene
from satpy.utils import debug_on
debug_on()

BASEDIR = "/home/a000680/data/pps/import/PPS_data/source/metop01_20170710_0830_24957"
FILES = os.path.join(BASEDIR, "hrpt_metop01_20170710_0830_24957.l1b")

if __name__ == '__main__':

    global_scene = Scene(reader='aapp_l1b', filenames=[FILES])
    global_scene.load(['4'])
    local_scene = global_scene.resample('euro4')
    local_scene.save_dataset('4', filename='ch4.png',
                             overlay={'coast_dir': '/home/a000680/data/shapes/'})

Using pyresample master branch (version 1.7.1) Pyproj 1.9.5.1 Numpy 1.13.1 Satpy master 0.8.1 pykdtree 1.2.1

Could you check your versions of the above?

howff commented 6 years ago

I've got pyproj - same numpy - newer 1.14.0 satpy - same pykdtree newer 1.2.2

Data is https://wetransfer.com/downloads/c7bf44ab69ef40f8283ca9ac96d5f14a20180202090725/bede6aa5aa5eb1e2637f2c73620d277520180202090725/f315fb

adybbroe commented 6 years ago

@howff Ok. Where do you get the pykdtree version from. The latest version is 1.2.1 I thought!? Numpy 1.14.0 is buggy. There is a really annoying bug concerning the writing of npz files, which pyspectral use for the LUTs.

howff commented 6 years ago

Argh, I don't believe it, the image viewer has a bug displaying certain PNGs!! Sorry for wasting time. BTW, pykdtree 1.2.2 is from pypi. Just before closing, is the bug in numpy 1.14.0 a deal-breaker?

mraspaud commented 6 years ago

@howff if you use the savez function, then yes it is, otherwise it should be fine I guess