<PAGE>   1

                                                                   EXHIBIT 10.23

                             AGREEMENT TO PURCHASE

THIS AGREEMENT, entered into as of January 26, 2001, between William R. Berry II
and Deborah M. Olson (herein collectively the "SELLER") and Ivanhoe Energy (USA)
Inc. ("IVANHOE"), a corporation organized under the laws of the State of Nevada
(d.b.a. USA Ivanhoe Inc. in California). Seller and Purchaser are sometimes
individually referred to herein as a "Party" and collectively as the "Parties".

Ivanhoe and Seller have agreed that Ivanhoe, or a designated affiliate, (the
"PURCHASER") would acquire from Seller, and Seller would sell to Purchaser, all
of the issued and outstanding shares of capital stock of Digital Petrophysics,
Inc., a California corporation ("DPI"), subject to the terms and conditions
herein specified.

1.   STOCK PURCHASE AGREEMENT

A.   The Parties shall promptly prepare, negotiate and execute a mutually
     agreeable Stock Purchase Agreement for the purchase by Purchaser of all of
     the issued and outstanding capital stock of DPI ("DPI STOCK"). The Stock
     Purchase Agreement will contain terms, representations, warranties and
     conditions normally found in such agreements. No such terms shall be
     inconsistent with the terms set out in this agreement. Except as provided
     in paragraph 1. B. herein, the Stock Purchase Agreement will also contain a
     provision that Seller will not obtain overriding royalty ("ORRI") or other
     interests in competition with Purchaser in areas described in the
     "Enclosure A Lost Hills Deep Prospect AMI" to the January 18th 1999 "First
     Amendment and Clarification of Provisions", to the "Diatom/Aera Exploration
     Agreement dated May 1, 1998", below the base of the MacDonald Shale.

B.   For disclosure purposes only, Seller represents that DPI may presently own
     certain rights to interests in oil and gas leases that were outside of the
     working interest partners' interest in the Almond Flank Participation
     Agreement, dated August 1, 1996 ("AFPA"), AMI at the time leases were
     taken. These interests, if any, will be assigned out of DPI prior to the
     sale of the DPI Stock to Purchaser. The value of these interests is
     therefore not included in the sale price of this transaction. This
     Agreement is not intended to abridge or limit Seller's existing rights to
     these interests in leases taken by non-parties to the AFPA, that were not
     subject to the working interest partners' interest in the AFPA and were
     outside of the working interest partners' interest in the AFPA, AMI at the
     time they were taken. All such rights are expressly reserved, without
     limitation, to Seller.

C.   The Parties will endeavor to conclude the Stock Purchase Agreement by
     February 15, 2001.

2.   CONSIDERATION FOR THE PURCHASE

