File: README.FORTRAN90

package info (click to toggle)
nexus 4.3.2-svn1921-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 45,052 kB
  • sloc: java: 70,724; cpp: 34,810; ansic: 19,434; xml: 4,191; python: 4,123; f90: 2,326; fortran: 1,529; makefile: 1,105; sh: 809; tcl: 173; lisp: 169; pascal: 93; haskell: 27
file content (95 lines) | stat: -rwxr-xr-x 3,164 bytes parent folder | download | duplicates (3)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
The NeXus Fortran 90 interface consists of a single Fortran 90 module
containing all the global parameters and function definitions. The
routines are called exactly like their C counterparts, although some
arguments have been made optional because their values can be determined
automatically.  See <http://www.neutron.anl.gov/NeXus/NeXus_F90.html>
for details of the individual routines.

There must be a USE statement to incorporate the NeXus module e.g.

   use NXmodule
   
(N.B. if the F90 utility module NXUmodule is USEd, it is not necessary
to specify NXmodule as well.)

The Fortran 90 interface uses two derived types for the NXhandle and
NXLink structures.

    type(NXhandle) :: file_id
    type(NXlink) :: link_id

There are also several KIND parameters defined for producing
different-length storage.  They are not guaranteed to produce the
required result, but should work on most Fortran 90 compilers.

    NXi1 - one-byte integers
    NXi2 - two-byte integers
    NXi4 - four-byte integers
    NXr4 - four-byte floating points
    NXr8 - eight-byte floating points (double precision)
    
There is no way of distinguishing signed and unsigned integers, so
unsigned integers are mapped to signed integers of the same length.  It
is possible to read variables into arrays of different storage size,
provided there is no overflow.

--- Compatibility Issues ---

This version has been tested on Alpha/VMS, Windows NT, Linux, and Mac
OS X (using Absoft Pro Fortran 90).  In the latest versions of the API
(after v 1.3.1), the Fortran 90 code does not require access to the 
internal details of the NXhandle structure.

--- Running the Examples ---

The Fortran 90 library is now built by the standard Makefile with the
following option

   make libf90
   
See the README file for further instructions.

The Fortran 90 test program, NXtest, should print the following:

 Number of global attributes:   4
    NeXus_version = 2.0.0.
    file_name = NXtest.nx5
    HDF5_Version = 1.4.3
    file_time = 2002-05-17 15:22:29
 Group: entry(NXentry) contains   8 items
    ch_data : NX_CHAR   
    Values : NeXus data          
    Subgroup: data(NXdata)
    i1_data : NX_INT8   
    Values :   1  2  3  4
    i2_data : NX_INT16  
    Values :   1000  2000  3000  4000
    i4_data : NX_INT32  
    Values :   1000000  2000000  3000000  4000000
    r4_data : NX_FLOAT32
    Values :   1.00000  2.00000  3.00000  4.00000
           :   5.00000  6.00000  7.00000  8.00000
           :   9.00000  10.0000  11.0000  12.0000
           :   13.0000  14.0000  15.0000  16.0000
           :   17.0000  18.0000  19.0000  20.0000
    r8_data : NX_FLOAT64
    Values :   1.00000  2.00000  3.00000  4.00000
           :   5.00000  6.00000  7.00000  8.00000
           :   9.00000  10.0000  11.0000  12.0000
           :   13.0000  14.0000  15.0000  16.0000
           :   17.0000  18.0000  19.0000  20.0000
    ch_attribute : NeXus               
    i4_attribute :   42
    r4_attribute :   3.14159
    Subgroup: sample(NXsample)
 Link Check OK

--
Ray Osborn
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439-4845, USA

Email: ROsborn@anl.gov

$Id$