<div dir="ltr"><div><div>Hi,<br><br></div>I have an HDF file that contains volcanic ash column densities in a 900x3712 array. Most of the elements are fill values. In addition, there are two arrays of latitudes and longitudes, both 900x3712. <br><br></div><div>I am trying to use gsn_contour or gsn_csm_contour to plot the ash concentrations over a WRF model domain. Currently, I&#39;m unable to get NCL to reference the ash array with the latitude and longitude arrays. I have posted my script below and can upload the HDF file if needed. <br><br></div><div>Any tips as to why I cannot get NCL to reference the lat and lon arrays correctly would be greatly appreciated. I believe it may have something to do with the sfXArray and sfYArray resources....<br></div><div><br></div><div>Thanks,<br></div><div>Sean<br><br><br></div><div>Script Start<br><br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br><br></div><div>begin<br></div><div><br>a = addfile(&quot;file1.hdf&quot;,&quot;r&quot;)<br>b = addfile(&quot;wrfout_d01_2010-04-16_00:00:00&quot;,&quot;r&quot;)<br>wks=gsn_open_wks(&quot;x11&quot;,&quot;testing&quot;)<br><br>latS = a-&gt;pixel_latitude<br>latN = latS * 0.002746665852839747<br>lonS = a-&gt;pixel_longitude<br>lonN = lonS * 0.005493331705679495<br>ash  = a-&gt;volcld_ret_14_15_16_ash_mass_loading<br><br>lat = b-&gt;XLAT(i0,:,:) ;Not a nested domain<br>lon = b-&gt;XLONG(0,:,:)<br>dims = dimsizes(lat)<br>nlat = dims(0)<br>nlon = dims(1)<br><br>gsn_define_colormap(wks,&quot;WhBlGrYeRe&quot;)<br>res                         = True<br>res@gsnMaximize             = False<br>res@gsnDraw                 = False        ; Turn off for now.<br>res@gsnFrame                = False        ; Will draw later<br>res@tiMainOn                = False<br><br>mpres                              = res<br>mpres@mpProjection                 = &quot;LambertConformal&quot;<br>mpres@mpLimitMode                  = &quot;Corners&quot;<br>mpres@mpLeftCornerLatF             = lat(0,0)<br>mpres@mpLeftCornerLonF             = lon(0,0)<br>mpres@mpRightCornerLatF            = lat(nlat-1,nlon-1)<br>mpres@mpRightCornerLonF            = lon(nlat-1,nlon-1)<br>mpres@mpLambertParallel1F          = b@TRUELAT1<br>mpres@mpLambertParallel2F          = b@TRUELAT2<br>mpres@mpLambertMeridianF           = b@STAND_LON<br>mpres@mpDataBaseVersion            = &quot;MediumRes&quot;<br>mpres@mpOutlineBoundarySets        = &quot;GeophysicalAndUSStates&quot;<br>mpres@mpFillOn                     = False<br>mpres@mpOutlineOn                  = True<br>mpres@mpCountyLineThicknessF       = 2.5<br>mpres@mpGeophysicalLineThicknessF  = 2.5<br>mpres@mpNationalLineThicknessF     = 2.5<br>mpres@mpProvincialLineThicknessF   = 2.5<br>mpres@mpUSStateLineThicknessF      = 2.5<br>mpres@mpCountyLineColor            = &quot;Black&quot;<br>mpres@mpGeophysicalLineColor       = &quot;Black&quot;<br>mpres@mpNationalLineColor          = &quot;Black&quot;<br>mpres@mpUSStateLineColor           = &quot;Black&quot;<br><br>cnres                       = res<br>cnres@tfDoNDCOverlay        = False ; Testing<br>cnres@cnFillOn              = True<br>cnres@lbLabelBarOn          = True<br>cnres@cnLinesOn             = False<br>cnres@lbOrientation         = &quot;Vertical&quot;<br>cnres@sfDataArray           = ash  <br>cnres@sfXArray              = lonN <br>cnres@sfYArray              = latN <br>cnres@sfMissingValueV       = ash@_FillValue<br>cnres@cnLevelSelectionMode  = &quot;ManualLevels&quot;<br>cnres@cnFillMode            = &quot;RasterFill&quot;<br>cnres@cnRasterSmoothingOn   = False<br>cnres@cnFillOpacityF        = 0.75<br>cnres@cnMinLevelValF        = 0.<br>cnres@cnMaxLevelValF        = 2.0<br>cnres@cnLevelSpacingF       = 0.05 <br><br>map         = gsn_csm_map(wks,mpres)<br>ash_contour = gsn_csm_contour(wks,ashNN,cnres)<br><br>overlay(map,ash_contour)<br>draw(map)<br>frame(wks)<br><br></div><div>end<br></div><div><br></div></div>