Probably with JS on the registration page that changes the fields value based off the results of the JS. There's several ways to do this with JS or jQuery. CB Auto Actions can be used to add JS or jQuery to the registration page using a Code action on the registration form display trigger. Several examples below.
stackoverflow.com/questions/3489460/how-to-get-visitors-location-i-e-country-using-javascript-geolocation
You might be able to use PHP in a code action as well if you handled setting the reference variables under the Parameters tab of the action for the trigger then modified the reference user object to set the fields value. For onBeforeRegisterFormDisplay the reference and user object variable would be Variable 1. Then in your PHP code for example you could modify that reference user object as follows.
Code:
$vars['var1']->set( 'FIELD_NAME', 'VALUE' );