Oceanographic Products and Services Division / Information Systems Branch

Information Systems Branch 

PORTS Uniform Flat File Format

(PUFFF)

Michael Evans, Geoffrey French, and Thomas Bethem

Silver Spring, Maryland

November 1996

First revision, December 1997

Second Revision, July 1998

Third Revision, November 1998

Fourth Revision, January 2003

noaa National Oceanic and Atmospheric Administration

U.S. DEPARTMENT OF COMMERCE

National Ocean Service

Office of Coast Survey
TABLE OF CONTENTS

1. Introduction .................................................................. 1

2. File and Table Descriptions ...................................................... 1

2.1 Measurement Files ...................................................... 1

2.2 Station Location Table Files .............................................. 2

2.3 Ports File Directory Table File ............................................. 2

2.4 Description Files ....................................................... 2

3. Measurement File Formats ....................................................... 3

3.1 Header Records ........................................................ 3

3.2 Water Level Data Format ................................................. 4

3.3 Water Level DQA Bit Mask Definitions ..................................... 6

3.4 CTD Data Format ...................................................... 7

3.5 Current Data Format .................................................... 8

3.6 RDI NarrowBand ADCP Data Format ...................................... 8

3.7 RDI BroadBand ADCP Data Format ....................................... 10

3.8 SonTek ADP Data Format ............................................... 13

3.9 DQA bit mask – SonTek ADP and RDI ADCP ............................... 15

3.10 Meteorological Data Format ............................................ 16

3.11 Meteorological Sensor DQA status word .................................. 17

4. PUFFF Access ............................................................... 17

5. Time-Stamp Explanation ....................................................... 18

APPENDIX I — Station Location Table Examples .................................... 19

APPENDIX II — PORTS File Directory Table Example ................................ 21

APPENDIX III — Documentation and Contacts ....................................... 22

APPENDIX IV — Data Quality Action Codes ........................................ 23

APPENDIX V — CORMS and Sensor Control ....................................... 26

APPENDIX VI — Revision History ................................................ 27

PUFFF Units File ............................................................... 28
1

PORTS UNIFORM FLAT FILE FORMAT

(PUFFF)

1. Introduction

Users of the Physical Oceanographic Real-Time System (PORTS) have requested access

to PORTS information in a form that can be used as input to their own real-time

applications. Until now, only a subset of data was displayed and available to the user. For

example, only a single selected bin of ADCP data is reported/displayed via the PORTS

screen, although many other bins are in fact collected, processed and available. The

following is a suite of files and their descriptions that can be accessed to retrieve all of the

PORTS observations as site-independent, flat, ASCII files in real time. 

2. File and Table Descriptions

There are four file/table types that constitute an implementation of PORTS Uniform Flat

File Format (PUFFF).

2.1 Measurement Files

There are currently four data types represented as measurement files. Each data type

collected is recorded in a separate file, containing the most recent real-time observations.

The names of the files follow the same convention as those found resident on the PORTS

Data Acquisition System (DAS) platform, but with different extensions. These files are

overwritten each sample (normally six minutes).

For example:

Water Level Example File Name: 9414290.wl

Current Example File Name: s01010.cu

Meteorological Example File Name: 9414290.mt

Conductivity/Temperature Example File Name: honker1.ct

Water Level stations use the seven digit National Water Level Measurement System

standard identification. The current meter stations use the standard PORTS 6 character

identifications, and Conductivity/Temperature stations are represented using plain text

descriptive names. Instruments with multiple sensor or data types (i.e., water level gages)

share the same identification prefix but are represented by different file extensions. The

format of the data varies depending on sensor type.

Each file, besides the basic observed data, has several fields containing information

regarding the quality of the data as determined on a real-time, single sample basis. These

fields are the Data Quality Assurance (DQA) bit mask, Data Quality Class Code (DQCC),

and Data Quality Action Codes (DQAC).
2

The DQA bit mask immediately follows the data fields on line 7. It consists of 32 digits,

each digit either a zero or a one (0 or 1). Bit 0 (zero) is the first character, bit 31 is the last

character. If the character is ‘1', this means it either failed a particular test or there is a

cautionary note. The meaning of the bits varies according to the data type.

The DQCC and the DQAC follow the DQA bit mask. The DQCC is a three digit code. The

first digit is ‘3' or ‘4'. If it is ‘3', there are no failure codes relating to real-time use of the

data. If it is ‘4', the data failed the DQA in some way for real-time use. The next two digits

are the number of DQAC’s following the DQCC. The DQAC’s are defined in Appendix IV.

2.2 Station Location Table Files

The Station Location Table (SLT) files are copies of the station location tables used

operationally by the software resident on the DAS. Because of this, several records found

in an SLT are of no relevance to the general user. These files contain information about

the location, depth, sampling interval, and other information. The SLT files are named the

same way as above, but with a “.ctl” extension. There may be more data files than SLT

files because some stations provide multiple sensor/data types. See Appendix I for an

example of a San Francisco SLT file.

2.3 Ports File Directory Table File

The PORTS File Directory Table (PFDT) file contains a list of the names of all of the data

files associated with a particular PORTS site. The PFDT file is named after the PORTS

site with a “.fd” extension. An example file name would be “sfports.fd” for San Francisco

Bay PORTS. The first record in this file is an integer value equal to the number of data

files associated with this PORTS site. This provides for easy maintenance if additional files

are added or deleted. A simple “mget” command via an anonymous FTP transfer would

get all of these files at once. See Appendix II for an example of a PFDT file.

2.4 Description Files

There are two types of informative description files. See Appendix III for examples of the

Descriptions files.

A readme file contains a general description of the overall design, data file

descriptions of PUFFS and a list of technical contacts at NOAA. (File name

readme)

A Units file contains a description all of the units associated with each data type.

(File name units)
3

3. Measurement File Formats

To support National Ocean Service and other users of this data, additional data fields may

be added to the end of any line of information or additional lines at the end of the file.

These added fields will not conflict with any data fields previously defined within this

document. If added fields are determined to be generally useful to the user community,

