AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec...

73
AECL-7794 ATOMIC ENERGY M m L'ENERGIE ATOMIQUE OF CANADA LIMITED U f i j DU CANADA,LIMITEE MONTEC: AN INTERACTIVE FORTRAN PROGRAM TO SIMULATE RADIATION DOSE AND DOSE-RATE RESPONSES OF POPULATIONS MONTEC: UN PROGRAMME INTERACTS ECRIT EN FORTRAN POUR SIMULER LES REPONSES DES POPULATIONS AUX DOSES ET AU DEBIT DE DOSE D'IRRADIATION K. A. Perry, J. G. Szekely WhitesheM Nuclear Research Etablissement de recherches Establishment nucleaires de Whiteshell Pinawa, Manitoba ROC i Lvi September 1983 seprembre

Transcript of AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec...

Page 1: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

AECL-7794

ATOMIC ENERGY M m L'ENERGIE ATOMIQUEOF CANADA LIMITED U f i j DU CANADA, LIMITEE

MONTEC: AN INTERACTIVE FORTRAN PROGRAM TO SIMULATE RADIATION

DOSE AND DOSE-RATE RESPONSES OF POPULATIONS

MONTEC: UN PROGRAMME INTERACTS ECRIT EN FORTRAN

POUR SIMULER LES REPONSES DES POPULATIONS AUX DOSES

ET AU DEBIT DE DOSE D'IRRADIATION

K. A. Perry, J. G. Szekely

WhitesheM Nuclear Research Etablissement de recherchesEstablishment nucleaires de Whiteshell

Pinawa, Manitoba ROC i LviSeptember 1983 seprembre

Page 2: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

Copyright © Atomic Energy of Canada Limited, 1983

Page 3: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

ATOMIC ENERGY OF CANADA

MONTEC: AN INTERACTIVE FORTRAN PROGRAM TO SIMULATE RADIATIONDOSE AND DOSE RATE RESPONSES OF POPULATIONS

by

K.A. Perry and J.G. Szekely

Whiteshell Nuclear Research EstablishmentPinawa, Vi.-- toba ROE 1L0

19:::: ,1-ptemberAECL-7794

Page 4: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

MONTEC: UN PROGRAMME INTERACTIF ÉCRIT EN FORTRAN FOUR SIMULER LES RÉPONSES

DES POPULATIONS AUX DOSES ET AU DEBIT DE DOSE D'IRRADIATION

par

K.A. Perry et J.G. Szekely

RESUME

Le programme d'ordinateur MONTEC a été écrit dans le but de simu-

ler la distribution des réponses au sein d'une population dont les membres

sont exposés â de multiples doses d'irradiation selon des débits de dose

variables. On sélectionne ces doses et ces débits de dose de façon aléatoi-

re â partir de distributions normales de diagramme. Trois équations servent

â calculer les réponses Individuelles aux rayonnements et comprennent les

termes de dose et de débit de dose. L'utilisateur peut incorporer, au be-

soin, d'autres distributions ou rapports dose-réponse/débit-dose.

Le but de cette documentation est de tenir lieu de manuel d'ex-

ploitation complet pour les besoins du programme. La présente version a été

rédigée en FORTRAN-10 pour le système DEC PDP-10.

L'Énergie Atomique du Canada, LimitéeEtablissement de recherches nucléaires de Whiteshell

Pinawa, Manitoba ROE 1L01983 septembre

AECL-7794

Page 5: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

MONTEC: AN INTERACTIVE FORTRAN PROGRAM TO SIMULATE RADIATION

DOSE AND DOSE-RATE RESPONSES OF POPULATIONS

by

K.A. Perry and J.G. Szekely

ABSTRACT

The computer program MONTEC was written to simulate the distribu-

tion of responses in a population whose members are exposed to Multiple

radiation doses at variable dose rates. These doses and dose rates are

randomly selected from lognormal distributions. The individual radiation

responses are calculated from three equations, which include dose and dose-

rate terms. Other response-dose/dose-rate relationships or distributions

can be incorporated by the user as the need arises.

The purpose of this documentation is to provide a complete opera-

ting manual for the program. This version is written in FORTRAN-10 for the

DEC system PDP-10.

Atomic Energy of Canada LimitedWhiteshell Nuclear Research Establishment

Plnawa, Manitoba ROE 1L01983 September

AECL-7794

Page 6: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

CONTENTS

Page

1. INTRODUCTION

2. PROGRAM DESCRIPTION

3. LIST OF SUBROUTINES 3

3.1 MONTEC PROGRAMS 33.2 DEC SYSTEM PROGRAMS 43.3 SUBPROGRAMS IN WNRE DEC 10 SYSTEM 4

4. HEIRARCHY CHARTS

5. MONTEC USERS GUIDE 6

5.1 SIMULATION 65.2 NON-SIMULATION 11

6. COMMON BLOCKS 13

7. GLOSSARY 15

8. MATHEMATIC/U, SUMMARY 23

8.1 CORRESPONDENCE OF LOGNORMAL PARAMETERS WITHTHOSE CF THE ASSOCIATED NORMAL DISTRIBUTION 23

8.2 PREDICTION OF RESPONSE PARAMETERS 24

9. PROGRAM LISTING 26

REFERENCES 67

Page 7: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

1. INTRODUCTION

The computer program MONTEC (MONTE CARLO TECHNIQUE FOR RADIATIONRESPONSE) simulates the response of a population to episodic radiation ex-posures, which are permitted to occur at different doses and dose rates.This program Is an extension of an earlier computer simulation of continu-ous radiation exposures called FSOD [1]. Both programs are based on doseand dose-rate studies carried out by Petkau at the Whiteshell NuclearResearch Establishment (WNRE) [2,3]. In these programs a relationship ofthe form

Response = constant x (dose) x (dose rate) ,

which was derived for chemical damage iu model membrane systems, was usedto determine the response to each radiation exposure. The values of M andN depend upon the presence or absence of the free radical scavenger, super-oxide dlsmutase (SOD). For comparison, two other dose-rate/dose-responserelationships, suggested by Lyon et al. [4], were also used. These equat-ions relate response (as measured by the ratio of mutations/locus in mice)to the dose and logarithm of the dose rate.

The simulation of multiple exposures is important since occupa-tional exposures are episodic in nature. Dose rate has not usually beenconsidered in occupational exposures; however, the equations of Petkau andLyon et al. give us the opportunity to simulate radiation effects in a pop-ulation with biologically meaningful equations that contain dose-rateterms. We appreciate that the radiation endpoint of chemical damage inmembranes or mutations/locus in mice are not necessarily appropriate forhuman exposures, but the mathematical form of the equations makes themespecially interesting. They contain an 'inverse dose-rate effect1 [2-A],i.e. an increase in response per unit dose with decreasing dose rate. Itis important to discover the population response when equations of this ora similar form apply.

2. PROGRAM DESCRIPTION

MONTEC is designed to generate the response distribution in apopulation of individuals given multiple irradiations at doses and doserates selected independently. In its present form, however, MONTEC usesthe lognormal distribution for the dose and dose rate and the equations de-veloped by Petkau [2] and Lyon et al. [4] for the response calculation.The program is written with separate subprograms defining the response cal-culations, the dose and dose-rate distributions and the predicted responsestatistics. These subprograms can be easily exchanged for others to changethe response calculation or the dose and dose-rate distributions.

The lognormal distribution was selected for the individual dosesand dose rates since it has been suggested as a description of the yearlyoccupational dose [5,6], and it is frequently found in biological processes.

Page 8: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 2 -

After a dose/dose-rate pair is selected from the lognormaldistribution, the two are checked for compatablllty, i.e., dose _<_ (doserate x maximum exposure time). Incompatible dose/dose-rate pairs arerecorded, but are eliminated from the simulation. The dose value is alsochecked for the appropriate occupational limit. Individuals with a totaldose larger than the yearly limit (5 rem) are counted in the responsestatistics but are not given any further exposures in the simulation.

The dose and dose-rate values are then used to calculate theresponses. Any of the three equations, Equation (1) from reference 3, andEquations (2) and (3) from reference 4, can be selected to computeresponses:

R - D M (I)" N (1)

where

with _without SOD

RDI

M -

N -

M -

responsedosedose rate

1.44

1.18

0.80

± °'+ 0.

+ 0.

30

15

14

1I with SOD

N - 0.82 + 0.04

Notes: (i) SOD is a factor in Equation (1) only.

(ii) The errors associated with the exponents have a greateffect on the response distribution. The program has beenwritten so the user may impose any exponent error desiredor select the error from a normal distribution.

(iii) The equation was originally in the form R - CDnI~ . Theconstant C was set to unity for convenience.

R - D[A + B(ln I) + H(ln I)2] (2)

where A - (8.66 + 1.44) x 10~®B - (1.70 + 0.20) x 10"°H - (2.46 + 0.650) x 10

R - D[A + B(ln I)] (3)

where A - -(3.65 + 5.93) x 10~8

B » (1.90 + 1.11) x 10"°I < 0.009 rad/min*

* 1 rad - 10 mGyNote: R in equations (2) and (3) is the radiation-induced response. The

original equations contain a constant C to include the backgroundlevel of mutations R « R - C.

Page 9: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 3 -

The response Is calculated for one year. One, four or twenty-sixexposures per year are used since they correspond to the reporting periodfor occupational exposures. The yearly response is then summarized andreported in three ways. First, the yearly response of an Individual iscalculated as the sum of all the responses for each exposure in the year.The dose is assumed to be delivered in a time equal to the dose divided bythe dose rate, which is less than the exposure interval. It is assumedthat all separate exposures are Independent and that damage accumulated inone exposure does nor. influence a subsequent one. The damage delineated inall exposures is accumulated. This is then done for all individuals in thepopulation.

However, since dose-rate values are often not available in actualradiation exposures, the following approximate methods of calculating theresponse are also included in the simulations. According to the secondmethod, the average dose rate of all exposures in a year is calculated andused as the dose-rate value, while the total yearly dose is used as thedose in the response equations. Using the third method, the total doce isdivided by the maximum yearly exposure time and this is used as theeffective dose rate in the response calculation.

All three methods give a response value for each member of thepopulation. The distribution statistics of the yearly and per exposuredose, the single exposure, average and total dose rates, and the threeresponses are all accumulated. The yearly doses, average and singleexposure dose rate, and the response distributions are stored and availablefor plotting.

3. LIST OF SUBROUTINES

3.1 MONTEC PROGRAMS

SUBROUTINE NAME ARGUMENT LIST COMMON BLOCKS

MONTEC (MAIN)MTWOD

ASTATS

PRDCT

MINPUT

MSYM

RSPNS

IFLAG, VAL, TITLE, NO, IN

DSTD, DMEAN, DRSTD, DRMEAN

K, I, J

INITB, IDENTINITB, BATCHJ,KORPLT, CONST, TYPE

VALUS

TYPE, CONST

TYPE, CONST, PARAM

COUNTR, DR, DOSES, DC,TYPE, CONST, SPARES

DOSES, TYPE, CONST,SPARES, PARAM

Page 10: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 4 -

KOOSE

LOGD

NORMAL

MOUT

PREOUT

MSET

KFILOP

PINF

FIXRAT

NOTSIM

OPT

YDELET

3.2

SETRAN

RAND

DATE

TIME

ERRSNS

3.3

SPLOT

DELETE

K, I, J,

S, AM

AMN, STND

COUNTK, DC, TYPE, CONST,DOSES, SPARES, DRPARAM

ARRAY, IDIV, NO, I, ALG

FNAM, NO, IDIVI, I

TITLE, XL, YL, N, XLEN,YLEN, ORIGIN, ÜNITSX,SYMSIZ, ALG

DEC SYSTEM PROGRAMS [7]

SUBPROGRAMS IN WNRE DEC 10 SYSTEM

CONST, PLST

MORPLT, VALUES, TYPECONST, PLST, SAVSTF

XY, CONST, SAVSTF

BATCHJ, XY, CONST,PLST, SAVSTF

IDENT, CONSTSAVST

XY, SAVSTF, CONST

TYPE

CONST

Page 11: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 5 -

4 . HIERARCHY CHARTS

2CO

g

HreM

CO

S3

