<div dir="ltr"><div><div><div>Hi,<br></div>I would like to plot correlation only over Northern US. Could someone help me.? My script plots over ocean part too. So i wan&#39;t to mask ocean. I tried to use mask file with mask function. <br><br></div>Error looks like<br>fatal:mask: dimension sizes  of parameter 0 and parameter 1 do not match<br>fatal:Execute: Error occurred at or near line 95 in file testcorr.ncl<br>  <br></div><div>Help and suggestions are appreciated.<br><br></div><div>Thanks<br></div><div><br><br>t=t(lat|:,lon|:)<br>printVarSummary(t)<br>copy_VarMeta(a,t)<br><br> in = addfile(&quot;<a href="http://lsmask.nc">lsmask.nc</a>&quot;,&quot;r&quot;)<br> msk=in-&gt;mask<br>printVarSummary(in)<br><br>; use mask function to mask out land and then ocean data<br>; ocean=0,land=1,sea_ice=2<br>;************************************************<br>  land_only  = t                               ; trick to keep cv&#39;s and atts<br>  ocean_only = t<br><br>  land_only  = mask(t,msk(0,:,:),1)   ; Return the values of ts where oro=1<br>;  ocean_only = mask(ts,oro,0)   ; Return the values of ts where oro=0<br><br>wks = gsn_open_wks(&quot;ps&quot;,&quot;proj&quot;)          ; open a ncgm file<br>  gsn_define_colormap(wks,&quot;gui_default&quot;)<br><br>;**************************************************<br>  res                       = True<br>  res@gsnFrame              = False               ; don&#39;t advance frame yet<br>  res@mpDataBaseVersion     = &quot;Ncarg4_1&quot;          ; higher res data base<br>  res@vpWidthF              = 0.90                ; change aspect ratio of plot<br>  res@vpHeightF             = 0.90<br>  res@vpXF                  = 0.05<br>  res@vpYF                  = 0.95<br>  res@mpProjection      = &quot;LambertConformal&quot;      ; choose projection<br>  res@mpLambertParallel1F    = 33.0                ; two parallels<br>  res@mpLambertParallel2F    = 45.0<br>  res@mpLambertMeridianF     = -95.0               ; central meridian<br>  res@mpLimitMode            = &quot;LatLon&quot;<br>  res@mpMinLatF              = 24.0                ; map area<br>  res@mpMaxLatF              = 50.0                ; latitudes<br>  res@mpMinLonF              = -125.0              ; and<br>  res@mpMaxLonF              = -65.0<br>  res@mpFillOn              = True                ; turn on map fill<br><br> res@mpLandFillColor       = &quot;Background&quot;        ; set to white<br>  res@mpPerimOn             = False               ; don&#39;t draw box around map<br>  res@mpGridAndLimbOn       = False<br>  res@mpPerimOn         = False             ; turn off box around plot<br><br>  res@cnLinesOn         = False             ; turn off contour lines<br><br>  res@gsnSpreadColors     = True            ; use full range of color map<br>;  res@gsnSpreadColorStart = 2<br>;  res@gsnSpreadColorEnd   = -3<br>;  res@lbLabelFontHeightF  = 0.015           ; label bar font height<br><br>  res@tiMainString       = &quot;Example of Orthographic Projection&quot;   ; add a title<br>;  res@tiMainFontHeightF  = .018                               ; font height<br><br>  plot = gsn_csm_contour_map(wks,t,res)  ; create the plot<br></div>end<br><div><br><br></div></div>