<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>One solution is to create a maskout file using shape file. Here is a reference webpage: <span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;"></span><a href="http://www.meteothinker.com/examples/meteoinfomap/grads_maskout.html" style="font-size: 10.5pt; line-height: 1.5; background-color: window;">http://www.meteothinker.com/examples/meteoinfomap/grads_maskout.html</a><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"> .</span><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;"> </span></div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"></span>
<div><br></div><div>Regards</div><div>Yaqiang</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">*************************************************</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">Dr. Yaqiang Wang</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">Chinese Academy of Meteorological Sciences (CAMS)</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">46, Zhong-Guan-Cun South Avenue</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">Beijing, 100081</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">China</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"> </span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><a href="mailto:yaqiang.wang@gmail.com" target="_blank" style="font-family: 微软雅黑; font-size: 14px; line-height: 21px;">yaqiang.wang@gmail.com</a><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><a href="http://www.meteothinker.com" target="_blank" style="font-family: 微软雅黑; font-size: 14px; line-height: 21px;">http://www.meteothinker.com</a></div><div style="margin: 10px;"><span style="background-color: rgba(0, 0, 0, 0);"><u><font color="#0000ff"><a href="https://www.researchgate.net/profile/Yaqiang_Wang5">https://www.researchgate.net/profile/Yaqiang_Wang5</a></font></u></span><font face="verdana" size="2"><span style="line-height: 19px;"><br></span></font><span style="font-family: 微软雅黑; font-size: 14px; color: rgb(136, 136, 136); line-height: 21px;">**************************************************</span></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:klevey@customweather.com">Kevin Levey</a></div><div><b>Date:</b> 2018-02-02 03:16</div><div><b>To:</b> <a href="mailto:gradsusr@gradsusr.org">GrADS Users Forum</a></div><div><b>Subject:</b> [gradsusr] Calculating mean/max/min values within the boundaries an imported shapefile.</div></div></div><div><div>THUE 01FEB18: 1115PST</div>
<div> </div>
<div>All,</div>
<div> </div>
<div>I've been a GRADS user for over 20 years and nothing stumps me more than the maskout functions. I really do go through the user groups and see how people have resolved their issues thanks to the many contributing users (and thanks to you all).</div>
<div> </div>
<div>So, here is my problem that I've been at for the last few days.</div>
<div> </div>
<div>I need to calculate the mean of any of my defined variables WITHIN the boundaries of a particular shapefile that I have imported (e.g. like a province in Spain).</div>
<div> </div>
<div>Anyone be willing to offer a few lines of code. Everything I’ve tried does not seem to give me the answer I should be getting.</div>
<div> </div>
<div>Many thanks in advance. </div>
<div> </div>
<div>Regards,</div>
<div> </div>
<div>Kevin M Levey, MSc in Oceans and Atmospheric Sciences (University of Cape Town)</div>
<div>Vice President of Operations</div>
<div>CustomWeather, Inc.</div>
<div>San Francisco, California, USA</div>
<div> </div>
<div>"Taking the World by Storm!"</div>
<div> </div>
<div>http://www.customweather.com</div>
<div>http://www.myforecast.com</div>
<div>http://www.1stweather.com</div>
<div> </div>
<div>cell: 415-794-0411</div>
<div>work: 415-777-3566</div>
<div>email: klevey@customweather.com</div>
<div> </div>
<div> </div>
<div> </div>
<div>_______________________________________________</div>
<div>gradsusr mailing list</div>
<div>gradsusr@gradsusr.org</div>
<div>http://gradsusr.org/mailman/listinfo/gradsusr</div>
</div></blockquote>
</body></html>