prevent sub categories to show up

To get only the parent terms you have to use the argument parent and set lvl 0.
From codex:

If 0 is passed, only top-level terms are returned. Default is an empty
string.

$terms = get_terms( 'tagportifolio', array( 'parent' => 0 ) );

See another question and answer here: How can I get only parent terms?