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

Feature request: Write rasters to disc #22

Open
geryan opened this issue Jun 20, 2019 · 5 comments
Open

Feature request: Write rasters to disc #22

geryan opened this issue Jun 20, 2019 · 5 comments

Comments

@geryan
Copy link

geryan commented Jun 20, 2019

Would be totes fab to be able to specify a filepath/pattern and write output rasters to disc rather than forcibly hold them in memory when running simulation.

Especially for long runs and large habitat suitability inputs this would help memory management much more betterer.

@geryan
Copy link
Author

geryan commented Jun 22, 2019

NB reading rasters from disc makes the plot method very slow, in particular getting the population size. Using future_lapply instead of lapply in get_pop_replicate can significantly improve this

@goldingn
Copy link
Collaborator

raster should automatically be reading and writing rasters from disk (in a temporary file directory) if it looks like you don't have enough memory for each object. You can control this behaviour a bit with rasterOptions()

Agreed there could be more use of parallelism in the plotting bit

@geryan
Copy link
Author

geryan commented Oct 8, 2019

The other part of the issue I guess isn't the writing to disk per se, but being able to save, export and read-in results later, which isn't easily managed from temp files.

@cvisintin
Copy link
Collaborator

Can you please expand upon this bit:
"being able to save, export and read-in results later, which isn't easily managed from temp files"
What is your current workflow? What is difficult? What would you like the behaviour to be?

@geryan
Copy link
Author

geryan commented Nov 14, 2019

I guess it's OK if the rasters are in memory, you can export and read in again later. If the rasters are large and written to a temp file somewhere then it's not possible to simply export the results object to read in elsewhere because the temp files will be missing.

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

No branches or pull requests

3 participants