[ncl-talk] Plotting Composite radar data -- how to?

Dennis Shea shea at ucar.edu
Thu Sep 22 14:58:36 MDT 2022


   f  = addfile(..., "r")
   xs = f->mrefl_mosaic
   xs at _FillValue = toshort(f at MissingData)    ; MissingData is not standard
   xf = short2flt( xs )
   delete(xs)
   printVarSummary(cf)
   printMinMax(xf)

As noted by DaveA

; add coordinate info

===

      Latitude : 40

      Longitude : -110

      Height : 500

      LatGridSpacing : 0.01

      LonGridSpacing : 0.01

On Thu, Sep 22, 2022 at 1:54 PM Dave Allured - NOAA Affiliate via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Barry, this file lacks the coordinate variables that are normally provided
> in most published Netcdf data sets.  However, there appears to be almost
> enough information in the global attributes to construct grid coordinates.
> There are reference latitude and longitude, and the X and Y grid spacing.
>
> The reference coordinates are ambiguous.  My guess is they are probably
> grid center coordinates, but not sure.  With odd numbers for both X and Y
> dimensions, that suggests that the center grid point (1000, 1000) is right
> at (40N, 110W).
>
> So just calculate X and Y coordinate vectors centered on the reference
> coordinates, attach them to the data variable, then plot normally.  To
> minimize precision loss, use *ispan* and divide by 100 as the final step,
> because 0.01 step size is not exactly representable in floating point.
>  (Not very important.)  E.g.:
>
>       lats  = lat_center  + (double (ispan (-1000, 1000, 1)) / 100)
>       lons = lon_center + (double (ispan (-1000, 1000, 1)) / 100)
>
>
> On Thu, Sep 22, 2022 at 11:28 AM Barry Lynn via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hello:
>>
>> I am wondering if there is a simple way to plot this radar data
>> correctly on a grid.
>>
>> I can extract the radar data, no problem, but am wondering how to specify
>> the lat/lon of the data.  Can it be obtained from the radar data itself?
>>
>> Thank you.
>>
>> Variable: b
>>
>> Type: file
>>
>> filename: 20120415-080000
>>
>> path: 20120415-080000.netcdf
>>
>>    file global attributes:
>>
>>       TypeName : mrefl_mosaic
>>
>>       DataType : LatLonHeightGrid
>>
>>       Time : 1334476800
>>
>>       FractionalTime :  0
>>
>>       MissingData : -999
>>
>>       RangeFolded : -1000
>>
>>       Latitude : 40
>>
>>       Longitude : -110
>>
>>       Height : 500
>>
>>       LatGridSpacing : 0.01
>>
>>       LonGridSpacing : 0.01
>>
>>       attributes :
>>
>>    dimensions:
>>
>>       Ht = 31
>>
>>       Lat = 2001
>>
>>       Lon = 2001
>>
>>    variables:
>>
>>       short mrefl_mosaic ( Ht, Lat, Lon )
>>
>>          Units : dBZ
>>
>>          Scale : 10
>>
>>
>>       float Height ( Ht )
>>
>>          Units : Meters
>> --
>> Barry H. Lynn, Ph.D
>> Senior Scientist, Lecturer,
>> The Institute of Earth Sciences,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> Weather It Is, LTD
>> Weather and Climate Focus
>> https://weather-it-is.com <http://weather-it-is.com>
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220922/8900ff92/attachment.htm>


More information about the ncl-talk mailing list