The Purchase Agreement will provide that the consideration for the purchase of
the DPI Stock will be the following:

     A.    Seller shall receive Eight hundred thousand (800,000) duly authorized
           and issued shares of common stock of Ivanhoe Energy Inc. ("Ivanhoe
           Stock"); and

     B.    Seller shall receive an ORRI of twenty-five one-hundredths of one
           percent (0.25%) in areas below the MacDonald Shale in (i) areas under
           existing leases which have been taken by or assigned to the working
           interest partners in the Almond Flank AMI, (comprising approximately
           1,503 net acres as set forth on exhibit "A"), in which DPI is
           currently entitled to ORRI, and (ii) in the 592 net acres (set forth
           on exhibit "B"), in which Ivanhoe previously acquired ORRI in the
           purchase of Digital Petrophysics Resources, Inc., pursuant to the
           Stock Purchase Agreement, dated September 3, 1999.

     C.    Seller shall cause to be assigned, sold, or otherwise conveyed,
           granted or transferred out of DPI, to Seller or Seller's designee,
           prior to the sale of DPI Stock to Purchaser all assets currently
           owned by DPI with the exception of those interests identified in
           exhibit "A". The

                                       E-52
<PAGE>   2

           Parties agree that only those interests of DPI identified in exhibit
           "A" shall be the sole remaining assets of DPI at the time of the
           Closing of the stock sale transaction. Purchaser expressly agrees
           that the consideration paid under this purchase agreement is only for
           those interests identified in exhibit "A" and do not include any
           interests which are not otherwise identified in this Agreement or are
           expressly reserved or excluded from this transaction.

     D.    Nothing in this Agreement shall constitute a non-competition
           agreement governing or restricting either Seller's right to engage in
           any professional consulting services on behalf of any other entity.
           Seller shall be free to accept or decline any consulting engagement
           with any entity without notice or limitation to Purchaser.

     E.    Purchaser further agrees that in the event that an oil and gas lease
           with Texaco pertaining to rights above the base of the McDonald Shale
           covering the lands referenced in that Oil and Gas lease by and
           between Texaco and West Best Resources, Ltd. dated June 26th 1999 as
           recorded in the official records of the County of Kern document #
           0200057248, is taken by either Purchaser or Aera Energy LLC, in which
           Purchaser has any beneficial interest, then Purchaser shall assign to
           Seller an ORRI of the difference between the existing burdens at the
           time the lease is acquired and 23.5% as it pertains to the leased
           lands, but in any event not less than 2%. Should Purchaser or any
           other party negotiate a renewal lease covering the same land
           described in exhibit "A" or "B" in which Purchaser has any beneficial
           interest, then Purchaser shall assign to Seller the same ORRI as
           Seller would have been entitled to under the previous lease, as such
           lease pertains to the land from the surface down to the base of the
           MacDonald Shale, and as such lease pertains to the land below the
           base of the MacDonald Shale.

     F.    Purchaser further agrees to provide a copy of all logs, (including
           but not limited to mud logs, wireline logs and all measurements made
           while drilling), reports, (including well histories and daily
           drilling reports) and studies, if any, from the surface to the base
           of the MacDonald Shale, on any well drilled on acreage in the AFPA,
           AMI which Seller has received and enjoys ORRI interests.

3.  CLOSING OF PURCHASE

The Closing of the sale and purchase of the DPI stock ("Closing") will take
place within three (3) business days of the satisfaction of the conditions to
Closing specified in the Stock Purchase Agreement, including approval by the
Toronto Stock Exchange of the listing of the Ivanhoe Stock to be given as
consideration for the purchase. The specific terms and conditions of the Stock
Purchase Agreement shall be subject to the approval of Seller's tax consultants,
prior to Closing. The Parties agree that they shall mutually cooperate to ensure
that, to the highest extent practicable, this transaction meets the requirements
of IRC section 1031, for a tax deferred exchange treatment.

4.  DISPUTE WITH AERA

Pending conclusion of the Stock Purchase Agreement and the Closing, Seller will
not permit or cause DPI to continue demands upon Aera Energy LLC and/or Ivanhoe
in respect of the dispute concerning the AFPA, AMI arising out of the AFPA or
the rights to ORRI in leases in the AFPA, AMI. It will be a condition to the
Closing, that Seller releases Ivanhoe and Aera from any and all claims arising
and liabilities out of the AFPA and ORRI thereunder, except with respect to the
ORRI referred to in Paragraph 2.B. above.

5.  MISCELLANEOUS

This Letter of Intent shall be governed by the laws of the State of California,
excluding provisions of law that would refer the matter to the laws of another
jurisdiction.

                                       E-53
<PAGE>   3

IN WITNESS WHEREOF, Seller and Purchaser have caused this Agreement to be
executed as of the day and year first above written.

SELLER:

<TABLE>
<S>                                                <C>

          /s/ WILLIAM R. BERRY II                              /s/ DEBORAH M. OLSON
--------------------------------------------       --------------------------------------------
            William R. Berry II                                  Deborah M. Olson
</TABLE>


PURCHASER:
IVANHOE ENERGY (USA) INC.
d.b.a. USA Ivanhoe Energy Inc. in California

by: /s/ OSCAR A. BLAKE
    -------------------------------------------------------
    Oscar A. Blake, Vice President

                                       E-54
<PAGE>   4

                                   EXHIBIT A

                        RIGHTS TO ORRI'S FOR SALE BY DPI
            NOTE: ALL ROYALTIES LIMITED TO BELOW BASE McDONALD SHALE
<TABLE>
<CAPTION>

                  FOC                                                               INTEREST   GROSS      NET        DATE
TWP   RNG   SEC    #     DESCRIPTION            LESSOR              LESSEE             %       ACRES     ACRES      SIGNED
---   ---   ---   ----   -----------            ------              ------          --------   -----   ---------   --------
<C>   <C>   <C>   <C>    <S>                    <C>                 <C>             <C>        <C>     <C>         <C>
25    20    21           1 SE/4 of NE/4         Texaco              Ivanhoe            100       40       40.000    4/15/99
25    20    21           3 NE/4 of NE/4         Tuttle, Oliver D    Fuller/Ivanhoe      85     40.1       34.068    2/16/99
25    20    21           3 NE/4 of NE/4         Tuttle, Carmelo V   Fuller/Ivanhoe      10     40.1        4.008    2/16/99
25    20    21           3 NE/4 of NE/4         Tuttle, Steven M    Fuller/Ivanhoe       1     40.1        0.401    3/10/99
25    20    21           3 NE/4 of NE/4         Bailey, Suzanne M.  Fuller/Ivanhoe       1     40.1        0.401    6/28/99
25    20    21           3 NE/4 of NE/4         Luna, Laura Lee     Fuller/Ivanhoe       1     40.1        0.401    3/31/99
25    20    21           4 W/2 of NE/4          Cronin, John        Fuller/Ivanhoe    26.4       80       21.120    1/14/99
25    20    21           4 W/2 of NE/4          Denson TR           Fuller/Ivanhoe   19.42       80       15.536     4/8/99
25    20    21           4 W/2 of NE/4          Texaco              Ivanhoe             50       80       40.000    4/15/99
25    20    21           5 E/2 of SE/4          Enron               Aera               100       80       80.000   11/23/99
25    20    21           6 W/2 of SE/4          Texaco              Ivanhoe             10       80        8.000    4/15/99
25    20    22           9 SW/4 of SW/4         Enron               Aera               100       40       40.000   11/23/99
25    20    22     9a      S/2exclSW/4 SW/4     Enron               Aera               100      280      280.000   11/23/99
25    20    28           27 NW/4                Texaco (pri)        Ivanhoe            100      160       160.00     8/1/00
25    20    17           18 W 50 acres NE/4     Texaco              Ivanhoe            100       50       50.000    4/15/99
25    20    17           21 ptn SE/4 NE/4       Miller Cameron      Fuller/Ivanhoe     100       25       25.000    3/10/99
25    20    16           25 NW/4                Texaco              Ivanhoe            100      160      160.000    4/15/99
25    20    16           26 SE/4                Hogerheide          Fuller/Ivanhoe   16.67      160       26.672     1/5/99
25    20    16           26 SE/4                Heather, Thomas     Fuller/Ivanhoe   16.67      160       26.672    1/21/99
25    20    16           26 SE/4                Windbegler          Fuller/Ivanhoe      25      160       40.000    12/7/98
25    20    16           26 SE/4                Heather, Alice      Fuller/Ivanhoe   16.67      160       26.672    1/25/99
25    20    16           26 SE/4                Eads, William       Fuller/Ivanhoe    12.5      160       20.000    12/3/98
25    20    16           26 SE/4                Eads, John          Fuller/Ivanhoe    12.5      160       20.000    12/9/98
25    20    22           33 NW4                 Texaco(a)           Ivanhoe            100      160      160.000    4/15/99
25    20     5           34 N/2 of SW/4         Swenson etal        Fuller/Ivanhoe      50       80       40.000     1/1/99
25    20    17           19 PTN NE/4            Stoner, Wilma       Fuller/Ivanhoe   16.67       50        8.335    1/20/00
25    20    17           19 PTN NE/4            Howard, Susan       Fuller/Ivanhoe   33.33       50       16.665    2/10/00
25    19     1           77 NE/4                BLM CA40629         Fuller/Ivanhoe     100      159      159.200    7/20/99
                                                                                                       ---------
                         TOTAL                                                                         1,503.150
                                                                                                       =========

<CAPTION>
                                                                             ORRI    ORRI               AC%
                                                       OIRG ISE   ALM FLNK   2WRB    SOLD     AC%       2WRB
       DATE      BASE      DPI    ROYALTY     TOTAL     DEPTH       AMI        &      TO      SOLD       &
TWP  RECORDED   ROYALTY   ORRI    PERCENT    ROYALTY    LIMIT      STATUS     DMO     IE     TO IE      DMO
---  --------   -------   -----   --------   -------   --------   --------   -----   ----   --------   ------
<C>  <C>        <C>       <C>     <C>        <C>       <C>        <C>        <C>     <C>    <C>        <C>
25    6/9/99    20.000    3.500    140.00     23.50     NONE       Primary   0.25    3.25     130.00    10.00
25   4/20/99    16.667    6.833    232.79     23.50     NONE       Primary   0.25    6.58     224.27     8.52
25   4/20/99    16.667    6.833     27.39     23.50     NONE       Primary   0.25    6.58      26.38     1.00
25   4/20/99    16.667    6.833      2.74     23.50     NONE       Primary   0.25    6.58       2.64     0.10
25   7/30/99    16.667    6.833      2.74     23.50     NONE       Primary   0.25    6.58       2.64     0.10
25   4/20/99    16.667    6.833      2.74     23.50     NONE       Primary   0.25    6.58       2.64     0.10
25    2/5/99    16.670    6.830    144.25     23.50     NONE       Primary   0.25    6.58     138.97     5.28
25   7/30/99    16.670    6.830    106.11     23.50     NONE       Primary   0.25    6.58     102.23     3.88
25    6/9/99    20.000    3.500    140.00     23.50     NONE       Primary   0.25    3.25     130.00    10.00
25   12/29/99   21.500    2.000    160.00     23.50     NONE       Primary   0.25    1.75     140.00    20.00
25    6/9/99    20.000    3.500     28.00     23.50     NONE       Primary   0.25    3.25      26.00     2.00
25   12/29/99   21.500    2.000     80.00     23.50     NONE       Primary   0.25    1.75      70.00    10.00
25   12/29/99   21.500    2.000    560.00     23.50     NONE       Primary   0.25    1.75     490.00    70.00
25    6/9/99    20.000    3.500    560.00     23.50     basMcD     Primary   0.25    3.25     520.00    40.00
25    6/9/99    20.000    3.500    175.00     23.50     NONE       Primary   0.25    3.25     162.50    12.50
25   7/30/99    16.667    6.833    170.83     23.50     NONE       Primary   0.25    6.58     164.58     6.25
25    6/9/99    20.000    3.500    560.00     23.50     NONE       Primary   0.25    3.25     520.00    40.00
25   2/17/99    16.667    6.833    182.25     23.50     NONE       Primary   0.25    6.58     175.58     6.67
25    2/5/99    16.667    6.833    182.25     23.50     NONE       Primary   0.25    6.58     175.58     6.67
25    2/5/99    16.667    6.833    273.32     23.50     NONE       Primary   0.25    6.58     263.32    10.00
25   2/17/99    16.667    6.833    182.25     23.50     NONE       Primary   0.25    6.58     175.58     6.67
25    2/5/99    16.667    6.833    136.66     23.50     NONE       Primary   0.25    6.58     131.66     5.00
25    2/5/99    16.667    6.833    136.66     23.50     NONE       Primary   0.25    6.58     131.66     5.00
25    6/9/99    20.000    3.500    560.00     23.50     NONE       Primary   0.25    3.25     520.00    40.00
25    2/5/99    16.667    2.000     80.00     18.67     NONE       Second    0.25    1.75      70.00    10.00
25   9/11/00    16.667    6.833     56.95     23.50     NONE       Primary   0.25    6.58      54.87     2.08
25   9/11/00    16.667    6.833    113.87     23.50     NONE       Primary   0.25    6.58     109.71     4.17
25    8/1/99eff 12.500    2.000    318.40     14.50     NONE       Second    0.25    1.75     276.60    39.80
                                  --------                                                  --------   ------
                                  5,315.19                                                  4,939.40   375.79
                                  ========                                                  ========   ======
</TABLE>

                                       E-55
<PAGE>   5

                                   EXHIBIT B

                      ORRI PREVIOUSLY PURCHASED BY IVANHOE
<TABLE>
<CAPTION>

                  FOC                                                      INTEREST   GROSS    NET       DATE      BASE      DPR
TWP   RNG   SEC    #    DESCRIPTION                LESSOR                     %       ACRES   ACRES     SIGNED    ROYALTY    ORRI
---   ---   ---   ---   -----------                ------                  --------   -----   ------   --------   -------   ------
<C>   <C>   <C>   <C>   <S>                        <C>                     <C>        <C>     <C>      <C>        <C>       <C>
25    20     8    23    S/2, excluding W of        Union Bnk of Calif         100     250.8   250.76    9/10/96   16.667    6.8330
                        Aquaduct
25    20    16     7    SW/4, w of aquaduct        Buck, Robt. B.            4.17     124.6     5.19              16.667    6.8330
25    20    16     7    SW/4, w of aquaduct        Buck, C. B.               4.17     124.6     5.19              16.667    6.8330
25    20    16     7    SW/4, w of aquaduct        Lodato, Carol B.          4.17     124.6     5.19              16.667    6.8330
25    20    16     7    SW/4, w of aquaduct        Erdman, Christian P.      37.5     124.6    46.71    12/9/93   16.667    6.8330
25    20    16     7    SW/4, w of aquaduct        Buck, Leonard C. Z.       4.16     124.6     5.18              16.667    6.8330
25    20    16     8    SW/4, E of aquaduct        Buck, Robt. B.            4.17     35.45     1.48              16.667    6.8330
25    20    16     8    SW/4, E of aquaduct        Buck, C. B.               4.17     35.45     1.48              16.667    6.8330
25    20    16     8    SW/4, E of aquaduct        Lodato, Carol B.          4.17     35.45     1.48              16.667    6.8330
25    20    16     8    SW/4, E of aquaduct        Erdman, Christian P.      37.5     35.45    13.29    12/9/93   16.667    6.8330
25    20    16     8    SW/4, E of aquaduct        Buck, Leonard C. Z.       4.16     35.45     1.47              16.667    6.8330
25    20    17    17    N/2 of NW/4, SE/4 of NW/4  Reimers, Ann Burke          50      120     60.00    7/15/96   16.667    6.8330
25    20    17    17    N/2 of NW/4, SE/4 of NW/4  Booth, Franklin Otis        50      120     60.00    6/17/96   16.667    6.8330
25    20    17    17a   SW/4 of NW/4               Reimers, Ann Burke          50       40     20.00   12/17/97   16.667    6.8330
25    20    17    17a   SW/4 of NW/4               Booth, Franklin Otis        50       40     20.00    12/3/97   16.667    6.8330
25    20    17    20    Portion of SW/4 of NE/4    PRB Partnership          33.34     29.19     9.73   10/23/96   16.667    6.8330
25    20    17    20    Portion of SW/4 of NE/4    Arnold, Caroline A.      16.66     29.19     4.86   11/26/96   16.667    6.8330
25    20    17    20    Portion of SW/4 of NE/4    Phillips, Fred B.        16.66     29.19     4.86    11/1/96   16.667    6.8330
25    20    21     4    W/2 of NE/4                E. O. Miller Co.          4.18       80      3.34              16.667    6.8330
25    20    21     6    W/2 of SE/4                Waller, Rosalyn E        89.75       80     71.80   10/28/98   16.667    6.8330
                                                                                              ------
                                                                                              592.03
                                                                                              ======

<CAPTION>
                                                   AC%
     DPR AC%                RETAINED BY IVANHOE     TO
     BOT BY    ORRI BACK2   -------------------    WRB
TWP    IE      WRB & DMO    ROYALTY%   AC% KEPT   & DMO
---  -------   ----------   --------   --------   ------
<C>  <C>       <C>          <C>        <C>        <C>
25   1713.44      0.25       6.5830    1650.75     62.69
25    35.49       0.25       6.5830      34.19      1.30
25    35.49       0.25       6.5830      34.19      1.30
25    35.49       0.25       6.5830      34.19      1.30
25   319.14       0.25       6.5830     307.47     11.68
25    35.40       0.25       6.5830      34.11      1.30
25    10.10       0.25       6.5830       9.73      0.37
25    10.10       0.25       6.5830       9.73      0.37
25    10.10       0.25       6.5830       9.73      0.37
25    90.84       0.25       6.5830      87.51      3.32
25    10.08       0.25       6.5830       9.71      0.37
25   409.98       0.25       6.5830     394.98     15.00
25   409.98       0.25       6.5830     394.98     15.00
25   136.66       0.25       6.5830     131.66      5.00
25   136.66       0.25       6.5830     131.66      5.00
25    66.50       0.25       6.5830      64.07      2.43
25    33.23       0.25       6.5830      32.01      1.22
25    33.23       0.25       6.5830      32.01      1.22
25    22.85       0.25       6.5830      22.01      0.84
25   490.61       0.25       6.5830     472.66     17.95
     -------                           -------    ------
     4045.37                           3897.36    148.01
     =======                           =======    ======
</TABLE>

NOTE: DPI retained all royalty above base McDonald and assigned all rights below
base McD into DPR. Ivanhoe acquired DPR and all of its assets in exchange for
stock in Ivanhoe.

                                       E-56