they will be made permanent and be fully described in the next release of this document.

All missing sample data fields are filled with nines. If no data was received in the latest

sampling interval, all data fields except the date are irrelevant.

3.1 Header Records

Each measurement file contains a six line header. The first line is the name of the PORTS

site that the data came from. Line 2 is the station id and name. At this time, lines three and

four are undefined. Line five may contain raw data from the station and will vary

depending on the instrument type. Line 6 contains a time stamp and possibly additional

information. For example, current meter data includes the number of bins after the time

and DQA information. For tide data only, If no data was received in the latest sampling

interval, the character string ‘ NO DATA’ follows the time stamp.

Line 1 name of the PORTS this data comes from

Line 2 station id and the name of the station.

Lines 3-4 undefined.

Line 5 none, some, or all of the raw data from the station.

Line 6 time-stamp in GMT (year, month, day, hour, minute). Additional fields

after the time are described under each instrument type.

The time-stamp is in GMT and has the following format. All data fields are zero

filled. (i.e January = 01 not 1).

YYYY MM DD HH mm [additional information]

Fortran format (1x,i4,4(1x,i2.2))

where YYYY = 4 digit year

 MM = 2 digit month

DD = 2 digit day

HH = 2 digit hour (1 pm = 13)

mm = 2 digit minute

nnn = number of current meter bins

For example: August 29, 1998 at 4:29 P.M. would be written as 

1998 08 29 16 29
4

3.2 Water Level Data Format

Lines 1-4 header lines as previously described

Line 5 contains all of the raw data received from the water level gage.

Line 6 GMT time-stamp, no-data indicator, rise/fall indicator

Line 7 Water level, standard deviation, and number of outliers. CORMS DQA

bit mask, DQCC and DQAC.

Line 8 CORMS control word

Example

Line 1:

San Francisco PORTS

Line 2:

9414290 Golden Gate

Lines 3-4:

(undefined)

Line 5 (This all on one line):

9999.99999.999 64 310 6848 4.908 0.012 0 0.0 0.0 

0.4 20 2.1 1020.4 5.445 0.013 0 21.5 13.1 99.9999.900 

 -0.7 0 0.000 0.000 3.868 6.808 0.012 0 5.140 0.012 

0

These values represent the following variables:

Datum offset meters (f8.3)

Sensor offset meters (f6.3)

bit status binary mask

number of resets Incrementing count

ROM checksum decimal number

Primary water level (on station datum) meters

Primary standard deviation meters

Primary number of outliers count (0 to 99)

Primary upper calibration temperature degrees C

Primary lower calibration temperature degrees C

Wind speed meters/second

Wind direction degrees True

Wind gust meters/second

Air pressure millibars

Secondary water level meters

Secondary standard deviation meters

Secondary number of outliers count (0 to 181)
1

 The tide gage processes 181 water level samples, 1 second apart, centered on the 6 minute mark. It

then computes the standard deviation of the samples. Samples more than 3 sigmas away from the average are

called "outliers". The "outliers" are removed from the samples and the standard deviation is recomputed.

The number of outliers indicates how many samples were discarded. The standard deviation is a measure of

noise in the water level environment. In a sheltered location, the typical standard deviation can be as low as

0.001 to 0.010 meters. More open locations could be higher, such as 0.150 meters. Every location is different.

5

Secondary upper calibration temperature degrees C

Secondary lower calibration temperature degrees C

salinity psu

humidity % (actually conductivity)

water temperature degrees C

use backup flag 0=use primary, 1=use secondary

backup gain ~ 1.0

backup offset meters

staff MLLW meters

N1 pressure sensor dBars

N1 pressure sensor std. Deviation dBars

N1 pressure sensor outliers count

T1 pressure sensor dBars

T1 pressure sensor std. Deviation dBars

T1 pressure sensor outliers count

Line 6: Time, with the no data flag, and the tide is rising 

 1997 11 06 16 00 NO DATA +

Cols. 1-17 year, month, day, hour, minute (GMT)

Cols. 19-25 the phrase ‘NO DATA’ if no data was collected

Col. 27 If the tide is rising, a ‘+’. If the tide is falling, a ‘–‘.

 If unable to determine rising or falling, it is blank.

Line 7:

 1275 64 2 00000010000000000000000000000000 300

Water elevation (relative to mean lower low water (MLLW)), standard deviation and outlier

count 1, DQA bit mask, DQCC, and DQAC. Note, that because the DQCC was 300, there

were no DQAC’s following (3=no errors, 00=number of DQAC’s). 

Water elevation, standard deviation and outlier counts are integer values. The units

for water elevation and standard deviation are millimeters and outliers is a count.

Water elevation data is relative to MLLW. The format follows:

LLLLL MMMMM NNNNN ; Fortran format (3(1x,i5))

LLLLL = Water Elevation in millimeters
6

MMMMM = Standard Deviation in millimeters

NNNNN = Outlier Count

For example, a water elevation of 1.235 meters above MLLW, standard

deviation of the water level sample 0.134 meters and 3 outliers would be

written as 

 1235 134 3

Line 8:

CORMS 00000000000000000000000000000000 00000000000000000000000000000000

This is the CORMS and Sensors control word. See Appendix V for a full description.

3.3 Water Level DQA Bit Mask Definitions

Each bit is labeled as to its importance.

Info This is merely information; It does not reflect directly on the quality of

the data.

Warning This is a warning; the data quality may be affected

Failure The data has failed a real-time QA check. Use at your own risk.

The first 10 bits (0-9) are for NOS internal analysis of gage operations only, and will not be

explained further. Bits 10 and 11 are directly from the water level gage and are used for

hardware evaluation and configuration. Bits 12-31 are based on DAS internal data quality

assurance checks.

Bit 0 Info ROM checksum error

Bit 1 Info RAM error

Bit 2 Info Systat bit 10 SDL, Systat 11 Tag missing

Bit 3 Info Systat Bit 8 Term UART, Bit 9 Radio UART, Bit 12

Missing board, Bit 13 Met, Bit 14 GOES

Bit 4 Info Battery < 12.5 volts

