Last change
on this file since 349 was
349,
checked in by aslmd, 14 years ago
|
PYTHON GRAPHICS: A REFERENCE VERSION FOR BOTH GCM AND MESOSCALE USE!
Merged recent changes by TN for better GCM handling + 1D/2D plots with AS mesoscale version [winds.py]
Now
- there is a common function named planetoplot in planetoplot.py which supports both GCM and mesoscale plots
this will be a common reference for future development
- mesoscale users might want to use the script meso.py
- GCM users might want to use the script gcm.py
Todo
- a few capabilities that were in winds.py are broken in meso.py, this will be fixed soon.
the 'old' reference script winds.py is still here anyway!
- there is still a bug with 'ortho' projection with GCM fields. still searching...
Misc
- A few modifications were done in myplot.py and mymath.py
- Added a simple stupid little.py script illustrating very simple use of Python graphics
- Added the script doing statistical analysis for dust devils
|
File size:
654 bytes
|
Rev | Line | |
---|
[180] | 1 | def min (field,axis=None): |
---|
| 2 | import numpy as np |
---|
[349] | 3 | if field is None: return None |
---|
| 4 | else: return np.array(field).min(axis=axis) |
---|
[180] | 5 | |
---|
| 6 | def max (field,axis=None): |
---|
| 7 | import numpy as np |
---|
[345] | 8 | if field is None: return None |
---|
| 9 | else: return np.array(field).max(axis=axis) |
---|
[180] | 10 | |
---|
| 11 | def mean (field,axis=None): |
---|
| 12 | import numpy as np |
---|
[349] | 13 | if field is None: return None |
---|
| 14 | else: return np.array(field).mean(axis=axis) |
---|
[180] | 15 | |
---|
| 16 | def deg (): |
---|
| 17 | return u'\u00b0' |
---|
| 18 | |
---|
[310] | 19 | def writeascii ( tab, filename ): |
---|
| 20 | mydata = tab |
---|
| 21 | myfile = open(filename, 'w') |
---|
| 22 | for line in mydata: |
---|
| 23 | myfile.write(str(line) + '\n') |
---|
| 24 | myfile.close() |
---|
| 25 | return |
---|
| 26 | |
---|
Note: See
TracBrowser
for help on using the repository browser.