Changeset 1066 in lmdz_wrf for trunk/tools/generic_tools.py
- Timestamp:
- Aug 30, 2016, 6:49:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r1065 r1066 666 666 >>> CFvar_DIAGvar('hurs') 667 667 {'TSrhs': ['psfc', 't', 'q'], 'LMDZrhs': ['psol', 't2m', 'q2m'], 'WRFrhs': ['PSFC', 'T2', 'Q2']} 668 >>> CFvar_DIAGvar('wss') 669 {'wss': [['U10', 'V10'], ['u10m', 'v10m']]} 668 670 """ 669 671 import subprocess as sub … … 687 689 688 690 MODvars = {} 691 MODdiags = [] 689 692 for line in ncf: 690 693 if line[0:1] != '#': 691 694 values = line.replace('\n','').replace(' ','').split(',') 692 if values[0] == varn: MODvars[values[1]] = values[2].split('@') 695 if values[0] == varn: 696 MODdiags.append(values[2].split('@')) 697 698 MODvars[varn] = MODdiags 693 699 694 700 if len(MODvars) == 0:
Note: See TracChangeset
for help on using the changeset viewer.