Bit 5 Info 8200 error

Bit 6 Info Charger voltage < 15.0 volts

Bit 7 Info > 5 sec off at sample end

Bit 8 Info > 15 sec off at sample end

Bit 9 Info 8200 time update not enabled

Bit 10 Warning Aquatrack error, zero returned for height recently

Bit 11 Warning Primary frozen or not working, use secondary water level sensor.

Set only by NOS personnel. If this bit is set, the water level data on

line 7 is from the backup water level sensor.

Bit 12 Failure Primary water level out of range

Bit 13 Failure Primary water level standard deviation excessive

Bit 14 Failure Primary water level number of outliers excessive
7

Bit 15 Failure Secondary water level out of range

Bit 16 Failure Secondary water level standard deviation excessive

Bit 17 Failure Secondary water level number of outliers excessive

Bit 18 Info primary Calibration temp. sensors out of range

Bit 19 Info primary Calibration temp. sensors do not agree with each other

Bit 20 Info secondary Calibration temp. sensors out of range

Bit 21 Info secondary Calibration temp. sensors do not agree with each other

Bit 22 Failure Gage time is incorrect by > 6 minutes

Bit 23 Info Gage has been reset

Bit 24 Failure Neither primary nor secondary gage is good

Bit 25 Failure Primary water level sensor appears frozen (flat)

Bit 26 Failure Secondary water level sensor appears frozen (flat)

Bit 27 Failure Primary water level changed too fast

Bit 28 Failure Secondary water level changed too fast

Bit 29 Failure No data

Bit 30 Failure Water level sensor disabled by CORMS

Bit 31 Undefined

3.4 CTD Data Format (Conductivity/Temperature/Depth(Pressure) Sensor)

The first six lines contain the previously defined header information. Line 7 contains

salinity, water temperature and pressure. If the sensor is a Sea-bird, the three raw,

unconverted data values for the conductivity, temperature and pressure are on line

five in their original hex format (Fortran format ‘(3(1x,z4.4))’). If the ct data is from

an Falmouth CT (standalone or installed with a tide gage), the original, full

resolution conductivity and temperature follows the fields allocated for Seabird hex

data on line five, (Fortran format ‘(15x,2i5)’, with the conductivity in milliSiemens/centimeter*1000) and the temperature in °C*1000. Line 8 contains the

CORMS control word as described in Appendix V.

Salinity, temperature data and pressure are integer values. The units for salinity

are PSU*1000, temperature is °C*100, and pressure is decibars*100. The data has

the following format:

sssss ttttt ppppp ; Fortran format (3(1x,i5))

where sssss = salinity as a integer (PSU*1000)

ttttt = temperature as a integer (°C*100)

ppppp = pressure as an integer (decibars*100)

For example: 3.55 PSU, 15.3°C and pressure of 15.12 dBars with the DQA

and DQAC would be read

 3550 1530 1512 00000000000000000000000000000000 300
8

Conductivity/Temperature/Pressure DQA Bit Mask definitions

Each bit is labeled as to its importance.

Info This is merely information; it does not reflect directly on the quality of

the data.

Warning This is a warning; the data quality may be affected.

Failure The data has failed a real-time QA check; use at your own risk.

Bit 0 Failure salinity out of range

Bit 1 Failure salinity zero

Bit 2 Failure water temperature out of range

Bit 3 Failure Time is > 6 minutes off

Bit 4 Warning Salinity is flat

Bit 5 Warning Water temperature is flat

Bit 6 Failure No data

Bit 7 Failure barometric pressure is out of range

Bit 8 Warning barometric pressure is flat

Bit 9 Failure water temperature sensor disabled by CORMS

Bit 10 Failure conductivity (salinity) sensor disabled by CORMS

3.5 Current Data Format

The format of the current meter data is a function of the instrument type. RD Instruments

(NarrowBand and BroadBand) are four beam instruments while SonTek’s are three

beams. Each instrument also measures different parameters for quality assurance. All

instruments have the time line (line 6), modified by adding DQA information after the time.

Line 6: The time-stamp is in GMT and has the following format. All data fields are zero

filled. (i.e January = 01 not 1). The time is followed by the number of bins, DQA bits and

DQCC codes.

YYYY MM DD HH mm nnn DQA DQCC (DQAC)

Fortran format (1x,i4,4(1x,i2.2),1x,i3,1x,32i1,1x,i3,20(1x,a4))

where YYYY = 4 digit year

 MM = 2 digit month

DD = 2 digit day

HH = 2 digit hour (1 pm = 13)

mm = 2 digit minute

nnn = number of current meter bins

DQA = 32 one digit fields, each digit is 0 or 1

DQCC= data quality class code * 100 plus the number of DQAC 

 fields following on the same line

For example: August 29, 1998 at 4:29 P.M. would be written as 

1998 08 29 16 29 016 00000000000000000000000000000000 300
9

RDI Current Profilers (NarrowBand and Broadband)

3.6 RDI NarrowBand ADCP Data Format

Lines 1-6 contain header information as previously described. Line 5 contains instrumentspecific information. The data is heading, tilts, water temperature, and serial number,

using Fortran format (4i6,a8). An example follows, with a heading of 278.15 degrees

(magnetic), x tilt of 10.4 degrees, y tilt of 2.05 degrees, temperature of 30.15 degrees C,

and a serial number of ‘RDI006':

 27815 104 205 3015 RDI006

The current data starts on line 7, and has the following format:

B1 uuuuuu vvvvvv wwwwww eeeeee dddddd ssssss bback1 bback2 bback3 bback4 %beam1%beam2 %beam3

%beam4 watemp bindqa spectral bstat

using Fortran format (1X,I3,15(1X,I6),1X,32I1,12(1X,I5))

where all of the variables are integers, one line per bin, and in the following order:

B1 to Bn = bin number (1 to a maximum of 128)

uuuuuu = u velocity in mm/s (+ = east, – = west, magnetic)

vvvvvv = v velocity in mm/s (+ = north, – = south, magnetic)

wwwwww = w velocity in mm/s (vertical)

