<div dir="ltr">Dear Adam & dear Dennis,<div><br></div><div>Many thanks for your help. I could plot it.</div><div>Regards,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 6, 2019 at 4:35 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Zoe,</div><div><br></div><div>This is offline. <br></div><div><br></div><div>All MODIS are  *<span style="color:rgb(0,0,255)">HDFEOS</span>*</div><div><br></div><div><b>%></b> <a href="https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml" target="_blank"><b>ncl_filedump</b></a>  MOD08_D3.A2018148.061.2018149091056<b>.hdf </b> |  less<br></div><div><br></div><div>filename:       MOD08_D3.A2018148.061.2018149091056<br>path:   MOD08_D3.A2018148.061.2018149091056.hdf<br>   <b>file global attributes:</b><br>      <span style="color:rgb(0,0,255)">HDFEOSVersion : HDFEOS_V2.17         < ***********************</span><br>      StructMetadata_0 : GROUP=SwathStructure<br>END_GROUP=SwathStructure</div><div>[SNIP]<br></div><div><br></div><div>***MANY*** Group/Objects follow. Then the variables.<br></div><div>-----</div><div><br></div><div>NCL has a very nice feature where if a <b>".he2" </b>is appended<b> </b>to the file name:<br></div><div><br></div><div><b>%></b> <a href="https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml" target="_blank"><b>ncl_filedump</b></a>  MOD08_D3.A2018148.061.2018149091056.hdf.<b>he2 </b> |  less</div><div><br></div><div>[a] This eliminates the Group/Objects text. I am not aware of anybody who uses this.</div><div><br></div><div>[b] A '<b>_mod08'</b> is appended to the variable names. [There is a reason for this but it is rather tedious to explain.]</div><div>Hence, the "Aerosol_Optical_Depth_Land_Mean" variable will be renamed: "Aerosol_Optical_Depth_Land_Mean<b>_mod08"</b> when the "<b>.he2</b>" extention is added.<br></div><div><br> </div><div>[c] Most important, the <b>".he2'</b>, tells NCL to use<b> </b>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:</div><div><br></div><div>      XDim_mod08 = 360<br>      YDim_mod08 = 180<br>   variables:<br>      float <b>YDim_mod08 ( YDim_mod08 )</b><br>         projection :   Geographic<br><b>         long_name :    latitude<br>         units :        degrees_north</b><br>         hdfeos_name :  YDim<br>         projection :   Geographic<br><br>      float <b>XDim_mod08 ( XDim_mod08 )</b><br>         projection :   Geographic<br><b>         long_name :    longitude<br>         units :        degrees_east</b><br>         hdfeos_name :  XDim<br>         projection :   Geographic</div><div>----</div><div><br></div><div>On the file:</div><div><br></div><div>     <b> short</b> Deep_Blue_Aerosol_Optical_Depth_Land_Mean_mod08 ( Deep_Blue_Aerosol_Optical_Depth_Land_Micron_Levels<b>_mod08</b>, YDim_mod08, XDim_mod08 )<br>         hdfeos_name :  Deep_Blue_Aerosol_Optical_Depth_Land_Mean<br>         projection :   Geographic<br>         Aggregation_Data_Set : None<br>         QA_Value_Num_Bits :    2<br>         QA_Value_Start_Bit :   1<br>         QA_Useful_Flag_Bit :   0<br>         QA_Byte :      4<br>         Statistic_Type :       Simple<br>         Quality_Assurance_Data_Set :   Quality_Assurance_Land<br>         Included_Level_2_Nighttime_Data :      False<br>         Derived_From_Level_2_Data_Set :        Deep_Blue_Spectral_Aerosol_Optical_Depth_Land<br>         Level_2_Pixel_Values_Read_As : Real<br>         Masked_With_QA_Usefulness_Flag :       True<br><b>         add_offset :      0<br>         scale_factor : 0.001000000047497451</b><br>         units :        none<br>         long_name :    Deep blue aerosol optical depth at 0.412, 0.47, and 0.66 microns  for land (corrected): Mean<br>         _FillValue :   -9999<br>         valid_range :  ( 0, 5000 </div><div><br></div><div>===</div><div>importing into NCL:</div><div>    <br></div><div>     a = <b>addfile</b>("MOD08_D3.A2018148.061.2018149091056.hdf.<b>he2</b>","r")</div><div><br></div><div>                        ; convert packed [short] value to "float"<br></div><div>     aod_mean = <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml" target="_blank"><b>short2flt</b></a>(a->Deep_Blue_Aerosol_Optical_Depth_Land_Mean_mod08)<br>     <b>printVarSummary</b>(aod_mean)<br>     <b>printMinMax</b>(aod_mean,0)</div><div><br></div><div>Variable: aod_mean<br>Type:<b> float</b><br>Total Size: 777600 bytes<br>            194400 values<br>Number of Dimensions: 3<br>Dimensions and sizes:        [Deep_Blue_Aerosol_Optical_Depth_Land_Micron_Levels_mod08 | 3] x [YDim_mod08 | 180] x [XDim_mod08 | 360]<br>Coordinates: <br>            Deep_Blue_Aerosol_Optical_Depth_Land_Micron_Levels_mod08: [0.412..0.66]<br><b>            YDim_mod08: [89.5..-89.5] <br>            XDim_mod08: [-179.5..179.5]</b><br>Number Of Attributes: 18<br>  hdfeos_name :  Deep_Blue_Aerosol_Optical_Depth_Land_Mean<br>  projection :      Geographic<br>  Aggregation_Data_Set :   None<br>  QA_Value_Num_Bits :    2<br>  QA_Value_Start_Bit :      1<br>  QA_Useful_Flag_Bit :      0<br>  QA_Byte : 4<br>  Statistic_Type :  Simple<br>  Quality_Assurance_Data_Set : Quality_Assurance_Land<br>  Included_Level_2_Nighttime_Data :    False<br>  Derived_From_Level_2_Data_Set :       Deep_Blue_Spectral_Aerosol_Optical_Depth_Land<br>  Level_2_Pixel_Values_Read_As :        Real<br>  Masked_With_QA_Usefulness_Flag :       True<br>  units :        none<br>  long_name :    Deep blue aerosol optical depth at 0.412, 0.47, and 0.66 microns  for land (corrected): Mean<br>  _FillValue_original : -9999<br>  _FillValue :  -9999<br>  valid_range : (  0,  5 )</div><div><br></div><div>On import, the lat/lon coordinates become part of the variable data structure.</div><div><br></div><div>    wks = ....<br></div><div>    res = True</div><div>    ...<br></div><div>    plt = gsn_csm_contour_map(wkx, aod_mean,res)</div><div><br></div><div>Good Luck<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 5, 2019 at 3:54 PM Adam Phillips via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Zoe,</div>You can use getfilevarnames to see a list of variables on the file:<div> a = addfile("MOD08_D3.A2018148.061.2018149091056.hdf","r")</div><div>print(getfilevarnames(a))<br></div><div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/getfilevarnames.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/getfilevarnames.shtml</a></div><div><br></div><div>I do not see Deep_Blue_Aerosol_Optical_Depth_Mean on this file. I do see Deep_Blue_Aerosol_Optical_Depth_Land_Mean though. </div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 5, 2019 at 3:41 PM zoe jacobs via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div>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<font color="#000000">  <a href="https://www.ncl.ucar.edu/Applications/Scripts/ndvi_1.ncl" style="margin:0px;padding:0px;text-decoration-line:none;font-family:verdana,sans-serif;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;font-size:13.3333px;background-color:rgb(244,204,204)" target="_blank">ndvi_1.ncl</a></font><span style="background-color:rgb(244,204,204)"> </span>from <a href="https://www.ncl.ucar.edu/Applications/Scripts/ndvi_1.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/ndvi_1.ncl</a> . My problem is that I cannot find the name of the variable I need, which is ' deep_Blue_Aerosol_optical_deepth_Mean'.</div><div>The file and the name of the variable have been attached. Please, how can I plot AOD, using NCL?</div><div>Regards,</div><div><br></div><div></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1XmKTrqwnV8ug33fSLuXFZtuu5rPuCBPn/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:medium none" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">MOD08_D3.A2018148.061.2018149091056.hdf</span></a><img style="opacity: 0.55; float: right; display: none;"></div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-5670929901172313039gmail-m_-3155206285872816181gmail-m_4167193264589671252gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>