LOGICAL diag_pickup_read, diag_pickup_write
& diag_pickup_read, diag_pickup_write,
IF ( diag_pickup_write ) THEN
IF ( diag_pickup_read .OR. diag_pickup_write ) THEN
diag_pickup_write = .FALSE.
diag_pickup_write_mdsio = diag_pickup_write .AND.
IF (diag_pickup_write) THEN