Re: meteogram script for WRF model

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 03 2009 - 14:54:07 MST

http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml

[1]
(I think) You can have as many files open as your system allows.
I do not believe that NCL imposes any max

[2]
As long as no variable exceed 2GB, you can use a much memory as you
have available. EG x(200,51,1050,1050) is less than 2GB

[3]
     f = addfiles (fils, "r")
    V = f[:]->V

from each of the files contained in the 'list' variable [here, "f"]
extract "V"

Don Morton wrote:
>
>
> On Thu, Dec 3, 2009 at 11:25 AM, Dennis Shea <shea@ucar.edu
> <mailto: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/ <http://www.arsc.edu/%7Emorton/>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 3 14:55:01 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 10 2009 - 11:30:59 MST