Changeset 897 in lmdz_wrf


Ignore:
Timestamp:
Jun 19, 2016, 2:07:15 PM (9 years ago)
Author:
lfita
Message:

Final working version of `file_operation_alongdims':

using 'str_list'
`continue' statement added to the non slicing variable dimension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r895 r897  
    89888988
    89898989    dimvals = values.split(',')[0].split('@')
    8990     dimsoper = values.split(',')[1].split(':')
     8990    dimsoper = gen.str_list(values.split(',')[1], ':')
    89918991    operkind = values.split(',')[2]
    89928992    dimvn = values.split(',')[3].split(':')
     
    91329132   
    91339133# operating variable dimension
    9134     print '  ' + fname + ': Opering slice of variable diension _______'
     9134    print '  ' + fname + ': Opering slice of variable dimension _______'
    91359135    for vn in dimvn:
    91369136        print "' " + vn + "' ... .. ."
     
    91479147            if gen.searchInlist(dimfinalfile, vd): tocompute = True
    91489148
    9149         print fname + 'Lluis:', vn , tocompute, vd, dimfinalfile
    91509149        if tocompute:
    91519150            varslice, varsliceddims = SliceVarDict(ov,dimslice)
     
    92379236
    92389237# slicing variable dimension
    9239     print '  ' + fname + ': Adding slice of variable diension _______'
     9238    print '  ' + fname + ': Adding slice of variable dimension _______'
    92409239    for vn in dimvn:
    92419240        print "' " + vn + "' ... .. ."
     
    92449243            print '  ' + fname + ': netCDF file "' + ncfile +                        \
    92459244              '" does not have variable "' + vn + '" skippping it!!'
     9245            continue
    92469246
    92479247        # Do we have to add this dimension-variable? (only that ones with same
Note: See TracChangeset for help on using the changeset viewer.