Passing a variable from the archive page to the default template

Don’t use get_template_part. Instead use

include( locate_template( 'your-template-part.php' ) );

This will make your variables available to the included file without having to use the global keyword.

tech