Re: time_axis_labels for wrf data

From: Saji Hameed <saji.nh_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 02 2010 - 02:42:09 MDT

Hi Chris,

What variable are you passing to time_axis_labels as first argument? I guess
it needs to be a netcdf time co-ordinate variable.

Alternately you can create your own "string of times" from the WRF netcdf
output. See the following for an example

fin=addfile("wrfout_d01_2010-08-23_12:00:00.nc","r")
times=fin->Times
dims=dimsizes(times)
ntime=dims(0)
years=new(ntime,"string")
months=years
days=years
hrs=years
do itim = 0,ntime-1
  years(itim) = chartostring(times(itim,0:3))
  months(itim) = chartostring(times(itim,5:6))
  days(itim) = chartostring(times(itim,8:9))
  hrs(itim) = chartostring(times(itim,11:12))
end do

You can then combine them as you wish to make your own time axis label.

cheers!
saji

On Thu, Sep 2, 2010 at 5:08 PM, Christopher Steele <
christopher.steele@uea.ac.uk> wrote:

> Hi everyone,
>
> I'm trying to produce a time series plot using a day's worth of data from
> the WRF model. The data to be shown begins six hours after the beginning of
> the model run to account for model spin up time, and so if I were to set a
> minimum value it would begin on hour 6 instead of hour "0 after
> yyyy-mm-dd_hh:mm:ss", ie the day that I'm interested in without the spin up
> time.
>
> So far, I've tried to use the function time_axis_labels to produce a string
> of times on the x-axis but keep on getting the error message:
>
>
> fatal:Argument type mismatch on argument (0) of (time_axis_labels) can not
> coerce
>
> I've attempted to add the unit attribute to the list of times but I'm not
> sure on the correct format for WRF times data. Has anyone used this, or an
> equivalent function for WRF times, before?
>
> Any help offered would be very much appreciated
>
> cheers
>
> Chris
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 2 01:49:17 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 11:05:25 MDT