WhatIsI4 $SSW_SMEI_UCSD/gen/for/lib/what/whatisi4.f
[Previous] [Next]
 NAME:
	WhatIsI4
 PURPOSE:
	Write information about integer*4 array
 CALLING SEQUENCE:
	subroutine WhatIsI4(N,A,cStr)
 INPUTS:
	N		integer		# elements in array A
	A(N)		integer		array
	cStr*(*)	character*(*)	message
 OUTPUTS:
	(to screen)
 CALLS: ***
	ArrI4GetMinMax, BadI4, iArrI4ValuePresent, itrim
 MODIFICATION HISTORY:
	AUG-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


WhatIsI8 $SSW_SMEI_UCSD/gen/for/lib/what/whatisi8.f
[Previous] [Next]
 NAME:
	WhatIsI8
 PURPOSE:
	Write information about integer*8 array
 CALLING SEQUENCE:
	subroutine WhatIsI8(N,A,cStr)
 INPUTS:
	N		integer		# elements in array A
	A(N)		integer*8	array
	cStr*(*)	character*(*)	message
 OUTPUTS:
	(to screen)
 CALLS: ***
	ArrI8GetMinMax, BadI8, iArrI8ValuePresent, itrim
 MODIFICATION HISTORY:
	JAN-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


WhatIsR4 $SSW_SMEI_UCSD/gen/for/lib/what/whatisr4.f
[Previous] [Next]
 NAME:
	WhatIsR4
 PURPOSE:
	Write information about real*4 array
 CALLING SEQUENCE:
	subroutine WhatIsR4(N,A,cStr)
 INPUTS:
	N		integer		# elements in array A
	A(N)		real		array
	cStr*(*)	character*(*)	message
 OUTPUTS:
	(to screen)
 CALLS: ***
	ArrR4GetMinMax, BadR4, iArrR4ValuePresent, itrim
 CALLED BY:
	smei_cal
 MODIFICATION HISTORY:
	AUG-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


WR2DARR $SSW_SMEI_UCSD/gen/for/lib/io/wr2darr.f
[Previous] [Next]
 NAME:
	WR2DARR
 PURPOSE:
	Write 2D array to file
 CALLING SEQUENCE:
	subroutine WR2DARR(ID,nX,nY,Z,cFile,cFrmt,bMirror,iStr,cStr)
 INPUTS:
	ID		integer		1: write to new file
					0: append to existing file
					(adding 2 suppresses messages to screen)
	nX		integer		size of first dimension
	nY		integer		size of second dimension
	Z(nX,nY)	real		array to be written to file
	cFile		character*(*)	name of output file
	cFmt		character	format to be used for output
	bMirror		logical		(see PROCEDURE)
	iStr		integer		# comment strings
	cStr(iStr)*(*)	character*(*)	comments strings (see PROCEDURE)
 OUTPUTS:
	Z(nX,nY)	real		the input array will be modified if
					values are present that do not fit the
					input format: these will be set to BadR4()

	Output file cFile is created
 INCLUDE:
	include		'filparts.h'
	include		'dirspec [1].h'
	include		'dirspec [2].h'
	include		'dirspec [3].h'
	include		'dirspec [4].h'
	include		'openfile.h'
 CALLS: ***
	ArrR4GetMinMax, ArrR4Mask, BadI4, BadR4, LocFirst, LocFirstLen, Say, Str2Flt, bOpenFile
	cFlt2Str, cTime2System, iArrR4ValuePresent, iFreeLun, itrim, uppercase
 RESTRICTIONS:
 >	!!!! Numbers in the input array that do not fit the format
	!!!!		 WILL BE SET TO BadR4()
 >	iStr must be >= 1
 PROCEDURE:
 >	The array is checked for values BadI4() (I format) or BadR4() (E,F format).
	For I format 'bad' elements are replaced by the biggest negative integer
	that fits the format, with the restriction that the number is not smaller
	than BadI4() (=the biggest negative 32-bit integer).
	For F format 'bad' elements are replaced by the bigges negative real*4 number
	that fits the format, with the restriction that there are no more than 7 leading
	digits of 9 (it the format contains more digits these are set to zero).
 >	If bMirror = .FALSE. then Z will be output row after row (I=1,NX).
	If bMirror = .TRUE.  then Z will be output column after column (I=1,NY).
 >	If the format specifier is an integer format, the floating point array
	Z will be output using the NINT function.
 >	If the format specifier cFmt does not contain a repeat counter than
	nX is used (or nY if bMirror=.TRUE.). If a repeat counter
	is used, it should be <= than nX (or nY).
 >	If a repeat counter N is used each row (or column) will be split over
	multiple records with N numbers per record. The last record output for
	a row (or column) will contain less numbers than N if N is not a
	factor of nX (or nY).
 >	The iStr comment strings are written to the beginning of the file
	with a semi-colon (;) prepended. Empty strings (itrim()=0) are skipped.
 >	A new file (ID > 0) will be started with one or two comment strings (preceded
	by a semi-colon). The first contains the file name retured by bOpenFile (this
	should be a fully-qualified file name) and the time and date when the file
	was created. The second line contains the value used to replace BadR4() values
	in the output file. This line looks like e.g.
		; Bad value flag: -9999.99
 >	The output file is created as a sequential acces, formatted file.
 MODIFICATION HISTORY:
	DEC-1995, Paul Hick (UCSD/CASS)
	???-2000, Paul Hick (UCSD/CASS)
		added option to suppress messages to screen by adding 2 to ID.
	SEP-2001, Paul Hick (UCSD/CASS)
		added output of more extensive message to screen when values in the input
		array do not fit the specified format. This message is never suppressed.
		Also modified the declaration of string cStr from cStr(iStr)*(*) to
		cStr(*)*(*), removing the restriction iStr >=1.
	MAY-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Fixed minor bug: the test for values that do not fit the output format
		cFmt, sometimes generated a unnecessary warning message.


