                                   (magnitude (pressure-as (typical-monitor-pressure :psi) :kPa)))]
      (make-measurement pressure-magnitude pressure-unit))))
 
+(def measured-at-location [:downhole :surface])
+
 (defn typical-monitor-temperature
-  ([] (let [units (rand-nth [:C :F])]
-        (typical-monitor-temperature units)))
-  ([units] (cond (= units :C)
-                 (value-from-typical-range 50 80)
-                 (= units :F)
-                 ((convert-units-f :C :F) (typical-monitor-temperature :C)))))
+  ([]
+   (let [temperature-unit (rand-temperature-unit)
+         measured-at      (rand-nth measured-at-location)]
+     (typical-monitor-temperature temperature-unit measured-at)))
+  ([unit-or-location]
+   (let [is-unit                        #{:C :F}
+         is-location                    (set measured-at-location)
+         [temperature-unit measured-at] (cond
+                                          (is-unit unit-or-location)
+                                          [unit-or-location (rand-nth measured-at-location)]
+                                          (is-location unit-or-location)
+                                          [(rand-temperature-unit) unit-or-location])]
+     (typical-monitor-temperature temperature-unit measured-at)))
+  ([temperature-unit measured-at]
+   (let [temperature-f-downhole (tuc/draw-normal 155.1 1.5)
+         temperature-f-surface  (rand-nth [(tuc/draw-normal 60 15)
+                                           (tuc/draw-normal 51 14)
+                                           (tuc/draw-normal 51 15)
+                                           (tuc/draw-normal 51 18)])]
+     (condp = measured-at
+       :downhole (condp = temperature-unit
+                   :F (make-measurement temperature-f-downhole temperature-unit measured-at)
+                   :C (temperature-as (typical-monitor-temperature :F measured-at) :C))
+       :surface (condp = temperature-unit
+                  :F (make-measurement temperature-f-surface temperature-unit measured-at)
+                  :C (temperature-as (typical-monitor-temperature :F measured-at) :C))))))
 
 (defn typical-slurry-rate
   ([]

                   [:m :ft]                   #(* % (factors [:m :ft]))
                   [:kg :lb]                  #(* % (factors [:kg :lb]))
                   [:lb :kg]                  #(/ % (factors [:kg :lb]))
                   [:F :C]                    #(/ (- % 32) 1.8)
                   [:C :F]                    #(+ (* % 1.8) 32)
                   [:bbl :m3]                 #(/ % (factors [:m3 :bbl]))
                   [:m3 :bbl]                 #(* % (factors [:m3 :bbl]))}]
    (converter [from to])))

       :W (make-measurement typical-energy power-unit) ;; assume energy expended for 1 s
       :hp (power-as (typical-power :W) :hp)))))

(defn generate-pair [units generate-units-f generate-measurement-f measurement-as-f]
  (let [unit        (generate-units-f)
        measurement (generate-measurement-f unit)]
    [measurement (measurement-as-f measurement (first (remove (partial = unit) units)))]))

(generate-pair #{:F :C} rand-temperature-unit typical-monitor-temperature temperature-as)
