Set extra variable in wextra, which is not advected and has no boundary conditions and not output in dat. This has to be done after defining flux variables and auxiliary variables.
function var_set_wextra() result(iw) integer :: iw nw_extra = nw_extra + 1 iw = nw_extra end function var_set_wextra