Skip to content

Add mpas_analysis_subsection parameter to global_time_series#788

Merged
forsyth2 merged 8 commits into
mainfrom
fix-integration-tests
Mar 31, 2026
Merged

Add mpas_analysis_subsection parameter to global_time_series#788
forsyth2 merged 8 commits into
mainfrom
fix-integration-tests

Conversation

@forsyth2
Copy link
Copy Markdown
Collaborator

@forsyth2 forsyth2 commented Mar 6, 2026

Summary

Objectives:

  • Resolve issues discovered during integration testing on the main branch.

Select one: This pull request is...

  • a bug fix: increment the patch version
  • a small improvement: increment the minor version
  • a new feature: increment the minor version
  • an incompatible (non-backwards compatible) API change: increment the major version

Small Change

  • To merge, I will use "Squash and merge". That is, this change should be a single commit.
  • Logic: I have visually inspected the entire pull request myself.
  • Pre-commit checks: All the pre-commits checks have passed.

@forsyth2 forsyth2 self-assigned this Mar 6, 2026
@forsyth2 forsyth2 added the semver: bug Bug fix (will increment patch version) label Mar 6, 2026
@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 7, 2026

I think this is not quite the right solution to the problem, but it's not far off. Please see my comment here #634 (reply in thread).

Copy link
Copy Markdown
Collaborator Author

@forsyth2 forsyth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a second commit to address Xylar's comment in #634:

instead of adding a new original section, I would just pass global_time_series a list of subsections. It should be given both reference and test. Then, it should be able to find the data it needs in both.

However, Jill's comment #634 noted:

It looks like the files (claimed being vanished) are actually being synced okay. We can keep an eye on this during next weekly test.

That was in the context of the bundles test, but the global_time_series test also had file has vanished:. So, I think it makes sense to try the weekly tests again today without this second commit and see if the same error appears.

