<div dir="ltr">Hi,<div>I am new to ncl and I have been trying to plot the spectrum of daily rainfall data using this kind of script ( attached below) unfortunately I am not getting there, please can you help me on how I can modify the attached script which was intended for frequency (cycles/month) as to get frequency (cycles/day).</div><div>Thanks in advance.</div><div><br></div><div>Edwin</div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">spec_1.ncl
;
; Concepts illustrated:
; - Calculating and plotting spectra
;************************************************
;
; These files are loaded by default in NCL V6.2.0 and newer
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
;************************************************
begin
;************************************************
; variable and file handling
;************************************************
fn = "SOI_Darwin.nc" ; define filename
in = addfile(fn,"r") ; open netcdf file
soi = in->DSOI ; get data
;************************************************
; set function arguments
;************************************************
; detrending opt: 0=>remove mean 1=>remove mean and detrend
d = 0
; smoothing periodogram: (0 <= sm <= ??.) should be at least 3 and odd
sm = 7
; percent tapered: (0.0 <= pct <= 1.0) 0.10 common.
pct = 0.10
;************************************************
; calculate spectrum
;************************************************
spec = specx_anal(soi,d,sm,pct)
;************************************************
; plotting
;************************************************
wks = gsn_open_wks("png","spec") ; send graphics to PNG file
res = True ; plot mods desired
res@tiMainString = "SOI" ; title
res@tiXAxisString = "Frequency (cycles/month)" ; xaxis
res@tiYAxisString = "Variance" ; yaxis
plot=gsn_csm_xy(wks,spec@frq,spec@spcx,res) ; create plot
;***********************************************
end</pre></div></div>