code: def change_ref(self, r0=None, lmax=None):
          
          if lmax is None:
              lmax = self.lmax
  
          clm = self.pad(lmax)
  
          if r0 is not None and r0 != self.r0:
              for l in _np.arange(lmax+1):
                  clm.coeffs[:, l, :l+1] *= (self.r0 / r0)**(l+2)
                  if self.errors is not None:
                      clm.errors[:, l, :l+1] *= (self.r0 / r0)**(l+2)
              clm.r0 = r0
  
          return clm
docs: Return a new SHMagCoeffs class instance with a different reference r0.
  
          Usage
          -----
          clm = x.change_ref([r0, lmax])
  
          Returns
          -------
          clm : SHMagCoeffs class instance.
  
          Parameters
          ----------
          r0 : float, optional, default = self.r0
              The reference radius of the spherical harmonic coefficients.
          lmax : int, optional, default = self.lmax
              Maximum spherical harmonic degree to output.
  
          Description
          -----------
          This method returns a new class instance of the magnetic potential,
          but using a difference reference r0. When changing the reference
          radius r0, the spherical harmonic coefficients will be upward or
          downward continued under the assumption that the reference radius is
          exterior to the body.