[ncl-talk] AOD from MOD08_D3

zoe jacobs zoejacobs1990 at gmail.com
Sat Sep 7 12:14:03 MDT 2019


Dear Adam & dear Dennis,

Many thanks for your help. I could plot it.
Regards,

On Fri, Sep 6, 2019 at 4:35 AM Dennis Shea <shea at ucar.edu> wrote:

> Hi Zoe,
>
> This is offline.
>
> All MODIS are  *HDFEOS*
>
> *%>* *ncl_filedump*
> <https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>
> MOD08_D3.A2018148.061.2018149091056*.hdf * |  less
>
> filename:       MOD08_D3.A2018148.061.2018149091056
> path:   MOD08_D3.A2018148.061.2018149091056.hdf
>    *file global attributes:*
>       HDFEOSVersion : HDFEOS_V2.17         < ***********************
>       StructMetadata_0 : GROUP=SwathStructure
> END_GROUP=SwathStructure
> [SNIP]
>
> ***MANY*** Group/Objects follow. Then the variables.
> -----
>
> NCL has a very nice feature where if a *".he2" *is appended to the file
> name:
>
> *%>* *ncl_filedump*
> <https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>
> MOD08_D3.A2018148.061.2018149091056.hdf.*he2 * |  less
>
> [a] This eliminates the Group/Objects text. I am not aware of anybody who
> uses this.
>
> [b] A '*_mod08'* is appended to the variable names. [There is a reason
> for this but it is rather tedious to explain.]
> Hence, the "Aerosol_Optical_Depth_Land_Mean" variable will be renamed:
> "Aerosol_Optical_Depth_Land_Mean*_mod08"* when the "*.he2*" extention is
> added.
>
> [c] Most important, the *".he2'*, tells NCL to use HDF-EOS software to
> provide 'value-added' information. For example:  the ".hdf" only extension
> does not have any variables which contain the appropriate lat/lon data
> coordinates. Using the ".he2" extension adds:
>
>       XDim_mod08 = 360
>       YDim_mod08 = 180
>    variables:
>       float *YDim_mod08 ( YDim_mod08 )*
>          projection :   Geographic
>
> *         long_name :    latitude         units :        degrees_north*
>          hdfeos_name :  YDim
>          projection :   Geographic
>
>       float *XDim_mod08 ( XDim_mod08 )*
>          projection :   Geographic
>
> *         long_name :    longitude         units :        degrees_east*
>          hdfeos_name :  XDim
>          projection :   Geographic
> ----
>
> On the file:
>
>      * short* Deep_Blue_Aerosol_Optical_Depth_Land_Mean_mod08 (
> Deep_Blue_Aerosol_Optical_Depth_Land_Micron_Levels*_mod08*, YDim_mod08,
> XDim_mod08 )
>          hdfeos_name :  Deep_Blue_Aerosol_Optical_Depth_Land_Mean
>          projection :   Geographic
>          Aggregation_Data_Set : None
>          QA_Value_Num_Bits :    2
>          QA_Value_Start_Bit :   1
>          QA_Useful_Flag_Bit :   0
>          QA_Byte :      4
>          Statistic_Type :       Simple
>          Quality_Assurance_Data_Set :   Quality_Assurance_Land
>          Included_Level_2_Nighttime_Data :      False
>          Derived_From_Level_2_Data_Set :
>  Deep_Blue_Spectral_Aerosol_Optical_Depth_Land
>          Level_2_Pixel_Values_Read_As : Real
>          Masked_With_QA_Usefulness_Flag :       True
>
> *         add_offset :      0         scale_factor : 0.001000000047497451*
>          units :        none
>          long_name :    Deep blue aerosol optical depth at 0.412, 0.47,
> and 0.66 microns  for land (corrected): Mean
>          _FillValue :   -9999
>          valid_range :  ( 0, 5000
>
> ===
> importing into NCL:
>
>      a = *addfile*("MOD08_D3.A2018148.061.2018149091056.hdf.*he2*","r")
>
>                         ; convert packed [short] value to "float"
>      aod_mean = *short2flt*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml>
> (a->Deep_Blue_Aerosol_Optical_Depth_Land_Mean_mod08)
>      *printVarSummary*(aod_mean)
>      *printMinMax*(aod_mean,0)
>
> Variable: aod_mean
> Type:* float*
> Total Size: 777600 bytes
>             194400 values
> Number of Dimensions: 3
> Dimensions and sizes:
> [Deep_Blue_Aerosol_Optical_Depth_Land_Micron_Levels_mod08 | 3] x
> [YDim_mod08 | 180] x [XDim_mod08 | 360]
> Coordinates:
>             Deep_Blue_Aerosol_Optical_Depth_Land_Micron_Levels_mod08:
> [0.412..0.66]
>
> *            YDim_mod08: [89.5..-89.5]             XDim_mod08:
> [-179.5..179.5]*
> Number Of Attributes: 18
>   hdfeos_name : Deep_Blue_Aerosol_Optical_Depth_Land_Mean
>   projection : Geographic
>   Aggregation_Data_Set : None
>   QA_Value_Num_Bits : 2
>   QA_Value_Start_Bit : 1
>   QA_Useful_Flag_Bit : 0
>   QA_Byte : 4
>   Statistic_Type : Simple
>   Quality_Assurance_Data_Set : Quality_Assurance_Land
>   Included_Level_2_Nighttime_Data : False
>   Derived_From_Level_2_Data_Set :
> Deep_Blue_Spectral_Aerosol_Optical_Depth_Land
>   Level_2_Pixel_Values_Read_As : Real
>   Masked_With_QA_Usefulness_Flag : True
>   units : none
>   long_name : Deep blue aerosol optical depth at 0.412, 0.47, and 0.66
> microns  for land (corrected): Mean
>   _FillValue_original : -9999
>   _FillValue : -9999
>   valid_range : (  0,  5 )
>
> On import, the lat/lon coordinates become part of the variable data
> structure.
>
>     wks = ....
>     res = True
>     ...
>     plt = gsn_csm_contour_map(wkx, aod_mean,res)
>
> Good Luck
>
>
> On Thu, Sep 5, 2019 at 3:54 PM Adam Phillips via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hi Zoe,
>> You can use getfilevarnames to see a list of variables on the file:
>>  a = addfile("MOD08_D3.A2018148.061.2018149091056.hdf","r")
>> print(getfilevarnames(a))
>>
>> http://www.ncl.ucar.edu/Document/Functions/Built-in/getfilevarnames.shtml
>>
>> I do not see Deep_Blue_Aerosol_Optical_Depth_Mean on this file. I do
>> see Deep_Blue_Aerosol_Optical_Depth_Land_Mean though.
>> Adam
>>
>> On Thu, Sep 5, 2019 at 3:41 PM zoe jacobs via ncl-talk <ncl-talk at ucar.edu>
>> wrote:
>>
>>> Hi all,
>>> I need to show AOD (Aerosol Optical Depth) from MODIS, Terra  [
>>> MOD08_D3  ]. Scenic, file I have downloaded is in HDF format, I tried to
>>> use script  ndvi_1.ncl
>>> <https://www.ncl.ucar.edu/Applications/Scripts/ndvi_1.ncl> from
>>> https://www.ncl.ucar.edu/Applications/Scripts/ndvi_1.ncl . My problem
>>> is that I cannot find the name of the variable I need, which is '
>>> deep_Blue_Aerosol_optical_deepth_Mean'.
>>> The file and the name of the variable have been attached. Please, how
>>> can I plot AOD, using NCL?
>>> Regards,
>>>
>>>  MOD08_D3.A2018148.061.2018149091056.hdf
>>> <https://drive.google.com/file/d/1XmKTrqwnV8ug33fSLuXFZtuu5rPuCBPn/view?usp=drive_web>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> --
>> Adam Phillips
>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>
>> <http://www.cgd.ucar.edu/staff/asphilli>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190907/49da3e46/attachment.html>


More information about the ncl-talk mailing list