PMS-2D Data Formats

The PMS2D raw data comes in 4 kilo-byte records of 32 bit slices from the probe (1024 slices). The interface card then wraps a record header around that with time stamp and other pertinant information. The Logical records are then packed 7 at a time into a "physical" record (orginally done to maximize tape speed and/or storage), this packing is not required.

The data is stored in big-endian format, so all data will need to be swapped when used on Intel architecture (Linux or MS Windows).


PMS-2D "Logical" Record Format

/* Possible values for the 'id' field. */
#define PMS2D_C1         0x4331		// First 2DC
#define PMS2D_C2         0x4332		// Second 2DC
#define PMS2D_G1         0x4731		// First 2D Greyscale
#define PMS2D_G2         0x4732		// Second 2D Greyscale
#define PMS2D_H1         0x4831		// First HVPS
#define PMS2D_H2         0x4832		// Second HVPS
#define PMS2D_P1         0x5031		// First 2DP
#define PMS2D_P2         0x5032		// Second 2DP

struct P2d_rec {
  short id;                             /* 'P1','C1','P2','C2', H1, H2 */
  short hour;
  short minute;
  short second;
  short spare1;
  short spare2;
  short spare3;
  short tas;                            /* true air speed	*/
  short msec;                           /* msec of this record	*/
  short overld;                         /* overload time, msec	*/
  unsigned char data[4096];		/* image buffer		*/
  };
typedef struct P2d_rec P2d_rec;
id
The id word tells whether it is a 2d-C, 2d-P or an HVPS. The 1 or 2 signifies first or second probe. Hex values are 'C1' = 0x4331, 'P1' = 0x5031 etc.

Time stamp
The hour, minute, second, and msec belong to the LAST slice of the record. This time stamp is stamped the moment the VME interface card is interrupted by the probe when a record is ready for downloading.

True Air Speed
The true air speed (tas) is packed in the same format as shipped to the probe. Unpacking is tas_float = rec.tas * 125 / 255.

Overload
The overld value is the amount of time in milliseconds the probe was shut off while the interface card was unloading data. The overld value belongs to the NEXT logical data record (at least for the VME card used since May 1997, SHEBA).

Typical values when in heavy cloud should be on the order of 37 milliseconds for 1 probe attached to the VME interface card and 50-60 milliseconds if 2 probes are attached. The probe can typically fill the buffer in as fast as 3 milliseconds.


PMS-2D Raw Data Format

Data are recorded in 32 bit slices, which are inverted (data are 0's and blanks are 1's). Starts with a "sync" word, 0xff000000, followed by N prticle slices, followed by 3 blank slices, followed by a "timing" word.
Sync-word
The manual defines the sync word as 0x55000000, however, in an attempt to move to a 32 bit timing word the sync word changed to 0xff000000. RAF probes also produce 3 blank slices, compared to 1 as defined in the manual. As of DYCOMS-II (mid-2001), RAF has put the sync word back to 0x55000000.

Timing slice
The timing slice is the number of true air speed clock pulses which have elapsed since the last blank slice was recorded.
From a PMS-2D manual:
Bit
 0	0111111111111111111111101
 1	1111111111111111111111111
 2	0111111111111111111111101
 3	1111111111111111111111111
 4	0111111111111111111111101
 5	1111111111111111111111111
 6	0111111111111111111111101
 7	1111111111111111111111111
 8	0011111111101111111111100
 9	0011111111000111111111100
10	0011111110000011111111100
11	0011111100000001111111100
12	0011111000000000111111100
13	0011110000000000011111100
14	1011100000000000001111100
15	1011000000000000000111110
16	0010000000000000000011100
17	0000000000000000000001100
18	1000000000000000000000110
19	0010000000000000000000110
20	0011000000000000000001100
21	0011100000000000000011110
22	1011110000000000000111100
23	1011111000000000001111110
24	0011111100000000011111100
25	0011111110000000111111100
26	0011111111000001111111110
27	1011111111100011111111110
28	0011111111110111111111100
29	1011111111111111111111110
30	0011111111111111111111100
31	1011111111111111111111100
	 ^                    ^^^
	 |                    ||| Sync word
	 | Sync word.         ||
                              || Timing word.
                              |
                              | All '1's, end of particle.


A code snippet I use for locating the beggining of a particle:
  if (slice == 0x55000000 && ppSlice == 0xffffffff && pSlice != 0xffffffff)
     StartOfParticle();
where slice is the current slice, pSlice is the previous slice, and ppSlice is 2 slices previous.

PMS-2D Processed Data Format

The nimbus processor can produce 1D histograms from the 2D-C and 2D-P probe data. These are in the standard PMS-1D format as described in the NCAR-RAF netCDF conventions.