> I have one data set in 3d say prec(:,:,:) ,
> now it contains missing value. I want to remove the
> missing value from the data set. Now if I use ind,
> and ismissing function , I can remove the data, but
> for ind I have to get the value to one dimension by
> ndtooned. But in that case I loss all the meta data,
> I want to retain the meta data. Is there any suggestion?
>
replace or remove/eliminate?
replace
p1 = ndtooned( prec )
i = ind(ismissing(p1)) ; all missing values
if (.not.all(ismissing(i))) then
p1(i) = ...
prec = onedtond(p1, dimsizes(prec)) ; original array
end if
delete(p1)
delete( i)
remove: this means to eliminate one value from the 3D array? to what array?
p1 = ndtooned( prec )
i = ind(.not.ismissing(p1)) ; all non-missing values
if (.not.all(ismissing(i))) then
pNew = p1(i) ; pNew is 1D
copy_VarAtts (prec, pNew) ; copy attributes
else
print("No missing values")
end if
You can not have the same coordinate variables because
you have eliminated a value ....
I am sure I have misunderstood what you want.
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 28 2006 - 08:24:06 MDT
This archive was generated by hypermail 2.2.0 : Fri Apr 28 2006 - 08:53:54 MDT