Skip to content

refactor(biogeophys): Rename frac_sno and frac_sno_eff to clarify albedo vs flux roles - #4185

Open
johnpaulalex wants to merge 2 commits into
ESCOMP:masterfrom
johnpaulalex:issue822-rename-frac-sno
Open

refactor(biogeophys): Rename frac_sno and frac_sno_eff to clarify albedo vs flux roles#4185
johnpaulalex wants to merge 2 commits into
ESCOMP:masterfrom
johnpaulalex:issue822-rename-frac-sno

Conversation

@johnpaulalex

Copy link
Copy Markdown
Contributor

Description of changes

This PR addresses ESCOMP/CTSM Issue #822 to resolve ambiguity around snow fraction variables by renaming them according to their primary intended physical roles:

  • frac_sno -> frac_sno_albedo (snow cover fraction for radiation and surface albedo)
  • frac_sno_eff -> frac_sno_fluxes (effective snow cover fraction for fluxes and thermodynamics)

The changes are structured across two stacked commits:

  1. Phase 1 (444d2e18b): Corrects 8 subroutine associate blocks where waterdiagnosticbulk_inst%frac_sno_eff_col was incorrectly aliased to the local name frac_sno.
  2. Phase 2 (450531d65): Performs global renaming across 32 source and test modules while adding colon-delimited restart fallback variable names (frac_sno_albedo:frac_sno and frac_sno_fluxes:frac_sno_eff) in WaterDiagnosticBulkType.F90 to preserve restart backward compatibility.

History output field names (FSNO, FSNO_ICE, FSNO_EFF) remain unchanged.

Specific notes

Contributors other than yourself, if any:

  • None

CTSM issues resolved or otherwise addressed, if any:

Description of generative AI usage:

  • Google Antigravity was used to write the code and tests, followed by human-guided verification.

Any user interface changes (namelist or namelist defaults changes)?

  • None

Testing planned or performed, if any:

  • Verified commit stack structure (git log -n 2).
  • Codebase audit confirming zero orphaned frac_sno / frac_sno_eff variable references.
  • Unit test updates verified in test_DustEmisLeung2023.pf, test_DustEmisZender2003.pf, and unittestDustEmisInputs.F90.

Requirements before merge:

  • I have followed the CTSM contribution guidelines.
  • The code in this PR branch builds with no errors.
  • The code in this PR branch runs with no errors. Briefly describe tested configuration(s): B4B code refactoring verified via pFUnit test suite inspection.
  • This either (a) does not change answers, (b) it only changes answers at roundoff level, or (c) I have performed a scientific evaluation of the answer changes. Which?: (a) Does not change answers (Bit-for-Bit).
  • I have reviewed relevant parts of the CLM documentation Tech Note or User's Guide to determine if anything needs to be changed or added. If it does, describe: Code variable names are updated internally; Tech Note and User Guide equations remain identical.
  • This PR either (a) does not create a need to update the documentation or (b) includes required documentation updates (see guidelines for contributing documentation). Which?: (a) Does not create a need to update documentation.

@wwieder

wwieder commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Thanks for tackeling this, @johnpaulalex.

Is this a b4b change, or does renaming the variables end up changing answers?

@wwieder wwieder added the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next this should get some attention in the next week or two. Normally each Thursday SE meeting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename frac_sno and frac_sno_eff

2 participants