Last change
on this file since 346 was
345,
checked in by aslmd, 14 years ago
|
PYTHON: updates from TN. planetoplot.py is a version of winds.py which works for GCM files and adds section, 1Dplot capabilities. new functions in myplot. checked compatibility with winds.py, OK.
|
File size:
566 bytes
|
Rev | Line | |
---|
[180] | 1 | def min (field,axis=None): |
---|
| 2 | import numpy as np |
---|
| 3 | return np.array(field).min(axis=axis) |
---|
| 4 | |
---|
| 5 | def max (field,axis=None): |
---|
| 6 | import numpy as np |
---|
[345] | 7 | if field is None: return None |
---|
| 8 | else: return np.array(field).max(axis=axis) |
---|
[180] | 9 | |
---|
| 10 | def mean (field,axis=None): |
---|
| 11 | import numpy as np |
---|
| 12 | return np.array(field).mean(axis=axis) |
---|
| 13 | |
---|
| 14 | def deg (): |
---|
| 15 | return u'\u00b0' |
---|
| 16 | |
---|
[310] | 17 | def writeascii ( tab, filename ): |
---|
| 18 | mydata = tab |
---|
| 19 | myfile = open(filename, 'w') |
---|
| 20 | for line in mydata: |
---|
| 21 | myfile.write(str(line) + '\n') |
---|
| 22 | myfile.close() |
---|
| 23 | return |
---|
| 24 | |
---|
Note: See
TracBrowser
for help on using the repository browser.