Modify mgdraw.f routine

Dear experts,

I have added one mgdraw.f routine where I am printing type of reactions. Along with this, the intention is to count no of reactions when neutron is produced. So I added a block (see lines 224 to 228). But it did not create the output file (named as COUNTS).

Is it because I have not defined and initialized the variable KPARTCOUNTS? I am not sure where to put it in this routine structure.

integer, save :: KPARTCOUNTS

Also, I wanted to select one particular fragment and used a command for e.g., IF (IBHEAV (I) .EQ. 117)THEN … But this gave me an error. What is the proper variable for choosing mass number of a fragment?

Can you please guide?

mgdraw.f (12.8 KB)



2 posts were merged into an existing topic: Unable to see the presence of defecr

In the line 224 instruction

               IF (KPART (I) .EQ. 8) THEN

the index I is not defined. You should implement a DO loop with I running from 1 to NP and check if a neutron is there (in case the KPART array contains more than one neutron, you may want to avoid counting the reaction more than once).

As for the KPARTCOUNTS variable (which is automatically defined as integer in view of its initial letter), you just need to initialize it, e.g. through an additional DATA statement at the beginning.

Finally, as already written elsewhere in your code, it’s not IBHEAV(I), rather IBHEAV(KHEAVY(I)) (please note that in this case I should run from 1 to NPHEAV).

1 Like

Dear @ceruttif ,

Thank you for the guidance. I could rectify the routine.