<html><head></head><body><div class="yahoo-style-wrap" style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div dir="ltr" data-setdir="false">Dears,<br>I hope you're doing great.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I found "shapefiles_13.ncl" and it seems a very useful script. It helps if I want to distinguish each county with the average. But what about if I just want to plot the maximum point in each county. I mean how I could plot just one point in each county which is the maximum point of that county.</div><div dir="ltr" data-setdir="false"><span>Obviously, I need the following change in "<span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">shapefiles_13.ncl</span></span>"</span></div><div dir="ltr" data-setdir="false"><span><span><pre style="color: rgb(0, 0, 0); white-space: pre-wrap;">data_avg(i) = avg(where(data_mask_1d.eq.1,data_1d,data_1d@_FillValue))</pre></span>to</span></div><div dir="ltr" data-setdir="false"><span><span><pre style="color: rgb(0, 0, 0); white-space: pre-wrap;">data_max(i) = max(where(data_mask_1d.eq.1,data_1d,data_1d@_FillValue))</pre></span><span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">I think with finding the index of the maximum point I could locate that in the plot wit</span></span>h the following line (from <span>minmax_4.ncl</span>):</span></div><div dir="ltr" data-setdir="false"><span><span><pre style="color: rgb(0, 0, 0); white-space: pre-wrap;">gsn_add_polymarker(wks,plot,sst&lon(max_ii@xi),sst&lat(max_ii@yi),mkres)</pre></span><br></span></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">So, how could I find the index of "dax_max(i)". </span></span>It seems the following line could not be helpful for a script like <span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">"</span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">shapefiles_13.ncl"</span></span>:<br></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"> <span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 16px;">max_ii = ind(data_max(i))</pre></span><span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><br></span></span></div><div dir="ltr" data-setdir="false"><span><div><div dir="ltr" data-setdir="false">The summary of my question is that I need some help to find the maximum point in each geometry of a shapefile and I'll be thankful if I hear from you. <span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">Should I give up </span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;">"shapefiles_13.ncl" and try with "<span style="font-family: verdana, sans-serif; font-size: 13.3333px; background-color: rgb(255, 231, 198);">shapefile_mask_data</span>"?</span></span></div><div dir="ltr" data-setdir="false"><br style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;"></div></div></span></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><br></span></span></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif;"><i style=""><font size="2">Sincerely</font></i></span></span></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(0, 0, 0); font-family: "bookman old style", "new york", times, serif;"><i><font size="2">Ehsan Taghizadeh</font></i></span></span></div><div dir="ltr" data-setdir="false"><i><font size="2">Institute of Geophysics, University of Tehran, Iran</font></i></div><div dir="ltr" data-setdir="false"><span><br></span></div></div></body></html>