reading and mapping aerosol data from a modis hdf4 file · • objec5ve: extract aod data from a...

12
Reading and Mapping Aerosol Data From a MODIS HDF4 File NASA ARSET h"p://arset.gsfc.nasa.gov/ For Python help, contact: Jus5n Roberts-Pierel [email protected]

Upload: doannhan

Post on 01-Jun-2019

229 views

Category:

Documents


1 download

TRANSCRIPT

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

Reading and Mapping Aerosol Data From a MODIS HDF4 File

NASAARSETh"p://arset.gsfc.nasa.gov/

ForPythonhelp,contact:

[email protected]

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

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

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

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

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

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

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

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

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

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

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

Python file outputs

Hereisthemapsavedinyourtargetfolderasa.pngfile