eeeeee = error velocity in mm/s

dddddd = direction (degrees True)

ssssss = velocity in mm/s

bback1 = echo amplitude (relative dB)

bback2 = echo amplitude (relative dB)

bback3 = echo amplitude (relative dB)

bback4 = echo amplitude (relative dB)

%beam1 = % good pings beam 1 (0 to 100)

%beam2 = % good pings beam 2 (0 to 100)

%beam3 = % good pings beam 3 (0 to 100)

%beam4 = % good pings beam 4 (0 to 100)

watemp = water temperature (c*100)

bindqa = DQA bin specific bit mask (each digit 0 or 1)

spectral = spectral width (0 to 255)

bstat = bin status (0 to 255)

rveloc = raw beam counts used for current speed (0 to 4095)

RDI NarrowBand ADCP’s have information in the raw data header that is not

directly needed to use the currents information. However, we have added all of the

header data beginning on a new line directly after the last bin of current data. The
10

format is a string of 8 digit integer fields, with 10 fields per line, with as many lines

as necessary for all of the data. The following are the definitions for all of the

header information variables in the same order as in the files:

 Variable Units

Time between pings seconds*100

Pings per ensemble count

bin length meters

transmit pulse length meters

blanking distance whole meters (any fraction is truncated)

delay after blank meters

ensemble number sequential count, max of 65535, then rolls over

to 0

BIT status result of built-in-tests

velocity range switch setting 0=low range, 1=high range

velocity reference 0=beam coordinates, 1=earth coordinates

transducer orientation 0=upward looking, 1=downward looking

transducer pattern 0=convex, 1=concave

transducer frequency Hertz

valid are the previous 5 fields valid, 0=no, 1=yes

signal to noise threshold dB

percent good pings limit percent

high voltage input volts * 100

transmit current amps * 100

low voltage input volts * 100

CTD conductivity count

CTD temperature count

CTD depth count

btv1 Bottom tracking velocity count, beam 1

btv2 Bottom tracking velocity count, beam 2

btv3 Bottom tracking velocity count, beam 3

btv4 Bottom tracking velocity count, beam 4

btr1 Bottom tracking range, beam 1

btr2 Bottom tracking range, beam 2

btr3 Bottom tracking range, beam 3

btr4 Bottom tracking range, beam 4

stdpitch standard deviation of pitch, degrees * 10

stdroll standard deviation of roll, degrees * 10

stdheading standard deviation of heading, whole degrees

ctdmeasure CTD measurement interval, seconds * 1000

The last line in the file is the CORMS control word as described in Appendix V.
11

3.7 RDI BroadBand ADCP Data Format

Lines 1-6 contain header information as previously described. Line 5 contains instrument

specific information. The data is heading, tilts, water temperature, built-in-test status,

speed-of-sound and serial number, using Fortran format (6i6,a8). An example follows, with

a heading of 278.15 degrees (magnetic), x tilt of 1.04 degrees, y tilt of 2.05 degrees, water

temperature of 30.15 degrees C, built-in-test value of 0, speed-of-sound of 1500

meters/second and serial number of ‘RDI026':

 27815 104 205 3015 0 1500 RDI026

The current data starts on line 7, and has the following format:

B1 uuuuuu vvvvvv wwwwww eeeeee dddddd ssssss bback1 bback2 bback3 bback4 %beam1%beam2 %beam3

%beam4 watemp bindqa corr% bstat

Fortran format (1X,I3,15(1X,I6),1X,32I1,8I4)

where all of the variables are integers, one line per bin, and in the following order:

B1 to Bn = bin number (1 to 128)

uuuuuu = u velocity in mm/s (+ = east, – = west, magnetic)

vvvvvv = v velocity in mm/s (+ = north, – = south, magnetic)

wwwwww = w velocity in mm/s (vertical)

eeeeee = error velocity in mm/s

dddddd = direction (degrees True)

ssssss = velocity in mm/s

bback1 = echo amplitude (relative dB)

bback2 = echo amplitude (relative dB)

bback3 = echo amplitude (relative dB)

bback4 = echo amplitude (relative dB)

3beam = % of good three beam solutions

transrej = % of transformations rejected

morebad = % with more than one beam bad in bin

4beam = % of good 4 beam solutions

watemp = water temperature (c*100)

bindqa = DQA bin specific bit mask (each digit 0 or 1)

corr% = correlation coefficient for each of the four beams (percent, 0 to 100)

bstat = beam status for each of the four beams (0 or 1)

RDI BroadBand ADCP’s have information in the raw data header that is not directly

needed to use the currents information. However, we have added all the header

data beginning on a new line directly after the last bin of current data. The format is

a string of 8 digit integer fields, with 10 fields per line, with as many lines as

necessary for all of the data. The following are the definitions of all of the header

information variables in the same order as in the file:
12

 Variable Units

CPU firmware version number (0 to 255)

CPU firmware revision number (0 to 255)

transducer frequency Hertz (0 to 2400kHz)

transducer configuration 0=concave, 1=convex

transducer beam angle degrees (15,20,30,0=other)

transducer orientation 1=upward looking, 0=downward looking

Janus configuration 4=4 beam, 5=5 beam (3 demod.), 15=5 beam

(4 demod.)

Sensor configuration 0 to 3

coordinate transform 0=none (beam), 1=instrument, 2=ship, 4=earth

number of beams used in calculations not number of physical beams

pings per ensemble count (0 to 16384)

bin length meters * 100

blanking distance meters * 100

profiling mode 0 to 255

correlation threshold counts (0 to 255)

code repetitions in transmit pulse counts (0 to 255)

minimum percent good pings percent (0 to 100)

error velocity threshold meters/second * 1000 (0 to 5000)

tilts used 0=no, 1=yes

3 beam solutions used 0=no, 1=yes

bin mapping used 0=no, 1=yes

heading alignment correction degrees * 100

heading bias correction degrees * 100

sensor source source of env. Sensor data (see RDI manual)

(0 to 255)

bin 1 distance (to center of bin) meters * 100 (0 to 65535)

transmit pulse length meters * 100 (0 to 65535)

reference layer start bin 0 to 128 (0=reference layer not used)

reference layer end bin 1 to 128

false target threshold counts (0 to 255), 255=disabled

transmit lag distance meters * 100 (0 to 65535)

ensemble number sequential count (0 to 2**24-1)

water pressure meters * 10 (manual or sensor value)

salinity parts/thousand (manual or sensor value)

maximum time between ping groups seconds * 100

standard deviation of heading degrees

standard deviation of roll degrees * 10

standard deviation of pitch degrees * 10

ADC channel 0 - transmit current (0 to 255)

ADC channel 1 - transmit voltage (0 to 255)

ADC channel 2 - DAC output (0 to 255)

ADC channel 3 - temperature (0 to 255)
13

ADC channel 4 - VDD3 (0 to 255)

ADC channel 5 - VDD1 (0 to 255)

ADC channel 6 - VDC (0 to 255)

ADC channel 7 - reserved

The last line in the file is the CORMS control word as described in Appendix V.

3.8 SonTek ADP Data Format

SonTek Current Profiler

Lines 1-6 contain header information as previously described. Line 5 contains instrument

specific information. The data is written using Fortran format (11i6,2i10) in the following

order:

 Variable Units

heading degrees * 10

pitch degrees * 10

roll degrees * 10

temperature degrees C * 100

water pressure decibars * 100

standard deviation of heading degrees * 10

standard deviation of pitch degrees * 10

standard deviation of roll degrees * 10

standard deviation of temperature degrees C * 100

standard deviation of water pressure decibars * 100

speed of sound meters/second * 10

pressure sensor offset decibars * 1000000

pressure sensor scale *1000000000

The current data starts on line 7, and has the following format:

B1 uuuuuu vvvvvv wwwwww dddddd ssssss bback1 bback2 bback3 stddev1 stddev2

stddev3 watemp bindqa

Fortran format (1X,I3,12(1X,I6),1X,32I1)

where all the variables are integers, each bin on a single line and in the following order:

B1 to Bn = bin number (1 to 128)

uuuuuu = u velocity in mm/s (+ = east, – = west, magnetic)

vvvvvv = v velocity in mm/s (+ = north, – = south, magnetic)

wwwwww = w velocity in mm/s (+ = up, – = down)
14

dddddd = direction (degrees True)

ssssss = velocity in mm/s

bback1 = echo amplitude (relative dB)

bback2 = echo amplitude (relative dB)

bback3 = echo amplitude (relative dB)

stddev1 = standard deviation for beam1 (millimeters/sec)

stddev2 = standard deviation for beam2 (millimeters/sec)

stddev3 = standard deviation for beam3 (millimeters/sec)

watemp = water temperature (°C * 100)

bindqa = bin related DQA bit mask

SonTek ADP’s have information in the raw data header that is not directly needed

to use the currents information. However, we have added all of the header data

beginning on a new line directly after the last bin of current data. The format is a

string of 8 digit integer fields, with 10 fields per line, with as many lines as

necessary for all of the data. The following are the definitions for all of the header

information variables in the same order as in the file:

 Variable Units

serial number 8 characters

data type SonTek internal use

profile (ensemble) number sequential

number of beams 3 or 4

vertical beam 0=no, 1=yes

sensor orientation 0=downward, 1=upward 2=sideways

temperature mode 0=user, 1=measured

coordinate transform mode 0=beam, 1=XYZ, 2=ENU (magnetic, earth)

bin length centimeters

blanking distance centimeters

sampling interval seconds

number of pings count

16 internal values SonTek internal use

pressure sensor counts, requires sensor offset and scale to

use. Multilply by pressure sensor scale and

add the pressure sensor offset to get the

pressure in decibars as on line 6.
15

3.9 DQA bit mask – SonTek ADP and RDI ADCP

Each bit is labeled as to it’s importance.

Info The is merely information; it does not reflect directly on the quality of

the data.

Warning This is a warning; the data quality may be affected.

Failure The data has failed a real-time QA check; use at your own risk.

DQA Header bit map

Bit 0 Warning time is incorrect

Bit 1 Warning pitch changed

Bit 2 Failure pitch illegal value

Bit 3 Warning roll changed

Bit 4 Failure roll illegal value

Bit 5 Warning heading changed

Bit 6 Failure heading illegal value

Bit 7 Warning real-time bin lowered

Bit 8 Failure no real-time bin found to be good

Bit 9 Warning current meters has been re-started

Bit 10 Warning pressure sensor out of range

Bit 11 Warning water temperature sensor out of range

Bit 12 Warning wrong serial number

Bit 13 Warning wrong number of bins

Bit 14 Failure wrong bin size

Bit 15 Failure wrong sampling interval

Bit 16 Failure wrong coordinate system

Bit 17 Warning wrong blanking distance

Bit 18 Warning RDI ADCP BIT error

Bit 19 Warning Not enough 4 beam solutions

Bit 20 Failure Not enough 3+4 beam solutions

Bit 21 Warning Excessive vertical velocity

Bit 22 Warning Excessive error velocity

Bit 23 Failure Not enough good pings

Bit 24 Failure No data

Bit 25 Failure (not implemented yet) Data is no good, set if any header failure codes

Bit 26 Info This is a prediction file. Only the bins indicated by bit 15 in the DQA

bin related bit map are valid. Only speed, direction, north and east

velocities are valid.

Bit 27 Warning There are warnings for various types of bin related errors. Examine

the DQA Bin related bit maps for the specific warnings.

Bit 28 Failure All currents disabled by CORMS

Bit 29 Failure water pressure sensor disabled by CORMS
16

Bit 30 Failure water temperature sensor disabled by CORMS

Bit 31 undefined

DQA Bin related bit map

Bit 0 Failure illegal speed

Bit 1 Failure high standard deviation

Bit 2 Warning low echo amplitude

Bit 3 Warning low correlation magnitude

Bit 4 Warning high vertical velocity

Bit 5 Warning speed or direction is 0.000

Bit 6 Failure illegal direction

