<div dir="ltr"><div>Not sure of your objective but ...   <br></div><div><br></div><div>   spec@frq = spec@frq/30.50                                       ; 30.5 day/month</div>   res@tiXAxisString = "Frequency (cycles/day)"           ; xaxis<br>   plot=gsn_csm_xy(wks,spec@frq,spec@spcx,res)     ; create plot   <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 25, 2019 at 9:32 AM Edwin Marco via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">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,<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>
_______________________________________________<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>