[ncl-talk] two miising values

Geeta Geeta geetag54 at yahoo.com
Fri Jun 3 02:04:02 MDT 2016


thanks Mary for your suggestions.. 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???
can u pls suggest.  Geeta. 

    On Friday, 3 June 2016 3:29 AM, Mary Haley <haley at ucar.edu> wrote:
 

 
Geeta,
You will need to approach this with two steps.
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.
Second, whenever your data has multiple missing value values, you can use the "where" function
First, use "-9999" as your standard missing value:
rf at _FillValue = -9999
Now that "-9999" is a recognized missing value, you can then coerce the -88.88 value to missing as well:
  rf = where(rf.eq.-88.88,rf at _FillValue,rf)
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:
  rf = where(rf.lt.0,rf at _FillValue,rf)
Or, if you feel more comfortable about comparing values that are closer to -88.88. then use a roundoff of -88:
  rf = where(rf.lt.-88,rf at _FillValue,rf)
This will then catch anything less than -88 and set it to missing.
http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml

--Mary

On Thu, Jun 2, 2016 at 12:37 PM, Geeta Geeta <geetag54 at yahoo.com> wrote:

I am using TRMM data that has rain rate in vertical up to 20 km from the Radar . the variable "rain" has data type as short Variable: RFType: shortTotal Size: 72496480 bytes            36248240 valuesNumber of Dimensions: 3Dimensions and sizes: [nscan | 9247] x [nray | 49] x [ncell1 | 80]Coordinates: Number Of Attributes: 9  lat2d : <ARRAY of 453103 elements>  lon2d : <ARRAY of 453103 elements>  scale_factor :  100  scale_factor_err :    0  add_offset :    0  add_offset_err :    0  calibrated_nt : 22  units : mm/hr  hdf_name : rain(0)  (0) min=-9999   max=9783
It has two types of missing values -88.88 (referrred to as the ground clutter) and -9999 as the missing value. I have to plot this data . ho w should i put two values as miising?I am getting a plot like this.  Geeta.
_______________________________________________
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/20160603/d99aa1cc/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.png
Type: image/png
Size: 53673 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160603/d99aa1cc/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2a25.090515.65505.7.ncl
Type: application/octet-stream
Size: 2045 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160603/d99aa1cc/attachment.obj 


More information about the ncl-talk mailing list