[ncl-talk] Overlay streamlines on streamlines

Wang, Jiali jialiwang at anl.gov
Tue Dec 15 16:20:45 MST 2015


Dear NCL help,

I am trying to make a plot with one set of streamline overlaid on another set of streamline. But I was not able to figure it out. I can only get the first set of streamline (as attached).

I copy the main part of my code below. Could you please take a look and give advice? Thanks for your time!  -Jiali

=====================
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
  f    = addfile("uv10m_01deg_daily_1995.nc","r")
  u    = f->U10(:,200:300,500:600)
  v    = f->V10(:,200:300,500:600)
  u10  = dim_avg_n(u,0)
  v10  = dim_avg_n(v,0)

  f1   = addfile("uv10m_01deg_daily_2004.nc","r")
  u1   = f1->U10(:,200:300,500:600)
  v1   = f1->V10(:,200:300,500:600)
  u11  = dim_avg_n(u1,0)
  v11  = dim_avg_n(v1,0)

  wks  = gsn_open_wks("ps","stream_1995_2004")     ; open a ps file

  res1  = True                             ; plot mods desired
  res1 at gsnDraw           = False
  res1 at gsnFrame          = False
  res1 at stLineColor       = "orange"       ; changes color

  res2  = True                             ; plot mods desired
  res2 at gsnDraw           = False
  res2 at gsnFrame          = False
  res2 at stLineColor       = "black"

  plot_1 = gsn_csm_streamline(wks,u10,v10,res1)
  plot_2 = gsn_csm_streamline(wks,u11,v11,res2)
  overlay(plot_1,plot_2)
  draw(plot_1)
  frame(wks)
end
====================================

Jiali Wang, Ph. D
Environmental Science Division
Argonne National Laboratory
Tel: 630-252-2848
http://www.evs.anl.gov/about-evs/staff/detail/index.cfm?/Wang/Jiali


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151215/c43e7a54/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream_1995_2004.ps
Type: application/postscript
Size: 870717 bytes
Desc: stream_1995_2004.ps
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151215/c43e7a54/attachment-0001.ps 


More information about the ncl-talk mailing list