2016-12-19 23:26:16 +01:00
|
|
|
subroutine desort()
|
|
|
|
implicit none
|
|
|
|
integer::i,j,ord,ordh
|
2018-01-27 12:41:48 +01:00
|
|
|
integer(kind=selected_int_kind(16))::add,addh,deti,dethi,addt
|
2016-12-19 23:26:16 +01:00
|
|
|
|
|
|
|
do i=1,detfound-1
|
|
|
|
do j=i+1,detfound
|
|
|
|
if(foundaddh(i,3).gt.foundaddh(j,3))then
|
2018-01-27 12:41:48 +01:00
|
|
|
dethi = foundaddh(i,1)
|
2016-12-19 23:26:16 +01:00
|
|
|
foundaddh(i,1) = foundaddh(j,1)
|
2018-01-27 12:41:48 +01:00
|
|
|
foundaddh(j,1) = dethi
|
2016-12-19 23:26:16 +01:00
|
|
|
addh = foundaddh(i,2)
|
|
|
|
foundaddh(i,2) = foundaddh(j,2)
|
|
|
|
foundaddh(j,2) = addh
|
|
|
|
ordh = foundaddh(i,3)
|
|
|
|
foundaddh(i,3) = foundaddh(j,3)
|
|
|
|
foundaddh(j,3) = ordh
|
|
|
|
endif
|
|
|
|
if(foundadd(i,3).gt.foundadd(j,3))then
|
2018-01-27 12:41:48 +01:00
|
|
|
deti = foundadd(i,1)
|
2016-12-19 23:26:16 +01:00
|
|
|
foundadd(i,1) = foundadd(j,1)
|
2018-01-27 12:41:48 +01:00
|
|
|
foundadd(j,1) = deti
|
2016-12-19 23:26:16 +01:00
|
|
|
add = foundadd(i,2)
|
|
|
|
foundadd(i,2) = foundadd(j,2)
|
|
|
|
foundadd(j,2) = add
|
|
|
|
ord = foundadd(i,3)
|
|
|
|
foundadd(i,3) = foundadd(j,3)
|
|
|
|
foundadd(j,3) = ord
|
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
end
|