3.  File Structure and Naming Conventions

3.1  Introduction  
 
Before running GAMIT it is necessary to understand its file naming conventions.  All the program modules adhere to specific conventions for the naming of files for a particular experiment.  This assures a unique definition of each experiment, facilitates data file management, and allows for ease of interactive processing and troubleshooting.  There are four types of files:
1) site-occupation-specific 
2) solution-specific 
3) experiment-specific
4) global  
Each file is distinguished either by its first character (types 1 and 2) or a unique name (type 3).  Type 1 files are named using 4-character station codes and the day of the observations.  Type 2 and 3 files have an experiment or solution name, chosen by the analyst, embedded within the file name.  Type 4 files have specific names that are hard-wired in the software (though these names are often elaborated using links).  These naming conventions allow the software to perform the bookkeeping necessary to process large quantities of data.  

The remaining sections of this chapter describe the contents and format of the files of each type, and how the file is created and used by the software.  A summary of all the file names is also given in Appendix 1, and templates for user-created files may be found in the gamit/example directory that accompanies the software distribution.  Although file names will sometimes be shown in upper-case for clarity, lower-case is the preferred standard for UNIX operating systems.

3.2  Site-occupation-specific Files 

X-file :		Observation data file containing the L1 and L2 carrier beat phases and pseudo-ranges, signal amplitudes, initial station coordinates and antenna offsets, start and stop times, and the identification of the satellites tracked in each receiver channel. 
	Format 	:	xsitey.day
	Example	:	xvndn7.002.  This X-file has been created by program MAKEX from the data recorded at station VNDN (Vandenberg) on day 2 of 1987.
	Notes 	:	X-file names correspond directly to four-letter station codes used in the L- and throughout the software.  The X-file names that appear in the D-file (see below) define all  subsequent site-specific names.    
	Type 	:	ASCII
	Created by	:	MAKEX, utilities CTOX, XTOX, XUP
	Input to 	:	MODEL, and optionally MAKEK, BCTOT, FIXDRV, and CVIEW

C-file	:	Primary file for data analysis, created by MODEL from an X-file and used as input to AUTCLN, SINCLN, DBLCLN, CVIEW, and SOLVE; contains observations (O's), prefit residuals (O-C's, observed-computed values), partial derivatives, and auxiliary information.

	Format 	:	csitey.day
	Example	:	cvndn7.002 
	Notes	: 	Direct correspondence to X-files but binary and with partials.  Once the data on the C-files have been cleaned, program CTOX is run to make clean X-files for further processing. 
	Type 	:	Binary
	Output of	:	MODEL, AUTCLN, SINCLN, DBLCLN, CVIEW 
	Input to 	:	AUTCLN, SINCLN, DBLCLN, SCAN, CVIEW,  SOLVE 

E-file	:	Broadcast Ephemeris data in either RINEX or FICA format.  It is used by BCTOT to create an initial G-file and/or a T-file from the broadcast ephemeris parameters, and by MAKEJ and MAKEK to generate satellite and receiver clock files.

	Format 	:	esitey.day
	Example	:	evndn7.002 
	Notes	: 	The parameters and format of the E-file are described in Appendix 4.
	Type 	:	ASCII
	Output of	:	RINEX translators or utility FICACHOP 
	Input to 	:	BCTOT, MAKEJ, MAKEK

K-file	:	Receiver clock data computed by MAKEX or MAKEK using nominal site coordinates, broadcast ephemeris, and pseudo-range.  It is used by FIXDRV to estimate the coefficients of a linear or cubic polynomial model for clock behavior during the session.

	Format 	:	ksitey.day
	Example	:	kvndn7.002 
	Notes	: 	The parameters and format of the station-specific K-file are described in 4.9.   For receivers which do not record the broadcast ephemeris, there is a session - specific K-file of different format; this file is described in Section 9.4.
	Type 	:	ASCII
	Output of	:	MAKEX, MAKEK
	Input to 	:	FIXDRV and utilities CALCK and PLOTK. 

