Hi, <div><br></div><div>Thanks for replying!</div><div><br></div><div>I understand that FFT is not allowing missing values. I therefore tried to fill in these values using the poisson_grid_fill procedure, however the procedure was too slow and I couldn't obtain the filled in data. I also used linmsg to get linearly interpolated values in place of the missing data, it was fast enough but I was obtaining the errors while using mjo_wavenum_freq_season, it reported that division by 0 is taking place somewhere and hence it couldn't proceed. </div><div><br></div><div>Thanks and Regards, </div><div>Nishtha </div><div><br>On Saturday, May 25, 2019, Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Sorry: I do not understand what you are attempting to do.<br></div><div><br></div><div>The code within the <a href="http://www.ncl.ucar.edu/Document/Functions/Diagnostics/mjo_wavenum_freq_season.shtml" target="_blank"><b>mjo_wavenum_freq_season</b></a>: function uses a (complex) FFT and FFT's do not allow missing values.</div><div><br></div><div>If you have an array with daily values: var(time,level,lat,lon)</div><div><br></div><div>var2d = <span style="font-family:arial,sans-serif">var(:,0,0,:) ; for clarity, explicitly extract the 2-dimensional subset<br></span></div><div><span style="font-family:arial,sans-serif"><b>printVarSummary(</b>var2d)</span></div><div><span style="font-family:arial,sans-serif"><b>printMinMax</b>(var2d,0)</span></div><div><span style="font-family:arial,sans-serif">nmsg =<b>num</b>(<b>ismissing</b>(var2d))<br></span></div><div><span style="font-family:arial,sans-serif">if (nmsg.eq.0) then</span><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif"> wf = <b>mjo_wavenum_freq_season</b> (var2d , date, "summer" , False)</span></div><div><span style="font-family:arial,sans-serif"> ;;<span style="font-family:arial,sans-serif">wf = <b>mjo_wavenum_freq_season</b> (var(:,0,0,:) , date, "summer" , False) <br></span></span></div><div>else</div><div> print(nmsg+" missing values. <span style="font-family:arial,sans-serif"><b>mjo_wavenum_freq_season not invoked")</b></span></div><div><span style="font-family:arial,sans-serif"> exit</span></div><div><span style="font-family:arial,sans-serif">end if<b><br></b></span></div><div><span style="font-family:arial,sans-serif"></span><span style="font-family:arial,sans-serif"></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 24, 2019 at 6:23 AM Nishtha Agrawal <<a href="mailto:agrawal.nishtha3@gmail.com" target="_blank">agrawal.nishtha3@gmail.com</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>Hi,</div><div><br></div><div>I have recently started using NCL, here I intend to use mjo_wavenum_freq_season to obtain the frequency-wavelet spectrum of my variable. But I am getting the missing value error while accessing the function.<br></div><div><br></div><div>I am using the following code for my 4D variable 'var'<br></div><div><br></div><div>date=(/20170315, 20170330, 20170415, 20170430, 20170515, 20170530, 20170615, 20170630/)<br>arr=ndtooned(var)<br>indi=ind_resolve(ind(<wbr>ismissing(arr)),dimsizes(var))<br>ind_size=dimsizes(indi)<br>npts = ind_size(0) ; number of missing elements<br>ndim = ind_size(1) ; rank of var<br>print(ind_size)<br>print(npts)<br>print(ndim)<br>var@_FillValue = -999.9<br>do n=0,npts-1<br> var(indi(n,0),indi(n,1),indi(<wbr>n,2),indi(n,3)) = var@_FillValue<br>end do<br>wave=mjo_wavenum_freq_season(<wbr>var(:,0,180,:),date, "summer",False)<br></div><div><br></div><div>And I am getting </div><div><br>(0) mjo_wavenum_freq_season: currently, missing data not allowed: nMsg=308355<br></div><br><div>I don't understand what else should I keep in place of -999.9. Please provide any solution to this problem. <br></div><div><br></div><div>Thanks and Regards,</div><div>Nishtha<br></div><div> <br></div></div>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>