Inventory initialization patch numbering method is inconsistent with set_patchno
#915
Labels
refactor
Restructures code without changing functionality
set_patchno
#915
While working on #911, I noticed that the
initialize_sites_bv_inventory
procedure setspatchno
in the reverse order compared toset_patchno
procedure in that it starts from the youngest patch and iterates through to the oldest:fates/main/FatesInventoryInitMod.F90
Lines 491 to 507 in e216ca0
Here is
set_patchno
for comparison:fates/biogeochem/EDPatchDynamicsMod.F90
Lines 1249 to 1255 in e216ca0
This works out to be consistent with everything else in the end given that we call
set_patchno
after the call toinitialize_sites_bv_inventory
withininit_patches
. Additionally, whilefuse_patch
(called a few lines down) utilizespatchno
to check that the patches being fused are different, as long as each patch has a unique number, the order doesn't matter.That said, we probably should replace the patch number update with a call
set_patchno
.The text was updated successfully, but these errors were encountered: