 
 (defn lat-lo-phase-shift
   [lat-max lat-lo]
-  (let [res (/ lat-max default-lat-abs-hi)]
-    (log/debug "Got lat-max:" lat-max)
-    (log/debug "Got resolution:" res)
-    (int
-      (- lat-max
-         1
-         (Math/floor (/ (* (dec lat-max)
-                           (adjusted-lat lat-lo res))
-                        (adjusted-lat default-lat-hi res)))))))
+  (log/debug "Got lat-max:" lat-max)
+  (int
+    (- lat-max
+       1
+       (Math/floor (/ (* (dec lat-max)
+                         (- lat-lo default-lat-lo))
+                      (- default-lat-hi default-lat-lo))))))
 
 (defn lat-hi-phase-shift
   [lat-max lat-hi]
-  (let [res (/ lat-max default-lat-abs-hi)]
-    (log/debug "Got lat-max:" lat-max)
-    (log/debug "Got resolution:" res)
-    (int
-      (- lat-max
-         1
-         (Math/ceil (/ (* (dec lat-max)
-                          (adjusted-lat lat-hi res))
-                       (adjusted-lat default-lat-hi res)))))))
+  (log/debug "Got lat-max:" lat-max)
+  (int
+    (- lat-max
+       1
+       (Math/ceil (/ (* (dec lat-max)
+                        (- lat-hi default-lat-lo))
+                     (- default-lat-hi default-lat-lo))))))
 
 (defn normalize-lat-lon
   [dim]

;;;   Support/Utility Functions   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn adjusted-lon
  [lon resolution]
  (- (* lon resolution)
     (* default-lon-lo resolution)))

(defn adjusted-lat
  [lat resolution]
  (- (* lat resolution)
     (* default-lat-lo resolution)))

;; XXX Can we use these instead? Why was the phase shifting written
;;     so obtrusely? There's got to be a reason, I just don't know it ...
;; XXX This is being tracked in CMR-4959


(defn lon-lo-phase-shift
  [lon-max lon-lo]
  (log/debug "Got lon-max:" lon-max)
  (-> (/ (* (dec lon-max)
            (- lon-lo default-lon-lo))
         (- default-lon-hi default-lon-lo))
      Math/floor
      int))

(defn lon-hi-phase-shift
  [lon-max lon-hi]
  (log/debug "Got lon-max:" lon-max)
  (-> (/ (* (dec lon-max)
            (- lon-hi default-lon-lo))
         (- default-lon-hi default-lon-lo))
      Math/ceil
      int))

;; XXX Note that the following two functions were copied from this JS:
;;
