Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NJOY2016.66 #226

Merged
merged 135 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
6c1cd02
Made xss part of acecm module and used that in the other modules
whaeck Apr 6, 2020
418fdb1
Declared xss common to all types of ACE file, mutualised typen and mo…
whaeck Apr 6, 2020
e153c41
Added test 56 for checking the photonuclear ace file
whaeck Apr 7, 2020
5013213
Added locator check for esz block in continuous energy ace file
whaeck Apr 7, 2020
520a02d
Started updating photonuclear ace file writing
whaeck Apr 7, 2020
66d32a6
Added error message for unknown law
whaeck Apr 7, 2020
1c9cb38
Started work on the ixs/jxs piece of the photonuclear xss
whaeck Apr 7, 2020
06d0b08
Changed function name in messages, added advance_to_locator to all ph…
whaeck Apr 7, 2020
0a5554c
Started work on dlwp block in photonuclear ace files
whaeck Apr 7, 2020
e302309
Added an additional test using Bi209 from ENDF/B-VIII.0
whaeck Apr 7, 2020
e172ad8
Finished dlwp block
whaeck Apr 7, 2020
00fa7ca
Incorporated changes proposed by Andrej Trkov
whaeck Apr 7, 2020
78cbe0f
Registered test 58
whaeck Apr 7, 2020
645779f
Truing to correct CI workflow syntax error
whaeck Apr 7, 2020
63dabc8
Undid changes because they break tests 56 and 57
whaeck Apr 8, 2020
ffc619a
Updated to latest master
whaeck Apr 8, 2020
b6ed54e
Why isn't this starting.
jlconlin Apr 9, 2020
2363f2f
Reset na=0 if lang=1 for law=1 and added message, incremented version
whaeck Apr 9, 2020
da26235
Merge branch 'feature/pn-iaea' of https://github.com/njoy/NJOY2016 in…
whaeck Apr 9, 2020
2baa8c5
Restructured and commented code for LAW=1 in acepn.f90 to anticipate …
whaeck Apr 10, 2020
40ea2bd
Fixing filter pattern for branches on GitHub workflow.
jlconlin Apr 13, 2020
a02d002
Refactored some more to start accommodating law=61 changes
whaeck Apr 13, 2020
d9c3782
Merge branch 'feature/pn-iaea' of https://github.com/njoy/NJOY2016 in…
whaeck Apr 13, 2020
57c0bc1
Update to latest master
whaeck May 8, 2020
01af43d
Fixed indentation
whaeck May 8, 2020
4b4de59
Added conversion for mf28 in moder
whaeck May 19, 2020
d4137fb
Added test 59 for testing the conversion of mf28
whaeck May 19, 2020
d5261b5
Added test description documentation
whaeck May 19, 2020
d318ebd
Added writing law=61 to phnout
whaeck May 27, 2020
bd188cc
Corrected title card for test 58 to Co59 IAEA
whaeck May 27, 2020
d665769
added law61 to phnout
kahlerac Jun 10, 2020
60aa669
implement law61
kahlerac Jun 26, 2020
f3b2c44
Update to latest develop
whaeck Mar 9, 2021
145fad6
Update to latest develop
whaeck May 12, 2021
7a91ff9
Updated version and date
whaeck May 12, 2021
ee85fe7
Updated CMakeLists.txt for PN tests
whaeck May 12, 2021
42e3ca9
Removed print statements
whaeck May 12, 2021
12bec08
Updated test results
whaeck May 12, 2021
904b525
Updated writing routine for thermal scattering to use the new test fu…
whaeck May 13, 2021
c810d99
Update to latest develop
whaeck May 13, 2021
5258d93
Updated release notes
whaeck May 13, 2021
1884aaa
Update CMakeLists.txt
whaeck May 13, 2021
10ea2ba
Added a space
whaeck May 13, 2021
243ed04
Update to pn-iaea to get acecm changes
whaeck May 13, 2021
67698a3
Added a missing repoz(in)
whaeck May 13, 2021
57bedec
Fixed issue #195
whaeck May 13, 2021
182f67a
Updated release notes
whaeck May 13, 2021
feeee5c
Merge pull request #200 from njoy/fix/typo
whaeck May 14, 2021
9134471
Update to latest develop
whaeck May 14, 2021
3c7c371
Updated release notes
whaeck May 14, 2021
8249168
Update to latest parent branch
whaeck May 14, 2021
b927c5e
Updated release notes
whaeck May 14, 2021
3687934
Updated release notes
whaeck May 14, 2021
abeee03
Fixing an issue with ENDF/B-VIII.0 U235 and U238 MF34
whaeck Jun 2, 2021
102718c
Adding test 64, some more print temporary print statements
whaeck Jun 2, 2021
3ccd9a7
Integrated a few if statements together.
whaeck Jun 3, 2021
add8249
Removing print statements
whaeck Jun 3, 2021
61a0a56
Renamed test 64 to 65
whaeck Jun 3, 2021
e554edb
update to latest master
whaeck Jun 3, 2021
2ed685d
Update to latest develop
whaeck Jun 3, 2021
c4a6bff
Updated release notes
whaeck Jun 3, 2021
a649dff
Fix typo
whaeck Jun 3, 2021
55bcca8
increased array size and updated release notes
whaeck Jun 3, 2021
93195b8
Merge pull request #206 from njoy/fix/endf80-mf34
whaeck Jun 14, 2021
4e70696
Merge pull request #207 from njoy/fix/tendl-pn
whaeck Jun 14, 2021
1e37946
FIxing issue #212
whaeck Jul 26, 2021
2318ba1
Changed date and version
whaeck Jul 26, 2021
f256778
Extended CLAW weight function.
nathangibson14 Aug 2, 2021
ee85e47
Updated ReleaseNotes.
nathangibson14 Aug 2, 2021
66795e7
Merge pull request #213 from njoy/feature/claw
nathangibson14 Aug 2, 2021
58818e9
Fixed an issue with MF6/MT18 PN libraries, some minor changes
whaeck Aug 13, 2021
d61a4da
Updated tests, more corrections
whaeck Aug 13, 2021
4116a43
Adding test 65 to test issue #214
whaeck Aug 13, 2021
5cd0bdc
Updating test description
whaeck Aug 13, 2021
5d31e00
Updated test result for ACELAW=33
whaeck Aug 13, 2021
a31eab2
LAW=33 changes for photonuclear data
whaeck Aug 17, 2021
1cab980
Updated test 64, changes to second value for LAW=33
whaeck Aug 17, 2021
aee0164
Updating date and release notes
whaeck Aug 17, 2021
01cbebf
Updating ...
whaeck Aug 17, 2021
b5da0c9
Removed temporary print statements
whaeck Aug 18, 2021
16f6473
Updating ...
whaeck Aug 19, 2021
c8c51fc
Updating test description for test 64
whaeck Aug 19, 2021
53e44de
Renamed test 65 to 66 due to merge conflict with develop
whaeck Aug 19, 2021
a8cc918
Updating test description
whaeck Aug 19, 2021
07270f4
Updating to develop ...
whaeck Aug 19, 2021
f84378a
Removing some more temporary print statements
whaeck Aug 19, 2021
48bfa77
Updating ...
whaeck Aug 19, 2021
d3ae709
Updating ...
whaeck Aug 19, 2021
49d6b85
Read in LTHR=3 data in thermr
whaeck Aug 19, 2021
58cbb5e
THERMR now proceses mixed mode elastic thermal scattering
whaeck Aug 19, 2021
3a903de
Merge pull request #215 from njoy/fix/cp33
whaeck Aug 19, 2021
07c28c4
Updating with fix/cp33
whaeck Aug 19, 2021
c9d5eef
Updating with fix/cp33
whaeck Aug 19, 2021
f67b247
Updating with fix/cp33
whaeck Aug 19, 2021
1ec2f60
More updates to proper ENDF rules
whaeck Aug 22, 2021
31e7d95
ACER now produces ACE files with IDPNC=5 (print tables and plots stil…
whaeck Aug 22, 2021
9550f33
Printing thermal scattering data
whaeck Aug 23, 2021
8009186
saving ..
whaeck Sep 1, 2021
726d0d3
saving ...
whaeck Sep 9, 2021
f831cc5
Increase xss array size to 50 million
whaeck Sep 9, 2021
442fe01
Removed double declaration of variable
whaeck Sep 9, 2021
f25e1e3
Adding test 67
whaeck Sep 13, 2021
6f8b507
Updating test 67
whaeck Sep 14, 2021
eb659d3
Saving ...
whaeck Sep 14, 2021
55e7846
Added tests 68 and 69 (inelastic only and inelastic + incoherent elas…
whaeck Sep 14, 2021
6d506eb
Update test documentation
whaeck Sep 14, 2021
3fbad0e
Added test 70
whaeck Sep 14, 2021
f7dcd16
Correction of legend in test 70
whaeck Sep 14, 2021
6a6e352
Correction for plotting mubar incoherent elastic in mixed elastic
whaeck Sep 15, 2021
8c49066
Correcting test result
whaeck Sep 15, 2021
26acfff
A few small updates
whaeck Sep 15, 2021
c5bc985
Because NJOY converts energies to MeV AFTER doing all the work
whaeck Sep 15, 2021
b901205
Making sure thr6 is set in emerge for special charged particle interp…
whaeck Sep 16, 2021
717e64c
Updating release notes
whaeck Sep 16, 2021
c2b2c6c
Moved setting thr6 to avoid a Debug mode failure
whaeck Sep 16, 2021
ef47c25
MF10 gives me a headache
whaeck Sep 16, 2021
092f8ec
Updating ...
whaeck Nov 4, 2021
195ff16
Updating ...
whaeck Nov 4, 2021
324058f
Updating ...
whaeck Nov 4, 2021
624b162
Updating ...
whaeck Nov 4, 2021
ef5fdc2
Updating test
whaeck Nov 4, 2021
2de658e
Updating ...
whaeck Nov 4, 2021
950370c
Updating ...
whaeck Nov 4, 2021
c01ab5d
Merge pull request #198 from njoy/feature/pn-iaea
whaeck Nov 10, 2021
ccdb32c
Updating ...
whaeck Nov 10, 2021
5985016
Updating ...
whaeck Nov 10, 2021
55155e6
Updated tests 48 and 59
whaeck Nov 12, 2021
aed6c8d
Updated comment
whaeck Nov 12, 2021
b78342e
Merge pull request #199 from njoy/fix/moder
whaeck Nov 12, 2021
d4f3792
Updating ...
whaeck Nov 12, 2021
d1e84fc
Merge pull request #221 from njoy/fix/reconr-int6
whaeck Nov 12, 2021
8c651b2
Updating ...
whaeck Nov 12, 2021
00f2a26
Removing temporary print statements
whaeck Nov 15, 2021
e6200a7
Merge pull request #220 from njoy/feature/mixed-elastic
whaeck Nov 18, 2021
4735d1e
Setting release date
whaeck Nov 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# Release Notes—NJOY2016
Given here are some release notes for NJOY2016. Each release is made through a formal [Pull Request](https://github.com/njoy/NJOY2016/pulls) made on GitHub. There are links in this document that point to each of those Pull Requests, where you can see in great details the changes that were made. Often the Pull Requests are made in response to an [issue](https://github.com/njoy/NJOY2016/issues). In such cases, links to those issues are also given.

## [NJOY2016.66](https://github.com/njoy/NJOY2016/pull/xxx)
This constitutes a major update of NJOY to accommodate the latest IAEA photonuclear data library (which uses non-isotropic photon distributions) and the mixed mode elastic scattering ENDF format (adopted in the ENDF format in November 2020).

The following is an overview of the major changes made to NJOY for this update:
- LAW=61 is now allowed for photonuclear ACE libraries (the secondary angular distributions are now tabulated in all cases instead of being assumed isotropic when using LAW=1 LANG=1)
- Some photonuclear libraries use MF6/MT18 but with a neutron multiplicity equal to 1 instead of nubar. A warning is now printed when this is encountered and the multiplicity is replaced with the appropriate nubar data.
- thermal scattering ACE files now support mixed mode elastic scattering (both coherent and incoherent elastic scattering are used), with appropriate updates to THERMR and MODER
- The XSS array and its size is now set in the common acecm module. Writing out the ACE file and locator checking for photonuclear and thermal scattering files has been enabled as well (previously only available for incident neutron and charged particle ACE files).

In addition, the following minor issues were fixed as well:
- fixed a typo in a reaction name printed by the ACER output (issue #195)
- fixed a crash in ERRORR using ENDF/B-VIII.0 U235 for MF34 covariance data (issues #122 and #203)
- increased the size of an array when processing photonuclear ACE files (issue #204)
- extended the CLAW (iwt=9,10) weight function to cover 1e-5 -- 2e7 eV
- fixed issues with ACELAW=33 for continuous energy neutron, charged particle and photonuclear files (issue #212)
- fixed an issue when using the special charged particle interpolation law (INT=6) in RECONR
- fixed an issue with MODER not being able to handle MF28 (atomic relaxation data) when converting ASCII to binary

Notes:
- While the second minor fix no longer results in a crash of NJOY, the resulting covariance matrix is not correct since only the first subsubsection is added to the output (NJOY still calculates the matrices for each subsubsection - see issue #205)

## [NJOY2016.65](https://github.com/njoy/NJOY2016/pull/224)
This release fixes a processing issue for the d+Pt184 from TENDL-2021 in ACER. Some logic issue lead to MT11 being ignored as a deuteron producing reaction and this lead to processing problems in ACER.

Expand Down
54 changes: 52 additions & 2 deletions docs/testDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,24 +273,74 @@ title: NJOY2016 Test Descriptions
- test 53: LAW=5 LTP=1 for identical particles with a spin s = 1 (this changes due to the fix but the original file does no have NaN values, as expected)
- test 54: LAW=5 LTP=1 for different particles (as expected, this remains the same before and after the fix)

## Test Problem 55-59
## Test Problem 55

Currently assigned in unmerged fixes
[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/56/input)]

This test relates to changes made to an ACE file by the consistency checks when a checker `ACER` run is requested. NJOY only rarely modifies data. It does so for secondary particle distributions that use LAW=4 (isotropic angular distribution and continuous tabulated energy distributions) or LAW=44 (Kalbach-Mann). Under some circumstances, these changes used to introduce peaks in the data that obscured the plots.

## Test Problem 56-58

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/56/input)]

This test is added following issues in processing photonuclear data in `ACER`. These test uses the ENDF/B-VIII.0 photonuclear evaluation for U235 and Pb209, and the IAEA photonuclear evaluation for Co59.

## Test Problem 59

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/59/input)]

This test is added following an issue in `MODER` converting MF28 data (atomic relaxation data) (see issue [\#162](https://github.com/njoy/NJOY2016/issues/162)). Conversion of MF28 data was not coded. This test verifies that the conversion to and from binary produces the same file, and that the conversion to binary still allows the data to be used (in `ACER` in this test). Test 48 served as a basis for this test.

## Test Problem 60

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/60/input)]

This test was added to following issue [\#124](https://github.com/njoy/NJOY2016/issues/124) following processing issues using IRDFF-II ENDF files.

## Test Problem 61

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/61/input)]

This test was added to following issue [\#163](https://github.com/njoy/NJOY2016/issues/163). Whenever an `ACER` check run changed the library suffix, it was ignored. This has been fixed now and this test was added to validate the fix.

## Test Problem 62

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/62/input)]

This test was added to following issue [\#173](https://github.com/njoy/NJOY2016/issues/173). For a new d+He3 evaluation, the ACE file produced by NJOY2016 still has a few NaN values appearing in it. This problem was due to an array index overflow in acecpe.

## Test Problem 63

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/63/input)]

