-
Notifications
You must be signed in to change notification settings - Fork 35
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
AVHRR Band 2 image shows black where bright clouds should be #332
Comments
Looking at the code, the negative slope parameter is currently corrected for band 3a, not 2 at the moment. So it might be a bug if 3a doesn't need to be corrected at all. |
From Nigel Atkinson:
Based on that code though this is probably checked for every visible channel. |
So would the solution be to use unsigned ints here instead? |
@mraspaud Logically that makes sense (overflowing max signed int but want to use it as unsigned int) but will only work if that piece of the code only applies to visible channels. If it also applies to IR channels then it may break cases where slope is supposed to be negative. The other workaround is to make it so that slope check in Satpy is always checked for visible channels. |
@djhoese could you extract the relevant fields from the data header so that we can make a test case? |
You mean a test case for a unit test in Satpy? As a starting point @kathys can probably get us the files Liam used. |
yes, sorry, I thought you had the file already. |
@mraspaud If you want to play with this, the file in question is on
If there's a better place to put it, let me know. |
I don't seem to have access to bumi anymore... google drive or dropbox? Won't really have time now though until after my vacation. |
@mraspaud Did you go through "ash" to connect to it? If so, maybe your account expired. Anyway here is the file: ftp://ftp.ssec.wisc.edu/pub/ssec/davidh/hrpt_noaa18_20210327_1411_81698.l1b |
Yes, I'm using ash as gateway. I can't seem to access the ftp either, sorry... |
to be more exact, the ftp is fine, but the |
That's because it gets cleared out after 7 days. I'll put it up again later today. |
@mraspaud The file should be there now. |
got it, thanks |
@kathys I don't know if you did this already, but if you change that |
Closing this as it is now fixed in Satpy and tested by @kathys in current P2G. |
This problem is still seen in Metopb and Metopc band 3a geotiff images. |
With my local P2G version this is what I get for the original use case of this PR: But this issue was originally just for band 2. Luckily Nina Hakansson fixed it in Satpy for the other bands: pytroll/satpy#2123 But this PR was only merged on July 29th, after your latest beta tarball. I think we're good here, but let's put it on the TODO list to recheck with the new tarball. |
The metopb and metopc input files: Output files: You are right, the band 2 data now looks fine. It is only the band 3a data that does not display correctly, and 3a is only available on the metop avhrr satellites. |
Liam informed us that he was running into cases where the AVHRR Band 2 images were missing the clouds (bright regions). It seemed to only happen in the band 2 data. Nigel Atkinson informed us that the slope after applying the coefficients was sometimes negative in band 2, and therefore an offset had to be applied to ensure that it was always positive. Dave investigated and found that the negative slope check and offset was included in the code already, but found that the section of code where it was applied "polar2grid/avhrr/readers.py" line 299, did not recognize it as band 2, but thought it was band 1.
Here is the image that Liam provided, and I was able to reproduce.

The text was updated successfully, but these errors were encountered: