Skip to content

ufs-dev PR#337#1212

Open
scrasmussen wants to merge 57 commits intoNCAR:mainfrom
scrasmussen:ufs-dev-PR337
Open

ufs-dev PR#337#1212
scrasmussen wants to merge 57 commits intoNCAR:mainfrom
scrasmussen:ufs-dev-PR337

Conversation

iri01 and others added 30 commits November 11, 2025 13:54
…d meteo fields.

Correct integration of canopy layers onto model layers (satmedmfvdifq.F).
…vities correction.

For consistency, turn OFF the 3-layer-canopy PBL humidity effect and turn on the integrated-canopy PBL met effects (temerature, humidity, winds, TKE).
This commit addresses several improvements in `canopy_levs.F90`:
1. Implemented CCPP-compliant error handling in `canopy_levs_run` by
   propagating `errmsg` and `errflg` via arguments and replacing silent
   returns.
2. Replaced `alog()` with the standard generic `log()` function.
3. Passed `nkc` and `nkt` through argument lists instead of module
   usage to ensure thread-safety and CCPP statelessness.
4. Fixed several typos in comments.

Updated the corresponding calls in `canopy_driver.F` to match the new
subroutine signatures and fixed typos in `canopy_driver.F` as well.

Co-authored-by: drnimbusrain <26631222+drnimbusrain@users.noreply.github.com>
This commit addresses several improvements across `canopy_levs.F90`,
`canopy_mask.F90`, and `canopy_transfer.F90`:
1. Implemented CCPP-compliant error handling by propagating `errmsg`
   and `errflg` through subroutine arguments and replacing silent
   returns.
2. Replaced `alog()` with the standard generic `log()` function in
   `canopy_levs.F90`.
3. Passed `nkc` and `nkt` through argument lists in `canopy_levs.F90`
   instead of module usage to ensure thread-safety and statelessness.
4. Removed `IF(.FALSE.)` blocks and extensive commented-out print
   statements to clean up the code.
5. Fixed numerous typos in comments (ancillary, thermodynamic layers,
   earlier, Horizontal, transferring, transfer, interpolated).

Updated the corresponding calls and added error checks in
`canopy_driver.F` to match the new subroutine signatures.

Co-authored-by: drnimbusrain <26631222+drnimbusrain@users.noreply.github.com>
This commit completes the modernization and cleanup of the SATMEDMF
canopy physics modules:
1. Implemented CCPP-compliant error handling in all canopy subroutines
   by propagating `errmsg` and `errflg` via arguments.
2. Improved safety in `satmedmfvdifq_can.F` by wrapping optional
   argument access with `present()` checks for `dku_can`, `dkt_can`,
   and `dtend`.
3. Removed legacy debug print statements and date-tagged comments
   throughout the canopy physics files for better maintainability.
4. Corrected multiple typos in comments across the modules.
5. Ensured thread-safety and statelessness by passing canopy dimensions
   as arguments where appropriate.

Updated all call sites in `canopy_driver.F` to match the improved
subroutine interfaces and added early-exit error checks.

Co-authored-by: drnimbusrain <26631222+drnimbusrain@users.noreply.github.com>
Addresses several modernization and code quality requirements:
1. Implemented CCPP-compliant error handling (errmsg/errflg) across all
   canopy subroutines.
2. Replaced `alog()` with generic `log()` in `canopy_levs.F90`.
3. Improved statelessness by passing `nkc` and `nkt` as arguments.
4. Added `present()` safety checks for optional arguments in
   `satmedmfvdifq_can.F`.
5. Removed unused wind direction degree/cardinal variables in
   `canopy_driver.F`.
6. Thoroughly cleaned up legacy debug prints and date-tagged comments.
7. Corrected numerous typos in comments.

Ensured consistency of interfaces and call sites across the package.

Co-authored-by: drnimbusrain <26631222+drnimbusrain@users.noreply.github.com>
drnimbusrain and others added 23 commits February 5, 2026 18:13
…st (RT) and to allow compile&build in DEBUG mode.
…run RT test in debug mode. Bug fix to diagnostic heigh calculation.
Update for Explicit Subcanopy Effects on Chemical Tracers in the PBL-SATMEDMF Scheme
@climbfuji
Copy link
Copy Markdown
Collaborator

I'll wait until #1211 is merged before I review this.

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.

7 participants