Page 12: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 6 -

5. MONTEC USERS GUIDE

This guide contains a list of possible questions asked by theprogram MONTEC along with the replies. The program prompts the user forinformation with the symbol >. When the symbol > is seen, the requesteddata and a carriage return are required. See Section 8 for a programlisting.

Initial prompt:

(i) TYPE HELP FOR PROGRAM DESCRIPTION OR PRESS RETURN FOR STARTOF RUN >

Type 'HE' for an explanation of the program or acarriage return to begin the run. Any other responseresults in an error message and tha initial prompt is givenagain.

(ii) LOG TITLE >

This entry allows the user to give an identifying nameto the summary file F0R01.DAT, of the run. The title mustbe 60 characters or less.

(iii) INTERACTIVE OR BATCH JOB (I OR B)>

Answer 'I' or 'B1. In the interactive mode, the usercan choose the scaling on the Y axis on all graphs (questionxxxviii) while selection of batch causes the scaling to bedone automatically.

(iv) SIMULATIONS?>

'Yf starts the simulation.

'N' starts is the non-simulation position of theprogram that is described in Section 5.2.

5.1 SIMULATION

(v) NUMBER OF SUPERIMPOSED CURVES>

The response must be a number less than or equal to 10.It is the number of simulations in a run. Data from each ofthe simulations can be superimposed. If the answer is 1,only one simulation will be dons and all data must beplotted without superimposition.

(vi) SELECT RANDOM # SEED?>

Answer 'Y' and you will be asked to enter the randomnumber seed of your choice. This number must be an odd

Page 13: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 7 -

positive integer <2 • Answer 'N' and the default value isused.

(vii) NUMBER OF EXPOSURES/YEAR>

The response expected is 1,4 or 26. These valuesrepresent yearly, quarterly or bi-weekly reporting periods.However, other values are also acceptable.

(viii) RESPONSE EQN. (1,2 OR 3)>

The answer is a code to select the response equation

(1) R - D V(2) R - D(A + B(ln I) + H(ln I) )(3) R - D(A + B(ln I))

If (1) is selected, the following questions are askedto identify the parameters M and N, which depend upon thepresence or absence of SOD. If 2 or 3 is selected, controlpasses to question (xv).

(ix) SOD?>

The answer 'Y1 or 'N' determines the proper values ofparameters M and N.

(x) WANT ERROR IN EXPONENT IN,N?>

The following questions are asked. If answered 'N',the program proceeds to the distribution value inputs (xv).If answered 'Y', the values of M and N are augmented andbecome M +_ error, where the error is either a constant or avalue distributed normally about 0.

(xi) SELECT NORMAL DISTRIBUTION, EXPONENT ERR0R?>

If 'Y1, the errors are selected such that each responsecalculation is made with a different set of exponents M,Nwhere the values of M and N are normally distributed abouttheir default values with a standard deviation (SD) equal toeither their experimental error or a selected SD. If 'N',the fixed error is selected.

(xii) FIXED ERROR IN M>FIXED ERROR IN N>

The values the user inputs are added to the defaultvalues of M and N.

Page 14: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 8 -

(xlii) CHOOSE STD ERROR?~>

If 'Y', the SD of the M and N values Is supplied byuser. If 'N', the values obtained as the experimental errorare used as the SD of the exponents*

(xiv) STD ERROR in M?>STD ERROR IN N?>

The values the user inputs are used as the SD in thefollowing calculations:

M - M + N(O,SD2), N «• N + N(O,SD2).

(xv) DOSE MEAN>

(xvi) DOSE STD DEV>

Enter the parameters of the dose distribution,

(xvii) DOSE-RATE MEAN>

(xviii) DOSE-RATE STD DEV>

Enter the parameters of the dose-rate distribution,

(xix) POPULATION SIZE>

Enter the size of the population to be simulated.

(xx) CHANGES>

If 'Y', go back to (v).

(xxi) TYPE OUT DISCARDED DOSE, DOSE-RATE PAIRS?>

If 'Y1, dose and dose-rate pairs that do not meet therequirement (Dose < Dose rate x Exposure time) are typed andprinted in File, FORO1.DAT. If 'N1, the number of discardedpairs is counted, but they are not typed or printed.

(xxii) TYPE OUT DOSE RATES EXCEEDING 10 000 MREM/MIN?>

The dose-rate values that are greater than10 000 mrem/min are recorded in the file. F0R08.DAT. If'V, they are also typed and printed in the log file. If'N', they are not typed or printed.

(xxiii) X-AXIS VARIABLE

1, YEARLY RESPONSES2, YEARLY DOSES3, AVG DOSE RATES

Page 15: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 9 -

4, YEARLY RESPONSES (R(SUM(DOSES))>5, RESPONSES (DOSE.-DOSE RATE)6, SINGLE EXPOSURE RATE

The user answers with the number of the variable to beplotted.

(xxlv) PLOT SYMBOL>

This must be an Integer between 2 and 9. Thecorrespondence between the code number and the plot symbolIs described In SPLOT [6]. If the code Is negative, thesymbols are joined with straight lines.

If the current curve is not the last In a series, theprogram returns to question (iv); otherwise it continueswith question (xxv).

(xxv) PLOT TITLE>

This title will appear at the top of the plot; it mustnot exceed 45 characters.

(xxvl) X-AXIS ON A LOG SCALE?>

If the answer is 'Y1, the X-axis is logarithmic;otherwise the X-axis is on a linear scale.

(xxvii) X-AXIS LENGTH>

Enter the length of X-axis in inches,

(xxviil) Y-AXIS LENGTH>

Enter the length of Y-axis in inches. It must notexceed 10 in.

(xxix) NORMALIZE DATA (X-AXIS VALUES)?>

If 'Y', all the plot data to be superimposed are scaledto have the same maximum and minimum vaiues as thoseselected at question (xxxii).

(xxx) X-AXIS LABEL>

This label must not exceed 30 characters.

(xxxi) Y-AXIS LABEL>

This label must not exceed 30 characters.

Page 16: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 10 -

(xxxii) X-AXIS RANGES

Run #1:Run #2:

LOW VALUExxxxxxxxx

HIGH VALUExxxxxxxxxx

CHOOSE FROM ONE OF THESE RANGES?>

If the answer is 'Y1, a low and a high value from oneof the runs will be used as the low and high X-value in theplot. The next two questions are asked. If the answer isnot 'Y1, the lower and upper X-values in the plot must besupplied by the user. In this case the program transfers toquestion (xxxv).

(xxxiii) LOW LIMIT RUN

Enter the number of the run whose lowest value is to bethe smallest value on the X-axis.

(xxxiv) UPPER LIMIT RUN #>

Enter the number of the run whose highest value is tobe the largest value on the X-axis.

(xxxv) LOW LIMIT>

Enter the smallest value to be placed on the X-axis,

(xxxvi) UPPER LIMIT>

Enter the largest value to be placed on the X-axis.

(xxxvii) CHANGES>

If the answer is 'Y1, go back to question (xxv);otherwise continue.

(xxxviii) ENTER UNITS/INCH IN Y-DIRECTION>

If this is an interactive run, this question will beasked. The user inputs this scale factor. For batch runsthis scale factor is the ratio of the maximum Y-valuedivided by the Y-axis length.

(xxix) MORE PLOTS FROM CURRENT DATA?>

If this answer is 'Y1, the program returns to question(xxv) and any of the other X-axis variables can be plotted;otherwise ..he program continues.

Page 17: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 11 -

(xl) STOP>

If answered 'Y1, this signals that the MONTEC run isover, the accumulated files ere deleted and execution stops.If 'N', control goes to question (i).

(xli) DELETE F0R08.DAT?>

If 'Y', delete the file FORO8.DAT, which contains thediscarded dose/dose-rate pairs and the dose-rate values over10 000 rad/min (100 Gy/min) before execution stops.Otherwise save the file.

5.2 NON-SIMULATIOM

(v) WANT FIXED DOSE WITHOUT SIMULATION

If the answer is 'Y', calculate the response values fora fixed dose, and dose-rate values that are incremented byfixed steps. If not 'Y1, transfer to other non-simulationoptions. In the present version, no other non-simulationoptions are available. The message "SORRY NO OTHERNON-SIMULATION OPTIONS AVAILABLE" is printed.

(vi) SUPERIMPOSING FIRST ONE ON OLD GRAPH?>

If answer is 'Y', no axes are drawn and this set ofgraphs will be drawn on old axes. If 'Y', questions(xv-xviii) are not asked. If answer is not 'Y1, a new setof axes will be drawn.

(vii) FIXED DOSE>

Enter dose value,

(viii) LOW DOSE RATE>

Enter lowest dose rate to be included on graph,

(ix) HIGH DOSE RATE>

Enter highest dose rate to be included on graph,

(x) NUMBER OF POINTS TO PL0T>

Enter the number of points to be plotted. Thedose-rate range will be divided into this number ofintervals.

(xi) EQUATION NUMBER (1,2 OR 3)>

If Equation (1) is selected, the following questionwill be asked; otherwise the program goes to (xiii).

Page 18: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 12 -

(xli)

(xiil)

(xiv)

(xv)

<xvi)

(xvil)

(xviii)

(xix)

SOD>

If the answer Is 'Y1, use the parameters InEquation (1) that are appropriate for the presence of SOD.If not 'Y', use the parameter for the absence of SOD.

NUMBER OF EXPOSURES/YEAR>

Enter the number of exposures per year.

PLOT SYMBOL>

Enter an integer from 2 to 9. If the number isnegative, the symbols are joined by straight lines. Thesymbols are described in SFLOT [6].

PLOT TITLE>

Enter title to appear on the top of the plot. Thetitle must not exceed 45 characters.

X-AXIS ON A LOG SCALE>

If answer is 'Y', the X-axis is logrithmic; otherwiseit Is linear.

X-AXIS LENGTH>

Y-AXIS LENGTH>

Enter the length of the axis.

X-AXIS RANGESLOW VALUE

Run #1: xxxxxxxxxHIGH VALUExxxxxxxxxx

Run #2:

CHOOSE FROM ONE OF THESE RANGES?>

If the answer is 'Y', the next two questions are asked.If not 'Y', questions (xxii) and (xxiii) are asked.

(xx) LOW LIMIT RUN #>

Enter the number of the run whose lowest value is to bethe lowest value of the X-axis.

(xxi) UPPER LIMIT RUN #>

Enter the number of the run whose highest value is tobe the highest value of the X-axis.

Page 19: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 13 -

(xxii) LOW LIMIT>

Enter the lowest value of the X-axis,

(xxiii) UPPER LIMIT>

Enter the highest value of the X-axis,

(xxiv) CHANGES?>

If answer is 'Y1, the program begins again at (xv). Ifanswer is not 'Y', continue questions.

(xxv) Y-AXIS RANGES FROM xxxxxxxxxx TO xxxxxxxxxx

CHANGE LOWER LIMIT?>

If the answer is 'Y*, statement (xxvi) is typed. Ifthe answer is not 'Y', the lowest Y-value is taken as thelowest value on the Y-axis.

(xxvi) ENTER IT>

Enter the smallest or largest value of the Y-axis.

(xxvii) CHANGE UPPER LDfIT?>

If the answer is 'Y', statement (xxvi) is typed. Ifthe answer is not 'Y1, the highest Y-value is taken as thehighest value on the Y-axis.

(xxviii) STOP?>

If answer is 'Y1, the program halts. If the answer isnot 'Y', the program begins again at question (i).

6. COMMON BLOCKS

Several common blocks are used to transfer variables betweensubprograms. Table 1 contains the names of the common blocks, theirargument lists and the names of the subprograms in which they appear.

Page 20: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 14 -

TABLE 1

COMMON BLOCKS

COMMON BLOCK NAME

TYPE

CONST

IDENT

BATCHJ

MORPLT

PARAM

VALUS

SAVSTF

ARGUMENT LIST

SOD, IEQN, WERR,ANS, ERRORM, ERRORN,SD1, SD2, NEX, FLAG,LL, IRANUM

SUPNUM, JSIZE, NUM

TDAY, TTIME

BATCHQ

MP, ALOR, AHIR

DSTD, DMEAN, DRST,DRMEAN

