gfdlvitals 3.0.8__tar.gz → 3.0.9__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.
- {gfdlvitals-3.0.8/gfdlvitals.egg-info → gfdlvitals-3.0.9}/PKG-INFO +11 -1
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/cli.py +1 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/models/CM4.py +12 -1
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/extract_ocean_scalar.py +26 -3
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/version.py +1 -1
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9/gfdlvitals.egg-info}/PKG-INFO +11 -1
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/LICENSE +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/README.md +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/docs/source/conf.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/__init__.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/__init__.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/cubesphere.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/ice.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/land_lm3.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/land_lm4.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/latlon.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/averagers/tripolar.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/diags/__init__.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/diags/amoc.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/diags/fms.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/diags/m6toolbox.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/extensions.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/models/ESM2.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/models/__init__.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/plot.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/LM3_variable_dictionary.pkl +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/LICENSE.txt +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Black.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Bold.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Italic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Light.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Medium.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Regular.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-Thin.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/LICENSE.txt +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-BoldItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Italic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-LightItalic.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/historical.db +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/picontrol.db +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/sample.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/__init__.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/average.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/git.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/gmeantools.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/merge.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/netcdf.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/util/xrtools.py +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals.egg-info/SOURCES.txt +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals.egg-info/dependency_links.txt +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals.egg-info/not-zip-safe +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals.egg-info/requires.txt +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals.egg-info/top_level.txt +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/scripts/db2nc +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/scripts/gfdlvitals +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/scripts/plotdb +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/setup.cfg +0 -0
- {gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gfdlvitals
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.9
|
|
4
4
|
Summary: Tools for calculating scalar diagnostics from GFDL models
|
|
5
5
|
Home-page: https://github.com/jkrasting/gfdlvitals
|
|
6
6
|
Author: John Krasting
|
|
@@ -16,6 +16,16 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
16
16
|
Requires-Python: >=3.7
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
Requires-Dist: setuptools
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: h5netcdf
|
|
23
|
+
Requires-Dist: pandas
|
|
24
|
+
Requires-Dist: netCDF4
|
|
25
|
+
Requires-Dist: matplotlib
|
|
26
|
+
Requires-Dist: xarray
|
|
27
|
+
Requires-Dist: cftime
|
|
28
|
+
Requires-Dist: nc-time-axis
|
|
19
29
|
|
|
20
30
|
|
|
21
31
|
**gfdlvitals** is a Python package in the public domain
|
|
@@ -55,13 +55,24 @@ def routines(args, infile):
|
|
|
55
55
|
if any(comp in comps for comp in ["ice", "all"]):
|
|
56
56
|
averagers.ice.xr_average(fyear, tar, modules)
|
|
57
57
|
|
|
58
|
+
# -- Ice Shelf
|
|
59
|
+
fname = f"{fyear}.ice_shelf_scalar.nc"
|
|
60
|
+
if any(comp in comps for comp in ["iceshelf", "all"]):
|
|
61
|
+
if tar_member_exists(tar, fname):
|
|
62
|
+
print(fname)
|
|
63
|
+
fdata = nctools.extract_from_tar(tar, fname, ncfile=True)
|
|
64
|
+
extract_ocean_scalar.mom6(
|
|
65
|
+
fdata, fyear, "./", outname="globalAveIceShelf.db"
|
|
66
|
+
)
|
|
67
|
+
fdata.close()
|
|
68
|
+
|
|
58
69
|
# -- Ocean
|
|
59
70
|
fname = f"{fyear}.ocean_scalar_annual.nc"
|
|
60
71
|
if any(comp in comps for comp in ["ocean", "all"]):
|
|
61
72
|
if tar_member_exists(tar, fname):
|
|
62
73
|
print(f"{fyear}.ocean_scalar_annual.nc")
|
|
63
74
|
fdata = nctools.extract_from_tar(tar, fname, ncfile=True)
|
|
64
|
-
extract_ocean_scalar.mom6(fdata, fyear, "./")
|
|
75
|
+
extract_ocean_scalar.mom6(fdata, fyear, "./", outname="globalAveOcean.db")
|
|
65
76
|
fdata.close()
|
|
66
77
|
|
|
67
78
|
# -- OBGC
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
""" Extract scalar fields from ocean model output """
|
|
2
2
|
|
|
3
|
+
import numpy as np
|
|
3
4
|
from . import gmeantools
|
|
4
5
|
|
|
5
6
|
__all__ = ["mom6"]
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
def mom6(fdata, fyear, outdir):
|
|
9
|
+
def mom6(fdata, fyear, outdir, outname="globalAveOcean.db"):
|
|
9
10
|
"""Extract MOM6 scalar output and save to sqlite
|
|
10
11
|
|
|
11
12
|
Parameters
|
|
@@ -27,8 +28,30 @@ def mom6(fdata, fyear, outdir):
|
|
|
27
28
|
if len(fdata.variables[varname].shape) == 2:
|
|
28
29
|
units = gmeantools.extract_metadata(fdata, varname, "units")
|
|
29
30
|
long_name = gmeantools.extract_metadata(fdata, varname, "long_name")
|
|
30
|
-
result = fdata.variables[varname]
|
|
31
|
-
|
|
31
|
+
result = fdata.variables[varname]
|
|
32
|
+
if result.shape[0] == 12:
|
|
33
|
+
result = result[:, 0]
|
|
34
|
+
result = np.ma.average(
|
|
35
|
+
result,
|
|
36
|
+
weights=[
|
|
37
|
+
31.0,
|
|
38
|
+
28.0,
|
|
39
|
+
31.0,
|
|
40
|
+
30.0,
|
|
41
|
+
31.0,
|
|
42
|
+
30.0,
|
|
43
|
+
31.0,
|
|
44
|
+
31.0,
|
|
45
|
+
30.0,
|
|
46
|
+
31.0,
|
|
47
|
+
30.0,
|
|
48
|
+
31.0,
|
|
49
|
+
],
|
|
50
|
+
axis=0,
|
|
51
|
+
)
|
|
52
|
+
elif result.shape[0] == 1:
|
|
53
|
+
result = result[0, 0]
|
|
54
|
+
sqlfile = f"{outdir}/{fyear}.{outname}"
|
|
32
55
|
gmeantools.write_metadata(sqlfile, varname, "units", units)
|
|
33
56
|
gmeantools.write_metadata(sqlfile, varname, "long_name", long_name)
|
|
34
57
|
gmeantools.write_sqlite_data(sqlfile, varname, fyear[:4], result)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gfdlvitals
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.9
|
|
4
4
|
Summary: Tools for calculating scalar diagnostics from GFDL models
|
|
5
5
|
Home-page: https://github.com/jkrasting/gfdlvitals
|
|
6
6
|
Author: John Krasting
|
|
@@ -16,6 +16,16 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
16
16
|
Requires-Python: >=3.7
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
Requires-Dist: setuptools
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: h5netcdf
|
|
23
|
+
Requires-Dist: pandas
|
|
24
|
+
Requires-Dist: netCDF4
|
|
25
|
+
Requires-Dist: matplotlib
|
|
26
|
+
Requires-Dist: xarray
|
|
27
|
+
Requires-Dist: cftime
|
|
28
|
+
Requires-Dist: nc-time-axis
|
|
19
29
|
|
|
20
30
|
|
|
21
31
|
**gfdlvitals** is a Python package in the public domain
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-BlackItalic.ttf
RENAMED
|
File without changes
|
|
File without changes
|
{gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-BoldItalic.ttf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-LightItalic.ttf
RENAMED
|
File without changes
|
|
File without changes
|
{gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-MediumItalic.ttf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto/Roboto-ThinItalic.ttf
RENAMED
|
File without changes
|
{gfdlvitals-3.0.8 → gfdlvitals-3.0.9}/gfdlvitals/resources/fonts/Roboto_Condensed/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|