Skip to main content

A Python wrapper for solid to compute solid Earth tides

Project description

Language CircleCI Conda Download Version License Citation

PySolid

The Python based solid Earth tides (PySolid) is a thin Python wrapper of the solid.for program (by Dennis Milbert based on dehanttideinelMJD.f from V. Dehant, S. Mathews, J. Gipson and C. Bruyninx) to calculate solid Earth tides in east, north and up directions (section 7.1.1 in the 2010 IERS Conventions). Solid Earth tides introduce large offsets in SAR observations and long spatial wavelength ramps in InSAR observations, as shown in the Sentinel-1 data with regular acquisitions and large swaths (Yunjun et al., 2022).

This is research code provided to you "as is" with NO WARRANTIES OF CORRECTNESS. Use at your own risk.

1. Install

PySolid is available on the conda-forge channel and the main archive of the Debian GNU/Linux OS. The released version can be installed via conda as:

# run "conda update pysolid" to update the installed version
conda install -c conda-forge pysolid

or via apt (or other package managers) for Debian-derivative OS users, including Ubuntu, as:

apt install python3-pysolid

Or build from source:

PySolid relies on a few Python modules as described in requirements.txt and NumPy's f2py to build the Fortran source code. You could use conda to install all the dependencies, including the Fortran compiler, or use your own installed Fortran compiler and pip to install the rest.

a. Download source code
# run "cd PySolid; git pull" to update to the latest development version
git clone https://github.com/insarlab/PySolid.git
b. Install dependencies
# option 1: use conda to install dependencies into an existing, activated environment
conda install -c conda-forge fortran-compiler --file PySolid/requirements.txt --file PySolid/tests/requirements.txt

# option 2: use conda to install dependencies into a new environment, e.g. named "pysolid"
conda create --name pysolid fortran-compiler --file PySolid/requirements.txt --file PySolid/tests/requirements.txt
conda activate pysolid

# option 3: have a Fortran compiler already installed and use pip to install the rest dependencies
python -m pip install -r PySolid/requirements.txt -r PySolid/tests/requirements.txt
c. Install PySolid
# option 1: use pip to install pysolid into the current environment
python -m pip install PySolid

# option 2: use pip to install pysolid in develop mode (editable) into the current environment
python -m pip install -e PySolid

# option 3: manually compile the Fortran code and setup environment variable
cd PySolid/src/pysolid
f2py -c -m solid solid.for
export PYTHONPATH=${PYTHONPATH}:~/tools/PySolid
d. Test the installation

To test the installation, run the following:

python -c "import pysolid; print(pysolid.__version__)"
python PySolid/tests/grid.py
python PySolid/tests/point.py

2. Usage

PySolid could compute solid Earth tides in two modes: point and grid. Both modes produce displacement in east, north and up directions.

  • Point mode: compute 1D tides time-series at a specific point for a given time period
  • Grid mode: compute 2D tides grid at a specific time for a given spatial grid

2.1 Point Mode [notebook]

import datetime as dt
import pysolid

# prepare inputs
lat, lon = 34.0, -118.0                 # point of interest in degree, Los Angles, CA
step_sec = 60 * 5                       # sample spacing in time domain in seconds
dt0 = dt.datetime(2020, 1, 1, 4, 0, 0)  # start date and time
dt1 = dt.datetime(2021, 1, 1, 2, 0, 0)  # end   date and time

# compute SET via pysolid
dt_out, tide_e, tide_n, tide_u = pysolid.calc_solid_earth_tides_point(
    lat, lon, dt0, dt1,
    step_sec=step_sec,
    display=False,
    verbose=False,
)

# plot the power spectral density of SET up component
pysolid.plot_power_spectral_density4tides(tide_u, sample_spacing=step_sec)

2.2 Grid Mode [notebook]

import datetime as dt
import numpy as np
import pysolid

# prepare inputs
dt_obj = dt.datetime(2020, 12, 25, 14, 7, 44)
meta = {
    'LENGTH' : 500,                # number of rows
    'WIDTH'  : 450,                # number of columns
    'X_FIRST': -126,               # min longitude in degree (upper left corner of the upper left pixel)
    'Y_FIRST': 43,                 # max laitude   in degree (upper left corner of the upper left pixel)
    'X_STEP' :  0.000925926 * 30,  # output resolution in degree
    'Y_STEP' : -0.000925926 * 30,  # output resolution in degree
}

# compute SET via pysolid
tide_e, tide_n, tide_u = pysolid.calc_solid_earth_tides_grid(
    dt_obj, meta,
    display=False,
    verbose=True,
)

