Last change
on this file since 251 was
225,
checked in by aslmd, 14 years ago
|
MESOSCALE: python graphics. now possible for multi-files and multi-var. very easy to make an atlas.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[186] | 1 | |
---|
| 2 | ### A. Spiga -- LMD -- 03/07/2011 |
---|
| 3 | |
---|
| 4 | def api_onelevel ( path_to_input = './', \ |
---|
| 5 | input_name = 'wrfout_d0?_????-??-??_??:00:00', \ |
---|
| 6 | path_to_output = None, \ |
---|
| 7 | output_name = None, \ |
---|
| 8 | process = 'list', \ |
---|
| 9 | fields = 'tk,W,uvmet,HGT', \ |
---|
| 10 | debug = False, \ |
---|
| 11 | bit64 = False, \ |
---|
| 12 | oldvar = True, \ |
---|
| 13 | interp_method = 4, \ |
---|
| 14 | extrapolate = 0, \ |
---|
| 15 | unstagger_grid = False, \ |
---|
[207] | 16 | onelevel = 0.020, \ |
---|
| 17 | nocall = False ): |
---|
[186] | 18 | import api |
---|
| 19 | import numpy as np |
---|
| 20 | |
---|
| 21 | if not path_to_output: path_to_output = path_to_input |
---|
| 22 | |
---|
| 23 | if not output_name: |
---|
| 24 | if interp_method <= 2: output_name = input_name+'_p' |
---|
| 25 | if interp_method == 3: output_name = input_name+'_z' |
---|
| 26 | if interp_method == 4: output_name = input_name+'_zabg' |
---|
| 27 | |
---|
[225] | 28 | #print input_name, output_name |
---|
[186] | 29 | |
---|
[207] | 30 | if nocall: pass |
---|
| 31 | else: api.api_main ( path_to_input, input_name, path_to_output, output_name, \ |
---|
[186] | 32 | process, fields, debug, bit64, oldvar, np.arange(299), \ |
---|
| 33 | interp_method, extrapolate, unstagger_grid, onelevel ) |
---|
| 34 | |
---|
| 35 | return output_name |
---|
Note: See
TracBrowser
for help on using the repository browser.