<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Denise,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for the clarification. I should have understood from the plot that I created what you were talking about.  :-)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The reason you are seeing the gap is because the shapefile you're using has gaps in those areas.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I wrote a separate script that plots the Bering Sea and Arctic Ocean separately, over a polar stereographic map, and you can see the gap there. The internal function that does the shapefile masking only looks within a shapefile outline to see if a lat/lon point is inside or outside of that polygon, and it doesn't have a way to look outside these slim gaps that are in the shapefile. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We do have a modified version of the shapefile masking routine that allows you to specify a kilometer distance outside of a shapefile in which to include extra points, but I'm afraid this would give you more extra points than what you want. I'm running this one now to see what happens.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The other option is to try to find a shapefile that doesn't have those gaps.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I found a few at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.naturalearthdata.com/downloads/">http://www.naturalearthdata.com/downloads/</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">I had to hunt around the various shapefiles to find some that contain both the Bering Sea and the Arctic Ocean.</div><div class="gmail_default"><br></div><div class="gmail_default">At this site:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="http://www.naturalearthdata.com/downloads/">http://www.naturalearthdata.com/downloads/</a><br></div><div class="gmail_default"><br></div>the 10m and 50m shapefiles (ne_50m_geography_marine_polys.shp and ne_10m_geography_marine_polys.shp)<div class="gmail_default" style="font-size:small;display:inline">​ produced better results for the masking than the world seas one.  I've attached the images, comparing the world seas with the 10m, 50m, and 110m (this last one doesn't have Bering Sea).</div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">The purple outlines are the outlines from the shapefile, and the brownish dots are what the shapefile masking routine kept inside those outlines.</div></div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">--Mary</div></div><div><div class="gmail_default" style="font-size:small;display:inline">​</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 11:10 AM, Denise Worthen - NOAA Affiliate via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi All,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">In my attempt to create a lightweight test case for posting, I made it clear as mud what I am attempting to do. Mary suggested I repost my query with more explanation of what I am trying to accomplish and the problem I am seeing. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I am using NCL's shapefile mask function to create a file containing a single mask for the Arctic Ocean. The mask will have different values for each of the Arctic Ocean's marginal seas. Once I create the mask, I can regrid it using ESMF weights to the tripole grid that the model is on. T<span style="font-size:12.8px">hen I can use the tripole mask to calculate various quantities for the marginal seas of the Arctic from the model. The regridding and statistics are done in F90 routines outside of NCL.</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px">The script make_arcticregs.ncl creates a file with a mask for each Arctic region and a "total" mask which is the sum of all the individual masks. It does a lot of what it does using NCO. There is probably a simpler NCL-way of doing it though. </span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px">The script plot_arcticregions.ncl makes a polar plot of the "total" mask using the file produced by the 'make' script. The attached figure shows the result. There is a missing wedge along 180E and at 90N. The figure shows the case with a reduced number of regions (3) and a second figure shows all 10 regions.</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px">The only problem I have is the missing wedge. I can actually fix it fairly easy outside of NCL but I wasn't sure why the mask creation inside of NCL was resulting in the missing wedge. </span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px">Thanks,</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px">Denise.</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.8px"><br></span></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>