Bit 7 Info This bin was used for this real-time sample

Bit 8 Info This is the default real-time bin

Bit 9 Failure not enough 3 or 4 beam solutions

Bit 10 Warning not enough 4 beam solutions

Bit 11 undefined

Bit 12 Warning Excessive error velocity

Bit 13 Failure Not enough good pings

Bit 14 Failure (not implemented yet) Set if any bin related Failure codes

Bit 15 Info This is predicted data. Only speed, direction, north and east velocities

are valid.

Bits 16-31 undefined

3.10 Meteorological Data Format

Lines 1-6 contain header information as previously described. Line 7 contains wind

speed, wind direction, wind gust, barometric pressure, and air temperature.

All of the meteorological data values are of type integer. Line 7 has the following

format:

wwwww ddddd ggggg bbbbb tttttt DQA DQAC

where wwwww = Wind Speed (meters/second * 10)

ddddd = Wind Direction (degrees true)

ggggg = Maximum Wind Gust (meters/second *10)

bbbbb = Barometric Pressure (millibars*10)

ttttt = Air Temperature (°C*100)
17

3.11 Meteorological Sensor DQA status word

Each bit is labeled as to it’s importance.

Info This is merely information; it does not reflect directly on the quality of

the data.

Warning This is a warning; the data quality may be affected.

Failure The data has failed a QA check; use at your own risk.

Bit 0 Failure Wind speed out of range

Bit 1 Warning wind speed is flat

Bit 2 Failure Wind gust out of range

Bit 3 Failure Air temperature out of range

Bit 4 Warning Air temperature is flat

Bit 5 Failure Barometric pressure out of range

Bit 6 Warning Barometric pressure is flat

Bit 7 Failure Time is > 6 minutes off

Bit 8 Failure Illegal wind direction

Bit 9 Failure No data

Bit 10 Failure wind speed sensor disabled by CORMS

Bit 11 Failure Barometric pressure sensor disabled by CORMS

Bit 12 Failure Air Temperature sensor disabled by CORMS

Bits 13-31 undefined

4. PUFFF Access

The PUFFF files are produced on the PORTS Data Acquisition System (DAS) platform at

each of the PORTS sites during the data collection process. After the files are created on

the DAS, they are transferred to Silver Spring, Maryland via Internet. The files are then 

available to any user via anonymous FTP.

The anonymous FTP server in Silver Spring where these files can be retrieved is named

“tidepool.nos.noaa.gov” (140.90.78.210). Users are allowed to FTP into the system via an

anonymous login that requires an e-mail address as a password. Once connected, a user

can move to the PUFFF directory and sub-directory of interest to retrieve the PUFFF files.

The FTP directory structure where the PUFFF files can be found: 

/pub/PUFFF/akports Port of Anchorage PORTS

/pub/PUFFF/cbports Chesapeake Bay PORTS

/pub/PUFFF/dbports Delaware Bay and River PORTS

/pub/PUFFF/hgports Houston/Galveston Bay PORTS

/pub/PUFFF/llports Los Angeles/Long Beach PORTS

/pub/PUFFF/nbports Narragansett Bay PORTS

/pub/PUFFF/nyports New York/New Jersey PORTS

/pub/PUFFF/sfports San Francisco Bay PORTS
2

 Data is sent over the Internet from each PORTS DAS to a server located in Silver Spring,

Maryland. Because the Internet is used, the time it takes to complete the transmission of the data varies from

PORTS site to PORTS site and would therefore affect the optimum time to retrieve PUFFF files.

18

/pub/PUFFF/tbports Tampa Bay PORTS

5. Time-Stamp Explanation

The “time-stamp” is the time associated with the data sample collected from each

instrument. The time stamp is centered on the midpoint of each instruments sample

interval.

The time-stamp for the water level data will always be on the six minute mark. If

there are any ancillary sensors connected to the water level site (such as

conductivity/temperature or meteorological data), its time-stamp will also be on the

six minute mark.

The time-stamp for other files is arbitrary and depends upon instrument

configuration and available time window to collect a sample from an instrument.

This will vary, depending on individual PORTS sites. Barring missing samples or

reconfiguration of the instrument, the time stamps will be six minutes apart for

successive files.

There is a three to twelve minute lag between wall clock time and the time-stamp.

This is because of the time it takes to poll the instruments, process the data, and

move it to our FTP site.

If the user wishes to automate the downloading of PUFFS data from our

server, the optimal time to retrieve the data is approximately the six minute

mark. .

2
19

APPENDIX I — Station Location Table Examples

Water Level

9414290 station id

Golden Gate station name

i050 instrument id number

/ports absolute unix directory path

/archive data path

/tables/locat station table path

/tables/instr instrument table path

/tables/critr

/tables/const path to harmonic constants

 37 48 24 latitude north dd mm ss

 122 27 54 longitude west ddd mm ss

360 transmit interval seconds

MLLW tide datum

Feet output data units

0.3048 divide input by this to get output units

Meters input data units

1.759 staff correction meters

0 gage time hours

8 local standard time zone hours

Conductivity/Temperature/Depth

benicia1 station id

Benicia Bridge station name

p406 instrument id number

/ports absolute unix directory path

/archive data path

/tables/locat station table path

/tables/instr instrument table path

/tables/critr data criteria path

/tables/calib calibration data path

/tables/const path to harmonic constants path

 38 05 18 latitude north

 122 09 42 longitude west

360 transmit interval seconds

0 depth 0=surface,9999=bottom meters

0 gage time zone hours

8 local standard time zone hours

3 ZENO id
20

Current Meter

s01010 station id

Benicia Bridge station name

i060 instrument id number

 calib id number adcp

 calib id number press

 calib id number temp

 calib id bumber cond

/tables/critr criteria file path

/ports absolute unix directory path

/archive raw hex data path

/tables/calib calib table path

/tables/instr instrument table path

/tables/locat station table path

 38 02 29 latitude north

 122 09 31 longitude west

63.0 charted depth feet

63.0 fathometer reading feet

hard clay bottom type

