From 06bf9ac2032e5df9892e75601351c28fa27ad858 Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 10:55:15 -0600 Subject: [PATCH 01/12] Per #474, updated links --- docs/Users_Guide/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Users_Guide/index.rst b/docs/Users_Guide/index.rst index 90f4099e..35991b93 100644 --- a/docs/Users_Guide/index.rst +++ b/docs/Users_Guide/index.rst @@ -9,7 +9,7 @@ Python version of the statistics calculation functionality of METviewer, METexpress, plotting packages in METplotpy and is a stand-alone package for any other application. It is also a component of the unified METplus verification framework. More details about METplus can be found on the -`METplus website `_. +`METplus website `_. It is important to note here that METcalcpy is an evolving software package. This documentation describes the |release| release dated |release_date|. @@ -29,7 +29,7 @@ You may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 +https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under From f82b3ed8ef9fdca105e37c03f4db778dcb0a0784 Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 10:56:12 -0600 Subject: [PATCH 02/12] Per #474, updated link and formatting --- docs/Users_Guide/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Users_Guide/overview.rst b/docs/Users_Guide/overview.rst index 378af6dd..725880cb 100644 --- a/docs/Users_Guide/overview.rst +++ b/docs/Users_Guide/overview.rst @@ -24,7 +24,7 @@ The Developmental Testbed Center (DTC) ====================================== METcalcpy has been developed, and will be maintained and enhanced, by the -Developmental Testbed Center (DTC; http://www.dtcenter.org/ ). +Developmental Testbed Center (`DTC `_). The main goal of the DTC is to serve as a bridge between operations and research, to facilitate the activities of these two important components of the numerical weather prediction (NWP) community. The DTC provides an From eeb7aea8d9a6a33ee4778db1850bb969308e2efb Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 11:15:08 -0600 Subject: [PATCH 03/12] Per #474, update links and formatting --- docs/Users_Guide/aggregation.rst | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/Users_Guide/aggregation.rst b/docs/Users_Guide/aggregation.rst index ea847e42..800a62d1 100644 --- a/docs/Users_Guide/aggregation.rst +++ b/docs/Users_Guide/aggregation.rst @@ -6,10 +6,10 @@ Aggregation is an option that can be applied to MET stat output (in the appropriate format) to calculate aggregation statistics and confidence intervals. Input data must first be reformatted using the METdataio METreformat module to label all the columns with the corresponding statistic name specified in the -`MET User's Guide `_ -for `point-stat `_, -`grid-stat `_, or -`ensemble-stat `_ .stat output data. +`MET User's Guide `_ +for `point-stat `_, +`grid-stat `_, or +`ensemble-stat `_ .stat output data. Python Requirements =================== @@ -29,7 +29,7 @@ in the requirements.txt and nco_requirements.txt files: Retrieve Code ============= -Refer to the `Installation Guide `_ +Refer to the `Installation Guide `_ for instructions. @@ -44,7 +44,7 @@ This data was reformatted from the MET .stat output using the METdataio METrefor The reformatting step labels the columns with the corresponding statistics, based on the MET tool (point-stat, grid-stat, or ensemble-stat). The ECNT linetype of the MET grid-stat output has been reformatted to include the statistics names for all -`ECNT `_ specific columns. +`ECNT `_ specific columns. Input data **must** be in this format prior to using the aggregation @@ -53,9 +53,8 @@ module, agg_stat.py. The example data can be copied to a working directory, or left in this directory. The location of the data will be specified in the YAML configuration file. -Please refer to the METdataio User's Guide for instructions for reformatting MET .stat files : -https://metdataio.readthedocs.io/en/develop/Users_Guide/reformat_stat_data.html - +Please refer to the METdataio User's Guide for instructions for +`reformatting MET .stat files `_. Aggregation =========== @@ -70,7 +69,7 @@ The agg_stat module support the ECNT linetype that are output from the MET **ensemble-stat** tool The input to the agg_stat module must have the appropriate format. The ECNT linetype must first be -`reformatted via the METdataio METreformat module `_ +`reformatted via the METdataio METreformat module `_ by following the instructions under the **Reformatting for computing aggregation statistics with METcalcpy agg_stat** header. @@ -195,4 +194,4 @@ location of input and output data. The structure is similar to the original Rscript template from which this Python implementation was derived. **NOTE**: Remember to use the same PYTHONPATH defined above to ensure that the agg_stat module is found by -the Python import process. \ No newline at end of file +the Python import process. From 0cfee6a27d839fcae90249e0328250411dd8a5b5 Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 11:58:51 -0600 Subject: [PATCH 04/12] Per #474, update links and formatting --- docs/Users_Guide/write_mpr.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Users_Guide/write_mpr.rst b/docs/Users_Guide/write_mpr.rst index e5e6c704..30293e74 100644 --- a/docs/Users_Guide/write_mpr.rst +++ b/docs/Users_Guide/write_mpr.rst @@ -1,6 +1,6 @@ -********************** +********* Write MPR -********************** +********* Description =========== @@ -18,8 +18,8 @@ listed below. * `Blocking `_ * `Weather Regime `_ -* `Stratosphere Polar `_ -* `Stratosphere QBO `_ +* `Stratosphere Polar `_ +* `Stratosphere QBO `_ Information about Input Data ============================ @@ -79,8 +79,8 @@ INTERP_PNTS = 1, and OBTYPE = ADPUPA. be added in MET's format based off the first forecast time -Run from a python script -========================= +Run from a Python script +======================== * Make sure you have these required Python packages: @@ -96,4 +96,4 @@ Run from a python script write_mpr_file(data_fcst,data_obs,lats_in,lons_in,fcst_lead,fcst_valid,obs_lead,obs_valid,mod_name,desc,fcst_var,fcst_unit,fcst_lev,obs_var,obs_unit,obs_lev,maskname,obsslev,outdir,outfile_prefix) -The output fill be a .stat file located in outdir with data in `MET's Matched Pair Format `_. The file will be labeled with outfile_prefix and then have lead time, valid YYYYMMDD, and valid HHMMSS stamped onto the file name. +The output fill be a .stat file located in outdir with data in `MET's Matched Pair Format `_. The file will be labeled with outfile_prefix and then have lead time, valid YYYYMMDD, and valid HHMMSS stamped onto the file name. From bddd9a148247de1dc0be33ae211a4f5f8837011a Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 12:14:11 -0600 Subject: [PATCH 05/12] Per #474, updating links and formatting --- docs/Users_Guide/release-notes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index f7fb96f7..bdc3d4bc 100644 --- a/docs/Users_Guide/release-notes.rst +++ b/docs/Users_Guide/release-notes.rst @@ -4,7 +4,7 @@ METcalcpy Release Information ***************************** When applicable, release notes are followed by the GitHub issue number which -describes the bugfix, enhancement, or new feature: `METcalcpy GitHub issues. `_ +describes the bugfix, enhancement, or new feature: `METcalcpy GitHub issues `_ METcalcpy Release Notes ======================= @@ -27,7 +27,7 @@ METcalcpy Version 13.0.0-beta2 Release Notes (20260507) .. dropdown:: Repository, build, and test - * Add testing for py314 (`#468 `_) + * Add testing for py314 (`#468 `_) From 07c1461940d69e8967f1afc4bbc9d2aaa4b8247d Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 12:53:24 -0600 Subject: [PATCH 06/12] Per #474, cleaning up some warnings when building the documentation locally and a link --- docs/conf.py | 10 ++++++---- metcalcpy/diagnostics/land_surface.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b0a81420..7fb68ddd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,10 +63,12 @@ suppress_warnings = ['ref.citation'] # -- Sphinx control ----------------------------------------------------------- -#sphinx_gallery_conf = { -# 'examples_dirs': [os.path.join('..', 'examples')], -# 'gallery_dirs': ['examples'] -#} +sphinx_gallery_conf = { + 'examples_dirs': [os.path.join('..', 'examples')], + 'gallery_dirs': ['auto_examples'], + 'filename_pattern': r'/plot', + 'ignore_pattern': r'__init__\.py|cross_spectra\.py', +} # -- Options for HTML output ------------------------------------------------- diff --git a/metcalcpy/diagnostics/land_surface.py b/metcalcpy/diagnostics/land_surface.py index 6fac300b..01ac217d 100644 --- a/metcalcpy/diagnostics/land_surface.py +++ b/metcalcpy/diagnostics/land_surface.py @@ -32,7 +32,7 @@ def calc_ctp(pressure,temperature,station_index,start_pressure_hpa=-1,bot_pressu float32 Reference: - Findell, K. L., and E. A. B. Eltahir, 2003: Atmospheric Controls on Soil Moisture–Boundary Layer Interactions. Part I: Framework Development. J. Hydrometeor., 4, 552–569, https://doi.org/10.1175/1525-7541(2003)004<0552:ACOSML>2.0.CO;2. + Findell, K. L., and E. A. B. Eltahir, 2003: Atmospheric Controls on Soil Moisture–Boundary Layer Interactions. Part I: Framework Development. J. Hydrometeor., 4, 552–569, `https://doi.org/10.1175/1525-7541(2003)004%3C0552:ACOSML%3E2.0.CO;2 `_. Also see: https://www.pauldirmeyer.com/coupling-metrics for a summary of this and other land-atmosphere coupling metrics. From fcd825fdf44639abf917ad5f886645e8d1a94870 Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 13:04:45 -0600 Subject: [PATCH 07/12] Per #474, fixing links --- docs/Contributors_Guide/index.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/Contributors_Guide/index.rst b/docs/Contributors_Guide/index.rst index de7f3d2c..552eae6d 100644 --- a/docs/Contributors_Guide/index.rst +++ b/docs/Contributors_Guide/index.rst @@ -9,7 +9,7 @@ other scripts. Python Requirements =================== -For information about the Python Requirements for METcalcpy, please see the User’s Guide `Python Requirements `_ section in the `Installation Guide `_. +For information about the Python Requirements for METcalcpy, please see the User’s Guide `Python Requirements `_ section in the `https://metplus.readthedocs.io/projects/metcalcpy/en/latest/Users_Guide/installation.html#installation-guide>`_. Coding Standards ================ @@ -206,7 +206,3 @@ Incorporate Your Code Into the Repository * When your PR has been approved, you (or your reviewer) can merge the code into the *develop* branch * Close the Github issue you created. - - - - From 3a92395b54d73c297a0a879307085e6a04b150e7 Mon Sep 17 00:00:00 2001 From: jprestop Date: Wed, 22 Jul 2026 17:35:08 -0600 Subject: [PATCH 08/12] Per #474, fixing links --- docs/Contributors_Guide/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Contributors_Guide/index.rst b/docs/Contributors_Guide/index.rst index 552eae6d..1c33f8ad 100644 --- a/docs/Contributors_Guide/index.rst +++ b/docs/Contributors_Guide/index.rst @@ -9,7 +9,7 @@ other scripts. Python Requirements =================== -For information about the Python Requirements for METcalcpy, please see the User’s Guide `Python Requirements `_ section in the `https://metplus.readthedocs.io/projects/metcalcpy/en/latest/Users_Guide/installation.html#installation-guide>`_. +For information about the Python Requirements for METcalcpy, please see the User’s Guide `Python Requirements `_ section in the `Installation `_ section. Coding Standards ================ From eef063cf8d6cf0d8f7d4e5c9046975cc96ba0cfa Mon Sep 17 00:00:00 2001 From: jprestop Date: Mon, 6 Jul 2026 17:55:09 -0600 Subject: [PATCH 09/12] Per METplus#3247, adding automated link checking in conjunction with new repo dtcenter/metplus-action-linkcheck --- .github/workflows/linkcheck_pull_request.yml | 15 +++++++++++++ .github/workflows/linkcheck_scheduled.yml | 15 +++++++++++++ docs/conf.py | 23 +++++++++++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linkcheck_pull_request.yml create mode 100644 .github/workflows/linkcheck_scheduled.yml diff --git a/.github/workflows/linkcheck_pull_request.yml b/.github/workflows/linkcheck_pull_request.yml new file mode 100644 index 00000000..87639a3e --- /dev/null +++ b/.github/workflows/linkcheck_pull_request.yml @@ -0,0 +1,15 @@ +name: linkcheck-pr +on: + pull_request: + paths: + - 'docs/**' + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtcenter/metplus-action-linkcheck@v1 + with: + fail-on-broken-links: 'true' + upload-artifact: 'true' \ No newline at end of file diff --git a/.github/workflows/linkcheck_scheduled.yml b/.github/workflows/linkcheck_scheduled.yml new file mode 100644 index 00000000..7d686935 --- /dev/null +++ b/.github/workflows/linkcheck_scheduled.yml @@ -0,0 +1,15 @@ +name: linkcheck-scheduled +on: + schedule: + - cron: '0 6 * * 1' + workflow_dispatch: {} + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtcenter/metplus-action-linkcheck@v1 + with: + fail-on-broken-links: 'true' + \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 7fb68ddd..dfde70d0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -101,7 +101,28 @@ numfig_format = { 'figure': 'Figure %s', } - + +# -- linkcheck builder configuration ---------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder + +linkcheck_timeout = 10 +linkcheck_retries = 2 +linkcheck_workers = 8 + +linkcheck_ignore = [ + # add regex patterns for URLs that should be skipped, e.g.: + # r'https://dtcenter\.org/.*', # if this site blocks automated requests + # r'https://doi\.org/.*', + # r'https://journals\.ametsoc\.org/.*', # AMS journal site blocks bot user-agents +] + +linkcheck_allowed_redirects = { + # map of regex -> regex for redirects that are fine to follow +} + +linkcheck_anchors = True +linkcheck_anchors_ignore = ['^!'] + # -- Export variables -------------------------------------------------------- rst_epilog = """ From fd1e7177007d216de5ff3956d53ffc0c15b8cbd5 Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 28 Jul 2026 08:56:28 -0600 Subject: [PATCH 10/12] Per #474, need to ignore some links --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index dfde70d0..66cab885 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -112,7 +112,7 @@ linkcheck_ignore = [ # add regex patterns for URLs that should be skipped, e.g.: # r'https://dtcenter\.org/.*', # if this site blocks automated requests - # r'https://doi\.org/.*', + r'https://doi\.org/.*', # DOI redirectors often 403 non-browser requests # r'https://journals\.ametsoc\.org/.*', # AMS journal site blocks bot user-agents ] From 89443193652be55d0beeea326b11053f3c471e3b Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 28 Jul 2026 09:04:34 -0600 Subject: [PATCH 11/12] Per #474, remove unwanted files --- .github/workflows/linkcheck_pull_request.yml | 15 --------------- .github/workflows/linkcheck_scheduled.yml | 15 --------------- 2 files changed, 30 deletions(-) delete mode 100644 .github/workflows/linkcheck_pull_request.yml delete mode 100644 .github/workflows/linkcheck_scheduled.yml diff --git a/.github/workflows/linkcheck_pull_request.yml b/.github/workflows/linkcheck_pull_request.yml deleted file mode 100644 index 87639a3e..00000000 --- a/.github/workflows/linkcheck_pull_request.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: linkcheck-pr -on: - pull_request: - paths: - - 'docs/**' - -jobs: - linkcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtcenter/metplus-action-linkcheck@v1 - with: - fail-on-broken-links: 'true' - upload-artifact: 'true' \ No newline at end of file diff --git a/.github/workflows/linkcheck_scheduled.yml b/.github/workflows/linkcheck_scheduled.yml deleted file mode 100644 index 7d686935..00000000 --- a/.github/workflows/linkcheck_scheduled.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: linkcheck-scheduled -on: - schedule: - - cron: '0 6 * * 1' - workflow_dispatch: {} - -jobs: - linkcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtcenter/metplus-action-linkcheck@v1 - with: - fail-on-broken-links: 'true' - \ No newline at end of file From aa329b69bd1436fe3097763cf64a865e8fbf0e3d Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 28 Jul 2026 09:06:39 -0600 Subject: [PATCH 12/12] Per #3474, resolving links --- docs/Users_Guide/overview.rst | 2 +- docs/auto_examples/index.rst | 37 +++++++++-------------------------- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/docs/Users_Guide/overview.rst b/docs/Users_Guide/overview.rst index 725880cb..609ef24e 100644 --- a/docs/Users_Guide/overview.rst +++ b/docs/Users_Guide/overview.rst @@ -24,7 +24,7 @@ The Developmental Testbed Center (DTC) ====================================== METcalcpy has been developed, and will be maintained and enhanced, by the -Developmental Testbed Center (`DTC `_). +Developmental Testbed Center (`DTC `_). The main goal of the DTC is to serve as a bridge between operations and research, to facilitate the activities of these two important components of the numerical weather prediction (NWP) community. The DTC provides an diff --git a/docs/auto_examples/index.rst b/docs/auto_examples/index.rst index 22a42042..13c956f5 100644 --- a/docs/auto_examples/index.rst +++ b/docs/auto_examples/index.rst @@ -1,8 +1,5 @@ :orphan: - -.. _sphx_glr_auto_examples: - .. _examples-index: This is the gallery of examples for METcalcpy @@ -21,44 +18,28 @@ Some general examples coming soon. .. raw:: html -
- -.. only:: html +
- .. figure:: ../_static/sphx_glr_cross_spectra_thumb.png +.. thumbnail-parent-div-open - :ref:`sphx_glr_auto_examples_cross_spectra.py` +.. thumbnail-parent-div-close .. raw:: html
-.. toctree:: - :hidden: - - /auto_examples/cross_spectra -.. raw:: html - -
- - - -.. only :: html - - .. container:: sphx-glr-footer - :class: sphx-glr-footer-gallery - - - .. container:: sphx-glr-download +.. only:: html - :download:`Download all examples in Python source code: auto_examples_python.zip ` + .. container:: sphx-glr-footer sphx-glr-footer-gallery + .. container:: sphx-glr-download sphx-glr-download-python + :download:`Download all examples in Python source code: auto_examples_python.zip ` - .. container:: sphx-glr-download + .. container:: sphx-glr-download sphx-glr-download-jupyter - :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip ` + :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip ` .. only:: html