It does not seem to be in the add your model to dart documentation that
set_vertical_localization_coord() is required for models doing vertical localization. It is mentioned in a 2017 changelog, but that seems to be it.
Also a call to set_vertical_localization_coord() should go in the template model::static_init_model()