<div dir="ltr"><div class="gmail_default" style="font-size:small">The reason you are getting that one plot on top of your panel plot is because you called gsn_panel first, which draws the paneled plots, and then you called:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">   draw (plots)</span><br style="font-size:12.8px"><span style="font-size:12.8px">   frame(wks)</span><br></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">which drew each plot again on top of each other, each in its original large size.  You don't need those two lines, because gsn_panel is already drawing the four plots for you.</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">--Mary</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 1, 2018 at 2:57 AM, Sri Nandini via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>Hello<br><br>I tried with and without <br><span style="font-family:monospace,monospace"><span style="font-size:12.8px">  plots(mm)   = gsn_csm_contour_map_polar(wks,</span><span style="font-size:12.8px"><span style="background-color:rgb(255,255,0)"><wbr>plots(mm)</span>,res)<br>as well as removing the (mm).<br><br>Theres no error:<br><br>However the same plot is being plotted (5 instead of 4).<br><br><br><br><br><br><br></span></span><div><div class="h5"><br>On Jan 31, 2018 10:56:28 PM, Mary Haley wrote:
<br><blockquote class="m_7221884135516511059felamimail-body-blockquote"><div dir="ltr"><div class="gmail_default" style="font-size:small">The error message is telling you what the problem is:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace,monospace"><span style="font-size:12.8px">Argument type mismatch on argument (1) of (gsn_csm_contour_map_polar) can not coerce</span><br style="font-size:12.8px"></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">Argument #1 refers to the second argument in the gsn_csm_contour_map_polar call, because argument count starts at 0.</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">I looked at your </span><span style="font-size:12.8px">gsn_csm_contour_map_polar calls and found this one:</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace,monospace"><span style="font-size:12.8px">  plots(mm)   = gsn_csm_contour_map_polar(wks,</span><span style="font-size:12.8px"><span style="background-color:rgb(255,255,0)"><wbr>plots(mm)</span>,res)</span><br style="font-size:12.8px"></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">You are trying to pass plots(mm) to </span><span style="font-size:12.8px">gsn_csm_contour_map_polar which doesn't make sense. </span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">You have already called gsn_csm_contour_map_polar earlier in your script and put the plots in plots(mm) via these calls:</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace,monospace"><span style="font-size:12.8px"> plots(0)  = gsn_csm_contour_map_polar(wks,</span><span style="font-size:12.8px"><wbr>T1diff,res)</span><br style="font-size:12.8px"><span style="font-size:12.8px"> plots(1)  = gsn_csm_contour_map_polar(wks,</span><span style="font-size:12.8px"><wbr>T2diff,res)</span><br style="font-size:12.8px"><span style="font-size:12.8px"> plots(2)  = gsn_csm_contour_map_polar(wks,</span><span style="font-size:12.8px"><wbr>T3diff,res)</span><span style="font-size:12.8px"><br></span></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace,monospace"><span style="font-size:12.8px"> plots(3)  = gsn_csm_contour_map_polar(wks,</span><span style="font-size:12.8px"><wbr>T4diff,res)</span></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"></span><span style="font-size:12.8px">so I'm not sure why you are trying to call gsn_csm_contour_map_polar again. Try removing or commenting out the offending line and see what happens.</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">; </span><span style="font-family:monospace,monospace;font-size:12.8px">  plots(mm)   = gsn_csm_contour_map_polar(wks,</span><span style="font-family:monospace,monospace;font-size:12.8px"><wbr>plots(mm),res)</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">--Mary</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 31, 2018 at 8:47 AM, Sri Nandini via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="m_7221884135516511059felamimail-body-blockquote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello<br><br>I am trying to plot seasonal (DJF, MAM, JJA, SON) temperature values with thier ttest values (all already calculated and saved in netcdf file).<br><br>I attach my plotting script below:<br>And my error is: <br>Argument type mismatch on argument (1) of (gsn_csm_contour_map_polar) can not coerce<br><br>Would appreciate any advice on why the plot turns out like this, see attached.<br><br>; Reading all seasonal differences and ttest, then overlaying on each plot with the caspian basin shapefile to show the 95% or 99% significance levels<br><br><br>  latS   =  30.                ; N. Hemisphere<br>  latN   =  90. <br><br>ADD_SHAPEFILE_OUTLINES = True<br>  sname = "Caspian_Basin.shp"<br><br>; ==============================<wbr>==============================<wbr>==<br>; Open the files:Read all the seasonal differences and ttest values <br>; ==============================<wbr>==============================<wbr>==<br>f     = addfile ("T2M_BC_DJF_Diff.nc", "r")<br>T1diff    = f->T1diff<br><br>f2 = addfile("T2M_BC_MAM_Diff.nc","<wbr>r")<br>T2diff    = f2->T2diff<br><br>f3 = addfile("T2M_BC_JJA_Diff.nc","<wbr>r")<br>T3diff    = f3->T3diff<br><br>f4 = addfile("T2M_BC_SON_Diff.nc","<wbr>r")<br>T4diff    = f4->T4diff<br><br>;=============================<wbr>==============================<wbr>=======<br>f5 = addfile("T2M_BC_DJF_ttest.nc",<wbr>"r")<br>probt1    = f5->probt1<br><br>f6 = addfile("T2M_BC_MAM_ttest.nc",<wbr>"r")<br>probt2    = f6->probt2<br><br>f7 = addfile("T2M_BC_JJA_ttest.nc",<wbr>"r")<br>probt3    = f7->probt3<br><br>f8 = addfile("T2M_BC_SON_ttest.nc",<wbr>"r")<br>probt4    = f8->probt4<br><br>;=============================<wbr>==============================<wbr>==========Start the graphics<br>  wks = gsn_open_wks("png","T2M_BC_<wbr>seasons_diff_ttest_")<br><br>  res                     = True<br>  res@gsnDraw             = False<br>  res@gsnFrame            = False<br>  res@cnFillPalette       = "BlWhRe"            ; select a color map with white in the <br>  res@gsnPolar            = "NH"<br>  res@mpGridAndLimbOn     = "False"             ; turn off lat/lon lines<br>  res@mpFillOn            = False               ; turn off map fill<br><br>  res@mpMinLatF            = latS               ; zoom in on map<br>  res@mpMaxLatF            = latN<br><br>  res@cnLevelSelectionMode = "ManualLevels"     ; manual set levels<br>  res@cnMinLevelValF       =-3<br>  res@cnMaxLevelValF       = 3<br>  res@cnLevelSpacingF      = 0.5                ; contour levels   <br>  <br>  res@cnFillOn             = True<br>  res@cnLinesOn            = False<br>  res@cnLineLabelsOn       = False<br>  res@cnFillDrawOrder      = "Predraw"          ; fill and lines before map<br>  res@mpDataBaseVersion    = "MediumRes"        ; use GMT coastline<br><br>  res@mpGridAndLimbOn      = False              ; set to true if you want grid lines to show<br>  res@lbLabelBarOn         = False              ; turn off individual label bars<br>  ;res@cnRasterModeOn      = True               ; Raster mode shows grid cells<br>  res@gsnRightString       = ""                 ; Turn off subtitles<br>  res@gsnLeftString        = ""<br><br>;=============================<wbr>=====Create arrays to hold series of plots<br>    plots = new(4,graphic)   <br> <br> plots(0)  = gsn_csm_contour_map_polar(wks,<wbr>T1diff,res)<br><br> plots(1)  = gsn_csm_contour_map_polar(wks,<wbr>T2diff,res)<br><br> plots(2)  = gsn_csm_contour_map_polar(wks,<wbr>T3diff,res)<br><br> plots(3)  = gsn_csm_contour_map_polar(wks,<wbr>T4diff,res)<br>  printVarSummary(plots)<br><br>;=============================<wbr>==============================<wbr>==========<br>;Second plot resources and overlay onto first<br>;=============================<wbr>==============================<wbr>==========<br>  res2 = True                          <wbr>  ; res2 probability plots<br>  res2@gsnDraw             = False       ; Do not draw plot<br>  res2@gsnFrame            = False       ; Do not advance frome<br><br>  res2@cnLevelSelectionMode = "ExplicitLevels"       ; set explicit cnlev<br>  res2@cnLevels   = (/99./)              ; only have 1 contour level<br>  res2@cnInfoLabelOn       = False<br>  res2@cnLinesOn           = False       ; do not draw contour lines<br>  res2@cnLineLabelsOn      = False       ; do not draw contour labels<br>  res2@cnFillScaleF        = 0.6         ; add extra density<br><br>  res2@gsnRightString      = ""          ; Turn off subtitles<br>  res2@gsnLeftString       = ""                            <wbr>     <br>  res@gsnAddCyclic         = True        ; add cyclic point<br><br>;=============================<wbr>==============================<wbr>=============<br>  opt = True                          <wbr>               ; set up parameters for pattern fill<br>  opt@gsnShadeFillType = "pattern"                   ; specify pattern fill<br>  opt@gsnShadeHigh      = 17                         ; stipple pattern<br>  opt@gsnShadeDotSizeF = 1                           ; make dots larger<br><br>;=============================<wbr>=====Create arrays to hold series of ttests or make a loop<br>    plot2 = new(4,graphic)   <br> <br> plot2(0)  = gsn_csm_contour(wks,probt1,<wbr>res2) <br><br> plot2(1)  = gsn_csm_contour(wks,probt2,<wbr>res2) <br><br> plot2(2)  = gsn_csm_contour(wks,probt3,<wbr>res2) <br><br> plot2(3)  = gsn_csm_contour(wks,probt4,<wbr>res2) <br>  printVarSummary(plot2)<br>;=============================<wbr>==============================<wbr>===============cycle through seasons<br>season = (/"DJF","MAM","JJA","SON"/)<br>nof=4<br><br>do mm=0,nof-1<br>  res@gsnCenterString = season(mm)<br><br>  plots(mm)   = gsn_csm_contour_map_polar(wks,<wbr>plots(mm),res)<br>  plot2(mm)   = gsn_contour_shade(plot2(mm),1,<wbr>99., opt)        ; stipple all areas >= 99%  contour    <br>   <br>  overlay (plots (mm), plot2 (mm))<br>end do<br><br>  printVarSummary(plots)<br>  printVarSummary(plot2)<br><br>;=============================<wbr>========<br>;Attach the polylines and shape<br>;=============================<wbr>========<br>   pres             = True<br>   pres@gsLineColor = "black"<br>   pres@gsLineThicknessF = 2.0                ; 2x thickness<br>   shp1 = gsn_add_shapefile_polylines(<wbr>wks,plots,sname,pres) <br>   printVarSummary(shp1)<br><br>;=============================<wbr>=====<br>; panel resources for the 4 plots<br>;=============================<wbr>=====<br>  pres1                     = True             ; modify the panel plot<br>  pres1@gsnPanelLabelBar    = True             ; common label bar<br>  pres1@gsnFrame            = False            ; don't advance frame yet<br>  pres1@lbOrientation       = "Vertical"       ; vertical label bar<br>  pres1@gsnPanelMainString  = "T2m BigCaspian-NoCaspian Seasonal Difference"     <br>  pres1@lbBoxEndCapStyle  = "TriangleBothEnds" ; Added in NCL V6.4.0<br>  pres1@gsnMaximize         = True             ; large format<br><br>   gsn_panel(wks,plots,(/2,2/),<wbr>pres1)<br><br>   draw (plots)<br>   frame(wks)<br><br><br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br><br></blockquote></div><br></div>
</blockquote><br></div></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>