Coder Social home page Coder Social logo

fendl-endf's Introduction

Fusion Evaluated Nuclear Data Library

This repository keeps track of updates to the ENDF files of the Fusion Evaluated Nuclear Data Library (FENDL) whose different versions are published on the IAEA-NDS website at https://www-nds.iaea.org/fendl/.

Please note that the ENDF files are not directly stored in this repository but symlinks to them. The command line tool git-annex can be used to download the ENDF files. Alternatively, you can download the ENDF files from the IAEA-NDS website. Please take note of the terms of use for this repository.

Installation of git-annex

The command line tool git-annex must be installed on your system. Installation instructions for various operating systems can be found here. Windows is for the time being not well supported. If you are using conda, you can install git-annex by

conda install -c conda-forge git-annex

Downloading ENDF files

The command line tool git can be used in the usual way to browse different versions of the repository. First, download the repository to your local computer:

git clone https://github.com/iaea-nds/fendl-endf

After changing into the directory of the repository, check out the specific version of FENDL you are interested in. For instance, to use FENDL-3.2b:

git checkout FENDL-3.2b

All ENDF files are available as (broken) symbolic links. In order to download their content, you need to use git-annex. For instance, being at the root directory of the repository, you can download the neutron transport sublibrary by

git annex get --jobs=4 general-purpose/neutron

This command works recursively so running git annex get . at the root will download all transport and activation files of all sublibraries. It is also possible to download individual files. The --jobs argument enables the download of files in parallel.

After running git annex get, the symbolic links will not be broken anymore and point to the files that store the file contents. These files are stored in the .git/annex directory but you should not directly interact with this directory and instead use the functionality of git-annex.

If you want to remove dowloaded files, e.g., because you are running out of space, you can use git-annex-drop:

git annex drop general-purpose/neutron

It will remove the files from the annex and symlinks in the repository will be broken again. You can re-download them whenever needed using the git annex get command explained above.

Modifying ENDF files

If you are an evaluator, you may want to change individual ENDF files. By default, file content is write-protected and modifying an ENDF file by opening the symlink in an editor will not work.

To modify a file, first unlock the file. For instance, to unlock all files in the neutron sublibrary from the root directory of the repository, run

git annex unlock general-purpose/neutron

This command will replace the symlinks by regular files. Now you can modify those files. Once you are satisfied with the changes, you need to invoke the git annex analogon to git add, which is

git annex add general-purpose/neutron

This will move modified file content into the annex (stored in .git/annex) and replace the files in the git repo by symbolic links.

Now you can commit the the modifications with git in the usual way, e.g.,

git commit -m 'some changes to the neutron sublibrary'

Finally, if you have unlocked files without effecting changes and want to lock them again (i.e. replace the files by symlinks), run

git annex lock general-purpose/neutron

fendl-endf's People

Contributors

gschnabel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fendl-endf's Issues

Processing issues with OpenMC0.14 / NJOY2016

Thanks for making this repo I had a look around and really like the setup.

Processing FENDL files with openmc and the openmc interface to NJOY raises the following errors:

This could be bugs on the openmc or NJOY side so I'm keen to spend some more time looking into them.

  • openmc_data/fendl-3.2a-endf/neutron/endf/n_0131_1-H-3.endf 'utf-8' codec can't decode byte 0x92 in position 7137: invalid start byte
  • openmc_data/fendl-3.2a-endf/neutron/endf/n_0825_8-O-16.endf invalid literal for int() with base 10: '0 0'
  • openmc_data/fendl-3.2a-endf/neutron/endf/n_4843_48-Cd-112.endf invalid literal for int() with base 10: ''
  • openmc_data/fendl-3.2a-endf/neutron/endf/n_9228_92-U-235.endf Command 'njoy' returned non-zero exit status 2.
  • openmc_data/fendl-3.2-endf/neutron/endf/n_9228_92-U-235.endf Command 'njoy' returned non-zero exit status 2.
  • openmc_data/fendl-3.2-endf/neutron/endf/n_4843_48-Cd-112.endf invalid literal for int() with base 10: ''
  • openmc_data/fendl-3.1d-endf/n_0628_6-C-13.txt Command 'njoy' returned non-zero exit status 77.
  • openmc_data/fendl-3.1d-endf/n_0831_8-O-18.txt Command 'njoy' returned non-zero exit status 77.
  • openmc_data/fendl-3.1d-endf/n_9228_92-U-235.txt Command 'njoy' returned non-zero exit status 2.
  • openmc_data/fendl-3.1a-endf/n_9228_92-U-235.txt Command 'njoy' returned non-zero exit status 2.
  • openmc_data/fendl-3.1a-endf/n_0831_8-O-18.txt Command 'njoy' returned non-zero exit status 77.
  • openmc_data/fendl-3.1a-endf/n_0628_6-C-13.txt Command 'njoy' returned non-zero exit status 77.
  • openmc_data/fendl-3.0-endf/endf/n_0628_6-C-13.txt Command 'njoy' returned non-zero exit status 77
  • openmc_data/fendl-3.2-endf/neutron/endf/n_0131_1-H-3.endf 'utf-8' codec can't decode byte 0x92 in position 7137: invalid start byte
  • openmc_data/fendl-3.1d-endf/n_0131_1-H-3.txt 'utf-8' codec can't decode byte 0x92 in position 7137: invalid start byte
  • openmc_data/fendl-3.1a-endf/n_0131_1-H-3.txt 'utf-8' codec can't decode byte 0x92 in position 7137: invalid start byte
  • openmc_data/fendl-3.0-endf/endf/n_0131_1-H-3.txt 'utf-8' codec can't decode byte 0x92 in position 7137: invalid start byte

This can be reproduced by running these commands after installing the openmc_data package openmc and njoy

conda install -c conda-forge openmc njoy2016
pip install openmc_data
generate_fendl -r 3.2a
generate_fendl -r 3.2
generate_fendl -r 3.1d
generate_fendl -r 3.1a
generate_fendl -r 3.0
generate_fendl -r 3.2b

essentially these scripts download the fendl data then call openmc.data.IncidentNeutron().from_endf(filename) with all the endf text files and some of the files cause errors

On a slightly related topic I would be keen to add some CI to this repo, perhaps it could run some of these processing tools to check things are working on each change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.