<div dir="ltr"><div>The following function still gives me constant 0 value.</div><div><br></div>undef ("fftwavenumber") <br>function fftwavenumber (in[*]:numeric) <br><br>local in,p,a,b,f,output<br><br>begin <br> N=dimsizes(in)<br><br> if mod(N,2).eq.0 then<br> p=N/2 ; N even<br> else<br> p=(N-1)/2 ; N odd<br> end if<br><br>pi=3.1416<br><br>a = new((/ p /), typeof(in),getVarFillValue(in))<br>b = new((/ p /), typeof(in),getVarFillValue(in))<br><br>do k=0,p-1 <br> do t=0,N-1<br> a(k) = (2/N)*( in(t)*cos(2*pi*k*t/N) )<br> b(k) = (2/N)*( in(t)*sin(2*pi*k*t/N) )<br> end do<br>end do<br><br>f = new((/ k,t /), typeof(in),getVarFillValue(in))<br>output = new((/ t /), typeof(in),getVarFillValue(in))<br><br>do t=0,N-1<br> do k=0,p-1<br> f(k,t) = a(k)*cos(2*pi*k*t/N)+ b(k)*sin(2*pi*k*t/N)<br> end do<br> output(t)=(sum(f(0,t))) ; 0 used for Fourier Decomposition (wave number 1)<br> return(output)<br>end do<br>end <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 31 Aug 2019 at 01:09, Rashed Mahmood <<a href="mailto:rashidcomsis@gmail.com">rashidcomsis@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>In addition, I am also not sure about the outer loop in the following, it seems that after every iteration a and will be zero, if so, why do you need the outer loop::</div><div><br></div><div>
<span style="color:rgb(255,0,0)"><span style="background-color:rgb(243,243,243)">do k=0,p-1 <br> a(k) = 0<br> b(k) = 0 </span></span><br> do t=0,N-1<br> a(k) = a(k) +(2/N)*( in(t)*cos(2*pi*k*t/N) )<br> b(k) = b(k) +(2/N)*( in(t)*sin(2*pi*k*t/N) )<br> end do<br><span style="color:rgb(255,0,0)">end do</span>
</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 30, 2019 at 8:37 AM 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>function fftwavenumber (in) ==> function fftwavenumber (in[*]:numeric) <br></div><div>====</div><div> add <br></div><div> return(outpuy)</div><div>====</div><div><br></div><div>Ypu should test the function.</div><div><br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2019 at 7:53 PM Md. Jalal Uddin <<a href="mailto:dmjalal90@gmail.com" target="_blank">dmjalal90@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">Sorry, sir. It was my mistake as I am making a function in NCL for the first time. The following function, I used for rainfall analysis, produced a constant 0 value.<div><br></div><div>undef ("fftwavenumber") <br>function fftwavenumber (in) <br><br>local in,p,a,b,c,d,f,output<br><br>begin <br> N=dimsizes(in)<br><br> if mod(N,2).eq.0 then<br> p=N/2 ; N even<br> else<br> p=(N-1)/2 ; N odd<br> end if<br><br>pi=3.1416<br><br>a = new((/ p /), typeof(in),getVarFillValue(in))<br>b = new((/ p /), typeof(in),getVarFillValue(in))<br><br>do k=0,p-1 <br> a(k) = 0<br> b(k) = 0 <br> do t=0,N-1<br> a(k) = a(k) +(2/N)*( in(t)*cos(2*pi*k*t/N) )<br> b(k) = b(k) +(2/N)*( in(t)*sin(2*pi*k*t/N) )<br> end do<br>end do<br><br>f = new((/ k,t /), typeof(in),getVarFillValue(in))<br>output = new((/ t /), typeof(in),getVarFillValue(in))<br><br>do t=0,N-1<br> do k=0,p-1<br> f(k,t) = a(k)*cos(2*pi*k*t/N)+ b(k)*sin(2*pi*k*t/N)<br> end do<br> output(t)=(sum(f(0,t))) ; 0 used for wave number one<br>end do<br><br>end <br></div><div><br></div><div>Any advice would be appreciated.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 29 Aug 2019 at 22:02, 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>Your response makes no sense to me. <br></div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ezfftf_n.shtml" target="_blank"><b>ezfftf_n</b></a></div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ezfftb_n.shtml" target="_blank"><b>ezfftb_n</b></a></div><div><br></div><div>There are other FFT woutines ... look for them<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 9:20 PM Md. Jalal Uddin 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">Yes, sir. The variable got 0 value. Actually, it was a function in Matlab for Fourier Decomposition (wavenumber 1). I am trying to transfer into NCL. I would be happy to know if such function is available in NCL.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2019 at 15:33, Rashed Mahmood <<a href="mailto:rashidcomsis@gmail.com" target="_blank">rashidcomsis@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>There is not enough information to say for sure, however, this is likely due to missing data values. Did you check if the variable that you trying to plot got missing values?</div><div><br></div><div>Cheers,</div><div>Rashed<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 6:49 AM Md. Jalal Uddin 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">Hi all,<div><br></div><div>I got the following error message with a blank figure (attached). </div><div><b>warning:ContourPlotInitialize: scalar field is constant; no contour lines will appear; use cnConstFEnableFill to enable fill</b><br><div><br></div><div>I set a resource that did not work.</div><div>cnres@cnConstFEnableFill = True<br></div><div><br></div><div>Any advice?</div><div><br></div><div>Jalal</div>-- <br><div dir="ltr" class="gmail-m_-7173531317405289033gmail-m_4132192665684930883gmail-m_3086759148016457179gmail-m_-2120280359127738713gmail-m_-5586280276710762885gmail-m_-6087536123306204836gmail-m_-4377309921323955907gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2" color="#000000"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a> <br>Facebook: jalal.hossen.39 <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a> </font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-7173531317405289033gmail-m_4132192665684930883gmail-m_3086759148016457179gmail-m_-2120280359127738713gmail-m_-5586280276710762885gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2" color="#000000"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a> <br>Facebook: jalal.hossen.39 <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a> </font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-7173531317405289033gmail-m_4132192665684930883gmail-m_3086759148016457179gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2" color="#000000"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a> <br>Facebook: jalal.hossen.39 <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a> </font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font color="#000000" size="2"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a> <br>Facebook: jalal.hossen.39 <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a> </font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>