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

try to fix airnow files with strange file encodings #895

Merged
merged 32 commits into from
Oct 26, 2023

Conversation

jgriesfeller
Copy link
Member

Another approach:
determine file encoding beforehand and provide pandas with that

@jgriesfeller jgriesfeller self-assigned this Aug 14, 2023
@jgriesfeller jgriesfeller linked an issue Aug 14, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Attention: 82 lines in your changes are missing coverage. Please review.

Comparison is base (47a645c) 79.45% compared to head (b50be24) 79.09%.

Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev     #895      +/-   ##
============================================
- Coverage     79.45%   79.09%   -0.36%     
============================================
  Files           103      103              
  Lines         17821    17910      +89     
============================================
+ Hits          14159    14166       +7     
- Misses         3662     3744      +82     
Flag Coverage Δ
unittests 79.09% <31.09%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pyaerocom/io/read_airnow.py 66.13% <31.09%> (-32.02%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgriesfeller
Copy link
Member Author

This is till not the final solution because it takes far too much RAM reading the entire dataset since the file reader reads all variables and keeps all that data in RAM. On the other hand the variables are read by aeroval variable by variable so the multi variable reading ability of the current reader is entirely useless.
This needs to be optimised so that only one variable is read at a time.
As it is now for reading reading vmro3 60GB of RAM are not enough.

@jgriesfeller
Copy link
Member Author

Just for documentation: Not even 75GB is enough to read vmro3

@jgriesfeller jgriesfeller marked this pull request as ready for review October 17, 2023 09:08
@jgriesfeller
Copy link
Member Author

jgriesfeller commented Oct 17, 2023

Just as comment: The earlier years (rep 2017) will be added as utf-8 encoded files. Producing them is external work.

pyaerocom/io/read_airnow.py Show resolved Hide resolved
pyaerocom/io/read_airnow.py Show resolved Hide resolved
pyaerocom/io/read_airnow.py Show resolved Hide resolved
pyaerocom/io/read_airnow.py Outdated Show resolved Hide resolved
pyaerocom/io/read_airnow.py Show resolved Hide resolved
@lewisblake lewisblake self-requested a review October 26, 2023 13:07
Copy link
Member

@lewisblake lewisblake left a comment

Choose a reason for hiding this comment

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

🎃

@jgriesfeller jgriesfeller merged commit b551b08 into main-dev Oct 26, 2023
19 of 21 checks passed
@jgriesfeller jgriesfeller deleted the griesie-fix-890-airnow-reader-crashing branch October 26, 2023 13:09
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.

AirNow reader crashing
2 participants