INTEGER ndiagMax
PARAMETER( ndiagMax = 500 )
INTEGER kdiag(ndiagMax)
INTEGER hdiag(ndiagMax)
CHARACTER*8 cdiag(ndiagMax)
CHARACTER*80 tdiag(ndiagMax)
CHARACTER*16 gdiag(ndiagMax)
CHARACTER*16 udiag(ndiagMax)
IF ( diagNum .LE. ndiagMax ) THEN
& ' Exceed Max.Number of diagnostics ndiagMax=', ndiagMax
DO n=1,ndiagMax