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

Writing temporary intermediate grids to disk #60

Closed
Devaraj-G opened this issue Jul 7, 2021 · 5 comments
Closed

Writing temporary intermediate grids to disk #60

Devaraj-G opened this issue Jul 7, 2021 · 5 comments

Comments

@Devaraj-G
Copy link
Collaborator

How important is to write resampled.nc, original.nc, diff.nc and diff.xyz and others (?) to disk after an update?
When there are large number of input files, this creates significant I/O overhead.

@JamieJQuinn
Copy link
Collaborator

Unfortunately it's how we use GMT when the appropriate functionality isn't in pyGMT... Nothing we can do without touching pyGMT.

@Devaraj-G
Copy link
Collaborator Author

Ah ok!
This means that the number of bathymetry files should be reduced as much as possible.
gdal_merge.py seems to be the option.

@alessandrofelder
Copy link
Collaborator

Not sure if it matters, as pyGMT typically does a quite similar thing under the hood, I think? We'll write small amount of data many times or a large amount once, but the data that needs writing will be the same?

@JamieJQuinn
Copy link
Collaborator

Actually, there is an alternative. It seems like pyGMT has an API (see the documentation) to talk to GMT through virtual files. This could remove the need for these temporary files but I'm unsure if I can get it working today.

@alessandrofelder I think the virtual files thing somehow removes the need to actually write anything to disk. Unsure how it actually works but I imagine you can trick GMT into reading from RAM instead.

@JamieJQuinn
Copy link
Collaborator

The performance-critical part (the call to nearneighbour) now operates identically to other pyGMT commands. This will be a formal part of PyGMT once the pull request is merged.

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