Hi NCL users,
I have been trying to use time_axis_labels to plot an xy-plot from my wrfoutput however, I am getting the following error.
fatal:Argument type mismatch on argument (0) of (time_axis_labels) can not coerce
I looked at NCL mail archive and tried Saji Hameed's solution but that also didn't work for me. I would greatly appreciate if some could help to fix this. My script for the xy plot is copied below.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
begin
f1 = addfile("/project/k14/basit/wrf-sims/wrf_153/times.nc","r")
f2 = addfile("/project/k14/basit/wrf-sims/wrf_153/tauaer2.nc","r")
wks = gsn_open_wks ("x11","outFname")
nTimes = dimsizes(times_f1)
date_f1 = times_f1
year_f1 = str_get_cols(date_f1,0,3)
month_f1 = str_get_cols(date_f1,5,6)
day_f1 = str_get_cols(date_f1,8,9)
hour_f1 = str_get_cols(date_f1,11,12)
minutes_f1 = str_get_cols(date_f1,14,15)
aoT2 = wrf_user_getvar(f2,"TAUAER2", -1)
aoT2_new = aoT2(:,0,300,300)
newdate=year_f1+month_f1+day_f1+hour_f1+minutes_f1
resplot =True
restick = True
restick@ttmFormat="%Y%N%D%H%M"
newdate@units="200606010000"
restick@ttmAxis ="XB"
print(newdate)
time_axis_labels(newdate,resplot,restick)
plot = gsn_csm_xy(wks, aoT2_new,newdate,resplot)
end
Thanks and best regards,
---- Basit A. Khan, Ph.D. Postdoctoral Research Fellow Division of Physical Sciences & Engineering Office# 3204, Level 3, Building 1, King Abdullah University of Science & Technology 4700 King Abdullah Blvd, Box 2753, Thuwal 23955 –6900, Kingdom of Saudi Arabia. Office: +966(0)2 808 0276, Mobile: +966(0)5 0860 3617 E-mail: basitali.khan@kaust.edu.sa<mailto:basitali.khan@kaust.edu.sa> Skype name: basit.a.khan
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 28 03:02:43 2012
This archive was generated by hypermail 2.1.8 : Wed May 30 2012 - 09:25:29 MDT