Some questions about Polar2Grid

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

Re: Some questions about Polar2Grid

Post by davidh »

Dmitry,

It looks like you have a lot of bad scanlines in your files. Either the navigation or the band data or both have unexpected values in them. Polar2Grid will try to ignore these bad values and continue processing, but if a lot of the input swath is invalid then Polar2Grid will assume it's not worth it to process the data. Normally you would be able to adjust this with the `--swath-usage` and `--grid-coverage` flags (use `--help` for more information). However, since you are using nearest neighbor resampling the grid coverage option is not available. In most of your logs files it looks like none of the "good" data fit in the grid you were remapping to.

Dave
Dmitry
Posts: 34
Joined: Mon Feb 29, 2016 3:56 am

Re: Some questions about Polar2Grid

Post by Dmitry »

Dave,

Unfortunatelly we use such data, that is our real life and we are forced to work with that data too. I have seen that data could be processed using the EWA method, but as I understand, this algorithm makes an intensive conversion of the initial brightness values of the pixels, and that is not good for my purposes, the Nearest method is more generous in this case.

I don't how to proceed further. May be it's possible to adjust EWA without brightness interpolation?

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

Re: Some questions about Polar2Grid

Post by davidh »

Hi Dmitry,

What I meant to say is that when the log says "ValueError: zero-size array to reduction ..." this means that there was no valid data with in the grid you are remapping to. At least that is my guess. I will look closer at your files to see if I can figure out what is going on. One thing you could try is using the "-g wgs84_fit" grid which will stretch around the data. This way you could at least see if *any* of the data was good and it isn't some other bug in Polar2Grid.

I'll try to look at this later today if I find the time.

Dave
Dmitry
Posts: 34
Joined: Mon Feb 29, 2016 3:56 am

Re: Some questions about Polar2Grid

Post by Dmitry »

Dave,

Could you look deeper (with more detail) to my data?

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

Re: Some questions about Polar2Grid

Post by davidh »

Hi Dmitry,

Yes, that was my plan on Friday, but a lot of my projects have been taking all of my time. I will try to look at this as soon as I have the time. Thanks for your patience.

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

Re: Some questions about Polar2Grid

Post by davidh »

Hi Dmitry,

I think I figured out what is going on. The short solution is to use the `--no-share-mask` command line flag.

The reason this is broken is due to an attempt to make nearest neighbor resampling faster. The data masks are combined by default so one "KDTree" can be used for resampling across all bands. I think what was happening is that band 3a and band 3b data masks were being combined, but they are mutually exclusive (where 3a is invalid, 3b is valid, and vice versa) which results in a completely filled mask. The flag mentioned above should fix this for you, but processing may take longer. In the future Polar2Grid will be using the nearest neighbor resampling used by the pytroll (pyresample package) which should be faster.

Dave
Dmitry
Posts: 34
Joined: Mon Feb 29, 2016 3:56 am

Re: Some questions about Polar2Grid

Post by Dmitry »

Hi Dave,

Ok. Thanks for your support.

Dmitry
dgorski
Posts: 3
Joined: Tue Jul 19, 2016 7:30 am

Re: Some questions about Polar2Grid

Post by dgorski »

Dear Dave,

I have a couple of question once again.
I am studying the possibility of processing Terra (Modis) data mainly using the imapp software.
For this purpose imapp uses the polar2grid functionality. You surely know on it.

My questions are:
1. May I get the images converted to a carthographic projection with an overlayed geographic grid, country borders and other layers using polar2grid and VIIRS NPP, AVHRR Noaa, and Metop data as this is done in imapp?

2. While working with imapp I get a series of products in hdf format, NDVI {250, 500, 1000}m products are of high interest for me . May I convert them into a carthographic projection using polar2grid?

Best regards,
Dmitry
Attachments
t1.16195.0948.truecolor.jpg
t1.16195.0948.truecolor.jpg (1.51 MiB) Viewed 116156 times
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: Some questions about Polar2Grid

Post by davidh »

1. Sorry, no this is not possible in Polar2Grid right now. Although this is planned to be added in the near future.

2. Yes I think this should be possible. As long as you can specify the projection in PROJ.4 you should be able to create your own grid.

Dave

P.S. Did you make a new account on the forums?
Dmitry
Posts: 34
Joined: Mon Feb 29, 2016 3:56 am

Re: Some questions about Polar2Grid

Post by Dmitry »

Hi Dave,

Thanks a lot for your answer.
1. I would be very thankful, if you could say me a tentative date for the new to program release. I need to know in order to plan my internal working procedures.
For a non public answer you can use my e-mail: dhorski@gmail.com

2. I tried to convert the data, but I could not get any results

./modis2gtiff.sh -g wgs84_fit_250 -f $HOME/Modis/t1.16201.0912.ndvi.250m.hdf
INFO : Initializing swath extractor...
ERROR : No useable files loaded
ERROR : modis frontend failed to load and sort data files (see log for details)

I hosted some data examples at:
https://drive.google.com/open?id=0B-QeK ... GNWSWpqcW8

Dmitry

P.S. I had problems with my account, but it seems to be that all is OK now.
Post Reply