Re: Plotting rainfall totals using NCL sample scripts.

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 16 2013 - 14:39:55 MDT

Hi David,

I'm confused; the script you sent is different than the code snipet in your note, and indeed the script looks to be correct:

 f = addfiles(FILES+".nc","r")

  times = wrf_user_getvar(f,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file

In particular, notice the script contains the file-variable "f", rather than "a" in the snipet (I believe "a" is used as an example of the docs page for wrf_user_getvar()). There is no variable "a" anywhere in the script.

Rick

On Aug 16, 2013, at 2:29 PM, "Agee, David" <david.r.agee@my.und.edu> wrote:

> Hi all,
>
> I am attempting to plot rainfall totals using a WRF precip sample script from ncl. My code is reading in 24 hourly output files and as soon as it prints to the command line I receive an error message of:
>
> fatal:Argument type mismatch on argument (0) of (wrf_user_getvar) can not coerce
> fatal:Execute: Error occurred at or near line 46 in file precip.ncl
>
>
> and here are the lines of the script that the error stems from:
>
> times = wrf_user_getvar(a,"times",-1) ; get all times in the file (line 46)
> ntimes = dimsizes(times) ; number of times in the file (line 47)
>
> Any time I comment out the line and re-run the script the error message jumps to the next line where wrf_user_getvar is called. The script seems to work for my co-workers but not for me. I've searched the archives for similar errors experienced by other users and nothing has proven to be the solution yet.
>
>
> I have attached the entire script in a word document as well.
>
> I appreciate any information anyone can provide.
>
> Thanks,
>
> David R. Agee
> <precipncl.docx>_______________________________________________
> 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 Fri Aug 16 14:40:05 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 21 2013 - 13:54:15 MDT