<div dir="ltr">Hi Zeinab,<div>You can use the gc_inout function to develop a mask, and then apply the mask to your data using a where statement. </div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml<br></a></div><div>There are a number of examples that use gc_inout, including 3 from the Shapefiles applications page:</div><div><a href="http://www.ncl.ucar.edu/Applications/func_list.shtml#gc_inout">http://www.ncl.ucar.edu/Applications/func_list.shtml#gc_inout</a><br></div><div>Hope that helps! If not, or if you have any other questions, please reply to the ncl-talk email list.</div><div>Adam</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 9, 2020 at 11:54 PM Zeinab Salah via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="rtl"><p style="color:rgb(51,51,51);font-family:Verdana,sans-serif;font-size:12px" dir="ltr">Hi,<br>If I have a shapefile for a region, how can I change the values in a netcdf file only inside the boundary of the shapefile, and keep the values outside it without change?</p><p style="color:rgb(51,51,51);font-family:Verdana,sans-serif;font-size:12px" dir="ltr">I used this way: in the region between lat1 and lat2 and lon1 and lon2 where the value <=50, replace it with 0, however I missed some values, therefore I want to change all values inside the region in the shapefile.<br>Could you help me, Please?</p><p style="color:rgb(51,51,51);font-family:Verdana,sans-serif;font-size:12px" dir="ltr">Thank you in advance.</p><p style="color:rgb(51,51,51);font-family:Verdana,sans-serif;font-size:12px" dir="ltr">Best regards,</p><p style="color:rgb(51,51,51);font-family:Verdana,sans-serif;font-size:12px" dir="ltr">Zeinab</p></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>