<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yiv8758150122"><div id="yui_3_16_0_ym19_1_1464938392805_5886"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;" id="yui_3_16_0_ym19_1_1464938392805_5885"><div dir="ltr" id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4124"><span id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4321">thanks Mary for your suggestions.. </span></div><div dir="ltr" id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4124"><span id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4364">I was able to get the plot but I am getting a band like structure in the plot that is middle part is white. Dont know why???</span></div><div dir="ltr" id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4124"><span><br clear="none"></span></div><div dir="ltr" id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4124"><span>can u pls suggest. </span></div><div></div><div id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4365"> </div><div class="yiv8758150122signature" id="yiv8758150122yui_3_16_0_ym19_1_1464938392805_4119">Geeta.</div> <div class="yiv8758150122qtdSeparateBR" id="yui_3_16_0_ym19_1_1464938392805_5899"><br clear="none"><br clear="none"></div><div class="yiv8758150122yqt9696271036" id="yiv8758150122yqt66974"></div></div></div></div><div class=".yiv8758150122yahoo_quoted"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, 3 June 2016 3:29 AM, Mary Haley <haley@ucar.edu> wrote:<br clear="none"></font></div> <br clear="none"><br clear="none"> <div class="yiv8758150122y_msg_container"><div id="yiv8758150122"><div><div dir="ltr"><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">Geeta,</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">You will need to approach this with two steps.</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">First, since this data is of type "short" and has scale_factor and add_offset attributes, you should read the data using "short2flt", which will apply these attributes for you. Afterwards, use "printVarSummary" and "printMinMax" to make sure the data looks okay.</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">Second, whenever your data has multiple missing value values, you can use the "where" function</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">First, use "-9999" as your standard missing value:</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">rf@_FillValue = -9999</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">Now that "-9999" is a recognized missing value, you can then coerce the -88.88 value to missing as well:</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;"> rf = where(rf.eq.-88.88,rf@_FillValue,rf)</div><div class="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;">Note: it's not generally a good idea to do a straight comparison of float data with "if(x.eq.12.34)" 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="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;"><div class="yiv8758150122gmail_default"> rf = where(rf.lt.0,rf@_FillValue,rf)</div><div><br clear="none"></div></div><div class="yiv8758150122gmail_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="yiv8758150122gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv8758150122gmail_default" style="font-size:small;"><div class="yiv8758150122gmail_default"> rf = where(rf.lt.-88,rf@_FillValue,rf)</div><div><br clear="none"></div><div>This will then catch anything less than -88 and set it to missing.</div><div><br clear="none"></div></div><div class="yiv8758150122gmail_default" style=""><a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml</a><br clear="none"></div><div class="yiv8758150122gmail_default" style=""><a rel="nofollow" shape="rect" target="_blank" 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 clear="none"></div><div class="yiv8758150122gmail_default" style=""><br clear="none"></div><div class="yiv8758150122gmail_default" style="">--Mary</div><div class="yiv8758150122gmail_default" style=""><br clear="none"></div></div><div class="yiv8758150122gmail_extra"><br clear="none"><div class="yiv8758150122gmail_quote">On Thu, Jun 2, 2016 at 12:37 PM, Geeta Geeta <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:geetag54@yahoo.com" target="_blank" href="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv8758150122gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv8758150122yqt0452580239" id="yiv8758150122yqt57753"><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 "rain" 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><ARRAY of 453103 elements></div><div dir="ltr"> lon2d :<span style="white-space:pre-wrap;">        </span><ARRAY of 453103 elements></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 clear="none"></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="yiv8758150122HOEnZb"><font color="#888888"></font></span><div></div><div> </div><div>Geeta.</div></div></div></div><br clear="none">_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br clear="none"><br clear="none"></div> </div> </div> </div></div></body></html>