NJOY 99.227                                                 4 July 2007
 -----------------------------------------------------------------------

 This file describes updates to NJOY99.  See Readme0 for more general
 information on NJOY99, installation, test problems, and so on.

 *ident up1
 */ leapr -- 04apr00
 */ this fixes errors that destroy the calculation of s(alpha,beta)
 */ for cold para-hydrogen and for both cold deuteriums.  the first
 */ was introduced in 97.53 while making the constants symbolic,
 */ and the second was introduced in the cleanup process for njoy99.

     We found these problems this March and April.  LEAPR runs for the 
     cold hydrogen and deuterium cases made with versions earlier than
     97.53 should be OK.

 *ident up2
 */ groupr -- 04apr00
 */ there is an error in the indexing for the xmas 172-group structure
 */ that throws all the group bounds off by one.  this structure is
 */ used in europe for thermal reactor calculations.

     This one is only important for people using this group structure.

 */ fix a problem introduced with the activation patch of 97.102.  the
 */ nk parameter is only used when doing mf values for activation
 */ products, and it is not appropriate for fission nubar values.
 *d groupr.3824

 */ don't strip off the upscatter groups for the neutron spectra
 */ coming from delayed neutron emission (mt=455).

 */ add a missing save statement and fix an unset variable in anased.
 */ these problems affect delayed neutron spectra.

     These changes are important for anybody doing multigroup
     calculations for fissionable materials.

 *ident up3
 */ acer -- 04apr00
 */ the acer consistency checks include an option to readjust
 */ eprime values that are greater than e, when appropriate.
 */ there are some problems with the logic, especially for
 */ cases that use histogram interpolation for the distribution.

     This change improves the appearance of the outputs, but it
     doesn't actually have any effect on calculations.  MCNP only 
     uses the differential probabilities for linear-linear
     interpolation, and it doesn't make any difference if they
     are incorrect at the upper limit for histogram cases.

*/ when using the old format (mcnp4b and earlier), some angle-energy
*/ distributions from file 6 are converted into the law 67 format,
*/ because these earlier versions of mcnp couldn't use all the 
*/ file 6 representations.  when converting from the cm to the lab, 
*/ the methods used in subroutine fix6 are a little crude.  they get
*/ confused when cm energies are so small that lab cosines of -1
*/ are not reached.  this patch tries to fix that in a rough way,
*/ but evaluations that use the cm frame in file 6 will work best
*/ if most of the cm energies are greater than e/(awr+1)**2 for
*/ each incident energy e.  for mcnp4c and later, the code can
*/ sample directly from tabulated cm representations, and the
*/ approximations of the fix6 routine are avoided.  this patch
*/ is needed for one evaluation from JEFF-3.

*/ increase the available storage to handle the very large
*/ mf6/mt16 tabulation in JEFF-3 Be-9.

*/ increase the space available for discontinuities in convr
*/ to allow for JENDL-3.2 si-nat

     These three sets of changes are only needed for very specific
     cases.  We already know that there will be a few more like
     this coming up!

*ident up4
*/ reconr -- 05apr00
*/ be sure to count subsections of file 12 before allocating
*/ storage for the elements of the new directory.  otherwise,
*/ some materials with many sections of file 12 will overflow.
*/ this is a longstanding problem that we never noticed before.

     This is another problem that only showed up for one evaluation.
     It has been this way in NJOY for many years.

*ident up5
*/ purr -- 7may00
*/ fix a problem introduced while installing the heating part
*/ of the probability tables.  it shows up when doing elements
*/ that have unresolved data.  also, increase the number of
*/ resonance sections allowed to handle the very large cd-nat
*/ evaluation from JENDL.

     PURR marks regions where the unresolved range for one isotope
     of an element overlaps with the resolved or smooth range from
     other isotopes by putting a negative sign on the energy.  We
     have to be sure to recover the energy correctly by taking the
     absolute value!  Note that this problem only shows up for
     elemental evaluations.  There are only two of these in ENDF,
     but many more in JENDL.  We also had to allow for more sections
     in the resonance range to handle JENDL's Cd-nat evaluation.

*ident up6
*/ acer -- 30may00
*/ fix a typo in up3 (reported by bunde, anl)
*/ acer -- 30may00
*/   fix problems with converting cm distributions to law=7
*/   and problems reading law=7 into the ace file.  these problems
*/   show up when running newfor=0 with njoy2000, especially on
*/   some materials from jef-2.2.

     This one is pretty important.  NJOY99 was pretty thoroughly
     tested for producing MCNP4C libraries, but we neglected to do
     as much checking for MCNP4B cases (newfor=0).

*ident up7
*/ viewr -- 30may00
*/ increase the allowed size of 3d plots.
*/ pushed by pb-nat from jef-2.2.

    In most cases, NJOY just truncates 3-D plots that are too big
    for viewr, but in the pb-nat case, it actually overwrote some
    memory.  The storage available for 3-D plots has now been
    increased, and some plots that were truncated before without
    causing the code to fail will plot better now. 

*ident up8
*/ acer -- 3jun00
*/ subroutine ptleg2 does not need the dynamic array xat.
*/ this problem was first noted by Waclaw Gudowski for ENDF/B-VI 
*/ si-nat.  it shows up as "id xat not defined".

    This is a fairly isolated problem.  It is a case of
    evolution leaving behind an obsolete organ.

*ident up9
*/ acer -- 07jun00
*/  add the capability for processing anisotropic charged particle
*/  emission using tabulated legendre coefficients into the 
*/  mcnp4c law61 format.  this is needed for jeff-3 cr-52.
*/  allow for multiple interpolation ranges in file 6.  this
*/  also occurs for jeff-3 cr-52.  currently, the neutron
*/  energy-angle distribution only allows for combinations of
*/  histogram and linear linear interpolation, but the 
*/  charged-particle sections allow for general combinations of 
*/  all allowed interpolation laws.

    There are only one or two such cases in current evaluations, but
    more will probably appear in the future.  The limitation to
    interpolation laws 1 and 2 for neutrons comes from the occasional
    need to handle multiple subsections in File 6 for neutron emission.
    The increased generality for charged-particle subsections comes
    about because multiple subsections are not handled.  Someone will
    probably do that someday....  Although we did work fairly hard to
    handle the JEFF Cr-52 evaluation, the actual representation is
    fairly strange, and the treatment of the particle yields near the
    effective emission threshold should really should be changed.

