Operation¶
Command Line¶
CSE is invoked from the command prompt or from a batch file using the following command:
CSE *inputfile* {*switches*}
where:
- inputfile
- specifies the name of the text input file for the run(s). If the filename has an extension other than ".cse" (the default), it must be included. The name of the file with weather data for the simulation(s) is given in this file (wfName= statement, see Weather Data Items).
- {switches}
- indicates zero or more of the following:
-
-Dname defines the preprocessor symbol name with the value "". Useful for testing with
#ifdef name, to invoke variations in the simulation without changing the input file. The CSE preprocessor is described "The Preprocessor". -
-Dname=value defines the preprocessor symbol name with the specified value. Name can then be used in the input file to allow varying the simulation without changing the input file -- see "The Preprocessor" for more information. The entire switch should be enclosed in quotes if it contains any spaces -- otherwise the command processor will divide it into two arguments and CSE will not understand it.
-
-Uname undefines the preprocessor symbol name.
-
-ipath;path;path specifies directories where CSE looks for input, include, and weather files.
-
-b batch mode: suppresses all prompts for user input. Currently there are no prompts implemented in CSE. -b is retained in case prompts are added in the future. It is good practice to include -b in batch script CSE invocations.
-
-n suppresses screen display of warning messages. When -n is specified, warning messages are reported only to the error file.
-
-p display all the class and member names that can be "probed" or accessed in CSE expressions. "Probes" are described in "Probes". Use with command processor redirection operator ">" to obtain a report in a file. Inputfile may be given or omitted when -p is given.
-
-p1 similar to -p, but displays additional member names that cannot be probed or would not make sense to probe in an input file (development aid).
-
-c display all input names.
-
-c1 display input names with build-independent details from CSE CULT tables (development aid).
-
-c2 display input names with all details from CSE CULT tables (development aid).
-
-x specifies report test prefix; see TOP repTestPfx. The -x command line setting takes precedence over the input file value, if any.
-
-tnn specifies internal testing option bits (development aid). The following values should be combined bit-wise to determine nn. \ 1: Omit directory paths from file names in reports, yielding location-independent report files suitable for text comparison.\ 2: Include detailed timing information in the log file (default is summary only).
Locating Files¶
As with any program, in order to invoke CSE, the directory containing CSE.EXE must be the current directory, or that directory must be on the operating system path, or you must type the directory path before CSE.
The CSE input file, named on the CSE command line, is located by searching, in order: the current directory; any directories given with the -i command line switch; the operating system PATH; and the directory containing CSE.EXE. Alternatively, the directory path to the file may be given directly on the command line.
A CSE simulation requires a weather file. The name of the weather file is given in the CSE input file (wfName= statement, see Weather Data Items). Once the input file has been located, its directory is added to the search list, so the weather file is located using the same search order as the input file, plus the input file's own directory -- or the directory path to it may be given directly in the wfName= statement.
Included input files, named in #include preprocessor directives (see "The Preprocessor") in the input file, are located using this same search order, including the input file's own directory. The default extension for included files is ".CSE".
On case-sensitive file systems (e.g. Linux), if a file located by any of the searches above is not found using the exact case given, CSE falls back to a case-insensitive search of the directory and uses the matching file if exactly one is found; if more than one file in the directory matches case-insensitively, CSE reports an error rather than guessing which one was intended.
Output files created by default by CSE (error message file, primary report and export files) will be in the same directory as the input file; output files created by explicit command in the input file (additional report and/or export files) will be in the current directory unless another path is explicitly specified in the command creating the file.
Output File Names¶
If any error or warning messages are generated, CSE puts them in a file with the same name and path as the input file and extension .ERR, as well as on the screen and, usually, in the primary (default) report file. The exception is errors in the command line: these appear only on the screen. If there are no error or warning messages, any prior file with this name is deleted.
By default, CSE generates an output report file with the same name and path as the input file, and extension ".REP". This file may be examined with a text editor and/or copied to an ASCII printer. If any exports are specified, they go by default into a file with the same name and path as the input file and extension ".EXP".
In response to specifications in the input file, CSE can also generate additional report and export files with user-specified names. The default extensions for these are .REP and .CSV respectively and the default directory is the current directory; other paths and extensions may be specified. For more information on report and export files, see REPORTFILE and EXPORTFILE in "Input Data".
Errorlevel¶
CSE sets the command processor ERRORLEVEL to 2 if any error occurs in the session. This should be tested in batch files that invoke CSE, to prevent use of the output reports if the run was not satisfactory. The ERRORLEVEL is NOT set if only warning messages that do not suppress or abort the run occur, but such messages DO create the .ERR file.