Questions about ArcGis Tools for MODIS AOD and processing in ArcGIS

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
fstring
Posts: 1
Joined: Sun Apr 02, 2023 10:15 pm America/New_York
Answers: 0

Questions about ArcGis Tools for MODIS AOD and processing in ArcGIS

by fstring » Mon Apr 24, 2023 8:10 pm America/New_York

Background: I am attempting to look at several years worth of MODIS AOD, both MCD19A2 and MOD/MYD 04 products. I am trying to use ArcGIS Pro to do the analysis as I would like to average AOD data over specific areas using generated shape files and compare these with other ground based measurements.

Questions:
Are there tools/codes that are for AOD products that can be used in ArcGIS Pro? I have come across the MODIS/VIIRS Python toolbox but it doesn't include the MCD19A2 or MOD04 products. Specifically, the products don't show up as an option in the product box for the MODIS_Decode Quality tool and when I try to run the Apply Scale factor tool I get the attached error.

Additionally, I have come across several different suggestions for how to add hdf data into ArcGIS Pro, but I am confused as I have tried at least two ways with varying results.

- One method I found on the EarthData forum was to use "Make a multidimensional raster layer" > "Copy Raster" tool to export it as a GeoTIFF file.

- The other method used "add multidimensional raster layer", selecting the variables of interest, this will create several layers, due to looking at both the AOD and the AOD_QA layer. If I want to end up with an AOD layer with specific QA codes, do I need to export both layers as a GeoTIFF file and scale them? Or just the AOD_QA data layer (being scaled)?

When I import the file using the method on the GES Disc How to: https://disc.gsfc.nasa.gov/information/howto?title=How-To%20open%20a%20Gridded%20Multidimensional%20Raster%20Dataset%20(NetCDF,%20HDF,%20or%20GRIB)%20in%20ArcGIS%20Pro, I get an image that looks like (I think) it should it's the second attached image and when I try to export it as a TIFF it looks like the third attached image. Do I not need to scale or export as a TIFF?