WriteI4GRD $SSW_SMEI_UCSD/gen/for/lib/gen/writei4grd.f
[Previous] [Next]
 NAME:
	WriteI4GRD
 PURPOSE:
	Write integer*4 array as .grd file
 CATEGORY:
	ucsd/camera/for/lib
 CALLING SEQUENCE:
	subroutine WriteI4GRD(iType,iAct0,cFile,nX,nY,A,BadA,N11,N12,N21,N22,N31,N32,cFmt)
 INPUTS:
	iType		integer
	iAct0		integer		open qualifier passed to bOpenFile.
					This is added to OPN__TEXT+OPN__UNKNOWN+OPN__TRYINPUT+OPN__ONEPASS.
					The only useful additional qualifier is OPN__NOMESSAGE to
					suppress messages. 
	cFile		character*(*)	fully-qualified file name to be written
	nX		integer		horizontal size of array (first dimension)
	nY		integer		vertical size of array (second dimension)
	A(nX,nY)	integer		array to be written to file
	BadA		integer		BadI4() values in the input array are replaced by this value
					before writing to file.
	N11(2)		integer
	N12(2)		integer
	N21(2)		integer
	N22(2)		integer
	N31(2)		integer
	N32(2)		integer
	cFmt		character*(*)	either a valid format string, incl.
					opening and closing bracket, or a
					format for a single number without
					brackets.
 OUTPUTS:
	A(nX,nY)	integer		only if BadA not equal BadI4().
					BadI4() values have been replaced by BadA
 CALLED BY:
	smei_cal
 INCLUDE:
	include		'openfile.h'
 CALLS: ***
	BadI4, Int2Str, Str2Str, bOpenFile, iFreeLun, itrim
 PROCEDURE:
 MODIFICATION HISTORY:
	JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


WriteR4GRD $SSW_SMEI_UCSD/gen/for/lib/gen/writer4grd.f
[Previous] [Next]
 NAME:
	WriteR4GRD
 PURPOSE:
	Write real*4 array as .grd file
 CATEGORY:
	ucsd/camera/for/lib
 CALLING SEQUENCE:
	subroutine WriteR4GRD(iType,iAct0,cFile,nX,nY,A,BadA,N11,N12,N21,N22,N31,N32,cFmt)
 INPUTS:
	iType		integer
	iAct0		integer		open qualifier passed to bOpenFile.
					This is added to OPN__TEXT+OPN__UNKNOWN+OPN__TRYINPUT+OPN__ONEPASS.
					The only useful additional qualifier is OPN__NOMESSAGE to
					suppress messages. 
	cFile		character*(*)	fully-qualified file name to be written
	nX		integer		horizontal size of array (first dimension)
	nY		integer		vertical size of array (second dimension)
	A(nX,nY)	real		array to be written to file
	BadA		real		BadI4() values in the input array are replaced by this value
					before writing to file.
	N11(2)		integer
	N12(2)		integer
	N21(2)		integer
	N22(2)		integer
	N31(2)		integer
	N32(2)		integer
	cFmt		character*(*)	either a valid format string, incl.
					opening and closing bracket, or a
					format for a single number without
					brackets.
 OUTPUTS:
	A(nX,nY)	integer		only if BadA not equal BadI4().
					BadI4() values have been replaced by BadA
 CALLED BY:
	smei_cal_write
 INCLUDE:
	include		'openfile.h'
 CALLS: ***
	BadR4, Int2Str, Str2Str, bOpenFile, iFreeLun, itrim
 PROCEDURE:
 MODIFICATION HISTORY:
	JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)