Re: [Pflexible-users] Use of pflexible 0.9 to access basic 2D fields
A python tool for data analysis of FLEXPART transport modeling.
Status: Beta
Brought to you by:
jfburkhart
|
From: John B. <jfb...@gm...> - 2012-11-01 07:36:36
|
Don, Delia, and others who may be interested. First off, Don. Thank you for the feedback. It is greatly appreciated. pflexible is something I've been building up primarily for my own research needs at NILU. I've tried to get others to use it, but it seems most are satisfied with their Matlab or otherwise solutions. To my knowledge, not that many are actually using pflexible yet (maybe I'm wrong, and simply just not aware...). However, with the new projects at NILU (VAST and otherwise), I believe there may be some interest in further development of pflexible. There are some (ahem, probably many...) inconsistencies, and the entire code base is in need of a 'refactoring'. The key pieces of which, you are discovering. I think the key is for those involved with VAST to make the decision whether pflexible will be used. If so, we should discuss what key changes are required for it to work more consistently. Certainly some tests should be added to the code. In the pflexible release, I tried to remove some features and 'step back', but I still think we may need to go back further ;) Some of my data handling may not be optimal, and we may want to think of improved ways to deal with it. Certainly, I'm open to feedback and ideas! --john On Sun, Oct 28, 2012 at 4:44 PM, Don Morton <Don...@al...> wrote: > Dear Colleagues (Delia Arnold cc'd, because I don't know if she's on this > list): > > Delia and I have been working together to create some easy to use scripts > for FLEXPART outputs (also for SRS files generated by any model). To date, > we have been using someone's flex81.py module, but prefer to use something > supported by the FLEXPART community, and perhaps something cleaner to use > in the long run. So, we have started exploring the recent pflexible v0.9. > Our immediate interest is simply in extracting the data from the FLEXPART > output files (as we already do with the flex81.py module) and then use our > own matplotlib routines for plotting. > > First, please let me offer my thanks to those of you who put this together > over the summer. I was trying to use v0.2 earlier, and although I got it > working through some hacking, it wasn't pretty. This version seems to be > much cleaner and, what I really love is that if the Fortran shared lib > isn't available, it automagically uses the native python binary class for > extraction. > > So now the questions - I have sample script and stdout available in > > http://weather.arsc.edu/Miscellaneous/pflexibleTry1/ > > > I'm a relaitvely new user of FLEXPART, so there may be lots of underlying > detail I'm ignorant of, but I find that if I want to pull out a basic > concentration grid for processing and plotting, the following will not work: > > FD = pf.read_grid(H, date=theTimeStamp) > print FD.shape > > Instead, I need to actually index the whole structure by a tuple, as > follows: > > theTuple = (0, theTimeStamp) > theGrid = FD[theTuple] > print 'Shape: ' + str(theGrid.shape) > > This is fine, but it's not clear to me what the "0" in the tuple actually > indexes. Is it a species number? > > On the other hand, I can easily extract the grids for dry and wet > deposition without passing in any kind of tuple: > > > WD = pf.read_grid(H, date=theTimeStamp, getwet=True) > print 'Shape: ' + str(WD.shape) > > My basic question is whether I should expect this inconsistency between > extracting concentration (or the counterpart in backward mode) and > deposition grids. Obviously, we can work with it. > > Also, it's not clear to me whether the get_slabs() routine has been > thoroughly checked out, and whether I might be doing something wrong. If I > try the following (this is also in the sample script I pointed you to): > > FD = pf.read_grid(H, date=theTimeStamp) > ########### > # The call to get_slabs() fails - there is a statement in there, > # "grid_shape = G.shape" in which the shape attribute is not recognized. > #grid = pf.get_slabs(H, FD) > > Then I run into the same error I ran into when trying to access FD as a > grid, rather than a structure with a grid in it. It seems that, in this > case, maybe get_slabs() itself would need to form that tuple first, and > then grab the slab. > > --------------------------------------- > > Thank you for your time. As we move ahead with this, we would be happy to > create simple "HOWTO's" that demonstrate the use of pflexible in > "extraction" operations, and will even contribute our own scripts for > plotting once they're a little more mature. You can see one example at > > http://weather.arsc.edu/Miscellaneous/FLEXPART-FairbanksFire.png > > First, we just want to make sure we're using pflexible as intended :) > > Best Regards, > > Don Morton and Delia Arnold > > -- > Voice: +1 907 450 8679 > Arctic Region Supercomputing Center > http://weather.arsc.edu/ > http://people.arsc.edu/~morton/ <http://www.arsc.edu/%7Emorton/> > > > > ------------------------------------------------------------------------------ > WINDOWS 8 is here. > Millions of people. Your app in 30 days. > Visit The Windows 8 Center at Sourceforge for all your go to resources. > http://windows8center.sourceforge.net/ > join-generation-app-and-make-money-coding-fast/ > _______________________________________________ > Pflexible-users mailing list > Pfl...@li... > https://lists.sourceforge.net/lists/listinfo/pflexible-users > > |