NJOY21: Next generation nuclear data processing capabilities

. NJOY is a well respected code for nuclear data processing throughout the world. It was ﬁrst publicly released in 1977 as a successor to MINX and has continuously improved its capabilities ever since. The latest release of NJOY is NJOY2012 and was released in December 2012 with its latest update coming in February 2015. A new effort has begun at Los Alamos National Laboratory to ensure that NJOY remains a useful nuclear data processing code for the next generation of data processing needs. The result of this effort will be NJOY21, a new code for processing nuclear data and interacting with a variety of nuclear data ﬁles. Much has changed in the nuclear data world since NJOY was ﬁrst released. Perhaps the biggest change is the increase in the amount of data—both in the number of available materials and the richness of the data for each material. While more and better nuclear data greatly improves the quality of simulations and calculations that rely on that data, it creates signiﬁcant challenges for the individual who processes and veriﬁes the nuclear data. NJOY2012 is well vetted and capable, but when processing many ﬁles/materials, it is cumbersome and slow.NJOY21 will build on the success of many previous major releases of NJOY made during the previous four decades. In addition, NJOY21 will facilitate the processing, verifying, and validating of many nuclear data ﬁles.


History of NJOY
NJOY began as the successor of the MINX (Multigroup Interpretation of Nuclear X-Sections) code [1] written in FORTRAN 77. It was initially referred to as "MINX-II" or "MINX plus". Advancing each letter of MINX produces the NJOY name and at the time seemed like a simple way to indicate the new processing code system represented an upgrade from that previously available.
NJOY was publicly released in the summer of 1977 to the Oak Ridge and Argonne code centers (RSIC and NESC respectively). The release included a custom line editor-upd-for version control. Minor updates to NJOY have been provided via "source" files usable by upd.
Since 1977, there have been ten major releases of NJOY [2]. The most recent is NJOY2012, released in December 2012. NJOY2012 was re-written in Fortran 90/95 and included new capabilities including the resolved resonance format-limited Reich-Moore-which was not available in its immediate predecessor, NJOY99. NJOY2012 was a major update and was re-written in Fortran 90/95. NJOY2012 was updated to NJOY2012.50 in February 2015. Many other limits have been eliminated due to the replacement of fixed arrays with allocatable arrays whose size is determined during runtime.
NJOY has become the gold-standard for nuclear data processing and is used and trusted throughout the world.

NJOY and nuclear data formats
NJOY has a close association with the ENDF format. While NJOY was first made publicly available in 1977, a e-mail: jlconlin@lanl.gov ENDF was first proposed in 1966 and the first set of data (ENDF/B-I) was released in 1968. Over the decades the ENDF format changed alongside the release of the ENDF/B library. The last major release of the ENDF format was ENDF6 in July of 1990 with a few minor revisions, the latest in December of 2011. The ENDF format has been a standard format for sharing nuclear data between institutions across the world and has been very successful.
A new nuclear data format, Generalized Nuclear Data (GND), has been under development for much of the last decade. GND has its origins at Lawrence Livermore National Laboratory where it was developed for their internal data formats. In 2012 the development of GND was formally begun under the auspices of Subgroup 38 of the Working Party on International Nuclear Data Evaluation Co-operation (WPEC) of the NEA. GND is expected to replace ENDF as the standard format for sharing nuclear data in the future. It is a major departure from ENDF and addresses many of the deficiencies of ENDF, particularly the limitation of only being able to hold single-precision data.

NJOY21: NJOY for the 21 st century
NJOY21 is a major update to NJOY2012, motivated by the need to be able to handle GND formatted evaluated data files. NJOY2012 and its predecessors are too tightly coupled to the ENDF format, making it virtually impossible to retrofit GND into NJOY. We decided to take the opportunity to rewrite NJOY from the ground up and NJOY21-NJOY for the 21 st Century-was born.