ALARGE, ASMAL

SAVE, UPSCAL, LWSCAL,YN, YMAX, YPREV

SUBPROGRAM NAME

MTWOD, PRDCT, MINPUT,MSYM, MDOSE, PREOUT,NOTSIM, RSPNS

MTWOD, PRDCT, MINPUT,MSYM, RSPNS, MDOSE,PREOUT, MSET, KFILOPPINF, YDELET, MOUT,FIXRAT

MONTEC9MAIN, PINF

MTWOD, KFILOP

MTWOD, PREOUT

RSPNS, MDOSE,MINPUT

ASTATS, PREOUT

PREOUT, MSET, KFILOP,PINF, FIXRAT

Page 21: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 15 -

7. GLOSSARY*

A - Constant in Equations (2) and (3).

A[NORMAL] - Hold temporary sum of uniform random numbers.

ACCOUNT - Array containing the number of populations values tallied sofar in the simulation.

AHIL - Array containing the largest value of each variable obtainedin each of the simulation runs.

AINC - The size of the increment added to the dose rate during eachiteration.

AIOP - Code for curve superposition. If 'Y1, the curve is to besuperimposed on an old graph; otherwise draw new axis.

ALG - Code for logarithmic X-axis.

ALARGE - Array containing the largest value of each variable providedby ASTATS.

ALOR - Array containing the smallest value of each variable in eachof the simulation runs.

ALREXP - Logical variable when .TRUE, the 2-week or 13-week doselimit is exceeded.

AM - Predicted response mean.

AMEAN - Mean value of a distribution computed from simulationvalues.

AMU - Mean of the normal distribution associated with the re-quested dose-rate distribution.

AMM2 - Mean of the normal distribution associated with the re-quested dose distribution.

AMN - Mean of a normal distribution.

ANS - 1. Code for the presence or absence of SOD.2. Code for the choice of normally distributed or fixed

errors in the exponents M and N.

ANS[FIXRAT] - 1. Code for the presence or absence of SOD.2. Code to change the limits on the X or Y-axis.

* NOTE: In the case of multiply defined variables, the name of thesubroutine(s) using the secondary definition is Included insquare bracke ts.

Page 22: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 16 -

ANSI- Code for default or user-supplied values of the SD in M and

N.

AF[CPD] - Code to obtain 'HELP' program description.

ARRAY - Array containing the values to be scaled and plotted.

ASMALL - Array containing the smallest value of each variableprocessed by ASTATS.

ASUM - Sum of all values of a variable processed in ASTATS.

ASUMSQ - Sum of all the squares of a variable processed in ASTATS.

ATEMP - Temporary storage. Holds the last value of ALARGE.

B - Constant in Equations (2) and (3).

B[LOGO] - Variance of the normal distribution associated with thelognormal.

BATCH - Code to indicate if job is run in batch stream or isinteractive. If BATCH is .TRUE., Y-axis scaling isautomatic.

CH - Code to indicate a mistake in data entry.

COEFVR - Predicted coefficient of variation in response.

CV - Coefficient of variation of a distribution computed fromsimulation data.

DLIMIT - Array holding the accumulated dose when an individual wentover the yearly limit.

DMEAN - Mean value of the dose distribution.

DOS - Name in decimal of file holding dose values (200.EXT).

DOSE - Single dose value.

DOSRAT - Single dose-rate value.

DRATE - Array holding dose-rate values.

DRMEAN - Mean value of dose-rate distribution.

DRSTD - Standard deviation of the dose-rate distribution.

DSTD - Standard deviation of the dose distribution.

DSR - Name in decimal of file holding average dose-rate values(300.EXT).

Page 23: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 17 -

DSRT - Name in decimal of file holding single exposure dose-ratevalues (600.EXT).

E10000 - Array holding dose rates larger than 10 000 mrem/min.

EDOSE - ASCII representation of DOS name.

EDSR - ASCII representation of DSR name.

EDSRT - ASCII representation of DSRT name

EFNAM - ASCII representation of FNAME name.

ERDOS - ASCII representation of RDOS name.

ERE2 - ASCII representation of RES2 name.

ERES - ASCII representation of RES name

ERRORM - Value of error in M from Equation (1).

ERRORN - Value of error in N from Equation (1).

ET - Code to indicate if dose-rate values greater than10 000 mrad/min (100 mGy/min) are to be typed.

F - Mean of the normal distribution associated with the log-normal.

FLAG - Logical variable. When .TRUE., the response is calculatedfrom the total dose and average dose rate.

FLAG2 - Logical variable. When .TRUE., the response is calculated

from the total dose and dose rate equal to the dose/exposuretime.

FLNAME - Decimal representation of the name of the file beingplotted.

FMI - Code for listing program options.

FNAME - Decimal representation of the file containing values to beplotted.

FREQ - Array containing the Y-values of the variable to be plotted.

G - Standard deviation of the normal distribution associatedwith the lognormal.

H - Constant in Lyon's Equation (2).

I - Integer representing the present number of the populationmember, i.e. the I member.

Page 24: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 18 -

I[MONTEC,MSYM,NORMAL,MOUT,FIXRAT] - Counter in DO loop.

II - Dummy argument In ASTATS calls.

IN - Flag to differentiate between first, second and subsequentcalls.

IC - Counter In DO loop.

IDIV - The number of points to plot the current in the simulation.

IDIV1 - Array containing the number of points to plot for each runin the simulation.

IEQU - Response equation number (1-Petkau's equation, 2-Lyon'sequation, 3-Lyon's equation).

IFLAG - Indicates which section of ASTATS code to execute.

IJK - Integer code in input-output error system subroutine.

IJK[MOUT] - Temporary storage of I value.

IQ - Counter in DO loop.

IRANUM - All dose rates of ten IRANUM'th exposure are saved forsingle exposure dose rate.

ISEED - Seed number for random number generator.

ITOT - Counts the number of times the dose-rate criterion (<10 000)caused more than 1000 values to be rejected.

ISVAR - Array containing the code number of the variable to beplotted.

J - Integer representing the J exposure of the year.

J[KFIL0P] - Counter in DO loop.

JJ - Counter in DO loop.

JJ[MSYM] - Code for input-output error in system routine.

JJK - Code for input-output error in system routine.

JSIZE - Array containing the population size for each simulation inthe run.

K - Integer passed to ASTATS as IFLAG.of code to be executed.

It points to the section

Page 25: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 19 -

KfMSYM] - Counter In DO loop.

K2WK - Counts the number of times a dose exceeds the 2-week limit.

K13WK - Counts the number of times a dose exceeds the 13-week limit.

KCUT - Counts the number of values outside the plot range.

KDIV - Absolute value of IDIV value.

KJ - Counts the number of times the dose-rate criterion (<10 000)

caused a dose rate to be rejected. KJ is reset to 0 when itreaches 1000.

KK - Counter in DO loop.

KK[MSYM] - Code for input-output error in system routine.

KYR - Counts the number of times a dose exceeds the yearly limit.

IX - Counter that records the number of invalid dose/dose-ratepairs.

LR/.TE - Lowest dose-rate value in non-simulation run.

LRATE1 - Present, value of dose rate in non-simulation run.

LTITLE - Title of log file stored in F0R01.DAT.

LWSCALE - Low limit of X-axis values.

M - Constant in Equation (1).

M2 - Variable used to calculate the mean of the lognormal.

MM - Array holding code for plot symbols.

MP - Code to Indicate that another graph is to be plotted.

N - Constant in Equation (1).

N[MS0DE] - Maximum number of dose or dose-rate selections per curve.

NEX - Number of exposures each population member will receive.

NO - Code number to identify which variable Is to be processed byASTATS.

NUM - Number of curves to be superimposed.

NUMEX - Array holding the number of exposures an individual had whenthe yearly dose limit was exceeded.

Page 26: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 20 -

ORIGIN - X-axis origin.

PS - Code for plot symbol.

R - Array of responses calculated by method 2,

R2 - Array of responses calculated by method 3.

RATE - Array holding dose-rate values.

RCOS - Decimal representation cf the name of the file containingthe responses calculated by method 2 (400.EXT).

RE2 - Decimal representation of the name of the file containingthe responses calculated by method 3 (500.EXT).

RES - Array holding response values.

RESP - Array holding response values.

RESULT Array of responses calculated by method 1.

RMAX - Maximum response value.

KMIN- Minimum response value.

RNS - Indicates if n w seed is required in random numbergenerator.

RUNN01 - Number of simulation containing the lowest value on X-axis.

RUNN02 - Number of simulation containing the highest value on X-axis.

SAVE - Array that contains the largest and smallest value of eachvariable in a plot request.

SCAEE - Scale factor to normalize curves for sach other.

SCALE Scale factor for plotting.

SD1 - Standard deviation of M value when normally distributederror is selected.

SD2 - Standard deviation of N value when normally distributederror is selected.

SOD - Logical variable .TRUE, if constants for SOD are used.

SPARE1 - Array holding the sum of the dose rate values.

SPARE2 - Array holding the sum of the dose values.

Page 27: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 21 -

SS -

STAND -

STD -

STND -

STP -

SUPNUM -

SYM -

SYMSIZ -

TDAY -

TDOSE -

TITLE -

TITLE [PINF] -

TP -

TRÄTE -

TTIME -

UNITSY -

UHITX -

UPSCAL -

VI -

V2 -

VAL -

VAR -

Standard deviation of the normal distribution associatedwith the lognormal distribution.

Standard deviation of a lognormal distribution.

Standard deviation of a distribution.

Standard deviation of a normal distribution.

Logical variable .TRUE, when individual has exceeded yearlydose limit.

Counts the number of superimposed curves processed so far.

Code to indicate whether it is a simulation ornon-simulation run.

Size of plot symbols.

Date the job was run as supplied by DATE routine.

Dose value.

Name of variable being processed by ASTATS. 45 charactersmaximum.

Title of graph (45 characters maximum). Contains the timeand date.

Code for typing discarded dose/dose-rate pairs.

Dose rate in rad/min (0.01 Gy/min).

Time at which the job was run as supplied by the TIMEroutine.

Number of units per division on Y-axis.

Number of units per division on X-axis.

Maximum value of dose rate.

Variable used to calculate the standard deviation of thenormal distribution associated with the lognormal.

Variable used to calculate the standard deviation of thenormal distribution associated with the lognormal.

Value of parameter being processed by ASTATS.

Standard deviation of the normal distribution associatedwith the lognormal.

Page 28: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 22 -

VAR2 - Standard deviation of the normal distribution aaaoclatedvith the lognormal.

VALUE - Value of parameter being plotted on X-axis.

WERR - Code to Indicate if errors are to hm Included In M and N.

XAX - Array holding all X-values for all curve* to be plotted.

AXIS - Array holding X-values for plotting.

XL - X-axis label.

XLEN - Length of X-axis in Inches.

XMAX - Maximum X-value.

XMDJ - Minimum X-value.

YFL - Temporary storage of random number.

YFREQ - Array holding Y-values for all curves to be plotted.

YL - Y-axls label.

YLEN - Length of Y-axls.

YMAX - Maximum Y-value for a given curve.

YN - Code for normalizing all curves on one plot.

YPREV - The largest Y-value for all curves in one plot.

Page 29: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 23 -

8. MATHEMATICAL SUMMARY

8.1 CORRESPONDENCE OF LOGNORMAL PARAMETERS WITH THOSE OF THEASSOCIATED NORMAL DISTRIBUTION

Consider a random variable X, where Y » log X is normallydistributed (hence is lognormally distributed) and Y has a mean U andvariance a . The mean and variance of the random variable X are

Mx - e(vy + I°y} (4)

2Find W and a .

y y

x y 2 y

2 y'

+ 2 ^

and

2 (2u + a 2 ) , a2

ax - eK y y;(e y - 1)

<••

