wengngai / NSSF_IBMs

Spatially explicit individual based models of tree species in the Nee Soon Freshwater Swamp Forest (NSSF) catchment in Singapore
1 stars 0 forks source link

sS_h() passed silently when multiplied with GS_h1h(), but throws crucial warning when used separately #14

Closed hrlai closed 3 years ago

hrlai commented 3 years ago

This may be crucial to fix.

For example, when we run

  ppoS$logheight <- sS_h(nssf.m, ppoS, "Prunus.polystachya", intra.on.PPO[[4]], inter.on.PPO[[4]]) * 
    GS_h1h(nssf.m, ppoS, "Prunus.polystachya", CAE.on.ppoS, HAE.on.ppoS)

there will be no warnings.

But I was trying to understand the survival equations so I ran only:

sS_h(nssf.m, ppoS, "Prunus.polystachya", intra.on.PPO[[4]], inter.on.PPO[[4]])

and got warnings:

Warning messages:
1: In interA * HM.parm[paste0(plot_type, ".hm.stem"), sp] :
  longer object length is not a multiple of shorter object length
2: In z - p1 :
  longer object length is not a multiple of shorter object length
hrlai commented 3 years ago

Ignore this false alarm, it was caused by me creating a ouroboros monster.