harphub / harpIO

IO functions for HARP
https://harphub.github.io/harpIO/
Other
6 stars 16 forks source link

Check model elevation in ensemble members #76

Closed andrew-MET closed 2 years ago

andrew-MET commented 3 years ago

When read_forecast() outputs to sqlite it includes a column for model elevation. For multi-model ensembles the model elevation can be different for different members so sqlite_opts(..., remove_model_elev = TRUE) can be used to make sure that model elevation isn't written to the sqlite files.

However, on occasion it seems that different ensemble members from the same model can have slightly different model elevations, possible due to rounding or something else. In this instance it isn't enough for the error to say that the UNIQUE constraint fails. There needs to be a check of model elevations between ensemble members so that the user doesn't have to track down the source of the error.