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

[JOSS review] Improve cartesian indexing system #23

Closed
chenyangkang opened this issue Jan 17, 2024 · 2 comments
Closed

[JOSS review] Improve cartesian indexing system #23

chenyangkang opened this issue Jan 17, 2024 · 2 comments
Labels
enhancement New feature or request JOSS review Solve issues during JOSS review

Comments

@chenyangkang
Copy link
Owner

chenyangkang commented Jan 17, 2024

This issue is to solve the problems in cartesian indexing system. Suggestions proposed by [at]jedalong (openjournals/joss-reviews#6158)


In the mallard example you use 50 spatial and temporal blocks for the global distribution of mallards.
That is, if the data X have longitude ranging from (-180, 180), latitude ranging from (-90, 90), and whole year data (1, 366), each block will approximately contain data of 7.2 longitude (about 720km), 3.6 latitude (about 360km), and 7 days, which approximately catch the spatiotemporal scale of bird migration. These are rough estimates to get a sense of the scale.

One degree of longitude is always about 110km so 7.2 km is about 792 km. The big issue is that 1 degree of latitude varies from 110km at the equator to 0 km at the poles, so the area of your blocks varies greatly from equator to pole. Gridding data on the globe without accounting for the spherical geometry of the earth is problematic (your package is not alone in ignoring this major issue). Could you instead allow the users to pass in spatial objects or define bins based on actual geometry so that bins are more equally sized to reflect global distribution data.

TODO:

  1. Edit the notebook. Change the specific number (720km? 792km?) and add caveat for distortion problem towards the poles.2.
  2. Allow user to pass parameters of actual geometry.

To me it would be more approparite for a user to pass in a single parameter associated with the desired output spatial resolution of the grid size (e.g., grids with a size of 100km x 100km) and then the package would create the grid on the fly from a single parameter. You expecte 4 parameters for this same gridding process? I note that your package s does not force grid cells to be square in area, which is IMO unusual.

TODO:
3. reduce the number of parameters.


This issue is further demonstrated in the Tips section for using a different coordinate system where the user must pass in 1000 to 10000 m as the range for "latitude" and "longitude" values in another coordinate system that does not use latidtude and longitude but rather x and y.

TODO:
4. Not related but consider: Allow concrete gridding parameters instead of only "adaptive".

@chenyangkang chenyangkang added enhancement New feature or request JOSS review Solve issues during JOSS review labels Jan 17, 2024
@chenyangkang
Copy link
Owner Author

chenyangkang commented Jan 17, 2024

Progress

  1. Done
  2. There are several reasons that I wish to keep the current settings at least for the AdaSTEM modules:
  • The map gets more spherical on earth as the spatial expansion increases, and there is not single solution to preserve both area and distance on a 2D plane. I'm considering this by providing a spherical indexing system.
  • User can still specify the actually geometry, after projecting to a desired CRS (depend on the needs).
  • The problem is less concerned when user use AdaSTEM, the gridding steps of which are heavily led by data abundance. The more abundant the data is, the finer gridding it can be. In that case, latitudinal distortion is less likely a main driver of model performance.
  • The original AdaSTEM model use the longitude and latitude coordinates.
  1. I have reduced the number of parameters for the gridding process (from 4 to 2), forcing the grid to be square. Documentations are updated correspondingly.
  2. Currently working on [Feature] STEM module #27 to solve this.

chenyangkang added a commit that referenced this issue Jan 17, 2024
@chenyangkang
Copy link
Owner Author

Close with #26 #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request JOSS review Solve issues during JOSS review
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant