SeisModels.jl
SeisModels.jl: A Julia package for models of the Earth's interior - Published in JOSS (2020)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
2 of 7 committers (28.6%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
Seismic models of the interior of the Earth and other planets
Basic Info
- Host: GitHub
- Owner: anowacki
- License: other
- Language: Julia
- Default Branch: master
- Size: 1.01 MB
Statistics
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
- Releases: 11
Topics
Metadata Files
README.md
SeisModels.jl
Build status
Documentation
Publication status
What is SeisModels.jl?
A Julia package for dealing with models of the Earth's (and other quasi-1D planets') seismic properties.
Currently, only three kinds of one-dimensional models are supported, but all model parameterisations and models are acceptable for inclusion. Contributions are welcome.
Built in models are listed in the documentation.
How to install
SeisModels.jl can be added to your Julia install like so:
julia
julia> import Pkg; Pkg.add("SeisModels")
How to use
Model types
The module defines the SeisModel type and subtypes of this specify the kind of model (i.e., symmetry, nature of basis function, etc.).
```julia julia> using SeisModels
julia> subtypes(SeisModel) 1-element Array{Any,1}: SeisModel1D
julia> subtypes(SeisModel1D) 3-element Array{Any,1}: LinearLayeredModel PREMPolyModel SteppedLayeredModel ```
So, there are currently three types of models implemented, all 1D models, with polynomial, linear or constant basis within each layer.
Calculating properties
You can either create your own models by creating a new instance of one of the immutable types, or use the inbuilt models. For instance, for PREM, one can evaluate at an arbitrary radius:
- VP
- VS
- density ρ
- anisotropic parameters VPH, VPV, VSH, VSV and η
Calculate these by calling the function with the model as the first argument:
```julia julia> vp(PREM, 3500) 13.71171655163979
julia> Qκ(PREM, 1000) 1327.7
julia> density(AK135, radius(AK135, 20)) 2.449 ```
In the last example, we used the radius function to convert depth in the AK135 model
to radius and calculate the density at 20 km depth. Some functions also accept the
depth keyword argument to instead evaluate properties at a point below the surface:
julia
julia> density(AK135, radius(AK135, 20)) == density(AK135, 20, depth=true)
true
You can also evaluate values programmatically (i.e., where the parameter of
interest is a variable) by using the exported evaluate function, and broadcast
the call to get multiple values:
```julia julia> evaluate(AK135, :vp, 3580) 13.653094354838709
julia> parameters = (:vp, :vs, :density);
julia> evaluate.(AK135, parameters, 3680) (13.591187999999999, 7.226264, 5.4003499999999995) ```
Model input and output
Support for reading and writing model files is currently limited. However, SeisModels
does support reading and writing of
Mineos-format ‘tabular’ models
(i.e., SteppedLayeredModels) via the read_mineos and write_mineos functions.
Reference
Exported types
SeisModel: Abstract supertype of all modelsSeisModel1D: Abstract supertype of 1D modelsLinearLayeredModel: 1D model with linearly-varying properties between node pointsPREMPolyModel: 1D model defined by PREM-style polynomials (of arbitrary degree)SteppedLayeredModel: 1D model with constant properties between node points
Exported model instances
- Earth
AK135IASP91PREMPREM_NOOCEANSTW105
- Moon
MOON_WEBER_2011
Exported functions
Model properties
depth: Return depth in km given a radius and modelhasattenuation: Whether a model includes attenuationhasdensity: Whether a model includes densityisanisotropic: Whether a model is anisotropicradius: Return radius in km given a depth and modelsurface_radius: Radius in km of planet
Evaluation functions
evaluate: Evaluate a given field for a model at any radiusvp: P-wave velocity in km/svs: S-wave velocity in km/sdensity: Density in g/cm^3vph: Horizontal P-wave velocity in km/svpv: Vertical (radial) P-wave velocity in km/svsh: Horizontally-polarised S-wave velocity in km/svsv: Vertically-polarised S-wave velocity in km/seta: Anisotropic parameterQμ,Qmu: Shear quality factorQκ,Qkappa: Bulk quality factor
Derived properties
bulk_modulus: Bulk modulus (K) in Pagravity: Acceleration due to gravity in m/s^2 at a given radiusmass: Mass in kg from centre of model to a given radiusmoment_of_inertia: MOI in kg m^2poissons_ratio: Poisson's ratiopressure: Pressure in Pashear_modulus: Shear modulus (G) in Pasurface_mass: Mass between two radiiyoungs_modulus: Young's modulus in Pa
IO
read_mineos: Read Mineos tabular-format filewrite_mineos: Write Mineos tabular-format fileread_tvel: Write tvel-format filewrite_tvel: Write tvel-format file
Getting help
Types and methods are documented, so at the REPL type ? to get a help?>
prompt, and type the name of the function:
```julia help?> PREMPolyModel search: PREMPolyModel
PREMPolyModel <: SeisModel1D
Type describing the Earth as a set of layers within which properties vary according to a set of polynomials.
Physical parameters are represented by arrays of size (order+1,n), where n is the number of layers, and order is the order of polynomial which is used to represent the parameter. Hence a constant layer has size (1,n), and to compute the value of x in layer i, for an Earth radius of a km, at a radius of r km, the expression is:
val_x = x[i,1] + (r/a)x[i,2] + (r/a)^2x[i,3] ... (r/a)^order*x[i,order+1]
```
Citing
If you use SeisModels.jl for your work, please cite the following paper: - Nowacki, A., 2020. SeisModels.jl: A Julia package for models of the Earth’s interior. Journal of Open Source Software 5, 2043. doi:10.21105/joss.02043
Owner
- Name: Andy Nowacki
- Login: anowacki
- Kind: user
- Website: http://homepages.see.leeds.ac.uk/~earanow/
- Repositories: 57
- Profile: https://github.com/anowacki
Lecturer at the School of Earth and Environment, University of Leeds, studying the Earth's deep interior.
JOSS Publication
SeisModels.jl: A Julia package for models of the Earth's interior
Tags
geophysics seismology EarthGitHub Events
Total
- Watch event: 1
- Delete event: 1
- Push event: 4
- Pull request event: 3
- Create event: 2
Last Year
- Watch event: 1
- Delete event: 1
- Push event: 4
- Pull request event: 3
- Create event: 2
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Andy Nowacki | a****i@l****k | 99 |
| dependabot[bot] | 4****] | 5 |
| Andy Nowacki | a****i@b****k | 4 |
| adigitoleo | a****o@d****m | 3 |
| femtocleaner[bot] | f****] | 1 |
| Julia TagBot | 5****t | 1 |
| CompatHelper Julia | c****y@j****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 2
- Total pull requests: 18
- Average time to close issues: 6 months
- Average time to close pull requests: 12 days
- Total issue authors: 2
- Total pull request authors: 5
- Average comments per issue: 4.0
- Average comments per pull request: 0.5
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 6
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 8 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- JuliaTagBot (1)
- adigitoleo (1)
Pull Request Authors
- dependabot[bot] (10)
- anowacki (8)
- adigitoleo (2)
- github-actions[bot] (1)
- JuliaTagBot (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 3 total
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 11
juliahub.com: SeisModels
Seismic models of the interior of the Earth and other planets
- Documentation: https://docs.juliahub.com/General/SeisModels/stable/
- License: MIT
-
Latest release: 1.6.1
published almost 2 years ago
Rankings
Dependencies
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- julia-actions/setup-julia latest composite
- JuliaRegistries/TagBot v1 composite
