1) $f$ is isomorphic in codimension $d$ if it is an isomorphism near any codimension $d$ point in either $X$ or $Y$. Equivalently, there exists closed subsets $Z\subseteq X$ and $W\subseteq Y$ such that ${\rm codim}_XZ\geq d+1$, ${\rm codim}_YW\geq d+1$, and $X\setminus Z\simeq f:X\setminus Z\overset{\simeq}{\longrightarrow} Y\setminus W$ is an isomorphism.
2) By the Theorem of the Base of Néron–Severi, if $f$ is proper of finite type, then $N_1(X/Y)_{\mathbb Q}$ and $N^1(X/Y)_{\mathbb Q}$ are finite-dimensional vector spaces of the same dimension. This is actually more than you need, because even without the finite type assumption it is true that the intersection pairing $N_1(X/Y)_{\mathbb Q}\times N^1(X/Y)_{\mathbb Q}\to {\mathbb Q}$ is non-degenerate.
1) $f$ is isomorphic in codimension $d$ if it is an isomorphism near any codimension $d$ point in either $X$ or $Y$. Equivalently, there exists closed subsets $Z\subseteq X$ and $W\subseteq Y$ such that ${\rm codim}_XZ\geq d+1$, ${\rm codim}_YW\geq d+1$, and $X\setminus Z\simeq Y\setminus W$.
2) By the Theorem of the Base of Néron–Severi, if $f$ is proper of finite type, then $N_1(X/Y)_{\mathbb Q}$ and $N^1(X/Y)_{\mathbb Q}$ are finite-dimensional vector spaces of the same dimension. This is actually more than you need, because even without the finite type assumption it is true that the intersection pairing $N_1(X/Y)_{\mathbb Q}\times N^1(X/Y)_{\mathbb Q}\to {\mathbb Q}$ is non-degenerate.