[ncl-talk] Radar data plotting, no MAP_PROJ attribute
Alexander Schaefer
aschae11 at uncc.edu
Wed Jul 20 13:44:15 MDT 2016
Ryan,
You might try looking here:
http://www.ncl.ucar.edu/Document/Graphics/overlays_on_map.shtml <http://www.ncl.ucar.edu/Document/Graphics/overlays_on_map.shtml>
Check out point 2 talking about lat2d and lon2d.
It might be as simple a fix as
rd_plane at lat2d = rlat
rd_plane at lon2d = rlon
It should associate lat/lon point wise like you are looking for.
Cheers,
-Alex
> On Jul 20, 2016, at 3:31 PM, Ryan Connelly <rconne01 at gmail.com> wrote:
>
> Hi Mary,
>
> Thanks for getting back to me. Sorry about the delay on my end.
>
> printVarSummary of the rlat (or rlon) array shows
>
> Variable: rlat
> Type: float
> Total Size: 131044 bytes
> 32761 values
> Number of Dimensions: 2
> Dimensions and sizes: [y0 | 181] x [x0 | 181]
> Coordinates:
> y0: [-120..119.94]
> x0: [-120..119.94]
> Number Of Attributes: 3
> _FillValue : 41.94297
> standard_name : latitude
> units : degrees_north
>
>
> and for rd_plane shows
>
>
> Variable: rd_plane
> Type: float
> Total Size: 131044 bytes
> 32761 values
> Number of Dimensions: 2
> Dimensions and sizes: [y0 | 181] x [x0 | 181]
> Coordinates:
> y0: [-120..119.94]
> x0: [-120..119.94]
> Number Of Attributes: 12
> z0 : 2
> time : 1424628563
> grid_mapping : grid_mapping_0
> coordinates : lon0 lat0
> units : dBZ
> long_name : radar_reflectivity
> standard_name : REF
> _FillValue : 9.96921e+36
> valid_max : 25.3757
> valid_min : -9.187451
>
> printMinMax shows:
>
> (0) latitude: min=39.779 max=41.943
> (0) longitude: min=-74.313 max=-71.4156
>
> The values of rlat and rlon are the correct latitude and longitude values, but the trouble seems to be in matching the i,j'th point in rd_plane with the lat,lon contained in the i'th point of rlon and j'th point of rlat, so that the code can plot radar reflectivity in the correct place.
>
> Thanks,
> Ryan
>
> On Sun, Jul 10, 2016 at 11:53 PM, Mary Haley <haley at ucar.edu <mailto:haley at ucar.edu>> wrote:
> Hi Ryan,
>
> You can't use wrf_xxxx functions to plot anything but WRF-ARW data. These functions assume that you are using WRF files with names like "wrfout_d01_2008-09-28_00:00:00" which have a bunch of global attributes in them that define the native map projection of the WRF data. This is why you were getting an error about MAP_PROJ being undefined. This is one of the required global attributes.
>
> If you are trying to plot the data over a map, then you will need to examine your file and your data variable (rd_plane) to determine if it is also on some native map projection, or whether you need to provide lat/lon coordinates for plotting. I then suggest using the gsn_csm_contour or gsn_csm_contour_map functions to generate just contours, or contours over a map.
>
> Please see this page for some examples on how to plot data over a map using NCL:
>
> http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml <http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml>
>
> You might also want to look at this page:
>
> http://www.ncl.ucar.edu/Applications/radar.shtml <http://www.ncl.ucar.edu/Applications/radar.shtml>
>
>
> --Mary
>
>
> On Fri, Jul 8, 2016 at 4:35 PM, Ryan Connelly <rconne01 at gmail.com <mailto:rconne01 at gmail.com>> wrote:
> Hi,
>
> I have Level II radar data in netcdf format (using radx and the steps outlined here: https://publish.illinois.edu/snesbitt/resources/radar-data-processing-with-radx/ <https://publish.illinois.edu/snesbitt/resources/radar-data-processing-with-radx/>).
>
> I want to overlay it on a base map, in the same way I would with WRF data. Here's a highly condensed version of what I have:
>
> rf = addfile(diri+fili,"r")
> rd = rf->REF(:,:,:,:) ; float REF(time, z0, y0, x0) ; RHO, ZDR
>
> rd_plane = rd(0,0,:,:)
>
> contour = gsn_csm_contour(wks,rd_plane,radres)
> plot = wrf_map_overlays(rf,wks,(/contour/),radres,mpres)
>
> I was just assuming the netcdf had location data packaged into it, but I get the error:
>
> (0) wrf_map: Error: no MAP_PROJ attribute in input file
> fatal:overlay: missing value as input, can't continue
>
> I tried adding in a wrf file I had laying around and using it for map plotting, and while that got be a basemap, by radar data was obviously not matched geographically (it showed the KOKX RDA over New York City!).
>
> Thanks,
> Ryan
>
> --
> Ryan Connelly
> M.S. Student in Atmospheric Sciences, Stony Brook University
> B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso University
> rconne01 at gmail.com <mailto:rconne01 at gmail.com>
> ryan.connelly at stonybrook.edu <mailto:ryan.connelly at stonybrook.edu>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
>
>
>
> --
> Ryan Connelly
> M.S. Student in Atmospheric Sciences, Stony Brook University
> B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso University
> rconne01 at gmail.com <mailto:rconne01 at gmail.com>
> ryan.connelly at stonybrook.edu <mailto:ryan.connelly at stonybrook.edu>_______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160720/4bcbf3a7/attachment.html
More information about the ncl-talk
mailing list