Incorperating WHATs from intput in source routines

Dear Fluka experts,
Following the documentation in the manual, It is possible to pass to the user routine values from the input file, if I understood correctly. How should it be written in the user routine? For example, I would like to pass to the user routine the name of the file that includes the energy distribution. Is it possible? and if so, is it possible also for other user routines, such as MGDRAW?

Thank you in advance,
Hen Shukrun

Dear Hen Shukrun,

the values specified on the SOURCE card are accessible via the WHASOU(I) variables where I corresponds to the location of the variable, i.e. WHASOU(1) for the first value, and so on, up to 18.

The sdum text can used with the SDUSOU variable, but this is limited to 8 characters.

These variables are only available in the source routine by default. For other user routines you need to include as well.

For passing / opening files, the FLUKA card OPEN would be a better option. On this card you can specify the unit number, the file name and status. FLUKA will take care of opening of the file, so you can read from (write to) the unit, without needing the OPEN() Fortran function.