<div dir="ltr"><div><div>Maybe ?<br><br><a href="http://www.ncl.ucar.edu/Applications/mask.shtml">http://www.ncl.ucar.edu/Applications/mask.shtml</a><br></div>Example 5<br><br></div>NCL is distributed with a 5-category 1x1 l(land/sea/lake/island/..) mask file. See:<br><br>   <a href="http://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml">http://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml</a><br>   <br><div>    f        = addfile(....)<br></div><div>    var    = f-&gt;FOO<br></div><div>                               ; if rectilinear <br></div><div>     LAT   = f-&gt;lat      ; or,  var&amp;lat<br>    LON  = f-&gt;lon     ;       var&amp;lon<br><br></div><div>                              ; if curvilinear<br></div><div>     LAT  = f-&gt;lat2d<br></div><div>     LON = f-&gt;lon2d                         <br>                                          ; open 1x1 land sea mask file<br>     b   = addfile(&quot;$NCARG_ROOT/lib/ncarg/data/cdf/<a href="http://landsea.nc">landsea.nc</a>&quot;,&quot;r&quot;)<br></div><div><pre>  lsm = landsea_mask(b-&gt;LSMASK, LAT, LON) ; import land sea mask<br>                                          ; return mask array<br><br>  var_land = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml"><strong>mask</strong></a>(var,lsm.eq.1,False)<br></pre><pre>  printVarSummary(lar_land)<br></pre><pre>  copy_VarMeta(var,var_land)<br></pre><pre>  var_13   = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml"><strong>mask</strong></a>(var,lsm.eq.1 .or. lsm.eq.3,False) <br>   <br>  copy_VarMeta(var,var_13)   <br><br>----<br></pre><pre>If 1x1 is too crude, I have attached a much higher resolution 2-category land/sea mask<br></pre><pre><br>netcdf CERES.HiResLandSeaMask {<br>dimensions:<br>        lat = 1080 ;<br>        lon = 2160 ;<br>variables:<br>        byte LandSea(lat, lon) ;<br>                LandSea:info = &quot;Land=1, Sea=0&quot; ;<br>                LandSea:long_name = &quot;CERES: Land-Sea Mask&quot; ;<br>                LandSea:units = &quot;&quot; ;<br>        float lat(lat) ;<br>                lat:long_name = &quot;latitude&quot; ;<br>                lat:units = &quot;degrees_north&quot; ;<br>        float lon(lon) ;<br>                lon:long_name = &quot;longitude&quot; ;<br>                lon:units = &quot;degrees_east&quot; ;<br> </pre>I have other land/sea mask files also.<br><br></div><div>Good luck<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 10:13 AM, Clapp, Corey Elstein <span dir="ltr">&lt;<a href="mailto:cclapp@fas.harvard.edu" target="_blank">cclapp@fas.harvard.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>

<div style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Rick,</p>
<p><br>
</p>
<p>Thanks for your response, I hope my question isn&#39;t redundant with the available documentation. The examples provided that use the built-in map database seem to be doing so with map resources and so the masking is only occurring with what is drawn on a plot.</p>
<p><br>
</p>
<p>I was looking to use the built-in map databases to mask a dataset before plotting. In other words using a built-in database as the marray for the mask function, or using a built-in database as the shapefile in shapefile_mask_data function.</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Corey</p>
</div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt;<br>
<b>Sent:</b> Monday, October 10, 2016 11:46:16 AM<br>
<b>To:</b> Clapp, Corey Elstein<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] Masking Data with NCL Map Databases</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
There are a number of examples of masking with the built-in map database at:<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__ncl.ucar.edu_Applications_mask.shtml&amp;d=CwMFaQ&amp;c=WO-RGvefibhHBZq3fL85hQ&amp;r=c6V7gIN5OFgXqiVE70-k0s95A9XeCqpkaHUsidujhr8&amp;m=Pshm_NtyJvZSnkbXxEGYKsKCfWczqp7N8Umqr70LaPk&amp;s=1C6yjCHcUe4PRJ9h64Y6oI385xebNOLX1bG3hAmwtUo&amp;e=" target="_blank">http://ncl.ucar.edu/<wbr>Applications/mask.shtml</a><br>
<br>
</div>
Do you need to do something more specific?<br>
<br>
</div>
HTH...<br>
</div>
Rick<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Oct 7, 2016 at 3:33 PM, Clapp, Corey Elstein <span dir="ltr">
&lt;<a href="mailto:cclapp@fas.harvard.edu" target="_blank">cclapp@fas.harvard.edu</a>&gt;</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 style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Hi,</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">I was wondering if it were possible to mask data using the areas of the NCL map databases (Earth 1-4) instead of using a shapefile. </p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Thanks,</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Corey</p>
<br>
<p></p>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&amp;d=CwMFaQ&amp;c=WO-RGvefibhHBZq3fL85hQ&amp;r=c6V7gIN5OFgXqiVE70-k0s95A9XeCqpkaHUsidujhr8&amp;m=Pshm_NtyJvZSnkbXxEGYKsKCfWczqp7N8Umqr70LaPk&amp;s=w3Ci8GW2uAFvT46JQfW_cP7L6W-P3-88G9kNwF6oJS4&amp;e=" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></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>