AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
58 stars 23 forks source link

Catch missing RO2 species error when prepping #457

Closed kilicomu closed 3 years ago

kilicomu commented 3 years ago

Adds an exception where an RO2 species is encountered in the RO2 sum of the mechanism file but isn't encountered in the mechanism species list.

We shouldn't get to a point where there is an RO2 species in mechanism.ro2 that isn't in the full species list in the mechanism, so I think the user needs to correct their mechanism before building and running the model, as opposed to a warning being shown and them being allowed to erroneously continue.

I had a look at adding some error handling to the ro2Sum function in outputFunctions.f90 - it is a pure function which disallows error stop. I think there would be a bit too much unpicking to make that error handling neat, so I avoided it.

Let me know what you think - happy to make changes as requested.

Closes #453

codecov[bot] commented 3 years ago

Codecov Report

Merging #457 (283e1b6) into master (aeffeb2) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #457   +/-   ##
=======================================
  Coverage   65.51%   65.51%           
=======================================
  Files          17       17           
  Lines        2047     2047           
=======================================
  Hits         1341     1341           
  Misses        706      706           
Flag Coverage Δ
build 52.23% <ø> (ø)
tests 82.81% <ø> (ø)
unittests 31.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aeffeb2...283e1b6. Read the comment docs.