File: README

package info (click to toggle)
emoslib 000382%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 49,276 kB
  • sloc: fortran: 90,253; ansic: 26,730; makefile: 417; sh: 388; f90: 276
file content (314 lines) | stat: -rwxr-xr-x 10,305 bytes parent folder | download
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314

                              Emos library
                              --------------

   Any comments on the document or the software would be appreciated. 
   Please address comments to:

Software Services
ECMWF
Shinfield Park
Reading
Berkshire RG2 9AX
U.K.

Fax: +44 1734 869450

e-mail: software.services@ecmwf.int

The software is provided as a tar gzip file. This should be expanded using

tar -xfz emos_version.tar.gz

Content:
Makefile        Makefile for 'everything'
build_library   Script bilding library
install         Install script
gribex          Subdirectory containing GRIB encoding/decoding software
gribtables      Subdirectory containing GRIB tables
gribtemplates   Subdirectory containing Gribex templates
bufrdc          Subdirectory containing BUFR encoding/decoding software
bufrtables      Subdirectory containing BUFR tables
crexdc          Subdirectory containing CREX encoding/decoding software
crextables      Subdirectory containing CREX tables
land_sea_mask   Subdirectory containing land-sea mask
pbio            Subdirectory containing binary read/write routines
fft             Subdirectory containing Multiple FFT routines 
examples        Subdirectory containing example programs
config          Subdirectory containing configuration files for make
options         Subdirectory containing options files for make

**************************************************************

This is instruction how to build library and install:

Run the script bilding library and answer on a few questions:

 ./build_library

   After library is built, tables, land-sea mask and library should be
installed at appropriate place.

   It is recomended to do it by install script.

 ./install

   If you want to put library in /usr/local/lib directory,
you should run install script with root permission.

**************************************************************

It is strongly suggested to build the library using
shell script ./build_library  and install using ./install !!!

**************************************************************


Compilation options
-------------------

   Files are given for a variety of platforms defining the compilation options:
makefile configuration, compiler options and source file lists.

   Using SGI as an example, these files are:

1) In the working directory

   config.sgimips
   config.sgimipsR64
   options_sgimips

2) In subdirectories gribex and pbio

   sources.sgimips


Compiling the library
---------------------

   The correct configuration, options and source files can be selected using for 
make variables: ARCH, CNAME, A64 and R64.

   ARCH indicates the machine architecture on which the Emos library will be
installed. It may not necessarily have a pre-defined value. A list of possible
values could include: linux, windows, CRAY, FUJITSU, VPP5000, decalpha, hppa,
i686, ibm_power4, rs6000, sgimips and sun4.
   CNAME is used to name the compilers; it may or may not be pre-defined, depending
on the operational system you use. If you want to choose your own compilers, you
can define them in the appropriate 'config' file. For Linux CNAME=_gfortran can
be specified in order to compile with Gnu compilers gcc and gfortran.

decalpha - Compaq Fortran 90 compiler
         - the C++ compiler
hppa     - HP Fortran compiler
         - C compiler
linux    - The Portland Group Compiler Technology Fortran 90 compiler,
           pgf90 and pgcc
         - GNU project C, C++ Compiler, F77 compiler
rs6000   - XL Fortran for AIX
         - C for AIX Compiler, Version 5
sgimips  - MIPSpro F77 compiler
         - MIPS C compiler
sun4     - Forte[tm] Developer 7 Fortran 95 compiler
         - SunOS/BSD Compatibility Package C compiler

   A64 determines 32 or 64 bits machine.
   R64 determines the number of bits in the representation of real numbers.
The default is 32-bit. You can choose 64-bit setting R64=R64 in order to get
64-bit real numbers.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

If you decide to build the library using directly make, please NOTE that
you have to specify path for gribtables, bufrtables, crextables,
land_sea_mask, gribtemplates in appropriate

config/config.$ARCH$CNAME$R64

You should add -DTABLE_PATH=\'/your path\'/

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



There are two ways of carrying out the compilation:
----------------------------------------------------

1) Compile setting the ARCH variable just for the command:

   make ARCH=sgimips

   In this case R64 is pre-defined. 

2) Compile setting the ARCH variable and choosing 64-bit reals;

   make ARCH=sgimips R64=R64

3) On Linux  compile setting CNAME=_gfortran to force the use of the Gnu
   compilers gfortran and gcc.

   make ARCH=linux CNAME=_gfortran

4) Same as 3) and added A64 if machine is 64 bits Linux

   make ARCH=linux CNAME=_gfortran A64=A64

   The library will be created in a working directory and be named libemos(R64).a.

   It is recommended that users should not change any routines in the source 
sub-directories because any changes would not be present in future ECMWF 
releases of this software.

   You can use other options for compilation. For example: selecting the working
directory; modifying the configuration files; changing the level of
optimisation; etc. The 'make' utility can be used repeatedly. It will only
cause the re-compilation of routines which have been modified since the
previous 'make'.