# project SET from ENU to satellite line-of-sight (LOS) direction with positive for motion towards the satellite
# inc_angle : incidence angle of the LOS vector (from ground to radar platform) measured from vertical.
# az_angle  : azimuth   angle of the LOS vector (from ground to radar platform) measured from the north, with anti-clockwirse as positive.
inc_angle = np.deg2rad(34)   # radian, typical value for Sentinel-1
az_angle = np.deg2rad(-102)  # radian, typical value for Sentinel-1 descending track
tide_los = (  tide_e * np.sin(inc_angle) * np.sin(az_angle) * -1
            + tide_n * np.sin(inc_angle) * np.cos(az_angle)
            + tide_u * np.cos(inc_angle))

3. Citing this work

  • Yunjun, Z., Fattahi, H., Pi, X., Rosen, P., Simons, M., Agram, P., & Aoki, Y. (2022). Range Geolocation Accuracy of C-/L-band SAR and its Implications for Operational Stack Coregistration. IEEE Trans. Geosci. Remote Sens., 60, 5227219. [ doi | arxiv | data | notebook ]
  • Milbert, D. (2018), "solid: Solid Earth Tide", [Online]. Available: http://geodesyworld.github.io/SOFTS/solid.htm. Accessd on: 2020-09-06.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysolid-0.3.3.tar.gz (1.5 MB view details)

Uploaded Source

Built Distributions

pysolid-0.3.3-cp312-cp312-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

pysolid-0.3.3-cp312-cp312-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ i686

pysolid-0.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pysolid-0.3.3-cp312-cp312-macosx_13_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

pysolid-0.3.3-cp311-cp311-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

pysolid-0.3.3-cp311-cp311-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ i686

pysolid-0.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pysolid-0.3.3-cp311-cp311-macosx_13_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

pysolid-0.3.3-cp310-cp310-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

pysolid-0.3.3-cp310-cp310-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ i686

pysolid-0.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pysolid-0.3.3-cp310-cp310-macosx_13_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

pysolid-0.3.3-cp39-cp39-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

pysolid-0.3.3-cp39-cp39-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ i686

pysolid-0.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pysolid-0.3.3-cp39-cp39-macosx_13_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

pysolid-0.3.3-cp38-cp38-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

pysolid-0.3.3-cp38-cp38-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.2+ i686

pysolid-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pysolid-0.3.3-cp38-cp38-macosx_13_0_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8 macOS 13.0+ x86-64

File details

Details for the file pysolid-0.3.3.tar.gz.

File metadata

  • Download URL: pysolid-0.3.3.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pysolid-0.3.3.tar.gz
