Changeset 489 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 12, 2015, 5:47:18 PM (10 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r478 r489 530 530 531 531 # Getting only that dimensions with coincident names 532 dimnvx = objdimx.dimensions 533 cutslice = [] 534 for idimn in objdimx.dimensions: 535 found = False 536 for dimsn in dimsshad: 537 if idimn == dimsn: 538 cutslice.append(slice(0,len(objsf.dimensions[idimn]))) 539 found = True 540 if not found: cutslice.append(0) 541 542 odimxv = objdimx[tuple(cutslice)] 543 544 dimnvy = objdimy.dimensions 545 cutslice = [] 546 for idimn in objdimy.dimensions: 547 found = False 548 for dimsn in dimsshad: 549 if idimn == dimsn: 550 cutslice.append(slice(0,len(objsf.dimensions[idimn]))) 551 found = True 552 if not found: cutslice.append(0) 553 554 odimyv = objdimy[tuple(cutslice)] 532 odimxv, odimyv = drw.dxdy_lonlatDIMS(objdimx[:], objdimy[:], objdimx.dimensions, \ 533 objdimy.dimensions, dimvals.replace(':','|').split(',')) 534 535 # dimnvx = objdimx.dimensions 536 # cutslice = [] 537 # for idimn in objdimx.dimensions: 538 # found = False 539 # for dimsn in dimsshad: 540 # if idimn == dimsn: 541 # cutslice.append(slice(0,len(objsf.dimensions[idimn]))) 542 # found = True 543 # if not found: cutslice.append(0) 544 # 545 # odimxv = objdimx[tuple(cutslice)] 546 # 547 # dimnvy = objdimy.dimensions 548 # cutslice = [] 549 # for idimn in objdimy.dimensions: 550 # found = False 551 # for dimsn in dimsshad: 552 # if idimn == dimsn: 553 # cutslice.append(slice(0,len(objsf.dimensions[idimn]))) 554 # found = True 555 # if not found: cutslice.append(0) 556 # 557 # odimyv = objdimy[tuple(cutslice)] 555 558 556 559 # if len(objdimx.shape) <= 2: -
trunk/tools/drawing_tools.py
r488 r489 3847 3847 fname = 'plot_2D_shadow_contour' 3848 3848 3849 3850 3849 if varsv == 'h': 3851 3850 print fname + '_____________________________________________________________' … … 4400 4399 fname = 'dxdy_lonlat' 4401 4400 4402 print 'Lluis which dimensions x:',ddx,'y:',ddy4403 4404 4401 if ddx.find(',') > -1: 4405 4402 dxk = 2 … … 4446 4443 else: 4447 4444 slicey.append(slice(0,len(dyv))) 4448 4449 print ' ' + fname + ' Lluis shapes dxv:',dxv.shape,'dyv:',dyv.shape4450 print ' ' + fname + ' Lluis slicex:',slicex,'slicey:',slicey4451 print ' final shapes x:',len(dxv.shape)-len(ddx),'y:',len(dyv.shape)-len(ddy)4452 4445 4453 4446 if dxk == 2 and dyk == 2:
Note: See TracChangeset
for help on using the changeset viewer.