Page 1 of 1

How to load MODIS/Terra+Aqua MAIAC Land Aerosol Optical Depth Daily L2G 1 km SIN Grid (MCD19A2) using Xarray Python

Posted: Mon Jan 30, 2023 5:15 am America/New_York
by kmmrao
Hi,
I am trying to visualize multiple granules of MODIS/Terra+Aqua MAIAC Land Aerosol Optical Depth Daily L2G 1 km SIN Grid (MCD19A2) using Xarray Python. But it is making an error. Is there any tutorial in reading multiple files of MCD19A2 in python using xarray or another library?

Re: How to load MODIS/Terra+Aqua MAIAC Land Aerosol Optical Depth Daily L2G 1 km SIN Grid (MCD19A2) using Xarray Python

Posted: Tue Feb 14, 2023 4:21 pm America/New_York
by LP DAAC - dgolon
Hello, we have passed your question along to our developers and will write back when we have an answer. Thank you.

Re: How to load MODIS/Terra+Aqua MAIAC Land Aerosol Optical Depth Daily L2G 1 km SIN Grid (MCD19A2) using Xarray Python

Posted: Tue Feb 28, 2023 3:55 pm America/New_York
by LP DAAC - lien
Hello
Unfortunately, we do not have a tutorial for working with MCD19A2 data currently. But you can try the code below. make sure you are using the correct group for this dataset. For this dataset "grid1km" and "grid5km" are valid inputs for "group". you can also choose a "variable" if you are only interested in one variable. for example add
"variable = 'Optical_Depth_047'" to the parameters inside the parenthesis. You will be able to visualize the data using "hvplot" library.


xarray.open_mfdataset('*.hdf', engine= 'rasterio', combine= 'nested', group='grid1km')
Thanks,
LPDAAC