TurbSim exit codes

Hello NREL, all,

I normally run TurbSim from a command prompt. If there are any issues with the BTS file generation they are immediately evident from the on-screen prompt (see below for sample).

But I’m interested in running TurbSim automatically/dynamic from insides another application and it would be useful to know if the TurbSim run has completed successfully or not. So I’m wondering if the TurbSim executable returns an error code depending the run status?

Many applications tend to return “0” as an indicator of success, and “1” to indicate failure (or a positive integer > 0 if the program has a list of error codes).

Any advice appreciated.

Kind regards,
Aengus

Hi,

Yes, TurbSim is set up to exit with code “0” on a normal stop (success) and “1” on error.

This is true for OpenFAST and most, if not all, of the Fortran-based codes related to it. We have subroutines in the NWTC_Library code base that set these codes on program exit.

1 Like

Thank you for the clarification Bonnie.

Kind regards,
Aengus