Tests 63 was added as a consequence of issue [\#178](https://github.com/njoy/NJOY2016/issues/178). It verifies that setting nunx in PURR to anything other than the default value does not break downstream processing (in this case up to ACER and VIEWR). The input file is equivalent to the input file for test 35 (with the exception of nunx which is set to 2).

## Test Problem 64

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/64/input)]

Tests 64 was added as a consequence of issue [\#201](https://github.com/njoy/NJOY2016/issues/201). Incorrect skipping of MF6 subsections with LAW=4 caused a reaction count issue for the secondary particles, resulting in a corrupt ACE file.

## Test Problem 65

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/65/input)]

Tests 65 was added as a consequence of issue [\#122](https://github.com/njoy/NJOY2016/issues/122) and [\#203](https://github.com/njoy/NJOY2016/issues/203). When using an MF34 with multiple subsubsections, the calculation now runs to completion.

## Test Problem 66

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/66/input)]

Tests 66 was added as a consequence of issue [\#214](https://github.com/njoy/NJOY2016/issues/214). It verifies that the yield (and production cross section) for secondary neutrons produced after photo-fission is equal to nubar when the evaluation uses an MF6/MT18 section for the PFNS in which the neutron yield is set to 1 instead of nubar.

## Test Problem 67-70

[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/67/input)]
[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/68/input)]
[[input](https://raw.githubusercontent.com/njoy/NJOY2016/master/tests/69/input)]

Tests 67-69 were added to test the new mixed mode elastic scattering processing for thermal scattering data in THERMR and ACER, which is going to be introduced in ENDF/B-VIII.1. The tests cover the following:
- test 67: inelastic plus mixed mode elastic (D in 7LiD, new format in ENDF/B-VIII.1)
- test 68: inelastic only (H in H2O)
- test 69: inelastic plus incoherent elastic (Zr in ZrH)
- test 70: inelastic plus coherent elastic (Al27)
125 changes: 122 additions & 3 deletions src/acecm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ module acecm
implicit none
private

! main ace container array
integer,parameter,public::nxss=50000000
real(kr),public::xss(nxss)

!--Public routines
public mtname,ptleg2,pttab2,bachaa,eavl,newsuff
public advance_to_locator
public write_integer,write_real,write_integer_list,write_real_list
public typen

contains

Expand All @@ -30,7 +37,7 @@ subroutine mtname(mt,name,izai)
'(n,2n)iso ','(n,abs) ','(n,n*)p ','(n,n*)2a ','(n,2n)2a ',&
'(n,x) ','(n,n*)d ','(n,n*)t ','(n,n*)he3 ','(n,n*)d2a ',&
'(n,n*)t2a ','(n,4n) ','(n,3nf) ','(n,x) ','(n,x) ',&
'(n,2np) ','(n,3np) ','(n,x) ','(n,2np) ','(n,npa) ',&
'(n,2np) ','(n,3np) ','(n,x) ','(n,n2p) ','(n,npa) ',&
'(n,2/2*1) ','(n,2/2*2) ','(n,2/2*3) ','(n,2/2*4) ','(n,n*0) ',& !50
'(n,n*1) ','(n,n*2) ','(n,n*3) ','(n,n*4) ','(n,n*5) ',&
'(n,n*6) ','(n,n*7) ','(n,n*8) ','(n,n*9) ','(n,n*10) ',&
Expand Down Expand Up @@ -194,6 +201,8 @@ subroutine mtname(mt,name,izai)
if (izai.gt.1) then
if (mt.eq.4) then
name='(z,n) '
elseif (mt.eq.5) then
name='(z,x) '
elseif ((izai.eq.1001.and.mt.eq.103).or.&
(izai.eq.1002.and.mt.eq.104).or.&
(izai.eq.1003.and.mt.eq.105).or.&
Expand Down Expand Up @@ -654,7 +663,7 @@ subroutine newsuff(mcnpx,suff,hz)

indx=10
if (mcnpx.gt.0) indx=12

if (lenhz.lt.indx) then
idiff=indx-lenhz
do i=indx,indx-lenhz+1,-1 !push the string to the right so
Expand All @@ -666,5 +675,115 @@ subroutine newsuff(mcnpx,suff,hz)
return
end subroutine newsuff

end module acecm
subroutine advance_to_locator(nout,l,locator)
!-------------------------------------------------------------------
! Advance to the next locator position from the current position l.
! If the current position is not equal to the locator position, the
! function will advance l until it is equal to the locator position.
! It will write the values in the xss array while advancing to the
! new position.
!-------------------------------------------------------------------
use util
! externals
integer::nout,l,locator
! internals
character(66)::text
if (l.lt.locator) then
write(text,'(''expected xss index ('',i6,'') greater than '',&
&''current index ('',i6,'')'')') locator, l
call mess('advance',text,'xss array was padded accordingly')
do while (l.lt.locator)
call typen(l,nout,1)
l=l+1
enddo
else if (l.gt.locator) then
write(text,'(''expected xss index ('',i6,'') less than '',&
&''current index ('',i6,'')'')') locator, l
call error('advance',text,'this may be a serious problem')
endif
return
end subroutine advance_to_locator

subroutine write_integer(nout,l)
!-------------------------------------------------------------------
! Write an integer value at the position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l
call typen(l,nout,1)
l=l+1
return
end subroutine write_integer

subroutine write_real(nout,l)
!-------------------------------------------------------------------
! Write a real value at the position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l
call typen(l,nout,2)
l=l+1
return
end subroutine write_real

subroutine write_integer_list(nout,l,n)
!-------------------------------------------------------------------
! Write n integer values from position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l,n
! internals
integer::i
do i=1,n
call typen(l,nout,1)
l=l+1
enddo
return
end subroutine write_integer_list

subroutine write_real_list(nout,l,n)
!-------------------------------------------------------------------
! Write n real values from position l, and advance l to the
! next position
!-------------------------------------------------------------------
! externals
integer::nout,l,n
! internals
integer::i
do i=1,n
call typen(l,nout,2)
l=l+1
enddo
return
end subroutine write_real_list

subroutine typen(l,nout,iflag)
!-------------------------------------------------------------------
! Write an integer or a real number to a Type-1 ACE file,
! using either a floating-point or an integer print style.
! Use iflag.eq.1 to write an integer (i20).
! Use iflag.eq.2 to write a real number (1pe20.11).
! Use iflag.eq.3 to write partial line at end of file.
!-------------------------------------------------------------------
! externals
integer::l,nout,iflag
! internals
integer::i,j
character(20)::hl(4)
save hl,i

if (iflag.eq.3.and.nout.gt.1.and.i.lt.4) then
write(nout,'(4a20)') (hl(j),j=1,i)
else
i=mod(l-1,4)+1
if (iflag.eq.1) write(hl(i),'(i20)') nint(xss(l))
if (iflag.eq.2) write(hl(i),'(1p,e20.11)') xss(l)
if (i.eq.4) write(nout,'(4a20)') (hl(j),j=1,i)
endif
return
end subroutine typen

end module acecm
37 changes: 4 additions & 33 deletions src/acedo.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module acedo
! provides ace dosimetry formats for acer
use locale
use acecm, only: xss,nxss
implicit none
private

Expand All @@ -25,10 +26,6 @@ module acedo
! parameters for dosimetry jxs block
integer::lone,jxs2,mtr,jxs4,jxs5,lsig,sigd,jxsd(14),end,jxsd2(10)

! main ace container array
integer,parameter::nxss=4999000
real(kr)::xss(nxss)

contains

subroutine acedos(matd,tempd,nin,nace,ndir,itype,iprint,mcnpx,&
Expand Down Expand Up @@ -61,6 +58,7 @@ subroutine acedos(matd,tempd,nin,nace,ndir,itype,iprint,mcnpx,&
jxs4=0
jxs5=0
jxsd2=0
xss=0

!--allocate scratch storage
nwscr=250000
Expand Down Expand Up @@ -484,7 +482,8 @@ subroutine dosout(itype,nout,ndir,mcnpx,hk,izn,awn)
!-------------------------------------------------------------------
! Write out the dosimetry file.
!-------------------------------------------------------------------
use util ! provides openz,closz
use util ! provides openz,closz,error
use acecm ! provides write routines
! externals
integer::itype,nout,ndir,mcnpx
integer::izn(16)
Expand Down Expand Up @@ -598,32 +597,4 @@ subroutine dosout(itype,nout,ndir,mcnpx,hk,izn,awn)
return
end subroutine dosout

subroutine typen(l,nout,iflag)
!-------------------------------------------------------------------
! Write an integer or a real number to a Type-1 ACE file,
! or (if nout=0) convert real to integer for type-3 output,
! or (if nout=1) convert integer to real for type-3 input.
! Use iflag.eq.1 to write an integer (i20).
! Use iflag.eq.2 to write a real number (1pe20.11).
! Use iflag.eq.3 to write partial line at end of file.
!-------------------------------------------------------------------
! externals
integer::l,nout,iflag
! internals
integer::i,j
character(20)::hl(4)
save hl,i

if (iflag.eq.3.and.nout.gt.1.and.i.lt.4) then
write(nout,'(4a20)') (hl(j),j=1,i)
else
i=mod(l-1,4)+1
if (iflag.eq.1) write(hl(i),'(i20)') nint(xss(l))
if (iflag.eq.2) write(hl(i),'(1p,e20.11)') xss(l)
if (i.eq.4) write(nout,'(4a20)') (hl(j),j=1,i)
endif
return
end subroutine typen

end module acedo

Loading