Comment thread zppy/global_time_series.py Outdated
dependencies.append(
os.path.join(
script_dir,
f"mpas_analysis{mpas_sub_str}_ts_{c['ts_year1']:04d}-{c['ts_year2']:04d}_climo_{c['climo_year1']:04d}-{c['climo_year2']:04d}.status",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The years will have to be adjusted based on the subsection though...

@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 26, 2026

@forsyth2, what's the status here? Any help I can give you to help this along?

@forsyth2
Copy link
Copy Markdown
Collaborator Author

@xylar

Since this PR's origin is a little complicated, here's a recap:

  • On the 3/5 main branch test, I ran the test suite cfg (generated from tests/integration/template_weekly_comprehensive_v3.cfg) with no changes to how global_time_series was handled. global_time_series_all_lnd_var_viewer_1985-1995 ended up failing with No ocean results directory found, but also rsync warning: some files vanished before they could be transferred. The former was specifically called out in the directory status table in that link.
    • I think what happened is that I saw "No ocean" and assumed there was an MPAS-Analysis issue, but reviewing it now, I can see of course there is no ocean because no ocean plots are turned on for that particular subtask (all_lnd). I think that was just a benign log message and that the rsync warning was the actual issue.
    • The rsync issue had also been popping up seemingly at random for e3sm_diags in the 3/5 test, the 3/16 test and the 3/25 test. Jill had suggested here it might just be a file system issue.
    • In any case, at the time, I started this PR to make the fixes to get the test passing. I thought the issue was that the years weren't being found correctly for global_time_series because Add mpas analysis model vs model #772 introduced mpas_analysis subtasks to tests/integration/template_weekly_comprehensive_v3.cfg.
      • So, I made the first commit, which just adds back in an [original] subtask that covers the exact parameter cases that the test pre-mpas_analysis-mvm covered. This required adding a parameter to reference the particular subtask.
      • Based on your comment that it wasn't the complete solution, I made a second commit, which attempts to convert the parameter from just one subtask to a list of them. However, I ran into the issue of the ts_years being different between the reference and test subtasks, so then how would zppy determine which year set to use as the dependency for global_time_series?
      • I decided, since the issue might just be the file system, to proceed with only the first commit (i.e., point to a single subtask).
  • On the 3/16 main branch test, I ran with just the first commit of this PR. I got ModuleNotFoundError: No module named 'mpas_analysis' well before global_time_series could ever run. That issue was that I was using your dev environment instead of creating a new one, as noted here. (Sorry about that, I actually hadn't ever constructed my own mpas_analysis environment before, but luckily it turned out to be straightforward).
  • On the 3/25 main branch test, I was able to get mpas_analysis and global_time_series working fine, again using only the first commit from this PR.

So, I think we have these two choices:

  1. Keep the current solution. I.e., merge just the first commit of this PR (single-subtask parameter).
  2. Convert the parameter to multi-subtask. Would need to be more sophisticated with the dependency handling in order to use the correct years

What do you think? Or should we choose a different path entirely?

@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 27, 2026

I remain unhappy with the first solution here. So I will try to implement the second one.

xylar added 2 commits March 27, 2026 14:44
We need to use the climatology and time series bounds from that
analysis, rather than from global time series, to construct their
filenames.

To make this easier and better share code, the bulk of this work
happens in the mpas_analysis module, not in global_time_series.
@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 27, 2026

@forsyth2, I don't have permission to push to this branch. Can you hard-reset to my equivalent? https://github.com/xylar/zppy/tree/fix-integration-tests

Then, we should be able to re-test to see if this works out.

@forsyth2
Copy link
Copy Markdown
Collaborator Author

Thanks @xylar. I've reset this branch to match yours. I also gave you write permissions to the repo, so you should be able to push changes yourself in the future. I'll test this out today.

@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 27, 2026

Thanks so much @forsyth2!

@xylar xylar self-requested a review March 27, 2026 19:04
Copy link
Copy Markdown
Collaborator Author

@forsyth2 forsyth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xylar Based on our conversation here, I've added this new commit. Let me know what you think.

I've also tested it:

Set up environments
# e3sm_diags, livvkit: don't need to set up env
# mpas_analysis: use existing test-mpas-analysis-develop-20260327
# zi (global_time_series): use existing test-zi-main-20260327
zppy run
# zppy itself #################################################################
cd ~/ez/zppy
git status
# On branch fix-integration-tests
# nothing to commit, working tree clean
git log --oneline | head -n 6
# 2857766f Add comparison_type subdir
# 2964b0f5 Add unit tests to ensure correct status filenames
# 91d39e72 Fix mpas_analysis status file names.
# 3f3cadc8 Allow multiple mpas_analysis subsections
# 4f466ab0 Add mpas_analysis_subsection parameter to global_time_series
# c9bd1817 Merge pull request #772 from xylar/add-mpas-analysis-model-vs-model
rm -rf build
conda clean --all --y
conda env create -f conda/dev.yml -n test-zppy-pr788-20260330
conda activate test-zppy-pr788-20260330
pre-commit run --all-files
python -m pip install .
pytest tests/test_*.py # 36 passed in 0.47s

# Edit tests/integration/utils.py.
TEST_SPECIFICS: Dict[str, Any] = {
    # These are custom environment_commands for specific tasks.
    # Never set these to "", because they will print the line
    # `environment_commands = ""` for the corresponding task,
    # thus overriding the value set higher up in the cfg.
    # That is, there will be no environment set.
    # (`environment_commands = ""` only redirects to Unified
    # if specified under the [default] task)
    "diags_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
    "mpas_analysis_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-mpas-analysis-develop-20260327",
    "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-zi-main-20260327",
    "pcmdi_diags_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
    # This is the environment setup for other tasks.
    # Leave as "" to use the latest Unified environment.
    "environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
    # For a complete test, run the set of latest cfgs and at least one set of legacy cfgs
    "cfgs_to_run": [
        # "weekly_bundles",
        # "weekly_comprehensive_v2",
        "weekly_comprehensive_v3",
        # "weekly_legacy_3.1.0_bundles",
        # "weekly_legacy_3.1.0_comprehensive_v2",
        # "weekly_legacy_3.1.0_comprehensive_v3",
        # "weekly_legacy_3.0.0_bundles",
        # "weekly_legacy_3.0.0_comprehensive_v2",
        # "weekly_legacy_3.0.0_comprehensive_v3",
    ],
    "tasks_to_run": [
        # "e3sm_diags",
        "mpas_analysis",
        "global_time_series",
        # "ilamb",
        # "pcmdi_diags",
    ],
    "unique_id": "test_pr788_20260330",
}
git diff # Diff looks good
python tests/integration/utils.py
# CFG FILES HAVE BEEN GENERATED FROM TEMPLATES WITH THESE SETTINGS:
# UNIQUE_ID=test_pr788_20260330
# diags_environment_commands=source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh
# mpas_analysis_environment_commands=source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-mpas-analysis-develop-20260327
# global_time_series_environment_commands=source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-zi-main-20260327
# pcmdi_diags_environment_commands=source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh
# environment_commands=source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh
# Reminder: `environment_commands=''` => the latest E3SM Unified environment will be used

# For reference:
alias sq
# alias sq='sqa -u ac.forsyth2'
alias sqa
# alias sqa='squeue -o "%8u %.7a %.4D %.9P %7i %.2t %.10r %.10M %.10l %j" --sort=P,-t,-p'
sq
# No jobs currently queued
zppy -c tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg
sq | wc -l # Mon 3/30 17:26 => 32 - header row = 31 jobs
Review finished runs
### v3 ###
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test_pr788_20260330/v3.LR.historical_0051/post/scripts
grep -v "OK" *status # Good, no errors

post/scripts directory status: No failures

Python tests
cd ~/ez/zppy
git status
# On branch fix-integration-tests
# Good, correct branch
# Env: test-zppy-pr788-20260330
# Good, correct env
ls tests/integration/test_*.py
salloc --nodes=1 --partition=debug --time=02:00:00 --account=e3sm
# We need to reactivate conda now that we're on a compute node
lcrc_conda # Activate conda
conda activate test-zppy-pr788-20260330
pytest tests/integration/test_images.py # 1 failed in 76.11s (0:01:16)
cat test_images_summary.md

Output:

------------------------------------------------ Captured stdout call ------------------------------------------------
Preparing weekly cfg tests
Preparing legacy 3.1.0 cfg tests
Preparing legacy 3.0.0 cfg tests
Running 1 tests in parallel
Individual test logs will be written to test_<name>.log files
✓ Completed: comprehensive_v3 (2 tasks) (log: test_comprehensive_v3.log)
Copy the output of test_images_summary.md to a Pull Request comment

Test Summary:
Test                                                    Total    Correct     Status
----------------------------------------------------------------------------------
comprehensive_v3_mpas_analysis                            856          0     ✗ FAIL
comprehensive_v3_global_time_series                      1404       1404     ✓ PASS
----------------------------------------------------------------------------------

⚠ Some tests had mismatched or missing images. Check individual log files for details.
============================================== short test summary info ===============================================
FAILED tests/integration/test_images.py::test_images - assert 856 == 0
============================================ 1 failed in 76.11s (0:01:16) ============================================

Complete summary table:

Test name Total images Correct images Missing images Mismatched images
comprehensive_v3_mpas_analysis 856 0 856 (list) 0
comprehensive_v3_global_time_series 1404 1404 0 0

Summary table -- only failing tests:

Test name Total images Correct images Missing images Mismatched images
comprehensive_v3_mpas_analysis 856 0 856 (list) 0

Results analysis: the list link is showing missing images because the expected results don't yet have the comparison subdir in their paths. We can check to make sure the paths are what we now expect them to be:

cd /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test_pr788_20260330/v3.LR.historical_0051/mpas_analysis/
ls
# mvm  mvo
ls mvm
# ts_1985-1995_climo_1990-1995_vs_ts_1985-1989_climo_1985-1989
ls mvo
# ts_1985-1989_climo_1985-1989  ts_1985-1995_climo_1990-1995

Good, as expected.

Comment thread zppy/mpas_analysis.py Outdated
if not is_mvm:
c["analysis_subdir"] = "mpas_analysis"
c["analysis_task_name"] = "mpas_analysis"
c["comparison_type"] = "mvo"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did mvo and mvm for model-vs-obs and model-vs-model respectively, but we can choose different labels.

Comment thread zppy/mpas_analysis.py
ref_identifier: str,
) -> None:
is_mvm = bool(reference_data_path)
c["analysis_subdir"] = "mpas_analysis"
Copy link
Copy Markdown
Collaborator Author

@forsyth2 forsyth2 Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative to having a comparison subdirectory explicitly referenced (as ${www}/${case}/{{ analysis_subdir }}/{{ comparison_type }}) would be to set c["analysis_subdir"] = f"mpas_analysis/{comparison_type}", so it's just one string to pass around.

Yet another alternative would be to forgo the the comparison subdirectory altogether and have both mvo and mvm all together in one directory. That's how e3sm_diags does it. In this case ls /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test_pr788_20260330/v3.LR.historical_0051/mpas_analysis/ would give something like:

ts_1985-1995_climo_1990-1995_vs_ts_1985-1989_climo_1985-1989
ts_1985-1989_climo_1985-1989
ts_1985-1995_climo_1990-1995

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another alternative would be to forgo the the comparison subdirectory altogether and have both mvo and mvm all together in one directory.

This would not work because typically we are not comparing the same run over different time periods, we are comparing different runs over the same time periods.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative to having a comparison subdirectory explicitly...

I prefer the more verbose way you have it now.

@forsyth2 forsyth2 marked this pull request as ready for review March 31, 2026 01:42
Copy link
Copy Markdown
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle, I like your solution. I need to see in practice how it works with comparisons between two different runs covering the same time period. But it looks promising.

Comment thread zppy/mpas_analysis.py
ref_identifier: str,
) -> None:
is_mvm = bool(reference_data_path)
c["analysis_subdir"] = "mpas_analysis"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another alternative would be to forgo the the comparison subdirectory altogether and have both mvo and mvm all together in one directory.

This would not work because typically we are not comparing the same run over different time periods, we are comparing different runs over the same time periods.

Comment thread zppy/mpas_analysis.py
ref_identifier: str,
) -> None:
is_mvm = bool(reference_data_path)
c["analysis_subdir"] = "mpas_analysis"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative to having a comparison subdirectory explicitly...

