OMG SVP file format


The OMG SVP file format is a simple ASCII file with a small header which is immediately followed by the actual sound speed profile data. These are explained in detail below, followed by a sample file. There are two file formats, version 1 and version 2. Either can be used with OMG software, although version 2 allows you to store temperature and salinity values.

Header

The header contains information about the date and position of the cast as well as a number of lines reserved for future use. The header is 16 lines long, all 16 lines must be present and in the order specified in this document. Comments may follow line values, as long as the comments begin with a # symbol. The main difference between the version 2 and version 1 headers are the time stamps in version 2 headers are in "human" time (YYYY DDD HH:MM:SS) instead of seconds since 1970. The following shows sample headers from both file versions.

Version 1

	1  # JWC watercolumn file Version 
	1115769653.940000    # time of observation  Wed May 11 2005 00:00:53
	0.000000    # time of logging (when inserted into MB logging stream) 
	0.000000 0.000000 # lat and long of observation
	0.000000 0.000000 # lat and long of ship when inserted
	9 # no. of raw observations 
	# blank line for future parameter 1 of 10
	# blank line for future parameter 2 of 10
	# blank line for future parameter 3 of 10
	# blank line for future parameter 4 of 10
	# blank line for future parameter 5 of 10
	# blank line for future parameter 6 of 10
	# blank line for future parameter 7 of 10
	# blank line for future parameter 8 of 10
	# blank line for future parameter 9 of 10
	# blank line for future parameter 10 of 10

Version 2

	2  # JWC watercolumn file Version
	2006 267 10:37:02 # date and time of observation
	0000 000 00:00:00 # date and time of logging
	73.899500 -101.981167 # lat and long of observation
	0.000000 0.000000 # lat and long of ship when inserted
	10 # no. of raw observations
	# blank line for future parameter 1 of 10
	# blank line for future parameter 2 of 10
	# blank line for future parameter 3 of 10
	# blank line for future parameter 4 of 10
	# blank line for future parameter 5 of 10
	# blank line for future parameter 6 of 10
	# blank line for future parameter 7 of 10
	# blank line for future parameter 8 of 10
	# blank line for future parameter 9 of 10
	# blank line for future parameter 10 of 10 
Here are a few notes about the header lines, the numbering in this list corresponds to the line number in the header, i.e. comment 5 below refers to line 5 in the header. Lines 7-16 are reserved for future use.
  1. This is the file format version, must be 1 or 2.
  2. The time of observation. For version 1, the time must be in seconds since 1970. You can get this value by using the date command:
    	date -u '+%s' -d 'May 11 2005 00:00:53
    
    For version 2, the time format is YYYY DDD HH:MM:SS (year day-of-year hour:minute:seconds)
  3. Time when the profile was logged. This field is ignored but cannot be left blank (zero is required). Must be in the same format as the time of observation.
  4. Position of the profile. Positions are expressed in decimal latitude and longitude, with the usual sign convention regarding N/S & E/W hemispheres.
  5. Position of the ship when file was logged. These fields are ignored, but cannot be left blank (zeroes are required).
  6. Number of sound speed profile samples. This is the most crucial field, if it is incorrect then I/O subroutines will barf.
A final note about the header fields: If a single sound speed profile is used for any raytracing (e.g. newMergeAtt -svp file.svp ...) then the observation date and observation position fields are ignored and can be zero. If multiple profiles are used (e.g. newMergeAtt -svp svp/*.svp ...) then the observation date and observation positions must be filled in since the time and/or position will be used to determine which sound speed profile to used during raytracing.

Profile data

The sound speed profile data follows the header as a list of columns. Version 1 has three columns of date: (1) sample number, (2) depth, and (3) sound speed. Version 2 has seven columns: (1) sample number, (2) depth, (3) sound speed, (4) temperature, (5) salinity, (6) other, (7) flag (0 is good, 1 is bad).

Sample data files

Version 1

1  # JWC watercolumn file Version 
1115769653.940000    # time of observation  Wed May 11 2005 00:00:53
0.000000    # time of logging (when inserted into MB logging stream) 
0.000000 0.000000 # lat and long of observation
0.000000 0.000000 # lat and long of ship when inserted
9 # no. of raw observations 
# blank line for future parameter 1 of 10
# blank line for future parameter 2 of 10
# blank line for future parameter 3 of 10
# blank line for future parameter 4 of 10
# blank line for future parameter 5 of 10
# blank line for future parameter 6 of 10
# blank line for future parameter 7 of 10
# blank line for future parameter 8 of 10
# blank line for future parameter 9 of 10
# blank line for future parameter 10 of 10
0 0.960000 1469.400024 
1 7.210000 1464.099976 
2 13.650000 1453.400024 
3 19.540001 1448.800049 
4 25.280001 1445.400024 
5 30.900000 1443.199951 
6 37.279999 1440.599976 
7 44.099998 1440.000000 
8 48.180000 1440.099976 

Version 2

2  # JWC watercolumn file Version
2006 267 10:37:02 # date and time of observation
0000 000 00:00:00 # date and time of logging
73.899500 -101.981167 # lat and long of observation
0.000000 0.000000 # lat and long of ship when inserted
10 # no. of raw observations
# blank line for future parameter 1 of 10
# blank line for future parameter 2 of 10
# blank line for future parameter 3 of 10
# blank line for future parameter 4 of 10
# blank line for future parameter 5 of 10
# blank line for future parameter 6 of 10
# blank line for future parameter 7 of 10
# blank line for future parameter 8 of 10
# blank line for future parameter 9 of 10
# blank line for future parameter 10 of 10
1 0.00 1434.73 -0.65 26.52 0.00 0
2 10.00 1439.26 -0.78 30.22 0.00 0
3 20.00 1441.61 -0.68 31.49 0.00 0
4 30.00 1442.27 -0.74 32.08 0.00 0
5 50.00 1448.14 0.32 32.53 0.00 0
6 75.00 1445.72 -0.41 32.95 0.00 0
7 100.00 1446.23 -0.46 33.21 0.00 0
8 125.00 1446.01 -0.64 33.36 0.00 0
9 150.00 1446.74 -0.64 33.58 0.00 0
10 200.00 1448.29 -0.61 34.03 0.00 0 

Plotting an svp file

You can use the OMG program 'plotSVP' and 'viewmeta' to plot and view a svp file. The following shows an example of the usage of both programs.
	plotSVP -xrange 1400 1550 -yrange -50 0 0001_20050512_181654.svp_1
	viewmeta plot.meta
Alternately, if you want to get fancy with awk and you have xmgr installed on your system, you can plot and view a profile this way:
	awk '{if (NR > 16) print $3 " " -$2 }' 0001_20050512_181654.svp_1 | xmgr -source stdin

Last modified by J. Beaudoin, 20070614