24.50 ht. trans. above bottom inches

 weather

 divers observations

 length of deployment days

rt operational mode (rt or sc)

01 23 1995 00.00 start time first record m d y hh.hh gmt

 stop time last record m d y hh.hh gmt

20 number of bins sampled

2.0 bin length meters

1 pulse rep. rate seconds

1 transmit interval seconds

2.0 depth cell length meters

0.0 blanking time

0.5 blanking distance meters

256 # pings per ensemble

25 % good threshold

1.00 time between pings seconds

360 ensemble period seconds

15.65 compass deviation degrees

adcp/devel processed data file path

0 speed range (0=low,1=high)

 5.0 salinity ppt

50 flood direction degrees True

230 ebb direction degrees True

0 adcp orientation, see devel.f (1-4)

6 bin to use for real-time

8 local standard time zone hours

0 adcp type(0=narrowband,1=broadband,3=SonTek)

502 binary size of one record (bytes,not hex)
21

Example Filename Explanations

9414290.wl Golden Gate Water Levels

9414750.wl Alameda Water Levels

9414863.wl Richmond Water Levels

9415144.wl Port Chicago Water Levels

s01010.cu Benicia Bridge Currents

s02010.cu Richmond Currents

s03010.cu Oakland Currents

s04010.cu Golden Gate Currents

APPENDIX II — PORTS File Directory Table Example

San Francisco PORTS (sfports.fd)

15

9414290.wl

9414750.wl

9414863.wl

9415144.wl

s01010.cu

s02010.cu

s03010.cu

grizzly1.ct

honker1.ct

9414290.mt

9414750.mt

9414863.mt

9415144.mt

readme

units
22

APPENDIX III — Documentation and Contacts

For a copy of the PORTS Uniform Flat File Format (PUFFF) document, see our home

page located on our Web site “co-ops.nos.noaa.gov”. Any future changes and/or

corrections to this document will appear first on this home page. This document

undergoes continuous changes as necessary. If you detect changes or additions to any of

the PUFFF files, your first action should be to get the latest copy of this document

available. Not all changes are significant enough to generate a full revision, but there can

be continuous small additions to this document.

Technical contacts for the use of PUFFF:

Michael Evans

Computer Specialist (PORTS OPERATIONS)

Phone: 301-713-2806 ext. 105

e-mail: Mike.Evans@noaa.gov

Geoffrey French

Oceanographer (PORTS OPERATIONS)

Phone: 301-713-2806 ext. 149

e-mail: Geoff.French@noaa.gov

Thomas Bethem

Computer Specialist (Chief, Information Systems Division)

Phone: 301-713-2806

e-mail: Thomas.Bethem@noaa.gov
23

APPENDIX IV — Data Quality Action Codes

Water Level Gage DQAC

The following codes are determined directly, they are not from the criteria table.

FNOD No data was received. The time stamp is correct, but no other data is

usable.

WAQT Aquatrak failure flag set (from bit 10 of the gage status word)

FTIM Gage time is wrong. All data is considered to be invalid. The time stamp has

been changed to a reasonably correct value only so the user knows what the

time should have been.

FCSW Water level has been disabled by CORMS

These codes are taken from the criteria tables.

Warning Failure Change Description

WOW1 FOW1 DOW1 observed water level (meters), primary

WOU1 FOU1 DOU1 outliers (count), primary

WSD1 FSD1 DSD1 std. deviation (meters), primary

WCT1 WCT1 DCT1 cal temp C, primary

WOW2 FOW2 DOW2 observed water level (meters), secondary

WOU2 FOU2 DOU2 outliers (count), secondary

WSD2 FSD2 DSD2 std. deviation (meters), secondary

WCT2 WCT2 DCT2 cal temp C, secondary

WWSP FWSP DWSP wind speed m/s

WWSG FWSG DWSG wind gust m/s

WWDI FWDI DWDI wind direction degrees True

WSAL FSAL DSAL salinity ppt

WWTM FWTM DWTM water temperature degrees C

WATM FATM DATM air temperature degrees C

WAPR FAPR DAPR air pressure millibars

Currents DQAC

The following codes are determined directly, they are not from the criteria table.

FNOD No data was received. The time stamp is correct, but no other data is 

usable.

FTIM Instrument time is wrong. The time stamp has been corrected to a

reasonable value only so the user can determine what the time should have

been. All data is considered invalid.

WRTB Real-time bin has been lowered.

FRTB No data is good enough for real-time use.

FCSC Currents data has been disabled by CORMS.

FCST Water temperature has been disabled by CORMS.

FCSP Water pressure has been disabled by CORMS.
24

These codes are taken from the criteria tables.

Warning Failure Change Description

WSPD FSPD DSPD min/max speeds cm/s

WSTD FSTD XXXX stdev. of speed cm/s

WXTL FXTL DXTL pitch (x axis) degrees

WYTL FYTL DYTL roll (y axis) degrees

WHDG FHDG DHDG heading degrees

WXTM WXTM water temp deg C

WVT1 WVT1 V1 volts

WVT2 WVT2 V2 volts

WIC2 WIC2 Transmit current amps

WENS WENS ensemble number count

WBIT WBIT BIT (built in test)

WDPW WXPR pressure decibars

WVRV FVRV vert. vel cm/s

WERV FERV error vel cm/s

WGPW FGPZ %good pings count

WEAM FEAM echo amp. db

WCMG FCMG correlation coeff counts

WSOS FSOS speed of sound m/s

WTCV XXXX transmitter charge volts

WTIP XXXX transmitter power amps

WTPV XXXX transmitter power volts

WTTC XXXX transmitter temp deg C

W4BS W4BS % of 4 beam BBADCP solutions

W3BS F3BS % of at least 3 beam BBADCP solutions

WRT1 FRT1 limits for real-time bin to use

CT(D) DQAC

The following codes are determined directly, they are not from the criteria table.

FNOD No data was received. The time stamp is correct, but no other data is 

usable.

FTIM Instrument time is wrong. The time stamp has been corrected to a

reasonable value only so the user can determine what the time should have

