<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I believe your target example is merely maping 'f' into 1/f [period]<br></div><div>AFTER:</div><div> plot = gsn_csm_xy(wks,f,splt,res) ; create plot</div><div><br></div><div>ADD:<br></div><div><br></div><div> res@tmXBMode = "Explicit"<br> res@tmXBValues = (/ 0.02, 0.06, 0.10, 0.20, 0.30, 0.40, 0.5 /) ; frequency values</div><div> res@tmXBLabels = (/ "50" , "16.7", "10" , "5", "3.3", "2.5", "2" /) ; reasonable label spacing<br> res@tiXAxisString = "Period (year)" ; xaxis</div><div> res@tiYAxisString = "mm^2" ; mm^2/freq-interval" ==> Variance/freq-interval</div><div> plot = gsn_csm_xy(wks,f,splt,res) ; create plot</div><div><br></div><div>==============</div><div>You have 50 annual (yearly) values.</div><div><br></div><div> <b>f </b> <b>period=1/f </b> <b> spc</b><br></div><div> 0.02000 50.00000 123.106<br> 0.04000 25.00000 120.922<br> 0.06000 16.66667 75.9744<br> 0.08000 12.50000 42.8937<br> 0.10000 10.00000 47.6877<br> 0.12000 8.33333 34.668<br> 0.14000 7.14286 50.7516<br> 0.16000 6.25000 81.1661<br> 0.18000 5.55556 77.9622<br> 0.20000 5.00000 57.9987<br> 0.22000 4.54545 27.8283<br> 0.24000 4.16667 11.8259<br> 0.26000 3.84615 15.3099<br> 0.28000 3.57143 15.0785<br> 0.30000 3.33333 19.828<br> 0.32000 3.12500 47.7984<br> 0.34000 2.94118 65.8256<br> 0.36000 2.77778 46.4308<br> 0.38000 2.63158 69.4471<br> 0.40000 2.50000 104.169<br> 0.42000 2.38095 87.2154<br> 0.44000 2.27273 73.8239<br> 0.46000 2.17391 57.834<br> 0.48000 2.08333 33.2377<br> 0.50000 2.00000 25.5924<br><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 14, 2018 at 7:35 PM Lyndz <<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Dear NCL-experts,</div><div><br></div><div>I am trying to perform a power spectral analysis using NCL.</div><div><br></div><div>Attached are my script, output, and input data.</div><div><br></div><div><b>Problem:</b></div><div><br></div><div>I was able to do the example 1 from this page: <a href="https://www.ncl.ucar.edu/Applications/spec.shtml" target="_blank">https://www.ncl.ucar.edu/Applications/spec.shtml</a></div><div>However, instead of variance, I would like the y axis to be the square of rainfall (power to 2) and the x-axis to be in years.</div><div>Also attached is the sample expected output (expected_output.png).</div><div><br></div><div>Any suggestions on how I can modify my script to do this?</div><div>The output of the original script is "variance" vs "frequency".</div><div><br></div><div>I'll appreciate any help.</div><br clear="all"><div><div dir="ltr" class="m_5642277133539352163gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="comic sans ms, sans-serif"><b><u>Lyndz</u></b></font></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><br>
</blockquote></div>