No filenames found for reader ahi_hsd

davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: No filenames found for reader ahi_hsd

Post by davidh »

Looking at your list of files it looks like you are only providing files for bands B01, B02, B03, B04, and B05. This would explain why you aren't able to create output for the other bands. You'll need to provide files for the bands to be able to load the data.

The default geotiffs produced by geo2grid are 8-bit unsigned integers that have reflectance (or brightness temperature) values scaled to fit that 8-bit space. For reflectances we default to applying a "sqrt" function on the data then multiplying by 255 to fill the 0-255 8-bit space. An alpha band is used to mark pixels as invalid or valid.

If you'd like the raw reflectances to be put in the geotiff file you can use the

Code: Select all

--no-enhance
flag as well as the

Code: Select all

--dtype float32
flag.
torresrodyvito
Posts: 25
Joined: Wed Apr 03, 2019 10:21 pm

Re: No filenames found for reader ahi_hsd

Post by torresrodyvito »

Just a clarification, does the 8 bit unsigned integer reflectance values in the hsd files still needed to be radiometrically and atmospherically corrected?
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: No filenames found for reader ahi_hsd

Post by davidh »

For the regular band products, they are not atmospherically corrected. What exactly do you mean by radiometrically corrected? Currently the values saved to the geotiff have not been adjusted for the

Code: Select all

cos(SZA)
.
torresrodyvito
Posts: 25
Joined: Wed Apr 03, 2019 10:21 pm

Re: No filenames found for reader ahi_hsd

Post by torresrodyvito »

Oh, so how can we atmospherically correct the images? Should we just add cos(SZA) when converting the HSD to geotiff?
torresrodyvito
Posts: 25
Joined: Wed Apr 03, 2019 10:21 pm

Re: No filenames found for reader ahi_hsd

Post by torresrodyvito »

How can we apply atmospheric correction to the images? Should we just input the cos(SZA) in the code when converting hsd to geotiff?
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: No filenames found for reader ahi_hsd

Post by davidh »

It is currently not possible for users of Geo2Grid to control what corrections are applied to products. If you would like more control over what is produced I would suggest looking at the Satpy python package: https://satpy.readthedocs.io/en/latest/

Otherwise, there may be ways to "trick" Geo2Grid in to doing what you want by editing `GEO2GRID_HOME/etc/satpy/composites/ahi.yaml` and add a "B01_corrected" section which would make the file look like the following:

Code: Select all

sensor_name: visir/ahi

composites:
  B01_corrected:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - name: B01
      modifiers: [sunz_corrected] #, rayleigh_corrected]

This will do the division by "cos(SZA)". If you remove the "] #" characters in the middle of the modifiers value then you will also be including rayleigh correction.
Then ask for `-p B01_corrected` on the command line with geo2grid and this *might* work. Note however that this is not tested and is considered out of scope for the current version of Geo2Grid.

Good luck.
torresrodyvito
Posts: 25
Joined: Wed Apr 03, 2019 10:21 pm

Re: No filenames found for reader ahi_hsd

Post by torresrodyvito »

Hello again! So we already tried the "trick" you mentioned and were able to successfully convert images and analyze them. However, now, we wanted to check if the "corrected" images using the trick were correct. Should we compare the "corrected" relflectance values of the himawari image to an atmospherically corrected, for example, landsat image? What could you suggest? Thank you in advance.
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: No filenames found for reader ahi_hsd

Post by davidh »

This is interesting timing. I was just chatting with people this morning on the Pytroll slack team about how we should add some LandSat readers to Satpy. This isn't in progress or anything, but it is something we would want to do. If you have any python experience it would be great to see you on the Pytroll slack where we can talk about how you could create a reader for Landsat.

Otherwise, my suggestion would be to use GDAL or rasterio (python library based on gdal) to resample the Landsat data to the same projection as the AHI data. Or the AHI data to the Landsat projection. Geo2Grid (Satpy) does not have a Landsat reader and it's never been requested, so no funding exists for me to work on it any time soon.

Sorry I couldn't be of more help.

Dave
torresrodyvito
Posts: 25
Joined: Wed Apr 03, 2019 10:21 pm

Re: No filenames found for reader ahi_hsd

Post by torresrodyvito »

Follow up to my latest question, how do you think can I check if the reflectance values of my "corrected" image after following your said script of "...modifiers:[sunz_corrected] , rayleigh_corrected]"? The corrected geotiff image produced showed visually interpretable results, however, when I inspected the reflectance values, I'm not sure if the range/values itself are correct. If I may, I can send a csv/ascii file of the reflectance values of band 1 to band 5 for you to check too.

Regarding the python slack, I have basic knowledge about python but I don't think I can contribute that greatly in terms of pure/hard coding/programming.
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: No filenames found for reader ahi_hsd

Post by davidh »

I'd prefer not getting an ACSII file of image data. If you really need me to compare the images I'd prefer the actual geotiff files. However, it is probably most useful to send me the `.log` file that Geo2Grid produces. The thing we want to verify is that the data is being scaled from observed reflectances (0 to ~120%) to image values (0-255) in the same way for Geo2Grid's default band and your "corrected" band. This information should be in the log, but may be cryptic if you aren't used to looking at them.

As for the Pytroll slack, if you are interested in working with satellite data in python in the future it may still be a good/interesting community to get involved in. We welcome anyone who wants to talk about satellite data.
Post Reply