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

Hourly files created with no valid current data are ignored and not p… #506

Merged
merged 3 commits into from
Jun 28, 2016

Conversation

ggalibert
Copy link
Contributor

…ushed to S3.

# Return True if netcdf file includes at least 1 current measurement != NaN
retval = True
F = Dataset(nc_file, mode='r')
if F['UCUR'][:].mask.all() & F['VCUR'][:].mask.all():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may not make a difference in some cases, but I think you want the boolean operator and here.
& means bitwise AND.

@ggalibert
Copy link
Contributor Author

Thanks for your feedback @mhidas . If you're happy with newly added commits to address your comments I will squash them into one.

@mhidas
Copy link
Contributor

mhidas commented Jun 28, 2016

@ggalibert Looks good. Squash away!
Just a general comment though, it looks like there's a bit of code redundancy between wera.py and codar.py that could be refactored at some point.

@mhidas mhidas merged commit 8c85ed4 into master Jun 28, 2016
@mhidas
Copy link
Contributor

mhidas commented Jun 28, 2016

@ggalibert I let GitHub do the squashing. Hope you don't mind.

@mhidas mhidas deleted the acorn_ignore_hourly_without_data branch June 28, 2016 03:15
@ggalibert ggalibert restored the acorn_ignore_hourly_without_data branch July 4, 2016 06:59
@ggalibert ggalibert deleted the acorn_ignore_hourly_without_data branch July 4, 2016 07:13
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 this pull request may close these issues.

2 participants