In order to use both NCARG4.4.1 and ncl4.2.0.a032 (There is no ncl
binary codes available for Fedora core 4). I compiled NCARG4.4.1
using gcc32, g77 on my box. A short note listed methods and softwares
used during my try.
I tested gcc32, g77 and pgf90, pgcc.
I still can not compile NCARG4.4.1 using gfortran and f95 come from
Fedora core 4. I installed newest version Fedora-2.6.12-1.1456_FC4.
Anyone who can do it, please let me know your methods. Thanks.
Step 1:
-------
For using gcc32 and g77, you have to install the following two packages
using yum.
(1) yum install compat-gcc-32-g77-3.2.3-47.fc4.i386.rpm
(2) yum install compat-libf2c-32-3.2.3-47.fc4.i386.rpm
Step 2:
-------
obtain ncarg-4.4.1.src.tar.gz from http://ngwww.ucar.edu/ng4.4/download.html
save to your $NCAR (sh: export NCAR=xxx ; csh setenv NCAR=xxx)
gtar zxvf ncarg-4.4.1.src.tar.gz
Step 3:
------
Install ijpeg6b, szip2.0 and zlib121
(Note: obtain softwares from http://hdf.ncsa.uiuc.edu/release4/obtain.html)
Three binary packages are:
a. jpeg6b-linux2.4.tar.gz
b. szip2.0-linux-gcc3.2.3-enc.tar.gz
c. zlib121-linux2.4.tar.gz
cp jpeg6b-linux2.4.tar.gz /tmp
cp szip2.0-linux-gcc3.2.3-enc.tar.gz /tmp
cp zlib121-linux2.4.tar.gz /tmp
cd /tmp
gtar zxvf jpeg6b-linux2.4.tar.gz
gtar zxvf szip2.0-linux-gcc3.2.3-enc.tar.gz
gtar zxvf zlib121-linux2.4.tar.gz
cp -uR jpeg6b-linux2.4/* /usr/local
cp -uR szip2.0-linux-gcc3.2.3-enc/* /usr/local
cp -uR zlib121-linux2.4/* /usr/local
mkdir /usr/local/hdf
cp 4.2r1-linux.tar.gz /tmp
gtar zxvf 4.2r1-linux.tar.gz
cp -uR 4.2r1-linux/* /usr/local/hdf
Step 4:
-------
Modify two files:
(1) /usr/local/hdf/include/hdfi.h and
(2) ./ncarview/src/lib/libncarg_ras/hdf.c
Then: You need to revise lines(928-931) of file /usr/local/hdf/include/hdfi.h
The output of "diff" listed as follows:
-----------------------------------------------------------------------------
diff /usr/local/hdf/include/hdfi.h.original /usr/local/hdf/include/hdfi.h
928,931c928,931
< #include <sys\types.h> /* for unbuffered file I/O */
< #include <sys\stat.h>
< #include <io.h>
< #include <conio.h> /* for debugging getch() calls */
--- > #include <sys/types.h> /* for unbuffered file I/O */ > #include <sys/stat.h> > #include <sys/io.h> > #include <ncurses.h> /* for debugging getch() calls */ -----------------------------------------------------------------------------and change lines 67-68 of file ./ncarview/src/lib/libncarg_ras/hdf.c from
#include <hdf/hdf.h> #include <hdf/dfgr.h>
to
#include <hdf.h> #include <dfgr.h>
Step 5: ------- Maybe you need to do a very small modification of file "$NCAR/ncarg-4.4.1/config/LINUX", if you will use g77 and gcc32 (just installed at Step 1).
Fedora core 4 not include g77 and gcc32 (3.x), but rather gfortran and gcc (4.x)
change line 30 of $NCAR_ROOT/ncarg-4.4.1/config/LINUX from #define CCompiler cc to #define CCompiler gcc32
if you use pgf90 and pgcc you just "cp LINUX.PGI LINUX", and you do not need to modify "LINUX"
Step 6: ------
run "Configure" under $NCAR and answer "yes" when "Configure" asks question: "Building hdf support into raster library?". Next, you need to add /usr/local/hdf/lib and /usr/local/hdf/library to locallibrary and include search path. maybe you need input
/usr/X11R6/lib /usr/local/hdf/lib and /usr/X11R6/include /usr/local/hdf/library to search path.
Step 7: ------- Check if you $NCAR/Makefile includes
NCSEARCH = -I/usr/X11R6/include -I/usr/local/hdf/include PYTHONLIBSEARCH = PYTHONINCSEARCH =
LIB_SEARCH = -L/usr/X11R6/lib -L/usr/local/hdf/lib INC_SEARCH = -I/usr/X11R6/include -I/usr/local/hdf/include
which indicated that you have already added /usr/local/hdf/lib and /usr/local/hdf/include to search path.
If not, maybe u can just simply add /usr/local/hdf/lib and /usr/local/hdf/include to search path from file "$NCAR/Makefile"
Step 8: ------- make Everything >& make-output &
Step 9: ------- Test if install correctly. ncargex cpex08 idt cpex08.ncgm ctrans -d X11 cpex08.ncgm
Step 10: download ncl from http://www.ncl.ucar.edu/Download/index.shtml version: ncl-4.2.0.a032.LINUX_RH9d_PC.tar.gz save to $NCAR_ROOT=/usr/local/ncarg cd /usr/local/ncarg gtar zxvf ncl-4.2.0.a032.LINUX_RH9d_PC.tar.gz
Step 11: Test ncl ng4ex gsun01n and ncl gsun01n.ncl
//Finished. :)
-- Zhuanshi He / Z. He ADvanced Environmental Monitoring Research Center (ADEMRC) Gwangju Institute of Science and Technology 1 Oryong-dong, Buk-gu, Gwangju 500-712, Republic of Korea. Tel. +82-62-970-3 406 Fax. +82-62-970-3404 Email: Zhuanshi.He@gmail.com Web: http://atm1.gist.ac.kr/~hzs/
_______________________________________________ ncarg-talk mailing list ncarg-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
This archive was generated by hypermail 2b29 : Sun Oct 16 2005 - 19:34:40 MDT