SRF_ASCII_IO.F90 Subprograms

Last modified: Fri Sep 3 16:32:04 2004.


List of Subprograms


Subprogram Descriptions

READ_SRF_ASCII_HEADER

[Next Subprogram] [List of Subprograms]
 NAME:
       Read_SRF_ASCII_Header

 PURPOSE:
       Function to read the header information from an ASCII SRF data file.

 CATEGORY:
       Instrument Information: SRF

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Error_Status = Read_SRF_ASCII_Header( Filename,                 &  ! Input
                                             FileID,                   &  ! In/Output
                                             n_Channels,               &  ! Output
                                             Channel_List,             &  ! Output
                                             Title,                    &  ! Output
                                             History,                  &  ! Output
                                             Sensor_Name,              &  ! Output
                                             Platform_Name,            &  ! Output
                                             Comment,                  &  ! Output
                                             Message_Log = Message_Log )  ! Error messaging

 INPUT ARGUMENTS:
       Filename:         Character string specifying the name of the
                         ASCII format SRF data file to read.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       FileID:           ASCII file ID number. If file is not already opened,
                         it is opened and this argument contains the unit
                         number for the opened file upon output.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN OUT )

 OPTIONAL INPUT ARGUMENTS:
       Message_Log:      Character string specifying a filename in which
                         any messages will be logged. If not specified,
                         or if an error occurs opening the log file, the
                         default action is to output messages to standard
                         output.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN ), OPTIONAL

 OUTPUT ARGUMENTS:
       n_Channels:       The number of channels of data in the ASCII SRF file
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

       Channel_List:     The list of channel numbers for which there is data
                         in the ASCII SRF file.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Rank-1, n_Channels or greater
                         ATTRIBUTES: INTENT( OUT )

       Title:            Character string written into the TITLE 
                         attribute field of the ASCII SRF file.
                         Should contain a succinct one-line description
                         of what is in the datafile.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

       History:          Character string written into the HISTORY 
                         attribute field of the ASCII SRF file.
                         Should contain a succinct one-line description
                         of the datafile history.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

       Sensor_Name:      Character string written into the SENSOR_NAME
                         global attribute field of the ASCII SRF
                         file.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

       Platform_Name:    Character string written into the PLATFORM_NAME
                         global attribute field of the ASCII SRF
                         file.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

       Comment:          Character string written into the COMMENT global
                         attribute field of the ASCII SRF file.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

 OPTIONAL OUTPUT ARGUMENTS:
       None.

 FUNCTION RESULT:
       Error_Status:     The return value is an integer defining the error
                         status. The error codes are defined in the
                         ERROR_HANDLER module.
                         If == SUCCESS the header read was successful
                            == FAILURE an error occurred
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar

 CALLS:
       File_Open:          Function to check if a file is open.
                           SOURCE: FILE_UTILITY module

       StrUpCase:          Function to convert an input character string
                           to upper case.
                           SOURCE: STRING_PROCESSING module

       Display_Message:    Subroutine to output messages
                           SOURCE: ERROR_HANDLER module

 CONTAINS:
       None.

 EXTERNALS:
       None.

 COMMON BLOCKS:
       None

 SIDE EFFECTS:
       If an error occurs, the ASCII file is closed before exit.

 RESTRICTIONS:
       None.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 27-Aug-2003
                       paul.vandelst@ssec.wisc.edu

(See SRF_ASCII_IO.f90)


WRITE_SRF_ASCII_HEADER

