Skip to content

Commit

Permalink
Merge branch 'main' into ao_seaice_file
Browse files Browse the repository at this point in the history
  • Loading branch information
acordonez authored Aug 2, 2024
2 parents c788101 + 30640f1 commit 1fc49fe
Show file tree
Hide file tree
Showing 24 changed files with 1,192 additions and 656 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Release Notes and History

| <div style="width:300%">[Versions]</div> | Update summary |
| ------------- | ------------------------------------- |
| [v3.5] | Technical update: MJO and Monsoon Sperber [xCDAT](https://xcdat.readthedocs.io/en/latest/) conversion
| [v3.4.1] | Technical update
| [v3.4] | Technical update: Modes of variability [xCDAT](https://xcdat.readthedocs.io/en/latest/) conversion
| [v3.3.4] | Technical update
Expand Down Expand Up @@ -143,6 +144,7 @@ Release Notes and History


[Versions]: https://github.com/PCMDI/pcmdi_metrics/releases
[v3.5]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.5
[v3.4.1]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.4.1
[v3.4]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.4
[v3.3.4]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.3.4
Expand Down
453 changes: 358 additions & 95 deletions doc/jupyter/Demo/Demo_2b_monsoon_sperber.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ such as datasets from the `obs4MIPs`_ project.

References
==========
Lee, J., P. J. Gleckler, M.-S. Ahn, A. Ordonez, P. Ullrich, K. R. Sperber, K. E. Taylor, Y. Y. Planton, E. Guilyardi, P. Durack, C. Bonfils, M. D. Zelinka, L.-W. Chao, B. Dong, C. Doutriaux, C. Zhang, T. Vo, J. Boutte, M. F. Wehner, A. G. Pendergrass, D. Kim, Z. Xue, A. T. Wittenberg, and J. Krasting, 2024: Systematic and Objective Evaluation of Earth System Models: PCMDI Metrics Package (PMP) version 3. Geoscientific Model Development (accepted, publication in progress) [`preprint<https://egusphere.copernicus.org/preprints/2023/egusphere-2023-2720/>`_].
Lee, J., P. J. Gleckler, M.-S. Ahn, A. Ordonez, P. Ullrich, K. R. Sperber, K. E. Taylor, Y. Y. Planton, E. Guilyardi, P. Durack, C. Bonfils, M. D. Zelinka, L.-W. Chao, B. Dong, C. Doutriaux, C. Zhang, T. Vo, J. Boutte, M. F. Wehner, A. G. Pendergrass, D. Kim, Z. Xue, A. T. Wittenberg, and J. Krasting, 2024: Systematic and Objective Evaluation of Earth System Models: PCMDI Metrics Package (PMP) version 3. Geoscientific Model Development, 17, 3919–3948, https://doi.org/10.5194/gmd-17-3919-2024.

Gleckler et al. (2016), A more powerful reality test for climate models, Eos, 97, `doi:10.1029/2016EO051663 <https://eos.org/science-updates/a-more-powerful-reality-test-for-climate-models>`_.

Expand Down
1 change: 1 addition & 0 deletions docs/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ A suite of demo scripts and interactive Jupyter notebooks are provided with `thi
metrics_precip-distribution
metrics_subdaily-precipitation
metrics_sea_ice
Cloud Feedbacks <https://github.com/PCMDI/pcmdi_metrics/blob/main/pcmdi_metrics/cloud_feedback/README.md>
3 changes: 0 additions & 3 deletions pcmdi_metrics/mjo/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
from .debug_chk_plot import debug_chk_plot # noqa
from .dict_merge import dict_merge # noqa
from .lib_mjo import ( # noqa
Remove_dailySeasonalCycle,
calculate_ewr,
decorate_2d_array_axes,
generate_axes_and_decorate,
get_daily_ano_segment,
interp2commonGrid,
Expand All @@ -13,7 +11,6 @@
space_time_spectrum,
subSliceSegment,
taper,
unit_conversion,
write_netcdf_output,
)
from .mjo_metric_calc import mjo_metric_ewr_calculation # noqa
Expand Down
28 changes: 6 additions & 22 deletions pcmdi_metrics/mjo/lib/debug_chk_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,15 @@
import matplotlib.pyplot as plt
from cartopy.mpl.ticker import LatitudeFormatter, LongitudeFormatter

from pcmdi_metrics.io import get_latitude, get_longitude


def debug_chk_plot(d_seg_x_ano, Power, OEE, segment_year, daSeaCyc, segment_ano_year):
os.makedirs("debug", exist_ok=True)

""" FIX ME ---
x = vcs.init()
x.plot(d_seg_x_ano)
x.png('debug/d_seg_x_ano.png')
x.clear()
x.plot(Power)
x.png('debug/power.png')
x.clear()
x.plot(OEE)
x.png('debug/OEE.png')
"""

print("type(segment_year)", type(segment_year))
print("segment_year.shape:", segment_year.shape)
print(segment_year.getAxis(0))
print(segment_year.getAxis(1))
print(segment_year.getAxis(2))

plot_map(segment_year[0], "debug/segment.png")

print("type(daSeaCyc)", type(daSeaCyc))
Expand All @@ -35,16 +21,14 @@ def debug_chk_plot(d_seg_x_ano, Power, OEE, segment_year, daSeaCyc, segment_ano_

print("type(segment_ano_year)", type(segment_ano_year))
print("segment_ano_year.shape:", segment_ano_year.shape)
print(segment_ano_year.getAxis(0))
print(segment_ano_year.getAxis(1))
print(segment_ano_year.getAxis(2))

plot_map(segment_ano_year[0], "debug/segment_ano.png")


def plot_map(data, filename):
fig = plt.figure(figsize=(10, 6))
lons = data.getLongitude()
lats = data.getLatitude()
lons = get_longitude(data)
lats = get_latitude(data)
ax = plt.axes(projection=ccrs.PlateCarree(central_longitude=180))
im = ax.contourf(lons, lats, data, transform=ccrs.PlateCarree(), cmap="viridis")
ax.coastlines()
Expand Down
Loading

0 comments on commit 1fc49fe

Please sign in to comment.