# How to get the nndc ENDFb7.1 and b7.1-hdf5 crosssection library for multiple temperature?

**URL:** <https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557>\
**Category:** User Support\
**Created:** [February 24, 2020, 11:10am UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557 "2020-02-24T11:10:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [February 24, 2020, 11:10am UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/1 "2020-02-24T11:10:10Z")

</div>

I see in the [https://github.com/openmc-dev/data/blob/master/convert\_nndc71.py](https://github.com/openmc-dev/data/blob/master/convert_nndc71.py) scrip this only generate the hdf cross section library for 293.7K. How do I generate cross section library for 300K,400K,500K,600K,700K,800K,900K,1000K,1100K,1200K,1300K,1400K,1500K ?

Can anyone please guide me on this? Thanks.

---

<div class="post-metadata">

**Author:** ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)\
**Post date:** [February 24, 2020, 11:37am UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/2 "2020-02-24T11:37:56Z")

</div>

Hi Sharif

I believe the current convert\_nndc71.py does not know about these temperature libraries you mentioned. If you can point me to a download link for these temperatures then we can raise and issue on the openmc data repository and think about adding this feature.

I noticed that ENDF version 8 has some beta temperature tables so perhaps we should look into this in the future [https://nucleardata.lanl.gov/ACE/Betas/ENDF8.0.html](https://nucleardata.lanl.gov/ACE/Betas/ENDF8.0.html)

Currently the convert\_jeff33.py script has the option of downloading multiple temperatures [https://github.com/openmc-dev/data/blob/master/convert\_jeff32.py](https://github.com/openmc-dev/data/blob/master/convert_jeff32.py)

We are also looking at upgrading the convert\_jeff33.py so that it supports multiple temperatures for the libraries, see this issue [https://github.com/openmc-dev/data/issues/28](https://github.com/openmc-dev/data/issues/28)

There is also the WMP library which allows for temperatures in cross sections that you might be interested in

[https://docs.openmc.org/en/latest/io\_formats/data\_wmp.html](https://docs.openmc.org/en/latest/io_formats/data_wmp.html)

All the best

Jon

---

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [February 24, 2020, 12:03pm UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/3 "2020-02-24T12:03:43Z")

</div>

Yes, I know that convert\_jeff33.py supports multiple temperatures. I was thinking of same for the ENDF/B, I see the JEFF data is possible for ‘1000’, ‘1200’, ‘1500’, ‘1800’  
‘293’, ‘400’, ‘500’, ‘600’, ‘700’, ‘800’, ‘900’, temperatures, is the same not yet possible with ENDF/B?

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [February 24, 2020, 1:25pm UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/4 "2020-02-24T13:25:23Z")

</div>

Hi Sharif,

Any underlying cross section library (set of ENDF files) can in principle be processed to an arbitrary set of temperatures. Many of the libraries that we distribute are just converted from pre-existing ACE libraries where someone else has decided what temperatures to include. The “NNDC” cross sections we use for testing are really just ENDF/B-VII.1 files that were processed by the NNDC at a single temperature. If you want ENDF/B-VII.1 cross sections at multiple temperatures, your options are:

- Use our “[official](https://press3.mcs.anl.gov/openmc/official-data-libraries/)” library which has data at 250, 293, 600, 900, 1200, and 2500 K
- Use the [LANL-based library](https://press3.mcs.anl.gov/openmc/lanl-data-libraries/) which has data at the same temperatures
- Use our [generate\_endf71.py](https://github.com/openmc-dev/data/blob/master/generate_endf71.py) script to generate files at whatever temperatures you wish to have (note that this requires you to install NJOY, and it will take a bit of time to process all nuclides). This is the script that was used to generate the “official” library above.

Best,  
Paul

---

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [August 15, 2020, 6:14am UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/5 "2020-08-15T06:14:24Z")

</div>

Greeting Dr. I am following the guide here to download NJOY from here [http://www.njoy21.io/Build/](http://www.njoy21.io/Build/)

```auto
# Download the source code
git clone https://github.com/njoy/NJOY21.git

# Get the desired version of NJOY21 (1.1.0 in this example)
cd NJOY21
wget https://raw.githubusercontent.com/njoy/signatures/master/NJOY21/1.1.0-NJOY21.json
./metaconfigure/fetch_subprojects.py 1.1.0-NJOY21.json

# Configure the build process
mkdir bin
cd bin
cmake -D fetched_subprojects=true ../

# Build NJOY1
make

# Test NJOY1
make test

```

Now, using the generate\_endf71.py script to generate files at different temperatures, Can you please guide me how the conversion will work. Should I put the script and utils.py in the same location where I downloaded NJOY? How should I use the NJOY to get the cross sections data?

Please guide.

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [August 15, 2020, 11:24am UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/6 "2020-08-15T11:24:31Z")

</div>

Hi @shabudarda

By default, NJOY21 is compiled using dynamic libraries. If you move the executable, you should move the dynamic library that is generated as well.  
For static compiling

```auto
cmake -D fetched_subprojects=true -Dstatic_libraries=ON -Dstatic_njoy=ON -DCMAKE_EXE_LINKER_FLAGS=-static ../

```

After installing, add the following line in `~/.bashrc`

`export PATH=$PATH:$HOME/NJOY21/bin`

```auto
file = openmc.data.njoy.make_ace('file.endf', temperatures = [250, .., ..], njoy_exec='njoy21', stdout = True)

```

Install the `utils.py` script and If you are using **NJOY21** then in `utils.py` script add **njoy\_exec='njoy21’**

```auto
            data = openmc.data.IncidentNeutron.from_njoy(
                path, temperatures=temperatures, njoy_exec='njoy21'
            )
            data = openmc.data.ThermalScattering.from_njoy(
                path_neutron, path_thermal, njoy_exec='njoy21'
            )

```

Now simply run **`python3 generate_endf71.py`**.

---

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [August 15, 2020, 2:09pm UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/7 "2020-08-15T14:09:28Z")

</div>

So with the NJOY directory set in the bashrc. I have to run this for every single nuclides? also where will i find the endf files? i was trying to use the generate-endf7.py script. how i include the conversation in there?

```auto
file = openmc.data.njoy.make_ace('file.endf', temperatures = [250, .., ..], njoy_exec='njoy21', stdout = True)

```

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [August 15, 2020, 2:25pm UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/8 "2020-08-15T14:25:48Z")

</div>

Did you install **NJOY** @shabudarda? I will tell you to install NJOY2016 instead of NJOY21.

> [@shabudarda](#):
>
> I have to run this for every single nuclides?

It depends on you whether you want for every nuclide or not.

> [@shabudarda](#):
>
> where will i find the endf files?

[endf file](https://www.nndc.bnl.gov/endf/b7.1/download.html)

> [@shabudarda](#):
>
> ```auto
> file = openmc.data.njoy.make_ace('file.endf', temperatures = [250, .., ..], njoy_exec='njoy21', stdout = True)
> 
> ```

I added this for a single nuclide.

> [@shabudarda](#):
>
> i was trying to use the generate-endf7.py script. how i include the conversation in there?

For this,

```auto
python3 utils.py install
python3 generate_endf71.py

```

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [August 15, 2020, 2:56pm UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/9 "2020-08-15T14:56:41Z")

</div>

**NJOY2016**

```auto
git clone https://github.com/njoy/NJOY2016.git

cd NJOY2016

wget https://raw.githubusercontent.com/njoy/signatures/master/NJOY2016/2020-03-31_15:16:37.json

./metaconfigure/fetch_subprojects.py 2020-03-31_15:16:37.json

mkdir bin
cd bin

cmake -D fetched_subprojects=true -Dstatic_libraries=ON -Dstatic_njoy=ON -DCMAKE_EXE_LINKER_FLAGS=-static ../

```

> [@shabudarda](#):
>
> i was trying to use the generate-endf7.py script.

After installing NJOY2016,

```auto
python3 utils.py install
python3 generate_endf71.py

```

I think It will be helpful for you.

---

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [August 15, 2020, 7:25pm UTC](https://openmc.discourse.group/t/how-to-get-the-nndc-endfb7-1-and-b7-1-hdf5-crosssection-library-for-multiple-temperature/557/10 "2020-08-15T19:25:05Z")

</div>

Dear Pranto, I send you a personal email. Please check.
