ET-NCMP / NCMP

Software in R for calculating National Climate Monitoring Products
5 stars 1 forks source link

Region Average - Explore robust solutions to matrix inversion #59

Open ET-NCMP opened 6 years ago

ET-NCMP commented 6 years ago

At the moment the PrA index causes numerical problems in the P4_Region_Average script when the matrix is inverted. It's not clear why this is, but scaling the PrA values down by a factor of 100 fixes the problem for the UK (the results have to be scaled back up afterwards). This "fix" was appiled in P3_Variogram, P3_Variogram_Interactive and P4_Region_Average.

A less arbitrary fix would be preferable.

ET-NCMP commented 6 years ago

Some additional changes were made to the way that the variograms were fit to the data. This ensures that the variogram always passes through zero. This will fix some numerical problems, but it may cause others. For example, if two stations have the same location. This shouldn't happen very often.

One thing to do in a P-zero script would be to flag up stations with the same latitude and longitude as each other.