Changeset 198 in lmdz_wrf for trunk/tools/nc_var_tools.py


Ignore:
Timestamp:
Dec 5, 2014, 11:11:15 AM (10 years ago)
Author:
lfita
Message:

Adding 2D variables in 'setvar_asciivalues'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r192 r198  
    85218521                values[it] = retype(valfinal[0], vartype)
    85228522                it = it +1
    8523 
     8523    elif Ndims == 2:
     8524        iline=0
     8525        for line in objasciif:
     8526            val = (line.replace('\n','').replace(' ','').replace('\t',''))
     8527            valfinal[0] = retype(val, vartype)
     8528            if it <= values.shape[0]-1:
     8529                values[iline,it] = retype(valfinal[0], vartype)
     8530                it = it +1
     8531            iline=iline+1
    85248532    else:
    85258533        print errormsg
Note: See TracChangeset for help on using the changeset viewer.