!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! @ c-old-extract
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
go\oldload 'name'  /syntax hgdf /in aaa1
@ l-old-prange.cube aaa1 center size       ! Position range
@ l-old-vrange.cube aaa1 range true%vrange ! Velocity range
@ l-old-corner.cube aaa1                   ! Ranges to Corners
!
define logical doit
let doit yes
for iaxis 1 to 3
   let doit doit.and.(true%blc[iaxis].eq.1).and.(true%trc[iaxis].eq.aaa1%dim[iaxis])
next iaxis
if (doit) then
   message w extract "Extracted cube would be identical to original one => Abort"
else
   cube\extract 'name' /range 'range[1]' 'range[2]' /center 'center[1]' 'center[2]' -
   /size 'abs(size[1])' 'abs(size[2])'
   let name 'name'"-ext"
   say " "
   message w extract "Sub-cube "'name'"."'type'" successfully extracted"
   message w extract "Name set to "'name'
   say " "
endif
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
