[ncl-talk] overlay contour and vector

Mary Haley haley at ucar.edu
Fri Jul 14 08:55:35 MDT 2017


Dear Ying Song,

In the future, it would help if you provide some information about the data
you are trying to plot, by doing a "printVarSummary" on it and including it
in your email:

printVarSummary(aod)
printVarSummary(u)
printVarSummary(v)

This helps us to see what kind of lat/lon grid your data is on, and what
the shape and type are.

Instead of trying to subscript your data for the area of interest, I
suggest plotting all of the data, but then use NCL's map resources to zoom
in on the area of interest. You are already zooming in on the area of
interest with these settings:

  res at mpMinLatF               = 30
  res at mpMaxLatF               = 45
  res at mpMinLonF               = -130
  res at mpMaxLonF               = -110

so I think all you need to change is to create the plots with the full data:

  contour = gsn_csm_contour_map(wks,aod,res)
  vector = gsn_csm_vector(wks,u, v, vcres)
  overlay(contour,vector)

There is one correction you need to make. You have:

  res at gsn_add_cyclic          = False

"gsn_add_cyclic" is not the correct resource. You want:

  res at gsnAddCyclic          = False

You should also set this for your vectors:

vcres at gsnAddCyclic = False

--Mary



On Thu, Jul 13, 2017 at 10:40 PM, Ying Song <ysong4 at slu.edu> wrote:

> Hello, I have a question about overlay plot. I am trying to overlay
> contour and wind vector, the input data is global but I only want to plot
> for west coast of US. I set the contour with map as base and overlay the
> wind vector on it. The plot only shows the map. I tried different way to
> read and plot the specific domain, none of them works. Attachment is my
> script. Please help me take a look. Thank you very much!
>
>
>
> --
> Ying Song, PhD, Post Doctoral Fellow
> Department of Earth and Atmospheric Sciences
> Saint Louis University
>
> ysong4 at slu.edu
>
>
> _______________________________________________
> 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/20170714/cfb58464/attachment.html 


More information about the ncl-talk mailing list