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

[Suggestion] Support handling geographical data with a time component #223

Closed
tcchiao opened this issue Dec 6, 2021 · 1 comment · Fixed by #308
Closed

[Suggestion] Support handling geographical data with a time component #223

tcchiao opened this issue Dec 6, 2021 · 1 comment · Fixed by #308
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tcchiao
Copy link

tcchiao commented Dec 6, 2021

Hi there, I recently came across the GSTools package and think that this could be perfect in helping me accomplish my goal -- generating random fields according to the correlation lengths of spatio-temporal data (e.g. precipitation data with lat, lon, time as the dimensions). I especially appreciate the option latlon=True since it is not trivial to find a correlation length in degree when 1 degree can mean very different distances at different latitudes. I found that my workflow is still rather complex due to the limitation that the input data has to be 2D in order to use the latlon option (detailed description of the workflow below). Since processing spatio-temporal data is a fairly common problem, I was wondering if you have considered adding support for using 3D or 4D data while two of the dimensions are lat/lon? Alternatively, if there is a working pattern for handling spatio-temporal data with the current functionality, an example would be greatly appreciated.

Currently, my workflow consists of two steps:

  1. Find the correlation lengths of the source data. To do this I'm first getting the spatial correlation length using latlon=True option (with each time point being different examples), then find the temporal correlation length separately (with each location being different examples);
  2. Generate the random fields using this correlation length. To do this, I first project the lat/lon grid I want into an equidistant projection and also scale the spatial correlation length into meters. I then generate a 3D random field with the correlation lengths in units of (meters, meters, day). Finally, I reproject the 3D random field back into lat/lon grid. The reprojections are needed since the latlon option is not available if I'd like to generate random fields that are more than 2D.

Thanks for working on this great package and looking forward to hearing your thoughts!

@MuellerSeb
Copy link
Member

Hello there!

Thank you for your investigation. This is of course a problem, since latlon=True fixes the spatial dimension at 3. We would need another switch to add a time dimension. Maybe just a time=True to append a time dimension.

In the future we would also like to provide a separate module for spatio-temporal modelling, since at the moment we only provide metric ST models in a rather hacky way. But this could be first step to prepare the present models for this.

Thanks again for looking into this.

@MuellerSeb MuellerSeb added the enhancement New feature or request label Apr 20, 2022
@MuellerSeb MuellerSeb self-assigned this Apr 20, 2022
@MuellerSeb MuellerSeb added this to the v1.4 milestone Apr 20, 2022
@MuellerSeb MuellerSeb modified the milestones: v1.4, v1.5 Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants