Skip to content

Multiple radiation bug fixes spotted by Claude - #440

Open
mpaiao wants to merge 4 commits into
masterfrom
mpaiao-pr-swtwostream
Open

Multiple radiation bug fixes spotted by Claude#440
mpaiao wants to merge 4 commits into
masterfrom
mpaiao-pr-swtwostream

Conversation

@mpaiao

@mpaiao mpaiao commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

This is a series of fixes to bugs identified by Claude as @xiangtaoxu was working on it ED2 two-stream RT bugs.

Most are not severe, but one could be important when optical properties vary across PFTs.

  1. There is a PFT assignment issue for diffuse irradiance, but the code was not updating the pft index.

Collaborators

@xiangtaoxu

Types of changes

  • Hot fix (emergential bug fix to make ED2 run again)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (fix or feature that would cause existing functionality to change)

Changes in Settings, Input Files or Output Files

  • This feature requires changes in ED2IN
  • This feature requires changes in the XML parameter file
  • This feature requires changes in other input files
  • This feature will change output files

Expectation of Answer Changes:

  • No changes expected (bit-for-bit compatibility)
  • Changes expected with specific configurations (see details below)
  • [] Changes expected in all simulations (see details below)

Changes expected in any simulation in which PFTs have different optical properties.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • ED2 Wiki update:

Testing :

  • All new and existing tests passed.

mpaiao added 4 commits July 30, 2026 15:33
This is a bug identified by Claude as @xiangtaoxu was working on it. There is a PFT assignment issue.
Fix albedo assignment for bedrock.
Add clumping_factor to the weighting of leaf/wood area indices for long-wave "optical" properties.
Fix mu bar calculation for diffuse radiation. This has no impact on runs as cai must be 1 for icanrad = 2. But it could become an issue if we allow for finite crown areas in the radiation scheme.
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