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

retrieveData overwrites cache setting of calc function #216

Open
robinhasse opened this issue Sep 9, 2024 · 2 comments
Open

retrieveData overwrites cache setting of calc function #216

robinhasse opened this issue Sep 9, 2024 · 2 comments
Assignees
Labels

Comments

@robinhasse
Copy link
Contributor

robinhasse commented Sep 9, 2024

If the list returned by a calc function contains cache = FALSE, no cache file should be written for this calculation. This works well when running this calculation through calcOutput. But if I run retrieveData, the cache setting of the calc function is overwritten and madrat tries to save a cache file for the calc function even though this has been disabled. I guess, this is not intended, right?

@tscheypidi
Copy link
Member

You want to disable caching for a calc-Function completely, right? This should be done by specifying cache=FALSE in the return list of the calc function (similarly like it is done here for a read function: https://github.com/pik-piam/mrdownscale/blob/52c475dcd31a408f5bfe031bf9964894da761abe/R/readLUH2v2h.R#L55)

@robinhasse
Copy link
Contributor Author

This should be done by specifying cache=FALSE in the return list of the calc function

I did precisely this but this was only effective when running the respective calcOutput call. When I ran the calc function through retrieveData -> calcOutput -> calc function with cache = FALSE, madrat still tried to write a cache file.

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

No branches or pull requests

2 participants