[Previous Subprogram] [Next Subprogram] [List of Subprograms]
 NAME:
       Write_SRF_ASCII_Header

 PURPOSE:
       Function to write the header information to an ASCII SRF data file.

 CATEGORY:
       Instrument Information: SRF

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Error_Status = Write_SRF_ASCII_Header( Filename,                 &  ! Input
                                              FileID,                   &  ! In/Output
                                              n_Channels,               &  ! Input
                                              Channel_List,             &  ! Input
                                              Title,                    &  ! Input
                                              History,                  &  ! Input
                                              Sensor_Name,              &  ! Input
                                              Platform_Name,            &  ! Input
                                              Comment,                  &  ! Input
                                              Message_Log = Message_Log )  ! Error messaging

 INPUT ARGUMENTS:
       Filename:         Character string specifying the name of the
                         ASCII format SRF data file to read.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       FileID:           ASCII file ID number. If file is not already opened,
                         it is opened and this argument contains the unit
                         number for the opened file upon output.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN OUT )

       n_Channels:       The number of channels of data to be written to
                         the ASCII SRF file
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       Channel_List:     The list of channel numbers to be written to 
                         the ASCII SRF file.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Rank-1, n_Channels or greater
                         ATTRIBUTES: INTENT( IN )

       Title:            Character string written into the TITLE 
                         attribute field of the ASCII SRF file.
                         Should contain a succinct one-line description
                         of what is in the datafile.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       History:          Character string written into the HISTORY 
                         attribute field of the ASCII SRF file.
                         Should contain a succinct one-line description
                         of the datafile history.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       Sensor_Name:      Character string written into the SENSOR_NAME
                         global attribute field of the ASCII SRF
                         file.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       Platform_Name:    Character string written into the PLATFORM_NAME
                         global attribute field of the ASCII SRF
                         file.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       Comment:          Character string written into the COMMENT global
                         attribute field of the ASCII SRF file.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

 OPTIONAL INPUT ARGUMENTS:
       Message_Log:      Character string specifying a filename in which
                         any messages will be logged. If not specified,
                         or if an error occurs opening the log file, the
                         default action is to output messages to standard
                         output.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN ), OPTIONAL

 OUTPUT ARGUMENTS:
       None.

 OPTIONAL OUTPUT ARGUMENTS:
       None.

 FUNCTION RESULT:
       Error_Status:     The return value is an integer defining the error
                         status. The error codes are defined in the
                         ERROR_HANDLER module.
                         If == SUCCESS the header write was successful
                            == FAILURE an error occurred
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar

 CALLS:
       File_Open:          Function to check if a file is open.
                           SOURCE: FILE_UTILITY module

       Display_Message:    Subroutine to output messages
                           SOURCE: ERROR_HANDLER module

 CONTAINS:
       None.

 EXTERNALS:
       None.

 COMMON BLOCKS:
       None

 SIDE EFFECTS:
       If an error occurs, the ASCII file is closed.

 RESTRICTIONS:
       None.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 27-Aug-2003
                       paul.vandelst@ssec.wisc.edu

(See SRF_ASCII_IO.f90)


READ_SRF_ASCII

