openghg / openghg_inversions

University of Bristol Atmospheric Chemistry Research Group RHIME Inversion code (with openghg dependency)
MIT License
5 stars 0 forks source link

Raise error if `H` or `Hbc` have NaNs #96

Open brendan-m-murphy opened 2 months ago

brendan-m-murphy commented 2 months ago

If H or Hbc have NaNs, then pymc will raise a confusing error says that sampling couldn't be initialised. This is because every value for y has zero probability, so the logp value is negative infinite.

Adding a check for NaNs before sampling would make it easier to diagnose this problem.