Changeset 406 in lmdz_wrf for trunk


Ignore:
Timestamp:
Apr 30, 2015, 5:39:40 PM (10 years ago)
Author:
lfita
Message:

Fixing dimension order and loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r405 r406  
    1407114071    newdimvs = []
    1407214072
    14073     idorig = Norigdims - 1
     14073    idorig = 0
    1407414074    for idn in range(Norigdims + 1):
    1407514075        if idn == position:
     
    1407914079            newdimns.append(vardims[idorig])
    1408014080            newdimvs.append(varobj.shape[idorig])
    14081             idorig = idorig - 1
     14081            idorig = idorig + 1
    1408214082
    1408314083# New variable
     
    1408514085    for inewdim in range(size):
    1408614086        slicev = []
     14087        idorig = 0
    1408714088        for idn in range(Norigdims + 1):
    1408814089            if idn == position:
     
    1409014091            else:
    1409114092                slicev.append(slice(0,varobj.shape[idorig]))
    14092 
     14093                idorig = idorig + 1
     14094 
    1409314095        newvarv[tuple(slicev)] = varobj[:]
    1409414096       
Note: See TracChangeset for help on using the changeset viewer.