<div dir="ltr">Thank you for the suggestion Mr.Dennis & Mr.Dave, I am trying on it </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Pada tanggal Sel, 31 Des 2019 pukul 11.16 Dave Allured - NOAA Affiliate via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> menulis:<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="ltr"><div>Reza, thanks for taking my suggestion for printing diagnostics for missing values.  Notice that this helped us identify the source of your current problem.  I agree with Dennis, your selected time range included one of the missing value zones generated by the band pass filter. Because you printed the values, you can see exactly how much of the zone you need to avoid.</div><div><br></div><div>Please read the documentation for how to correctly use printMinMax, in case you need it in the future.  It is under "Functions" documentation on the NCL website.</div><div><br></div><div>--Dave</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 30, 2019 at 8:53 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@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="ltr"><div>There has been another thread on ncl-talk regarding mjoclivar_{2,14,15}. <br></div><div>*You* should read that thread. The answer to your question is in that thread.</div><div><br></div><div>The period you want *MUST* have at least 100 extra days<b> before and after</b> the the specified .</div><div>The MJO Diagnostics specify using a Lanczos filter of length 201 days.</div><div>The first and last 100 (=201/2) filtered values will be missing.<br></div><div><br></div><div>;************************************************<br></div><div><pre>; create BandPass Filter
;************************************************
  ihp      = 2                             ; bpf=>band pass filter
  nWgt     = 201
  sigma    = 1.0                           ; Lanczos sigma
  fca      = 1./100.
  fcb      = 1./20.
  wgt      = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/filwgts_lanczos.shtml" target="_blank"><b>filwgts_lanczos</b></a> (nWgt, ihp, fca, fcb, sigma )</pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 30, 2019 at 8:33 PM reza tisa via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@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="ltr"><div>This is what i got before line 110, i got 100 missing data on pc1 and pc2 (day 265-365)</div><div>any advice for this?</div><div><b><br></b></div><div><b>PrintVarSummary(pc1) & printVarSummary(pc2) :</b><br></div><div>Variable: pc1</div>Type: float<br>Total Size: 1460 bytes<br>            365 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 365]<br>Coordinates:<br>            time: [1910952..1919688]<br>Number Of Attributes: 5<br>  matrix : covariance<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  long_name : PC1<br>  info : PC1/stddev(PC1)<br>  _FillValue : 32766<br><br>Variable: pc2<br>Type: float<br>Total Size: 1460 bytes<br>            365 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 365]<br>Coordinates:<br>            time: [1910952..1919688]<br>Number Of Attributes: 5<br>  matrix : covariance<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  long_name : PC2<br>  info : PC2/stddev(PC2)<br><div>  _FillValue : 32766</div><div><br></div><div><br></div><div><br></div><div><b>print(pc1) & print(pc2):</b></div><div><br>Variable: pc1<br>Type: float<br>Total Size: 1460 bytes<br>            365 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 365]<br>Coordinates:<br>            time: [1910952..1919688]<br>Number Of Attributes: 5<br>  matrix : covariance<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  long_name : PC1<br>  info : PC1/stddev(PC1)<br>  _FillValue : 32766<br>(0) 0.6806232<br>(1) 0.8251321<br>(2) 0.9573668<br>(3) 1.082248<br>(4) 1.204796<br>........................<br>(263) -0.2053133<br>(264) -0.3058788<br><b><span style="color:rgb(255,0,0)">(265) 32766<br>(266) 32766<br></span></b></div><div><b><span style="color:rgb(255,0,0)">................ (same 32766 fillValue)<br></span></b></div><div><b><span style="color:rgb(255,0,0)">................</span></b></div><div><b><span style="color:rgb(255,0,0)">(363) 32766<br>(364) 32766</span><br></b><br><br>Variable: pc2<br>Type: float<br>Total Size: 1460 bytes<br>            365 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 365]<br>Coordinates:<br>            time: [1910952..1919688]<br>Number Of Attributes: 5<br>  matrix : covariance<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  long_name : PC2<br>  info : PC2/stddev(PC2)<br>  _FillValue : 32766<br>(0) -2.171702<br>(1) -2.205069<br>(2) -2.23731<br>(3) -2.264152<br>(4) -2.279648<br>..................</div><div>..................</div><div>(261) 0.4560925<br>(262) 0.4993998<br>(263) 0.5322841<br>(264) 0.5507534<br><b><span style="color:rgb(255,0,0)">(265) 32766<br>(266) 32766<br>......................</span></b></div><div><b><span style="color:rgb(255,0,0)">...................... <i>(same 32766 fillValue)</i><br></span></b></div><div><b><span style="color:rgb(255,0,0)">(363) 32766<br>(364) 32766</span></b></div><div><br></div><div><b>printMinMax :</b></div><div>ncl 125>     printMinMax(pc1) ;Show the min and max values of a whole array</div><div><b>result :</b></div><div>fatal:syntax error: procedure printMinMax expects 2 arguments, got 1<br>fatal:error at line 125</div><div>ncl 126> printMinMax(pc2) ;Show the min and max values of a whole array<br>fatal:syntax error: procedure printMinMax expects 2 arguments, got 1<br>fatal:error at line 126<b><br></b></div><div><br></div><div><b>print ("Missing value count = " + num (ismissing (X)) :</b><br>ncl 323>     print ("Missing value count = " + num (ismissing (pc1))</div><div><b>result</b><br><span style="color:rgb(255,0,0)">(0) Missing value count = 100</span></div><div><br></div><div><div>ncl 323>     print ("Missing value count = " + num (ismissing (pc2))</div><div><b>result</b><br><span style="color:rgb(255,0,0)">(0) Missing value count = 100</span><div></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Pada tanggal Sel, 31 Des 2019 pukul 07.34 Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>> menulis:<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="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">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:<br><br>    print -- Show all dimensions, attributes, and data values of the named variable or immediate expression<br>    printVarSummary -- Show all dimensions and attributes, but not the data values</div><div>    printMinMax -- Show the min and max values of a whole array</div><div>    print ("Missing value count = " + num (ismissing (X))) -- Show the number of missing values of X</div><div dir="ltr"><br></div><div>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.</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 30, 2019 at 4:53 AM reza tisa via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@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="ltr"><div>Hello all NCL user, i am running mjoclivar_15 and got this error messages:</div><div><div>Error Message :<br></div><div><i>fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function</i></div><div><i><br>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 3836 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl<br><br>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 4143 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl<br><br>fatal:["Execute.c":8635]:Execute: Error occurred at or near line 110<br></i><br></div></div><div><b>This is my data:</b></div><div>MJO_PC_INDEX.nc (i got from running mjoclivar_14):<br></div><div><a href="https://drive.google.com/open?id=1pr6wTdRXE0AWaPbh-Q8wWHca8NZLTLQw" target="_blank">https://drive.google.com/open?id=1pr6wTdRXE0AWaPbh-Q8wWHca8NZLTLQw</a></div><div>My mjoclivar_15 script:</div><div><a href="https://drive.google.com/open?id=1uvljzKOnCZt2vqso1fPPxLqCD1R9FBq2" target="_blank">https://drive.google.com/open?id=1uvljzKOnCZt2vqso1fPPxLqCD1R9FBq2</a></div><div><br></div><div><b>Error line:</b></div><div>................</div><div>ncl 106> gsn_define_colormap(wks,"radar_1")<br>ncl 107>       end if<br>ncl 108>                                                     ; color changes w month<br>ncl 109>       plLine@gsLineColor = colMonth(imon(nt)-1)     ; -1 is cuz NCL is 0-based<br><b>ncl 110>       plot@$unique_string("dum")$ = gsn_add_polyline(wks, plot, (/xBegin,pc1(nt)/), (/yBegin,pc2(nt)/), plLine)</b><br>ncl 111>      <br>ncl 112>       if (label_opt.eq.0) then<br>ncl 113><br></div><div>...................</div><div><br></div><div><b>printVarSummary from MJO_PC_INDEX.nc :</b></div><div>ncl 6> printVarSummary(T) <b>;PC1</b><br>Variable: T<br>Type: float<br>Total Size: 5844 bytes<br>            1461 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 1461]<br>Coordinates:<br>            time: [1884648..1919688]<br>Number Of Attributes: 5<br>  info : PC1/stddev(PC1)<br>  long_name : PC1<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  matrix : covariance<br>  _FillValue : 32766</div><div><br></div><div><div>ncl 8> printVarSummary(T2) <b>;PC2</b><br>Variable: T2<br>Type: float<br>Total Size: 5844 bytes<br>            1461 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 1461]<br>Coordinates:<br>            time: [1884648..1919688]<br>Number Of Attributes: 5<br>  info : PC2/stddev(PC2)<br>  long_name : PC2<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  matrix : covariance<br>  _FillValue : 32766<br></div></div><div><br></div><div><div>ncl 11> printVarSummary(T2)  <b>;MJO_INDEX</b><br>Variable: T2<br>Type: float<br>Total Size: 5844 bytes<br>            1461 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 1461]<br>Coordinates:<br>            time: [1884648..1919688]<br>Number Of Attributes: 5<br>  long_name : MJO PC INDEX<br>  info : (PC1^2 + PC2^2)<br>  ts_mean : ( 4.944145e-09, -3.424131e-09 )<br>  matrix : covariance<br>  _FillValue : 32766</div><div><br></div></div><div>ncl 13> printVarSummary(T3)   <b>;time  </b>  <br></div>Variable: T3<br>Type: double<br>Total Size: 11688 bytes<br>            1461 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 1461]<br>Coordinates:<br>            time: [1884648..1919688]<br>Number Of Attributes: 6<br>  units : hours since 1800-01-01 00:00:0.0<br>  long_name : Time<br>  actual_range : ( 1528872, 1919688 )<br>  delta_t : 0000-00-01 00:00:00<br>  standard_name : time<br><div>  axis : T</div><div><br></div><div>Thanks for anybody could help and giving solution for this error</div></div></blockquote></div></div></div></div></div></div></div></div></blockquote></div></blockquote></div>
</blockquote></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>