Some EnergyBalanceCheck vars are inout that should be in
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 8
Description
_Originally posted by @samsrabin in https://github.com/ESCOMP/CTSM/pull/3710#discussion_r2718648352_:
>[`energyflux_inst` and `canopystate_inst`] are `inout` as they were in the original, but I don't like it! It's confusing for a balance check to modify anything.
>
> Here are the fields that get modified:
> - `energyflux_inst%errsol`
> - `energyflux_inst%errseb`
> - `energyflux_inst%errlon`
> - `energyflux_inst%netrad`
>
> The last one already has a comment saying it should be moved. The first three are _okay_ here, but it would be better for them to be in a different subroutine.
>
> `canopystate_inst` has nothing modified and so it can be easily changed to `intent(in)`.
Contributor guide
Research direction
Locate the EnergyBalanceCheck subroutine and inspect the declarations for energyflux_inst and canopystate_inst. Confirm which fields it modifies, change canopystate_inst to intent(in), and determine how the energyflux error fields and netrad should be handled so the balance check no longer presents unnecessary inout state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100