I prefer the more verbose way you have it now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think /{{ comparison_type }} also needs to be added earlier in this file:

workdir="../analysis/{{ analysis_subdir }}/{{ comparison_type }}"

Without this, the same analysis run once as mvo and once as mvm could clash.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, this change causes other problems:

Traceback (most recent call last):
  File "/gpfs/fs1/home/ac.xylar/chrysalis/miniforge3/envs/mpas_analysis_dev/bin/mpas_analysis", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "/gpfs/fs1/home/ac.xylar/mpas_work/MPAS-Analysis/develop/mpas_analysis/__main__.py", line 1138, in main
    control_config = build_config(control_config_file, shared_configs,
                                  machine_info)
  File "/gpfs/fs1/home/ac.xylar/mpas_work/MPAS-Analysis/develop/mpas_analysis/__main__.py", line 870, in build_config
    raise OSError(f'A config file {user_config_file} was specified but '
                  f'the file does not exist')
OSError: A config file /lcrc/group/e3sm/ac.xylar/zppy/mpas_analysis_model_vs_model/v3.LR.historical_0051/post/analysis/mpas_analysis/cfg/mpas_analysis_ts_1985-1995_climo_1990-1995.cfg was specified but the file does not exist

I'm trying to find a solution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a solution I'm testing now. It involves adding a new config option reference_comparison_type (in most cases left as the default value).

