Changeset 1563 in lmdz_wrf
- Timestamp:
- May 11, 2017, 2:17:10 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1561 r1563 7399 7399 # Avoiding segmentation fault in Curie... 7400 7400 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[:] 7411 7412 7412 7413 # Getting values of the correspondant dimensions of the variable … … 7704 7705 newvn = Hvarn + '_' + operS + '_' + vnS 7705 7706 newvar = objofile.createVariable(newvn, 'f4', tuple(newvdims)) 7706 print fname + ': LLuis shapes:', newvar.shape, 'newvdims:', newvdims, 'addvs:', addvs[iHv].shape7707 7707 newvar[:] = addvs[iHv] 7708 7708 Lattr = Hvarn + ' value for operation ' + operS + ' with variable ' + vnS
Note: See TracChangeset
for help on using the changeset viewer.