GEMPAK Manual | Programs

SNDIAG performs specialized computations on a sounding or set
of soundings. The program creates a new output sounding file,
in height coordinates, if one does not exist.


INPUT PARAMETERS

	SNFILE	 *Sounding data file
	SNOUTF	 *Output sounding file
	AREA	 *Data area
	DATTIM	 *Date/time
	TIMSTN	 *Times/additional stations
	OUTPUT	 *Output device (TPF)
	WAVLEN	 *Wavelength of grav/lee wave
	WAVSPD	 *Wave speed (for SCORER calc)
	SYSTEM	 *Storm speed/direction
	ROTATE	 *Coordinate rotation
	TROPHT	 *Tropopause height
	TRPINT	 *Dist above trop for avg
	CBTOP 	 *Cloud top height
	MXDPTH	 *Mixed layer depth
	SQUALL	 *Length of squall line for fluxes
	DELZ	 *Average delta Z in sounding
	FILTYP	 *Filter type
	SPLINE	 *Spline flag
 

PROGRAM DESCRIPTION
 
    SNDIAG performs specialized computations on a sounding or set
    of soundings. The program creates a new output sounding file,
    in height coordinates, if one does not exist.

    The input sounding file is specified in SNFILE and the output
    file in SNOUTF. The soundings to be used for the calculations
    are given in AREA. TIMSTN is used for creating a new output
    file. OUTPUT specifies the output destination to be the 
    Terminal, a File, the Printer or None.

    The vertical spacing for the output sounding file is specified
    in DELZ. The user input for DELZ will be displayed versus the
    computed height differences and the user will be given an
    opportunity to exit at this point to adjust any input.

    Some of the output from SNDIAG is data at all levels of the
    interpolated sounding. This output will be located in the output
    sounding file. All GEMPAK Sounding programs can then access this
    file to produce plots, listings, etc. The parameters which can
    be found in the output sounding file are listed below.

    The other output generated by the program will be sent to either
    the terminal or to a file as specified in the parameter OUTPUT.
    The types of data produced in this manner are listed below.


    The unique input for this program includes:

	WAVLEN : the wavelength for the gravity or lee wave in
		 meters. If no wavelength is required, use 99999.
		 This is used for calculating the SCORER parameter. 

	WAVSPD : the wave speed in m/s. This is used for
		 calculating the SCORER parameter.

	SYSTEM : the system (storm) speed (m/s) and direction
		 separated by a "/". These are used to compute
		 the winds relative to the system.

	ROTATE : the angle of rotation for the coordinate axes.
		 This is used to determine the wind component in a
		 user definded plane. Default means no rotation.

	TROPHT : the user estimated tropopause height in meters.
		 The default value is 10000 m.

	TRPINT : the user chosen distance above (and below) the
		 tropopause for layer calculations. The default
		 value is 1000 m.

	CBTOP  : the user estimated cloud top height in meters.
		 The default value is 8000 m. For "convective (CB)"
		 only.

	MXDPTH : the user estimated surface mixed layer depth
		 in meters. The default value is 0 m, this uses
		 surface values as the average for the mixed layer.

	SQUALL : the width of the squall line used for the air
		 and moisture flux calculations. The default
		 value is 20000 m. The coordinate rotation is
		 implied in the calculation of the fluxes, since
		 only the V component of the wind is used in the
		 equations. Therefore, ROTATE should be set such
		 that the long axis of the sqall line is along 
		 X-axis.

	DELZ   : the user chosen average height difference between
		 pressure levels to be used in the vertical
		 interpolation. The default value is 500 m.

	FILTYP : the filter type (NONE, LIGHT, HEAVY). NONE does not
		 apply a filter the the data. LIGHT applies a 
		 meso-pass filter. HEAVY applies a macro-pass filter.
		 All filtering is done to the winds and virtual
		 potential temperature only.

	SPLINE : logical for using splines to interpolate the data
		 to height levels (YES, NO). If NO is selected for
		 SPLINE, linear interpolation (in log pressure)
		 is used.

    For all parameters, if no input is given, the default values
    shown are used. This is because the program will not function
    properly without certain key information.

    The output from certain calculations in SNDIAG is written to
    either the terminal or to a file (see OUTPUT), and consists of:

	Mixed Layer Average Values
	    This includes average values for Pressure, Temperature,
	    Dewpoint, Potential Temperature and Mixing Ratio for 
	    the lowest part of the sounding specified in MXDPTH.

	LCL for the Mixed Layer
	    This is the Height, Pressure, Temperature and Wet-bulb
	    Potential Temperature for the LCL.

	Tropopause Mean Wind and Lapse Rate
	    The output for this section is obtained from the user
	    input for TROPHT and TRPINT. The TROPHT is the
	    estimated tropopause height in meters, and TRPINT is
	    the height interval in which to calculate the average
	    wind and lapse rate about the tropopause.
	    (e.g., If TROPHT=10000 and TRPINT=1000, the region
	    BELOW is from 9000-10000 and region ABOVE is from
	    10000-11000.)

	Layer Shears
	    This section shows the shear for 2000 m layers 
	    beginning at 1000 m.

	Wind Vectors and Shear Vectors
	    This shows the wind and shear vectors for four specific
	    layers. 1) Surface to the LCL (Cloud Base). 2) LCL to
	    Cloud Top. 3) Surface to 6000 m. 4) Surface to the
	    Tropopause.

	Inversions and the Minimum Temperature
	    The program calculates the location of any inversions
	    found in the sounding. It also displays the location
	    of the minimum temperature of the sounding, as an
	    estimate for the tropopause.

	Lid Strength Index
	    Output related to the Lid Strength Index. This section
	    of the program calculates the RH break and Elevated 
	    Mixed Layer for the sounding. Then the Lid Strength
	    Index is computed.

    Output paramters from SNDIAG to the output sounding file are:

	HGHT	Height (the vertical coordinate)
	PRES	Pressure
	TEMP	Temperature in Celsius
	DWPT	Dewpoint temperature in Celsius
	UWND	U-component of the relative wind
	VWND	V-component of the relative wind
	THTV	Virtual potential temperature
	BVIN	Brunt-Vaisala freq / Intrinsic freq
	BVFQ	Brunt-Vaisala frequency
	RICH	Richardson number
	SCOR	Scorer parameter
	SCR1	Term 1 of the Scorer parameter
	SCR2	Term 2 of the Scorer parameter
	UCVR	Wind curvature of the U-component
	DUDZ	U-component of the shear
	DVDZ	V-component of the shear
	FLXA	Air flux across a squall line
	FLXM	Moisture flux across a squall line
	HELC	Helicity
	UABS	U-component of the non-rotated wind
	VABS	V-component of the non-rotated wind
	SHRD	Shear direction of the non-rotated wind
	SHRM	Shear magnitude of the non-rotated wind
	RRCH	Relative richardson number
	LATI	Balloon latitude (Needs RANG and AZIM in input file)
	LONI	Balloon longitude (Needs RANG and AZIM in input file)


