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

How to sort data cube in conversion of get_cell_cube? #13

Open
danlooo opened this issue Jun 7, 2023 · 0 comments
Open

How to sort data cube in conversion of get_cell_cube? #13

danlooo opened this issue Jun 7, 2023 · 0 comments

Comments

@danlooo
Copy link
Owner

danlooo commented Jun 7, 2023

We need to convert a geographic data cube to a cell data cube.
We need to read chunks, that are sorted by lat/lon, because the cube might be bigger than memory.
However, we want to write the cell cube sorted by cell_id, or don't we?
Does cell id order matter, there just different files on the same hard drive...
However, if we load chunks of lat/lon tiles, we must load at least everything for one cell but mybe we load even more (rectangular convex hull).
Maybe it is better to do this:

for cell_id in 1::num_cells:
    boundariy = get_boundary(grid, cell_id)
    chunck = get_chunk(boundary, geo_cube)
    cell_cube[cell_id] = mean(chunck)

Currently, we load rectangular lon/lat tile chunks and use matrix vector multiplication.

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

1 participant