[ncl-talk] How to change values inside the area of a shapefile?

Zeinab Salah zeinabsalah at gmail.com
Fri Dec 11 09:29:24 MST 2020


Hi Adam,
It was very helpful, the script of mask_9 (first plot) contains what I want
to do exactly, with make MASK_INSIDE = True

Thank you so much.
Best regards,
Zeinab

‫في الخميس، 10 ديسمبر 2020 في 11:01 م تمت كتابة ما يلي بواسطة ‪Adam
Phillips‬‏ <‪asphilli at ucar.edu‬‏>:‬

> Hi Zeinab,
> You can use the gc_inout function to develop a mask, and then apply the
> mask to your data using a where statement.
> http://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml
> There are a number of examples that use gc_inout, including 3 from the
> Shapefiles applications page:
> http://www.ncl.ucar.edu/Applications/func_list.shtml#gc_inout
> Hope that helps! If not, or if you have any other questions, please reply
> to the ncl-talk email list.
> Adam
>
>
>
> On Wed, Dec 9, 2020 at 11:54 PM Zeinab Salah via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi,
>> 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?
>>
>> 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.
>> Could you help me, Please?
>>
>> Thank you in advance.
>>
>> Best regards,
>>
>> Zeinab
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201211/e33183b5/attachment.html>


More information about the ncl-talk mailing list