Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a...
Transcript of Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a...
![Page 1: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/1.jpg)
Reading and Mapping Aerosol Data From a MODIS HDF4 File
NASAARSETh"p://arset.gsfc.nasa.gov/
ForPythonhelp,contact:
![Page 2: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/2.jpg)
Mapping AOD Derived PM 2.5 Data
• Objec5ve:ExtractAODdatafromaMODISHDF4file(orseriesoffiles),calculatePM2.5fromthedata,andcreateamapoftheresults• Thispythonscriptwilldothefollowing:
1. ReadatextfilecontainingthenamesoftheHDF4filesyouareanalyzing2. ReadineachMODISAerosolProductL2HDF4file3. Displayinforma5on(average,standarddevia5on,etc.)aboutAODineachfile.By
defaultitwilldisplaythefollowingSDSdependingonresolu5on:• MOD04_L2(10km):AOD_550_Dark_Target_Deep_Blue_Combined• MOD04_3K(3km):Op5cal_Depth_Land_And_Ocean
4. AsksuseriftheywouldliketoprovideaslopeandinterceptforPM2.5calcula5on.Iftheuserdeclines,thendefaultvaluesareused:• Slope:40• Intercept:3
5. AsksuseriftheywouldliketoseeamapofthePM2.5data,opensifdesired.Oncemapisclosed,asksuseriftheywouldliketosavethemap• Ifdesired,savesthemapasa.pngfilewiththesamenameastheHDF4file
6. Movesontothenextfileinyourfilelist,ifapplicable
![Page 3: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/3.jpg)
What you can expect… Thisisthepythoncodefromthepm25_modis.pyfile
ThisistheassociatedREADMEFile,andtheinforma5onrequiredtorunthescript
Thesearetherequiredpackagestorunthisscript
![Page 4: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/4.jpg)
Folder Contents
Thisisthewhattheinsideofyourtargetfolder(whereyousavethedownloadedfiles)shouldlooklike.Thereshouldbe“fileList.txt”containingthelistoffilenamesyouwouldliketoanalyze,anyhdf4filesyouareanalyzing,andthepm25_modis.pyfile
Hereisthecorrectformatforthe“fileList.txt”file.
![Page 5: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/5.jpg)
Accessing your target folder and viewing the contents
Followthesestepstoaccessyourtargetfolderandviewitscontents
Thecommand“cd”changesyourcurrentdirectory
Thecommand“dir”displaysthecontentsofthecurrent
directory
![Page 6: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/6.jpg)
Python file outputs
Executethefileusingthe“python”command.Aberexecu5ngthefile,youwillbeaskedifyouwouldliketoanalyzeeachfileinyourfilelist
![Page 7: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/7.jpg)
Python file outputs
Informa5onaboutthefilewillbeprinted,andyouwillbeaskedifyouwouldliketoprovideaslopeandinterceptforPM2.5calcula5on
![Page 8: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/8.jpg)
Python file outputs
Defaultvaluesarechosenifyouselect“No”,andthenyouareaskedifyouwouldliketoseeamapoftheresul5ngdata
![Page 9: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/9.jpg)
Python file outputs
![Page 10: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/10.jpg)
Python file outputs
Youwillbeaskedifyouwouldliketosavethemap,andthen(ifyourlisthasmorethanonefile)theprogramwillaskyouifyouwouldliketoanalyzethenextfileinyourlist
![Page 11: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/11.jpg)
Python file outputs
![Page 12: Reading and Mapping Aerosol Data From a MODIS HDF4 File · • Objec5ve: Extract AOD data from a MODIS HDF4 file (or series of files), calculate PM 2.5 from the data, and create](https://reader031.fdocuments.us/reader031/viewer/2022021716/5cf2a01388c99330188b6619/html5/thumbnails/12.jpg)
Python file outputs
Hereisthemapsavedinyourtargetfolderasa.pngfile