How do I convert VIIRS hdf EDR files to geotiffs?

VIIRS Environmental Data Records

How do I convert VIIRS hdf EDR files to geotiffs?

Postby leonidas » Thu Oct 25, 2018 10:14 am

I have already reproject and convert my VIIRS (DNB SDR) hdf files in to geotiffs.
I also need to convert/reproject the VIIRS Cloud Mask EDR (VICMO) and VIIRS Cloud Cover Layers EDR (VCCLO) files to geotiff format so as to be co-registered with DNB geotiffs and finally conduct with my analysis by R.
How can I achieve that?
Could I use polar2grid or satpy or gdal or any other library supporting that convertion?
leonidas
 
Posts: 10
Joined: Fri Aug 31, 2018 12:17 pm

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby davidh » Mon Oct 29, 2018 11:35 am

Hi,

Neither satpy nor polar2grid have readers for VICMO and VCCLO formats at this time. We are not against adding them to polar2grid. Adding them to satpy will make them easy to add to polar2grid in the future. It shouldn't be too difficult to add the readers to satpy, but I don't have anytime to work on this. If you'd like to try to tackle adding the readers to satpy I would suggest starting with the satpy documentation and PyTroll slack group for help. If this is something you aren't comfortable with then we could add it in the future, but since we have no funding to add this feature I can't say when I'll get to it, if ever. Sorry.

Please let me know if you'd like me to point you to any other resources for adding this reader functionality to satpy/polar2grid or how to use satpy.

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

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby leonidas » Wed Oct 31, 2018 1:48 pm

Dave, thank you!
I checked satpy documentation but is empty...https://satpy.readthedocs.io/en/latest/readers.html#adding-a-reader-to-satpy
Is that the section with satpy readers? https://github.com/pytroll/satpy/tree/master/satpy/readers
I don't know how to start.There is so much technical information, sources and data for VIIRS that I'm confused...
leonidas
 
Posts: 10
Joined: Fri Aug 31, 2018 12:17 pm

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby davidh » Wed Oct 31, 2018 2:36 pm

Please join the pytroll slack so we can discuss this. You can find the link to invite yourself to the slack chat under "Getting in touch" on the PyTroll website: http://pytroll.github.io/

This is not the best website/forum/location to be discussing SatPy-specific issues. We should do so on the SatPy related sites like github.com/pytroll/satpy or the slack team. Slack will allow us to have quick conversations and be able to answer questions more quickly. Thanks.

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

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby zion0210 » Thu Dec 13, 2018 10:22 am

Hi.

I had this issue.
At first, i used hdf2geotiff(H2G) for visualization.
But H2G not support proj4. And this is very slow working.
So, had to modified code of polar2grid.
As a result, been add other products, such as cloud mask, NDVI, EVI, snow mask, land surface temperature, cloud optical thickness, cloud top temperature and other.

If this topic is current, that i may give instruction for modification.

Regards,
zion0210
zion0210
 
Posts: 20
Joined: Thu Mar 27, 2014 4:28 am

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby davidh » Thu Dec 13, 2018 10:27 am

Hi zion0210,

If you've made these modifications to Polar2Grid it would be great if you could contribute them directly to the project by making a pull request on the github repository: https://github.com/ssec/polar2grid

You could also look at adding the functionality to SatPy (https://github.com/pytroll/satpy), but this may require more work on your part. Either way, I'd be happy to help guide you through the process if needed.

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

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby zion0210 » Thu Dec 13, 2018 11:49 am

Hi Dave

Working with git-hub is good idea.

But i need advice for modification two blocks.

Also, I have modifications for other CSPP software.

Regards,
zion0210
zion0210
 
Posts: 20
Joined: Thu Mar 27, 2014 4:28 am

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby kathys » Thu Dec 13, 2018 12:21 pm

Hi Zion0210,

Can you tell us exactly what you mean by "i need advice for modification two blocks? Can you be more specific? Are you talking about two code packages, subroutines, sections of code?

Kathy
kathys
 
Posts: 237
Joined: Tue Jun 22, 2010 4:51 pm

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby zion0210 » Fri Dec 14, 2018 3:14 am

Hi Kathy

I talking about two sections of code P2G.

For visualisation cloud mask nessisary make preprocessing. Namely get 2-3 bits. At result, we turn out 00 01 10 11, but default fornav out fill_value is "0".
So, modification contain next code: if all 8 bits equal "0" then "cloud mask" = "0", else "cloud mask" = "cloud mask" + 1.
Also for NDVI be performed transformation range of value [0,1] to [1,255].
This program block located within
"common/ShellB3/lib/python2.7/site-packages/polar2grid/remap/fornav.py" before calling _fornav.fornav_wrapper().
I guess, this must located other lacation.

The each data array have fill_value, but type data may be int(cloud mask) or float(intensity).
Fornav requires a match betwin the type of input array and input fill_value.
Modification contain transformation of type of fill_value.
I not sure, what this block work right.

Regards,
zion0210
zion0210
 
Posts: 20
Joined: Thu Mar 27, 2014 4:28 am

Re: How do I convert VIIRS hdf EDR files to geotiffs?

Postby davidh » Fri Dec 14, 2018 9:04 am

zion0210,

I think I understand now, but I'd have to see the code to be sure. Please make a pull request on github if possible. If you need any guidance let me know, but googling usually has good results. Here are some good resources to start with (assuming you are already familiar with using git):

1. https://help.github.com/articles/working-with-forks/
2. https://help.github.com/articles/creati ... om-a-fork/

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


Return to VIIRS EDRs

Who is online

Users browsing this forum: No registered users and 0 guests

cron