Changeset 1563 in lmdz_wrf


Ignore:
Timestamp:
May 11, 2017, 2:17:10 AM (8 years ago)
Author:
lfita
Message:

Removing Curie safety from 'compute_opersvarsfile'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1561 r1563  
    73997399            # Avoiding segmentation fault in Curie...
    74007400            varvals = slice_createArray(varslice, varobj.dtype)
    7401             if len(varvals.shape) > 1:
    7402 #               if varvals.shape[0] != 0:
    7403 #                   for ix in range(varvals.shape[0]):
    7404 #                       varvals[ix,...] = varobj[tuple(varslice[ix,...])]
    7405 #               else:
    7406 #                   for ix in range(varvals.shape[len(varvals.shape)-1]):
    7407 #                       varvals[...,ix] = varobj[tuple(varslice[...,ix])]
    7408                 varvals[:] = varobj[tuple(varslice)]
    7409             else:
    7410                 varvals[:] = varobj[:]
     7401            varvals[:] = varobj[tuple(varslice)]
     7402#            if len(varvals.shape) > 1:
     7403##               if varvals.shape[0] != 0:
     7404##                   for ix in range(varvals.shape[0]):
     7405##                       varvals[ix,...] = varobj[tuple(varslice[ix,...])]
     7406##               else:
     7407##                   for ix in range(varvals.shape[len(varvals.shape)-1]):
     7408##                       varvals[...,ix] = varobj[tuple(varslice[...,ix])]
     7409#                varvals[:] = varobj[tuple(varslice)]
     7410#            else:
     7411#                varvals[:] = varobj[:]
    74117412           
    74127413            # Getting values of the correspondant dimensions of the variable
     
    77047705                    newvn = Hvarn + '_' + operS + '_' + vnS
    77057706                    newvar = objofile.createVariable(newvn, 'f4', tuple(newvdims))
    7706                     print fname + ': LLuis shapes:', newvar.shape, 'newvdims:', newvdims, 'addvs:', addvs[iHv].shape
    77077707                    newvar[:] = addvs[iHv]
    77087708                    Lattr = Hvarn + ' value for operation ' + operS + ' with variable ' + vnS
Note: See TracChangeset for help on using the changeset viewer.