Skip to content

Why does manipulating xarrays inside a function takes up so much memory permanently? #6479

Answered by mchoblet
mchoblet asked this question in Q&A
Discussion options

You must be logged in to vote

Got a tip on stack overflow: It seems like the groupby and resampling operations are working on my initial dataset ds. Deleting it afterwards frees up the space, thus I just insert a ds=ds.copy() at the beginning of the function to avoid the problem.
Of course I'm still open for suggestions regarding better workflow/optimized memory use for this type of tasks.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by mchoblet
Comment options

You must be logged in to vote
2 replies
@mchoblet
Comment options

@max-sixty
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants