LOGICAL errorFlag
errorFlag = .FALSE.
errorFlag = .TRUE.
IF ( errorFlag ) STOP 'ABNORMAL END: S/R LAYERS_FLUXCALC'
IF ( errorFlag ) STOP 'ABNORMAL END: S/R LAYERS_DIAPYCNAL'