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