CSE User's Manual

California Simulation Engine

2 Operation

2.1 Command Line

CSE is invoked from the command prompt or from a batch file using the following command:

    CSE *inputfile* {*switches*}


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).
indicates zero or more of the following:

2.2 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.

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). The weather file must be in one of the same three places: current directory, directory containing CSE.EXE, or a directory on the operating system path; or, the directory path to the file must be given in the wfName= statement in the usual pathName syntax. ?? Appears that file must be in current directory due to file locating bugs 2011-07

The CSE input file, named on the CSE command line, must be in the current directory or the directory path to it must be included in the command line.

Included input files, named in #include preprocessor directives (see “The Preprocessor”) in the input file, must be in the current directory or the path to them must be given in the #include directive. In particular, CSE will NOT automatically look for included files in the directory containing the input file. The default extension for included files is “.CSE”.

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.

2.3 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”.

2.4 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.