*ident up10
*/ leapr -- 13jun00
*/  fix two incorrect constants in leapr.  one affects cases with
*/  diffusive effects, and it has been incorrect since njoy97.0 
*/  (oct 97).  the other affects cold hydrogen calculations, and it 
*/  has been incorrect since njoy97.53 (dec98).

   NJOY99 was exhaustively checked using ENDF/B evaluations
   and the newfor=1 option (to support MCNP4C).  Unfortunately,
   we didn't test it with newfor=0 (for MCNP4B and earlier
   versions)!  Several users have reported problems (especially
   Waclow Gudowski in Sweden.  Some changes that affect running
   with newfor=0 were made above.  The following changes (up11) 
   are especially noticable with ENDF/B-VI Release 6.

*ident up11
*/ acer -- 26jun00
*/  fix an error in determinining which reactions have to be
*/  converted into law=7 format when using newfor=0.  because of 
*/  overzealous code cleanup, acer is trying to convert sections 
*/  with the kalbach representation in addition to sections with
*/  tabulated angular distributions.

*/ acer -- 26jun00
*/  during the cleanup of the topfil routine, the logic to process
*/  sections of file 6 using law=2 (two-body distributions) into
*/  equally probable bins for newfor=0 was omitted.  this shows up
*/  for evaluations that use mf6/mt51, etc., to represent inelastic
*/  levels.

*/ acer -- 26jun00
*/  fix an error in the reaction naming.  it affects mt=44 (n,n2p) and
*/  mt=45 (n,npa).  this problem was introduced in may of 1995.
*/  examples of cases that use these reactions are later releases of 
*/  endf/b-vi al-27.

*/ acer -- 26jun00
*/  add missing external statement.  reported by bokyun seo (kaeri)

*/ acer -- 26jun00
*/  add missing line for the sequential (n,2n) reactions for be-9.
*/  this line was accidentally removed in njoy 94.19 (jan96).  the
*/  error was continued through njoy 97 and 99.  discovered by
*/  bob little (lanl).

*/ acer -- 26jun00
*/  fix anisotropic photon production (e.g., endf c,n,o)

*ident up12
*/ njoy -- 27jul00
*/  fix two typographical errors in the 64-bit version of the
*/  slatec math library.  reported by piet de leege (delft).

*ident up14
*/ acer -- 20jul00
*/  acer fails if you run it on a pendf tape that only has the
*/  single reaction mt=2 (elastic).  this can happen for he-4 if you
*/  don't run heatr, thermr, or gaspr first.  found by gudowski.

*/ acer -- 20jul00
*/  acer fails for mf=6, law=2, lang>0 (angular distribution with
*/  tabulated cosines).  the only known example is mt=51 for pb-208 from 
*/  release 6 of endf/b-vi.  found by waclaw gudowski.

*/ acer -- 21jul00
*/  an error was included in up9, which added a capability to handle
*/  anisotropic charged-particle emission represented using legendre
*/  polynomials.  the update disabled the case of isotropic
*/  charged-particle emission, which occurs in a number of important
*/  materials from release 6 of endf/b-vi.  the symptom is a serious
*/  clobbering of the ace file, such that it cannot even be read into
*/  mcnp or even printed using acer.  also reported by gudowski.

*ident up15
*/ heatr -- 31jul00
*/  incorrect initial value found by m.mattes (u.stuttgart).

*/  increase the allowed number of legendre terms in h6ddx
*/  to handle the new jeff-3t fe-56 evaluation.

*/ watch for ill-defined vertical segments in distributions.  these
*/ have been seen in zr90 from cendl3 and fe56 from jeff3.  actually,
*/ the evaluations should be fixed to avoid such features, because
*/ we don't really know what y value to select in the vertical
*/ segment.  we choose to just move the second energy of the double
*/ point up a little.  we only print the diagnostic once to keep the
*/ output cleaner, but there could be more than one vertical segment.

*ident up16
*/ groupr -- 31jul00
*/ watch for ill-defined vertical segments in distributions.  these
*/ have been seen in zr90 from cendl3 and fe56 from jeff3.  actually,
*/ the evaluations should be fixed to avoid such features, because
*/ we don't really know what y value to select in the vertical
*/ segment.  we choose to just move the second energy of the double
*/ point up a little.  we only print the diagnostic once to keep the
*/ output cleaner, but there could be more than one vertical segment.

*ident up17
*/ acer -- 31jul00
*/ fix an incorrect index in the law=61 section for the primary
*/ particle.  the effect of this error is to give an incorrect
*/ angular distribution for the energy points with scattering
*/ probability zero (which should be isotropic).  this change
*/ is strictly cosmetic and shouldn't affect any results.

*/ acer -- 31jul00
*/ we want to use the compact law=4 for isotropic charged particle
*/ distributions, and the more general law=61 for anisotropic cp
*/ distributions.  unfortunately, we can't tell which is which
*/ without reading past the first few energies for some evaluations.
*/ the need for this patch was first noticed by jeff3 fe56.

*ident up18
*/ acer -- 03aug00
*/ some jef, eff, and jeff evaluations contain a redundant reaction
*/ mt=10 that gives the continuum neutron production.  it is 
*/ necessary to exclude this reaction from the reconstructed total
*/ cross section and to omit the associated energy-angle distribution.
*/ otherwise, the continuum neutron production will be counted twice.

*/ acer -- 03aug00
*/ this change can fix an infinite loop during acer plotting

*/ acer -- 03aug00
*/ for file 6 sections with only one subsection, the mt number is
*/ set to zero for the messages about energy-dependent yields.
*/ this is a trivial cosmetic patch and doesn't affect results.

*/ acer -- 03aug00
*/ this change is needed to handle nubar for jendl-3.2 u-235.  it
*/ was originally made at los alamos in april, but somehow didn't
*/ make it to the official update file.

*ident up19
*/ heatr -- 03aug00
*/ as noted above, some jef, eff, and jeff evaluations use the
*/ redundant mt=10.  this value needs to be excluded from the
*/ heating and damage calculations.

*ident up20
*/ acer -- 16aug00
*/ there is an error in processing angular distributions using ltt=3
*/ when newfor=0 (mcnp4b compatibility).  the extra tosend causes the
*/ code to skip over the first reaction after the elastic mf=4.
*/ this leads to a bad tyr=0 value in the ace file, which causes
*/ mcnp to issue a confusing error message about "sabcol," even
*/ when s(alpha,beta) is not being used.  this problem occurs only
*/ when processing the 150-mev evalutions from endf/b-vi.6.  it
*/ is probably best to use release 5 with mcnp4b anyway.  the
*/ release 5 and 6 data are identical below 20 mev.

   It should be reiterated that Release 6 of ENDF/B-VI differs from
   Release 5 only in the addition of data from 20 to 150 MeV.
   People who only need the conventional 20-MeV data, or people
   processing for MCNP4B, may want to run from Release 5 and avoid
   the additional complexity and bulk in the files that are produced
   from Release 6.

*/ acer -- 16aug00
*/ the code is finding the wrong value for the lct parameter (lab
*/ or cm frame) when processing file 4 angular distributions if
*/ the section is fully isotropic.  this can result in an incorrect 
*/ value for the ace tyr parameter, which can result in an apparent 
*/ error from sabcol, even with no s(alpha,beta) data in the problem.
*/ this problem was introduced while the njoy97 coding was being
*/ converted to block structuring.

*/ acer -- 16aug00
*/ the consistency check for incorrect reference frame should take 
*/ place for isotropic distributions also.  sometimes, this check is 
*/ not a real error.  users should check the evaluation to see if the
*/ reference frame is really as intended by the evaluator.  as fixed,
*/ this check would have found the two problems above!

*/ acer-- 16aug00
*/ we are not currently handling law=5 for energy distributions.
*/ this occurs for u-233 fission from jef-2.2.  the evaluation can
*/ be patched by converting the lf=5 part of the distribution to
*/ lf=1, which is sampled much better by mcnp using cummulative
*/ probability distributions anyway.

*/ acer -- 16aug00
*/ there are some additional places where skip6 should be skip6a.
*/ see up6 above.  this shows up for endf be-9 with newfor=1.

*/ acer -- 16aug00
*/ there is an error in the law=7 part of up11.  this shows up
*/ when processing endf be-9 using newfor=0

*/ acer -- 16aug00
*/ there is an error in the new skip6a routine introduced by up6
*/ that shows up when processing sections with law=7 with newfor=0.

*/ acer -- 16aug00
*/ missing initialization in ptlegc (this could affect incident 
*/ charged particles on some systems).

   NJOY99.20 has been tested rather extensively with MCNP4B and
   MCNP4C.  It has successfully processed all the materials in
   ENDF/B-VI Release 5 (which has Emax=20 MeV), many important
   materials from JENDL-3.2, and a few problem materials from
   JEF and JEFF libraries into ACE formats for both 4B and 4C.
   All of these ACE files have been staged into MCNP and run for
   a few cycles to make sure that the format is reasonably
   correct.  It has also been used recently for high-energy and
   charged-particle processing, but without testing in MCNP or
   MCNPX as yet.  A few problems are known, and several materials
   had problems with the evaluation (e.g., carbon).

*ident up21
*/ acer -- 28sep00
*/ the self-shielded cross sections are not being printed out
*/ correctly for the reactions, but total is ok.  the gendf
*/ file is ok, so libraries made with njoy99 are ok.

*ident up22
*/ reconr -- 28sep00
*/ add capability to handle the new extension to the reich-moore
*/ resonance format that uses the sign of aj to designate which
*/ channel spin to use for a particular resonance.  based on
*/ coding provided by nancy larson, ornl.

   This is a new ENDF format approved at the 1999 CSEWG meeting.
   There are no official evaluations that use it as yet, but it
   is felt to be important for Al-27 and Si-29.  We are adding
   it to NJOY now so as to be ready when the new evaluations
   appear from ORNL.

*ident up23
*/ gaminr -- 28sep00
*/ allow for up to 400 groups (added by request)

*ident up24
*/ dtfr -- 28sep00
*/ allow for up to 400 groups (added by request)

*ident up25
*/ groupr -- 11oct00
*/  fix the section that reduces the number of sig figs in getdis.
*/  it was only acting on the in-group probabilities.  this helps
*/  to make the results for elastic and discrete inelastic matrices
*/  the same on different machines.  the basic idea is that these
*/  numbers are obtained by subtraction of numbers on the order of
*/  unity, so any results less than about 1e-7 are just random
*/  numbers and can be removed.

*/ groupr -- 12oct00
*/  change the size of common groupg to agree with the changes
*/  made in gaminr above.

*ident up26
*/ acer -- 12oct00
*/  the current coding sometimes gets the threshold for charged
*/  particle production off by one point.

*ident up27
*/ dtfr -- 27oct00
*/  fix problem with finding right material and temperature
*/  on the pendf tape.  the goto loop was not translated correctly!        

*/ dtfr -- 27oct00
*/  fix error made in up24
 
*ident up28
*/ acer -- 05nov00
*/  the pointer into the a array is not being correctly incremented
*/  for the "call moreio" line.  this only affects the new JEFF
*/  evaluation for beryllium, which has exceptionally detailed
*/  angulur tabulations.  found by fischer (fzk).
*/  fix an indexing error in adjusting the normalization and
*/  precision for the pdf of angular distributions for law67 charged
*/  particle production that causes the pdf to be the same as the
*/  cdf.  this problem shows up for beryllium (n,2n) alpha production 
*/  in endf/b-vi, for example.  identified by konno (jaeri).

*ident up29
*/ ccccr -- 05nov00
*/  the pointer in the e array for moreio is wrong.  the result of
*/  this is that larger group structures cannot be handled correctly
*/  for delayed neutrons.  found by broeders (karlsruhe).

*ident up30
*/ heatr -- 05nov00
*/  the insert of the data value for nlmax was incorrectly done into
*/  the "sw" conditional block instead of after the conditional
*/  block was complete.  thus, it was only available to 32-bit
*/  versions of the code.  this was discovered by deleege (delft)
*/  when running in 64-bit mode on a vax/alpha.

*ident up31
*/ groupr -- 05nov00
*/  fix two problems with the ltt3 option for 150 mev evaluations.
*/  the incorrect index for the c array leads to findex problems
*/  caused by clobbering the index for the dynamic storage system.
*/  you also have to make sure that the "over" option that allows
*/  getfle to extrapolate to energies slightly higher than the
*/  upper limit of the table doesn't act at the break between
*/  the two energy ranges with ltt3.  this problem was reported 
*/  by wienke (sck-cen).

*ident up32
*/ reconr -- 05nov00
*/  some fission products from the jendl-3.2 library include
*/  an unresolved resonance range with no corresponding resolved
*/  range.  trkov (iaea) proposed the following fix.

*ident up33
*/ gaminr -- 18jan01
*/  the photoatomic group cross sections are not printed out
*/  correctly for a p-order greater than 5.

*ident up34
*/ groupr -- 29jan01
*/  need more storage in groupr to handle mt=91 for am243 from
*/  endf/b-vi release 5, which goes to 30 mev.  the symptom was
*/  "storage exceeded" from cm2lab.

*ident up35
*/ groupr -- 08feb01
*/  when we increased the common block for photon group structures
*/  to allow as many as 400 groups (see up25), we forgot to update
*/  the parameter ngmax.  this causes a "too many groups" error if
*/  you run with more than 150 gamma groups.

*ident up36
*/ acer -- 08feb01
*/  in up17, we checked for isotropic distributions in order to use
*/  a more compact presentation.  the logic misses one special case,
*/  namely, pb208 from endf/b-vi release 6.

*ident up37
*/ reconr -- 09feb01
*/  all through njoy, we have been using 1e10 ev as our idea of
*/  an infinite energy.  progress happens, and red cullen at llnl
*/  is putting out an endf version of the evaluated photon data
*/  library (epdl97), which contains data to 100 gev.  the following
*/  change prevents reconr from going into an infinite loop in the
*/  emerge routine with 100 gev data.

  This and the following related changes will only become important
  with Release 8 of ENDF/B-VI, which will include the new 100 GeV data.

*ident up38
*/ njoy -- 09feb01
*/  keep on increasing infinity for the 100 gev data.  the routines
*/  gety1, gety2, and terpa return an "infinite" energy at the end
*/  of the table, and we now increase that to 1e12 ev.  this doesn't
*/  seem to cause any problems in njoy modules (such as groupr) that
*/  still check for return values of 1e10 or more; all the standard
*/  test problems still work fine.

*ident up39
*/ gaminr -- 09feb01
*/  keep on increasing infinity for the 100 gev data.

*ident up40
*/ acer -- 23mar01
*/  due to a bad if clause, the contribution to heating from charged
*/  particles is not being included for mf=6, law 3 or 4.  this was
*/  noticed in the run for endf/b-vi be-9 by lanl/x-5.  the errors in
*/  this particular case are quite small because of the small cross
*/  sections for charged-particle emission.  this error will only
*/  effect mcnpx calculations for coupled neutron-proton transport.

  The MCNPX error here is extremely small because of the very small 
  cross section for proton emission.

*ident up41
*/ acer -- 27mar01
*/  the value "nr = 0", implying linear interpolation over all points,
*/  is not printed on the acer output listing for two cases, as reported
*/  by lanl/x-5.  these errors do not affect mcnp results, but the
*/  repair makes the printout for photon yields and energy distributions
*/  match those for other types of data.

*ident up42
*/ purr -- 27mar01
*/  remove the timers that are given as each ladder is processed
*/  in order to reduce the number of diffs that show up when
*/  succesive runs are checked for qa purposes using the same
*/  sequence of random numbers.  for lanl/x-5.

  Remember that runs using PURR will always show lots of diffs
  between different machines because the sequence of random
  numbers will by different.  We intend to fix this in NJOY2001.

*ident up43
*/ heatr -- 27mar01
*/  the roundup applied to the first energy grid point should
*/  be smaller now that we are routinely working with 7-digit
*/  energies.  the effect if this in current files is that the
*/  first energy in any of the heating and damage reactions is
*/  a little larger than the normal 1e-5.  this shows up as a
*/  zero heating or damage value for the first point in the mcnp
*/  ace files, which is strange looking, but of little significant
*/  impact on real calculations.  reported by lanl/x-5.

*ident up44
*/ acer -- 29mar01
*/  lanl/x-5 has requested that the main container array be increased
*/  in size to allow bigger ace files to be generated. it is also
*/  necessary to increase the i7 length field on the xsdir cards to i8
*/  to accomodate the larger ace files.

*ident up45
*/ acer -- 08apr01
*/  as discovered by jean christophe sublet, sun forte6 f95 is
*/  finiky about opening a scratch file that is already open,
*/  although all other compilers used for njoy thus far were more
*/  accepting.  we just have to be careful to close a unit used
*/  as a scratch file before reusing the unit for another purpose.

  This one shows up as an error trying to open tape13 in ACER.
  So far, it has only be observed with Sun Forte6 f95.

*ident up46
*/ gaspr -- 09apr01
*/  close another scratch unit.

  This one shows up as an error trying to open tape10 in ACER
  if GASPR has been run.

*ident up47
*/ acer -- 09apr01
*/  the length published for thermal data files is too long by one
*/  for cases including incoherent elastic scattering.  for endf,
*/  this is poly, h(zrh), and cold solid methane.  discovered by
*/  roberto orsi (enea-bologna).

  This error only affects thermal ACE tables for hydrogenous
  solids where the true data-block length is divisible by 4.

*ident up48
*/ acer -- 09apr01
*/  the landh parameter should be zero (not -1) for isotropic
*/  subsections of mf=6 described using law=3.  this occurs for
*/  the reactions (n,p0) through (n,a0) in be-9 from endf/b-vi.
*/  Noted by bob little (lanl/x-5).

  This error only affects runs with MCNPX.  The symptom is
  a cosine > 1.0.

*ident up49
*/ acer -- 09apr01
*/  the representation for ace law3/33 should use -q instead of
*/  abs(q) in order to handle two-body reactions for isomeric
*/  targets.  this change in the ace specifications was recommended
*/  by bob little (lanl/x-5) after a query by waclaw gudowski.  it
*/  only affects a small number of evaluations.

*ident up50
*/ acer -- 09apr01
*/  most of the jendl photonuclear evaluations currently available
*/  from http://iaeand.iaea.or.at/photonuclear/ crash with an i/o
*/  error because they use a non-conforming format where mf=6,
*/  mt=201-27 are used to represent particle production.  we are
*/  providing a clearer error message for the user's convenience.
*/  these evaluations cannot be used in njoy or mcnpx in their
*/  current form.

*ident up51
*/ acer -- 12apr01
*/  add a capability to handle a two-body recoil subsection of mf=6
*/  for photonuclear files.  this may be useful for representing the
*/  photodisintegration of the deuteron with full distributions for
*/  both neutron and proton.  we tested the patch using a modified
*/  version of the g+2H evaluation from JENDL.

  This patch is also needed for the preliminary LANL evaluation
  for the photodisintegration of the deuteron based on EDA R-matrix
  calculations.

*ident up52
*/ acer -- 13apr01
*/  add a capability to handle tabulated sections of File 5 (lf=1)
*/  for photonuclear files.  Such sections are used in the Russian
*/  evaluations for three isotopes of plutonium included in the
*/  iaea photonuclear compilation.  this also fixes a bug in the
*/  storage of fission nubar.  the first point for energy distributions
*/  often has a nonrealistic sharp triangle given for the spectrum.
*/  this can cause problems with the vertical scale for plots
*/  because the emission probabilities get very large for small
*/  ranges of secondary energy.  therefore, we ignore the first
*/  incident energy in determining the vertical scale for the plot.

  The original Russian evaluations of photonuclear reactions on the
  actinides had a few formatting problems.  These were fixed, and
  the modified files were referred back to the evaluators for
  comments.  With those formatting changes and this patch to handle
  the fission spectra, all of the BOFOD photonuclear evaluations 
  can be processed.

*ident up53
*/ groupr -- 11jun01
*/  if the file6 distribution is fully isotropic (law=3), the getfle 
*/  routine doesn't realize that when doing a discrete recoil (law=4).  
*/  we create a special flag of law=-4 to pass the fact of isotropy 
*/  into getfle.  this problem only affects runs that compute a 
*/  transfer matrix for the recoil particle when the first particle
*/  emitted is given as totally isotropic (for example, mt=701 for 
*/  endf be-9).  the error message is "desired energy above highest 
*/  given."  found by dieter leichtle (fzk).

*ident up54
*/ reconr -- 12jun01
*/  allow for the series of mt numbers 875-891 that can be used
*/  to represent different levels of the (n,2n) reaction in the
*/  same way that 600-649 are used to represent different levels
*/  of the (n,p) reaction.  the code expects that mf=3/mt=16
*/  contains the sum of mt=875 through 891 in the same way that
*/  mt=103 contains the sum of 600-649.  this representation is 
*/  used for be-9 for eff-3.1 and jeff-3.0.

  A complex new evaluation for Be-9 is being prepared for the
  JEFF library, and it uses a new representation for the parts of
  the (n,2n) reaction.  A large number of changes to NJOY are
  required to handle this new evaluation, and additional patches
  will be found below.

*ident up55
*/ heatr -- 12jun01
*/  if mt=875-891 appears in the file, mt=16 is redundant.  this
*/  is analogous to the way mt=107 is redundant if mt=800-850 
*/  is present.

*/  the integration over secondary energy for law 7 in getsix
*/  must allow for histogram interpolation as used in be-9
*/  from eff-3.1.  the effect of this is to get especially
*/  bad particle energies for the discrete neutron in mt=876.

*ident up56
*/ acer 12jun01
*/  the angle-energy law in file 6 is always causing trouble.
*/  it is especially difficult when more than one subsection
*/  is used to describe the emission for a particle, because
*/  an overall angular distribution for the reaction must be
*/  contructed.  with the new formats, it is easy to eliminate
*/  law=7 sections by converting them to law=1 with tabulated
*/  angular distributions.

  This particular representation is currently only used for Be-9
  evaluations.  For each incident energy, it gives secondary
  energy spectra at various emission angles in the lab system.
  With this patch, we convert these distributions into ones that
  give angular distributions at various values of the secondary
  energy, which can be represented by the new ACE LAW=61.  This
  makes it easy to handle one current case where multiple
  distributions for neutron emission are given in File 6.
  However, it could be argued that this change violates the intent
  of the evaluator.  We may explore other approaches to handling
  these representations in the future.

*/  add support for law1 with tabulated angular distributions
*/  to the charged-particle section.

  The capabilities for handling incident charged particles are
  gradually evolving as new evaluations get tested.

*ident up57
*/ acer -- 12jun01
*/  changes to acer needed to support the eff-3.1/jeff-3.0
*/  representation for be-9.  we have to allow for the series
*/  of mt numbers 875-891.  if present, mt=16 is redundant and
*/  must appear after the distributions in the reaction list.
*/  the section for mt=876 has two subsections for neutron
*/  emission.  this problem is handled by the previous update.

*/  add the new reaction names to the mtname routine

*/  need more storage for eff-3.1 be-9

  This new evaluation is very large!

*ident up58
*/ broadr -- 10jul01
*/  increase the storage area in broadr to reduce paging and make
*/  comparisons between njoy99 and njoy2001 easier.  there will
*/  normally be a small difference in the grids produced by broadr
*/  each time paging takes place, and this makes it hard to compare
*/  files using diff.
 
  In BROADR, the large sections of cross-section versus energy are
  paged through the Doppler broadening process.  In NJOY2001, these
  pages breaks occur at different energies than in NJOY99.  This
  leads to small differences in multigroup cross sections near these
  breakpoints that show up in diff runs.  More importantly, it changes
  the energy list in ACE listings so that diff gets lost after the
  breakpoint.  This makes it hard to compare results from the two
  codes for QA purposes.  Now that everyone has lots of memory, it
  is practical to increase the amount of storage allocated to BROADR
  to reduce the number of materials that show these breaks.  Some
  materials with very large numbers of energy points will still not
  compare properly using diff.

*ident up59
*/ acer -- 20jul01
*/  in charged-particle emission, the first point for energy 
*/  distributions often has a nonrealistic sharp triangle given for 
*/  the spectrum.  this can cause problems with the vertical scale 
*/  incident energy in determining the vertical scale for the plot.

  We use this same trick other places.  Without it, plots will sometimes
  just show the first big peak and the more interesting data at
  higher energies will be pushed below the floor of the plot.

*ident up60
*/ reconr -- 24sep01
*/  occasionally, reactions are given with a nonzero cross section
*/  at threshold, even though this violates endf procedures.  reconr
*/  had some logic for handling this that was being overwritten by
*/  another change.  we fix it here by inserting an extra energy
*/  point just above the threshold and zeroing the cross section at
*/  the threshold.  a diagnostic message is provided.  one example 
*/  of a place were this occurs is gd158 from endf/b-vi.  reported 
*/  by frankle (lanl).

*/ reconr -- 24sep01
*/  reconr contains some logic that tries to avoid doing work on
*/  very small charged-particle cross sections by defining a
*/  "pseudo-threshold" when the cross section rises to more than
*/  1e-15 barns.  however, this scheme isn't carried out completely,
*/  and it only results in the omission of the threshold energy for
*/  reactions that have less than this cross section just above
*/  the threshold.  this effect shows up for the (n,n't) reaction
*/  mt=33 for cd-110 from endf/b-vi.4.  at the request of bob
*/  little (lanl), we are changing the constant "ssmall" that
*/  triggers this effect to a smaller number.  in the long term,
*/  we should reconsider this logic.

*ident up61
*/ acer -- 25sep01
*/  kisako kazuaki (sumimoto) has observed that the common variable
*/  coeff in eval is not set.  actually, eval is not really used in
*/  tabize anymore.  it is just leftover as an intialization for a(iy).
*/  the only other place it is used is in islin2, and islin2 is not 
*/  called anymore!  This update removes these leftover remnants.

*/  kazuaki also noticed that the photoatomic heating value was
*/  being stored in ev instead of mev and that the atomic number
*/  aw0 was not being set.

  Note that the photoatomic processing in ACER is still incomplete.
  When this was written, we had hoped that there might be an upgrade
  to MCNP to handle fluorescence in a more complete way.  It is also
  important to make sure that the fluorescence energies produced are
  consistent with the photoelectric edge energies.  This is because 
  these photons are properly produced with energies just below the 
  edges where cross sections are low; thus they can travel further 
  in the material.  As a result, it is impractical to use some of the
  older sets of fluorescence data with newer cross sections.  New
  data for atomic relaxations are now becoming available in ENDF 
  format, and we hope to fix this problem in the future.

*ident up62
*/ purr -- 28sep01
*/  lanl group x-5 has noted that the conditional heating cross 
*/  section in the mcnp probability tables is not quite what they
*/  expected.  we change the calculation here to get results that
*/  are consistently given as eV/reaction for lssf=0 and fluctuation
*/  factors for lssf=1. 

  People interested in self-shielded values for heating in the
  unresolved range should pay attential to this patch.

*ident up63
*/ acer -- 15oct01
*/  add a capability to include delayed neutron data in the ace
*/  file as allowed for mcnp4c.

  With the release of MCNP4c, the code now can generate the spectrum
  of neutrons from fission accurately.  Previous versions used the
  prompt spectrum for all of the fission neutrons.  Now, the prompt
  spectrum is used with prompt nubar, and the delayed spectrum is
  used with the delayed nubar.  We have tested the effect of this for
  some fast critical assemblies.  It is very minor except for BIGTEN,
  where it causes a decrease in k-eff of 0.15 to 0.2 percent.  In
  addition, the new code can do time dependent calculations involving
  delayed neutrons.  This patch provides the new data blocks in the
  ACE format to support these capabilities.  It would be important
  for people who need to move beyond the data provided in the ENDF61
  library included with MCNP4c.

*ident up64
*/ acer -- 07dec01
*/  there was a mistake introduced with up57 that only affects
*/  64-bit compiles (when "*set sw" is not used).  In addition, there
*/  were three mistakes related to the delayed neutron patch of up63.
*/  it's bad practice to use different names in common blocks in
*/  different places!

*ident up65
*/ groupr -- 10dec01
*/  fix groupr to handle radionuclide production using the new
*/  endf file 8 and data from eaf2001.

*ident up66
*/ groupr -- 12feb02
*/  if you mix automatic reactions with manual reactions where
*/  the mtname string is not given, the mtname on the manual
*/  reaction will have whatever string was left from the previous
*/  case.  we fix that here.

  This only affects output listings for some special cases.

*/ groupr -- 13feb02
*/  there is an error in the calculation of the kalbach a factor
*/  for the photonuclear case.  it is necessary to convert e to
*/  mev for this formula.  the symptom is results for a that are
*/  so large that sinh(a) overflows with a floating point error.

  This one is important for people using multigroup methods
  with photonuclear evaluations.

*ident up67
*/ matxsr -- 12feb02
*/  add photonuclear capability

  With this photonuclear capability in MATXS files, it is possible to
  use the TRANSX code to generate full coupled sets for n-gamma
  transport.

*ident up68
*/ reconr -- 18apr02
*/  the name "pi" is being used for both the imaginary part of
*/  p and the pi constant.  the former is changed to "pim" as
*/  used in the version of this subroutine in purr.  the symptom
*/  is a floating point error when sqrt(pi) is calculated with
*/  pi changed to a negative value.

*/  allow for more digits in the temperature printout to
*/  handle the usage of reconr being made for eaf-2001.  the
*/  temperature field is not being used for resonance
*/  reconstruction but only passed to the output file for
*/  later use.

*ident up69
*/ acer -- 07dec01
*/  add a capability to generate fluorescence data for mcnp using
*/  the existing cashwell-everett format with new numbers obtained
*/  from the endf versions of eadl and epdl.  the data produced with
*/  this method should give reasonable results for transport and
*/  heating for energies above 1 kev.  the new evaluations allow
*/  for lower incident photon energies and for more detail in photon
*/  and electron distributions from photoabsorption, and future
*/  versions of njoy and mcnp can take advantage of this.

*ident up70
*/ acer -- 20feb02
*/  add consistency checks for delayed neutrons
*/  add plots for nubar and delayed neutron spectra

*ident up71
*/ reconr -- 25aug02
*/  if the cross section or yield in a section is zero at all
*/  energies, the union grid is spoiled.  we fix lunion so the
*/  so called pseudo-threshold search cannot go past one less
*/  than the number of points in the section.  this problem was
*/  seen in n-15 of jendl-3.3 for 12/104 and 12/105.

*ident up72
*/ acer -- 3sep02
*/  allow for up to 8 groups of delayed neutrons as used in some
*/  of the materials in jeff-3.

*/  there were some small problems with the use of endf law=1 in
*/  addition to the more common law=5.  we also have to be sure to
*/  renormalize distributions that don't have the proper normalization.

*/  watch for a special case in plotting

*ident up73
*/ groupr -- 3sep02
*/  allow for up to 8 groups of delayed neutrons as used in some
*/  materials of jeff-3.

  Up72 and up73 are only a beginning.  It will also be necessary to
  modify CCCCR to produce a more complicated DLAYXS file.  There is also
  current interest in providing energy-dependent time constants for
  delayed neutrons, but it is not clear how to pass this information
  on to the applications.

*ident up74
*/ groupr -- 03sep02
*/  fix editing error in the lwr epri weight function.
*/  reported by skip kahler (bechtel bettis).

*/  fix an incorrect boolean statement in the removal of upscatter
*/  in subroutine getsed.  reported by kazuaki (sae, japan).

*ident up75
*/ acer -- 09oct02
*/  fix some typographical errors in recent updates

*ident up76
*/ plotr -- 09oct02
*/  allow for more energy resolutions in plotr output
*/  for looking at the details of resonance reconstruction

*ident up77
*/ plotr -- 11oct02
*/  add a capability to plot percent difference or ratios

  This capability has been available in the online Nuclear Data Viewer
  for some time, but having it available for normal NJOY runs increases
  flexibility.  It should be noted that the plotter does thinning on
  the data it plots, so it is not so good for looking at envelopes of
  differences (peak values) over wide energy ranges with lots of 
  resonances.  The ratio capability is handy for plotting fission ratios.

*ident up78
*/ broadr -- 10oct02
*/  tighten up the tolerances for integral thinning a bit

*/ broadr -- 10oct02
*/  fix some problems related to keeping computed cross sections
*/  on printable 7- or 9-digit grids.  this was discovered when
*/  doing testing at 0.01% for u235 above 1 kev, and it doesn't
*/  usually make itself evident for easier cases.

  This problem tended to produce small artifacts with widths of a
  few digits in the ninth place and heights on the order of .05%
  while making high precision code comparisons.  The integrated
  effect of these artifacts was very small, so this problem shouldn't
  require major reprocessing of older libraries.  These changes
  together with some other changes in Red Cullen's prepro codes have
  enable us to get very accurate agreement at the .01% level with
  nice plots of the differences showing only the effects of different
  choices of the energy grid.  Integral thinning was supressed for
  these comparisons.

*ident up79
*/ reconr -- 10oct02
*/  tighten up the default tolerances for integral thinning a bit

  The default values of the reconstruction tolerances cause the code
  to thin out some of the regions with small contributions to the
  resonance integrals in order to reduce the total size of the 
  reconstructed file.  Thus, the percent error in the cross sections
  can be larger than expected for very small cross sections, such
  as those in interference minima or for very small cross sections
  between resonances.  This thinning normally has very small effects
  on observables, but users should do their own tests to be sure that
  the setting are OK for their applications.

*/ reconr -- 10oct02
*/  make some improvements in grid generation to make sure that
*/  all cross sections are computed on printable 7- or 9-digit
*/  energies and that the original nodes for resonance reconstruction
*/  are reasonable.  these changes were made to remove some small
*/  artifacts on the order of 0.05% above 1 kev for some materials.

*/  the printout for errors caused by significant figure reduction
*/  are obsolete now that we can go to 9 digits when necessary.
*/  we remove them and add a column for the error introduced into
*/  the fission integral by integral thinning.

*ident up80
*/ acer -- 10dec02
*/   fix the photoatomic energy grid to include the discontinuities
*/   at the photo edges.  reported by morgan white (lanl x-5).

*/  fix the values of the production cross section and heating
*/  at the particle production thresholds.

*/  modify the acer listing to allow 6-digit energy indexes with
*/  the first column always blank.  this allows for materials with
*/  more than 99999 energy points.

*/  the global value of ntr is being overwritten when charged particle
*/  production is present.  allow both fission flags.  this only
*/  affects the plots.  it showed up when processing a high-energy
*/  u-238 case with proton production by causing a bad plot of capture
*/  and fission resonance contours.

*ident up81
*/ moder -- 2dec02
*/   fix up the processing of the covariance sections to match
*/   the endf-6 format specifications.

  This patch is needed to use MODER on JENDL-3.3 files, which have the
  more advanced version of the format for resonance-parameter covariances.
  However, NJOY cannot now process these covariances.

*ident up82
*/ acer -- 28jan03
*/  the heating value in the photoatomic ace file is supposed to be
*/  used in an "f6" tally with the computed photon flux to compute
*/  the energy deposition from electrons, positrons, and atomic
*/  recoils.  the original heating value was designed to be used
*/  with an explicit calculation of heating during a coupled
*/  electron-photon calculation, and it only included the atomic
*/  recoil.  this update adds in the other parts of the heating.
*/  it was also necessary to modify the quadrature in iheat to
*/  handle the very high incident energies now given in endf.

  Most of this work was provided by Morgan White (LANL X-5), and the
  results are included in the photoatomic libraries provided for MCNP5.

*ident up83
*/ plotr -- 12feb03
*/  fixes an error in plotr that prevents it from printing out
*/  negative values of percent differences.  zero percent
*/  difference confuses the thinning logic, so we add a small
*/  amount to all the percent differences.

  Plots of percent difference are very useful in comparing two
  evaluations, and this patch makes such plots work properly for
  more cases.

*ident up84
*/ purr -- 30sep02
*/  change the sampling scheme to use a different set of total cross
*/  section bins for each temperature.  change the binning logic to
*/  use approximately equally probable bins over most of the range
*/  with two bins of lower probabilities on the low and high ends.

  When the methods implemented in PURR were originally developed, we
  were worried about representing the effects of temperature
  correlation.  That is, if a neutron is traveling through one region
  and the unresolved table assigns it a low cross section, it should
  also see a low cross section when it enters another region at a
  different temperature.  However, the method we used is faulty,
  leading to different results for the tables depending on the
  starting temperature.  This showed up when developing ENDF66, which
  used a starting temperature of 77K for some materials.  This patch
  fixes that problem, but the arguments about temperature correlation
  are not as strong as we would like.  We also changed the binning
  strategy to try to improve the sampling of small cross sections
  in the interference minima of the elastic reaction, but it is very
  difficult to get enough samples into these minima.  This can show
  up at low sigma-zero values in the Bondarendo integrals.  In addition,
  the change in the binning increases the run time.  Users may want to
  decrease the number of ladders calculated in order to bring the run
  time back to the previous level.

*ident up85
*/ heatr -- 25feb02
*/  add mt=442 to hold the total photon production ev-barns

  This option is provided to support a planned modification to MCNP
  that will allow the heating values to be corrected for the local
  deposition of photon energy when users don't want to do a complete
  coupled neutron-photon-heating calculation.  Of course, current
  materials that don't have photon production in the evaluation
  already have the photon energy deposited locally in ACE files.

*ident up86
*/ leapr -- 10dec02
*/   add the fcc lattices for aluminum and lead to the
*/   coherent scattering option.

  This work was done in support of cold-moderator work at the Lujan
  neutron scattering center.  We prepared evaluations for cold aluminum
  and iron that seemed to perform fairly well.  Most NJOY users won't
  have to worry about these changes.

*ident up87
*/ acer -- 2jul03
*/  the mt numbers used for determining charged particle production
*/  have some errors.  this affects some light-isotope runs for
*/  incident charged particles.

*/ acer -- 02jul03
*/  for the particle production sections, the acer logic fails for
*/  some cases where two identical particles are produced by
*/  file 6, such as p+t->alpha+alpha.  the acer job seems to run
*/  ok, but it fails when the file is read back in for checking
*/  and plotting.  this patch fixes the problem.  this problem
*/  only shows up for a few light-isotope cases with incident
*/  charged particles.

*/ acer -- 02jul03
*/  patch the phase-space option for the primary particle.  this
*/  problem showed up for the proton distribution for 3He(p,2p).

  These problems showed up when processing new light-isotope
  charged-particle evaluations from Gerry Hale (LANL) that have been
  proposed for EMDF/B-VII.  The changes will be of interest to some
  users in the future when MCNP and MCNPX gain the capability to
  use these files.

*ident up88
*/ matxsr -- 28jul03
*/  the update that introduced a photonuclear capability for
*/  matxsr on 12feb02 accidently removed the assignment of the
*/  scratch file used for computing the self-shielding delta
*/  cross section values. any matxs files that include temperature
*/  and sigma-zero data and that were generated with versions of
*/  njoy99 from 99.67 up are incorrect.

*/  the read statement that brings in the group structures has a
*/  scale factor in it by mistake.  this distorts group energies
*/  that are written on the gendf tape in f format.  the result is
*/  an incorrect group structure on the matxs file.  this error
*/  has existed for many years without causing problems.

  The first of these changes is very important for MATXS libraries,
  and any users that generated such libraries recently should check
  on this problem.  The self-shielding effect will be incorrect.
  The second change doesn't seem to cause problems with TRANSX,
  because it doesn't use the group bounds in its calculations.  Other
  users of the MATXS format should check on this one.

*ident up89
*/ groupr -- 29jul03
*/  increase the main container array to allow for up to p5 for
*/  the lanl u233 evaluation proposed for endf/b-vii.

*/  increase the number of gammas allowed to handle w-182 and
*/  w-186 from endf/b-vi release 8.

  As the complexity of evaluations increases, we are always having to
  make changes like these!

*ident up90
*/ purr -- 6aug03
*/  the purr module is zeroing out the lssf and intunr flags in
*/  the section mt=152 that contains the bondarenko self-shielding
*/  information.  this has the dramatic effect giving different
*/  infinitely dilute cross sections when nsigz is one or greater
*/  than one, and incorrectly interpolated values.  note that purr
*/  is substituting its bondarenko values for the ones from unresr
*/  if both unresr and purr are run in that order.  these errors
*/  can have important effects on multigroup results from groupr.

  Older versions of NJOY used the output from RECONR when computing
  multigroup self-shielded cross sections.  More recently, GROUPR 
  has been using the results from PURR for this.  Unfortunately,
  PURR was not passing on two flags that are important for this
  processing.  People who have used recent versions of NJOY to
  prepare self-shielded multigroup cross sections should check for
  problems in the unresolved energy range.

*ident up91
*/ purr -- 06dec03
*/ alain hebert noticed that the normalization of the sampled
*/ bondarenko tables to match the infinitely dilute cross sections
*/ was being done incorrectly and provided this fix.
*d purr.2390
         do i=nsig0,1,-1

*ident up92
*/ reconr -- 10dec03
*/ reuven perel noticed that zero=0 needed to be added to subroutines
*/ rdf2aa and rdf2hy in reconr.

*ident up93
*/ thermr -- 01mar04
*/ allow for higher incident energies in calcem. this also requires
*/ some tightening up of the calculation near e'=e.  also, add
*/ some energies near the zrh einstein oscillator.

  It is important to match the major features of the thermal
  scattering data with energy points, and these new grids do
  that in addition to making incident energy interpolation
  easier.  With current methods, there is normally a break
  from scattering treated with S(alpha,beta,T) to a free
  scattering law at some point.  This leads to discontinuities
  in the scattering cross section and the emission spectra.
  Current MCNP libraries break at 4.5 eV.  The size and impact
  of these discontinuities can be reduced a bit by going to
  higher breakpoint energies.  This set allows breakpoints as
  high as 10 eV.  The size of the discontinuity goes as 1/E
  for the coherent elastic component, and similar dependences
  are seen for thermal inelastic scattering, so one would have
  to go very high energies really elimate the effect!

*ident up94
*/ acer -- 01mar04
*/ allow for up to 1024 secondary energies for thermal scattering.

  This was done to allow for convergence studies on the MCNP
  discrete sampling method, but grids this large are probably
  not really useful in practice.  Using future improved sampling
  schemes would be better.

*/ acer -- 15mar04
*/ increase storage available

  Evaluations get larger and larger!

*ident up95
*/ viewr -- 20sep04
*/  make symbol size scale with character size in legend.
*/  fix viewr to handle colors of filled symbols correctly.

*ident up96
*/ acer -- 30mar05
*/  correct treatment of delayed neutrons to handle jeff-3.1t

  This patch is important for people working with the new
  JEFF-3.1 evaluations.  They use 8 time bins rather than the
  traditional six, and they also use some different tabulation
  laws and interpolation methods.

*ident up97
*/ thermr -- 11apr05
*/  changes recommended by m.mattes, ike-stuttgart
*/  increase array size for ike evaluations
*/  fix reading long tab1 and list records
*/  fix print of max energy transfer at higher temperatures

  There are new evaluations for H in water, D in heavy water,
  and ZrH that were developed by IKE under IAEA auspices.
  They use large grids that solve some integration problems
  that occur with the existing ENDF thermal evaluation for
  H(H2O), thereby stressing the old coding a bit.

*ident up98
*/ leapr -- 11apr05
*/  changes recommended by m.mattes, ike-stuttgart
*/  allow for up to 400 beta values as needed for ike h2o
*/  correct directory entry

  These changes to LEAPR support the preparation of the new
  IKE/IAEA evaluations for thermal scattering S(alpha,beta,T).

*ident up99
*/ reconr -- 11apr05
*/  add forgotten initializations of zero (a.hogenbirk, nrg)

*ident up100
*/ heatr -- 11pr05
*/  increase number of legendre terms to handle new mo95 evaluation

*ident up101
*/ gaspr -- 11apr05
*/  need more space for for ni-58 from jeff-3.1t
*/  provided by d.l.aldama, nds/iaea consultant

  New evaluations continue to get more complex.

*ident up102
*/ matxsr -- 11apr05
*/  changes recommended by kazuaki kosako (shimizu corporation)

  More storage was requested for larger group structures.

*/  changes for processing be-9 from jeff-3.0 from iaea.

  The JEFF-3.1 evaluation for Be-9 has an extended representation
  for the (n,2n) reaction that uses partial reactions in the
  series MT=875, 876, ....  A number of changes in several modules
  are required to implement these new reaction types.  See below
  also.

*/  remove a problem in case of multi-temperature matxs files processing.
*/  scratch tapes iref and nscr should be simultaneously forwarded.
*/  the problem seems to affect only multi-temperature runs, if the mf=6
*/  of gendf tape was not ordered by mt numbers.
*/  recommended by d.l.aldama, nds/iaea consultant, july 2005

*ident up103
*/ groupr -- 11apr05
*/  changes to groupr recommended by d.l.aldama, nds/iaea consultant
*/  process be-9 from jeff-3.0

*ident up104
*/ purr -- 11apr05
*/  increase scratch space to handle pu-239 from jef-2.2 (trkov,iaea)

*/  allow pt for multi-isotope materials when
*/  not all the isotopes have unresolved resonance data
*/  from d.l.aldama, nds/iaea consultant

*ident up105
*/ groupr -- 11apr05
*/  patch the initialization of getsig, getflx, and getff
*/  provided by shimuzu corp.

  Setting the energy requested to zero is used often in
  GROUPR to request initialization for a given ENDF section.

*/  changes recommended by a.trkov, nds/iaea
*/  increase the maximum number of legendre coefficients allowed
*/  provide more space for the flux calculator
*/  fix inconsistent usage of output weighting flux unit number
*/  fix logic when searching for the right flux point
*/  fix a test that has misbehaved for lahey pc compilers
*/  accept old proposal from c.dean

  This changes the results from the flux calculator slightly,
  and it has been vetted by both winfrith and the iaea.

*ident up106
*/ acer -- 18aug05
*/  fix a problem with the patching of distributions with
*/  e'>e.  the distributions with too high e' values are
*/  moved down to e' values below e.  the previous version
*/  generated non-sequential e' values for jeff-3.1 be-9.

  Values of e'>e are not uncommon in evaluations.  They often
  arise from the binning used in model codes.  In most cases,
  correcting them to protect subsequent codes like MCNP
  doesn't change things very much because only small portion
  of the secondary neutrons violate kinematics like this.
  But the correction has to be done right!

*ident up107
*/ groupr -- 18aug05
*/   add the ecco33, ecco1968, tripoli315, xmas172 and vitamin-j
*/   group structures with 7 significant decimal digits. those
*/   group structures are used in europe for fast breeder and
*/   thermal reactor neutronics calculations. for compatibility
*/   with calendf and apollo
*/  increase the size of egn from 641 to 15000 i.e dice 13193 apollo 11276
*/  increase the size of storage array to handle certain groupr figures

  These changes are provided to support our European users.

*ident up108
*/ acer -- 18aug05
*/  provide more space for angular distributions in ptleg2.
*/  recommended by aldama (iaea nds).
*/  format extension for negative energies (overlap)
*/  recommended by aldama (iaea nds).
*/  declare "error" external to avoid conflict with intrinsic function
*/  provided by trkov (iaea).
*/  if pointwise representation in cm system, csn should be used
*/  from trkov, iaea (pointed out by harry wienke).
*/  fix6 may run out of space without warning
*/  provided by trkov (iaea).
*/  provide for larger output files to handle jeff-3.1 u-238.
*/  recommended by aldama (iaea nds).

  It's a good thing that computers are getting larger faster
  than evaluations are growing!

*ident up109
*/ wimsr -- 18aug05 
*/ Prepare (n,2n) from mt=875-891 to correct absorption
*/ d.l.aldama, nds/iaea consultant, 2005

  More changes to support the JEFF Be-9 evaluation.

*ident up110
*/ errorr -- 18aug05
*/  several patches prepared by a. trkov and i. kodeli, iaea, feb-2005
*/  - Fix fatal error converting code to f90
*/  - increase storage arrray (namax:30000->300000,nxmax:150->450)
*/  - Allow suppression of spikes resulting from lb8 contribution
*/  - Allow extension for mt 850-891
*/  - Activate mt=261 processing
*/  fatal error - misplaced statement incrementing reserved array index

  This update provides several changes for covariance processing,
  including lumped covariances in mt=850-891 and spectra in mt261.

*ident up111
*/ covr -- 18aug05
*/  several patches prepared by a. trkov (iaea), feb 2005.
*/  - Increase storage (iamax 50000->300000, ipat 1000>14000))
*/  - Fix energy-truncation of covariance matrix plots for small functions
*/     (spectra from irdf-2002 dosimetry library)
*/  needed to process matrices on input energy grid with many groups
*/  increase to 2000 is sufficient if no subdivisions are requested
*/  alternative subdivision of levels for colour scheme
*/  cannot explain this one, but one of the irdf-2002 spectra crashed

  Corresponding changes in covr for the iaea.  colors in the
  correlation contour plots were changed to emphasize the lower
  correlations values.

*ident up112                     
*/ acer -- 20oct05
*/  increase dimension for nubar tabulations in pn data
*/  to handle the new lanl am-241 evaluation for endf/b-vii.

*ident up113
*/ acer -- 15feb06
*/  add continuous sampling method for thermal distributions
*/  energy distributions from thermr are converted to pdf/cdf
*/  form with some panels that have small cdf contributions
*/  eliminated.  angular distributions are left as discrete
*/  for later smoothing in mcnp.  this method is experimental
*/  and not standard in mcnp5 as of this date.  this patch
*/  also provides extended plotting capabilities.

  The existing method for sampling thermal scattering distributions
  was to use a set of discrete emission energies and cosines
  chosen to preserve average energy and angle changes.  This
  method works well for criticality calculations, but it gives
  unreasonable looking spectra in the thermal range containing
  sharp spikes.  This problem has been significant for people
  doing MCNP analyses of accelerator experiments, such as cold
  neutron sources.  A new method is provided here that uses
  a continuous secondary-energy distribution that can be 
  sampled in MCNP or MCNPX using a pdf/cdf method.  Angular
  distributions are still discrete, but they can be smoothed
  during MCNP/MCNPX sampling.  A patch to MCNP to handle this
  format is in the process of being adapted to the standard
  distributions of MCNP and MCNPX.  The new plotting capability
  adds plots of the outgoing distributions.

*ident up114
*/ leapr -- 01mar06
*/  put out a few more discrete lines at low alpha
*/  weight is wrong when adding continuum parts for discrete lines
*/  allow for smaller sab numbers in endf file
*/  add skold method for handling intermolecular correlations
*   as used for d(d2o) by keinert and mattes.

  These changes to leapr support some of the new evaluations
  provided for ENDF/B-VII and JEFF3.

*ident up115
*/ heatr -- 3apr06
*/  skip over heating calculation when there is no distribution
*/  allow for fission distributions in file 6 as in 7beta1 th-232.
*/  the yld becomes nubar.

*ident up116
*/ groupr -- 05apr06
*/  fix reading tab1 record in conver (trkov, iaea)

*ident up117
*/ moder -- 05apr06
*/  process compact format representation in mf32 (trkov, iaea)
*/  see new utility routine intgio in up118 below.

  The original formats for resonance covariances have been
  expanded to allow for more detail correlations between the
  various resonance parameters.  The data are so complex that
  a compact representation has been devised.  Changes in this
  update set are designed to read through the new format in
  File 32, but not to process them.  The alternate ERRORJ
  modules will take care of that in the future.

*ident up118
*/ njoy -- 05apr06
*/  new utility routine to process compact format representation
*/  for mf32 (trkov, iaea). see also up117 which uses this subroutine.

*ident up119
*/ acer -- 05apr06
*/  fix bug that switched off ddx plots (trkov, iaea).

*ident up120
*/ errorr -- 05apr06
*/  temporary patch to skip processing unrecognized options
*/  for mf32 (trkov, iaea).

*ident up121
*/ heatr -- 13apr06
*/ add tosend in nheat when the last subsection of file 6
*/ section 5 does not include particle distributions.

*ident up122
*/ acer -- 13apr06
*/  fix bad message for renormalizing the delayed spectrum
*/  the undefined index lxx can cause crashes

*ident up123
*/ acer -- 19apr06
*/  increase storage limit for preVII thermal evaluations

*ident up124
*/ thermr -- 19apr06
*/  increase storage space for big preVII thermal evaluations
*/  allow for up to 32 angle bins as used in tripoli

*ident up125
*/ acer -- 19apr06
*/  patch acer to handle the discrete anisotropic mf6 capture
*/  photon in endf/b-vii h-1.  temporarily, the relativistic
*/  effect will be ignored and it will be treated as a
*/  simple primary photon.

  The new ENDF/B-VII evaluation for neutrons on H-1 includes
  an anisotropic photon given in File 6.  This photon requires
  a relativistic treatment of the outgoing photon energy and
  angle for completeness.  In the interim, we have provided
  an approximate treatment.  The complete treeatment will
  require changes in MCNP.

*ident up126
*/ broadr -- 22apr06
*/  watch out for tt(0)

  A computer compatibility fix.

*ident up127
*/ heatr -- 22apr06
*/  the routine getsix doesn't have any coding to handle law 6
*/  (phase space distributions).  temporarily, we set ebar
*/  and dame equal to zero.  this affects endf h-2 (n,2n).

  This is a temporary workaround.  The heating and damage
  for deuterium will be wrong above the n2n threshold.

*/  missing save
*/  fix initialization of df for tabulated distributions

  Computer compatibility problems that show up with compiler
  checking on.

*ident up128
*/ thermr -- 24apr06
*/  fix ending point for coherent scattering, which sometimes
*/  goes into an infinite loop.

*ident up129
*/ njoy -- 26apr06
*/  restructure do loop so tht bounds checking doesn't fail
*/  need large printed fields for storage diagnostics

  Problems showed up when compiler bound checking was used.

*ident up130
*/ acer -- 27apr06
*/ increase Legendre array to 65 and add test to avoid array bound overflow
*/ increase argument value from 100 to 300 to match
*/ nethr definition in subroutine first.
*/  restructure if test since e1 and e2 are only defined
*/  when ithopt=1.
*/  move egamma statement to assure it is initialized
*/  prior to subsequent usage.
*/  provide a dummy law value so subsequent if statements
*/  have a defined value to test.
*/  a do nothing change to keep the compiler happy.
*/  existing code logic (ltt3=3) is ok.
*/  make sure pp1 is initialized to zero.

  This changes also correct problems found when detailed
  compiler checking was enabled with the Intel compiler.

*ident up131
*/ groupr -- 9may06
*/  watch out for sed(_,0)
*/  save some additional variables.
*/  this has not been a problem in the past, but its easy to
*/  include an additional else branch test to abort if an
*/  invalid quadrature order is ever set.
*/  add "save ipd,ird" in getyld so that initial call to
*/  terpa has all needed info.
*/  delete un-needed contio call.  This record was read back
*/  in getmf6 and c(_) has been passed to f6psp.  Actually
*/  as currently coded, nin in the contio argument list is
*/  undefined here.  Most compilers will have set it to zero
*/  and the contio call does nothing, hence previous processing
*/  of 2h (the only evaluation using law=6 at this time) is
*/  probably ok.

  More changes from detailed compiler checking.

*ident up132
*/ moder --12may06
*/  matd is undefined unless loop>0, therefore break if test
*/  into two pieces.

*ident up133
*/ reconr -- 12may06
*/  make sure there is a ym to go with this xm.

*ident up134
*/ broadr -- 12may06
*/  make sure ctev is initialized before subsequent if test
*/  dealing with thermal g-factor edit.

*ident up135
*/ heatr -- 12may06
*/  make sure izap is saved for subsequent use in h6dis and bacha.
*/  fix typo (fn should have been f) in this update.
*/  make sure tt=0 unless subsequent if clause changes it.
*/  make sure ihi and ilo are initialized prior to subsequent
*/  if test for output.

*/ fix the check plots

  Without this patch, the photon plots from the heatr
  energy-balance checks didn't show the results.  These
  energy-balance tests have been useful during ENDF/B-VII
  testing.

*ident up136
*/ heatr -- 30aug06
*/ change energy dependent fission pseudo-q calculation.  the
*/ coefficient used with the incident neutron energy in previous
*/ versons of njoy does not agree with the format manual energy
*/ dependent equations.  see the endf7 paper in nuclear data sheets
*/ for a discussion.

   The average energy of the fission fragments tends to be
   energy dependent, and formulas estimating the dependence
   have been included in the ENDF format manual for some
   time.  Recently Madland revisted some of this work.  While
   studying his work, we realized that we had not implemented
   the older work quite correctly, and this patch fixes that.
   The difference is modest in the MeV range, but a little more
   significant at 14 MeV.

*/ same as heatr.799, but for single precision code.
*/ rewrite the energy release equation with a plus sign.  this lets
*/ the sign of the fq1 and fq2 coefficients given in the data
*/ statement control whether its truly addition or subtraction.
*/ make sure nwmax is large enough to handle 239pu prompt
*/ make sure mf1 is defined for the hgtyld call and pass mtd (not mt1)
*/ for the file type.
*/ make sure the tab1 record fits into the allocated space.
*/ initialize these variables in double precision, as done for others.
*/ eliminate redundant if tests.
*/ restructure these "if" tests since x is only defined when the
*/ gety2 call has been made.  Needed to keep the compiler happy
*/ when processing endf/b-viib2 15n.

*ident up138
*/ groupr -- 31aug06
*/ tweaks in groupr's bach so that it tests the same list of iza
*/ possibilities as are tested in heatr's bacha and acer's bachaa.

  Helps with consistency, but this capability is not so
  important now that ENDF/B-VII and other systems have moved
  to an almost exclusive use of isotopic evaluations.

*ident up139
*/ acer - 31aug06
*/ a tweak in acer's bachaa to make it consistent with heatr's bacha.

  As above.

*ident up140
*/ groupr -- 31aug06
*/ make sure all variables that were changed while processing the
*/ previous reaction are restored to their defaults before starting
*/ on the next reaction.
*/ de is only defined with (lf.ne.12), therefore only calculate
*/ xc under the same condition.  If not, endf/b-viib2 241,243am will
*/ abort due to undefined de.

*ident up141
*/ njoy -- 31aug06
*/ initialize xold prior to first use.  a value of zero means the
*/ "do while" loop is executed at least once.

*ident up142
*/ moder -- 31aug06
*/ add coding to read the new beta-delayed photon data that may
*/ be found in files 1, 12 and 14, section 460 (beginning with
*/ endf/b-vii).  This coding matches the specifications given
*/ by brown et al at the nov2004 & 2005 csewg meetings.
*/ note that no changes are needed for file 14 processing.

  These changes just allow the code to flow when MT460
  sections are present, but they don't do any processing
  of them.

*ident up143
*/ acer -- 31aug06
*/ (these mods in response to c. broeders, karlsruhe)
*/ up113 uses "nsyso" in subroutine thrlod, but it was never defined.
*/ add error to the external subprogram list or some compilers will
*/ complain that our use doesn't conform to the intrinsic error function.

*ident up144
*/ reconr -- 01sep06
*/ already initialized "zero" in up92, delete the redundant up99 code.

*ident up145
*/ broadr -- 01sep06
*/ (from "patch_japan_njoy99_112a.txt")
*/ need to put this if test inside the do loop.

*ident up146
*/ heatr -- 01sep06
*/ (from "patch_japan_njoy99_112a.txt")
*/ current code overloads "nz" and can never update loc.

*ident up147
*/ acer -- 01sep06
*/ (several corrections, from "patch_japan_njoy99_112a.txt")
*/ maximum legendre order was changed from 20 to 64 years ago.
*/ change comment and hardwired do loop terminating constant to "ni".
*/ need reaction q value when call acelf5 or acelf6.  Therefore
*/ shift location of current code.
*/ 2*nint(spi) is wrong; need nint(2.*spi).  Here and line 7299.
*/ need a bigger integer field for the error message.
*/ keep making various arrays larger.  Use parameter statement so it
*/ will be easier the next time.
*/ 2*nint(spi) is wrong; need nint(2.*spi).  Here and line 5463.

*ident up148
*/ njoy -- 05sep06
*/ change asend, afend amend and atend utility routines to set the
*/ last section record counter to 99999 or the last file, material
*/ or tape section record counter to zero.  Reset the counter to
*/ one for the next initial section record.

  This convention has been used for a long time in the standard
  ENDF files--we are just getting up to date.

*ident up149
*/ broadr -- 19sep06
*/ use unique variable to allocate nubar space.

*ident up150
*/ reconr -- 19sep06
*/ update 142 fixed moder to handle the new mt460 beta-delayed
*/ photon data, but we also need patches so that we don't look for
*/ a corresponding mf=3, mt=460 when executing other modules.
*/ In particular, need patches in reconr, heatr, groupr and acer.
*/ Take care of reconr in this update, then heatr, groupr and
*/ acer in the next three updates.
*/ tested with endf/b-viib3 239pu.  reconr output files are
*/ identical whether mf1, mf12 & mf14, mt460 are present or
*/ not in the endf input file (21sep06).
*/ eliminate mf12,mt460 from lunion's output tape, which propagates
*/ through to recout.  Put this test before existing if(mfh.eq.12)
*/ test to make sure it gets executed.

  As stated above, we are just passing over MT460 and not
  making any use of the new data.

*ident up151
*/ heatr -- 20sep06
*/ mods needed to skip over mf12, mt460 so that heatr doesn't
*/ try to find the non-existent mf3, mt460.
*/ tested with endf/b-viib3 239pu.  heatr output files are
*/ identical whether mf1, mf12 & mf14, mt460 are present or
*/ not in the endf input file (21sep06).
*/ expand test, only true when mtd.ne.460 now.
*/ omit mt460 as a reaction to include in the sum.
*/ expand test, only true when mth.ne.460 now.

*ident up152
*/ groupr -- 21sep06
*/ mods needed to skip over mf12, mt460.
*/ tested with endf/b-viib3 239pu.  groupr output files are
*/ identical whether mf1, mf12 & mf14, mt460 are present or
*/ not in the endf input file (21sep06).

*ident up153
*/ acer -- 21sep06
*/ mods needed to skip over mf12, mt460.
*/ tested with endf/b-viib3 239pu.  acer output files are
*/ identical whether mf1, mf12 & mf14, mt460 are present or
*/ not in the endf input file (21sep06).

*ident up154
*/ acer -- 22sep06
*/  set nu-bar for neutron multiplicity on MF6 fission (trkov, iaea).
*/  force lab coordinate system.
*/  (Th-232 from ENDF/B-VII with anisotropic fission neutron distributions)

  This caused problems with MCNP criticality results for Th
  assemblies.

*/  exclude redundant lumped cross sections mt 851-870, if present.
*/  (not allowed by ENDF rules but needed by ERRORR).
*/ initialize unset nxs and jxs elements.
*/ otherwise there can be problems if multiple acer runs
*/ are done in one njoy deck.
*/ allow thermal names as long as six characters (trkov)
*/ set default values for rkal and akal (kosako)

*ident up155
*/ reconr -- 22sep06
*/   be more precise in skipping redundant lumped reactions (Ivo Kodeli)

*ident up156
*/ leapr -- 22sep06
*/   fix problems in recent updates reported by Lahey compiler (A. Trkov)

*ident up157
*/ groupr -- 22sep06
*/  from a.trkov, ijs
*/ groupr A. Trkov, IJS, June 2006
*/        allow processing of lumped reactions defined for covariances
*/        (problem pointed out by a.bidaud
*/        processing th-232 from endf/b-vii)

*ident up158
*/ errorr -- 22sep06
*/   further updates to process redundant lumped reactions (ivo kodeli)
*/   fix for si-28 endf/b-vi evaluation - more than 40 mt. (ivo kodeli)
*/ tidy-up for consistency (a.trkov)
*/ make sure l has the right value with multiple ni subsections

*ident up159
*/ viewr -- 22sep06
*/     a.trkov, IAEA, April 2006
*/       fix colour shades in covariance plots

*ident up160
*/ covr -- 22sep06
*/  from a.trkov, iaea, April 2006
*/       - fix labels for unassigned mt numbers
*/       - improve trapping of large correaltion coefficients
*/ move trapping of large correlations from level to matshd
*/   fix for si-28 endf/b-vi evaluation - more than 40 mt. (ivo kodeli)
*/   delete redundant common/fig/

*ident up161
*/ groupr -- 22aug06
*/  add a capability to handle int=22
*/  for evaluations taken from jendl.

  Some of the newer evaluations from the JENDL system use the
  2-D interpolation scheme called "unit base" for distributions.
  Many of these evaluations also appear in JEFF3, and some in
  ENDF/B-VII.  This patch handles this int=22 method in File 5.
  File 6 processing already handles this correctly.

njoy99 up204 readme notes:

This update is the next official release after NJOY99.161.

A major correction from up115 for heating calculations is made in up185.
Another patch affecting charged-particle partial heating values was made in
up201.  Users of NJOY99.115 or later that work with heatr or acer output
should re-generate those files.

Other important changes include:
 - ident172 extends the up62 purr modifications;
 - ident173 (extended in ident183) eliminates redundant zeroes at the
   beginning of file 5 TAB1 functions (this eliminates a possible distortion
   of the low energy function when unit base interpolation is applied);
 - ident175 increases the maximum number of reactions that can be broadened
   from 10 to 40;
 - idents 180 to 182 extend use of the "f" format in pendf output to
   energies between 0.1 eV and 1.0 eV.  This allows energy differences in the
   8th significant digit to rendered;
 - ident200 adds single precision equivalents for the GROUPR group structures
   that were added with double precision mode in up107.

Many of the remaining modifications relate to making sure the single precision
and double precision versions of the code are consistent.  We found a number
of instances where prior idents had placed generic code within the *set sw
construct, which meant that it only appeared in the double precision version.
These code sections have been moved and compiler errors that were encountered
when attempting to create the single precision version have now been eliminated.
Also, the new group structures in up107 were only given in double precision;
single precision equivalents have now been added.  Finally, use of "d" or "e"
exponents in selected data or assignment statements that was not always
consistent with the required single or double precision specification has been
corrected.

Users are cautioned that several data or assignment statements use values
that are too small to represent in single precision on 32-bit machines.  Our
experience is that the Intel compiler will successfully produce an executable
NJOY file (with on screen warning messages stating that these variables have
been set to zero).  At other times, single precision data or assignment
statememts may use numerical data with ten or more significant digits.
Single precision accuracy to this level cannot be rendered on 32-bit platforms
and code logic that depends upon these least significant digits may not (and
more likely will not) execute correctly.

THE SINGLE PRECISION VERSION OF NJOY IS ONLY MEANT FOR USE ON 64-BIT PLATFORMS.

In the NJOY module, several inconsistancies between single and double
precision versions of selected slatec modules were eliminated.  The double
precision version of these routines was correct, and they remain unaltered.

In GROUPR, differences in the 9th and 10th digits of some of the the "qp8"
array variables in "getdis" were eliminated.  The change is technically
insignificant, but these variables should have been (and now are) identical.

This update also includes portions of upnea12
(from http://www.nea.fr/html/dbprog/Njoy/upnea12), as follows:

 - upijs65:   implemented in up165.
 - upijs66:   implemented in up166.
 - upnea001:  not implemented.  We'll leave this for local users to
              incorporate.  It is very compiler specific and a side
              effect is that all scratch files with a status of
              "unknown" remain on the system after job execution.
 - upnea002:  not implemented.  Neither this coding nor the original
              (upfzk2.dat) coding seems necessary.  The call to CONTIO
              that follows call findf in lines matxsr.1880 and
              matxsr.188x will have no impact upon the values of mat,
              mf and mt.  These changes do not seem to be necessary.
              Received email from Andre Trkov (5/21/2007) and Cornelis
              Broeders (5/23/2007) agreeing with this position.
 - upnea003:  implemented in up170.
 - upnea004:  not implemented.  Changes to existing group structures
              can have unexpected consequences to the total njoy user
              community.  If specific users need such a change, they can
              implement it locally.
 - upnea005:  not implemented.  The save statement at groupr.5334 has
              been corrected in up167, which should eliminate the
              infinite loop error.  The remaining test on "inow" was
              arbitrary and since the size of array a, c or cnow (depending
              upon subroutine or function) has been increased, it is
              no longer necessary.  Received email from Andre Trkov
              (5/21/2007) and Cornelis Broeders (5/23/2007) agreeing
              with this position.
 - upnea006:  implemented in up171, except that the maxw variable has
              not been changed.  The current 5000 size is expected by
              TRANSX.
 - upnea007:  partially implement in up167.  We have chosen to keep
              all information messages.
 - upnea008:  implemented in up169.
 - upnea009:  partially implemented in up167.  We do not believe that
              all of the changes made in "009" are appropriate and that
              the coding as now implemented is correct.
 - upnea010:  implemented in up189.
 - upnea011:  implemented in up190.
 - upnea012:  implemented as part of up175 where the number of reactions
              that can be broadened is increased to 40.

The heatr module has a capability to do detailed energy-balance tests.
One usually needs to ask for the partial kerma mt303 to get complete
results and all the plots.  We provided up204 to protect the code from
crashing when mt303 is not asked for.  The photon energy-balance plots
will be omitted in that case.

Additional changes beyond 99.204 as issued on 27 June 2007:

up205 modifies a single-precision quadrature point array in
groupr to exactly match its double-precision counterpoint.

up206 explicitly initializes an acer variable to keep the intel
compiler happy.

up207 stops a loop iteration at with the proper index to avoid an
array bounds overflow in the groupr flux calculator.

up208 adds an approximate treatment for the relativistic discrete
gamma in the endf/b-vii evaluation for n + h-1.  we are using a
simple isotropic discrete primary photon for now.  see also up212.

up209 fixes a double counting of the charged-particle heating when
the charged-particle is represented as discrete recoil in file 6
with law 4.  an example is li6(n,t)alpha from endf/b-vii.  this
problem was reported by little and trellue (lanl).

up210 fixes a problem observed when the weight function energies
provided by a user use 7 or more digits.  the symptom is an
infinite loop (reported by Broeders).

up211 fixes the heating and damage calculation associated with
the phase-space representation of the (n,2n)p reaction for neutrons
on h-2 from endf/b-vii.

up212 implements an approximate treatment of the relativistic
discrete gamma ray in the endf/b-vii evaluation of neutrons on
h-1.  for now, it is treated as a simple isotropic primary photon.
see also up208.  the proper relativistic formulas for treating
the anisotropic photon distribution will be added at a future date.
currently, mcnp can't handle sampling from the photon distribution,
and we will want to coordinate the njoy and mcnp changes for this
advanced representation.

up213 makes some changes in acer plotting.  the important thing is
a new plot of the "recoil heating," that is, the normal heating 
minus the charged particle heating given with the particle
production sections (when present).  in order to do a coupled
calculation including charged particles (such as a coupled neutron,
photon, proton calculation), you have to correct the normal heating
value by subtracting the heating from the charged particles (or
particles) that you want to transport.  the heating for that charged
particle will then be deposited by the slowing down of that particle
rather than as local heating.  because of various energy-balance
problems that show up in evaluations, it is possible that this
"recoil heating" will show problems, such as negative values.
this new plot can help the user to recognize these problems.  of
course, negative values for the heating are often compensated for
when the excess energy of the emitted particle is deposited, unless
the particle reacts far from the site of the reaction.  the normal
acer heating value for neutron-photon transport can also have 
unreasonable values (including negative values), and the linear
version of the heating plot has been modified to show the negative
region.  more information on energy-balance problems is available
from heatr checking runs.

up214 patches a format statement in powr (which is rarely used 
these days).

up215 modifies reconr to be able to process photonuclar files
in a graceful way.  this is needed for the russian actinide
evaluations.  see also up216.

up216 modifies the photonuclear option in acer to be able to
use both an endf input and a pendf input from reconr.  this
allows the russian actinide evaluations to be processed
correctly without the awkward work-arounds that people have
had to use.  this problem was diagnosed by morgan white (lanl).

u217 fixes the sizes of some arrays in heatr associated by
legendre polynomials.

up218 increases the size of an integer format in acer to handle
cases with more than 100k points in the energy grid.

up219 is an extension to acer that is turned off by default.  it
can be activated by changing the value of ismooth.  many endf
evaluations use histograms to represent outgoing neutron spectra
as produced by model codes.  however, the expected shape of the
low-energy region for these distributions is sqrt(e).  the edges
introduced by the histogram steps in computed flux spectra can
be noticeable.  the the lowest bin can lead to strange looking
overestimates of the flux at the lowest energies.  this patch can
be used to smooth out these bumps.  it modifies the first few
bins by adding additional bins with log spacing to better
approximate sqrt(e).  the effect on criticality of this smoothing
seems to be minimal, but it does produce more physical looking
graphs of the flux or reaction rates.  similarly, the endf
delayed-neutron spectra are represented using histograms.  the
histogram break at 10 kev can sometimes be seen in plots of
the flux or reaction rates, and more delayed neutrons appear at
very low energies than one would expect.  this patch divides
the 0-10 keV bin into smaller bins with log spacing to approximate
a sqrt(e) shape.  finally, the energy spacing for some tabulated
fission spectra increases from .1 meV spacing just below 10 mev
to 1 mev spacing above.  with its linear interpolation, this
larger spacing doesn't approximate the exponential shape of the
function very well.  this patch interpolates additional points
on a 200 kev grid using the exponential shape to smooth out the
interpolation cusps in the spectrum.

up220 for acer fixes the plotting of fission nubar when it is
described as a polynomial.

up221 expands upon up219.  fission spectrum processing for
energies greater than 10 MeV was inadvertantly turned on in up219;
this update turns it off as stated in the comments above.  The
algorithm has also been revised to only execute when fission
spectrum energy values in the original endf-formatted file
change by at least 200 keV (as they do for endf/b-vii 235U).

up222 is a minor revision to viewr that allows exponents of -10
or less to be properly printed on the y-axis.  Previous coding
specified an "i2" format which was insufficient in these cases.

up223 is an update to up215.  up215 modified the total xs mt value
written to reconr's pendf tape from 1 to 3, as necessary when
processing photonuclear files, but was coded such that the
dictionary was incorrectly modified when processing neutron
or photo-atomic files.  This update corrects that error.

up224 is an update to up77.  If the compiler has not defaulted
unitialized variables to zero, then nin2 can be undefined.  We
explicitly initialize it to zero.

up225 is an update to up187.  up187 assumed we could get the
maximum energy from file1/451 if this was an endfb6 formatted file.
That is not true for early endfb6 releases and so this assignment
statement has been modified to default to no lower than 20 MeV.
We also delete a no longer needed data statement.

up226 makes the corresponding change for acer.

up227 makes the fixes to the energy range for discrete levels
described by transition probabilites discussed above for up174,
up187, up225, and up226.