PURPOSE
To open a Vector File for storing one or more vectors of equal length.SYNOPSIS
CALL FMSOV (NUMEQ, IDTYPE, NUMVEC, NAME, LUX)
INPUT PARAMETERS
- NUMEQ = Integer.
Number of equations (terms) in the vector - IDTYPE = Integer.
Data type (1=real, 2=complex) - NUMVEC = Integer.
Number of vectors (records) on the file. -
NAME = Character String.
A 1 to 119 character string that contains a unique name for the vector file. FMS appends a 'V' to the file name before it is created.
OUTPUT PARAMETERS
- LUX(25) = Integer array.
FMS Vector File Attribute List for the new created file.
NOTE: This is an input parameter when opening an existing file.
FMS PARAMETERS:
The following FMS Parameters are especially important to this routine:Parameter | Description |
---|---|
INCORE | File location |
IEXIST | Use existing file |
NOOPEN | Do not physically open the file. |
DESCRIPTION:
Subroutine FMSOV is used to open a file used to supply FMS with vector data.The FMS Parameter IEXIST determines if FMS creates a new file or uses an existing file. If you know you are using an existing file (IEXIST=1), the parameters NUMEQ, IDTYPE and NUMVEC are not used and you can specify dummy arguments. If you might use an existing file or create a new one (IEXIST=2), the values specified for NUMEQ, IDTYPE and NUMVEC must match the existing file described by LUX(25). In both cases (IEXIST > 0), you must supply the file attribute list LUX(25) that was used to initially create the file.
If you are only processing one vector, it is probably better to allocate it in memory (unless you need to save it between jobs). You can create a vector file in memory by setting the INCORE parameter before calling this subroutine or by calling FMSOV2.
The vector values can be written to the opened file by using the FMSWRT subroutine.
EXAMPLE
If the real array RHS(NUMEQ, NUMVEC) contains the vector values, they can be written to the file with the following statements:CALL FMSOV (NUMEQ, 1, NUMVEC, 'RHS', LUX) LOCD = 1 DO NV=1, NUMVEC CALL FMSWRT (LUX(1), LOCD, RHS(1,NV), NUMEQ) LOCD = LOCD + LUX(4) END DONote that LUX(4) contains the record length for the file as computed by FMS. This value may be greater than IDTYPE*NUMEQ to align records on sector boundaries. You should always use LUX(4) to address the vector file.