-
Notifications
You must be signed in to change notification settings - Fork 77
Add 'temporal', 'spatial_dim' and 'geo_scale' attributes to Covmodel #308
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
Merged
Merged
Changes from 36 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
7b86862
Covmodel: all kwargs after dim are now keyword only
MuellerSeb 985f62b
tests: minimal black fixes
MuellerSeb 83bcf13
covmodel: add time attribute
MuellerSeb 2ef2f6e
time: add time axis to plotter
MuellerSeb cab5baf
Examples: update examples with new time attribute
MuellerSeb e6867d6
pylint: ignore 'use-dict-literal', increase max limits
MuellerSeb a42daed
CovModel: add radius property; correctly scale time axis for latlon; …
MuellerSeb a4d3d3d
examples: use radius instead of rescale for latlon models now
MuellerSeb 456f34d
CovModel: update __repr__
MuellerSeb bd536f8
CovModel: rename 'radius' to 'geo_scale' and add more scales
MuellerSeb cc6d75b
Better geo_scale documentation
MuellerSeb 4746c8d
examples: fix typo
MuellerSeb af6f522
vario: rename 'bin_centres' to 'bin_center' following doc-string
MuellerSeb 81e9616
tools: add great_circle_to_chordal; add radius to chordal_to_great_ci…
MuellerSeb 97c30b4
vario: add geo_scale to variogram estimation routines
MuellerSeb b96f844
vario: forward kwargs to standard_bins routine
MuellerSeb 5486a1c
examples: update examples for geo_scale
MuellerSeb 1e21465
debug fix
MuellerSeb 14ccf3d
update latlon auto-bin example with geo_scale
MuellerSeb 8223e2b
examples: update readme for geo_scale
MuellerSeb d8a1309
krige: auto fitting not possible for spatio-temporal latlon models; u…
MuellerSeb 868d4b1
CovModel: spatial vario/cov/cor now also use xyz with latlon models
MuellerSeb 12012c6
plot: minor fixes for latlon
MuellerSeb db3e019
CovModel: rename 'time' to 'temporal'
MuellerSeb 2f97808
geo_scale: better docs; always use KM_SCALE in examples
MuellerSeb c672237
Plot: minor fixes for st plots
MuellerSeb b62550c
Krige: bugfix for renamed attribute temporal
MuellerSeb 1e47ab7
CovModel: prevent rotation between spatial and temporal dims
MuellerSeb e821a6a
CovModel: saver setting of anis
MuellerSeb 677fd1a
minor f-string fix
MuellerSeb f4bc0d1
test temporal related stuff
MuellerSeb fad4afe
more temporal tests
MuellerSeb 44e174c
CovModel: add 'spatial_dim' argument
MuellerSeb 0ece19c
minor f-string fixes
MuellerSeb 02806be
update changelog
MuellerSeb d44c819
CovModel: be less strict about key-word-only args (don't want to both…
MuellerSeb 8efe29d
variogram: rename bin_center to bin_centers
MuellerSeb 6356ce0
changelog: minor fix
MuellerSeb e72bfef
vario: revert moving code-block
MuellerSeb 0881384
changelog: minor markdown fixes
MuellerSeb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| """ | ||
| Working with spatio-temporal lat-lon fields | ||
| ------------------------------------------- | ||
| In this example, we demonstrate how to generate a spatio-temporal | ||
| random field on geographical coordinates. | ||
| First we setup a model, with ``latlon=True`` and ``temporal=True``, | ||
| to get the associated spatio-temporal Yadrenko model. | ||
| In addition, we will use a kilometer scale provided by :any:`KM_SCALE` | ||
| as ``geo_scale`` to have a meaningful length scale in km. | ||
| By default the length scale would be given in radians (:any:`RADIAN_SCALE`). | ||
| A third option is a length scale in degrees (:any:`DEGREE_SCALE`). | ||
| To generate the field, we simply pass ``(lat, lon, time)`` as the position tuple | ||
| to the :any:`SRF` class. | ||
| We will set a spatial length-scale of `1000` and a time length-scale of `100` days. | ||
| """ | ||
| import numpy as np | ||
|
|
||
| import gstools as gs | ||
|
|
||
| model = gs.Matern( | ||
| latlon=True, | ||
| temporal=True, | ||
| var=1, | ||
| len_scale=[1000, 100], | ||
| geo_scale=gs.KM_SCALE, | ||
| ) | ||
|
|
||
| lat = lon = np.linspace(-80, 81, 50) | ||
| time = np.linspace(0, 777, 50) | ||
| srf = gs.SRF(model, seed=1234) | ||
| field = srf.structured((lat, lon, time)) | ||
| srf.plot() | ||
MuellerSeb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.