[2<ln*x " f J) + °y] (eay - 1)

2 22 lnp , o ,.x - e

Mx(e y - 1)

a2 2-f - e"y - 1

2

° " l n ( l

Page 30: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 24 -

Once the mean and standard deviation of the normal distribution are known,they can be used to determine the mean and standard deviation of theresponse distribution using reproductive laws (I) and (II) [8J.

2

(I) If X has a lognormal distribution with parameters V , ° of the

corresponding normal distribution, and a, b, d are constants such

that b - e , then W - bXa has a lognormal distribution with2

parameters (d + aU ) and (a« ) .

(II) If X. and X, are independent lognormal variates with parameters

(Pv , °l ) and (M , °2r ) respectively, then w - X,-X, has ay y y y L o 2

lognormal distribution with parameters [(f + V ) , (° + ° )).

More information on the properties of the lognormal is found in references1 and 8.

8.2 PREDICTION OF RESPONSE PARAMETERS

M ~NIn the case of a radiation response of the form, R - D I , law

(II) shows that, if D and I are lognormal with means and variances of u^,Mj and °_, aj., respectively, then the response distribution is also alognormal with a mean and variance of

and [2(PDV + P ) + ( y + o2 „ ^ + 0 2 y )

where " - e [e -1] (8)

°DY ' M2ln (1T

liIY - N

2 7 "Tand o J Y + iTln (— + 1)

Page 31: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 25 -

Equations (7) and (8) are used In the PRDCT subroutine to predict thevalues of the response mean and standard deviation expected In thesimulation.

From the central limit theorem, it can also be predicted that thedistribution of a responses, each with a lognormal distribution, approxi-mates a normal distribution with a mean of n>"x and a variance of n° . Theapproximation improves as n increases. Under these assumptions, the PRDCTsubroutine also gives an estimate of the yearly response.

Page 32: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 26 -

9. PROGRAM LISTING

» •

• MAIN PROGRAM •

THE MAIN PROGRAM INITIATES THE LOG FlLE ANOC MENU OF OPTIONS TO USER

G—VARIABLE DECLARATION

REAL LTJTLEU2)

C COMMON BLOCKS

COMMON/1MITD/SYMCOMMON/jnENT/TDAV<2>iTTlME

INITIAL PROMPTS AND LOG INFO (LOG INfO STORED AS ro»l-«BAT)

TYPE 1000CALL DATEtTOAV)CALL TIHE(TTIME)WRJTE ( 1 # )TYpE I 0 2 0

ACCEPT 1070.AOPCODTyPE 1030ACCEPT 10001 (LT|TtEtlM"l«l£)

TTJME

WRITE (1.1040) aTITLE<P,l«l,12)WRITE (I.1010) <TDAY<]),l«ll2), TTlMEWRITE (8*1040) (LTJTLEtJ J,I»1,J12)

TWO DIMENSIONS

IF (AOPCOO.EQ.'HE'>IF (AOPCOD.NE.' «>CALL MTWODTyPE 1050ACCEPT i092iSTOPIF (STOp.EQ.tyt)

CO TO 20BO TQ 30

00 TO 4g00 TO

P«JNT OPTIONS

CONTINUECALLTYPE 1050ACCEPT 109Z1STOPIF (STOp.EQ.'YMGOTO 10

STOP

Page 33: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 27 -

OPTION

30 CONTINUETYPE 1060CO TO 10

DELETE FILES lggilfCTC AND FOR06.Q*T

40 IT (SYM ,NE. »V' J GO TO 52CALL YDELET

50 CONTINUE

3 FORMAT STATEMENTS

STOP1000 FORMAT <• ENTER INFORMATION WHEN PROMPTED B Y »>"'>1010 FORMAT <' »,' 0ATEI',2A5,5X,» T J M E I ' , A 5 >

Ute* F0RMAT <' TYPE HEUP FQK PRQC R A M DESCRIPTION OR PRESS RETURNIFOR START OF RUN>'i$)

1030 FORMAT*1 LOG TITLE>»|S)1040 FORMAT <• M 2 A 5 )1050 FORMAT (• STOP?>'»*!

FORMAT (• NO SUCH OPTION—TOUGH LUCK —TRYFORMAT (A2)FORMAT C12A5)

1090 FORMAT (Al)END

Page 34: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 28 -

• MTwQD •

THIS ROUTINE IS THE MAIM CONTROL ROUTINE FOR THE2.0I*ENSIONAI PLOTTING OPTION, IT eALWS ROUTINES TO

THE SIMULATION ANO >LQT RESU|.TS,

SUBROUTINE

VARIABLE DECLARATION

REAL MPINTEGER SUPNUNLOGICAL SOD,FLAG,BATCH

COMMON BLOCKS

COMMON/INITB/SYMC O H M O N / B A T C H J / B A T C H

COMMO\/CONST/SUPNUM# JSIZE <10 >,NUMCOMMON/TYPE/SOD,IEQN,WfcRR.ANSrERRORM,ERRORN»SDl»SQ2!

RM

INITIALIZATION

BATCH*.FALSE.SUPNUM « 1TYPE 1000ACCEPT 1090,ANSIT (AKS.TQ.'B') BATCH • .TRUE.

2 ISEED s Q99999999

REQUEST SUBOPTION PARTICULARS

TYPE 1010ACCEPT 1090, SYHIF <SYM,EQ.«YI) GO TO 20CALL NOTSIMRETURN

MONTE CARLO SIMULATION

CONTINUEIF (SUPMJM.GT.i) GO TO 30TYPE 1020ACCEPT 1080,NUM

Page 35: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 29 -

TYPEACCEPT 1090,RN5IF <RNS.NE\»Y»> GOTO 40TYPE 1040ACCEPT 1080.ISEED

40 CONTINUEWRITC (l.lPSfl)

CAUL, ROUTINES TO DIRECT SIMULATION

CALL MINPUTCALL SETRAN(ISEED)CALL MSV*50 CALL PREOUTIF (SUPNUM.NE.NUM) GO TO 60CALL T

SIMULATIONS DONE.., MORE PLOTS?

TYPE 106EACCEPT 1090iMPIF (MP.NE.'Y'JSUPNUM » iGO TO seSUPNUM • SUPNUH « iIF (MP.EO.'Yf> GO TO 50GO TO 12

C FORHAT STATEMENTS

,000 FORMAT010 FORMAT020 FORMAT.030 FORMATrflHtl FORMAT050 FORMAT060 FORMAT070 FORMAT080 FORMAT

1 INTERACTIVE OR BATCH JOB U OR B>>'.$>1 SIMULATJOI>J?>\$>' NUMBER OF SUPERIMPOSED C U R V £ S > ' I S )' SELECT RANDOM # SEED?>',S)' SEED>'iI)1 SEEOI'iP1 MORE PLOTS FROM CURRENT O A T A ? > ' » S 'A2)I).090 FORMAT (Ai>

Page 36: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 30 -

Page 37: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 31 -

TALLY

50 ASUM<NO>»ASUM(K|O)*VALASUHSQ<NO)«ASUHSQ<NO>ACOUNT(KOJ«ACOUNT(NO)*1,

ATEMP(NC)sALARGE(NO)A L A R G £ < N O ) s A M A X l ( V A L )IP(ATEMPfNO).NE,ALAHGE(NO)) RETURNASMALLRETURN

60 CONTINUE

C CAtClLATE MEAN, STD, DEV,

;STD»SQRT<<ASUMSQCN0>,JASUM(N0)»»2)/AC0UNT<N0>)/(AC0UNT(NDS-i,nCVOSTD/AMEAN

C OUTPUT STATS To TERMINAL

TYPE i000.<TITLE{K),K*l,3>»AMEAN,STD.CVIF (TITLEU).EQ.'SINCL') TYPE 1010WRITE UIIIOBK!) (TITLE<«>IK»1,3>,AMEAN#STD»CV

IF (TITLE(I).EO.'SINGL1) WRJ7E(1,1310>

RETURN000 FORMAT «' l,3A5,4XiG,2X,2<E,2XJ)010 FORMAT (//)

Page 38: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 32 -

•#•#•«•••••#••#•#•••••••••»•••••••••#••••••• •

• PROCT •

THIS ROUTINE PREDICTS RESPONSE PER EXPOSURE ASSUMINGINDEPENDENT QOSE AND DQSE «ATE DISTRIBUTIONS FOR MONT.ER SIMULATION

SUBROUTINE PRDCT<DSTD,DMEAN,ORSTD.ORMEAN)

VARIABLE DECLARATION

INTEGER SUPNUMLOGICAL SOD,FLAG :REAL M.N.M1.H2

COMMON BLOCKS

COHMON/TYPE/SOD,IEQN|HERR,ANS,ERRQRM.ERRORN.S01»

IF (IEQN.NE.l) RETURNWRITCITYPE 1000WRITE (lil01E>TYPE 1010IF (SUPNIJM.NE:,1) GO TO IEWRITE Uil020>

DETERMIN CORRECT EXPONENTS

0 M » 1,44 • ERRORMN a 1,18 • ERRORNIF (,KOT,SOD) GO TU ggM • ,8 •N « ,62 * ERRORNCONTINUE

TBAKSFORH LOG NORMAL PARAMETERS TO NORMAL ANDREP«COUCTIVE LAWS.

VAR > ALOG ( ( D S T O * O S T D ) / ( D M E A N * D M E A N ) * l > >AMM a ALI1G ( O M E A N ) - . 5 • V A RVAR2 = ALOG(<DRSTD»ORSTO)/<DRHEAN*DRMEAN) • 1.)AHHg • ALOG(DRMEAN) - i5«VAKg

Page 39: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 33 -

MiviM2V2F •fi—IT

s AMM*Mg (H*M)«VAR• AMH2 • (-N)• (N«N) • VAR2Mi * M2VI » V8

C E CORRESPONDING LOG NORMAL PARAMETERS OF RESPONSE OlST,OUTPtT THEM TO THE TERMINAL AND LOG FILE.

AM * EXP«F • ,5«G)OOEFVn » SQRT<CXP<G) . 1.)STAND 3 AM»COEFVR

WRITE <1»1032> AM,STAND,COEFVRWRITE <1.1010)TYPE 1032,AM,STAND»CO£FVRTYPERETURN

