TEM calculation and plotting updates#351
Conversation
Add check for strings in contour ranges. Add function for averaging the cosine of latitudes Add function to check supplied obs file(s)
This is an unnecessary variable to plot, so don't waste time with it
|
This is a pretty old PR ... I just had Claude do an analysis, and it looks like we should just merge it. Here's the report: PR #351 Merge Analysis & RecommendationsPR Title: TEM calculation and plotting updates Executive Summary✅ READY TO MERGE - PR #351 addresses a critical consistency issue between TEM file creation and TEM plotting. The merge is clean with no conflicts, but the PR should be merged as-is without any modifications. Problem Being SolvedCritical Issue: The main branch has a variable naming mismatch:
This PR reconciles all three components into a consistent state. Key Changes in PR #3511. TEM Variable Naming (Critical)
2. New THZM Variable (Enhancement)
3. Coordinate Variables Added
4. Time Bounds Handling (Robustness)
5. Plotting Refactor (Code Quality)
6. Variable Defaults Configuration (Visualization)
7. Git Info Handling Simplification
Merge Validation ChecklistAutomated Tests
Content Validation
Minor Observations (Non-Blocking)
Specific Merge Recommendations✅ RECOMMENDED: Merge as-isRationale:
Steps:git checkout main
git pull origin main # Ensure latest
git merge --no-edit pr-351
git push origin mainPost-Merge Verification (Optional but Recommended)Run TEM diagnostics on a test case to verify: # After merging, in a test ADF run config:
adf user_config.yaml
# Check that TEM plots generate without "KeyError: 'uzm'" or similarWhat Not To Change❌ Do NOT modify these aspects before merging:
Summary Table
*Minor escape sequence warnings (non-blocking) ConclusionThis PR is production-ready and should be merged immediately. It fixes a critical bug (variable naming) and adds valuable enhancements (THZM, better defaults) without breaking changes. The merge is clean, and all supporting infrastructure is in place. Next step: Merge to main with confidence. |








This PR will bring much needed updates and improvements to the TEM plots and calculations.
In addition, there are small changes to the plot page names, mainly adding an argument for file name extension. This replaces the default "Mean" extension attached to all plot html names so that it can be flexible for other averaged plots.
This PR also cleans up the
variable_defaults.yamlfile by removing percent difference arguments that are now defaulted inplotting_functions.py. The user can still add these arguments in the variable defaults file to override the default values. Additionally, the TEM defaults have been improved for better plots.The zonal mean potential temperature variable added to TEM diagnostics requires PMID, so in the usual plotting scripts a check has been made to skip plotting PMID as it is unnecessary.