Log Units?

Mark Kampe mark.kampe at gmail.com
Sun Apr 28 12:55:35 PDT 2013


One of the many things I love about this program is an ASCII (xml)
format that makes it easy to peruse, filter and fix things.  In
sanity checking and preening entries imported from an SDL I could
not help but notice that all the units were SI (which I normally
favor, but they were awkward when checking reported weights).
IMHO the more human-readable the data is, the more value people
will find ways to get out of it.

I'm happy to do this, but I'm new to the list and wanted to make
sure I wasn't suggesting something dumb or redundant, so I wanted
to put out the suggestion first and find out what the protocol is.

Having spent a full ten minutes looking at the code, it looks to
me like save-xml unconditionally saves in SI units, and parse-xml
chooses its units based on the type of import being done.  But,
given that save-xml always appends the unit to the number, it
would seem reasonable to:

   1) implement an option in parse-xml that allows suffix-
      specified units to override the default (and probably
      accompany this with a bunch of new range sanity checks
      on the internal-units value)

   2) change save-xml to output the preferred units
	(w/appropriate suffix)

   3) verify correctness by
      a) import a large (SI) log
      b) change the preferred units to imperial and export it
      c) grep to confirm no bar, meters, liters, etc
      d) visually sanity check  the exported log for a few
	depths, temperatures, pressures, sac rates
      e) restart program and import the (now) imperial log
      f) change preferred units to SI, and export it
      g) diff to confirm it is identical to the original
         (and manual examination of any round-off errors).

    4) maybe add an auto-fudge option to correct imperial weights
       (e.g. if chosen unit is lbs and value is within .05lb of
   	    an even lb).  This seems wrong on an ongoing basis,
	    but might be exactly the right thing to do on initial
	    log importation).


More information about the subsurface mailing list