Changeset 477 in lmdz_wrf
- Timestamp:
- Jun 12, 2015, 11:03:07 AM (10 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r476 r477 169 169 odimyu = '-' 170 170 171 odimxv, odimyv = dxdy_lonlatDIMS(objdimx[:], objdimy[:], objdimx.dimensions, \ 172 objdimy.dimensions, dimvals) 171 odimxv, odimyv = drw.dxdy_lonlatDIMS(objdimx[:], objdimy[:], objdimx.dimensions, \ 172 objdimy.dimensions, dimvals.replace(':','|').split(',')) 173 173 174 174 175 # if len(objdimx.shape) <= 2: -
trunk/tools/drawing_tools.py
r476 r477 4548 4548 fname = 'dxdy_lonlatDIMS' 4549 4549 4550 print 'Lluis which dimensions x:',ddx,'y:',ddy4551 4552 4550 slicex = [] 4553 4551 ipos=0 … … 4558 4556 if dn == dname: 4559 4557 if dvalue == -1: 4560 slicex.append(slice(0, len(dxv.shape[ipos])))4558 slicex.append(slice(0,dxv.shape[ipos])) 4561 4559 else: 4562 4560 slicex.append(dvalue) … … 4572 4570 if dn == dname: 4573 4571 if dvalue == -1: 4574 slicey.append(slice(0, len(dyv.shape[ipos])))4572 slicey.append(slice(0,dyv.shape[ipos])) 4575 4573 else: 4576 4574 slicey.append(dvalue) … … 4578 4576 ipos = ipos + 1 4579 4577 4580 4581 if len(dxv.shape) > 1:4582 for idim in range(len(dxv.shape)):4583 if idim == ddxx or idim == ddxy:4584 slicex.append(slice(0,dxv.shape[idim]))4585 else:4586 slicex.append(0)4587 else:4588 slicex.append(slice(0,len(dxv)))4589 4590 slicey = []4591 if len(dyv.shape) > 1:4592 for idim in range(len(dyv.shape)):4593 if idim == ddyx or idim == ddyy:4594 slicey.append(slice(0,dyv.shape[idim]))4595 else:4596 slicey.append(0)4597 else:4598 slicey.append(slice(0,len(dyv)))4599 4578 4600 4579 lonv = dxv[tuple(slicex)]
Note: See TracChangeset
for help on using the changeset viewer.