xgcm / aerobulk-python

A python wrapper for aerobulk (https://github.com/brodeau/aerobulk)
GNU General Public License v3.0
14 stars 4 forks source link

Introduce a value range check on the numpy level #43

Closed jbusecke closed 2 years ago

jbusecke commented 2 years ago

I have implemented a checking function on the numpy level that can be turned on/off. This function checks the 'shrunken' arguments for nans and values that are out of the allowed range. This should completely eliminate the need for propagating errors from the fortran level (#4, #11), since we are now catching eveything that would lead to a STOP in fortran at the python level.

jbusecke commented 2 years ago

@paigem if you think those changes are sufficient, I think we can merge this after the tests pass.

jbusecke commented 2 years ago

I think once this is done, we could release either 0.3.0 (since this has quite a few major new features) or 0.2.6. Maybe @paigem wants to do the release?

paigem commented 2 years ago

Ooh I don't even know where to start in making a release! But maybe that would be a good learning opportunity.

Also, the CI tests didn't all pass. Looks like the test_range_check_nan() is raising an AssertionError from line 80 for each variable. @jbusecke

jbusecke commented 2 years ago

Ooh I don't even know where to start in making a release! But maybe that would be a good learning opportunity.

That would be the point 😜. Also its pretty easy (if things dont break haha).

jbusecke commented 2 years ago

Thanks for fixing the CI!