1000 FORMAT (' PREDICTED RESPONSES ARE PER EXPOSURE*'1010 FORMAT (' «,67«'«'>)1020 FORMAT (27X,'MEAN•,9X,'STD DEV,5X,»COEFF OF1030 FORMAT (' PREDICTED RESPONSE',3G)

Page 40: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 34 -

*••«•#•••••••••••#•••••••*•••••••••••

• MJNPUT •_• »_

THJ5 ROUTINE REQUESTS TERMINAL INPUT FOR THEMONTE CARLO SIMULATION

SUQROUTINE MINPUT

VARIABLE DECLARATION

INTEGER SUPNUMREAL M,NLOGICAL SOD.FLAG

COMMON BLOCKS

COMMON/TVPE/SOO,IEON#WERR,ANS,ERRORM,ERRoRN#SDii'

C0MMON/PARAH/OST0,OMEAN,DRSTD,0RME4N

ERRORM * 0.ERRORN *SOO = .FALSE.

INPUT

TYPE 10B0ACCEPT lg

CHOOSE A RANDOM NUMflER BETWEEN i AND NEX

YFL « RAN(i)« IFIXCYFL<KFL9AT(NEX*1M)

THE COSE RATE OF THE IRANUM'TH EXPOSURE WILL BE SAVEO ANDITS DISTRIBUTION MAV BE PLOTTED

IF ((IRANUM.EQ.0),OR,(IRANUM,CT.NEXJ) GO TO 23TYPE 1010

T 1240,

GO TO (40,90,921) IEQN

Page 41: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 35 -

TYPE 1020ACCEPT 1250,ANSIT (ANSiCQ.'YI) SOP • jTRUC,TYPE 1030ACCEPT 1250.WERRIF (WERR.NE.'V) GO TO 80

TYPE 1040ACCEPTIF <ANS.EQ.»Y«> GO TQ $0

TYPE 1050ACCEPT 1260J ERRORM

TYPE 1060ACCEPT 1260.ERRORN

GO TO 8050 CONTINUE

IF (,NOT,SOD) GO TO 61?SD1 =SD2 = .04GO TO 70

SB CONTINUE501 = .30502 = .15

CONTINUE

TYPE 1070ACCEPT 1250iANSiIF (ANSi.NE.'V) GO TO 80

TYPE 1000ACCEPT 1260.

TYPEACCEPT 1260#SD2

» • >oN « ,82IF (SOD) GO TO 90M • 1,44N • 1.18CONTINUE

S WRITE INFORMATION TO THE LOU FILE

Page 42: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 36 -

WRITE <lili00> NEXWRITE (1»1110) IEQNIF <J£QN .NE.1> TYPE *>27t"" (IEQM .NE.t) WRITS U.1278)IF (IEQN.NE.l) GO TO U 0IF (SOD) WRlTEU,li20>IF (»NOT.SOD) WRITE (1,1130)IF (WERR.EQ,'Y»> GO TO 100WRITE <lill50> ERRORMiERRORN60 TO 110

100 IF (ANS.EQ.'Y') WHITE (1-1KB) Snl.8o2IF (ANS.NE.iyt) WRITE (1.1190) ERRORH.ERRORN

I—IMPUT DOSE AND DOSE RATE 0jSTKIBUTION

110 TYPE 1160ACCEPT 1260.DMEANTYPE 1170ACCEPT 1260.DSTO

120 TYPE 1180

ACCEPT 1260.DRMEAN

130 TYPE 1190ACCCPT lg

TYPE 12ACCEPT 1240#JSIHE(SUPNUH)

WRITE DISTRIBUTION INFO TO LOG FILE

140 CONTINUEWRITE (1.1210)

150 CONTINUEWRITE (1.1220) DRMEAM.ORSTO.JSIEE(SUPNUM)TYPE 1233CCCPTIF (CH.EQ.«Y'J GO TO 10

C CAUL ROUTINES TO PREDICT RESPONSE PER EXPOSUREINITIALIZE SIMULATION COUNTERS

IT (ICON -NC« 1) GO TO 3,60CALL PRDCT(DSTO.OMEAN.ORSTO.DRMEAN)

160 CALL ASTATS<4,A, 11,1,10)RETURN

Page 43: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 37 -

SICC FORMAT STATEMENTS

1000 FORMAT (' NUMBER OF EXPOSURES/YE*R>',S)1010 FORMAT (' RESPONSE EQN (1,2 OR 3J>',S)

FORMAT*' SOD?>'»S)1030 FORMAT <• WANT ERROR IN EXPONENTS M,Nf>»»S)1040 FORMAT <• SELECT NORMALLY DISTRJB. EXPONENT ERROR?>»,S>

FORMAT <' riXCD ERROR IN H>'t»>10601070108010901100

FORMATFORMATFORMATFORMATFORMATFORMAT

< •< •

<

FIXED ERROR IN N>'iS)CHOOSE STD ERROR?>«,S)STO ERRORSTO ERRORNUMBERCQUATION» 'ill)

INYEARLY EXP0SURESIM3)

20130140

150