[Previous Subprogram] [Next Subprogram] [List of Subprograms]
 NAME:
       Read_SRF_ASCII

 PURPOSE:
       Function to read a channel SRF from an ASCII format SRF file.

 CATEGORY:
       Instrument Information: SRF

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Error_Status = Read_SRF_ASCII( Filename,                   &  ! Input
                                      FileID,                     &  ! Input
                                      Channel,                    &  ! Input
                                      SRF,                        &  ! Output
                                      Quiet         = Quiet       &  !  Optional Input
                                      RCS_Id        = RCS_Id,     &  ! Revision control
                                      Message_Log   = Message_Log )  ! Error messaging

 INPUT ARGUMENTS:
       Filename:         Character string specifying the name of the
                         ASCII format SRF data file to inquire.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       FileID:           ASCII file ID number.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       Channel:          Channel number for which the SRF response and frequency
                         are required.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

 OPTIONAL INPUT ARGUMENTS:
       Quiet:            Use this argument to suppress information messages being
                         printed to standard output (or the message log file if
                         the MESSAGE_LOG optional argument is used.) By default,
                         information messages are printed.
                         If QUIET = 0, information messages are OUTPUT (default)
                            QUIET = 1, information messages are *SUPPRESSED*.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN ), OPTIONAL
       Message_Log:      Character string specifying a filename in which any
                         messages will be logged. If not specified, or if an
                         error occurs opening the log file, the default action
                         is to output messages to standard output.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN ), OPTIONAL

 OUTPUT ARGUMENTS:
       SRF:              Data structure containing the requested channel SRF data.
                         UNITS:      N/A
                         TYPE:       SRF_type
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN OUT )

 OPTIONAL OUTPUT ARGUMENTS:
       RCS_Id:           Character string containing the Revision Control
                         System Id field for the module.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT ), OPTIONAL

 FUNCTION RESULT:
       Error_Status:     The return value is an integer defining the error
                         status. The error codes are defined in the
                         ERROR_HANDLER module.
                         If == SUCCESS the file read was successful
                            == FAILURE an error occurred reading the file
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar

 CALLS:
       File_Open:          Function to check if a file is open.
                           SOURCE: FILE_UTILITY module

       Get_Lun:            Function to return an unused file unit number.
                           SOURCE: FILE_UTILITY module

       Display_Message:    Subroutine to output messages
                           SOURCE: ERROR_HANDLER module

 SIDE EFFECTS:
       File is closed if an error occurs.

 RESTRICTIONS:
       The SRF header must be read before this function can be called.

 COMMENTS:
       Note the INTENT on the output SRF argument is IN OUT rather
       than just OUT. This is necessary because the argument may be defined on
       input. To prevent memory leaks, the IN OUT INTENT is a must.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 27-Aug-2003
                       paul.vandelst@ssec.wisc.edu

(See SRF_ASCII_IO.f90)


WRITE_SRF_ASCII

[Previous Subprogram] [List of Subprograms]
 NAME:
       Write_SRF_ASCII

 PURPOSE:
       Function to write a channel SRF to an ASCII format SRF file.

 CATEGORY:
       Instrument Information: SRF

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Error_Status = Write_SRF_ASCII( Filename,                   &  ! Input
                                       FileID,                     &  ! Input
                                       SRF,                        &  ! Output
                                       RCS_Id        = RCS_Id,     &  ! Revision control
                                       Message_Log   = Message_Log )  ! Error messaging

 INPUT ARGUMENTS:
       Filename:         Character string specifying the name of the
                         ASCII format SRF data file to inquire.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

       FileID:           ASCII file ID number.
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN )

 OPTIONAL INPUT ARGUMENTS:
       Message_Log:      Character string specifying a filename in which any
                         messages will be logged. If not specified, or if an
                         error occurs opening the log file, the default action
                         is to output messages to standard output.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( IN ), OPTIONAL

 OUTPUT ARGUMENTS:
       SRF:              Data structure containing the requested channel SRF data.
                         UNITS:      N/A
                         TYPE:       SRF_type
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT )

 OPTIONAL OUTPUT ARGUMENTS:
       RCS_Id:           Character string containing the Revision Control
                         System Id field for the module.
                         UNITS:      N/A
                         TYPE:       CHARACTER(*)
                         DIMENSION:  Scalar
                         ATTRIBUTES: INTENT( OUT ), OPTIONAL

 FUNCTION RESULT:
       Error_Status:     The return value is an integer defining the error
                         status. The error codes are defined in the
                         ERROR_HANDLER module.
                         If == SUCCESS the file write was successful
                            == FAILURE an error occurred writing to file
                         UNITS:      N/A
                         TYPE:       INTEGER
                         DIMENSION:  Scalar

 CALLS:
       File_Open:          Function to check if a file is open.
                           SOURCE: FILE_UTILITY module

       Get_Lun:            Function to return an unused file unit number.
                           SOURCE: FILE_UTILITY module

       Display_Message:    Subroutine to output messages
                           SOURCE: ERROR_HANDLER module

 SIDE EFFECTS:
       Output file is closed if an error occurs.

 RESTRICTIONS:
       The SRF header must be written before this function can be called.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 27-Aug-2003
                       paul.vandelst@ssec.wisc.edu

(See SRF_ASCII_IO.f90)