I'm testing now...

xylar added 2 commits March 31, 2026 10:02
This requires having a way for a user to specify whether an
external reference run (not defined in a given config file as
a subsection) was `mvo` or `mvm` via a new `reference_comparison_type`
config option.
@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 31, 2026

@forsyth2, I made changes to make sure there are mvo and mvm subdirs in the actual analysis output, not just the www paths. Please have a look. It worked in my testing:

/lcrc/group/e3sm/ac.xylar/zppy/mpas_analysis_model_vs_model/

@forsyth2
Copy link
Copy Markdown
Collaborator Author

Great, thanks @xylar I'll try it out now.

@forsyth2
Copy link
Copy Markdown
Collaborator Author

@xylar Thanks, this is passing my initial testing (same as above test; expected results will need to be updated of course to use the new dir structure). Unless you want to make more changes, I'll do a visual inspection review and merge if no issues come up.

Testing process (just for reference):

Set up environments
# e3sm_diags, livvkit: don't need to set up env
# mpas_analysis: use existing test-mpas-analysis-develop-20260327
# zi (global_time_series): use existing test-zi-main-20260327
zppy run
# zppy itself #################################################################
cd ~/ez/zppy
git status
# On branch fix-integration-tests
# nothing to commit, working tree clean
git checkout -b fix-integration-tests-backup20260331
git checkout fix-integration-tests
git fetch upstream fix-integration-tests
git reset --hard upstream/fix-integration-tests
git log --oneline | head -n 8
# b7ef5d01 Update the docs with reference_comparison_type, etc.
# 6492928b Put mpas_analysis runs in mvo or mvm subdirs
# 2857766f Add comparison_type subdir
# 2964b0f5 Add unit tests to ensure correct status filenames
# 91d39e72 Fix mpas_analysis status file names.
# 3f3cadc8 Allow multiple mpas_analysis subsections
# 4f466ab0 Add mpas_analysis_subsection parameter to global_time_series
# c9bd1817 Merge pull request #772 from xylar/add-mpas-analysis-model-vs-model

