[ncl-talk] How to show P value and Trend on contour fill map?

Adam Phillips asphilli at ucar.edu
Sat Dec 14 07:45:54 MST 2019


Hi Atul,
I had a missing parentheses in my where statements as evidenced by the syntax errors. 
Change this:
mk1 = where(ismissing(b(0,:,:),mk1 at _FillValue,mk1)
to this:
mk1 = where(ismissing(b(0,:,:)),mk1 at _FillValue,mk1)
Adam

> On Dec 14, 2019, at 12:25 AM, Atul Saini <atulsainimail at gmail.com> wrote:
> 
> 
> Hi Dr. Adam,
>                     I followed the way suggested by you but it didn't worked and given the following syntax error. I have attached the script and data file herewith this mail.
> 
> ncl 14> mk1 = where(ismissing(b(0,:,:),mk1 at _FillValue,mk1)
> fatal:syntax error: function ismissing expects 1 arguments, got 3
> fatal:error at line 14
> ncl 15> mk2 = where(ismissing(b(0,:,:),mk2 at _FillValue,mk2)
> fatal:syntax error: function ismissing expects 1 arguments, got 3
> fatal:error at line 15
> 
> Regards,
> 
> 
>                            
> 
> 
>> On Sat, Dec 14, 2019 at 9:41 AM Atul Saini <atulsainimail at gmail.com> wrote:
>> Hi Dr. Adam,
>>                     I followed the way suggested by you but it didn't worked. I have attached the script and data file herewith this mail.
>> 
>> Regards,
>> 
>> 
>>                            
>> 
>> 
>>> On Sat, Dec 14, 2019 at 3:37 AM Adam Phillips <asphilli at ucar.edu> wrote:
>>> Hi Atul,
>>> In general, NCL denotes areas that are missing graphically by coloring them white unless modified by the user. There are no white 
>>> areas on your trend plot, and thus I am guessing that NCL believes that the plotted grid does not have any missing data. Note that in
>>> the trend_manken documentation that missing values are not allowed to be input into the function. If you do have missing data 
>>> (denoted by the _FillValue attribute) within your b array, and the b array grid points are consistently missing in time, 
>>> I would use the where function to wipe out the results from trend_manken over those areas that were missing:
>>> mk=trend_manken(b,opt,0)
>>> copy_VarCoords(aveg,mk)
>>> mk1=mk(0,:,:)
>>> mk2=mk(1,:,:)
>>> mk1 = where(ismissing(b(0,:,:),mk1 at _FillValue,mk1)
>>> mk2 = where(ismissing(b(0,:,:),mk2 at _FillValue,mk2)
>>>  
>>> The above coding assumes b at _FillValue, mk1 at _FillValue, and mk1 at _FillValue are properly set, and that b(0,:,:) is representative of the 
>>> areas that need to be masked. 
>>> 
>>> If that advice does not fix the issue reply to the ncl-talk email list.
>>> Adam
>>> 
>>> 
>>> 
>>>> On Thu, Dec 12, 2019 at 2:47 AM Atul Saini via ncl-talk <ncl-talk at ucar.edu> wrote:
>>>> Hi NCL,
>>>>                I have modified the script and I think I am getting the right plot having modified the script.
>>>>                If, I followed the right method to plot 'probability level' and 'trend value', please tell me why I am getting the value for the region having missing values.
>>>> 
>>>> Regards,
>>>> 
>>>> 
>>>>                            
>>>> 
>>>> 
>>>>> On Thu, Dec 12, 2019 at 2:56 PM Atul Saini <atulsainimail at gmail.com> wrote:
>>>>> Hi NCL,
>>>>>               I wrote the code to make map for P value and second for Trend value. But, I can't understand the process of selecting P value at the time of plot and Trend value. 
>>>>> 
>>>>> Please find the attached data file and script and suggest the way to plot P value and Trend value. 
>>>>> 
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> 
>>>>>                            
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://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
>>> 
> 
> <MK_Test1(2).ncl>
> <WesternAgroClimRegion_MonthlySum_1901_2017Jan.nc>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191214/39d88e42/attachment.html>


More information about the ncl-talk mailing list