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

process_custom_climate_data inefficiently reads all data to disk #1439

Closed
fmaussion opened this issue Jul 13, 2022 · 0 comments · Fixed by #1465
Closed

process_custom_climate_data inefficiently reads all data to disk #1439

fmaussion opened this issue Jul 13, 2022 · 0 comments · Fixed by #1465
Assignees

Comments

@fmaussion
Copy link
Member

process_custom_climate_data is highly inefficiently reading all data to disk before subsetting. This is happening here:

oggm/oggm/core/climate.py

Lines 119 to 122 in 154c01e

temp = nc_ts.get_vardata('temp')
prcp = nc_ts.get_vardata('prcp')
hgt = nc_ts.get_vardata('hgt')
ttemp = temp[:, ilat-1:ilat+2, ilon-1:ilon+2]

This is really not how this should be done (subsetting should happen before the read)

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