  The random-energy model is studied in the presence of random fields.
  The problem is solved exactly both in the microcanonical ensemble, without
recourse to the replica method, and in the canonical ensemble using the replica
formalism. The phase diagrams for bimodal and Gaussian random fields are
investigated in detail. In contrast to the Gaussian case, the bimodal random
field may lead to a tricritical point and a first-order transition. An
interesting feature of the phase diagram is the possibility of a first-order
transition from paramagnetic to mixed phase.
