Re: meteogram script for WRF model

From: Don Morton <Don.Morton_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 03 2009 - 13:50:00 MST

On Thu, Dec 3, 2009 at 11:25 AM, Dennis Shea <shea@ucar.edu> wrote:

> I do not understand:
>
>
> "I've created a very convoluted script (driven by a Python script) that
> grabs output from separate files"
>
> Why use an external script [Python/Csh/Ruby/...]??? You can use addfiles
>
> fils = systemfunc("ls wrfout_d01_2006-09*00:00:00") ; 3 files each has 9
> time steps
> print(fils)
> f = addfiles(fils+".nc","r") ; f is of type "list"
> print( f[0] ) ; each element of the
> list is of type "file"
> V = f[:]->V
> printVarSummary(V)
>

Very good, I wasn't aware of that kind of NCL wizardry for multiple file
input :)

In my case, the files are huge (grids are 1050x1050x51), and at first glance
(maybe I'm missing something) I'm not sure that I can have so many open at
once (but I'm not clear on the semantics or memory management issues of "V =
f[:]->V." - I assume it keeps them all open? So, what I need to do is open
one file, grab the variables I need for a single column, then close and move
to the next file. But, I can see how, for smaller datasets, your approach
makes a lot more sense (and maybe it does for my case - I don't know yet).

The Python script actually isn't used for this issue - it's just a higher
level interface for getting real-time data to and from where it needs to be,
convert to GIF, etc.

-- 
Arctic Region Supercomputing Center
http://www.arsc.edu/~morton/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 3 13:50:07 2009

This archive was generated by hypermail 2.1.8 : Mon Dec 07 2009 - 16:12:30 MST