IF ( doDiagAdvR ) THEN
LOGICAL doDiagAdvX, doDiagAdvY, doDiagAdvR
doDiagAdvR = .FALSE.
doDiagAdvR = DIAGNOSTICS_IS_ON( diagName, myThid )