Paul, you should be able to do some masking and pack the good values using the COMPRESS* and COMPRESS*_BY functions. If the number of good values is constant for each time step then packing into a 1D variable and looping is easy. Say if the shape of our data is NXxNYxNT let xarray= x[gx=var]+0*var let yarray= y[gx=var]+0*var def axis/x=1:`NX*NY` myx let dummy=0*i[gx=myx]+0*t[gt=var] let v2d=reshape(var,dummy) let x2d=reshape(xarray,dummy) let y2d=reshape(yarray,dummy) ! Get the number of good vallues let numgood=`v2d[l=1,i=@ngd]` let vcomp=compressi(v2d[i=1:`NX*NY`]) let xcomp=compressi(x2d[i=1:`NX*NY`]) let ycomp=compressi(y2d[i=1:`NX*NY`]) ! First numgood values are good . only list those. list/clobber/file="test.dat"/n This is untested but should be pretty close to what you want. Russ On 21/03/17 08:28, Paul Goddard wrote:
|