module compress { use helix contains subroutine resize( aa, eps) { real, optional, intent (in) :: eps type( filter) :: aa, bb logical, dimension( size( aa%lag)) :: keep if (present (eps)) keep = ( abs( aa%flt) > eps) else keep = ( abs( aa%flt) > epsilon( aa%flt)) call allocatehelix( bb, count( keep)) bb%flt = pack( aa%flt, keep) bb%lag = pack( aa%lag, keep) call deallocatehelix( aa); aa = bb } }