forked from tuyetnam/AOD-Handling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread_and_map_mod_aerosol.txt
31 lines (21 loc) · 1.68 KB
/
read_and_map_mod_aerosol.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
***This module is intended for Python 3. It can be modified for Python 2***
==========================================================================================
Module: read_and_map_mod_aerosol.py
==========================================================================================
Disclaimer: The code is for demonstration purposes only. Users are responsible to check for accuracy and revise to fit their objective.
Author: Justin Roberts-Pierel, 2015
Organization: NASA ARSET
Programming Language: Python
Purpose: To extract AOD data from a MODIS HDF4 file and create a map of the resulting data
Required Python packages: pyHDF, numpy, basemap, matplotlib
==========================================================================================
1. Create a (tab delimited) .txt file containing the names of the files you would like to analyze
(see example 'fileList.txt')
2. In order to use this python script, make sure that the script, any files you plan to analyze, and the list of file names are in the same folder (i.e. Downloads or Desktop).
3. Open the command prompt and navigate to the folder containing the .py, .hdf, and fileList (.txt) files
4. Once in the folder, run the script with the command: python read_and_map_mod_aerosol.py
5. Follow the prompts to execute the script
6. If you choose to save the map created, it will save as a .png file in the same folder as this script and the HDF4 file(s)
==========================================================================================
This script utilizes examples found here: http://hdfeos.org/software/pyhdf.php
This script can be easily modified to accept other SDS or HDF4 files.