Relatedly, I watched a video on one of the DAACs training pages that talked about the QA for the datasets being binary encoded and bit packed. So essentially I would take the number from GeoTIFF layer file (in this case 32767), scale it, convert it to binary, and then check the specific bits (from right to left) (indicated in the user manual for the data I'm looking at) to verify that they have the QA codes I am seeking?

I would appreciate any advice you might have.
Attachments
ImportedasMRDexportedasTiff.PNG
ImportedasMRDexportedasTiff.PNG (52.14 KiB) Not viewed yet
ImportedasMRD.PNG
ImportedasMRD.PNG (139.52 KiB) Not viewed yet
errir_ApplyScaleFactor.PNG
errir_ApplyScaleFactor.PNG (35.55 KiB) Not viewed yet
Last edited by fstring on Tue May 09, 2023 1:50 pm America/New_York, edited 1 time in total.

Tags:

LP DAAC - dgolon
User Services
User Services
Posts: 283
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Answers: 0
Has thanked: 15 times
Been thanked: 2 times
Contact:

Re: Questions about ArcGis Tools for MODIS AOD and processing in ArcGIS

by LP DAAC - dgolon » Fri Apr 28, 2023 11:43 am America/New_York

Hi @fstring We have passed your question along to our science team. We will post more when we have an answer. Thanks
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

GES DISC - jimacker
User Services
User Services
Posts: 298
Joined: Mon Sep 30, 2019 1:57 pm America/New_York
Answers: 3
Has thanked: 2 times
Been thanked: 4 times

Re: Questions about ArcGis Tools for MODIS AOD and processing in ArcGIS

by GES DISC - jimacker » Fri May 12, 2023 5:08 pm America/New_York

Hello,

Our GIS team at the GES DISC provided the following guidance for your question.
As you indicated, using the functionality in ArcGIS Pro to Add Data, and "Add Multidimensional Raster Layer", and selecting the variables of interest (AOD and AOD_QA), will create one layer per variable. Next exporting them to GeoTIFF as you mention is likely the best way to get each variable in the most simple analysis-ready format. Optionally, when you use the Export Raster tool to export the layers to GeoTIFFs, if appropriate, you can indicate that your “NoData” value is, for example, zero (or whatever value is most fit for each data layer). You can also leave this parameter blank. I just find it will export better for visualization and analysis if a NoData value is indicated. Otherwise, the entire extent of the grid will be filled with pixels that you may not need.

In terms of “scaling” the AOD and AOD_QA GeoTIFF’s that you export in the previous step, I am not sure what you ultimately need, or if there is a mathematical formula you are using to scale each layer. If there is a formula you wish to use to scale the data, you can use the “Raster Calculator” geoprocessing tool on each of your layers individually, to export to a new, scaled *.tif. Be sure to indicate the “.tif” file extension. Here is Esri documentation on how to use this tool:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/raster-calculator.htm

Additionally on scaling, while reading the documentation for the data source you indicate, the data layer values should already be binary. The readme showed different binary codes for different types of data quality (e.g. clouds = 0011). When scaling, you could also use Raster Calculator to convert whichever values you want to be “good” vs. “bad” to a 1 or 0 raster. We are not sure if that is also a necessary step, or if you can just go based on the values in the layer already.

Once you have each scaled GeoTIFF, you can use the raster calculator again to output a raster with values of 0 and 1 (binary), where 1 indicates your pixels/cells of interest. Also based on your description, I believe this expression for the raster calculator at this step will work for you, or at least hopefully lead you in the right direction: ("Scaled AOD_QA Layer Name" == <desired QA Code as a Number>) & ("Scaled AOD Layer Name" == 32767). This expression basically will give you a value of “1” in the output raster wherever both conditions evaluate to true, and a 0 where they evaluate to False.

Lastly, I am not sure at what step in the process you were intending to use the shapefile. However, would either of these tools be what you’re looking for? To clip the raster to your shapefile’s extent, you can use this tool:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/extract-by-mask.htm

Alternatively, to get an average of your input raster over the polygon areas in your shapefile, you could make use of this tool:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/zonal-statistics.htm

This is the best workflow I can think of based on your description. If anything, I hope it leads you to the right tools. If you still have further questions, please feel free to follow-up, and we will do our best to advise further.

LP DAAC - dgolon
User Services
User Services
Posts: 283
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Answers: 0
Has thanked: 15 times
Been thanked: 2 times
Contact:

Re: Questions about ArcGis Tools for MODIS AOD and processing in ArcGIS

by LP DAAC - dgolon » Thu Jun 08, 2023 9:43 am America/New_York

Hi @fstring
The solution in the GES DISC example does read the MCD19A2 data product into ArcGIS Pro, however, there seems to be a limitation in that ArcGIS Pro only reads in a single orbit layer – from the orbit dimension – rather than making all orbits available. We’ll investigate this more to see if there is a solution for this.

If you’re open to using another GIS, QGIS provides nice support for the MCD19A2s and allows you to toggle between all the orbit layers within the file. From QGIS you’ll add the files as a raster layer by clicking the “Layer” button on the top toolbar, “Add Layer”, and then “Add Raster Layer”.

After choosing the MCD19A2 dataset to bring in you will have the opportunity to choose which layers you want to add. Choose the layer/item you want to read in and click “Add Layers”. Then click “Close” on the Data Source Manger screen.

The layers you selected should now be visible in your QGIS Project. Since there is a 3rd dimension to the layer, i.e. orbit, the data are read in as a multi-band image (note the Band 1, Band 2, and Band 3 in the symbology). To see each orbit on its own right, click on the granule and go to Properties. Select the “Symbology” tab. Under the drop-down box under “Render Type” chose “Singleband pseudocolor” and then select the Color ramp. Click “Apply” and then “Close”. You should now see a single orbit in your map.

We hope this has helped. If you have further questions, please let us know. Thanks! - Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

Post Reply