P-file	: 	<P>rint file for a MODEL run - provides a record of the run. 

	Format	:	psitey.day
	Example	:	pvndn7.002
	Notes	:	Direct correspondence to X- and C-files
	Type	:	ASCII 
	Output of	:	MODEL

V-file 	: 	Print file for a SINCLN run - contains a record of the editing performed.
	Format	:	vsitey.day
	Example	:	vvndn7.002
	Notes	:	Direct correspondence to C-file
	Type	:	ASCII 
	Output of	:	MODEL

W-file 	: 	<W>eather file - contains meteorological data for modeling the effect of tropospheric refraction on  the satellite signals.

	Format 	:	wsitey.day
	Example	:	wvndn7.002 
	Notes 	:	This file is optional and is described in Section 9.5.  If not available, default meteorological data are used. 
	Created by :	User
	Input to	:	MODEL 

Z-file	:	Water Vapor Radiometer (WVR) file - contains WVR data for modeling the effects of wet tropospheric delay on the satellite signals. 

	Format 	:	zsitey.day
	Example	:	zvndn7.002 
	Notes	:	This file is optional and is described in  Section 9.5.
	Created by :	User
	Input to	:	FIXDRV, MODEL

3.3  Solution-specific Files 

These files are specific to a particular experiment and should be unique with regards to all other experiments in order to facilitate efficient data management. 

D-file 	:	FIXDRV file - defines the number of sessions in each experiment, the number of receivers per session, the coordinate (L-) file, the ephemeris (T-), station-clock (I-), satellite-clock (J-), and data files (X- or C-) per session, and the order in which the sessions should be processed.

	Format	:	dxxxxy.day  where xxxx is the solution name.  The rest of the filename is arbitrary but FIXDRV looks at the sixth character to set up the default value of the year.  The three characters of the extent may be the beginning day of the experiment, but this is not necessary.
	Example	:	dcalf7.002
	Notes	: 	The D-file is the primary input file to FIXDRV.  As such, its name defines all subsequent experiment-specific files.  The user can identify the experiment name in any manner.  Prior to executing FIXDRV, the user creates the D-file, using program MAKEXP or manually.  See Section 5.2.
	Type 	:	ASCII
	Created by :	MAKEXP or user
	Input to	:	FIXDRV

Session Control Table :  Input control file for FIXDRV, specifying the type of analysis and the  a priori measurement errors and satellite constraints.  See Section 5.2. 

	Format	:	sestbl.
	Notes:	:	The file name is hard-wired, but links may be used to define different versions of the table.
	Type	:	ASCII
	Created by :	User from template
	Input to	:	FIXDRV

Site Control Table :  Input control file for FIXDRV, specifying for each site the clock and atmospheric model to be used, and the a priori coordinate constraints.  See Section 5.2

	Format	:	sittbl.
	Notes:	:	The file name is hard-wired, but links may be used to define different versions of the table.
	Type	:	ASCII
	Created by :	User from template
	Input to	:	FIXDRV

A-file	:	ASCII version of the T-file, optionally generated for scrutiny by the analysis or for export. 
	Format 	:	axxxxy.day 
	Type	:	ASCII
	Output of	:	TTOASC 
	Input to 	:	None

B-file	: 	Primary <B>atch file - controls the batch (automatic) mode of data processing.

	Format 	:	bxxxxx.bat where xxxxx are the first five characters of the D-file name.
	Example	:	bcalf7.bat 
	Notes	:	The primary B-file contains a sequence of secondary B-files which execute in an order prescribed by FIXDRV the individual modules of the software. Its name corresponds to that of the D-file.
	Type	:	ASCII
	Output of	:	FIXDRV

