Ticket #370 (closed: fixed)
Multistanza orgVBK problem
Reported by: | villyc | Owned by: | administrator |
---|---|---|---|
Priority: | high | Milestone: | Ecopath 6: build 6.0.7 |
Component: | Ecosim | Version: | |
Severity: | crash | Keywords: | |
Cc: |
Description
c.core calculatestanza
Got an error from the code below as orgVBK was 0. Had deleted, saved, then re-introduced stanza groups causing trouble (the trouble that Jeroen looked at recently)
Should have a trap to make sure that orgVBK gets a value if there's none, e.g, 0.3 which I think should be the default. Currently the default is -1, which doesn't allow calculations????
If SecondAge?(nStanzas) = 0 Then
For i = 2 To nStanzas
SecondAge?(i - 1) = FirstAge?(i) - 1
Next
SecondAge?(nStanzas) = CInt(Math.Log(1 - 0.9 (1 / 3)) / (-orgVBK / 12))
If SecondAge?(nStanzas) > 400 Then SecondAge?(nStanzas) = 400
End If
I decided to delete all references to the stanza group in the ecopath group definition, but subsequently got an error in cecosim splitinitialize where m_stanza.Nsplit hadn't be reset to 0 after the deletion
I just can't get around this, and get the model to work.
Villy
Jeroen has looked at this earlier, but still problems
Change History
comment:3 Changed 16 years ago by carieh
Ok I am not fully understanding this one. I think the bug is that the defaults on the edit multistanza groups is incorrect. The value is a -1 instead of a more logical default like 0.3.
In version 6.0.3.11 the default is still -1. If I am interpreting this incorrectly, please send more information. thanks
The problem is caused by Stanza configurations without life stages. These configurations cannot be removed via the UI. I've added a database check to prevent such groups from being read into the system. I am just not sure how these groups are getting created; this needs to be figured out.