-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor loops that use max_patch_per_col
?
#2025
Comments
I want to highlight the note from @billsacks in clm_varpar that notes that max_patch_per_col is in itself a problem... ! TODO(wjs, 2015-10-04, bugz 2227) Using surf_numcft in this 'max' gives a significant
! overestimate of max_patch_per_col when use_crop is true. This should be reworked -
! or, better, removed from the code entirely (because it is a maintenance problem, and
! I can't imagine that looping idioms that use it help performance that much, and
! likely they hurt performance.) @billsacks do you have more to say on this? |
I'll just add / reiterate that I would whole-heartedly endorse refactoring these looping structures to avoid the need for max_patch_per_col, if possible. |
Refactored CNPhenology and this test passed: Refactored CNCIsoFlux (though I plan to do more) and the test passed. |
In CNCIsoFlux, I also refactored cases similar to the above but with TODO (adding to the orig. list) |
Per our discussion during the ctsm software meeting today, here is the list of locations in which
max_patch_per_col
is being used as an upper bound in different loop structures. I came upon this variable when troubleshooting an issue with the elm-fates integration for NGEET/fates#1040, in which the number of patches that fates needs was not being updated. This turns out not to be a problem for clm-fates, but it did lead to a discussion in which @rgknox and I asked the ctsm software team if this looping structure was out-of-date and could use a refactor, particularly since the use ofmax_patch_per_col
seems fairly limited.Definition of
max_patch_per_col
:CTSM/src/main/clm_varpar.F90
Line 203 in 5df6c98
Locations of use:
CTSM/src/biogeophys/SoilWaterPlantSinkMod.F90
Line 202 in 5df6c98
CTSM/src/biogeophys/SoilWaterPlantSinkMod.F90
Line 311 in 5df6c98
CTSM/src/biogeophys/SoilWaterPlantSinkMod.F90
Line 402 in 5df6c98
CTSM/src/biogeochem/CNPhenologyMod.F90
Line 3442 in 5df6c98
CTSM/src/biogeochem/CNCIsoFluxMod.F90
Line 1279 in 5df6c98
CTSM/src/biogeophys/SoilTemperatureMod.F90
Line 1553 in 5df6c98
CTSM/src/biogeophys/SoilTemperatureMod.F90
Line 1642 in 5df6c98
The text was updated successfully, but these errors were encountered: