Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oceansdb / normbias bug #184

Open
bkatiemills opened this issue Aug 8, 2016 · 6 comments
Open

oceansdb / normbias bug #184

bkatiemills opened this issue Aug 8, 2016 · 6 comments
Labels

Comments

@bkatiemills
Copy link
Member

Profile 560968 throws an error when oceansdb 0.6.0 fails to extract climatology information, throwing the error Sorry, I was not able to extract the climatology. Profile content:

C343965609689910199412 712202220216643830002110 21101022501002731911110018110222
12203422244338882291102233110125411002711101299770201612702220000220280011000044
27703002202800442775200442821600331258005538268800442924300220250066493024000552
10270002202400552103360055212323003312320077412403200055214376003312240077414470
40005521642900220220077416537600055220534003312170055220672005523079400331216007
743100800005524617300331216005524651200

@bkatiemills bkatiemills added the bug label Aug 8, 2016
@s-good
Copy link
Contributor

s-good commented Aug 9, 2016

This profile is in the Red Sea (https://www.google.co.uk/maps/place/21%C2%B000'00.0%22N+38%C2%B018'00.0%22E/@21,29.3351565,5z/data=!4m5!3m4!1s0x0:0x0!8m2!3d21!4d38.3) so probably there is no climatology defined there.

I've looked at the oceansdb and woa_normbias code and it looks like in this situation it prints the error to screen and returns a qc result of 0 (not QCed), which I think that AutoQC will just assume as a pass.

Does AutoQC fail or just print the error to screen? If the latter then I think we are OK, but it might be good to suppress the output if possible.

@bkatiemills
Copy link
Member Author

Unfortunately I think it's worse than that - if you have a look at this line in oceansdb - there's a return statement after the error message, returning an implicit None instead of whatever the output was supposed to be. This results in AutoQC complaining about trying to pull a member out of None, which of course won't work, causing AutoQC to crash; there probably needs to be some checking to make sure the climatology exists before we proceed to try to use it.

@bkatiemills
Copy link
Member Author

bkatiemills commented Aug 16, 2016

there probably needs to be some checking to make sure the climatology exists before we proceed to try to use it.

Or, I guess, a try/except around this line, which is where things fall apart in AutoQC here. Unless @castelao has any suggestions about how to validate input to oceansdb's ProfileQC? If there really is no climatology available in some cases, a try/except is okay, but a bit heavy handed as it will do the same for all bugged tests since all of CoTeDe's qc tests go through this same test runner - I'd rather identify the specific problem early if possible.

@s-good
Copy link
Contributor

s-good commented Aug 16, 2016

I think I can see now where the problem is happening. The WOA normbias test in CoTeDe is set up and run in two steps. The second step is the actual test and this is robust to there being no climatology. The first step, which is a constructor for the WOA_NormBias object, runs the set_features function and this appears to not be.

I think this is something that needs to be fixed in CoTeDe. @castelao can you advise?

Other than that the try/except round the line that runs the QC is probably the best option for now.

@bkatiemills bkatiemills mentioned this issue Aug 24, 2016
@bkatiemills
Copy link
Member Author

going once going twice - I am going to try/except this at the end of the week if I don't hear a better idea.

@bkatiemills
Copy link
Member Author

Going to leave this open as #188 is about the most ham-fisted possible solution, just to get us moving before our October meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants