-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
160 lines (110 loc) · 4.44 KB
/
README
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
The CDMS library
Bob Drach
PCMDI/Lawrence Livermore National Laboratory
Introduction
------------
This directory contains the source and documentation for the Climate
Data Management System library. There are two installation methods. This
file describes a traditional stand-alone method using autoconf and Makefiles.
When built as a part of a CDAT build, this method is not used. Instead
the script cdms.sh runs the python script buildlib.py and then installs the
library into the cdat lib directory.
Documentation
-------------
Man pages:
cddrs.3: DRS emulator library (C interface)
fcddrs.3 DRS emulator library (FORTRAN interface)
cdtime.3 CDMS time functions
cdunif.3 cdunif Uniform I/O layer
Platforms
---------
This release has been compiled under SunOS 4.1.3, SUN Solaris 5.4, 5.5,
SGI/Irix 5.3, 6.2, HP/HPUX 9.0, Cray/Unicos 8.0, DEC Alpha/Digital Unix V3.2,
Redhat LINUX 5.2, and IBM RS6000/AIX V3.2.
Installing CDMS
---------------
To install the CDMS library:
(1) Make sure that the netCDF library is installed. If necessary,
netCDF can be retrieved via URL
http://www.unidata.ucar.edu/packages/netcdf/
Make sure that the HDF library is installed. If necessary,
HDF can be retrieved via ftp
ftp.ncsa.uiuc.edu/HDF/HDF_Current
Make sure that the DRS library is installed. DRS can be
obtained via URL http://www-pcmdi.llnl.gov/drach/DRS.html
(2) Choose a root installation directory, <CDMS>. The default is
/usr/local. Type "make prefix=<CDMS> distinstall". This installs:
libcdms.a in <CDMS>/lib
include files in <CDMS>/include
binaries in <CDMS>/bin
man pages in <CDMS>/man/man3
Make sure that these directories exist and are writeable.
Building executables (C)
------------------------
One of the dependent libraries, libdrs.a, uses FORTRAN I/O. This means
that, when linking a C program with libcdms.a, the FORTRAN libraries must
be mentioned on the link line. Here are sample link lines for various
platforms:
SunOS 4.1.3
-----------
acc -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lF77
SGI/Irix 5.3
------------
cc -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lF77 -lm \
-lU77 -lI77 -lisam
Sun Solaris 5.4
---------------
acc -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lF77 -lm \
-lsunmath -lucb
Cray/Unicos 8.0
---------------
c89 -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs
HP/HPUX 9.0
-----------
c89 -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lU77 -lcl -lm
IBM RS6000/AIX V3.2
-------------------
c89 -I/usr/local/include -c cdprog.c -o cdprog.o
f77 -qextname -I/usr/local/include cdprog.o -o cdprog \
-L/usr/local/lib -lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs
DEC Alpha/Digital Unix V3.2
---------------------------
cc -I/usr/local/include -c cdprog.c -o cdprog.o
f77 -nofor_main cdprog.o -o cdprog -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs
PC/LINUX 3.0.3
--------------
gcc -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lF77 -lm -lU77\
-lI77 -lisam
PC/Redhat Linux 5.2 (Portland Group FORTRAN)
cc -I/usr/local/include -o cdprog cdprog.c -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs \
-L/usr/pgi/linux86/lib -lpgftnrtl -lpgc -lm
Building executables (FORTRAN)
------------------------------
On most platforms, linking FORTRAN executables is straightforward:
reference '-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs' on the
link line. The exceptions are:
Sun Solaris 5.4
---------------
Reference libucb.a:
f77 -I/usr/local/include -o cdprog cdprog.F -L/usr/local/lib \
-lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lucb
HP/HPUX 9.0
-----------
Use the +U77 flag:
fort77 +U77 -I/usr/local/include -o cdprog cdprog.F \
-L/usr/local/lib -lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs -lm
IBM RS6000/AIX V3.2
-------------------
Use the -qextname flag:
/usr/ccs/lib/cpp -P -I/usr/local/include cdprog.F cdprog.f
f77 -qextname cdprog.f -o cdprog \
-L/usr/local/lib -lcdms -lnetcdf -lmfhdf -ldf -ljpeg -lz -ldrs