openghg / openghg_inversions

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

Test `get_data` and running inversions separately #52

Closed brendan-m-murphy closed 5 months ago

brendan-m-murphy commented 8 months ago

Now that there is a get_data function, we can test get_data vs. a fixed merged data file, and then use fixed merged data for the inversions tests.

The basis function wrapper could also be tested separately, and possible the post processing code.

pearson01 commented 8 months ago

Getting an error when trying to run an inversion with the example ini file. The get_data function can't seem to find obs data (TAC, ch4) which is preventing the combined_scenario from being created. The error message is:

UnboundLocalError: local variable 'scenario_combined' referenced before assignment

@brendan-m-murphy

EricSaboya commented 7 months ago

The error @pearson01 found should now be fixed in the update get obs branch

brendan-m-murphy commented 7 months ago

I'm guessing the fix was the part that throws an error if all of the sites are dropped?

I'll make sure to add some test cases where some/all data can't be found.

EricSaboya commented 7 months ago

Exactly! I just added an if statement to exit the process if no site data are found before it gets to the line with scenario_combined.mf.units, which was what was raising this error

brendan-m-murphy commented 5 months ago

This was closed by PR #73