[Git][debian-gis-team/pysolid][upstream] New upstream version 0.2.2

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Jul 23 09:51:34 BST 2022



Antonio Valentino pushed to branch upstream at Debian GIS Project / pysolid


Commits:
517a1d61 by Antonio Valentino at 2022-07-23T08:11:43+00:00
New upstream version 0.2.2
- - - - -


14 changed files:

- .circleci/config.yml
- .gitignore
- README.md
- + docs/logo.pptx
- environment.yml
- setup.py
- src/pysolid/__init__.py
- src/pysolid/point.py
- src/pysolid/solid.for
- src/pysolid/version.py
- + tests/grid.py
- + tests/point.py
- − tests/test_SET_grid.py
- − tests/test_SET_point.py


Changes:

=====================================
.circleci/config.yml
=====================================
@@ -63,5 +63,5 @@ jobs:
             # setup environment variables
             export PATH=${CONDA_PREFIX}/bin:${PATH}
             # run tests
-            python ${HOME}/tools/PySolid/tests/test_SET_point.py
-            python ${HOME}/tools/PySolid/tests/test_SET_grid.py
+            python ${HOME}/tools/PySolid/tests/point.py
+            python ${HOME}/tools/PySolid/tests/grid.py


=====================================
.gitignore
=====================================
@@ -1,5 +1,5 @@
 *.DS_Store
-tests/*.png
+tests/*/*.png
 solid.txt
 
 # Byte-compiled / optimized / DLL files


