<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Geeta,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You will need to approach this with two steps.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">First, since this data is of type &quot;short&quot; and has scale_factor and add_offset attributes, you should read the data using &quot;short2flt&quot;, which will apply these attributes for you. Afterwards, use &quot;printVarSummary&quot; and &quot;printMinMax&quot; to make sure the data looks okay.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Second, whenever your data has multiple missing value values, you can use the &quot;where&quot; function</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">First, use &quot;-9999&quot; as your standard missing value:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">rf@_FillValue = -9999</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Now that &quot;-9999&quot; is a recognized missing value, you can then coerce the -88.88 value to missing as well:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">  rf = where(rf.eq.-88.88,rf@_FillValue,rf)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Note: it&#39;s not generally a good idea to do a straight comparison of float data with &quot;if(x.eq.12.34)&quot; type of comparisons. If you know that all your data is positive, for example, except for the potential -88.88 value, then a better way to do this is:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">  rf = where(rf.lt.0,rf@_FillValue,rf)</div><div><br></div></div><div class="gmail_default" style="font-size:small">Or, if you feel more comfortable about comparing values that are closer to -88.88. then use a roundoff of -88:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">  rf = where(rf.lt.-88,rf@_FillValue,rf)</div><div><br></div><div>This will then catch anything less than -88 and set it to missing.</div><div><br></div></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml</a><br></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">--Mary</div><div class="gmail_default" style=""><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 12:37 PM, Geeta Geeta <span dir="ltr">&lt;<a href="mailto:geetag54@yahoo.com" target="_blank">geetag54@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:16px"><div>I am using TRMM data that has rain rate in vertical up to 20 km from the Radar . </div><div dir="ltr">the variable &quot;rain&quot; has data type as short </div><div dir="ltr">Variable: RF</div><div dir="ltr">Type: short</div><div dir="ltr">Total Size: 72496480 bytes</div><div dir="ltr">            36248240 values</div><div dir="ltr">Number of Dimensions: 3</div><div dir="ltr">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[nscan | 9247] x [nray | 49] x [ncell1 | 80]</div><div dir="ltr">Coordinates: </div><div dir="ltr">Number Of Attributes: 9</div><div dir="ltr">  lat2d :<span style="white-space:pre-wrap">        </span>&lt;ARRAY of 453103 elements&gt;</div><div dir="ltr">  lon2d :<span style="white-space:pre-wrap">        </span>&lt;ARRAY of 453103 elements&gt;</div><div dir="ltr">  scale_factor :<span style="white-space:pre-wrap">        </span> 100</div><div dir="ltr">  scale_factor_err :<span style="white-space:pre-wrap">        </span>   0</div><div dir="ltr">  add_offset :<span style="white-space:pre-wrap">        </span>   0</div><div dir="ltr">  add_offset_err :<span style="white-space:pre-wrap">        </span>   0</div><div dir="ltr">  calibrated_nt :<span style="white-space:pre-wrap">        </span>22</div><div dir="ltr">  units :<span style="white-space:pre-wrap">        </span>mm/hr</div><div dir="ltr">  hdf_name :<span style="white-space:pre-wrap">        </span>rain</div><div dir="ltr">(0)<span style="white-space:pre-wrap">        </span> </div><div dir="ltr">(0)<span style="white-space:pre-wrap">        </span>min=-9999   max=9783</div><div dir="ltr"><br></div><div dir="ltr">It has two types of missing values -88.88 (referrred to as the ground clutter) and -9999 as the missing value. </div><div dir="ltr">I have to plot this data . ho w should i put two values as miising?</div><div dir="ltr">I am getting a plot like this. </div><span class="HOEnZb"><font color="#888888"><div></div><div> </div><div>Geeta.</div></font></span></div></div><br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>