# Good, matches https://github.com/E3SM-Project/zppy/pull/788/commits

lcrc_conda
rm -rf build
conda clean --all --y
conda env create -f conda/dev.yml -n test-zppy-pr788-20260331
conda activate test-zppy-pr788-20260331
pre-commit run --all-files
python -m pip install .
pytest tests/test_*.py # 42 passed in 0.44s

# Edit tests/integration/utils.py.
TEST_SPECIFICS: Dict[str, Any] = {
    # These are custom environment_commands for specific tasks.
    # Never set these to "", because they will print the line
    # `environment_commands = ""` for the corresponding task,
    # thus overriding the value set higher up in the cfg.
    # That is, there will be no environment set.
    # (`environment_commands = ""` only redirects to Unified
    # if specified under the [default] task)
    "diags_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
    "mpas_analysis_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-mpas-analysis-develop-20260327",
    "global_time_series_environment_commands": "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-zi-main-20260327",
    "pcmdi_diags_environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
    # This is the environment setup for other tasks.
    # Leave as "" to use the latest Unified environment.
    "environment_commands": "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh",
    # For a complete test, run the set of latest cfgs and at least one set of legacy cfgs
    "cfgs_to_run": [
        # "weekly_bundles",
        # "weekly_comprehensive_v2",
        "weekly_comprehensive_v3",
        # "weekly_legacy_3.1.0_bundles",
        # "weekly_legacy_3.1.0_comprehensive_v2",
        # "weekly_legacy_3.1.0_comprehensive_v3",
        # "weekly_legacy_3.0.0_bundles",
        # "weekly_legacy_3.0.0_comprehensive_v2",
        # "weekly_legacy_3.0.0_comprehensive_v3",
    ],
    "tasks_to_run": [
        # "e3sm_diags",
        "mpas_analysis",
        "global_time_series",
        # "ilamb",
        # "pcmdi_diags",
    ],
    "unique_id": "test_pr788_20260331",
}
git diff # Diff looks good
python tests/integration/utils.py
# CFG FILES HAVE BEEN GENERATED FROM TEMPLATES WITH THESE SETTINGS:
# UNIQUE_ID=test_pr788_20260331
# diags_environment_commands=source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh
# mpas_analysis_environment_commands=source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-mpas-analysis-develop-20260327
# global_time_series_environment_commands=source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate test-zi-main-20260327
# pcmdi_diags_environment_commands=source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh
# environment_commands=source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh
# Reminder: `environment_commands=''` => the latest E3SM Unified environment will be used

