CH-Earth / summa

Structure for Unifying Multiple Modeling Alternatives:
http://www.ral.ucar.edu/projects/summa
GNU General Public License v3.0
80 stars 104 forks source link

"stateTypeSplit" is used both as a variable and as a construct name in opSplittin.f90 #441

Closed wknoben closed 2 years ago

wknoben commented 3 years ago

As a variable: https://github.com/NCAR/summa/blob/bad84362e0f7c6473e1b26d0ffd033883bd55e49/build/source/engine/opSplittin.f90#L123 https://github.com/NCAR/summa/blob/bad84362e0f7c6473e1b26d0ffd033883bd55e49/build/source/engine/opSplittin.f90#L472 https://github.com/NCAR/summa/blob/bad84362e0f7c6473e1b26d0ffd033883bd55e49/build/source/engine/opSplittin.f90#L479

As a construct name: https://github.com/NCAR/summa/blob/bad84362e0f7c6473e1b26d0ffd033883bd55e49/build/source/engine/opSplittin.f90#L484 https://github.com/NCAR/summa/blob/bad84362e0f7c6473e1b26d0ffd033883bd55e49/build/source/engine/opSplittin.f90#L938

The consequence of this is that the variable stateTypeSplit = 2 no longer exists after the first iteration of the stateTypeSplit loop, and thus the variable value can no longer be accessed for case selection, checks, etc. after this point.

Possible solution: rename the construct to stateTypeSplitLoop. Could this have any unforeseen side effects?

wknoben commented 2 years ago

Fixed in #442. Closing