<div dir="ltr"><div>Hello,</div><div>I hope I can get quick help to set me off as it is taking me days to make sense of what I have to do.</div><div>I have historical (1971-200) and model simulation (2021-2050) data. I have adapted an ncl script from the DKRZ website for plotting a time series.</div><div><br></div><div>With print(times) I get the time range 7701.5 to 18658.5.</div><div>When I plot the time series at a point I get the x-axis range 6000 60 20000</div><div>ncdump -h on the file indicates that time:units = "days since 1949-12-01 00:00:00"</div><div>my data has format yyyymmdd (yearmothday). I want the x-axis to show dates.</div><div><br></div><div>I have been looking in the ncl documentation how to do this. This may take me days or weeks.</div><div>I would appreciate any help in this.</div><div><div>The script I have is below</div></div><div><br></div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<br>begin<br><br>   diri = "./"                             ; directory where to find the data<br>   fili = "pr_AFR-44_CNRM-CERFACS-CNRM-CM5_historical_r1i1p1_SMHI-RCA4_v1_day_19710101_20001231Reg.nc"             ; file name<br><br>   f   = addfile(diri+fili,"r")             ; open file<br><br>   t1 = f->pr(:,{-15},{30})                 ; read precip time series at 15S/30E<br><br>   times  = f->time                         ; get times in file<br>   cd_date = cd_calendar(times, -2)<br><br>; open a workstation<br>;----------------------------------------------------------------<br>   wks_type = "X11"                         ; graphics output type<br>   wks_type@wkWidth   =  1024               ; graphics output width in pixels<br>   wks_type@wkHeight  =  1048               ; graphics output height in pixels<br><br>   wks = gsn_open_wks(wks_type, "plot_xy_multiple_lines_axis")<br><br>; resources for variable t1, y-axis<br>;----------------------------------------------------------<br>   resT1                      =  True   <br>   resT1@ttmValues            =  cd_date<br>   resT1@xyLineThicknessF     =  3.0                        ; set line thickness<br>   resT1@xyLineColor          =  "red"                      ; set line color<br>   resT1@xyDashPatterns       =  0                          ; solid line<br>   resT1@tmXBLabelFontHeightF = 0.010<br>   resT1@tiYAxisString        =  "Daily " + " " + t1@standard_name +"  "+ "at 15S/30E"              ; y-axis string<br><br>; create the plot<br>;-----------------------------------------------<br>   plot = gsn_csm_xy(wks, times&time, t1, resT1)<br>   <br>end</div><div><br></div></div>