# For reference:
alias sq
# alias sq='sqa -u ac.forsyth2'
alias sqa
# alias sqa='squeue -o "%8u %.7a %.4D %.9P %7i %.2t %.10r %.10M %.10l %j" --sort=P,-t,-p'
sq
# No jobs currently queued
zppy -c tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg
Review finished runs
### v3 ###
cd /lcrc/group/e3sm/ac.forsyth2/zppy_weekly_comprehensive_v3_output/test_pr788_20260331/v3.LR.historical_0051/post/scripts
grep -v "OK" *status # Good, no errors

post/scripts directory status: No failures

Python tests
cd ~/ez/zppy
git status
# On branch fix-integration-tests
# Good, correct branch
# Env: test-zppy-pr788-20260331
# Good, correct env
ls tests/integration/test_*.py
salloc --nodes=1 --partition=debug --time=02:00:00 --account=e3sm
# We need to reactivate conda now that we're on a compute node
lcrc_conda # Activate conda
conda activate test-zppy-pr788-20260331
pytest tests/integration/test_images.py # 1 failed in 72.66s (0:01:12)
cat test_images_summary.md

Output:

--------------------------------------------------- Captured stdout call ---------------------------------------------------
Preparing weekly cfg tests
Preparing legacy 3.1.0 cfg tests
Preparing legacy 3.0.0 cfg tests
Running 1 tests in parallel
Individual test logs will be written to test_<name>.log files
✓ Completed: comprehensive_v3 (2 tasks) (log: test_comprehensive_v3.log)
Copy the output of test_images_summary.md to a Pull Request comment

Test Summary:
Test                                                    Total    Correct     Status
----------------------------------------------------------------------------------
comprehensive_v3_mpas_analysis                            856          0     ✗ FAIL
comprehensive_v3_global_time_series                      1404       1404     ✓ PASS
----------------------------------------------------------------------------------

⚠ Some tests had mismatched or missing images. Check individual log files for details.
================================================= short test summary info ==================================================
FAILED tests/integration/test_images.py::test_images - assert 856 == 0
=============================================== 1 failed in 72.66s (0:01:12) ===============================================

Complete summary table:

Test name Total images Correct images Missing images Mismatched images
comprehensive_v3_mpas_analysis 856 0 856 (list) 0
comprehensive_v3_global_time_series 1404 1404 0 0
Results analysis

Summary table -- only failing tests:

Test name Total images Correct images Missing images Mismatched images
comprehensive_v3_mpas_analysis 856 0 856 (list) 0

The list link is showing missing images because the expected results don't have the comparison subdir in their paths. We can check to make sure the paths are what we now expect them to be:

cd /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_weekly_comprehensive_v3_www/test_pr788_20260331/v3.LR.historical_0051/mpas_analysis/
ls
# mvm  mvo
ls mvm
# ts_1985-1995_climo_1990-1995_vs_ts_1985-1989_climo_1985-1989
ls mvo
# ts_1985-1989_climo_1985-1989  ts_1985-1995_climo_1990-1995

Good, as expected.

@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 31, 2026

I'm good if you are. I'll approve.

Copy link
Copy Markdown
Collaborator Author

@forsyth2 forsyth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a high-level visual inspection. I think this should be good to merge as-is. Thank @xylar!

Comment thread zppy/mpas_analysis.py


def _get_identifier(
def get_mpas_analysis_prefixes(config: ConfigObj) -> Dict[str, List[str]]:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually only ever used in global_time_series (and in fact test_get_mpas_analysis_prefixes is in the global_time_series test file). However, I see this requires a lot of functions also used by mpas_analysis itself, so I suppose it's fine to keep this function defined here.

ChatGPT-generated function call graph of mpas_analysis.py Image

@forsyth2 forsyth2 mentioned this pull request Mar 31, 2026
7 tasks
@forsyth2
Copy link
Copy Markdown
Collaborator Author

I just added one more commit that simply updates the auto-generated file (no other code changes). That will avoid conflicts appearing in #801 (#800, if/when we get to it, would remove any need to worry about conflicts in the auto-generated files).

I'm going to go ahead and merge this PR.

@forsyth2 forsyth2 merged commit 30c2cee into main Mar 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver: bug Bug fix (will increment patch version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants