summaryrefslogtreecommitdiff
path: root/Dragon/src/LIBD10.F
blob: c98de351035a2609ed01b5a1ad5c153f75b49e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
*DECK LIBD10
#if defined(HDF5_LIB)
      SUBROUTINE LIBD10 (MAXDIL,NAMFIL,HNISOR,NDIL,DILUT)
*
*-----------------------------------------------------------------------
*
*Purpose:
* Find the dilutions corresponding to a resonant isotope within a
* library in Apolib-3 format.
*
*Copyright:
* Copyright (C) 2022 Ecole Polytechnique de Montreal
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version
*
*Author(s): A. Hebert
*
*Parameters: input
* MAXDIL  maximum number of dilutions.
* NAMFIL  name of the APOLIB-3 file.
* HNISOR  library name of the resonant isotope.
*
*Parameters: output
* NDIL    number of finite dilutions.
* DILUT   dilutions.
*
*-----------------------------------------------------------------------
*
      USE GANLIB
      USE hdf5_wrap
*----
*  SUBROUTINE ARGUMENTS
*----
      INTEGER MAXDIL,NDIL
      CHARACTER HNISOR*12,NAMFIL*(*)
      REAL DILUT(MAXDIL)
*----
*  LOCAL VARIABLES
*----
      TYPE(C_PTR) IPAP
      CHARACTER RECNAM*80
      REAL, ALLOCATABLE, DIMENSION(:) :: BGXS
*----
*  OPEN AND PROBE THE APOLIB-3 FILE.
*----
      CALL hdf5_open_file(NAMFIL, IPAP, .TRUE.)
      WRITE(RECNAM,'(9HIsotopes/,A,15H/HomoRates/BgXS)') TRIM(HNISOR)
      CALL hdf5_read_data(IPAP, RECNAM, BGXS)
      NDIL=SIZE(BGXS)
      IF(NDIL.GT.MAXDIL) CALL XABORT('LIBD10: MAXDIL IS TOO SMALL.')
      DILUT(:NDIL)=BGXS(:)
      NDIL=NDIL-1
      DEALLOCATE(BGXS)
      CALL hdf5_close_file(IPAP)
#else
      SUBROUTINE LIBD10
      CALL XABORT('LIBD10: THE HDF5 API IS NOT AVAILABLE.')
#endif /* defined(HDF5_LIB) */
      RETURN
      END