Algorithm Hash digest
SHA256 1f28f5b50105d259bc55695af207cc8f730f4b5f1ac4fb6f9e15a57f8688113e
MD5 a61f6f4b62b5d4b5a9e96b163685b71d
BLAKE2b-256 61553c447739f1a4cf0069638d13fceebb5f00ab9323608e7f26a91b43484b72

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1ec467b1b84834c3ef852ef052ddc26747e52a46b5945a90832af9afb2c66167
MD5 f8a6f27a3d9e13ed74b481e5319f698c
BLAKE2b-256 ea6297b61f6109d43bcdafbf41b67e05569abef9e0c12704c3f4df71b970d9a8

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 6e82b3dd276c085fc8dff7a553baa9169589e7f92469c66ec2dbdb278789fc89
MD5 52a9b296656719d58307bc71d97dd725
BLAKE2b-256 784c40ac0b884f6b4c12bcefbf0a5c6c9612b9d627d33bf8d3e572f90826af49

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e070e5e9ba8f4e1976da0d739bb026f69b950f29bf774b6a62eb27f687e2def7
MD5 479f26a60927b0a6c7d6966e03240365
BLAKE2b-256 7ed8450c52d711af7a9b68ce5075e9c3a73f64d97aed3c771dd3958de7a49d7c

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d1906e3d0ed622ed047ba8b44f4eaedcfe6f0a28265a7bbea52ddfff70e9ec81
MD5 fd00d85f791d9d01d974c9ffd58a0ba2
BLAKE2b-256 a1c5d4f1a13a8ff284e005068e71ebbe5055a51045891491d602809006f1d924

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 08c8b1886bd5ef538e60a0475c817c726523a0873b99e5b9b611fb2ab96c8382
MD5 9c7cbb8e4aa35215c0459329d277c63f
BLAKE2b-256 76afe2c48db80107494abec41a788fac85db2ab4aec3e5fa49d1d24bccae2001

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ff2654641b699eded169dee7083bd30fc2002114edc37c584f75ea74050f18fe
MD5 cde2a703dcb278204951fdaadda42c86
BLAKE2b-256 dad40af24e36425dd36cd3fc26afdbd7c69fe40f7b5e85c30733327fd4e1214d

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 448dd645f349ebfa75f6d76c93d0210bc4fc0abaeeda13a7713ead336a6711f6
MD5 45b2821620ac8fac0090158da1ca5698
BLAKE2b-256 2dccdcd16b7937fa83d319676461c761ca4b06feca60ec2404b2671c02877b9a

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1cbe541fd43290fc4a6093d61bb7e6d942554936d31e102e3259523f75c34912
MD5 9759682809acfff96f99c8f19452b7b7
BLAKE2b-256 7de7e4b980e81e9ab70d55dcf54038cda1151561da83be4d533c5c298b1f3ea3

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 74a4bc1bb5097a99a4b41be6b2ba26853cdb7612a0f11f26f986c67df7dd0a28
MD5 e34304b3c310a4529d10e6285022f2a8
BLAKE2b-256 19ee21df11962c257d683a73befff4efab5490a8ce48f202053766e46ab38905

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 5059e1a9bf216691559c9965c334ce618d2da3031eaa3b56de400182651d0138
MD5 5027314fefed52aca0ccda259da348cf
BLAKE2b-256 2c2b75cedb3e7d18028897caf5df97c6e7a0a9772ffecbaaa7bd68a18376f4bc

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b66cc5598c7409b2bc506b7da3fbfb135817f81c5c723dd498b25df5ccfa9332
MD5 208132e63e917e28edce6fe71b295f4d
BLAKE2b-256 0b36fd6d56d4d2d1ba9b280bcd9026935c35b4ec4e8cbb47bd1f538b46ed7006

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d0e58835d6efda8160bfb38092581709d01c7b5baf2692b0065307dc0ba5d6d8
MD5 54567d70743e293874a3846291b69851
BLAKE2b-256 15d47f42bb04f399752c6cde038ea757f2f9c2dce453127d5a6e9c7ffcdb8d13

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4f8cc9932e262f06654ce7c4e1a48e8745e034b57833789b9f8dda4a190a9c10
MD5 fb6b74a40ebafa112fb734f13f4bb28a
BLAKE2b-256 17d1eb0155c100c7113e013cc2b7e76aa94851a163c008bb172b795f6f3ab7de

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp39-cp39-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp39-cp39-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 cbc2256b12c8f38c45700475f592c70ab5fca3dd5b63081f1d66883fd0aa6771
MD5 485c23d6e4de46ef1b5cc524fbb0abff
BLAKE2b-256 f17508f31f546080adb111f0ae045fbf2f8e6e7b8293267f49ca8344417b6ebc

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6bfadbfe19f2c866aca6919979e3f83e81593dfce3a29c6591713a39a387bba
MD5 bf7c1a240524187990cecfacd9b898c9
BLAKE2b-256 544f82e3d3208e256576f688851cdc304f28ff1186e7c3d863362feb6e8e3354

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 3a97e2bc3ea8e9a39508f7c42a385aba7d105709578798e25ebe37335a9d780c
MD5 8287cb8851722dee909dcd000f2bfc0e
BLAKE2b-256 c5e1b530e246e6de0e4105f8d962e769578c94f39c3d399ed0911f795f9cf8ba

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0f9b6cd0961de651439f502a40d61f9327fdd49b984c177b673f7136f1762d51
MD5 fb87bea0bb809ef9d35728c0273db91d
BLAKE2b-256 04aa6265d87d840ddf20ad4b717a338b1fa732c924ed398242be1a5c497c6323

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp38-cp38-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp38-cp38-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0e3175115b4370a6a5350bcd859139c6a6450f12e7f2799e7e9cabb4f03c1de1
MD5 4038bfc99fe027baf2809e3e5ccbc512
BLAKE2b-256 0bac8745b1afd257f791a07086a9e0c176811ba70727a9b3ed1344806d0a3b5b

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 049306f33eee1714b45749d7bcac0196cf673b04b77dde1bcffdce15b14dacf4
MD5 855aaac6e7b49d24607f26519069640e
BLAKE2b-256 a4ed7aeb3b5d09e012030e5699dd05d1634989eee5430d4fb491b444446f2400

See more details on using hashes here.

File details

Details for the file pysolid-0.3.3-cp38-cp38-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pysolid-0.3.3-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 41ccd73427ea3c351661a85199407e0ac364a9b36ac973504704ce8ee0f042b5
MD5 a6012c3a024a142572efdbbb586b8387
BLAKE2b-256 bdd75c551f48683f06d626841c4114cd659c01b9bc032da1b60491a9299acf88

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page