=====================================
README.md
=====================================
@@ -2,24 +2,30 @@
 [![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PySolid.svg?logo=circleci&label=test)](https://circleci.com/gh/insarlab/PySolid)
 [![Version](https://img.shields.io/github/v/release/insarlab/PySolid?color=green)](https://github.com/insarlab/PySolid/releases)
 [![License](https://img.shields.io/badge/license-GPLv3-yellow.svg)](https://github.com/insarlab/PySolid/blob/main/LICENSE)
-[![render](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/insarlab/PySolid/tree/main/docs)
+[![Citation](https://img.shields.io/badge/doi-10.1109%2FTGRS.2022.3168509-blue)](https://doi.org/10.1109/TGRS.2022.3168509)
 
 ## PySolid
 
-The Python based solid Earth tides (PySolid) is a thin Python wrapper of the [`solid.for`](http://geodesyworld.github.io/SOFTS/solid.htm) program (by Dennis Milbert based on [_dehanttideinelMJD.f_](https://iers-conventions.obspm.fr/content/chapter7/software/dehanttideinel/) from V. Dehant, S. Mathews, J. Gipson and C. Bruyninx) to calculate [solid Earth tides](https://en.wikipedia.org/wiki/Earth_tide) in east/north/up direction (section 7.1.1 in the [2010 IERS Conventions](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html)). Solid Earth tides introduces very long spatial wavelength range components in SAR/InSAR observations, as shown in the Sentinel-1 data with regular acquisitions and large swaths (Fattahi et al., 2020).
+The Python based solid Earth tides (PySolid) is a thin Python wrapper of the [`solid.for`](http://geodesyworld.github.io/SOFTS/solid.htm) program (by Dennis Milbert based on [_dehanttideinelMJD.f_](https://iers-conventions.obspm.fr/content/chapter7/software/dehanttideinel/) from V. Dehant, S. Mathews, J. Gipson and C. Bruyninx) to calculate [solid Earth tides](https://en.wikipedia.org/wiki/Earth_tide) in east/north/up direction (section 7.1.1 in the [2010 IERS Conventions](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html)). Solid Earth tides introduces very long spatial wavelength components in SAR/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 can be installed as below:
+PySolid is available on the [conda-forge](https://anaconda.org/conda-forge/pysolid) channel and the main archive of the [Debian](https://tracker.debian.org/pkg/pysolid) GNU/Linux OS. The released version can be install via `conda` as:
 
 ```shell
 # run "conda update pysolid" to update the installed version
 conda install -c conda-forge pysolid
 ```
 
-Installing from `conda-forge` channel is recomended because PySolid contains Fortran source code, which required compilcation. Otherwise, you may build it from source as described below.
+or via `apt` (or other package managers) for [Debian-derivative OS](https://wiki.debian.org/Derivatives/Census) users, including [Ubuntu](https://ubuntu.com), as:
+
+```shell
+apt install python3-pysolid
+```
+
+Installing via `conda` and `apt` is recomended because PySolid contains Fortran source code, which required compilcation. Otherwise, you may build it from source as described below.
 
 #### 1.1 Build from source
 
@@ -65,11 +71,11 @@ To test the installation, run the following:
 
 ```bash
 python -c "import pysolid; print(pysolid.__version__)"
-python PySolid/tests/test_SET_grid.py
-python PySolid/tests/test_SET_point.py
+python PySolid/tests/grid.py
+python PySolid/tests/point.py
 ```
 
-### 2. Example Usage
+### 2. Usage
 
 PySolid could compute solid Earth tides in two modes: **point** and **grid**. Both modes produce displacement in east, north and up direction.
 
@@ -143,8 +149,7 @@ tide_los = (  tide_e * np.sin(inc_angle) * np.cos(head_angle) * -1
   <img width="800" src="https://yunjunzhang.files.wordpress.com/2021/01/set_grid-3.png">
 </p>
 
-### 3. References
+### 3. Citing this work
 
-+   Milbert, D. (2018), solid: Solid Earth Tide, Available: http://geodesyworld.github.io/SOFTS/solid.htm, Accessd on: 2020-09-06.
-+   Fattahi, H., Yunjun, Z., Pi, X., Agram, P.S., Rosen, P., and Aoki, Y. (2020), Absolute geolocation of SAR Big-Data: The first step for operational InSAR time-series analysis, _AGU Fall Meeting 2020_, 1-17 Dec 2020.
-+   Petit, G., and Luzum, B. (2010), [IERS Conventions (2010) (IERS Technical Note No. 36)](https://iers-conventions.obspm.fr/conventions_material.php) 179 pp., _International Earth Rotation And Reference Systems Service (IERS)_, Frankfurt, Germany. [[Code](https://iers-conventions.obspm.fr/chapter7.php)].
++   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_, 1-19, doi:[10.1109/TGRS.2022.3168509](https://doi.org/10.1109/TGRS.2022.3168509), [arXiv](https://doi.org/10.31223/X5F641), [data](https://zenodo.org/record/6360749), [notebooks](https://github.com/yunjunz/2022-Geolocation).
++   Milbert, D. (2018), "solid: Solid Earth Tide", [Online]. Available: http://geodesyworld.github.io/SOFTS/solid.htm. Accessd on: 2020-09-06.


=====================================
docs/logo.pptx
=====================================
Binary files /dev/null and b/docs/logo.pptx differ


=====================================
environment.yml
=====================================
@@ -7,4 +7,4 @@ dependencies:
   - scipy
   - matplotlib
   - scikit-image
-  - fortran-compiler    # A generic way to obtain the Fortran compiler through conda-forge channel
+  - fortran-compiler    # A generic way to obtain the Fortran compiler across platforms through conda-forge channel


=====================================
setup.py
=====================================
@@ -20,21 +20,20 @@ setup(
     version=version,
     description="A Python wrapper for solid to compute solid Earth tides",
     url="https://github.com/insarlab/PySolid",
+
     author="Zhang Yunjun, Dennis Milbert",
     author_email="yunjunzgeo at gmail.com",
 
+    license='GPL-3.0-or-later',
+    license_files=('LICENSE',),
+
     classifiers=[
         "Development Status :: 4 - Beta",
         "Intended Audience :: Science/Research",
         "Topic :: Scientific/Engineering",
         "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
         "Operating System :: OS Independent",
-        "Programming Language :: Python",
         "Programming Language :: Python :: 3",
-        "Programming Language :: Python :: 3.6",
-        "Programming Language :: Python :: 3.7",
-        "Programming Language :: Python :: 3.8",
-        "Programming Language :: Python :: 3.9",
     ],
     keywords="solid Eartth tides, deformation, geodesy, geophysics",
 


=====================================
src/pysolid/__init__.py
=====================================
@@ -1,6 +1,14 @@
-from pysolid.grid import *
-from pysolid.point import *
-
 # get version info
-from pysolid.version import *
-__version__ = release_version
+from pysolid.version import release_version as __version__
+
+# top-level functions
+from pysolid.grid import (
+    calc_solid_earth_tides_grid,
+    plot_solid_earth_tides_grid,
+)
+from pysolid.point import (
+    TIDES,
+    calc_solid_earth_tides_point,
+    plot_solid_earth_tides_point,
+    plot_power_spectral_density4tides,
+)


=====================================
src/pysolid/point.py
=====================================
@@ -28,53 +28,54 @@ except ImportError:
 
 
 ## Tidal constituents
-# https://en.wikipedia.org/wiki/Theory_of_tides#Tidal_constituents
+# https://en.wikipedia.org/wiki/Theory_of_tides#Tidal_constituents. Accessed on: 2022-03-07.
+# unit: period (hour), speed (deg per hour)
 Tag = collections.namedtuple('Tag', 'species symbol period speed doodson_num noaa_order')
 TIDES = (
     # Semi-diurnal
-    Tag('Principal lunar semidiurnal'              , r'$M_2$'      , 12.421, 28.984, 255.555, 1 ),
-    Tag('Principal solar semidiurnal'              , r'$S_2$'      , 12.000, 30.000, 273.555, 2 ),
-    Tag('Larger lunar elliptic semidiurnal'        , r'$N_2$'      , 12.658, 28.440, 245.655, 3 ),
-    Tag('Larger lunar evectional'                  , r'$v_2$'      , 12.626, 28.513, 247.455, 11),
-    Tag('Variational'                              , r'$\mu_2$'    , 12.872, 27.968, 237.555, 13),
-    Tag('Lunar elliptical semidiurnal second-order', '2"N'+r'$_2$' , 12.905, 27.895, 235.755, 14),
-    Tag('Smaller lunar evectional'                 , r'$\lambda_2$', 12.222, 29.456, 263.655, 16),
-    Tag('Larger solar elliptic'                    , r'$T_2$'      , 12.016, 29.959, 272.555, 27),
-    Tag('Smaller solar elliptic'                   , r'$R_2$'      , 11.984, 30.041, 274.555, 28),
-    Tag('Shallow water semidiurnal'                , r'$2SM_2$'    , 11.607, 31.016, 291.555, 31),
-    Tag('Smaller lunar elliptic semidiurnal'       , r'$L_2$'      , 12.192, 29.528, 265.455, 33),
-    Tag('Lunisolar semidiurnal'                    , r'$K_2$'      , 11.967, 30.082, 275.555, 35),
+    Tag('Principal lunar semidiurnal'              , r'$M_2$'      , 12.4206012 , 28.9841042, 255.555, 1 ),
+    Tag('Principal solar semidiurnal'              , r'$S_2$'      , 12.0       , 30.0      , 273.555, 2 ),
+    Tag('Larger lunar elliptic semidiurnal'        , r'$N_2$'      , 12.65834751, 28.4397295, 245.655, 3 ),
+    Tag('Larger lunar evectional'                  , r'$v_2$'      , 12.62600509, 28.5125831, 247.455, 11),
+    Tag('Variational'                              , r'$\mu_2$'    , 12.8717576 , 27.9682084, 237.555, 13),
+    Tag('Lunar elliptical semidiurnal second-order', '2"N'+r'$_2$' , 12.90537297, 27.8953548, 235.755, 14),
+    Tag('Smaller lunar evectional'                 , r'$\lambda_2$', 12.22177348, 29.4556253, 263.655, 16),
+    Tag('Larger solar elliptic'                    , r'$T_2$'      , 12.01644934, 29.9589333, 272.555, 27),
+    Tag('Smaller solar elliptic'                   , r'$R_2$'      , 11.98359564, 30.0410667, 274.555, 28),
+    Tag('Shallow water semidiurnal'                , r'$2SM_2$'    , 11.60695157, 31.0158958, 291.555, 31),
+    Tag('Smaller lunar elliptic semidiurnal'       , r'$L_2$'      , 12.19162085, 29.5284789, 265.455, 33),
+    Tag('Lunisolar semidiurnal'                    , r'$K_2$'      , 11.96723606, 30.0821373, 275.555, 35),
 
     # Diurnal
-    Tag('Lunar diurnal'                  , r'$K_1$' , 23.934, 15.041, 165.555, 4 ),
-    Tag('Lunar diurnal'                  , r'$O_1$' , 25.819, 13.943, 145.555, 6 ),
-    Tag('Lunar diurnal'                  , r'$OO_1$', 22.306, 16.139, 185.555, 15),
-    Tag('Solar diurnal'                  , r'$S_1$' , 24.000, 15.000, 164.555, 17),
-    Tag('Smaller lunar elliptic diurnal' , r'$M_1$' , 24.841, 14.492, 155.555, 18),
-    Tag('Smaller lunar elliptic diurnal' , r'$J_1$' , 23.098, 15.585, 175.455, 19),
-    Tag('Larger lunar evectional diurnal', r'$\rho$', 26.723, 13.472, 137.455, 25),
-    Tag('Larger lunar elliptic diurnal'  , r'$Q_1$' , 26.868, 13.399, 135.655, 26),
-    Tag('Larger elliptic diurnal'        , r'$2Q_1$', 28.006, 12.854, 125.755, 29),
-    Tag('Solar diurnal'                  , r'$P_1$' , 24.066, 14.959, 163.555, 30),
+    Tag('Lunar diurnal'                  , r'$K_1$' , 23.93447213, 15.0410686, 165.555, 4 ),
+    Tag('Lunar diurnal'                  , r'$O_1$' , 25.81933871, 13.9430356, 145.555, 6 ),
+    Tag('Lunar diurnal'                  , r'$OO_1$', 22.30608083, 16.1391017, 185.555, 15),
+    Tag('Solar diurnal'                  , r'$S_1$' , 24.0       , 15.0      , 164.555, 17),
+    Tag('Smaller lunar elliptic diurnal' , r'$M_1$' , 24.84120241, 14.4920521, 155.555, 18),
+    Tag('Smaller lunar elliptic diurnal' , r'$J_1$' , 23.09848146, 15.5854433, 175.455, 19),
+    Tag('Larger lunar evectional diurnal', r'$\rho$', 26.72305326, 13.4715145, 137.455, 25),
+    Tag('Larger lunar elliptic diurnal'  , r'$Q_1$' , 26.868350  , 13.3986609, 135.655, 26),
+    Tag('Larger elliptic diurnal'        , r'$2Q_1$', 28.00621204, 12.8542862, 125.755, 29),
+    Tag('Solar diurnal'                  , r'$P_1$' , 24.06588766, 14.9589314, 163.555, 30),
 
     # Long period
-    Tag('Lunar monthly'                  , r'$M_m$'   ,  661.311, 0.544, 65.455, 20),  # period  27.555 days
-    Tag('Solar semiannual'               , r'$S_{sa}$', 4383.076, 0.082, 57.555, 21),  # period 182.628 days
-    Tag('Solar annual'                   , r'$S_a$'   , 8766.153, 0.041, 56.555, 22),  # period 365.256 days
-    Tag('Lunisolar synodic fortnightly'  , r'$MS_f$'  ,  354.367, 1.016, 73.555, 23),  # period  14.765 days
-    Tag('Lunisolar fortnightly'          , r'$M_f$'   ,  327.860, 1.098, 75.555, 24),  # period  13.661 days
+    Tag('Lunar monthly'                  , r'$M_m$'   ,  661.3111655, 0.5443747, 65.455, 20),  # period  27.554631896 days
+    Tag('Solar semiannual'               , r'$S_{sa}$', 4383.076325 , 0.0821373, 57.555, 21),  # period 182.628180208 days
+    Tag('Solar annual'                   , r'$S_a$'   , 8766.15265  , 0.0410686, 56.555, 22),  # period 365.256360417 days
+    Tag('Lunisolar synodic fortnightly'  , r'$MS_f$'  ,  354.3670666, 1.0158958, 73.555, 23),  # period  14.765294442 days
+    Tag('Lunisolar fortnightly'          , r'$M_f$'   ,  327.8599387, 1.0980331, 75.555, 24),  # period  13.660830779 days
 
     # Short period
-    Tag('Shallow water overtides of principal lunar', r'$M_4$'      , 6.210,  57.968, 455.555, 5 ),
-    Tag('Shallow water overtides of principal lunar', r'$M_6$'      , 4.140,  86.952, 655.555, 7 ),
-    Tag('Shallow water terdiurnal'                  , r'$MK_3$'     , 8.177,  44.025, 365.555, 8 ),
-    Tag('Shallow water overtides of principal solar', r'$S_4$'      , 6.000,  60.000, 491.555, 9 ),
-    Tag('Shallow water quarter diurnal'             , r'$MN_4$'     , 6.269,  57.424, 445.655, 10),
-    Tag('Shallow water overtides of principal solar', r'$S_6$'      , 4.000,  90.000, np.NaN , 12),
-    Tag('Lunar terdiurnal'                          , r'$M_3$'      , 8.280,  43.476, 355.555, 32),
-    Tag('Shallow water terdiurnal'                  , '2"MK'+r'$_3$', 8.386,  42.927, 345.555, 34),
-    Tag('Shallow water eighth diurnal'              , r'$M_8$'      , 3.105, 115.936, 855.555, 36),
-    Tag('Shallow water quarter diurnal'             , r'$MS_4$'     , 6.103,  58.984, 473.555, 37),
+    Tag('Shallow water overtides of principal lunar', r'$M_4$'      , 6.210300601,  57.9682084, 455.555, 5 ),
+    Tag('Shallow water overtides of principal lunar', r'$M_6$'      , 4.140200401,  86.9523127, 655.555, 7 ),
+    Tag('Shallow water terdiurnal'                  , r'$MK_3$'     , 8.177140247,  44.0251729, 365.555, 8 ),
+    Tag('Shallow water overtides of principal solar', r'$S_4$'      , 6.0        ,  60.0      , 491.555, 9 ),
+    Tag('Shallow water quarter diurnal'             , r'$MN_4$'     , 6.269173724,  57.4238337, 445.655, 10),
+    Tag('Shallow water overtides of principal solar', r'$S_6$'      , 4.0        ,  90.0      , np.NaN , 12),
+    Tag('Lunar terdiurnal'                          , r'$M_3$'      , 8.280400802,  43.4761563, 355.555, 32),
+    Tag('Shallow water terdiurnal'                  , '2"MK'+r'$_3$', 8.38630265 ,  42.9271398, 345.555, 34),
+    Tag('Shallow water eighth diurnal'              , r'$M_8$'      , 3.105150301, 115.9364166, 855.555, 36),
+    Tag('Shallow water quarter diurnal'             , r'$MS_4$'     , 6.103339275,  58.9841042, 473.555, 37),
 )
 
 


=====================================
src/pysolid/solid.for
=====================================
@@ -1549,13 +1549,9 @@
 ***** http://www.csgnetwork.com/julianmodifdateconv.html
 
       implicit double precision(a-h,o-z)
-      !*** upper limit, leap second table, 2021dec28
-      !*** upper limit, leap second table, 2019jun30
-      !*** upper limit, leap second table, 2018jun30
+      !*** upper limit, leap second table, 2022dec28
       !*** lower limit, leap second table, 1972jan01
-      parameter(MJDUPPER=59576)
-***** parameter(MJDUPPER=58664)
-***** parameter(MJDUPPER=58299)
+      parameter(MJDUPPER=59941)
       parameter(MJDLOWER=41317)
 
       !*** leap second table limit flag
@@ -1636,7 +1632,7 @@
 ***** other leap second references at:
 ***** http://hpiers.obspm.fr/eoppc/bul/bulc/Leap_Second_History.dat
 ***** http://hpiers.obspm.fr/eoppc/bul/bulc/bulletinc.dat
-***** File expires on 28 December 2021
+***** File expires on 28 December 2022
 
 *** test against newest leaps first
 


=====================================
src/pysolid/version.py
=====================================
@@ -8,6 +8,7 @@ import collections
 # release history
 Tag = collections.namedtuple('Tag', 'version date')
 release_history = (
+    Tag('0.2.2', '2022-07-20'),
     Tag('0.2.1', '2022-01-05'),
     Tag('0.2.0', '2021-11-10'),
     Tag('0.1.2', '2021-02-24'),


=====================================
tests/grid.py
=====================================
@@ -0,0 +1,53 @@
+#!/usr/bin/env python3
+# Author: Zhang Yunjun, Jan 2021
+# Copyright 2020, by the California Institute of Technology.
+
+
+import os
+import sys
+import datetime as dt
+
+import pysolid
+
+
+if __name__ == '__main__':
+
+    # print the file/module path
+    print('-'*50)
+    print(os.path.abspath(__file__))
+
+    # prepare inputs
+    dt_obj = dt.datetime(2020, 12, 25, 14, 7, 44)
+    atr = {
+        'LENGTH'  : 400,
+        'WIDTH'   : 500,
+        'X_FIRST' : -118.2,
+        'Y_FIRST' : 33.8,
+        'X_STEP'  :  0.000833333,
+        'Y_STEP'  : -0.000833333,
+    }
+
+    # calculate
+    (tide_e,
+     tide_n,
+     tide_u) = pysolid.calc_solid_earth_tides_grid(dt_obj, atr, verbose=True)
+
+    # plot
+    out_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'pic'))
+    os.makedirs(out_dir, exist_ok=True)
+
+    out_fig = os.path.join(out_dir, 'grid.png')
+    pysolid.plot_solid_earth_tides_grid(
+        tide_e, tide_n, tide_u, dt_obj,
+        out_fig=out_fig,
+        display=False)
+
+    # open the plotted figures
+    if sys.platform in ['linux']:
+        os.system(f'display {out_fig}')
+    elif sys.platform in ['darwin']:
+        os.system(f'open {out_fig}')
+    elif sys.platform.startswith('win'):
+        os.system(out_fig)
+    else:
+        print(f'Unknown OS system ({sys.platform}). Check results in file: {out_fig}.')


=====================================
tests/point.py
=====================================
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+# Author: Zhang Yunjun, Jan 2021
+# Copyright 2020, by the California Institute of Technology.
+
+
+import os
+import sys
+import datetime as dt
+
+import pysolid
+
+
+if __name__ == '__main__':
+
+    # print the file/module path
+    print('-'*50)
+    print(os.path.abspath(__file__))
+
+    # prepare inputs
+    lat, lon = 34.0, -118.0     # Los Angles, CA
+    dt_obj0 = dt.datetime(2020, 11,  1, 4, 0, 0)
+    dt_obj1 = dt.datetime(2020, 12, 31, 2, 0, 0)
+
+    # calculate
+    (dt_out,
+     tide_e,
+     tide_n,
+     tide_u) = pysolid.calc_solid_earth_tides_point(lat, lon, dt_obj0, dt_obj1, verbose=False)
+
+    # plot
+    out_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'pic'))
+    os.makedirs(out_dir, exist_ok=True)
+
+    out_fig = os.path.join(out_dir, 'point.png')
+    pysolid.plot_solid_earth_tides_point(
+        dt_out, tide_e, tide_n, tide_u,
+        lalo=[lat, lon],
+        out_fig=out_fig,
+        display=False)
+
+    # open the saved figure
+    if sys.platform in ['linux']:
+        os.system(f'display {out_fig}')
+    elif sys.platform in ['darwin']:
+        os.system(f'open {out_fig}')
+    elif sys.platform.startswith('win'):
+        os.system(out_fig)
+    else:
+        print(f'Unknown OS system ({sys.platform}). Check results in file: {out_fig}.')


=====================================
tests/test_SET_grid.py deleted
=====================================
@@ -1,50 +0,0 @@
-#!/usr/bin/env python3
-# Author: Zhang Yunjun, Jan 2021
-# Copyright 2020, by the California Institute of Technology.
-
-
-import os
-import sys
-import datetime as dt
-
-## setup path for the package
-#from pathlib import Path
-#pysolid_path = Path(__file__).absolute().parent.parent.joinpath('src')
-#sys.path.append(pysolid_path)
-import pysolid
-
-
-## pysolid.grid
-print('Test solid Earth tides calculation for a spatial grid at a specific time')
-
-# prepare inputs
-dt_obj = dt.datetime(2020, 12, 25, 14, 7, 44)
-atr = {
-    'LENGTH'  : 400,
-    'WIDTH'   : 500,
-    'X_FIRST' : -118.2,
-    'Y_FIRST' : 33.8,
-    'X_STEP'  :  0.000833333,
-    'Y_STEP'  : -0.000833333,
-}
-
-# calculate
-(tide_e,
- tide_n,
- tide_u) = pysolid.calc_solid_earth_tides_grid(dt_obj, atr, verbose=True)
-
-# plot
-out_fig = os.path.abspath(os.path.join(os.path.dirname(__file__), 'SET_grid.png'))
-pysolid.plot_solid_earth_tides_grid(tide_e, tide_n, tide_u, dt_obj,
-                                    out_fig=out_fig, display=False)
-
-
-## open the plotted figures
-if sys.platform in ['linux']:
-    os.system('display {}'.format(out_fig))
-elif sys.platform in ['darwin']:
-    os.system('open {}'.format(out_fig))
-elif sys.platform.startswith('win'):
-    os.system(out_fig)
-else:
-    print('Unknown OS system. Check results in file: {}'.format(out_fig))


=====================================
tests/test_SET_point.py deleted
=====================================
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3
-# Author: Zhang Yunjun, Jan 2021
-# Copyright 2020, by the California Institute of Technology.
-
-
-import os
-import sys
-import datetime as dt
-
-## setup path for the package
-#from pathlib import Path
-#pysolid_path = Path(__file__).absolute().parent.parent.joinpath('src')
-#sys.path.append(pysolid_path)
-import pysolid
-
-
-## pysolid.point
-print('Test solid Earth tides calculation for a time period at a specific location')
-
-# prepare inputs
-lat, lon = 34.0, -118.0     # Los Angles, CA
-dt_obj0 = dt.datetime(2020, 11,  1, 4, 0, 0)
-dt_obj1 = dt.datetime(2020, 12, 31, 2, 0, 0)
-
-# calculate
-(dt_out,
- tide_e,
- tide_n,
- tide_u) = pysolid.calc_solid_earth_tides_point(lat, lon, dt_obj0, dt_obj1, verbose=False)
-
-# plot
-out_fig = os.path.abspath(os.path.join(os.path.dirname(__file__), 'SET_point.png'))
-pysolid.plot_solid_earth_tides_point(dt_out, tide_e, tide_n, tide_u, lalo=[lat, lon],
-                                     out_fig=out_fig, display=False)
-
-## open the plotted figures
-if sys.platform in ['linux']:
-    os.system('display {}'.format(out_fig))
-elif sys.platform in ['darwin']:
-    os.system('open {}'.format(out_fig))
-elif sys.platform.startswith('win'):
-    os.system(out_fig)
-else:
-    print('Unknown OS system. Check results in file: {}'.format(out_fig))
-



View it on GitLab: https://salsa.debian.org/debian-gis-team/pysolid/-/commit/517a1d61866beb30b1fdb0560d75377682048610

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pysolid/-/commit/517a1d61866beb30b1fdb0560d75377682048610
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220723/97b87873/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list