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

make skipping of "bad" stations easy #637

Closed
jgriesfeller opened this issue May 3, 2022 · 2 comments
Closed

make skipping of "bad" stations easy #637

jgriesfeller opened this issue May 3, 2022 · 2 comments
Assignees

Comments

@jgriesfeller
Copy link
Member

We had several discussions about skipping observation stations not being easy enough. This was basically due to the fact that many exceptions occur up ti 5 calling level lower than the actual station loop. While trying to implement a skipping procedure for #636 I think I have found the smoking gun to actually make that easy.
The station loop is here:

except (VarNotAvailableError, TimeMatchError, DataCoverageError) as e:
logger.warning(f"Failed to convert to StationData Error: {repr(e)}")
out_data["failed"].append([idx, repr(e)])
return out_data

As you can see there are already some exceptions that are handled. For #636 if I add the NotImplementedError exception, that station is just skipped and the code does what it should do.

The same should be possible with other exceptions.

Let's discuss that in the next user meeting

@jgriesfeller jgriesfeller self-assigned this May 3, 2022
@jgriesfeller
Copy link
Member Author

I think if we added StationCoordinateError to the list of exceptions, the stations with a too high distance would be ignored as well:

if maxdiff > tol:
raise StationCoordinateError(
f"meas point coordinate arrays of {key} vary "
f"too much to reduce them to a single "
f"coordinate. Order of difference in {key} is "
f"{maxdiff} and maximum allowed is {tol}."
)

@jgriesfeller
Copy link
Member Author

clarified by #652. closing this issue since the primary suggestion has been implemented through #641

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

Successfully merging a pull request may close this issue.

1 participant