sagea 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sagea-0.1.0/LICENSE +21 -0
- sagea-0.1.0/PKG-INFO +26 -0
- sagea-0.1.0/README.md +6 -0
- sagea-0.1.0/sagea/SHC.py +78 -0
- sagea-0.1.0/sagea/__init__.py +8 -0
- sagea-0.1.0/sagea.egg-info/PKG-INFO +26 -0
- sagea-0.1.0/sagea.egg-info/SOURCES.txt +10 -0
- sagea-0.1.0/sagea.egg-info/dependency_links.txt +1 -0
- sagea-0.1.0/sagea.egg-info/requires.txt +1 -0
- sagea-0.1.0/sagea.egg-info/top_level.txt +1 -0
- sagea-0.1.0/setup.cfg +4 -0
- sagea-0.1.0/setup.py +131 -0
sagea-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 NCSG -- Numerical Computation and Satellite Geodesy research group
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
sagea-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: sagea
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: satellite gravity post-processing and error assessment
|
|
5
|
+
Home-page: https://github.com/NCSGgroup/SaGEA
|
|
6
|
+
Author: Shuhao Liu
|
|
7
|
+
Author-email: liushuhao@hust.edu.cn
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
13
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
15
|
+
Requires-Python: >=3.9.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: numpy
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# 1. Introduction
|
|
22
|
+
The level-2 time-variable gravity fields obtained from Gravity Recovery and Climate Experiment (GRACE) and its Follow-On (GRACE-FO) mission are widely used in multi-discipline geo-science studies. However, the post-processing of those gravity fields to obtain a desired signal is rather challenging for users that are not familiar with the level-2 products. In addition, the error assessment/quantification of those derived signals, which is of increasing demand in science application, is still a challenging issue even among the professional GRACE(-FO) users. In this effort, the common post-processing steps and the assessment of complicated error (uncertainty) of GRACE(-FO), are integrated into an open-source, cross-platform and Python-based toolbox called SAGEA (SAtellite Gravity Error Assessment). With diverse options, SAGEA provides flexibility to generate signal along with the full error from level-2 products, so that any non-expert user can easily obtain advanced experience of GRACE(-FO) processing. Please contact Shuhao Liu (liushuhao@hust.edu.cn) and Fan Yang (fany@plan.aau.dk) for more information.
|
|
23
|
+
|
|
24
|
+
When referencing this work, please cite:
|
|
25
|
+
> Liu, S., Yang, F., & Forootan, E. (2025). SAGEA: A toolbox for comprehensive error assessment of GRACE and GRACE-FO based mass changes. Computers & Geosciences, 196, 105825. https://doi.org/10.1016/j.cageo.2024.105825
|
|
26
|
+
|
sagea-0.1.0/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# 1. Introduction
|
|
2
|
+
The level-2 time-variable gravity fields obtained from Gravity Recovery and Climate Experiment (GRACE) and its Follow-On (GRACE-FO) mission are widely used in multi-discipline geo-science studies. However, the post-processing of those gravity fields to obtain a desired signal is rather challenging for users that are not familiar with the level-2 products. In addition, the error assessment/quantification of those derived signals, which is of increasing demand in science application, is still a challenging issue even among the professional GRACE(-FO) users. In this effort, the common post-processing steps and the assessment of complicated error (uncertainty) of GRACE(-FO), are integrated into an open-source, cross-platform and Python-based toolbox called SAGEA (SAtellite Gravity Error Assessment). With diverse options, SAGEA provides flexibility to generate signal along with the full error from level-2 products, so that any non-expert user can easily obtain advanced experience of GRACE(-FO) processing. Please contact Shuhao Liu (liushuhao@hust.edu.cn) and Fan Yang (fany@plan.aau.dk) for more information.
|
|
3
|
+
|
|
4
|
+
When referencing this work, please cite:
|
|
5
|
+
> Liu, S., Yang, F., & Forootan, E. (2025). SAGEA: A toolbox for comprehensive error assessment of GRACE and GRACE-FO based mass changes. Computers & Geosciences, 196, 105825. https://doi.org/10.1016/j.cageo.2024.105825
|
|
6
|
+
|
sagea-0.1.0/sagea/SHC.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/use/bin/env python
|
|
2
|
+
# coding=utf-8
|
|
3
|
+
# @Author : Shuhao Liu
|
|
4
|
+
# @Time : 2025/6/13 10:34
|
|
5
|
+
# @File : SHC.py
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
from sagea.auxiliary.MathTool import MathTool
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SHC:
|
|
13
|
+
"""
|
|
14
|
+
This class is to store the spherical harmonic coefficients (SHCs) for the use in necessary data processing.
|
|
15
|
+
|
|
16
|
+
Attribute self.value stores the coefficients in 2d-array (in numpy.ndarray) combined with c and s.
|
|
17
|
+
which are sorted by degree, for example,
|
|
18
|
+
numpy.ndarray: [[c1[0,0]; s1[1,1], c1[1,0], c1[1,1]; s1[2,2], s1[2,1], c1[2,0], c1[2,1], c1[2,2]; ...],
|
|
19
|
+
[c2[0,0]; s2[1,1], c2[1,0], c2[1,1]; s2[2,2], s2[2,1], c2[2,0], c2[2,1], c2[2,2]; ...],
|
|
20
|
+
[ ... ]].
|
|
21
|
+
Note that even it stores only one set of SHCs, the array is still 2-dimension, i.e.,
|
|
22
|
+
[[c1[0,0]; s1[1,1], c1[1,0], c1[1,1]; s1[2,2], s1[2,1], c1[2,0], c1[2,1], c1[2,2]; ...]].
|
|
23
|
+
|
|
24
|
+
Attribute self.dates stores beginning and ending dates (in datetime.date) in list as
|
|
25
|
+
list: [
|
|
26
|
+
[begin_1: datetime,date, begin_2: datetime,date, ...],
|
|
27
|
+
[end_1: datetime,date, end_2: datetime,date, ...],
|
|
28
|
+
] if needed, else None.
|
|
29
|
+
|
|
30
|
+
Attribute self.normalization indicates the normalization of the SHCs (in EnumClasses.SHNormalization), for example,
|
|
31
|
+
EnumClasses.SHNormalization.full.
|
|
32
|
+
|
|
33
|
+
Attribute self.physical_dimension indicates the physical dimension of the SHCs (in EnumClasses.PhysicalDimensions).
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, c, s, normalization=None, physical_dimension=None, perference=None):
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
:param c: harmonic coefficients c in 2-dimension (l,m), or a series (q,l,m);
|
|
40
|
+
:param s: harmonic coefficients s in 2-dimension (l,m), or a series (q,l,m),
|
|
41
|
+
:param normalization: in Preference.SHNormalization, default Preference.SHNormalization.full.
|
|
42
|
+
:param physical_dimension: in Preference.PhysicalDimensions, default Preference.PhysicalDimensions.Dimensionless.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
assert np.shape(c) == np.shape(s)
|
|
46
|
+
|
|
47
|
+
if len(np.shape(c)) == 2:
|
|
48
|
+
self.value = MathTool.cs_combine_to_triangle_1d(c, s)
|
|
49
|
+
|
|
50
|
+
elif len(np.shape(c)) == 3:
|
|
51
|
+
cs = []
|
|
52
|
+
for i in range(np.shape(c)[0]):
|
|
53
|
+
this_cs = MathTool.cs_combine_to_triangle_1d(c[i], s[i])
|
|
54
|
+
cs.append(this_cs)
|
|
55
|
+
self.value = np.array(cs)
|
|
56
|
+
|
|
57
|
+
if len(np.shape(self.value)) == 1:
|
|
58
|
+
self.value = self.value[None, :]
|
|
59
|
+
|
|
60
|
+
assert len(np.shape(self.value)) == 2
|
|
61
|
+
|
|
62
|
+
self.dates = None
|
|
63
|
+
|
|
64
|
+
if normalization is None:
|
|
65
|
+
normalization = perference.SHNormalization.full
|
|
66
|
+
|
|
67
|
+
assert normalization in perference.SHNormalization
|
|
68
|
+
self.normalization = normalization
|
|
69
|
+
|
|
70
|
+
if physical_dimension is None:
|
|
71
|
+
physical_dimension = perference.PhysicalDimensions.Dimensionless
|
|
72
|
+
|
|
73
|
+
assert physical_dimension in perference.PhysicalDimensions
|
|
74
|
+
self.physical_dimension = physical_dimension
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
if __name__ == "__main__":
|
|
78
|
+
pass
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: sagea
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: satellite gravity post-processing and error assessment
|
|
5
|
+
Home-page: https://github.com/NCSGgroup/SaGEA
|
|
6
|
+
Author: Shuhao Liu
|
|
7
|
+
Author-email: liushuhao@hust.edu.cn
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
13
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
15
|
+
Requires-Python: >=3.9.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: numpy
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# 1. Introduction
|
|
22
|
+
The level-2 time-variable gravity fields obtained from Gravity Recovery and Climate Experiment (GRACE) and its Follow-On (GRACE-FO) mission are widely used in multi-discipline geo-science studies. However, the post-processing of those gravity fields to obtain a desired signal is rather challenging for users that are not familiar with the level-2 products. In addition, the error assessment/quantification of those derived signals, which is of increasing demand in science application, is still a challenging issue even among the professional GRACE(-FO) users. In this effort, the common post-processing steps and the assessment of complicated error (uncertainty) of GRACE(-FO), are integrated into an open-source, cross-platform and Python-based toolbox called SAGEA (SAtellite Gravity Error Assessment). With diverse options, SAGEA provides flexibility to generate signal along with the full error from level-2 products, so that any non-expert user can easily obtain advanced experience of GRACE(-FO) processing. Please contact Shuhao Liu (liushuhao@hust.edu.cn) and Fan Yang (fany@plan.aau.dk) for more information.
|
|
23
|
+
|
|
24
|
+
When referencing this work, please cite:
|
|
25
|
+
> Liu, S., Yang, F., & Forootan, E. (2025). SAGEA: A toolbox for comprehensive error assessment of GRACE and GRACE-FO based mass changes. Computers & Geosciences, 196, 105825. https://doi.org/10.1016/j.cageo.2024.105825
|
|
26
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numpy
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sagea
|
sagea-0.1.0/setup.cfg
ADDED
sagea-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
# Note: To use the 'upload' functionality of this file, you must:
|
|
5
|
+
# $ pipenv install twine --dev
|
|
6
|
+
|
|
7
|
+
import io
|
|
8
|
+
import os
|
|
9
|
+
import sys
|
|
10
|
+
from shutil import rmtree
|
|
11
|
+
|
|
12
|
+
from setuptools import find_packages, setup, Command
|
|
13
|
+
|
|
14
|
+
# Package meta-data.
|
|
15
|
+
NAME = 'sagea'
|
|
16
|
+
DESCRIPTION = 'satellite gravity post-processing and error assessment'
|
|
17
|
+
URL = 'https://github.com/NCSGgroup/SaGEA'
|
|
18
|
+
EMAIL = 'liushuhao@hust.edu.cn'
|
|
19
|
+
AUTHOR = 'Shuhao Liu'
|
|
20
|
+
REQUIRES_PYTHON = '>=3.9.0'
|
|
21
|
+
VERSION = '0.1.0'
|
|
22
|
+
|
|
23
|
+
# What packages are required for this module to be executed?
|
|
24
|
+
REQUIRED = [
|
|
25
|
+
'numpy',
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
# What packages are optional?
|
|
29
|
+
EXTRAS = {
|
|
30
|
+
# 'fancy feature': ['django'],
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# The rest you shouldn't have to touch too much :)
|
|
34
|
+
# ------------------------------------------------
|
|
35
|
+
# Except, perhaps the License and Trove Classifiers!
|
|
36
|
+
# If you do change the License, remember to change the Trove Classifier for that!
|
|
37
|
+
|
|
38
|
+
here = os.path.abspath(os.path.dirname(__file__))
|
|
39
|
+
|
|
40
|
+
# Import the README and use it as the long-description.
|
|
41
|
+
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
|
|
42
|
+
try:
|
|
43
|
+
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
44
|
+
long_description = '\n' + f.read()
|
|
45
|
+
except FileNotFoundError:
|
|
46
|
+
long_description = DESCRIPTION
|
|
47
|
+
|
|
48
|
+
# Load the package's __version__.py module as a dictionary.
|
|
49
|
+
about = {}
|
|
50
|
+
if not VERSION:
|
|
51
|
+
project_slug = NAME.lower().replace("-", "_").replace(" ", "_")
|
|
52
|
+
with open(os.path.join(here, project_slug, '__version__.py')) as f:
|
|
53
|
+
exec(f.read(), about)
|
|
54
|
+
else:
|
|
55
|
+
about['__version__'] = VERSION
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class UploadCommand(Command):
|
|
59
|
+
"""Support setup.py upload."""
|
|
60
|
+
|
|
61
|
+
description = 'Build and publish the package.'
|
|
62
|
+
user_options = []
|
|
63
|
+
|
|
64
|
+
@staticmethod
|
|
65
|
+
def status(s):
|
|
66
|
+
"""Prints things in bold."""
|
|
67
|
+
print('\033[1m{0}\033[0m'.format(s))
|
|
68
|
+
|
|
69
|
+
def initialize_options(self):
|
|
70
|
+
pass
|
|
71
|
+
|
|
72
|
+
def finalize_options(self):
|
|
73
|
+
pass
|
|
74
|
+
|
|
75
|
+
def run(self):
|
|
76
|
+
try:
|
|
77
|
+
self.status('Removing previous builds…')
|
|
78
|
+
rmtree(os.path.join(here, 'dist'))
|
|
79
|
+
except OSError:
|
|
80
|
+
pass
|
|
81
|
+
|
|
82
|
+
self.status('Building Source and Wheel (universal) distribution…')
|
|
83
|
+
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
|
|
84
|
+
|
|
85
|
+
self.status('Uploading the package to PyPI via Twine…')
|
|
86
|
+
os.system('twine upload dist/*')
|
|
87
|
+
|
|
88
|
+
self.status('Pushing git tags…')
|
|
89
|
+
os.system('git tag v{0}'.format(about['__version__']))
|
|
90
|
+
os.system('git push --tags')
|
|
91
|
+
|
|
92
|
+
sys.exit()
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# Where the magic happens:
|
|
96
|
+
setup(
|
|
97
|
+
name=NAME,
|
|
98
|
+
version=about['__version__'],
|
|
99
|
+
description=DESCRIPTION,
|
|
100
|
+
long_description=long_description,
|
|
101
|
+
long_description_content_type='text/markdown',
|
|
102
|
+
author=AUTHOR,
|
|
103
|
+
author_email=EMAIL,
|
|
104
|
+
python_requires=REQUIRES_PYTHON,
|
|
105
|
+
url=URL,
|
|
106
|
+
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
|
|
107
|
+
# If your package is a single module, use this instead of 'packages':
|
|
108
|
+
# py_modules=['mypackage'],
|
|
109
|
+
|
|
110
|
+
# entry_points={
|
|
111
|
+
# 'console_scripts': ['mycli=mymodule:cli'],
|
|
112
|
+
# },
|
|
113
|
+
install_requires=REQUIRED,
|
|
114
|
+
extras_require=EXTRAS,
|
|
115
|
+
include_package_data=True,
|
|
116
|
+
license='MIT',
|
|
117
|
+
classifiers=[
|
|
118
|
+
# Trove classifiers
|
|
119
|
+
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
120
|
+
'License :: OSI Approved :: MIT License',
|
|
121
|
+
'Programming Language :: Python',
|
|
122
|
+
'Programming Language :: Python :: 3',
|
|
123
|
+
'Programming Language :: Python :: 3.6',
|
|
124
|
+
'Programming Language :: Python :: Implementation :: CPython',
|
|
125
|
+
'Programming Language :: Python :: Implementation :: PyPy'
|
|
126
|
+
],
|
|
127
|
+
# $ setup.py publish support.
|
|
128
|
+
cmdclass={
|
|
129
|
+
'upload': UploadCommand,
|
|
130
|
+
},
|
|
131
|
+
)
|