<div dir="ltr"><div><div><div>Hi Toni,<br><br></div>Sorry for the delay in response. There are several examples of using shapefiles to mask out data, if that&#39;s what are wanting to do. In particular, look at examples 4, 5, and 21 at:<br><br><a href="http://ncl.ucar.edu/Applications/shapefiles.shtml">http://ncl.ucar.edu/Applications/shapefiles.shtml</a><br><br></div>II think there&#39;s a utility script they make use that you&#39;ll need to download.  Hopefully this gets you at least started -- please post back the list if you have other questions.<br><br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 22, 2017 at 10:10 PM, Klemm, Toni <span dir="ltr">&lt;<a href="mailto:toni@ou.edu" target="_blank">toni@ou.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 style="word-wrap:break-word">
Good evening,
<div><br>
</div>
<div>I am analyzing seasonal climate forecasts skill for the U.S. Great Plains, specifically Texas, Oklahoma, Kansas, and Colorado. So far I’ve been using lat/lon to define my study region. However, this rectangular box includes parts of Mexico and
 the Gulf of Mexico that are outside my study region and which have extreme outliers that distort my results.</div>
<div><br>
</div>
<div>To get more accurate results, I’d like to use a shapefile of my 4 states (<font face="Courier">TX_OK_KS_CO.shp</font>, created in QGIS 2.18 from a U.S. states shapefile) to define my study region. However, I’m not sure how to interpret
 and use the results I’m getting. I used   “<font face="Courier">ncl_convert2nc TX_OK_KS_CO.shp -nc2c</font>“  to create   “<font face="Courier">TX_OK_KS_CO.nc</font>“ .</div>
<div><br>
</div>
<div>“<font face="Courier">printVarSummary</font>(<span style="font-family:Courier">TX_OK_KS_CO.<wbr>nc)</span>” and ”<font face="Courier">PrintMinMax</font>“ of the x-coordinate (longitude) as well as y-coordinate (latitude)
 look like this:</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">Variable: shp</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">Type: file</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">File path:<span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>/home/States_shapefile_data/<wbr>GADM/TX_OK_KS_CO.nc</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">Number of global attributes:<span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>11</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">Number of dimensions:<span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>5</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">Number of variables:<span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>4</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>min=0   max=0</span></div>
</div>
<div><br>
</div>
<div><font face="Courier">ncdump -h TX_OK_KS_CO.nc</font> returns this:</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">netcdf TX_OK_KS_CO {</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">dimensions:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>geometry = 2 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>segments = 2 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>num_features = 4 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>num_segments = 262 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>num_points = 102749 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">variables:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>int geometry(num_features, geometry) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>int segments(num_segments, segments) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>double x(num_points) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>double y(num_points) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201);min-height:16px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">// global attributes:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:segs_numPnts = 1 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:segs_xyzIndex = 0 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:geom_numSegs = 1 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:geom_segIndex = 0 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:geometry_type = &quot;polygon&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:layer_name = &quot;TX_OK_KS_CO&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:creation_date = &quot;Mon May 22 17:20:46 EDT 2017&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:NCL_Version = &quot;6.4.0&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:system = &quot;Linux
<a href="http://ou.edu" target="_blank">ou.edu</a> x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:Conventions = &quot;None&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures"><span class="m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:title = &quot;NCL: convert-OGR-to-netCDF&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span style="font-variant-ligatures:no-common-ligatures">}</span></div>
</div>
<div><br>
</div>
<div>I am not sure how to use this information, or if this is even the information I should be getting, to define the study region when extracting data from my global forecast dataset. I am fairly sure the shapefile is correct. Opening it again in
 QGIS showed the four states with their outlines and filling, and nothing else.</div>
<div><br>
</div>
<div>I appreciate any help!</div>
<div><br>
</div>
<div>Thank you very much,</div>
<div>Toni</div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div><br>
<div>
<div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div><b style="color:rgb(51,51,153);background-color:rgb(255,255,255)">Toni Klemm</b><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">Ph.D. Candidate</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">The University of Oklahoma</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">South Central Climate Science Center</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
</div>
<div><span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">phone: <a href="tel:(405)%20325-1272" value="+14053251272" target="_blank">405 325 1272</a></span></div>
<div><span style="color:rgb(51,51,153);background-color:rgb(255,255,255)"><a href="http://www.toni-klemm.de" target="_blank">www.toni-klemm.de</a></span></div>
<div><a href="https://www.eccforum.org" target="_blank">Early Career Climate Forum</a></div>
<div>Twitter: <a href="https://twitter.com/ToniKlemm" target="_blank">@toniklemm</a></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="m_-6640439190133930147Apple-interchange-newline">
</div>
<br>
</div>
</div>
</font></span></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>