four-panel (2x2) plots of combining SST contours and wind vectors

From: Yi-Chih Huang <dscpln_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 02 2013 - 23:32:17 MDT

Hello,

    I am trying to make four-panel (2x2) plots of combining SST contours
and wind vectors. I already have individual SST contours and wind vectors.
 However, I got the error message about "overlay" as below. I have read
the examples about overlay on NCL web pages. But yet I can't figure out
what the error is about. Do you have any idea about this error message?

    Thanks much,

                 Yi-Chih

#####
yhuang@arc-env:/fs3/yhuang/scripts$ ncl sstWind.ncl
 Copyright (C) 1995-2013 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:syntax error: line 158 in file sstWind.ncl before or near overlay
    plot(nm)= overlay
---------------------^

fatal:Syntax Error in block, block not executed
fatal:error at line 163 in file sstWind.ncl

#####
  wks= gsn_open_wks("X11","sstWind")
  gsn_define_colormap(wks,"BlueRed") ; use the BlueRed colormap
(instead of default colormap)
  plot1= new(4,graphic)
  plot2= new(4,graphic)
  plot = new(4,graphic)

  res = True
  res@gsnAddCyclic = False
  res@mpMinLatF = -30
  res@mpMaxLatF = 30
  res@mpMinLonF = 30
  res@mpMaxLonF = 160
  res@cnFillOn = True
  res@gsnSpreadColors = True ; use full colormap
  res@gsnSpreadColorStart = 10 ; for BlueRed
  res@gsnSpreadColorEnd = 250 ; for BlueRed
  res@cnSpanFillPalette = True
  res@cnLinesOn = False ; turn off the contour
lines

  res@lbLabelBarOn = True
  res@pmLabelBarWidthF= 0.8
  res@lbLabelStride = 4
  res@mpFillOn = False
  res@mpOutlineBoundarySets = "National" ; turns on country
boundaries.
  res@cnFillDrawOrder = "Predraw"

  wres= True
  wres@vcRefMagnitudeF = 10.0 ; define vector ref mag
  wres@vcRefLengthF = 0.045 ; define length of vec
ref
  wres@vcMinDistanceF = 0.025 ; thin out windbarbs
  wres@vcVectorDrawOrder = "Predraw"
  wres@gsnLeftString = "JJA: Average Monthly Wind Vectors on
850 hPa"
  wres@gsnLeftStringFontHeightF = 0.025
  wres@gsnRightStringFontHeightF = 0.025
  wres@gsnDraw = False
  wres@gsnFrame = False

  do nm= 0,mo-1
    plot1(nm)= gsn_csm_contour_map(wks,dt(nm,:,:),res)
    plot2(nm)= gsn_csm_vector(wks,du(nm,:,:),dv(nm,:,:),wres)
    plot(nm)= overlay(plot1(nm),plot2(nm))
  end do

  maximize_output(wks,True)
  gsn_panel(wks,plot,(/2,2/),False)

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Nov 2 23:32:30 2013

This archive was generated by hypermail 2.1.8 : Mon Nov 11 2013 - 09:45:34 MST