There is no "morphological close" function in NCL.
The poisson_grid_fill function could be used. It performs well
in bounded areas (eg, satellite swath interior regions). However, there
are often missing values or values of low quality at the boundaries that
one should not use (set to _FillValue). The poisson_grid_fill
function will also 'fill' these points. This is extrapolation and
extrapolation is always dangerous and any values should be used
with caution.... or, better, ignored.
==
In NCL, use the 'stat_dispersion' function
to examine satellite data Turn the printing option on.
http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml
Looking at the output, you could set some bounds on acceptable values.
Generally, satellite swath data should be prefiltered for outliers.
A crude 'filter'
xBIG = ...
xSMALL = ...
x = where (x.lt.xSMALL .or x.gt.xBIG, x@_FillValue, x)
http://www.ncl.ucar.edu/Document/Functions/Built-in/poisson_grid_fill.shtml
http://www.ncl.ucar.edu/Applications/grid_fill.shtml
Then, smoothing the data via (say) smth9 (repeatedly)
will reduce the noise.
No matter what ... if boundary points are missing, you'
will have issues.
http://www.cgd.ucar.edu/~shea/JAKOB_TEST.png
See attached script as an example. The data are not satellite data
but you will get the idea.
Good luck
On 4/11/12 8:53 AM, Jakob Tendel wrote:
> Hello,
>
> I am working on an application that combines model data fields with
> satellite products. My problem is that the sat fields are very noisy,
> with lots of small specks of data. I need to smoothe/filter those out to
> get the larger contiguous areas that I can compare to the model data.
> Does anyone know of a way to "remove all areas with fewer than x
> pixels". I was thinking of something like a morphological close
> operation, but I don't think that exists in ncl.
>
> Thanks for any hints,
>
> Jakob
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Fri Apr 13 2012 - 13:37:52 MDT