Last change
on this file since 205 was
186,
checked in by aslmd, 14 years ago
|
MESOSCALE: python post-processing. wrapper with my Fortran interpolator (small modifications done to api.F90). added the corresponding options to winds.py which is now a pretty complete script
|
File size:
1.2 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, \ |
---|
| 16 | onelevel = 0.020 ): |
---|
| 17 | import api |
---|
| 18 | import numpy as np |
---|
| 19 | |
---|
| 20 | if not path_to_output: path_to_output = path_to_input |
---|
| 21 | |
---|
| 22 | if not output_name: |
---|
| 23 | if interp_method <= 2: output_name = input_name+'_p' |
---|
| 24 | if interp_method == 3: output_name = input_name+'_z' |
---|
| 25 | if interp_method == 4: output_name = input_name+'_zabg' |
---|
| 26 | |
---|
| 27 | print input_name, output_name |
---|
| 28 | |
---|
| 29 | api.api_main ( path_to_input, input_name, path_to_output, output_name, \ |
---|
| 30 | process, fields, debug, bit64, oldvar, np.arange(299), \ |
---|
| 31 | interp_method, extrapolate, unstagger_grid, onelevel ) |
---|
| 32 | |
---|
| 33 | return output_name |
---|
Note: See
TracBrowser
for help on using the repository browser.