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