MATLAB code for processing level 2 MODIS data(MYD04_L2*)

Hi, the MATLAB code for visualizing MODIS data posted here (
http://hdfeos.org/examples/matlab.php) has been very helpful to me. I can
now process the swath data and display it in matlab using 'geoshow' as
illustrated in the provided code. However, this code is incomplete in the
sense that it cannot be used to process multiple granules. For anyone doing
scientific research, we must process all the granules for a particular day,
if not for all days of the year. In such a case, we have to combine the
multiple granules for a particular day so that we have one whole-Earth data
image for that day. We can then do various processing and calculations as
needed. In MATLAB, there is no function available to combine (or mosaic)
the granules or geolocated data. Could you please help me in finding a way
to combine all the data granules for a particular day to get a whole-Earth
data for that day?

Thank you so much for your help.

···

--

............................
Sagar P. Parajuli
Postdoctoral Fellow
Division of Physical Sciences and Engineering
King Abdullah University of Science and Technology (KAUST)
P.O. Box 4700, Bldg. 1, Office # 3203--CU01
Thuwal 23955-6900
Kingdom of Saudi Arabia
Group Web Site: <https://atcm.kaust.edu.sa>
Mobile: +966-50-892-3459
e-mail: sagar.parajuli@kaust.edu.sa

--

------------------------------
This message and its contents, including attachments are intended solely
for the original recipient. If you are not the intended recipient or have
received this message in error, please notify me immediately and delete
this message from your computer system. Any unauthorized use or
distribution is prohibited. Please consider the environment before printing
this email.

Dear Sagar,

You will need something like nagg<https://support.hdfgroup.org/projects/jpss/nagg_index.html> tool that would perform aggregation. You can take a look at the source<https://gamma.hdfgroup.org/ftp/pub/outgoing/NPOESS/source/NAGG/v162/> (it is an HDF5-based tool). The problem with the nagg's approach is that the tool rewrites all data.

Here is what you might consider to minimize the development effort now and to minimize data rewriting in the future when creating aggregation:

1. Convert HDF4-based MODIS data to HDF5 using HDF4 to HDF5 conversion software<https://support.hdfgroup.org/products/hdf5_tools/h4toh5/>.

2. Use Virtual Dataset<https://support.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesVirtualDatasetDocs.html> feature in HDF5 1.10.1 to create the aggregation. You will need to create a VDS with the mapping to granules; see Tutorial<https://support.hdfgroup.org/HDF5/Tutor/vds.html> for quick start with data aggregation.

3. When MATLAB will support HDF5 1.10.* you will be able to analyze and visualize data by working with VDS only. For now you will need to use h5repack<https://support.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Repack> to repack VDS to a dataset with chunk storage or contiguous storage so MATLAB can access the created aggregation.

Please let The HDF Group Helpdesk know if you need more help.

Thank you!

Elena

···

On Dec 19, 2017, at 4:37 AM, Sagar Parajuli <sagar.parajuli@kaust.edu.sa<mailto:sagar.parajuli@kaust.edu.sa>> wrote:

Hi, the MATLAB code for visualizing MODIS data posted here (
http://hdfeos.org/examples/matlab.php) has been very helpful to me. I can now process the swath data and display it in matlab using 'geoshow' as illustrated in the provided code. However, this code is incomplete in the sense that it cannot be used to process multiple granules. For anyone doing scientific research, we must process all the granules for a particular day, if not for all days of the year. In such a case, we have to combine the multiple granules for a particular day so that we have one whole-Earth data image for that day. We can then do various processing and calculations as needed. In MATLAB, there is no function available to combine (or mosaic) the granules or geolocated data. Could you please help me in finding a way to combine all the data granules for a particular day to get a whole-Earth data for that day?

Thank you so much for your help.

--

............................
Sagar P. Parajuli
Postdoctoral Fellow
Division of Physical Sciences and Engineering
King Abdullah University of Science and Technology (KAUST)
P.O. Box 4700, Bldg. 1, Office # 3203--CU01
Thuwal 23955-6900
Kingdom of Saudi Arabia
Group Web Site: <https://atcm.kaust.edu.sa<https://atcm.kaust.edu.sa/>>
Mobile: +966-50-892-3459
e-mail: sagar.parajuli@kaust.edu.sa<mailto:sagar.parajuli@kaust.edu.sa>

________________________________
This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email._______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5