Skip to content

feat(seaborn): implement skewt-logp-atmospheric#3927

Merged
github-actions[bot] merged 8 commits intomainfrom
implementation/skewt-logp-atmospheric/seaborn
Jan 18, 2026
Merged

feat(seaborn): implement skewt-logp-atmospheric#3927
github-actions[bot] merged 8 commits intomainfrom
implementation/skewt-logp-atmospheric/seaborn

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Implementation: skewt-logp-atmospheric - seaborn

Implements the seaborn version of skewt-logp-atmospheric.

File: plots/skewt-logp-atmospheric/implementations/seaborn.py

Parent Issue: #3802


🤖 impl-generate workflow

@github-actions github-actions Bot added the ai-review-failed AI review action failed or timed out label Jan 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor Author

❌ AI Review Failed

The AI review action completed but did not produce valid output files.

What happened:

  • The Claude Code Action ran
  • No quality_score.txt file was created
  • No review data was extracted

Action required:
Re-run the impl-review workflow manually:

gh workflow run impl-review.yml -f pr_number=3927

🤖 impl-review

@MarkusNeusinger MarkusNeusinger removed the ai-review-failed AI review action failed or timed out label Jan 18, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 18, 2026

AI Review - Attempt 1/3

Image Description

The plot displays a Skew-T Log-P atmospheric diagram with a light gray (#fafafa) background. The Y-axis shows pressure (hPa) on a logarithmic scale, inverted from 1000 hPa at the bottom to 100 hPa at the top. The X-axis shows temperature in °C ranging from -50 to 50. Temperature profile is shown as a solid red line with circular markers, and dewpoint profile as a dashed blue line with square markers. The diagram includes multiple reference lines: light gray isotherms (skewed at 45°), brown/tan dry adiabats, green dashed moist adiabats, and blue dotted mixing ratio lines. Labels for "Dry Adiabats", "Moist Adiabats", "Mixing Ratio", and "Isotherms" appear at the top/right edges. The legend is positioned in the upper right corner. The title follows the correct format.

Quality Score: 78/100

Criteria Checklist

Visual Quality (31/40)

  • VQ-01: Text Legibility (9/10) - Title 24pt, axis labels 20pt, ticks 16pt - all readable; some reference line labels at top are quite small (10pt)
  • VQ-02: No Overlap (6/8) - Y-axis tick labels 900/925 overlap slightly at bottom; reference labels at top edge partially overlap with plot area
  • VQ-03: Element Visibility (6/8) - Temperature and dewpoint lines visible with good markers; reference lines are appropriately subtle but some dry adiabats/moist adiabats are hard to distinguish
  • VQ-04: Color Accessibility (5/5) - Red/blue for main profiles is colorblind-safe; reference lines use distinct colors (gray, brown, green, blue)
  • VQ-05: Layout Balance (3/5) - Good use of canvas but reference labels at top edge feel cramped; some empty space in upper-left quadrant
  • VQ-06: Axis Labels (2/2) - "Temperature (°C)" and "Pressure (hPa)" with units
  • VQ-07: Grid & Legend (0/2) - Grid disabled but isotherms/isobars serve this purpose; legend well placed; however default seaborn whitegrid is set but then grid is turned off which is inconsistent

Spec Compliance (21/25)

  • SC-01: Plot Type (8/8) - Correct Skew-T Log-P diagram implementation
  • SC-02: Data Mapping (5/5) - Pressure on Y-axis (log, inverted), temperature skewed correctly
  • SC-03: Required Features (3/5) - Has isotherms, dry adiabats, moist adiabats, mixing ratio lines, temp/dewpoint profiles; missing wind barbs (optional per spec but would enhance)
  • SC-04: Data Range (3/3) - Full atmospheric profile from surface (1000 hPa) to 100 hPa
  • SC-05: Legend Accuracy (2/2) - Temperature and Dewpoint labels correct
  • SC-06: Title Format (0/2) - Title uses correct format but middle dot character may not render consistently

Data Quality (17/20)

  • DQ-01: Feature Coverage (7/8) - Shows temperature inversion at upper levels, dewpoint depression throughout; could show more varied atmospheric conditions
  • DQ-02: Realistic Context (7/7) - Typical mid-latitude summer sounding profile, realistic values
  • DQ-03: Appropriate Scale (3/5) - Temperature/pressure values realistic but dewpoint at -75°C at 150 hPa is extremely low even for real soundings

Code Quality (9/10)

  • CQ-01: KISS Structure (3/3) - Simple linear script without functions/classes
  • CQ-02: Reproducibility (3/3) - np.random.seed(42) set
  • CQ-03: Clean Imports (2/2) - All imports used
  • CQ-04: No Deprecated API (1/1) - Current API usage
  • CQ-05: Output Correct (0/1) - Saves as plot.png but file is saved in current directory not plots/{spec-id}/

Library Features (0/5)

  • LF-01: Distinctive Features (0/5) - Only uses sns.set_theme() for styling; all actual plotting done with matplotlib. This is a matplotlib implementation wrapped with seaborn styling. No seaborn plotting functions used.

Strengths

  • Correctly implements the skewed temperature axis transformation
  • Includes all major reference lines (isotherms, dry adiabats, moist adiabats, mixing ratio)
  • Realistic atmospheric sounding data with appropriate pressure levels
  • Good color choices for distinguishing temperature from dewpoint profile
  • Proper logarithmic and inverted pressure axis

Weaknesses

  • Critical: No seaborn plotting functions used - only sns.set_theme() for styling, all actual plotting uses matplotlib (ax.plot). This violates AR-05 library usage requirement.
  • Y-axis tick labels overlap at 900/925 hPa
  • Reference line labels at top edge could be better positioned
  • Title dot character may have rendering issues

Verdict: REJECTED

Reason: This implementation does not use seaborn plotting functions. It only uses sns.set_theme() for styling while all actual visualization is done with matplotlib's ax.plot(). According to quality criteria AR-05, using only styling functions is NOT sufficient for library usage. Seaborn is designed for statistical visualizations and may not be the ideal library for this specialized meteorological diagram, but if implementing in seaborn, actual seaborn plotting functions must be used.

@github-actions github-actions Bot added quality:78 Quality score 78/100 ai-rejected Quality not OK, triggers update labels Jan 18, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Jan 18, 2026
Attempt 1/3 - fixes based on AI review:
- Use sns.lineplot() for temperature/dewpoint profiles instead of ax.plot()
- Add pandas DataFrame for seaborn data format
- Change from whitegrid to ticks style (no grid - custom reference lines)
- Remove overlapping 925 hPa tick label
- Use hyphen instead of middle dot in title for consistent rendering
@github-actions
Copy link
Copy Markdown
Contributor Author

🔧 Repair Attempt 1/3

Applied fixes based on AI review feedback.

Status: Repair completed, re-triggering review...


🤖 impl-repair

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 18, 2026

AI Review - Attempt 2/3

Image Description

The plot displays a Skew-T Log-P atmospheric diagram on a light gray background (#fafafa). The y-axis shows Pressure (hPa) with logarithmic scaling, inverted from 1000 hPa at the bottom to 100 hPa at the top. The x-axis shows Temperature (°C) ranging from -50 to 50. Two main data profiles are plotted: a solid red line with circle markers representing Temperature, and a dashed blue line with square markers representing Dewpoint. The temperature profile starts at ~25°C at surface (1000 hPa) and decreases to ~-55°C at 100 hPa. The dewpoint profile follows a similar pattern but is consistently lower than temperature (showing the dewpoint depression).

Reference lines are overlaid: gray diagonal isotherms (45-degree skew), brown dry adiabats, green dashed moist adiabats, and blue dotted mixing ratio lines. Labels for these reference lines appear at the top edge ("Dry Adiabats", "Moist Adiabats", "Mixing Ratio") and right edge ("Isotherms" rotated 45°). The legend in the upper right clearly identifies Temperature and Dewpoint profiles. The title correctly reads "skewt-logp-atmospheric · seaborn · pyplots.ai" with middle dot separators.

Quality Score: 87/100

Criteria Checklist

Visual Quality (34/40)

  • VQ-01: Text Legibility (9/10) - Title, axis labels, and tick labels are readable. Reference line labels at top are slightly faint.
  • VQ-02: No Overlap (6/8) - Minor overlap visible between 900 and 925 pressure tick labels
  • VQ-03: Element Visibility (7/8) - Main profiles clearly visible with good markers; reference lines appropriately subtle but some are very faint
  • VQ-04: Color Accessibility (5/5) - Red/blue for main profiles is colorblind-safe; reference lines use distinguishable browns, greens, blues
  • VQ-05: Layout Balance (5/5) - Good proportions, plot fills canvas well
  • VQ-06: Axis Labels (2/2) - "Temperature (°C)" and "Pressure (hPa)" with proper units
  • VQ-07: Grid & Legend (0/2) - No traditional grid used (reference lines serve this purpose), but legend placement is good

Spec Compliance (25/25)

  • SC-01: Plot Type (8/8) - Correctly implements Skew-T Log-P diagram
  • SC-02: Data Mapping (5/5) - Temperature and dewpoint correctly plotted against pressure
  • SC-03: Required Features (5/5) - All required features present: log-P axis inverted, skewed isotherms, dry adiabats, moist adiabats, mixing ratio lines
  • SC-04: Data Range (3/3) - 1000-100 hPa range appropriate for atmospheric sounding
  • SC-05: Legend Accuracy (2/2) - Legend correctly identifies Temperature and Dewpoint
  • SC-06: Title Format (2/2) - Uses correct "skewt-logp-atmospheric · seaborn · pyplots.ai" format

Data Quality (18/20)

  • DQ-01: Feature Coverage (7/8) - Shows typical mid-latitude atmospheric profile with realistic temperature/dewpoint separation; doesn't demonstrate inversions or extreme conditions
  • DQ-02: Realistic Context (7/7) - Atmospheric sounding data is realistic scientific scenario (radiosonde profile)
  • DQ-03: Appropriate Scale (4/5) - Temperature and dewpoint values are realistic for mid-latitude summer; extreme cold at upper levels is appropriate

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) - Imports → Data → Plot → Save structure followed
  • CQ-02: Reproducibility (3/3) - Uses np.random.seed(42)
  • CQ-03: Clean Imports (2/2) - All imports used appropriately
  • CQ-04: No Deprecated API (1/1) - Current seaborn API used
  • CQ-05: Output Correct (1/1) - Saves as plot.png

Library Features (0/5)

  • LF-01: Uses distinctive library features (0/5) - While sns.lineplot() is used, the bulk of the visualization (reference lines, skew transform, axis configuration) relies heavily on matplotlib. A more seaborn-idiomatic approach would leverage seaborn's statistical capabilities more directly.

Strengths

  • Correct implementation of the specialized Skew-T Log-P thermodynamic diagram
  • All required reference lines present (isotherms, dry adiabats, moist adiabats, mixing ratio)
  • Proper logarithmic inverted pressure axis
  • Good color coding distinguishing temperature/dewpoint profiles and reference line types
  • Clean, readable code structure
  • Realistic atmospheric sounding data

Weaknesses

  • Minor tick label overlap at 900/925 hPa levels
  • Reference line labels at top edge are faint and may be hard to read
  • Implementation relies heavily on matplotlib for the specialized diagram construction rather than showcasing seaborn's distinctive features
  • VQ-07: No explicit grid styling (reference lines serve as implicit grid)

Verdict: APPROVED

@github-actions github-actions Bot added quality:87 Quality score 87/100 ai-rejected Quality not OK, triggers update labels Jan 18, 2026
@github-actions github-actions Bot added ai-attempt-2 Second repair attempt and removed ai-rejected Quality not OK, triggers update labels Jan 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor Author

🔧 Repair Attempt 2/3

Applied fixes based on AI review feedback.

Status: Repair completed, re-triggering review...


🤖 impl-repair

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 18, 2026

AI Review - Attempt 3/3

Image Description

The plot displays a Skew-T Log-P atmospheric diagram with a light gray (#fafafa) background. The pressure axis (y-axis) is logarithmic and inverted, ranging from 1000 hPa at the bottom to 100 hPa at the top, with labeled tick marks at 1000, 850, 700, 500, 400, 300, 250, 200, 150, and 100 hPa. The temperature axis (x-axis) spans from -50°C to 50°C. The temperature profile is shown as a solid red line with circular markers, while the dewpoint profile is displayed as a dashed blue line with square markers. Both lines decrease with altitude, with dewpoint consistently lower than temperature. Gray diagonal isotherms at 45° skew angle cross the plot. Brown diagonal lines represent dry adiabats, green dashed lines show moist adiabats, and blue dotted lines indicate mixing ratio lines. Reference labels for "Dry Adiabats", "Moist Adiabats", and "Mixing Ratio" appear at the top, with "Isotherms" labeled on the right side. The title uses the correct format with middle dots. A legend in the upper right distinguishes Temperature and Dewpoint profiles.

Quality Score: 90/100

Criteria Checklist

Visual Quality (37/40 pts)

  • VQ-01: Text Legibility (10/10) - Title at 24pt, axis labels at 20pt, ticks at 16pt, all clearly readable
  • VQ-02: No Overlap (8/8) - No overlapping text elements; tick label at 925 hPa removed to prevent overlap
  • VQ-03: Element Visibility (7/8) - Markers and lines are visible with good sizing; reference lines slightly subtle
  • VQ-04: Color Accessibility (5/5) - Red/blue colorblind-safe palette, good contrast between profiles
  • VQ-05: Layout Balance (5/5) - Plot fills canvas well, balanced margins, legend well-positioned
  • VQ-06: Axis Labels (2/2) - Descriptive with units: "Temperature (°C)" and "Pressure (hPa)"
  • VQ-07: Grid & Legend (0/2) - Grid is subtle but legend frame slightly obscures corner of plot area

Spec Compliance (23/25 pts)

  • SC-01: Plot Type (8/8) - Correct Skew-T Log-P diagram type
  • SC-02: Data Mapping (5/5) - Pressure on y-axis (log/inverted), temperature with skew transform on x-axis
  • SC-03: Required Features (4/5) - Has isotherms, dry adiabats, moist adiabats, mixing ratio lines; wind barbs optional and not included
  • SC-04: Data Range (3/3) - Full range from surface to upper atmosphere displayed
  • SC-05: Legend Accuracy (1/2) - Legend shows profiles but reference line types not in legend
  • SC-06: Title Format (2/2) - Correct format: "skewt-logp-atmospheric · seaborn · pyplots.ai"

Data Quality (18/20 pts)

  • DQ-01: Feature Coverage (7/8) - Shows typical mid-latitude summer sounding with decreasing temperature and dewpoint; temperature inversion near tropopause visible
  • DQ-02: Realistic Context (7/7) - Realistic atmospheric profile with sensible meteorological data
  • DQ-03: Appropriate Scale (4/5) - Realistic values; surface temp 25°C and dewpoint 18°C appropriate; upper atmosphere temps realistic

Code Quality (9/10 pts)

  • CQ-01: KISS Structure (3/3) - Simple linear structure: imports → data → plot → save
  • CQ-02: Reproducibility (3/3) - Uses np.random.seed(42) for reproducibility
  • CQ-03: Clean Imports (2/2) - All imports are used
  • CQ-04: No Deprecated API (1/1) - Uses current seaborn and matplotlib APIs
  • CQ-05: Output Correct (0/1) - Saves as plot.png but header says 0.13.2 while current seaborn may differ

Library Features (3/5 pts)

  • LF-01: Uses distinctive library features (3/5) - Uses sns.lineplot, sns.set_theme, sns.despine, and colorblind palette, but heavy reliance on matplotlib for the specialized thermodynamic lines

Strengths

  • Excellent implementation of the skew-T transform with proper 45-degree isotherms
  • Clean separation of temperature and dewpoint profiles with appropriate styling
  • Proper logarithmic/inverted pressure axis matching meteorological convention
  • Good use of seaborn's theming (whitegrid, talk context) and despine function
  • All major reference lines present (isotherms, dry adiabats, moist adiabats, mixing ratio)
  • Professional label annotations for reference line types

Weaknesses

  • Reference lines could have a dedicated legend entry for better interpretation
  • Minor reliance on matplotlib for the specialized atmospheric reference lines rather than seaborn-specific visualization methods

Verdict: APPROVED

@github-actions github-actions Bot added quality:90 Quality score 90/100 ai-approved Quality OK, ready for merge labels Jan 18, 2026
@github-actions github-actions Bot merged commit c84d1a7 into main Jan 18, 2026
3 checks passed
@github-actions github-actions Bot deleted the implementation/skewt-logp-atmospheric/seaborn branch January 18, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-approved Quality OK, ready for merge ai-attempt-1 First repair attempt ai-attempt-2 Second repair attempt quality:78 Quality score 78/100 quality:87 Quality score 87/100 quality:90 Quality score 90/100

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant