<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><style type="text/css">.felamimail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style></head><body>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>; ==============================================================<br>; Open the files:Read all the seasonal differences and ttest values <br>; ==============================================================<br>f     = addfile ("T2M_BC_DJF_Diff.nc", "r")<br>T1diff    = f->T1diff<br><br>f2 = addfile("T2M_BC_MAM_Diff.nc","r")<br>T2diff    = f2->T2diff<br><br>f3 = addfile("T2M_BC_JJA_Diff.nc","r")<br>T3diff    = f3->T3diff<br><br>f4 = addfile("T2M_BC_SON_Diff.nc","r")<br>T4diff    = f4->T4diff<br><br>;==================================================================<br>f5 = addfile("T2M_BC_DJF_ttest.nc","r")<br>probt1    = f5->probt1<br><br>f6 = addfile("T2M_BC_MAM_ttest.nc","r")<br>probt2    = f6->probt2<br><br>f7 = addfile("T2M_BC_JJA_ttest.nc","r")<br>probt3    = f7->probt3<br><br>f8 = addfile("T2M_BC_SON_ttest.nc","r")<br>probt4    = f8->probt4<br><br>;=====================================================================Start the graphics<br>  wks = gsn_open_wks("png","T2M_BC_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>;==================================Create arrays to hold series of plots<br>    plots = new(4,graphic)   <br> <br> plots(0)  = gsn_csm_contour_map_polar(wks,T1diff,res)<br><br> plots(1)  = gsn_csm_contour_map_polar(wks,T2diff,res)<br><br> plots(2)  = gsn_csm_contour_map_polar(wks,T3diff,res)<br><br> plots(3)  = gsn_csm_contour_map_polar(wks,T4diff,res)<br>  printVarSummary(plots)<br><br>;=====================================================================<br>;Second plot resources and overlay onto first<br>;=====================================================================<br>  res2 = True                            ; 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       = ""                                 <br>  res@gsnAddCyclic         = True        ; add cyclic point<br><br>;========================================================================<br>  opt = True                                         ; 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>;==================================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,res2) <br><br> plot2(1)  = gsn_csm_contour(wks,probt2,res2) <br><br> plot2(2)  = gsn_csm_contour(wks,probt3,res2) <br><br> plot2(3)  = gsn_csm_contour(wks,probt4,res2) <br>  printVarSummary(plot2)<br>;==========================================================================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,plots(mm),res)<br>  plot2(mm)   = gsn_contour_shade(plot2(mm),1,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>;=====================================<br>;Attach the polylines and shape<br>;=====================================<br>   pres             = True<br>   pres@gsLineColor = "black"<br>   pres@gsLineThicknessF = 2.0                ; 2x thickness<br>   shp1 = gsn_add_shapefile_polylines(wks,plots,sname,pres) <br>   printVarSummary(shp1)<br><br>;==================================<br>; panel resources for the 4 plots<br>;==================================<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/),pres1)<br><br>   draw (plots)<br>   frame(wks)<br><br><br></body></html>