Units added to gd['units'] instead of assigning, so this line becomes necessary.