FORMAT (• SOD PRESENT1)FORMAT (' SOD ABS£NT'>FORMAT (• NORMALLY QlSTRJB, CRRflRi STO1 • IN M:',F,» JN N|«,F)FORMAT (' FIXED EXPONENT ERROR',/,ERBOR EBRQ

160170160190200

FORMAT (» DOSE MEAN>i,S)FORMAT <• DOSE STO OEV>»,S>FORMAT «• DOSE RATE MEAN>'#$)FORMAT (' oOSE RATE STQ O E V > ' , $ )FORMAT «' POPULATION SJ?E>«»$)-FORMAT (' DOSE DOSE STD

•,F,' DOSE RATE STD DEVI «,F,/,220

230240250

FORMAT (' OOSE RATE MEANI1 • POPULATION SI2E» '»FORMAT (' CHANGES7>«11I)FORMAT <1)FORMAT (ADFORMAT (F)

1270 FORMATC RESPONSE VALUES MUST BE MULTIPLIED BY

END

Page 44: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 38 -

• *• MSYM •• •

C MAIN SIMULATION ROUTINETALLIES RESPONSES ACCORDING TO 3 METHODS AND WRITES ALL

C OATA TO DISK TILES.

SUBROUTINE

VARIABLE DECLARATION

REAL RSPNSINTEGER SUPNUMLOGICAL SOD*FLAC,FLAG2iSTP,ALREXPDIMENSION R(1000B).R2110200>iRESULT(10000>

C COMMON BLOCKS

1C0MMON/0R/OOSRK10000)C0MMOM/DnSES/D0SE(D0SrtAT,FLAG2COMMON/OC/TP,Elae00<1000>fET,KJ,lTOTCOMMON/TYPE/SOD. IEQNiWtRR»ANS,ERRORM.ERRoRN»S[)l#- 4 — C D g N E r A G U i A N UCOMHON/CONST/SUPNUM,jSIiE(10),NUMCOMMON/SPARES/SPARE1(10000)#SPARE2<l0g0E>

INITIALIZATION

KYR = 0

STP s .FALSE.ITOT s Z

FLAG2».FALSE.FLAG * .FALSE.LL « 2DO 10 I a 1,JSI2E<SUPNUM)R2(I) = 0.(l) r

SPAREKI) = £.3PARE2<P = Z,CONTINUE

TEHN1NAL

Page 45: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 39 -

TYPE lACCEPT 1010,TPTYPE 1020ACCEPT 1010,ET

C COMPETE iST 2 RESPONSES BY ALL 3 METHODS AND RECORD THEM

C BY A CALL TO ASTATS

DO 40 1 • 1.2ALHEXP • .FALSE.DO 20 J -R E S U L T ( I ) = R E S U L T S ) * R S P N S { 3 , l , j >

FLAG2 s .TRUE,R2(!> = R 2 ( p • HSPNS(3,J,J)FLAG2 = .FALSE,IF (,NOT,STP) GO TO 22STP • .FALSE*GO TO Zl

20 CONTINUE30 CALL ASTATS<3iRESULTU>,JJ,l,I>

CALL ASTATS(3.R2(!)fIti7il>FLAG » .TRUE.R(l) • RSPNS(liIil)FLAG s .FALSE,CALL ASTATS(3iR(I)iII»4,p

4B CONTINUEp

C COMPLTE SUBSEQUENT RESPONSES BY 3 METHODS AND RECORD THEMDO 70 I » 3,JSlZE<SiJPNUM>ALREXP a .FALSE.DO 50 K • l.NEXRESULT(P = RESULT(p • F?SPNS<2, i ,K)FLAG2 = .TRUE.Rg(I) • «2(P * WSPNSjgi I ,K)FLAG2 = .FALSE,IF (,NOT,STP) GO TO 50STP = .FALSE.GO TO 60CONTINUECALL ASCALL A S T A T S ( 2 , R 2 ( P , I I I 7 I PFLAG « .TRUE.R ( l ) « R S P N S d i l i l )CALL A S T A T S ( 2 | R ( P # I I # 4 # I )FLAG a .FALSE.

Page 46: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

n—m

Z RECORD INCOMPATIBLE ANQ OUJ OF RANGE DAT*WRITE (1.1030) LLWRjTE (8.1030) LLTYPE 10Jg.lL

CONTINUE

IF <KJ.EO.0> GO TO 9000 90 i«l,KJWRITE (8/1050) £10000(1)IF (ET.NE.'YM GO TO 90IF (ITOT.EO.O) GO TO 80TYPE 1040GO TO 90

90 TYPE 1050,E12000(J>WRITE (1.1050) E10000U)

90 CONTINUEKJ s KJ*ITOT«1030WRITE (6,lg60) KJWRITE (1»106£>

TYPE 1060,KJ

TYPEWRITE (1.1070)IJR1TC (l»10Oi3) K2WKTYPE 1080,K2WKWRITE (1.1090) K1JWKTYPE 1090.K13WKWRITE (1.1100) KYRTYPE 1100.KYRIf (KYR.EQ.g) GO T

U0-

WR1TE (1.1110)TYPE 111000 \$l I = 1»KYRWRITE <1.1122) NUMEXU>,OUMT<I)TYPE il20,NUMEX(niDLI«T(I)

C RECORC RESPONSES (METHOD l..|R(SUM OF NEx INDIVIDUAL HESP0NSE5)

RES » FLOAT(SUPNUM)/10, • J00.ENCODE (9,1130,ERES> RfcS

OPEN(UN1T s 10, ACCESS « 'SEQOUT f .WRITE(1011142) (RESULT(I),I«1,JSIZE<SUPNUM))CLOSE (UNlTsi0,AcctSS»'SEQOUT',ni,E«ERES,ERR.110)

Page 47: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 41 -

3—REGORO OQSES

DOS • FCOAT(SUPNUM)/10, * 200,ENOOOE <3,ll30,EDOS) QOSOPEN <UNlT*10,ACCESS«:SEQOUT»,Fj1.E*EDOSiE:RR«ll0>WRITE(19»1140) (SPARE2(J) ,J«l ,JSI2C(8UPNUH ) )

( N I T n L 0 P S R BWRITE (1.115a)TYPE 1150WRITE (1.11613)TYPE 1160CALL ASTATS(l,l,'YEARLY 0OSES',2,DCALL ASTATSd,!,'RESPONSE <Rl)',l,l

C RECORD AVERAGE DOSE RATES

DSRsFLOAT(SUPNLlM)/10, * 300.ENC00E(5|113e,E0SR)OPEN < E SWRITE(12.1140) <SPARE1<J>,J«1,JSIZ£(S(JPNUM>>CLOSE (OM!Tsi0,FILE»EOSR,ERR«110)CALL ASTATSd,1,'A^G OOSE RATES',3,1)

C RECOPO RESPONSES (METHOD 2.,,R(SUM OF OOSESJ

RDOS«FLCAT(SUPNUM)/i0. • 400 ,ENCODED,113iZ,ERD0S) RDOS

T E OI ( i l > <R{J>,J=l,JSIzE<SUPNUM))

CLOSE (UMT»i3 l FI l ,E»ERJUS|ERH3i i0 )CALL ASTATSd,1,'RESPaNSC < « £ ) ' , 4 , 1 )

ASTATSd, 1 , ' INQJV, DOSES',5.1>

CALL ASTATSd.1.'INDIV RATES',6,1)

RECORD RESPONSES (METHOD 3... R(DOSEIRATE)

«E3 B rL"AT(SUPNUM)/lg, * 500,ENCODE < 5 E E ;OPEN (UMTaii; l lACCESSsiSEQOUT»,FILEsERE2,ERRa110>WRITE (10 ,1140 ) ( « 2 < J 7 I J = 1 , J S I Z E ( S U P N U M > )CALL ASTATSd,1,'RESPONSE <R3)»,7fl)

RECORD DOSE HATES *>. 1 SINGLE ExPOSUREiS DOSE RATE »tSTR!BUHON-

Page 48: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 42 -

DSRT • FLOAT(SUPNOM)/3,0, • 600,ENCODE <5,1130,EDSRT) OSRTOPEN (UNIT • 10»ACCESS«'SEQOUT',FjLE»EOSRTiERR«110)WRITE (10,1140) (QOSRi(J),J«l,JSIZE(SUPNUH>>CLOSE <UMIT.lg,ril.E«EP8RT,ERR.iig)CALL ASTATSd.l,'SINGLE EXP, R 'fin + n 19AGO TO 120

C FILE ERROR OCCURRED

110 CONTINUECALL ERRSNS(KK,JJ)TYPE 1170.KK.JJSTOP

120 RETURNFORMAT <• TYPE OUT OISCARDED DOSE>POSE RATE PAIHS?>S»>1010 FORMAT (Al)

1020 FORMAT <• TYPE OUT DOSE RATES EXCEEDING 13000 M«EM/MINJ>»,$)1030 FORMAT </,' TOTAL OF 1,15,* DISCARDED PAIRS,')040 F O R M A T C ALL OOSC RATES EXCEEDING 1000Z M R E M / M I N H A V £ « » / ,

1 t BEEN DUMPED TO FJLE FOR08.DATI)FORMAT <F

0 G FORMAT </,' TOTAL OF',L7,' OOSE RATES EXCEEDING 100001,/)070 FORMAT (/»' •••• OOSE LIMITS ••••',/>080 FORMAT (" TOTAL OF «,I6,» EXCEEDED 2 WEEK LLMJT')090 FORMAT (' TOTAL OF ',J6|' EXCEEDED 13 WEEK LIMI T '»100 FORMAT <• TOTAL OF ',1.6,' EXCEEDED YRLY LIMIT •*« H J F O R M A T C — N O * OF EXPOSURES SO TAR AOCUMULATCP D O S C M120 FORMAT (I.lSXiF)130 F0RMAT<F5,l)140 FORMAT (C)150 FORMAT (/,' •••• SJMUL.ATIQN S T A T J S T I C S ••••',//)160 FORMAT (25X,« MEAN STD DEV COtFF OF

FORMAT (> I/O ERRQK, EKROR CODES ARE1 • SEE THE FOROTS ER«0R MESSAGES IN APPENDIX H OF THE'»2 ' FORTRAN LANGUAGE MANUAL FOR EXPLANATION,',/,3 • ERROR OCCURRED WHILE IN SuBROuTINE SYM.»)END

Page 49: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- A3 -

Cc • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

c • •c • RSPNS •c

C COMPETES RESPONSE ACCORDING TO 1 OP 3 EQUATIONS

REAL FUNCTION RSPNS<K|I,J)C VARIABLE DECLARATION

INTEGER SUPNUMLOGICAL SOD,FLAG,FUG2REAL NORMALREAL MiK

COMMON BLOCKS

COMHON/DOSES/DOSE,D0SRAT.FLAG2C0MMON/TYPE/S00,IEQN,rt£RR,ANS,ERR0RM,ERRoRN,SDl»S02,

• 4 -

1COMMON/PARAM/DSTD,DMEAN,DRSTD,DRMEAN

GENERATE A DOSE, DOSE RATE

CALL MDOSE(K,I,J)

COMPUTE RESPONSE ACCORDING TO 1 OF 3 EQUATIONS

GO TO (10,50,60) IEQNPH*£-STOP

EQUATION 1 (PETKAU)

CONTINUEIF (MERS.NEI ' V ) GO TO 38IF (ANS.NE. 'YM GO TO 30IF <SOD) GO TO 20

M . NORMAL(1.44,SD1)N • N0RMAL(1.19,SD2)

60 TO 40M - mnoM^if a n . e f n I

N = N0RMAL(.fl2,SD2>GO TO 40CONTINUEM • 1.44 • ERRORMN • 1,18 • ERRORNIF (,NOT>SOD> GO TO 40M s ,80 * ERRORMN a ,82 * ERRORN

Page 50: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 44 -

40 CONTINUERSPNS « (DOSE •• M> • (0OSRAT»»(-N>>RETURN

ISC EQUATION 2 CI.YON QUADRATIC)

C NOTE I RESPONSES MULTIPLIED BY 1(9«*8 TO BRING THEM UP TO

CONTINUE• 8i6*E-8

B p l,7eE-8H • 2.46E-9

MULTIPLY DOSE RATE 9Y 10#««3 TO CHANGE MREM/MINTOTRATE«D0SRAT«l,E-3RSPNS = DOSE • (A • B»ALOC(TRATE) • H»ULOC<TRATE> )»*2)<SPNS - RSPNS & (lg*«8)RETURN

7 EQUATION 3 (LYON LINEAR) SEE NOTE EQUATION 2

CONTINUEMULTIPLY POSE PATC BY 10*^»3 TO CHANCE MR£N/HIN TO

A = -3.«5E-8B « -1.9E-8TRATE«D0SRAT»l,E»3RSPNS * OOSE • (A • B»<ALOG<TRATE)))RSPNS = RSPNS* Ui3»»8)RETURNFORMATC RESPONSE EQUATION INVALID -- STOP')END

Page 51: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 45 -

• MOOSE •

•#••••••••*••••••••••••#•#•#•#»••••#••#•

GENERATES DOSES AND DOSE RATES ACCORDING TO METHOD 1#2 0R3DEPENDING ON HOW RESPONSE JS CALCULATED. TALLIES THEH BYASTATS,

SUBROUTINE MQOSHKI 11 J>

VARIABLE DECLARATION

LOGICAL FLAG,SOD,FLAG2#STP,ALR£XP

REAL LOGO

INTEGER SUPNUM

COMMON BLOCKS

ALREXP

COMMON/TYPE/SOO, IEQN,WERR,ANS,ERR0RM,ERR0RN»SD1»S02 I1 NEX,FLAG,LL.IWANUMC0MM0N/CONST/SUPWM,jSl2E<]C0MMON/DQSES/D0SE,DGS«AT,FLAG2

COMMON/DR/DOSRK10000)COMMON/PARAM/DSTD,DHEAN#DRSTO,ORMEAN

CONTROL ACCORDING TO METHOD OF COMPUTING

METHOD 3

IF (FLAG2) GO TO 120

METHCD 2

IF (FLAG) GO TO 110

MONTE CARLO

DOSE s LOGD(DSTD,DMEAN)D 0 S R * TIF (DOSRAT-(DOSE/(37,5«(52,/NEx)«60.)>>CONTINUEIF ((LL.NE.0J.OR,<TP,NE,'V«J) GO TO 30TYPE 1002WRITE <1»100C>

Page 52: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 46 -

IF (TF»KC. 'V ) GO TO 40TYPE 1010,DOSE,DOSRAT"WRITE (1,1010) DOSE,DOSRAT

40 LL • LL * 1GO TO 10

'0 CONTINUEN m (I*l)iHCX»JCALL A S T A T S ( K , 0 0 S E , I I i 5 , N J

CALL ASTATS(K,DOSRAT,JI i6 ,N>IF <J.NE.IRANUM) GO TO 60WRjTE ( 9 , 1 0 3 0 ) DOSEO O S R K I ) » OOSRATCALL A 5 T A T 0 ( K | D 0 S R A T I I 1 I 8 I I )CONTINUEIF (DOSRAT.LEM0030) GO TQ 70KJ • KJ * 1El0000fKJ) • DOSRATIF (KJ.LT.1000) GO TO 70

C (1.1080)TYPE 1020IT0T » IToT • 1WRITE (6.1030) (E10000<IC),ICB1,KJ)KJ » 2

70 SPAREld) = DOSRAT •SPAn£2(I> i. DOSE *IF (NEX.NE.26) GO TO 80IF (DOSE.LE.600) CO TO 60IF (ALREXP) GO TO 80K2WK s K2WK + 1ALREXP • .TRUE.

Ml IT (NCX'NCM) GO TO 90IF <DOSE.LE.3000) SO TO 90IF ULREXP) GO TO 90K13WK = K13WK • 1ALREXP • .TRUE,IF (SPARE2(I> .LE, 5000) GO TO 120KYfi • KVR * 1NUMEX(KYR) s JDLIMT(KYR) = S P A R £ 2 ( MS P A R K P SPAR£l(p/NEX

(KSPARE1<1)1S P A R E K P = SPAR£l(p/NEXCALL ASTATS(K,SPARE1<1),11,3,1)CALL A S T A T S ( K , S P A R E 2 ( P , I I , 2 , nSTP a ^TRUC.RETURN

Page 53: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

(100 CONTINUEIF (J.NE.NEX) RETURNSPARE1U) » SPAREi( I ) /NExCALL ASTATS(K,SPAREl<J) , IJ i3 i I>CALL * 6 T A T 6 ( H , S P * R £ a < I ) , ; i > a , I )RETURN

! (METHOD 2)i

10 DOSE • SPARE2(I)D06RAT • SPAREK1)RETURN

(METHOD 3)

20 CONTINUED03RAT • DOSC/(37.5*6g|»<5gi/NCX))RETURN

000 FORMAT (' DISCARDEO PAIRS »,/, ' DOSE DOSE RATE •)010 FORMAT (2F)020 FORMAT «' 1000 DOSE RATES > 10000. , .DUMPING TO H U FOR08.DAT«>030 FORMAT <F)

Page 54: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 48 -

• •• LOCO •

GENERATES A VALUE FROM LOG NORMAL DISTRIBUTION HAVINGMEAN OF AH AND STANDARD DEVIATION OF S.

»CAl FUNCTION LOCD<S|»M)

K a 12B a ALOC{(S#S)/(AM«AM>* I,)SS • SQRT(B)AMM • ALOG (AH) • >5>BA • 0,0DO 10 I « 1,KY

A 3 <A-<FL0AT(K)/2.>LOGD a EXPtAHM » (A»SS>)R

GDRETURNEND

Page 55: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

• •• SUBROUTINE NORMAL •_# »_

GENERATE A VALUE FROM NORMAt, DISTRIBUTION CURVE HAVI^G A GIVENMEAN AND STANDARD OEVIATION,

REAL FUNCTION NORMAL<AHN,STND)A • 0,0DO 10 I • 1.12Y * RAN<1>A « A + YA « A - 6.NORMAL • A«STNO « AMNRETURNEND

Page 56: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 50 -

It • •

w> • MQUT

Z THIS ROUTINE COMPUTES THE H L E NAME FOR EACH RUN AND CALLSROUTINE TO OPEN THE FILE A*D PLOT THE INfORMATlON jT CONTAINS,

SUOROUTINC HOUT

VARIABLE DECLARATION

INTEGER SUPNUMDIMENSION IDIVK10)

C COMMON BLOCKS

COMMON/CnNST/SUPMJM,jSJ!EU0),NUMCOMMON/PLST/MN<10)ilXVARU0>

DO 60 I • l.NUMFLNAME • F L O A T U X V A R U M n a B , * FLOAT ( I ) / 1 0 .I D I V K I ) r IF IX(SQRT(FLOAT(JSlZE<n>) )IF U . N E . i ) IDIV1C1 > • -IJK=1

C GO TC CORRECT X-AXI>S VARIABLE INSTRUCTIONS.

10 GO TO ( 2 0 , 3 0 . 4 0 , 5 0 I 6 0 I 7 0 )

CONTINUE

GO TO 80RETURN

CONTINUECALL KFIL0PCFLNAME,2,!0IVl,lJK)GO TO 80CONTINUECAUL KFlL0P(FLNAME»3,lDjVliijK>GO TO 817

CONTINUECALL KFILOP(FLNAHE,4,IDIV1|IJK)GO TO BZ

CONTINUECALL KFIL0P(FLNAME»7ilDIVl,IJK>60 TO 88

CONTINUECALL K F I L 0 P ( F " L N A H E . 0 I I D I V 1 , 1 J K >CONTINUERETURN-BHB

Page 57: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 51 -

* *• PREOUT •

#•##*••••••##•##•##•#»••#••••###•••••••••

THJS ROUTINE REQUESTS THE PLOT TYPE ANO SAVES THECORRESPONDING UPPER AND LOWER LIMITS,

SUBROUTINE PREOUT

C VARIABLE DECLARATION

LOGICAL SOD,FLAGINTEGER SUPNUMREAL LWSCALiHP

C COMMON BLOCKS

COMMON/MtCOMMON/VALUS/ALARGE(18>,ASMALL<10>

1 SOI,S02.NEX,FLAG,LLiIRANUMCOMMON/CONST/SUPNUM,JSIZE<10>,NI!MCOMMON/PLST/MM(l0>,IxyAR(i0)

INITSALIEATION

IF (SUPMJM.GT.D GO TO 10LWSCAL s 999999999.UPSCAL s 0.

C REQUEST PLOTC10 TYPE 1020

ACCEPT 101BfIXVAR(SUPNUM)

FIRST TINE THROUCHi PHIMT OUT HANGCS OF ALL SIMULATIONC DATA, ALSO, WRITE IT ON THE LOG FILE.

IF (MP.EQ.'Y1) GO TOTYPE

DO 10g KK rALOR<KK.SUPNUH) s ASMALL(KK)AHIR<KK,SUPNUM) . ALAKGE(KK)GO TO (20,30.40,50,60>70i80»90) KK

20 TYPE 1030,ASMALL(KK)|ALARGE(KK>WRITE (I#li33£:> ASMALL(KK),ALARGE(KK)GO TO 100

30 TYPE 1040,ASMALL(KK),ALARGE(KK)WRITE ail04/7) A S M A L L ? K K ) , A L A R G E ( K K >

GO TO

Page 58: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

r- 52 -

TYPE 1050,ASMALL(KK),AURGE(KK)WRITE (1.1050) """ "'GO TO 100

30 TYPE 1060,ASMALL(KK)IALARGE(KK)

60

70

80

WRITE (1.1062) ASMALL<KK)>ALAR6C(KK)60 TO 100TYPE 107B»ASHALL(KK)i«URGE<KK>WRITEUil070) ASMALL(KK)#ALARCE(KK)CO TOTYPE 1080,ASMALL<KK),AURGE<KK>WRITE <1»1080> ASHALL<KK5,AlARGE(KK)GO TO 100TYPE 1090,ASHALL(KK),AUARGE{KK)WRITE (1.109a) ASMALLfKK)iAURGE(KK)GO TO 100 :TYPE ilB0,ASMALL<KK),Ai.ARGE(KK)WRITE (1,1102) ASMALL(KK>,ALARGE(KK)CONTINUE

TYPE maWRITE (1»1110)

90

100

C SAVE THE UPPER AND LOWER LIMITS CORRESPONDING TO THE PLOTC TYPE REQUESTED (NEEDED FOR PLOTTING), REQUEST PLOT SYMBOL

110 ALORUXVAR(SUPNUM),SUPNUM>AHIR.UXVAR(SUPNUM>,SUPNUM>

IF (<lXVAR(SuPNuH),NE.5)tANP,nxVA-R(SuPNuH).NEi6>SAVE<1»SUPNUM)«ALOR<IXVAR(SUPNUM)*2,SUPNUM)SAVE<2,SUPNUM)«AHIR(IXVAR{SUPNUM)*2,SUPNUM)

20 LWSCAL • AMIN1(L WSCALI SAVE<1ISUPNUM))UPSCAL * AMAX1(UPSCAL»SAVE(2,SUPNUMJ)TYPE 1120ACOCPT 101fl,MM<SUPNUM)

00 TO 1B0

NOTE

000

RETURN« THE INDIVIDUAL DOSES ANO DOSE RATES ARE COMPILEDJN ASTATSiBUT THEY ARE NOT SETUP FOR PLOTTING','FORMAT </" X-AXIS VARIABLE'*/.1 ' 1.YEARLY RESPONSES!,/,' 2*YEARLY DOSES1,/,o t T i\lr nnac P i T r c » . y t A i f r . n i v a r - c o f t M e r c I B I

COOES 546-

3,AVG DOSE RATES!,, IYEARLY <R<SUH<DO )>

010020030

3 • 5.RESP0NSES (OQSE I DOSE RATE',/,4 i 6,SINGLE EXPOSURE RATE',//,' >••$>FORMAT (I)FORMAT (/,' •#••• DATA RANGES •••••FORMATFORMAT (

YRLY RESPONSES <RI> RANGEYRLV DOSES RANGE

TO >*G>•40-

050 FORMAT (' AVG, DOSE RATES RANGE060 FORMAT (• YRLY RESP0NSfcS(R2) RANGE070 FORMAT (• INDTV DQSES RANGE080 FORMAT (« INOIV RATES RA>MGE090 FORMAT (• YRLY RESPONSE {R3> RANGE

"ORMAT (f SINGLE EXPOSURE fi

TO «#G)TOTOTOTO

110120

FORMATFORMAT ('END

/)PLOT SYMBOL>'|5)

Page 59: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 53 -

« *• MSET •

SUBROUTINE M S E T U R R A Y , I D I V , N 0 , 1 ( A L G >

C VARIABLE DECLARATION

INTEGER SUPNUMDIMENSION ARRAY(10000>

C COMMON BLOCKS

COMMON/XY/FRf.Q(l0g),XAXIS(10g),KCUT

B—INITIALIZATION

YMAX a Z,0SCALE = 1.KDIV » lABS(IOIV)DO 10 JJ s 1,120FREQ(JJ) • g,

IF <ALGtNE.'Y< J GOTO 23SAVE(l.n=ALOG<SAVE(l,n>

0 IF <YN,NE. 'Y'l GO TO 30SCALE = <uPSCAL-LHSCAt),/(SAvE(a.n-SAvE{lin)

0 CONTINUE

PREPARE Y ARRAY

00 70 JJ = lrJSlZE(I)IF tALC.EQ.'YI) ABKAYfJJ1.AL0C<ARRAY(JJ)>-IF CYN.NE.»Yf > GO TO 40VALUE = URRAY(jj) - SAVEU, J) )*SCALE *TYPE IZZB,VALUE,UPSCAL#LWSCALGO TO 52VALUE = ARRAY(JJ)CONTINUEIF U L C . E Q . ' Y » ) ARHAYUj ' * EXP(ARRAY<JJ>)

00 60 KK = 1,KDJVIF <VALUE.GT,(FLOAT(KK)/FLOAT<KDIV)«<UPSCAL-LWSCAL)

1 LWSCALM GO TO 60FREQ(KK) = FREQ<KK> • 1.GO TO 7gCONTINUE

Page 60: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

IF (KK.GE.KDIV) KC'JT«KCUT*i70 CONTINUE

IF (ALG.NE.'V) GO TP 60

30 WRITE (1*1010)

TYPE 1010,KCUT,I

FJND MODE

DO 90 JJ • liKOIVIF (FREQ(JJ).LE.YMAX) GO TO 90KP s JJYHAX • FREO(JJ)

90 CONTINUE

C PREPARE X ARRAY

DO 100 JJ s 1.KDIVXAXIS(JJ) C LWSCAU * FL«3AT(JJ)/FLOAT(KDIV) •

1.00 CONTINUE

IF (N0.EQ.1) ANAM»'KESPN«IF (N0.EQ.2) ANAM=rO0SE 'IF (N0.EQ.3) ANAMx'AV RT'IF (N0.EQ.4) ANAM«'«{DOS«IF (N0.E0.5) ANAM='H(DJR»IF (N0.EQ.6) ANAM » '1 RAT1

WRJTE <1»1020)

RETURN1000 FORMAT <« VALUE,UPSCALiLWSCAU«',3F)1010 FORMAT (• ',15,' VALUES OUT OF PLOT RANGE. *UN ••»I2>

FORMAT (t MODE «i,f,t OATA PLOTTED; I , A 5 I ' CURVfc »| >.U)END

Page 61: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 55 -

* •

• KFILOP •

CALLS PLOT INFO ROUTINE, OPENS FILE, CALLS ROUTINE TO PREPAREARRAYS FOR PLOTTING AND THEN PLOTS

SUBROUTINE KFlLOP<FfUMiNOiIUtVI,|)

C VARIABLE DECLARATION

LOGICAL BATCHINTEGER SUPNUM

LWSCALDIMENSION XAX(i0# i00>,YFREQ<10,103JDIMENSION T l T L E < 9 > i X L ? 6 ) | V H 6 )DIMENSION ARRAYU0000)DIMENSION I D I V K 1 0 )

;N DLOCKS

COMMON/BATCHJ/SATCHCOMMON/XY/FREQ(100),XAXIS(100),KCUTC O M M O N / C O N S T / S U P N U M , J S I Z E < 1 0 ) , N U MC P r R

I F ( I . E Q t X ) CALL PINF<TlTLE,Xi. ,YL,N,XLEM,YLEN,ORlGIN;gNlTSX,1 S S Z

READ(10i1010) (ARRAY(j),Jcl.JS!2E(I))C L O S E ( U M T s i 0 R RI D I V s I O I V K p

NUMBER » vCALL KSET(ARRAY,IDIV,NUMBER#I,ALG)TYPE 1020.I .YMAX

A X P R

YPREV =

0 0 1 0 J « l . K Q I VXAX(I ,J> = XAXIS(J)YFREQ(IiJ) s FREOU)CONTINUEIF ( I tNE

Page 62: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 56 -

DO 50 J • l.NUMKD1V»IA6S(IDIV1(J}>DO 20 KK«1,KD1VXAX1S(KK)=XAX<J,KK>FREQ(KK)«TTREQ(J,KK)

CONTINUEIF (J.NE.l) GO TO 40

IF (.NOT,BATCH) GO TO 30UNtTSY B YMAX/YLENGO TO 40

30 TYPE 1030ACCEPT 1B4B.UNITSY

40 CONTINUEMsMM(J)IOIVelDlVKJ)CALL SPL0T<lDjV,NtM,TlTLE»XLiYLiXAXl9iFREQ'

0RlGlN»UNlTSX1 XLEN»0..UNITSYiYLEN)CONTINUEGO TO 71?

FILE ERROR OCCURRED

*0 CONTINUECALL ERBSNS(IJK,v)JK)TYPE 105B.IJK.JJKSTOP

2 RETURN000 F0RMAT(F5.i)010 FORMAT (G)

FORMAT (i MAX Y VALUE, RUN ',13,' IS 'iG)030 FORMAT (« ENT^R UNITS/INCH IN Y - D J R E C T I O N V » S J040 FORMAT (F)050 FORMAT (' I/O ERROR. EKROR CODES ARE «,l4»' , • • 14,

1 • OCCURRED IN SUBROUTINE KFILOP. SEE THE FORQTS ERKOR ',2 /,'MESSAGES IN APPENDIX H OF THE FORTRAN LANGUAGE '»

' HAMUAL FOR Exylir*NATlON, ')END

Page 63: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 57 -

•#•••••#•»•••»•»•••»•••••••••••••••#•#•••

• PJNF •

SUBROUTINE PINF(TITLE,XL,YW»N,XLENiYLEN,ORlCtN»1 UNITSX.SYMSJE.AIG)

VARIABLE DECLARATION

REAL LWSCALINTEGER SUPNUM,RUfyN0lfRUNN02OIMENSION TITUE(9),XL?6),Y|.<6)

-COMMON BLOCKS

COMMON/IOENT/TOAY(2>,ITIME

INITIALIZATION

2 N««2

XHIM iXMAX • e.0

T I T L E ( D « T lT1TLE<2)«TDAY<2)

RSQUtST TERMINAL INPUT

TYPE 1ACCEPT H 6 0 . (TlTLE(KK),KKss,9)TYPE 1010ACCEPT 1200,ALGTYPEACCEPT 1190.XLENTYPE 1030ACCEPT 1190,YLENTYPE 1040ACCEPT 1200,YNIF (YK.ME.'Y*) CO TO

= 'NORMA'XL<2> = 'LIHEO'TYPE 1050ACCEPT 12l0,(XL(KK>,KKs3i6>GO TO 30TYPE 1050ACCEPT 1170,(XL<KK),KKei,6>

Page 64: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 58 -

Page 65: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 59 -

1060109011001110112j)1130114011501160117011 f\a

119012001210

FORMATFORMATFORMATFORMATFORMATFORMATFORMATFORMATFORMATFORMATFftflM A T• UT?n^ rFORMATFORMATFORMATEND

<25X,f LOW VALUE HIGH VALUE*>(• RUN # ( i l 3 , M M 5 X , 2 F )(• CHOOSE FROM ONE OF THESE RAN6ESf>«,S)<• LOW LIMIT RUN #>',*>(t UPPER LIMIT P(JN M>' f)V LOW LlMlT>',S)(• u p pE R tIHIT>»|l)(' CHANGES?>i,S)(3A5)<6A5)I T *

<F)(Al)(4A5)

Page 66: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 60 -

C

•»••••••#••••••»#*•••••••••••##••••••#•••••••

C cOMpUTE8 RESPONSE FOR VARYING DOSE RATE, HXED D°SE, PLOTS DOSERESPONSE CURVES

SUBROUTINE H X R A T

VARIABLE DECLARATION

INTEGER SUPNUH.PSREAL LRATE,H,N,LWSCALiLRATElDIMENSIO l6)Yl1 MM < 10), RATE (10i 100) i RES( l(5i 100)

COMMON BLOCKS

COMMON/CONST/SUPNUM

INITIALIZATION

r JS

RMAX = -999999999,1LWSCAL • RMINUPSCAL " RMAX

REQUEST TERMINAL INPUT

TYPE 1000ACCEPT 118B.NUMTYPE 1010ACCEPT 1190.AIOPDO 132 JJ sSOD • .FAL6CTYPE 1020ACCEPT 1170.TOOSE:TYPE 1030ACCEPT U70.LRATEIF (LRATE.CE.TOOSE) CO TO 30TYPE 10*0GO TO 22TYpE 1050ACCEPT 1170.HRATETYPE 1060ACCEPT 11601IDIVTYPEACCEPT 1180.IEQNIF (IEQN.NE.1) GO JO 40

Page 67: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 61 -

EQUATION 1, FURTHER TERMINAL INPUT REQUIRED

TYPE 1080ACCEPT 1190,ANS

IF (ANS.EQ.'Yi) SOO • .TRUE,M * ,8N - ,82IF (SOD) GO TO 40

N a 1,1840 CONTINUE

TYPE 1090ACCEPT 1180iAINC » (LRATE1 •TYPEACCEPT H80,MM(JJ>

GO TO (50,70,921) IEQN

TYPE 1110GO TO 10

C COWPITE RESPONSE, EON. 1

CONTINUEUO 60 I « l.IDIV»ATE(JJ#I) s lRES<JJ,P = <TDOSE««M> • < U R A T E 1 » * < - N ) ) • NEXRMAX » AMAXKRMAXtRESJJJ*!) >RMIN * AMiNl(RMINrRES{JJ,I))LRATE1 » LRATEl * AINCCONTINUEGO TO 123

E RESPONSE, EQN 2RES(JJ,Ds TOTAL RESPONSE-0 DOSE RESPONSE (C=8,l2E«6)SCE M. LVON

CONTINUETYPE 1220WRlTEd'12021)00 80 I - l . I O I v

U4$\) - LRATElA s 8 .66E-8B « 1.7BE-8H * 2 .46E-9

Page 68: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 62 -

R E S ( J J . I > E R E S ( J J I | > * 1

RESPONSE IS niji.TiFt.up BY io**< TO BRINK I T TQRMAXRHIN * AMIN1(RM!MES(JJ|I))LRATEI=IRATEI*AINC

00 CONTINUEGO TO 120

C COMPUTE RESPONSE, EQN, 3R C S ( J J , I > * T 0 T A L RESPONSE . 0 DOSE RESPONSE <C«8-l2£.6>SEE M, LVON REFERENCE

90 CONTINUETYPE 12BB

IF (HRATE.LE.0,009) GQ TO 100TYPE 1120GO TO 10

100 DO lie 1 = i.IDIVRATE <ju»n •A p -3.65E-8B • «1.92E-8RES <JJ»I) • (TOOSE#(A*B«Al.Oe{LRATEl)>)»NEXRESPONSE IS MULTJPUIED BY 10»»8 TO BRING IT TORESCJJ,n=RES(JJ,l>»l0*»8RMIN * AMIN1<RMIN,RES(JJ,I>)LRATE1 « LRATEl * AINC

110 CONTINUE

Ï PREPARE INFO FOR PLOTTING

120 CONTINUESAVE <IIJJ> = LRATES A V E < 2 , J J ) S HRATELWSCAL • A M I N K L R A T EUPSCAL » AMAXKHRATEtUPSCAU)CONTINUESUPNUM » NUM

CALL PlNF(TlTLE.XLiYLlIORDER,Xl.ENiYLEN,ORlGlN,Uf1'lTSX,SYMSl«,(„c)

TYPE 113£,RMIN,RMAXTYPE 1140ACCEPT 1190,ANSIF «ANS.NE.'Y'J GO TO 140TYPE 1150ACCEPT 1170,RMIN

Page 69: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 63 -

H40 TyPEACCEPT 1190,ANSIF fANS,NC*'Y'> CO TOTYPE 1150ACCEPT 1170,RMAX

150 UNITSy • (RHAX - BMJN)/yLEN

B©-00 162 KK t 1,101VDRATE(KK)« R A T E U J I K K )RESP(KK) > REStJJ,KK)

160 CONTINUEPS«MM(JJ)KDIVIOIVIF ( { A I 0 P . E Q . « Y ' ) I O R , ( J J , G T , 1 ) | KD|V»-IDIV

Z PL07

CALL SPLOTtKDIV , IORDE«iPS,T ITLE,XL.YL,DRATE»RES P .1 O R I G I N UNI T S X X L C B H | N U I T S ¥

70 CONTINUE

FORMAT STATEMENTS

1000 FORMAT (• HOW MANY NO SIMULATION CURVES TO SUPERIMPOSED' , $ )

1010102010301040

FORMATFORMATFORMATFORMAT

-6RE-A

SUPERIMPOSING FIRST ONE ON OLD GRAPH?>%5>FIXED DQSE>'#S>LOW DOSE RATE>»,$)INVALID DOSE/DOSE RATE PAIR. CHOOSE

ER THAN POSE'i10501060107010801090U00-

FORMATFORMATFORMATFORMATFORMATFQRHAT<

HIGH OPSE RAT£>',S)NUMBER OF POINTS TO PLOT>«,SJEQUATION NUMBER (Ii2 OR 3)>l,$)SOD?>',$>NUMBER OF EXPOSURES / YEAR>«,$>

PLOT SYMBOL'1110112fl

11301140

FORMATFORMAT1 LESSFORMATFORMAT

INVALID EQUATION NUMBER — TRY AGAIN1)RATE (IN RAO/MIN) IS TOO HIGH — MUST BETHAN .009MY-AXIS RANGES FROM '.P.1 TO »,F>CHANCE LOWER LIMIT?>",$)ENTER 1" • '• '

LT>t

1160 FORMAT <• CHANGE UPPEK L I M I T > ? » , S )1170 FORMAT <F)1180 FORMAT (I)1190 FORMAT (Al>1200 FORMAT(//' RESPONSE FROM LYON

lEQUATlON MUST BE M J L T I P L I E O BY 1g«<>6'//)END

Page 70: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 64 -

C

* NOTSIM •

THIS SUBROUTINE ROUTE CONTROL, TO FIXRAT A NO ANY«NON SIMULATION SUBROUTINES WHICH MAY BE WRITTEN

SUBROUTINE NOTSlM

C VARIABLE DECLARATION

LOGICAL SOO.TLAG

; COMMON SLOCKS

COMMON/TYPE/SOD,1 EON,MERR,ANS,ERRORM.ERRORN»SO1

TYPE 1020ACCEPT 1020.SUBOPIF <SUBCP,EQ,'Y«) CO TOGO TO 20

10 CALL FIXRATRETURN

20 TYPE

!5—FORMAT STATEMENTS

RETURN000 FORMAT <• WANT FIXED DOSE WITHOUT SIMULATION ,$)010 FORMATC SORRY NO OTHE» MON_SIMULATION OPTIONS AVAILABLE?')« 2 « F A T <Aa>O

END

Page 71: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 65 -

• •

• OPTION •

•••••«••«•••••••«(>•••••••••••••••«•«••*•••••#«

SUBROUTINE OPTION

C—THIS ROUTINE—LISTS AND QV BRIEF DESCRIPTIONS Or IONS AVAILABLE:C TO USER,

TYPE 1000TYPE 1010ACCEPTIF (FMI.NE.'CM RETURNTYPE 1030RETURNFORMAT {• OPTIONS| 1. AMONTE CARLO SIMULATION './,1 • (CHOOSE DOSE AND DOSE RATE INDEPENDENTLY FROM A',/.

ILOCMORHAL DISTRIBUTIONS/,

010020030

3« OR A HON-SlMULATjON RUNFORMAT (» FOR MORE I F O R

j JH Fj DOSE AND VAJABLEINFORMATION TyPE C >

FORMAT <Al>FORMATC THIS PROGRAM IS WRITTEN TO SIMULATE THE E F F E C T S ' , / ,1 • ON A GIVEN POPULATION SUBJECTED TO VARIOUS RAOJAMON'# / ,

URE S T U T I O N S O E I N A E C O SGI L I J D U J M ,

EXPOSURE SITUATIONS, ONE OF 3 EQUATIONS CAN BE CHOSEN TO'CALCULATE THE EFFECTS <OR RESPONSE). THESE. ARES1,/,1* RB (D •• M) X (I •• UN)) PETKAU',/,2J Rs(R"«C> = D(A * B(LN(p) * H<LN(p)**2 '•/,31 RB(Rn-C)* D(A * B(LN(f))*«2)•,/>

WHERE D a DOSE, I = RATE, C.A.B.H • CONSTANTS',/,Rl,Rg AND R3 DENOTE RESPONSE CALCULATED BY THESC 3 METHODSRESPECTIVELY,',/,Rlr YEARLY RESP.» SUM OF EXPOSURELY RESPONSES',/;R2' YEARLY RESP. « RESPONSE CALCULATED FROM',/,

TOTAL YEARLY DOSE AND AVERAGE Y E A R L Y OOSE RATE1,/,R3» YEARLY RESPONSE » SUM OF EXPOSURELY RESPONSES',/,

WHERE DOSE IS SELECTED FROM A LOCHORHAL OISTRIBUT1ON*,/,AND DOSE RATE IS CALCULATED BY DIVIDING THE DOSE BY A',/,CONSTANT, BEING 37,5 X 60 X (52/NUM. OF EXP.) ')

Page 72: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 66 -

• YPCLET •

PROGRAM TO DELETE WORKING F2LCI 100.1,200.1».'.. • *0i.l.i00.2.ETC,AND FOR06.OAT,

SUBROUTINESUBROUTINE yOIILETCOMMON /CONST/8UFNUMiVSIiE(].0)iNUMCHANGE NAME TO A$OIIDO 5f Jil,NUMENCODE(3i1010|EXX1 j00 40

ENCODE(911000iNAME) IIDELETE FILECALL OELETC(K,l0,NAMEiEXX)GO TO U0,20*40,30)TYPE 1020,NAME,EXXGO TO 40

20 TYPE 1030,NAME,EXXGO TO 40

30 TYPE 1040.NAME,EXX40 CONTINUE

CONTINUEI

ITYPE 10P0

DELETE FOR08.DAT

ACCEPT 1060,AIf (AtCQ.'N')

EEXX.'DAT'CALL DEIETE(K,6,NAME,GO TO *$0,70»90,80> K*3

60 TYPE 1020,NAMEiEXXGO TO 9H0 TYPE 1030.NAME,EXXGO TO 90

0 TYPE 1040,NAME,EXX0 RETURN

FORMAT STATEMENTS

FORMAT!13)010 FORMAT(U)020 FORMAT*' DEVICE NQT AVAJLABLC OR DOES NOT pXjSTl/' rit-E-»A5' •.'.

1A3)FORMATS CANT DELETE TH|S FILE (PROTECTION) V ' FH,|t. All ».«. A3)FORMATS FILE 00E8 NO! EXIST»/I FILE',AS.'.'|A3?

050 FORMAT*' DELETE rO«06.OATT>1)060 FORMAT(Al)

END

Page 73: AECL-7794 ATOMIC ENERGY Mm L'ENERGIE ATOMIQUE OF … · 3. list of subroutines 3 3.1 montec programs 3 3.2 dec system programs 4 3.3 subprograms in wnre dec 10 system 4 4. heirarchy

- 67 -

REFERENCES

1. K.A. Perry and J.G. Szekely, "PSOD: An Interactive Fortran Pro-gram to Simulate the Radiation Dose Responses of MembranePopulations," Atomic Energy of Canada Limited Report, AECL-6831(1982).

2. A. Petkau, "Radiation Carcinogenesis from a MembranePerspective," Acta Physiol. Scand. Suppl. 492, 81 (1980).

3. A. Petkau and W.S. Chelack, "Radioprotective Effect of SuperoxideDismutase on model phospholipid membranes." Biochim. Biophys.Acta, 433_, 445 (1976).

4. Mary F. Lyon, D.G. Papworth and Rita J.S. Phillips, "Dose-Rateand Mutation Frequency after Irradiation of Mouse Spermatogonia",Nature New Biology 238_, 101 (1972).

5. United Nations Scientific Committee on the Effects of AtomicRadiation, "Sources and Effects of Ionizing Radiation" (1977).

6. R.P. Specht and A. Brodsky, "Lognormal distributions of occupa-tional exposure to medical personnel", Health Physics 31, 160(1976).

7. DEC System 10, Fortran Programmer's Reference Manual, DigitalEquipment, Maynard, MA (1977).

8. J. Altchison and J.A.C. Brown, The Lognormal Distribution withSpecial Reference to Its Uses in Economics, Cambridge UniversityPress, (1969).