Skip to content

Improve TC analysis workflow robustness for both EAM and EAMxx#828

Draft
zhangshixuan1987 wants to merge 1 commit into
mainfrom
zppy-tc
Draft

Improve TC analysis workflow robustness for both EAM and EAMxx#828
zhangshixuan1987 wants to merge 1 commit into
mainfrom
zppy-tc

Conversation

@zhangshixuan1987
Copy link
Copy Markdown
Collaborator

@zhangshixuan1987 zhangshixuan1987 commented May 15, 2026

Summary

Objectives:

  • Improve the robustness of the TC analysis workflow.
  • Support both EAM and EAMxx variable naming conventions through an ordered tc_vars mapping.
  • Derive the TempestExtremes mesh resolution and pg2 flag directly from the configured grid name.
  • Replace hard-coded TempestExtremes variable names with configurable variables.
  • Improve error handling and avoid misleading downstream failures when no tracks are detected.

Issue resolution:

  • Closes #<ISSUE_NUMBER_HERE>

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.

configuration file for test with EAMXX data


# Directions to run:
# 1. Update <output>, <www>, <environment_commands_secondary> below.
# 2. Run with `zppy -c examples/post.v3.LR.amip.0101.cfg`.
# Direction to create stand-alone test data for zppy-interfaces:
# 3. Once the jobs finish, `cd <output>/post/scripts`.
# 4. Run `grep -n "Running a zi-pcmdi command" pcmdi_diags*.o*` to find the pcmdi_diags commands.
# 5. Then, you can run those lines stand-alone.
[default]
input = /pscratch/sd/z/zhan391/e3smv4_project/ne256pg2_ne256pg2.F20TR-SCREAMv1.July-1.spanc800.2xauto.acc150.n0032.test2.1
output = /pscratch/sd/z/zhan391/e3smv4_project/ne256pg2_ne256pg2.F20TR-SCREAMv1.July-1.spanc800.2xauto.acc150.n0032.test2.1
case = ne256pg2_ne256pg2.F20TR-SCREAMv1.July-1.spanc800.2xauto.acc150.n0032.test2.1
www = /global/cfs/cdirs/e3sm/www/zhan391/eamxx-pcmdi

partition = "debug"
account = "e3sm"
#account = "priority"
campaign = "water_cycle"
debug = False
environment_commands = "source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_pm-cpu.sh"

[tc_analysis]
active = True
walltime = "02:00:00" # Example elapsed time: 3296 seconds (55 minutes)
years = "1995:2004:10",
input_component = "eamxx"
case = "6ha_ne30pg2"
input_files = "AVERAGE.nhours_x6"
#input_subdir = "archive/atm/hist"
input_subdir = "run/"
ts_grid = "ne30pg2"
# Note: Users must provide the variable list in the fixed sequence required by
# this TempestExtremes cyclone-detection workflow:
# SLP,T@200hPa,T@500hPa,U@model_bottom,V@model_bottom,U@850hPa,V@850hPa
# For example:
# EAM: vars="PSL,T200,T500,UBOT,VBOT,U850,V850"
# EAMxx: vars="SeaLevelPressure,T_mid_at_200hPa,T_mid_at_500hPa,U_at_model_bot,V_at_model_bot,U_at_850hPa,V_at_850hPa"
tc_vars = "SeaLevelPressure,T_mid_at_200hPa,T_mid_at_500hPa,U_at_model_bot,V_at_model_bot,U_at_850hPa,V_at_850hPa"

- Derive resolution and pg2 flag from grid name
- Add ordered tc_vars mapping for EAM and EAMxx variable conventions
- Replace hard-coded TempestExtremes variable names
- Add return-code checks for mesh generation and analysis commands
- Skip histograms gracefully when no tracks are detected
- Use mintime instead of deprecated minlength"
@zhangshixuan1987 zhangshixuan1987 marked this pull request as draft May 15, 2026 00:23
@zhangshixuan1987
Copy link
Copy Markdown
Collaborator Author

@chengzhuzhang : Please see the log file in the following directory for my test:

/pscratch/sd/z/zhan391/e3smv4_project/ne256pg2_ne256pg2.F20TR-SCREAMv1.July-1.spanc800.2xauto.acc150.n0032.test2.1/post/scripts/tc_analysis_1995-2004.*

I think the processing was successful, but I need to check the plots to see if the results are reasonable. Another thing is that the AEW tracking was empty, need to double-check if this is real or if something unexpected behavior was triggered for this part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant