sunnyjhon
You are correct in surmising that the accident investigation procedure in Spain is quite different from that of the UK of USA. Accident investigations are undertaken by a judge who calls in expert witnesses to assist him or her in the case. The sole purpose of this judicial investigation is to allocate blame.
This is not correct. The investigation of air accidents in Spain is always carried out in by the CIAIAC, equivalent to the US NTSB or the UK AAIB, with the same objectives, and in compliance with guidance from ICAO.
Relación de accidentes e incidentes - Investigación - CIAIAC - Órganos Colegiados - Ministerio de Fomento
Parallel to this sometimes you can find that on request of affected parties a court investigation/case in brought forward and this is led by a jugde. This investigation is not always as detailed as the one from the CIAIAC, but most times a jugde will wait until the official investigation by the CIAIAC is released to the public before giving their veredict.