spcopn |
Table of contents
ProcedureSPCOPN ( SPK or CK, open new file ) SUBROUTINE SPCOPN ( FNAME, IFNAME, HANDLE ) AbstractOpen a new SPK or CK file for subsequent write requests. Required_ReadingDAF SPC KeywordsEPHEMERIS FILES DeclarationsIMPLICIT NONE CHARACTER*(*) FNAME CHARACTER*(*) IFNAME INTEGER HANDLE Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- FNAME I Name of SPK or CK file to be created. IFNAME I Internal file name. HANDLE O Handle of new SPK or CK file. Detailed_InputFNAME is the name of a new SPK or CK file to be created. IFNAME is the internal file name of the file to be created. IFNAME may contain up to 60 characters. Detailed_OutputHANDLE is the file handle assigned to the new file. This should be used to refer to the file in all subsequent calls to DAF and SPC routines. ParametersNone. Exceptions1) If the specified file cannot be opened without exceeding the maximum number of files, an error is signaled by a routine in the call tree of this routine. 2) If the specified file cannot be opened without exceeding the maximum number of DAF files, an error is signaled by a routine in the call tree of this routine. 3) If an I/O error occurs in the process of opening the file, the error is signaled by a routine in the call tree of this routine. 4) If (for some reason) the initial records in the file cannot be written, an error is signaled by a routine in the call tree of this routine. 5) If no logical units are available, an error is signaled by a routine in the call tree of this routine. 6) If the file name is blank or otherwise inappropriate, an error is signaled by a routine in the call tree of this routine. FilesSee argument FNAME above. ParticularsSPCOPN opens a new SPK or CK file. It is identical to DAFOPN except SPCOPN defines several of the inputs that DAFOPN requires and which specify that the DAF to be opened is an SPK or CK file. Use DAFCLS to close any DAF including SPK and CK files. SPCOPN, is not to be confused with the routines that load and unload files to and from a buffer for use by the readers such as SPKLEF (SPK, load ephemeris file) and CKLPF (CK, load pointing file). The loading and unloading routines open and close the files internally, so there is no need to call SPCOPN when loading or unloading SPK or CK files. ExamplesIn the following code fragment, SPCOPN opens a new file, to which an array is then added. GETDAT is a ficticious non-SPICELIB routine whose function is to get the array data. DAFBNA begins a new array, DAFADA adds data to an array, and DAFENA ends a new array. CALL SPCOPN ( FNAME, IFNAME, HANDLE ) CALL DAFBNA ( HANDLE, SUM, NAME ) CALL GETDAT ( N, DATA, FOUND ) DO WHILE ( FOUND ) CALL DAFADA ( N, DATA ) CALL GETDAT ( N, DATA, FOUND ) END DO CALL DAFENA CALL DAFCLS ( HANDLE ) RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) J.E. McLean (JPL) W.L. Taber (JPL) VersionSPICELIB Version 1.1.0, 19-APR-2021 (JDR) Added IMPLICIT NONE statement. Changed input argument name "SPC" to "FNAME" for consistency with other routines. Edited the header to comply with NAIF standard. Updated the $Exceptions section to cover all errors detected by this routine and remove unnecessary introduction referencing DAF required reading. Added DAF required reading to $Required_Reading. SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) Comment section for permuted index source lines was added following the header. SPICELIB Version 1.0.0, 05-APR-1991 (JEM) |
Fri Dec 31 18:36:49 2021