Dear Zeenat,
I am looking at the code of PKAPKA.f.
The condition at line 74 does not convince me. Can you please explain your logic there?
I agree with the fail-fast approach, but I would expect the routine to exit for:
IF ( ICODE .NE. 300 .OR. LTRACK .NE. 1 .OR. JTRACK .NE. 8) RETURN
, i.e.
IF ( .NOT.( ICODE .EQ. 300 .AND. LTRACK .EQ. 1 .AND. JTRACK .EQ. 8 ) ) RETURN
Could you please check whether this logic is consistent with your intent?
As a concrete reference, consider the routine downloadable at the top of this thread.
In addition, I cannot reproduce your plots by simply running your latest script (the latest terminal screenshot that you posted seems to be coming from the obsolete python processing script).
For clarity, could you please upload again the files that should be inspected and used for reproduction?
Many thanks,
Tommaso