ND2016
Once it was decided to create NJOY21 we took the opportunity to modernize every aspect of NJOY, particularly the code design and how one would interact with NJOY [3]. Both the design of NJOY2012 and the way a user interacts with it is outdated and ineffective for modern computers and the size of modern data sets. Also, the development model for NJOY2012 doesn't meet the expectations required today by scientific codes.
NJOY has a long history of use and many individuals and institutions have established practices with how to work with NJOY. An important aspect of NJOY21 is to remain backwards compatible with NJOY2012; that is, an input deck for NJOY2012 will also work for NJOY21.
We are committed to maintaining and improving NJOY's image as trusted and stable processing code. We are implementing modern software development practices expected in all major codes. We are using the latest capabilities of the C++ language and taking advantage of external libraries where available. Most importantly, we are testing every aspect of the code with regular and continuous tests as well as measuring how much of the test code covers the production code.

Goals
The development of NJOY21 is framed by several goals: 1) Maintain NJOY's image of a trusted and stable processing code; 2) improve collaboration with researchers, scientists, and graduate students; 3) make NJOY easier to build, easier to verify and validate, easier interact with, and easier to process nuclear data; 4) make NJOY more flexible by enabling multiple ways of driving/interacting with NJOY21 and enabling alternative components; 5) make NJOY faster; and finally 6) make NJOY easier to maintain.

Opening NJOY21
NJOY has been made available from RSICC out of Oak Ridge throughout most of its history. Through reciprocal agreements with the NEA Databank, NJOY was available to researchers in Europe for free. NJOY2012 was distributed not through, RSICC, but through Los Alamos National Laboratory's Feynman Center for Innovation. The Feynman Center does not have an agreement with the NEA Databank and so many of NJOY's customers and collaborators from overseas were no longer able to obtain NJOY, or it was prohibitively expensive. NJOY21 is being made available for free to everyone and is distributed as open source with a 3-clause BSD license. There was little benefit to LANL in distributing NJOY2012 for a fee. There are, however, many benefits for distributing NJOY21 in an open source manner: 1. Increase availability of NJOY 2. Encourage use of NJOY • Graduate students • Researchers • Data users 3. Encourage collaboration in data processing tools. NJOY21 is being distributed through. The webpage for NJOY is and contains links to all of the source code that is available. As of this writing, only a very few components of NJOY21 are available and none of them are complete. We encourage all who are interested in contributing to NJOY21 to visit our website or contact the developers (njoy21@lanl.gov) to learn how you can contribute.

Modern software development
Two of the goals for NJOY21 are to make it easier to verify and validate and to make it easer to maintain. These goals are being accomplished by utilizing modern software development techniques.
The requirements for NJOY21 are that every feature is thoroughly and regularly tested. We utilize many unit and integration tests to verify and validate that NJOY21 is performing as expected. This is not revolutionary; rather is expected in all serious software development especially for scientific codes. In addition to implementing vigorous testing, we have incorporated continuous testing to ensure that when something goes wrong the developers are quickly notified. End users will be able to run the same tests that the developers use to ensure that their installation is performing as expected.
NJOY has been modular in design since its inception. NJOY21 has continued that design, but with a slightly different direction; NJOY21 is composed of a number of toolkits that can be used independently and are combined together to create NJOY21. The benefit to this is that each toolkit can be developed and maintained independently making it easier to maintain the NJOY21 source.
These are not the only modern techniques used to develop NJOY21. We encourage readers of this paper to visit our website http://njoy.lanl.gov to see everything we are doing.

Improved error handling
When NJOY2012 is executed, the processing of the data is intermingled with the reading of the input deck; input values are read from the input deck when they are needed. Also, NJOY2012 doesn't ensure that the input values are valid, i.e., that the input values are within expected parameters. When invalid values are given in the NJOY input, this causes odd problems. While there are many NJOY2012 error messages, the messages that are given don't always point directly to the incorrect input value.
NJOY21 takes a different approach. Before any processing is done, the input values are checked and validated to ensure they are within the expected parameters. If the input value is invalid, an error message is printed to the screen naming precisely the input variable that is wrong.

Conclusion
NJOY21 is being developed at Los Alamos National Laboratory. The developers are regular users of NJOY2012 and are familiar with its strengths and weaknesses. We have documented the changes and improvements we want and need and are working to implement these changes.