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

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Mon Dec 30 17:34:31 MST 2019


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191230/03c8b431/attachment.html>


More information about the ncl-talk mailing list