[gradsusr] How to read HDF5 data by using the latest version of GrADS?

muhammad hasan ali baig mhasanbaig at gmail.com
Wed Jan 12 11:13:13 EST 2011


Dear Zablone, Rafael and other kind researchers,
                                                                      I
tried to follow your advice and tried to use the lats4d command but error
message occurred "Command not found". Then I started to install different
libraries from http://iges.org/grads/gadoc/supplibs.html but when i
installed the zlib by following the steps:
cd $HOME/supplibs/src/
tar xvfz ./tarfiles/zlib-1.2.3.tar.gz
ln -sf zlib-1.2.3 zlib
cd zlib
./configure --prefix=$HOME/supplibs/src/zlib
make
make install
cp ./lib/libz.a $HOME/supplibs/lib
mkdir $HOME/supplibs/include/zlib
cp ./include/zlib.h $HOME/supplibs/include/zlib

following output could be seen on my terminal of the linux fedora having
version 2.0.a9 of grads after running the above mentioned commands:
[Hasan at localhost zlib]$ make
gcc -O3 -DUSE_MMAP   -c -o example.o example.c
gcc -O3 -DUSE_MMAP   -c -o adler32.o adler32.c
gcc -O3 -DUSE_MMAP   -c -o compress.o compress.c
gcc -O3 -DUSE_MMAP   -c -o crc32.o crc32.c
gcc -O3 -DUSE_MMAP   -c -o gzio.o gzio.c
gcc -O3 -DUSE_MMAP   -c -o uncompr.o uncompr.c
gcc -O3 -DUSE_MMAP   -c -o deflate.o deflate.c
gcc -O3 -DUSE_MMAP   -c -o trees.o trees.c
gcc -O3 -DUSE_MMAP   -c -o zutil.o zutil.c
gcc -O3 -DUSE_MMAP   -c -o inflate.o inflate.c
gcc -O3 -DUSE_MMAP   -c -o infback.o infback.c
gcc -O3 -DUSE_MMAP   -c -o inftrees.o inftrees.c
gcc -O3 -DUSE_MMAP   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o
zutil.o inflate.o infback.o inftrees.o inffast.o
gcc -O3 -DUSE_MMAP -o example example.o -L. libz.a
gcc -O3 -DUSE_MMAP   -c -o minigzip.o minigzip.c
gcc -O3 -DUSE_MMAP -o minigzip minigzip.o -L. libz.a
[Hasan at localhost zlib]$ make install
cp zlib.h zconf.h /home/Hasan/supplibs/src/zlib/include
chmod 644 /home/Hasan/supplibs/src/zlib/include/zlib.h
/home/Hasan/supplibs/src/zlib/include/zconf.h
cp libz.a /home/Hasan/supplibs/src/zlib/lib
cd /home/Hasan/supplibs/src/zlib/lib; chmod 755 libz.a
cd /home/Hasan/supplibs/src/zlib/lib; if test -f libz.so.1.2.3; then \
      rm -f libz.so libz.so.1; \
      ln -s libz.so.1.2.3 libz.so; \
      ln -s libz.so.1.2.3 libz.so.1; \
      (ldconfig || true)  >/dev/null 2>&1; \
    fi
cp zlib.3 /home/Hasan/supplibs/src/zlib/share/man/man3
chmod 644 /home/Hasan/supplibs/src/zlib/share/man/man3/zlib.3
[Hasan at localhost zlib]$ cp ./lib/libz.a $HOME/supplibs/lib
[Hasan at localhost zlib]$ mkdir $HOME/supplibs/include/zlib
[Hasan at localhost zlib]$ cp ./include/zlib.h $HOME/supplibs/include/zlib


After it, I tried to install libpng by using the following commands:
cd $HOME/supplibs/src/
tar xvfz tarfiles/libpng-1.2.18.tar.gz
ln -sf libpng-1.2.18 libpng
cd libpng
./configure --disable-shared --prefix=$HOME/supplibs/src/libpng
make
make install
cp ./lib/libpng12.a $HOME/supplibs/lib
mkdir $HOME/supplibs/include/libpng12
cp ./include/libpng12/*.h $HOME/supplibs/include/libpng12

But after executing the configure command, i received following message that
zlib had not been installed:

[Hasan at localhost libpng]$ ./configure --disable-shared
--prefix=$HOME/supplibs/src/libpng
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries...
yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries...
yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries...
yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries...
yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working strtod... yes
checking for memset... yes
checking for pow... no
checking for pow in -lm... yes
checking for zlibVersion in -lz... no
configure: error: zlib not installed
[Hasan at localhost libpng]$ make
make: *** No targets specified and no makefile found.  Stop.
[Hasan at localhost libpng]$ make install
make: *** No rule to make target `install'.  Stop.


I am very worried how to proceed now? Could you help me in this regard?



==================================================================
*Muhammad Hasan Ali Baig,
*

*Key Laboratory of Meteorological Disaster of Ministry of Education,Nanjing*

*University of Information Science & Technology, Nanjing 210044, P. R. China
*
*School of Atmospheric Physics*
*Nanjing University of Information Science & Technology 210044, P. R. China*
*Mobile: +8615251705047
==================================================================
*


On 12 January 2011 11:12, Zablone Owiti <zowiti at ncst.go.ke> wrote:

>
>
> > Dear Ali,
> > You can use the following LATS4D command to convert your Data:
> >
> > lats4d -v -q -i inputfile -o outputfile -format grads_grib
> >
> > Where: inputfile is the name of the name of your hdf file (if it is not
> in the Grads default file, then you need to give the path)
> >          outputfile is the name of the GRIB file that will be created (it
> is saved in the default GRADS directory).
> >
> > There are more options you can choose. Note that the option -q above
> makes GRADS to quite after running the command.
> >
> > You can get more about LATS4D
> here:http://opengrads.org/doc/scripts/lats4d/
> >
> > Hope this will be of assistance to you.
> >
> > Wish you the best.
> >
> > ----------------------------
> >
> >  ZABLONE OWITIy
> >
> >  GRADUATE STUDENT
> >
> > College of Atmospheric Science
> >
> > Nanjing University of Information, Science and Technology
> >
> > Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
> >
> >  Tel: +86-25-58731402
> >
> > Fax: +86-25-58731456
> > Mob. 15077895632
> > Website:  www.nuist.edu.cn
> >
> > ====================================================
> >
> > DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US
> ALL.
> >
> > -------- Original Message --------
> > > From: "muhammad hasan ali baig" <mhasanbaig at gmail.com>
> > > Sent: Wednesday, January 12, 2011 1:32 AM
> > > To: gradsusr at gradsusr.org
> > > Subject: [gradsusr] How to read HDF5 data by using the latest version
> of GrADS?
> > >
> > > Hi dear all!
> >                I am using the latest version of GrADS. I tried to use it
> in
> > converting SST data of Chinese satellite FY2C which is available in HDF5
> > format into grib2 format. But unfortunately, it couldnt read the HDF5
> > format. What should i do?
> > ==================================================================
> > *Muhammad Hasan Ali Baig,
> > *
> >
> > *Key Laboratory of Meteorological Disaster of Ministry of
> Education,Nanjing*
> >
> > *University of Information Science & Technology, Nanjing 210044, P. R.
> China
> > *
> > *School of Atmospheric Physics*
> > *Nanjing University of Information Science & Technology 210044, P. R.
> China*
> > *Mobile: +8615251705047
> > ==================================================================
> > *
> > _______________________________________________
> > > gradsusr mailing list
> > > gradsusr at gradsusr.org
> > > http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110113/f02b126f/attachment-0003.html 


More information about the gradsusr mailing list