[ncl-talk] The result of the conditional expression yields a missing value (mjoclivar_15)

Dennis Shea shea at ucar.edu
Mon Dec 30 20:53:41 MST 2019


There has been another thread on ncl-talk regarding mjoclivar_{2,14,15}.
*You* should read that thread. The answer to your question is in that
thread.

The period you want *MUST* have at least 100 extra days* before and after*
the the specified .
The MJO Diagnostics specify using a Lanczos filter of length 201 days.
The first and last 100 (=201/2) filtered values will be missing.


;************************************************
; create BandPass Filter
;************************************************
  ihp      = 2                             ; bpf=>band pass filter
  nWgt     = 201
  sigma    = 1.0                           ; Lanczos sigma
  fca      = 1./100.
  fcb      = 1./20.
  wgt      = *filwgts_lanczos*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/filwgts_lanczos.shtml>
(nWgt, ihp, fca, fcb, sigma )


On Mon, Dec 30, 2019 at 8:33 PM reza tisa via ncl-talk <ncl-talk at ucar.edu>
wrote:

> This is what i got before line 110, i got 100 missing data on pc1 and pc2
> (day 265-365)
> any advice for this?
>
> *PrintVarSummary(pc1) & printVarSummary(pc2) :*
> Variable: pc1
> Type: float
> Total Size: 1460 bytes
>             365 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 365]
> Coordinates:
>             time: [1910952..1919688]
> Number Of Attributes: 5
>   matrix : covariance
>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>   long_name : PC1
>   info : PC1/stddev(PC1)
>   _FillValue : 32766
>
> Variable: pc2
> Type: float
> Total Size: 1460 bytes
>             365 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 365]
> Coordinates:
>             time: [1910952..1919688]
> Number Of Attributes: 5
>   matrix : covariance
>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>   long_name : PC2
>   info : PC2/stddev(PC2)
>   _FillValue : 32766
>
>
>
> *print(pc1) & print(pc2):*
>
> Variable: pc1
> Type: float
> Total Size: 1460 bytes
>             365 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 365]
> Coordinates:
>             time: [1910952..1919688]
> Number Of Attributes: 5
>   matrix : covariance
>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>   long_name : PC1
>   info : PC1/stddev(PC1)
>   _FillValue : 32766
> (0) 0.6806232
> (1) 0.8251321
> (2) 0.9573668
> (3) 1.082248
> (4) 1.204796
> ........................
> (263) -0.2053133
> (264) -0.3058788
>
>
> *(265) 32766(266) 32766*
>
> *................ (same 32766 fillValue)*
> *................*
>
>
> *(363) 32766(364) 32766*
>
> Variable: pc2
> Type: float
> Total Size: 1460 bytes
>             365 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 365]
> Coordinates:
>             time: [1910952..1919688]
> Number Of Attributes: 5
>   matrix : covariance
>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>   long_name : PC2
>   info : PC2/stddev(PC2)
>   _FillValue : 32766
> (0) -2.171702
> (1) -2.205069
> (2) -2.23731
> (3) -2.264152
> (4) -2.279648
> ..................
> ..................
> (261) 0.4560925
> (262) 0.4993998
> (263) 0.5322841
> (264) 0.5507534
>
>
> *(265) 32766(266) 32766......................*
>
> *...................... (same 32766 fillValue)*
>
> *(363) 32766(364) 32766*
>
> *printMinMax :*
> ncl 125>     printMinMax(pc1) ;Show the min and max values of a whole array
> *result :*
> fatal:syntax error: procedure printMinMax expects 2 arguments, got 1
> fatal:error at line 125
> ncl 126> printMinMax(pc2) ;Show the min and max values of a whole array
> fatal:syntax error: procedure printMinMax expects 2 arguments, got 1
> fatal:error at line 126
>
> *print ("Missing value count = " + num (ismissing (X)) :*
> ncl 323>     print ("Missing value count = " + num (ismissing (pc1))
> *result*
> (0) Missing value count = 100
>
> ncl 323>     print ("Missing value count = " + num (ismissing (pc2))
> *result*
> (0) Missing value count = 100
>
>
> Pada tanggal Sel, 31 Des 2019 pukul 07.34 Dave Allured - NOAA Affiliate <
> dave.allured at noaa.gov> menulis:
>
>> This error is not immediately obvious.  In general, when you get a
>> mysterious error from an NCL statement, you should manually check each one
>> of the inputs, immediately before the statement is executed.  The following
>> debugging statements are most useful for this:
>>
>>     print -- Show all dimensions, attributes, and data values of the
>> named variable or immediate expression
>>     printVarSummary -- Show all dimensions and attributes, but not the
>> data values
>>     printMinMax -- Show the min and max values of a whole array
>>     print ("Missing value count = " + num (ismissing (X))) -- Show the
>> number of missing values of X
>>
>> Please use these methods to check all of the individual inputs to line
>> 110, and make sure everything looks reasonable.  Note that this line draws
>> one of the line segments on your expected plot, so it needs two valid
>> coordinate pairs for input.  If you still need to report back to the
>> mailing list, please report only things that you find invalid or
>> mysterious.  Thanks.
>>
>>
>> On Mon, Dec 30, 2019 at 4:53 AM reza tisa via ncl-talk <ncl-talk at ucar.edu>
>> wrote:
>>
>>> Hello all NCL user, i am running mjoclivar_15 and got this error
>>> messages:
>>> Error Message :
>>> *fatal:The result of the conditional expression yields a missing value.
>>> NCL can not determine branch, see ismissing function*
>>>
>>>
>>>
>>>
>>>
>>>
>>> *fatal:["Execute.c":8637]:Execute: Error occurred at or near line 3836
>>> in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.nclfatal:["Execute.c":8637]:Execute:
>>> Error occurred at or near line 4143 in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.nclfatal:["Execute.c":8635]:Execute:
>>> Error occurred at or near line 110*
>>> *This is my data:*
>>> MJO_PC_INDEX.nc (i got from running mjoclivar_14):
>>> https://drive.google.com/open?id=1pr6wTdRXE0AWaPbh-Q8wWHca8NZLTLQw
>>> My mjoclivar_15 script:
>>> https://drive.google.com/open?id=1uvljzKOnCZt2vqso1fPPxLqCD1R9FBq2
>>>
>>> *Error line:*
>>> ................
>>> ncl 106> gsn_define_colormap(wks,"radar_1")
>>> ncl 107>       end if
>>> ncl 108>                                                     ; color
>>> changes w month
>>> ncl 109>       plLine at gsLineColor = colMonth(imon(nt)-1)     ; -1 is
>>> cuz NCL is 0-based
>>> *ncl 110>       plot@$unique_string("dum")$ = gsn_add_polyline(wks,
>>> plot, (/xBegin,pc1(nt)/), (/yBegin,pc2(nt)/), plLine)*
>>> ncl 111>
>>> ncl 112>       if (label_opt.eq.0) then
>>> ncl 113>
>>> ...................
>>>
>>> *printVarSummary from MJO_PC_INDEX.nc :*
>>> ncl 6> printVarSummary(T) *;PC1*
>>> Variable: T
>>> Type: float
>>> Total Size: 5844 bytes
>>>             1461 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [time | 1461]
>>> Coordinates:
>>>             time: [1884648..1919688]
>>> Number Of Attributes: 5
>>>   info : PC1/stddev(PC1)
>>>   long_name : PC1
>>>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>>>   matrix : covariance
>>>   _FillValue : 32766
>>>
>>> ncl 8> printVarSummary(T2) *;PC2*
>>> Variable: T2
>>> Type: float
>>> Total Size: 5844 bytes
>>>             1461 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [time | 1461]
>>> Coordinates:
>>>             time: [1884648..1919688]
>>> Number Of Attributes: 5
>>>   info : PC2/stddev(PC2)
>>>   long_name : PC2
>>>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>>>   matrix : covariance
>>>   _FillValue : 32766
>>>
>>> ncl 11> printVarSummary(T2)  *;MJO_INDEX*
>>> Variable: T2
>>> Type: float
>>> Total Size: 5844 bytes
>>>             1461 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [time | 1461]
>>> Coordinates:
>>>             time: [1884648..1919688]
>>> Number Of Attributes: 5
>>>   long_name : MJO PC INDEX
>>>   info : (PC1^2 + PC2^2)
>>>   ts_mean : ( 4.944145e-09, -3.424131e-09 )
>>>   matrix : covariance
>>>   _FillValue : 32766
>>>
>>> ncl 13> printVarSummary(T3)   *;time  *
>>> Variable: T3
>>> Type: double
>>> Total Size: 11688 bytes
>>>             1461 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [time | 1461]
>>> Coordinates:
>>>             time: [1884648..1919688]
>>> Number Of Attributes: 6
>>>   units : hours since 1800-01-01 00:00:0.0
>>>   long_name : Time
>>>   actual_range : ( 1528872, 1919688 )
>>>   delta_t : 0000-00-01 00:00:00
>>>   standard_name : time
>>>   axis : T
>>>
>>> Thanks for anybody could help and giving solution for this error
>>>
>> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191230/db2823d1/attachment.html>


More information about the ncl-talk mailing list