gadget-framework/gadget3

Mean of first/last 5 values for missing values g3_param_table()

Closed this issue · 2 comments

It'd be nice to be able to say "mean(i)" for ifmissing, i.e. get the mean of i values either from the start or end, depending on which end you fell off. Possibly this should even be the default, for projection / hindcast it'd be the most obvious thing to do.

Whilst this could be relatively easily implemented in C++ (which uses a std::map with an ordering), R doesn't have anything like that available, possibly a condition would have to be generated at compile time?

@bthe @willbutler42 The above stops ifmissing being a fatal error at least, so you can at least find these problems without resorting to gdbsource().

I'm fairly sure that this would have been a stop-gap for #181 (a combined dnorm/rnorm projection wotsit), and we might as well just do that now and not bother with this.