B-file	:	Secondary <B>atch file - controls the execution of one program module.

	Format 	:	bxxxxx.nnn where xxxxx are the first five characters of the D-file name and nnn is the sequence number of the batch file.
	Examples	:	bcalf7.001, bcalf7.015 
	Notes	:	Each secondary batch files contains the input stream for one execution of a program module.  For example, the first line of bcalf7.bat might be  arc  < bcalf7.001. That  is, the program module ARC will receive its instructions from bcalf7.001.
	Type 	:	ASCII
	Output of	:	FIXDRV 
	Input to	 :	ARC, MODEL, CFMRG, SOLVE, DBLCLN

I-file	: 	<I>ite file - contains a site by site, session by session record of the station clock offset, rate, and acceleration, used optionally by MODEL.

	Format 	:	ixxxxx.xxx
	Example	:	icalf7.002
	Notes 	: 	The I-file name is specified in the D-file.
	Type 	:	ASCII
	Output of	:	MAKEI, FIXDRV, SOLVE
	Input to	:	MODEL, SOLVE 

J-file	:	Satellite clock parameters transmitted by the satellites and recorded by the receivers.

	Format 	:	jxxxxy.day 
	Example	:	jcalf7.002
	Notes	: 	This file is used by MODEL to compute the receiver clock corrections epoch-by-epoch, and also to correct the modeled phase for large satellite clock drifts (e.g., under SA conditions) when observations are not recorded simultaneously at all sites.
	Type 	:	ASCII
	Created by :	MAKEJ
	Input to 	:	MODEL

G-file	: 	A file of orbital initial conditions for all satellites on the T-file.
	Format 	:	gxxxxy.day
	Example	:	gcalf7.002
	Notes	:	The G-file contains initial conditions and nongravitational force parameters for each GPS satellite at a particular UTC epoch.   The G-file initial conditions serve as starting points for a numerical integration of the satellite orbits and the generation of a T-file.  The name of the G-file is arbitrary but would normally include the day and year of the initial conditions as in the example above (day 002, 1987); in any case it should match the name of the corresponding T-file.  The filename of the G-file created by SOLVE is the same except that the 6th character is incremented by one letter.  The format of the G-file is described in Section 4.10
	Type	:	ASCII
	Output of	:	BCTOT, TTOG, SOLVE
	Input to 	:	ARC, SOLVE

H-file	:	Covariance matrix and parameter adjustments for solution generated with loose constraints, used as input to GLOBK.
	Format	:	hxxxxy.day
	Example	:	hcalf7.002
	Type	:	ASCII
	Output of	:	SOLVE
	Input to	:	HTOH, HTOGLB, HTOSNX

M-file 	: 	<M>erge file - sets up the data and parameters for the least-squares analysis in SOLVE.

	Format 	:	mxxxx1.day, mxxxxa.day 
	Example	:	mcalf1.002, mcalfa.002
	Notes 	:	The M-file name is derived from the D-file name.  The initial M-file is created by CFMRG (using a FIXDRV-written batch file) to set up the initial SOLVE, SINCLN, DBLCLN, or CVIEW run.  After estimating adjustments to the parameters, SOLVE writes a new M-file with the same name and with the adjustments included.  In the usual processing sequence generated by FIXDRV, the 6th character of the M-file name for the "quick" solution  is "1", and for standard solutions "a".  If there are multiple solutions of a given type, the M-file is overwritten (re-created by CFMRG) each time.
	Type	:	Binary
	Output of	:	CFMRG 
	Input  to	:	SOLVE, SINCLN, DBLCLN, SCAN, CVIEW 

O-file 	:	Solution output file for a SOLVE run, an abbreviated form of the Q-file used for plotting, statistics, and input to GPSNET.
	Format 	:	oxxxx1.day  oxxxxa.day 
	Example	:	ocalf1.002, ocalfa.002 
	Notes	:	This file is designed to be interfaced with a network adjustment program or the BSL series of programs to calculate statistics.  Its use is optional but strongly recommended for detecting blunders.  The name of the O-file  corresponds directly to the Q-file from which it was copied. 
	Type	:	ASCII
	Output of	:	SOLVE 
	Input  to	:	Network-adjustment, statistics, and plotting programs

