<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Nisha,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">To add to what Adam said, you might need to &quot;unpack&quot; the data before you can plot it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There are two pages you should visit:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/HDF.shtml">http://www.ncl.ucar.edu/Applications/HDF.shtml</a><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml">http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">On the HDF page, use your browser search to search for the word &quot;modis&quot;. You&#39;ll see a few examples that read MODIS files.</div><div class="gmail_default"><br>One of the examples makes use of attributes &quot;Slope&quot; and &quot;Intercept&quot; to properly scale the variable before you plot it. For example:</div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">   f      = addfile (diri+fili, &quot;r&quot;)</font></div><div class="gmail_default"><font face="monospace, monospace">   L3M    = f-&gt;l3m_data                    </font></div><div class="gmail_default"><font face="monospace, monospace">   L3M@_FillValue = integertoshort( -1 )   </font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">   l3m    = new ( dimsizes(L3M), &quot;integer&quot;, -1)</font></div><div class="gmail_default"><font face="monospace, monospace">   l3m    = L3M</font></div><div class="gmail_default"><font face="monospace, monospace">   l3m    = where(l3m.lt.0, (65535+l3m)   , l3m)</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">   X      = (l3m*f@Slope) + f@Intercept</font></div><div class="gmail_default"><br></div></div><div class="gmail_default">Another one uses scale_factor and add_offset:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">;*************************************************************</font></div><div class="gmail_default"><font face="monospace, monospace">; Read in cloud temperature</font></div><div class="gmail_default"><font face="monospace, monospace">;*************************************************************</font></div><div class="gmail_default"><font face="monospace, monospace">  wv1s = f-&gt;Cloud_Top_Temperature</font></div><div class="gmail_default"><font face="monospace, monospace">  wv2s = g-&gt;Cloud_Top_Temperature</font></div><div class="gmail_default"><font face="monospace, monospace">  wv3s = h-&gt;Cloud_Top_Temperature</font></div><div class="gmail_default"><font face="monospace, monospace">  wv4s = j-&gt;Cloud_Top_Temperature</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">; Apply scale and offset and convert to double</font></div><div class="gmail_default"><font face="monospace, monospace">  wv1 =  wv1s@scale_factor*1.d * (wv1s - wv1s@add_offset)</font></div><div class="gmail_default"><font face="monospace, monospace">  wv2 =  wv2s@scale_factor*1.d * (wv2s - wv2s@add_offset)</font></div><div class="gmail_default"><font face="monospace, monospace">  wv3 =  wv3s@scale_factor*1.d * (wv3s - wv3s@add_offset)</font></div><div class="gmail_default"><font face="monospace, monospace">  wv4 =  wv4s@scale_factor*1.d * (wv4s - wv4s@add_offset)</font></div><div class="gmail_default"><br></div></div><div class="gmail_default">In the &quot;plotting data on a map&quot; page, this explains in general terms what might be wrong if you are trying to plot data over a map and nothing is showing up. It mentions &quot;unpacking&quot; as well.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 5, 2017 at 1:32 PM, Adam Phillips <span dir="ltr">&lt;<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nisha,<div>Are you getting any error messages? If not, it would help to see your script. Also, it might be helpful to run the data array that you are plotting through stat_dispersion so that you are aware of what your data (in a general sense) looks like:</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/<wbr>Contributed/stat_dispersion.<wbr>shtml</a><br></div><div>As always, please respond to the ncl-talk email list with any followup correspondance..</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, May 5, 2017 at 12:39 PM, Manisha Ganeshan <span dir="ltr">&lt;<a href="mailto:manisha.ganeshan86@gmail.com" target="_blank">manisha.ganeshan86@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hello, <div><br></div><div>I&#39;m trying to plot cloud fraction by reading from a MODIS hdf file. I am able to view contour plots of lat and lon, but not cloud fraction. I&#39;ve tried converting it from byte to float/double. I only see a blank viewport without any contours. Any suggestions?</div><div><br></div><div>Thanks,</div><div>Nisha<span class="m_3577265496869791176HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_3577265496869791176m_5817656802284992291gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Dr. Manisha Ganeshan<div>Universities Space Research Association</div><div>Maryland, U.S.A.</div></div></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_3577265496869791176gmail_signature" data-smartmail="gmail_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/<wbr>asphilli/</a>   </font></span><span><font color="#888888"><a href="tel:(303)%20497-1726" value="+13034971726" target="_blank">303-497-1726</a> </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>
</font></span></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>