Environment variables
---------------------

IF YOU USE ./build_library SCRIPT YOU DON'T NEED TO SET ENVIRONMENTAL
VARIABLES BELOW.

  The location of tables and land-sea mask could be specified by the environment
variables. Put the specification of them in your startup files (.profile, ...)
to ensure you have access to the tables and land-sea
on future logins.

Bourne or Korn shell:

  ECMWF_LOCAL_TABLE_PATH="choosen directory"/gribtables/
  export ECMWF_LOCAL_TABLE_PATH

  LOCAL_DEFINITION_TEMPLATES="choosen directory"/gribtemplates/
  export LOCAL_DEFINITION_TEMPLATES

  BUFR_TABLES="choosen directory"/bufrtables/
  export BUFR_TABLES

  CREX_TABLES="choosen directory"/crextables/
  export CREX_TABLES

  MARS_LSM_PATH="choosen directory"/land_sea_mask/
  export MARS_LSM_PATH

  HIRLAM_LSM_PATH="choosen directory"/land_sea_mask/
  export HIRLAM_LSM_PATH


C-shell:

  setenv ECMWF_LOCAL_TABLE_PATH "choosen directory"/gribtables/
  setenv LOCAL_DEFINITION_TEMPLATES "choosen directory"/gribtemplates/
  setenv BUFR_TABLES "choosen directory"/bufrtables/
  setenv CREX_TABLES "choosen directory"/crextables/
  setenv MARS_LSM_PATH "choosen directory"/land_sea_mask/
  setenv HIRLAM_LSM_PATH "choosen directory"/land_sea_mask/

   The environment variable GRIBEX_DEBUG can be set to ON or OFF
to switch on or off the debug output from GRIBEX.

   The environment variable GRIBEX_CHECK can be set to ON or OFF
to switch on or off the checking of headers in GRIBEX.

   The environment variable JDCNDBG can be set to 1 in order to get
comperhensive output from INTERPOLATION routines

   The following variable can be set to "true" in order to create CREX massege
with check digit.

 USE_E=TRUE

	HIRLAM_LSM_PATH is place for LSM_GG_xxxx, reduced gaussian land-sea mask files,
which is used just for rotation of surface fields. LSM_GG_xxxx files supplied 
with package are just for LITTLE ENDIAN machines. 
   When compiling a program, you need to specify where to find libemos.a by
putting its full pathname in the makefile. The initial location of the library
is "working directory". An alternative is to put libemos.a in /usr/local/lib
(this may need system priviliges) which is conventionally used on UNIX-type
systems for holding libraries and should be defined in your environment PATH
variable.

   The library name follows the normal UNIX convention (it starts with lib and ends
in .a), so the library can be specified in the compile/link command using the
standard ld convention, for example:

        cc -o program program.c  -lemos
   You can see an examples of decoding a GRIB, BUFR, CREX product and interpolation
in examples/ directory.

cd examples

than choose bufr, crex, gribex, interpolation, fft directory.

 Invoke 'make' and start an executable version of program e.g. agrdemo.F through:

   ./test.sh

  In case of gribex example that will temporary set env variables
 ECMWF_LOCAL_TABLE_PATH and LOCAL_DEFINITION_TEMPLATES
   and run

  ./agrdemo -i ../../data/latlon.grib

  for testing purpose before installation

   where latlon.grib is a file containing GRIB fields on latitude/longitude
grids.

   It can be re-run for gaussian grids and spherical harmonic fields.

Terminology
-----------

   >From here on, any reference to SOFTWARE in file names should be interpreted
as the software you have received, i.e. GRIB, PBIO etc.

   The use of the word PLATFORM refers to the make of the computer for which the 
software is intended and substitutes for CRAY, sun etc.

   SUBPACKAGE could be any of pbio, gribex etc. and refers to a part of the
whole SOFTWARE set.


Provided for UNIX systems named above.
--------------------------------------

   This README file.
   The tar file emos_000version.tar (version is a 3-digit number).


Other UNIX systems.
-------------------

   If you use a UNIX system other than those for which the software was prepared,
you should experiment with the configurations provided to see if any are
suitable for your system.

   If any problems are encountered, the following points are worth considering:

Is your cc compiler ANSI?
The C code in this software is ANSI conformant.

Does your FORTRAN compiler need other switches?
Look at other programs compiled on your system.

Does your system need a ranlib command performed on the libraries?
Do "man ar" or "man ranlib".

How many bytes are there in a computer word. Is the platform big-endian or
little-endian? Some of routines are dependent on the word size and on which bit
in a computer word is the most significant. These dependencies may be resolved
by choosing one or other of the files gbyte.c or gbyte_alpha.c(for a
little-endian system).


License
--------

This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE.
See LICENSE and gpl-3.0.txt for details.