Q-file 	:	Print file for a SOLVE run - contains a record of the analysis. 
	Format 	:	qxxxx1.day, qxxxxa.day
	Example	:	qcalf1.002, qcalfa.002
	Notes	:	The Q-file naming conventions are identical  to those of the M-files.  For a batch run, the file qcalf1.002 in our example will be created by the "quick" solution of SOLVE (see Chapter 5), qcalfa.002 by the "regular" solution.  As for M-files, multiple passes through SOLVE (to iterate parameter estimates or editing) will cause the Q-files from the previous iteration to be overwritten. 	 
	Type	:	ASCII
	Output of	:	SOLVE 

T-file	:	<T>abular ephemeris file for all satellites in a session or series of sessions - contains satellite state vectors at equally-spaced intervals (default 15 minutes for ARC)  for later interpolation in MODEL.  The name should match that of the G-file.
	Format 	:	txxxxy.day
	Example	:	tcalf7.002, this T-file is associated with a G-file with initial conditions on day 002  of 1987  
	Type	:	Binary 
	Output of	:	ARC, BCTOT, NGSTOT, sh_bctot, sh_sp3fit
	Input to 	:	FIXDRV, MODEL, TTONGS, TTOASC

V-file (1)	: 	Print file for DBLCLN - contains a record of the editing performed.
	Format 	:	vdblcln.out
	Type	:	ASCII

