public static function Apio13($utc1, $utc2, $dut1, $elong, $phi, $hm, $xp,
          $yp, $phpa, $tc, $rh, $wl, iauASTROM &$astrom) {

    $j;
    $tai1;
    $tai2;
    $tt1;
    $tt2;
    $ut11;
    $ut12;
    $sp;
    $theta;
    $refa;
    $refb;

    /* UTC to other time scales. */
    $j = IAU::Utctai($utc1, $utc2, $tai1, $tai2);
    if ($j < 0)
      return -1;
    $j = IAU::Taitt($tai1, $tai2, $tt1, $tt2);
    $j = IAU::Utcut1($utc1, $utc2, $dut1, $ut11, $ut12);
    if ($j < 0)
      return -1;

    /* TIO locator s'. */
    $sp = IAU::Sp00($tt1, $tt2);

    /* Earth rotation angle. */
    $theta = IAU::Era00($ut11, $ut12);

    /* Refraction constants A and B. */
    IAU::Refco($phpa, $tc, $rh, $wl, $refa, $refb);

    /* CIRS <-> observed astrometry parameters. */
    IAU::Apio($sp, $theta, $elong, $phi, $hm, $xp, $yp, $refa, $refb, $astrom);

    /* Return any warning status. */
    return $j;

    /* Finished. */
  }