1 JCSDA CRTM v2.3.x Build Instructions
2 ====================================
7 CRTM SUPPORT EMAIL: ncep.list.emc.jcsda_crtm.support@noaa.gov
9 If you have problems building the library please include the
10 generated "config.log" file in your email correspondence.
15 ===============================
17 a. The easy (I hope) way
18 b. The more flexible way
19 2. Building the library
20 3. Testing the library
21 4. Installing the library
23 - Linking to the library
25 - Linking to the library
26 c. Uninstalling the library
28 6. Feedback and contact info
36 The CRTM tarball directory structure looks like:
38 |-README .................. this file
39 |-configure ............... configuration script
40 |-Makefile.in ............. makefile template
41 |-config-setup/ ........... "courtesy" configuration definition scripts
42 |-fix/ .................... coefficient datafiles
43 `-libsrc/ ................. library source files
46 The build system for the CRTM uses an autoconf-generated configure script.
48 The build makefiles now assume that environment variables (envars) will
49 be defined that describe the compilation environment. The envars
50 that *must* be defined are:
51 FC: the Fortran95/2003 compiler executable,
52 FCFLAGS: the flags/switches provided to the Fortran compiler,
56 a. The easy (I hope) way...
57 -------------------------
59 Several shell (and C shell) source files are provided for the compilers to
60 which we have access and have tested here. These shell source files are in
61 the "config-setup/" subdirectory of the tarball.
63 The current list of test compiler environments in the config-setup/ directory
67 ftn.setup ftn.setup.csh
68 g95-debug.setup gfortran.setup.csh pgf95.setup
69 g95-debug.setup.csh ifort-debug.setup pgf95.setup.csh
70 g95.setup ifort-debug.setup.csh xlf2003-debug.setup
71 g95.setup.csh ifort.setup xlf2003-debug.setup.csh
72 gfortran-debug.setup ifort.setup.csh xlf2003.setup
73 gfortran-debug.setup.csh pgf95-debug.setup xlf2003.setup.csh
74 gfortran.setup pgf95-debug.setup.csh
76 All of the above files define values for the envars FC, FCFLAGS, LDFLAGS,
79 To use these files to define the CRTM build environment, you should source
80 them. For example, if you use the sh/bash/ksh shells and you want to setup
81 for a build using the gfortran compiler using debug options you would type:
83 $ . config-setup/gfortran-debug.setup
85 If you are a C shell aficionado, the equivalent command would be
87 % source config-setup/gfortran-debug.setup.csh
89 You can tailor you build environment by modifying the relevant build
90 configuration setup file in the "config-setup/" subdirectory.
92 Or, if you are going to be testing library builds multiple times, create your
93 own configuration setup file.
95 Once you've sourced the setup file, you run the configuration script like so:
97 $ ./configure --prefix=<install directory>
99 The --prefix switch sets the installation directory and defaults to /usr/local so
100 make sure you set it to a directory in which you have write access.
102 By default, the CRTM is built for big-endian I/O. The --disable-big-endian switch
103 builds the library and test programs for little-endian I/O:
105 $ ./configure --disable-big-endian --prefix=<install directory>
109 b. The more flexible way
110 ------------------------
112 If you need more flexibility in the library build you can specify the necessary
113 information directly to the configure script that generates the makefiles. For
114 example, for the intel ifort compiler:
116 $ ./configure --prefix=${PWD} \
117 --disable-big-endian \
119 FCFLAGS="-O3 -g -traceback"
121 The --prefix switch sets the installation directory and defaults to /usr/local so
122 make sure you set it to a directory in which you have write access.
124 The --disable-big-endian switch builds the library and test programs for little-endian
125 I/O. The default is big-endian I/O.
127 NOTE: The --disable-big-endian switch (whether it's turned on or off) modifies the
128 compilation environment by setting (or deselecting) the compiler switches
129 that control the endian-ness of the I/O. As such, you should be careful if
130 you set those compiler switches directly on the command line via FCFLAGS.
135 2. BUILDING THE LIBRARY
136 =======================
138 To start the library build for a particular configuration, simply type
145 3. CHECKING THE LIBRARY BUILD
146 =============================
148 To run the accompanying tests using the just-built library, simply type
152 This will build and run any tests. The current output from the (successful)
153 test runs looks like:
155 ========================================
156 Running test: big-endian I/O on little-endian platform...
159 **********************************************************
162 Check/example program for the CRTM Forward and K-Matrix
163 functions using big_endian coefficient datafiles
165 CRTM Version: REL-2.3.x
166 **********************************************************
169 Initializing the CRTM...
171 Processing a total of 421 channels...
175 Calling the CRTM functions for cris399_npp...
177 Calling the CRTM functions for atms_npp...
179 Destroying the CRTM...
182 ========================================
187 4. INSTALLING THE LIBRARY
188 =========================
190 Installation of the library *always* occurs into its own directory within the
191 directory specified by the --prefix switch. The name of the installation
192 directory follows the convention:
194 <library name>_<version>
196 So, if a library version (say, v2.3.0) build was configured with --prefix=$PWD
197 then the installation directory will be
206 To perform a GNU-type install, type:
210 For a library version, say, v2.3.0, this will create a directory called
211 "crtm_v2.3.0". That directory structure is shown below:
217 | |--accoeff_binary_io.mod
218 | |--accoeff_define.mod
220 | |--zeeman_input_define.mod
221 | `--zeeman_utility.mod
227 Note that the only version-numbered item in this type of install is the name of
228 the installation directory itself.
231 Linking to the library
232 ......................
234 Let's assume the above install was moved into "/usrx/local/nceplibs", to use the
235 library in this structure in your own application, the usual environment variables
236 would be modified something like:
238 libroot="/usrx/local/nceplibs/crtm_v2.3.0"
239 FCFLAGS="-I${libroot}/include ${FCFLAGS}"
240 LDFLAGS="-L${libroot}/lib ${LDFLAGS}"
243 (with appropriate syntax changes for csh)
250 To install the library conforming to the NCO directory organisation and naming
255 For a library version, say, v2.3.0, this will create a directory called
256 "crtm_v2.3.0". That directory is organised according to the current NCO structure
257 on WCOSS in /nwprod/lib, as shown below:
267 |--accoeff_binary_io.mod
268 |--accoeff_define.mod
270 |--zeeman_input_define.mod
271 `--zeeman_utility.mod
273 The contents of the "crtm_v2.3.0" directory can then be moved into the official
274 /nwprod/lib location as needed.
276 NOTE: ********** IMPORTANT - READ THIS **********
277 To avoid installing over the top of an existing installation, this NCO-style
278 installation *DOES NOT* install the CRTM into an existing directory. If the
279 installation directory already exists, an error is issued and the installation
281 ********** IMPORTANT - HAVE YOU READ IT? **********
284 Linking to the library
285 ......................
287 Let's assume the above install was moved into "/usrx/local/nceplibs", to use the
288 library in this structure in your own application, the usual environment variables
289 would be modified something like:
291 libroot="/usrx/local/nceplibs"
292 FCFLAGS="-I${libroot}/incmod/crtm_v2.3.0 ${FCFLAGS}"
293 LDFLAGS="-L${libroot} ${LDFLAGS}"
296 (with appropriate syntax changes for csh)
300 c. Uninstalling the library
301 ---------------------------
303 To uninstall the library (assuming you haven't moved the installation directory
304 contents somewhere else) you can type:
308 This will DELETE the created installation directory. So, for a library version,
309 say, v2.3.0, if your configure script invocation was something like
311 $ ./configure --prefix=${PWD} ...other command line arguments...
313 then the "uninstall" target will delete the "${PWD}/crtm_v2.3.0" directory.
321 Two targets are provided for cleaning up after the build. To remove all the
326 To also remove all the configuration products (i.e. the makefiles) type
333 6. FEEDBACK AND CONTACT INFO
334 ============================
336 That's pretty much it. Any questions or bug reports can be sent to CRTM Support.
338 CRTM SUPPORT EMAIL: ncep.list.emc.jcsda_crtm.support@noaa.gov
340 If you have problems building the library please include the generated "config.log"
341 file in your email correspondence.