V-file (2)	: 	Print file for SCANM (one of two files for SCANRMS -contains a summary of rms values and jumps for each double-difference combination.
	Format 	:	vxxxx1.day.sort, vxxxxa.day.sort, vxxxx1.day.worst, vxxxxa.day.worst
	Type	:	ASCII

Y-file	:	<Y>aw file giving times of eclipses and yaw rates for each satellite observed during the session, written by ARC from information in the global file svnav.dat and computed eclipse information.  See example and discussion in Section 7.2.
	Format 	:	yxxxxy.day
	Example	:	ypgga5.267
	Type	:	ASCII 
	Output of	:	ARC 
	Input to 	:	 MODEL

3.4   Experiment-specific Files  

These files contain information collected for a particular experiment, such as antenna heights and time-dependent site coordinates.

Session information or scenario file :  Satellites and times to be processed (Section 4.5).
	Format	:	session.info	(formerly makex.sceno)
	Type	:	ASCII
	Created by :	User or MAKEXP
	Input to	:	MAKEX, FIXDRV

Station information file :	Receiver, antenna, and occupation-time information for each session 	(see Section 4.3)
	Format	:	station.info
	Notes	:	Prepared from site logs (replaces files hi.raw and sited., no longer used)
	Type	:	ASCII
	Created by :	User, or HI2STNFO from hi.raw
	Input to	:	MAKEX, FIXDRV, MODEL

L-file 	:	Station coordinate file - contains a list of the best available coordinates of the sites occupied during a particular experiment (see Section 4.2).
	Format	:	lxxxxx.day in the working directory, where xxxx is the solution name from the D-file name.
	Example	:	lsv4x7.002 
	Notes	:	The L-file stores the a priori coordinates for a particular date, determined by reading a file of positions and velocities from, e.g., VLBI, SLR, or a global GPS analysis.  An updated L-file is written by SOLVE.
	Type	:	ASCII
	Created by :	User, GLBTOL, SVTOL, SOLVE
	Input to	:	MAKEX, MAKEK, FIXDRV, MODEL

Site description file :  Antenna phase center offsets to be applied to the site coordinates.  (Supplanted by station.info but still usable if the latter does not exist.) 
	Format	:	sited. in the working directory; in general, expmt.makex.sited.
	Example	:	trex18.makex.sited
	Type	:	ASCII
	Created by :	HI
	Input to	:	MAKEX, FIXDRV, MODEL

3.5  Global Files  

These files are global in the sense that they can be used for many experiments over the time interval for which they are valid (usually for at least a year).  The name of the files must be exactly specified as indicated below.  There must be a copy of these files (or a link of the same name) in each working directory.

gdetic.dat:	Table of parameters of geodetic datums 

	Format	:	gdetic.dat
	Notes	:	The format of this file is described in Section 9.8.  It can be augmented at any time to include additional datums.
	Type	:	ASCII
	Created by :	User
	Input to	:	FIXDRV, MODEL, SOLVE

svnav.dat	:	Table giving NAVSTAR numbers, block number (I or II), spacecraft mass, and yaw parameters for each  GPS satellite (listed by PRN number)
	Format	:	svnav.dat
	Notes	:	See Section 9.8
	Type	:	ASCII
	Created by :	User
	Input to	:	MAKEX, ARC, MODEL

antmod.dat	:	Table of antenna phase center offsets and, optionally, variations as a function of elevation and azimuth.
	Format	:	antmod.dat
	Notes	:	See Section 4.3, 5.2 and Appendix 7
	Type	:	ASCII
	Created by :	MIT
	Input to	:	MODEL

rcvant.dat	:	Table of correspondences between GAMIT 6-character codes and the full (20-character) names of receivers and antennas used in RINEX and SINEX files.
	Format	:	rcvant.dat
	Notes	:	See Section 4.3 and Appendix 7
	Type	:	ASCII
	Created by :	MIT, SIO, or user from IGS standards
	Input to	:	MODEL (eventually XTORX and HTOSNX)

ut1.	:	UT1 table - contains TAI-UT1 values in tabular form.for interpolation in MODEL and  ARC, and BCTOT
	Format 	:	ut1. in the working directory; ut1.iers, e.g., in the tables directory
	Notes	:	Should be updated regularly. See Section 9.8.
	Type	:	ASCII
	Created by  :	SIO, MIT, or user from, e.g., IERS, USNO
	Input to	:	FIXDRV, MODEL, ARC, BCTOT, NGSTOT, TTONGS

pole.  	:	Pole table - contains polar motion values in tabular form for interpolation in MODEL and  ARC, and BCTOT

	Format 	:	pole. in the working directory; pole.iers, e. g., in the tables directory
	Notes 	:	Should be updated regularly. See Section 9.8. 
	Type	:	ASCII
	Created by  :	MIT, SIO, or user from e.g., IERS, USNO
	Input  to	:	FIXDRV, MODEL, ARC, BCTOT, NGSTOT, TTONGS

leap.sec	:	Table of jumps (leap seconds) in TAI-UTC since 1 January 1982.

	Format 	:	leap.sec 
	Notes	:	See Section 9.8.
	Type	:	ASCII
	Created by  :	SIO, MIT, or user from, e.g., IERS, USNO notices.
	Input to	:	FIXDRV, MODEL, ARC, BCTOT, NGSTOT, TTONGS

nutabl.	:	Nutation table - contains nutation parameters in tabular form for interpolation in MODEL,  ARC, and BCTOT

	Format 	:	nutabl. in the working directory;  nutabl.91, e.g., in the tables directory
	Notes	:	See Section 9.8.
	Type	:	ASCII
	Created by  :	MIT
	Input to	:	MODEL, ARC, BCTOT, NGSTOT, TTONGS

luntab.	:	Lunar tabular ephemeris 

	Format	:	luntab. in the working directory; luntab.95.J2000, e. g., in the tables directory
	Notes	:	Inertial reference frame (B1950 or J2000) must batch input controls. Linked by links.com or links.tables.  See Section 9.8.
	Type 	:	ASCII
	Created by :	MIT
	Input  to	:	ARC

soltab. 	:	Solar tabular ephemeris

	Format 	:	soltab.in the working directory; soltabl.95.J2000, e. g., in the tables directory
	Notes	:	Inertial reference frame (B1950 or J2000) must batch input controls. Linked by links.com or links.tables.  See Section 9.7.
See Section 9.7.
	Type 	:	ASCII
	Created by :	MIT
	Input to	:	ARC