been. All data is considered invalid.

FCSS Salinity (conductivity) sensor dissemination has been turned off by CORMS.

FCST Water temperature has been disabled by CORMS.

FCSP Water pressure has been disabled by CORMS.
25

These codes are taken from the criteria tables.

Warning Failure Change Description

WSAL FSAL DSAL salinity ppt

WWTM FWTM DWTM water temperature degrees C

WWPR FWPR DWPR water pressure pressure decibars

Meteorological DQAC

The following codes are determined directly, they are not from the criteria table.

FNOD No data was received. The time-stamp is correct, but no other data is 

usable.

FTIM Instrument time is wrong. The time stamp has been corrected to a

reasonable value only so the user can determine what the time should have

been. All data is considered invalid.

FSPG Average wind speed is greater than the wind gust

FCSW Wind data has been disabled by CORMS.

FCSA Air temperature has been disabled by CORMS.

FCSB Barometric pressure has been disabled by CORMS.

These codes are taken from the criteria tables.

Warning Failure Change Description

WWSP FWSP DWSP wind speed meters/second

WWSG FWSG DWSG wind gust meters/second

WWDI FWDI DWDI wind direction degrees True

WATM FATM DATM air temperature degrees C

WAPR FAPR DAPR air pressure millibars
26

APPENDIX V — CORMS and Sensor Control Status

The Continuous Operational Real-Time Monitoring System (CORMS) has the ability to

remotely disable any PORTS sensor. This does not stop data collection or the generation

of PUFFF files. The CORMS control fields show the present operational status of any

sensor. If the sensor is flagged as disabled, the data is considered to be unreliable,

regardless of any DQA or DQAC flags. The CORMS status line is in all PUFFF files. If a

sensor is disabled, a DQAC failure code will also be generated, indicating that CORMS

has disabled a particular sensor data type. In addition, following the CORMS control string

is a Sensors Installed flag string.

NOTE: The CORMS control flags override ALL DQA and DQAC flags or indicators.

The CORMS status line consists of the word ‘CORMS’ in columns 1 through 5, a space,

and then 32 consecutive one character fields of ‘0' or ‘1'.

A one in a field means the sensor is considered disabled. This overrides all DQA codes. A

zero means the sensor is enabled.

Below are the currently defined fields. All other fields are considered to be undefined for

users:

Field Sensor

 1 Water Level

 2 Currents

 3 Air Temperature

 4 Water Temperature

 5 Barometric Pressure

 6 Water Pressure

 7 Wind Speed, Wind Direction, Wind Gust

 8 Salinity

 9 Waves

 10 Visibility

Therefore, a CORMS status line with the currents disabled would look like:

CORMS 01000000000000000000000000000000
27

APPENDIX VI — Revision History

6/23/99

Added water level rising/falling indicator on line 6 (the time line).

12/29/99

Changed anonymous FTP references from ceob-g30 to tidepool.

Changed references from opsd to co-ops.

Changed Jim Dixon’s phone number.

1/16/01

Revised DQA bit masks and DQA codes to indicate that CORMS has disabled sensors.

This basically replicates information from the CORMS control word to the station control

word and DQA codes. Changed location of web page. Removed Jim Dixon as contact.
28

PUFFF Units File

Water Level Data

Water level data files contain the following measurements.

time-stamp GMT

water elevation millimeters

standard deviation millimeters

outliers counts

Salinity Data

Salinity data files contain the following measurements.

time-stamp GMT

salinity PSU*1000 (Practical Salinity Units)

temperature degrees C*100

Current Data

RDI NarrowBand current meter data files contain the following measurements.

time-stamp GMT

#bins integer

B1 to Bn bin number

U velocity (magnetic east) millimeters/second

V velocity (magnetic north) millimeters/second

W velocity (vertical) millimeters/second

error velocity millimeters/second

vector direction degrees true

vector speed millimeters/second

echo amplitude beam #1 relative dB

echo amplitude beam #2 relative dB

echo amplitude beam #3 relative dB

echo amplitude beam #4 relative dB

% good pings beam #1 percentage

% good pings beam #2 percentage

% good pings beam #3 percentage 

% good pings beam #4 percentage

water temperature degrees C*100

bindqa DQA bin specific bit mask (each digit 0 or 1)

spectral spectral width (0 to 255)
29

bstat bin status (0 to 255)

rveloc raw beam counts used for current speed (0 to

4095)

RDI BroadBand current meter data files contain the following measurements.

time-stamp GMT

#bins integer

B1 to Bn bin number

U velocity (magnetic east) millimeters/second

V velocity (magnetic north) millimeters/second

W velocity (vertical) millimeters/second

error velocity millimeters/second

velocity direction degrees true

velocity speed millimeters /second

echo amplitude beam #1 relative dB

echo amplitude beam #2 relative dB

echo amplitude beam #3 relative dB

echo amplitude beam #4 relative dB

% good three beam solutions percentage

% of transforms rejected percentage

% of more than one bin bad in beam percentage 

% of good 4 beam solutions percentage

water temperature degrees C*100

bindqa DQA bin specific bit mask (each digit 0 or

1)

corr% correlation coefficient (percent, 0 to 100)

bstat bin status (0 or 1)

SonTek current meter data files contain the following measurements.

time-stamp GMT

#bins integer

B1 to Bn bin number

U velocity (magnetic east) millimeters/second

V velocity (magnetic north) millimeters/second

W velocity (vertical) millimeters/second

error velocity millimeters/second

velocity direction degrees true

velocity speed millimeters/second

echo amplitude beam #1 relative dB

echo amplitude beam #2 relative dB
30

echo amplitude beam #3 relative dB

standard deviation for beam #1 millimeters/second

standard deviation for beam #2 millimeters/second

standard deviation for beam #3 millimeters/second

water temperature degrees C*100

bindqa bin related DQA bit mask

METEOROLOGICAL DATA

Meteorological data files contain the following measurements.

time-stamp GMT

wind speed meters/second *10

wind direction degrees true

wind gusts meters/second *10

barometric pressure millibars*10

air temperature degrees C*100