[ncl-talk] gsn_csm_contour_map plot

Dennis Shea shea at ucar.edu
Wed Nov 27 18:46:33 MST 2019


I am not sure but he default algorithm used by NCL to plot random data
[lon, lat, value] uses some form of triangulation. I believe those spurious
'lines' are an artifact of that.

*https://www.ncl.ucar.edu/Document/Graphics/contour_grids.shtml*
<https://www.ncl.ucar.edu/Document/Graphics/contour_grids.shtml>
===

[1] I believe the station data must be interpolated to a grid.
[2] If it was just the USA, you could use a USA shapefile and then use
*gc_inout *
<https://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml>

*gc_inout*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml>
    ARPEGE_BB_Greenland_mask.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/ARPEGE_BB_Greenland_mask.ncl>
    Germany_coastal_counties_DEU_adm.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/Germany_coastal_counties_DEU_adm.ncl>
    Katrina_circle.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/Katrina_circle.ncl>
    Katrina_circle_hist.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/Katrina_circle_hist.ncl>
    mask_9.ncl <https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl> (
masking <https://www.ncl.ucar.edu/Applications/mask.shtml#ex9>)
    shapefile_mask_data_mod.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/shapefile_mask_data_mod.ncl>
    shapefile_utils.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/shapefile_utils.ncl>
    shapefiles_13.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/shapefiles_13.ncl> (
Shapefiles <https://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex13>)
    shapefiles_5.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/shapefiles_5.ncl> (Shapefiles
<https://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex5>)
    shapefiles_9.ncl
<https://www.ncl.ucar.edu/Applications/Scripts/shapefiles_9.ncl> (Shapefiles
<https://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex9>)

Unfortunately, you have stations in the Gulf of Mexico and off the
California coast. Those would be eliminated.
[3] *tripletgrid_Wrap*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/triple2grid.shtml> or
*obj_anal_ic_Wrap*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/obj_anal_ic_Wrap.shtml>
may be your best options.

Raster or Contour ... your choice

Keep in mind the short term precipitation is not smoothly distributed. Even
for a month, it can be highly  'fractal', especially, summer month
precipitation. Hence, 'pretty' may not be achievable.

Attached is a test script which uses *obj_anal_ic_Wrap*. It shows the
distribution using raster and (default) contouring. It is your
responsibility to player with different contour levels and (say)
*rscan *values.
Gray areas had no interpolated values.

Good luck


On Mon, Nov 25, 2019 at 10:29 AM Wensong Weng via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Dear NCL Group,
>
>
>
> I am using the gsn_csm_contour_map function to make a contour plot for the
> precipitation, see the attached. However, there are lots of un-wanted
> ‘noises’ outside of CONUS (no data).  The data is a one dimension array
> with unstructured grids. How can I get rid of those ‘noises’ and only draw
> the contour map over the CONUS.
>
>
>
> Your help is greatly appreciated,
>
>
>
> Wensong Weng
>
> York Univ.
>
> _______________________________________________
> 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/20191127/22c1bff5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wensong_objanal.raster.png
Type: image/png
Size: 160032 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191127/22c1bff5/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wensong_objanal.contour.png
Type: image/png
Size: 171577 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191127/22c1bff5/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wensong.ncl_objanal
Type: application/octet-stream
Size: 4222 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191127/22c1bff5/attachment-0001.obj>


More information about the ncl-talk mailing list