Geolocation of VNP09 data

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
csd.doyle
Posts: 3
Joined: Wed Nov 02, 2022 10:43 am America/New_York
Answers: 0

Geolocation of VNP09 data

by csd.doyle » Mon Jan 09, 2023 3:55 pm America/New_York

Hello,

I had a question regarding the geolocation of VNP09 VIIRS 375m and 750m surface reflectance data to create GeoTIFFs. I am getting all of the files from the LAADS 5000 archive, using the VNP09 (HDF4) files and the VNP03IMGLL (HDF5) and VNP03MODLL (HDF5) files to get the geolocation arrays for the 375 and 750m bands. I am then using GDAL (the python bindings) to build a VRT from the data and then using gdal.Warp() with geoloc=True to force the use of the geolocation arrays.

While this works, the output image is upside down. I realized that this is happening because despite the geolocation files (VNP03) being HDF5 files, the underlying layers still say NETCDF and so GDAL is using the NETCDF driver to open them, whose default is expecting the data as bottom up. So, if I just copy the VNP03 data to a new .nc file with gdal.Translate and use `WRITE_BOTTOMUP=NO` creation option and then use this new geolocation .nc in my process, then the resulting GeoTIFF is as expected and the bands are correctly geolocated.

This seems like a strange thing to have to do and am wondering if I am missing something in the data or if there is another GDAL option or process for geolocation that I should be following? I am finding almost no resources or examples on using the VNP09 swath data on any forum.

Thanks,
Colin

Tags:

LAADS_UserServices_M
User Services
User Services
Posts: 279
Joined: Mon Sep 30, 2019 8:33 am America/New_York
Answers: 1
Has thanked: 3 times

Re: Geolocation of VNP09 data

by LAADS_UserServices_M » Tue Jan 10, 2023 9:03 am America/New_York

Dear Colin,
We don't have resources to help you with GDAL however you can explore HDF-EOS TOOLS AND INFORMATION CENTER website (http://hdfeos.org/index.php) for information and examples about HDF-EOS and about tools available to view or work with HDF-EOS and other NASA HDF files.
Regards,
LAADS User Services

To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.

csd.doyle
Posts: 3
Joined: Wed Nov 02, 2022 10:43 am America/New_York
Answers: 0

Re: Geolocation of VNP09 data

by csd.doyle » Tue Jan 10, 2023 10:19 am America/New_York

Thanks for the reply. I actually figured out the issue shortly after I posted this. You can change the way GDAL handles NETCDF layers (bottom up or down) by default by setting the GDAL configuration option `GDAL_NETCDF_BOTTOMUP=NO`. This allows GDAL to read in the geolocation arrays correctly and the georeferencing works as expected. This gets back to the issue of the layers still being stored with the NETCDF tag so GDAL uses that driver instead of the HDF one, but changing the configuration option solved it. Thanks.

LAADS_UserServices_M
User Services
User Services
Posts: 279
Joined: Mon Sep 30, 2019 8:33 am America/New_York
Answers: 1
Has thanked: 3 times

Re: Geolocation of VNP09 data

by LAADS_UserServices_M » Wed Jan 11, 2023 8:44 am America/New_York

Good to know that you were able to resolve the issue. A science member mentioned this GDAL utility to change the format of the MCD19 (MODIS) products to a tiff:
https://www.igismap.com/convert-hdf5-to-geotiff/
Regards,
LAADS User Services

To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.

Post Reply