gfdlvitals 3.0.6__tar.gz → 3.0.8__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.
Files changed (66) hide show
  1. {gfdlvitals-3.0.6/gfdlvitals.egg-info → gfdlvitals-3.0.8}/PKG-INFO +1 -1
  2. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/extensions.py +7 -1
  3. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/plot.py +7 -1
  4. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/version.py +1 -1
  5. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8/gfdlvitals.egg-info}/PKG-INFO +1 -1
  6. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/LICENSE +0 -0
  7. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/README.md +0 -0
  8. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/docs/source/conf.py +0 -0
  9. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/__init__.py +0 -0
  10. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/__init__.py +0 -0
  11. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/cubesphere.py +0 -0
  12. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/ice.py +0 -0
  13. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/land_lm3.py +0 -0
  14. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/land_lm4.py +0 -0
  15. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/latlon.py +0 -0
  16. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/averagers/tripolar.py +0 -0
  17. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/cli.py +0 -0
  18. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/diags/__init__.py +0 -0
  19. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/diags/amoc.py +0 -0
  20. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/diags/fms.py +0 -0
  21. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/diags/m6toolbox.py +0 -0
  22. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/models/CM4.py +0 -0
  23. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/models/ESM2.py +0 -0
  24. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/models/__init__.py +0 -0
  25. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/LM3_variable_dictionary.pkl +0 -0
  26. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/LICENSE.txt +0 -0
  27. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Black.ttf +0 -0
  28. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  29. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Bold.ttf +0 -0
  30. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  31. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Italic.ttf +0 -0
  32. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Light.ttf +0 -0
  33. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  34. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Medium.ttf +0 -0
  35. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  36. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Regular.ttf +0 -0
  37. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-Thin.ttf +0 -0
  38. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  39. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/LICENSE.txt +0 -0
  40. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf +0 -0
  41. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-BoldItalic.ttf +0 -0
  42. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Italic.ttf +0 -0
  43. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf +0 -0
  44. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-LightItalic.ttf +0 -0
  45. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf +0 -0
  46. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/historical.db +0 -0
  47. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/resources/picontrol.db +0 -0
  48. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/sample.py +0 -0
  49. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/__init__.py +0 -0
  50. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/average.py +0 -0
  51. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/extract_ocean_scalar.py +0 -0
  52. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/git.py +0 -0
  53. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/gmeantools.py +0 -0
  54. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/merge.py +0 -0
  55. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/netcdf.py +0 -0
  56. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals/util/xrtools.py +0 -0
  57. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals.egg-info/SOURCES.txt +0 -0
  58. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals.egg-info/dependency_links.txt +0 -0
  59. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals.egg-info/not-zip-safe +0 -0
  60. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals.egg-info/requires.txt +0 -0
  61. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/gfdlvitals.egg-info/top_level.txt +0 -0
  62. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/scripts/db2nc +0 -0
  63. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/scripts/gfdlvitals +0 -0
  64. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/scripts/plotdb +0 -0
  65. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/setup.cfg +0 -0
  66. {gfdlvitals-3.0.6 → gfdlvitals-3.0.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gfdlvitals
3
- Version: 3.0.6
3
+ Version: 3.0.8
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
@@ -1,6 +1,7 @@
1
1
  """ Pandas class extension for gfdlvitals """
2
2
 
3
3
  import copy
4
+ import datetime
4
5
  import math
5
6
  import sqlite3
6
7
  import warnings
@@ -369,7 +370,7 @@ class VitalsDataFrame(pd.DataFrame):
369
370
  padding = np.arange(1, maxlen - len(self.index) + 1) + endyear[0]
370
371
  added_index = [cftime.DatetimeNoLeap(x, *endyear[1:]) for x in padding]
371
372
  _df = pd.DataFrame({"times": added_index}).set_index("times")
372
- _df = self.append(_df)
373
+ _df = pd.concat([self,_df])
373
374
  _df.attrs = self.attrs
374
375
  for column in self.columns:
375
376
  _df[column].attrs = self[column].attrs
@@ -394,6 +395,11 @@ class VitalsDataFrame(pd.DataFrame):
394
395
  self
395
396
  Extended dataset
396
397
  """
398
+
399
+ # convert ISO index to datetime object
400
+ if isinstance(self.index[0], str):
401
+ self.index = [datetime.datetime.fromisoformat(x) for x in self.index]
402
+
397
403
  tindex = np.array(
398
404
  [
399
405
  cftime.date2num(x, "days since 0001-01-01", calendar="noleap")
@@ -45,6 +45,7 @@ def plot_timeseries(
45
45
  labels=None,
46
46
  legend=True,
47
47
  means=True,
48
+ title="both",
48
49
  ):
49
50
  """Standardized function to make a timeseries plot
50
51
 
@@ -71,6 +72,9 @@ def plot_timeseries(
71
72
  Display a legend for the plot, by default True
72
73
  means : bool, optional
73
74
  Add variable means to the legend, by default True
75
+ title : str, optional
76
+ Specify "varname", "longname", "both", or "none",
77
+ by default "both"
74
78
 
75
79
  Returns
76
80
  -------
@@ -210,12 +214,14 @@ def plot_timeseries(
210
214
  # Text annotations
211
215
 
212
216
  if i == 0:
217
+ _varname = var if (title in ["varname", "both"]) else ""
213
218
  axes_dict[label]["topline_label"] = _ax.text(
214
- 0.01, 1.08, var, ha="left", transform=ax1.transAxes, fontsize=22
219
+ 0.01, 1.08, _varname, ha="left", transform=ax1.transAxes, fontsize=22
215
220
  )
216
221
 
217
222
  _long_name = dset[var].attrs["long_name"]
218
223
  _long_name = f"Sum of {_long_name}" if plottype == "sum" else _long_name
224
+ _long_name = _long_name if (title in ["longname", "both"]) else ""
219
225
 
220
226
  axes_dict[label]["longname_label"] = _ax.text(
221
227
  0.01,
@@ -1,3 +1,3 @@
1
1
  """momlevel: version information"""
2
2
 
3
- __version__ = "3.0.6"
3
+ __version__ = "3.0.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gfdlvitals
3
- Version: 3.0.6
3
+ Version: 3.0.8
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes