fillmiss method
Added by Brendan DeTracey over 11 years ago
Another thread states:
There is an undocumented CDO function called fillmiss to fill regions with missing values. A bilinear interpolation is used to fill a missing value.
Is the fill applied recursively, or in one pass? I am hoping it behaves somewhat like the "Creeping Sea-Fill" method of Kara et.al.(http://journals.ametsoc.org/doi/abs/10.1175/JPO2984.1)
Replies (6)
RE: fillmiss method - Added by Ralf Mueller over 11 years ago
pls have a look into the uploaded files ;-)
T_2beFillmissed.nc (2.48 MB) T_2beFillmissed.nc | |||
T_Fillmissed.nc (2.48 MB) T_Fillmissed.nc |
RE: fillmiss method - Added by Brendan DeTracey over 11 years ago
Thanks for the pictures. But I had already made something similar myself and ir does not really clarify the method fillmiss uses. If I was to guess, I would say the algorithm finds the closest four cardinal points and does a weighted average. That is, it is non recursive. But this is a guess. I have also looked at the source and I think this is what it does. But I seek a definite answer.
RE: fillmiss method - Added by Ralf Mueller over 11 years ago
Well, the code is the definite answer, but lets illustrate the implementation a little bit more:
Lets take 1D data from 0 to 179:
I set the range from 100 to 150 to missval with cdo setrtomiss,100,150
:
Then I apply the fillmiss operator and the data looks like the original:
Lets have a look at the difference to the original:
orig.png (6.3 KB) orig.png | |||
withMiss.png (6.69 KB) withMiss.png | |||
afterFillmiss.png (6.39 KB) afterFillmiss.png | |||
diff2orig.png (5.41 KB) diff2orig.png |
RE: fillmiss method - Added by Ralf Mueller over 11 years ago
Brendan DeTracey wrote:
Thanks for the pictures. But I had already made something similar myself and ir does not really clarify the method fillmiss uses. If I was to guess, I would say the algorithm finds the closest four cardinal points and does a weighted average. That is, it is non recursive.
Can you construct an example to illustrate the difference between the two? A check on this with CDO might clarify its behavior.
RE: fillmiss method - Added by Brendan DeTracey over 11 years ago
Here is an example that unfortunately affirms my guess. A long thin strip is filled and the filled values are "contaminated" by the values at the ends of the strip. It would be nice if there was an alternative to fillmiss that filled points recursively in from the edges, similar to the paper I linked above, perhaps with an option for the number of recursions. This is generally what people(modelers) are looking for when extrapolating into missing values. fillmiss is great for small regularly shaped areas but not for larger irregularly shaped areas.
Thanks for your help.
RE: fillmiss method - Added by Brendan DeTracey over 11 years ago
Second attachment...
to_be_filled.nc (46 KB) to_be_filled.nc |