The "elements" contain indexes referred to longitude and latitude values, and account on these 2 to find the triangle vertices. When subsetting longitude and latitude this indexing gets lost, since the elements are still bounded to the original positions.
Possible solutions:
- Get a longitude and latitude range like [:N], so that every index from 0 to N will stay in the same place even after the subsetting. Pros&Cons: fast to implement, but you can't select a specific region now(for a pilot data GNN testing it should still be ok).
- Put the subset indexes in a dictionary along with the lon and lat coordinates, so that the original indexing is preserved. Pros&Cons: more time-consuming to implement and more data to store, with the advantage of being able to select a specific region(again, this should not be a fundamental feature for the proof of concept).
- Keep the original longitude and latitude variables and just cut the edges. In this way you can reduce the heaviest variable(the edges) while keeping the ordering of indexes.
- (optional) Search in the notebooks if the guys at AWI had a similar problem when subsetting lon and lat.
The "elements" contain indexes referred to longitude and latitude values, and account on these 2 to find the triangle vertices. When subsetting longitude and latitude this indexing gets lost, since the elements are still bounded to the original positions.
Possible solutions: