State variables and dependencies: register_state_variable vs. register_dependency vs. register_state_dependency? #146
-
|
I recently took over a project in which we started to port some very old BGC model to FABM, so I am not yet familiar with all the nitty-gritty details and might have missed pieces of information in this forum or the wiki, though my searches didn't give any matching hits. The (FABM-style) code I took over uses According to the wiki, I couldn't find any documentation on |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
There is one key difference between In practice, it is also possible to couple a variable registered with |
Beta Was this translation helpful? Give feedback.
-
|
Excellent, thanks for the comprehensive and swift response! |
Beta Was this translation helpful? Give feedback.
There is one key difference between
register_state_variableandregister_state_dependency: the former registers a new state variable, the latter registers a dependency on a state variable that must come from another model. If this condition is not satisfied (that is, if there is no coupling made for the state dependency infabm.yaml), the model will not run. The variable identifier that you register with either of these two routines is the same: it can be used to retrieve the state variable value and to provide source terms.In practice, it is also possible to couple a variable registered with
register_state_variableby adding a corresponding coupling entry tofabm.yaml. In that case, mod…