<div dir="ltr"><div>It looks like NCL example topo_4 does what you want.  Try carefully changing this example for your region of interest.</div><div><br></div><div>Those thin lines are the "fill value perimeter line" at the -100 meter elevation.  You can experiment with resources that control or modify this feature.  Look at the cnMissingValPerim* resources.  Try res@cnMissingValPerimOn = False.  Also look at your color map and color fill settings.  You might try setting the ocean fill colors to white or light blue, instead of transparent.</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 15, 2023 at 4:21 AM lzl lai via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi <div><br><div>I have a problem for deleting those thin lines (the red arrow pointed area)</div><div>. Could you please help me to remove it? Thanks a lot!</div><div><br></div><div>I use "ETOPO_2022_v1_60s_N90W180_bed.nc"  ,for drawing topography,</div><div>  and "gadm41_TWN_0.shp" , for drawing coastline in Taiwan</div><div><br></div><div>my scrip is below :<br></div><div>========================================</div><div>;---Read data<br>;  topo_file = "../topo/ETOPO_2022_v1_60s_N90W180_geoid.nc"<br>  topo_file = "../topo/ETOPO_2022_v1_60s_N90W180_bed.nc"<br>  f  = addfile(topo_file,"r")<br>  elev  = f->z<br>;<br>; Set all values below -100 to missing, hence removing all<br>; the ocean elevation values. The ocean will be filled in<br>; a light blue (see mpOceanFillColor below).<br>;<br>  elev = where(elev.lt.-100.,elev@_FillValue,elev)<br><br></div><div>;;file --- 2<br>  shpdir = "/home/lzl/data2/lzl/CWBtrend/topo/TW/"<br>  filename ="gadm41_TWN_0.shp"<br></div><div><br></div><div>  wks = gsn_open_wks("pdf","./pic/TW_topo")           ; send graphics to PNG file<br>  gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")<br></div><div><br>  res                    = True<br>  res@gsnMaximize        = True     ; maximize plot in frame<br><br>  res@cnFillOn           = True     ; turn on contour fill<br>;  res@cnFillPalette      = cmap(2:,:) ; set color map<br>  res@cnLinesOn          = False    ; turn off contour lines<br>  res@cnLineLabelsOn     = False    ; turn off line labels<br>  res@cnInfoLabelOn      = False    ; turn off info label<br>  res@lbBoxLinesOn       = False    ; turn off labelbar box lines<br><br>  res@cnFillMode         = "MeshFill"   ; for faster draw<br><br>;---Pick "nice" contour levels<br>;  mnmxint = nice_mnmxintvl( min(elev), max(elev), 18, False)<br>  mnmxint = nice_mnmxintvl( min(elev), max(elev), 5, False)<br><br> printVarSummary(mnmxint)<br> print(mnmxint(1))<br> print(mnmxint(2))<br>  res@cnLevelSelectionMode = "ManualLevels"<br>  res@cnMinLevelValF       = 100.<br>  res@cnMaxLevelValF       = mnmxint(1)<br>  res@cnLevelSpacingF      = mnmxint(2)/20.   ; Increase the number of levels<br>                                             ; by choosing a smaller spacing.<br>                                             ;higher number mean higher resol<br></div><div><br></div><div>  res@gsnAddCyclic         = False           ; don't add longitude cyclic point<br><br>;---Zoom in on map<br>  res@mpLimitMode           = "LatLon"<br>  res@mpMinLatF            = 21.5<br>  res@mpMaxLatF            = 25.5<br>  res@mpMinLonF            = 119.5<br>  res@mpMaxLonF            = 122.5<br>;  res@mpCenterLonF         = (res@mpMinLonF + res@mpMaxLonF) / 2.<br><br>  res@mpFillOn             = True<br></div><div><br></div><div>  res@mpInlandWaterFillColor="Background"<br>  res@mpOceanFillColor     = "transparent"<br>  res@mpLandFillColor      = "transparent"<br><br>  res@mpFillDrawOrder      = "PostDraw"<br></div><div>  res@mpDataBaseVersion = "MediumRes"<br>  res@mpOutlineOn           = False<br>  res@pmTickMarkDisplayMode       = "Always"<br>  res@mpGeophysicalLineThicknessF = 2<br>  plot = gsn_csm_contour_map(wks,elev,res)<br><br></div><div>  nres                  = True<br>  lnres@gsLineColor = "black"<br>  lnres@gsLineThicknessF = 3.0<br>  dum  = gsn_add_shapefile_polylines(wks,plot,shpdir+filename,lnres)<br></div><div><br></div><div>  draw(plot)   ; This will draw the map and the shapefile outlines.<br>  frame(wks)<br></div></div></div>
</blockquote></div></div>