Skip to content

datm clmncep: set Faxa_swdn from whichever shortwave stream is present (fixes #425) - #456

Closed
asystemoffields wants to merge 1 commit into
ESCOMP:mainfrom
asystemoffields:datm-clmncep-swdn
Closed

asystemoffields wants to merge 1 commit into
ESCOMP:mainfrom
asystemoffields:datm-clmncep-swdn

Conversation

@asystemoffields

Copy link
Copy Markdown

Description of changes

datm_datamode_clmncep_advance copied strm_Faxa_swdn into Faxa_swdn unconditionally at the top of the routine, so a stream configuration that provides direct and diffuse shortwave (Faxa_swdndr and Faxa_swdndf) instead of the total dereferences an unassociated pointer. Faxa_swdn is now set inside the shortwave block instead: the sum of the direct and diffuse streams when those are present, otherwise the total stream. This is the change @ekluzek posted in #425, with Faxa_swdn set first in each branch as @billsacks suggested.

Specific notes

Contributors other than yourself, if any: the diff is the one proposed by @ekluzek and @billsacks in the issue.

CDEPS Issues Fixed (include github issue #): #425

Are there dependencies on other component PRs (if so list): none

Are changes expected to change answers (bfb, different to roundoff, more substantial): bit-for-bit when the total Faxa_swdn stream is provided (Faxa_swdn receives the same value as before). Configurations providing only the direct and diffuse streams previously failed at the unconditional copy and now get Faxa_swdn = swdndr + swdndf.

Any User Interface Changes (namelist or namelist defaults changes): none

Testing performed (e.g. aux_cdeps, CESM prealpha, etc): none. I have no CESM/CIME environment or Fortran compiler on this machine, so this has not been compiled or run; it is a minimal transcription of the agreed diff. The issue also notes that nothing tests the direct/diffuse stream option (e.g. TRENDY forcing); this PR does not add such a test.

Hashes used for testing: n/a

Prepared with Claude Code (Claude Fable 5.1) and submitted on the account owner's authorisation.

🤖 Generated with Claude Code

datm_datamode_clmncep_advance copied strm_Faxa_swdn into Faxa_swdn
unconditionally, so a stream configuration that provides direct and
diffuse shortwave (Faxa_swdndr and Faxa_swdndf) instead of the total
dereferenced an unassociated pointer. Set Faxa_swdn inside the
shortwave block instead: the sum of the direct and diffuse streams when
those are present, otherwise the total stream.

This is the change agreed in ESCOMP#425.

Resolves ESCOMP#425

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@billsacks

Copy link
Copy Markdown
Member

I appreciate your eagerness to contribute to CDEPS, but AI-generated fixes like this cost us (the code maintainers) more time than they save us, so as a general policy we are now rejecting such contributions.

@billsacks billsacks closed this Oct 22, 2026
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.

2 participants