EXAMPLES
 
    1.  Create the file DEN.SND from COLORADO.SND. Do the
	calculations for DEN for all times in the input file.
	Send the output to a file named SNDIAG.FIL. For the 
	computations the following are used: a wavelength of
	5000 m; a wave speed and system (storm) speed of 0 m/s;
	NO coordinate rotation (270); a trop height of 10000 m 
	and an interval of 2000 m for the layers; the cloud
	top height is at 10000 m; mixed layer depth of 2100 m;
	a squall line width of 20000 m; an average delta Z of
	125 m; a HEAVY filter is used for the data; and the
	data is interpolated using splines.

	SNFILE   = colorado.snd
	SNOUTF   = den.snd
	AREA     = @den
	DATTIM   = all
	TIMSTN   = 5/1000
	OUTPUT   = F
	WAVLEN   = 5000
	WAVSPD   = 0
	SYSTEM   = 0/0
	ROTATE   = 270
	TROPHT   = 10000
	TRPINT   = 2000
	CBTOP    = 10000
	MXDPTH   = 2100
	SQUALL   = 20000
	DELZ     = 125
	FILTYP   = heavy
	SPLINE   = yes


ERROR MESSAGES
 
    [sndiag  -1]    Fatal error initializing TAE.
    [sndiag  -2]    Fatal error reading TAE parameters.
    [sndiag  -3]    Output file cannot be unmerged type.
    [sndiag  -4]    A new file cannot be created with no times.
    [sndiag  -5]    A new file cannot be created with no stations.
    [sndiag  -6]    Parameter ... cannot be computed.
    [sndiag  -7]    Parm ... is character; cannot be added to the file.
    [sndiag  -8]    Output vertical coordinate ... cannot be used.
    [sndiag  -9]    No valid parameters were specified.
    [sndiag -10]    Time ... cannot be added to the output file.
    [sndiag -11]    Station ... cannot be added to output file.
    [sndiag -12]    Parms do not match those in output data set.
    [sndiag -13]    Output file name is blank.