请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: andrewsoong

netcdf4.2及以上版本的安装:For C and Fortran

  [复制链接]

新浪微博达人勋

发表于 2014-3-21 08:16:38 | 显示全部楼层
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-3-22 06:00:10 | 显示全部楼层
本帖最后由 风云电 于 2014-3-22 06:07 编辑

谢谢版主
,我想学习WRF的使用,但不知怎么安装
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-22 12:40:42 | 显示全部楼层

WRF么,不需要这么高的版本的netcdf~~~你可以使用netcdf3.6.3版本!!!比这个新版本好用,也好安装。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-3-23 14:10:43 | 显示全部楼层
太强大了!!!!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-3-28 17:28:53 | 显示全部楼层
感谢楼主~~~~~~~~~~
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2014-3-28 20:27:01 | 显示全部楼层
楼主,你现在将GEOS_CHEM的库下载下来了吗?能打包发给我吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-29 13:19:44 | 显示全部楼层
夏朗的芒果 发表于 2014-3-28 20:27
楼主,你现在将GEOS_CHEM的库下载下来了吗?能打包发给我吗?

在这个帖子上就有啊~~~你找找
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-3-29 17:06:49 | 显示全部楼层
前辈,我按照您说的安装GEO-CHEM库,前面提示zlib和hdf5都安装好,可是安装netcdf却出现问题。
make[1]: Entering directory `/home/pxd/Software/GEOS-Chem-Libraries/src'
if [ -f zlib-1.2.6/zlib-1.2.6.install ] ; then                    \
           echo '====> ZLIB has already been installed!';                     \
        else                                                                  \
           cd zlib-1.2.6                                                  &&\
           ./configure --prefix=/opt/netcdf --static --64                &&\
           touch zlib-1.2.6.config                                        &&\
           make check                                                    &&\
           make install                                                  &&\
           touch zlib-1.2.6.install                                       &&\
           echo '====> ZLIB was installed successfully!';                     \
        fi                                                                  
====> ZLIB has already been installed!
if [ -f hdf5-1.8.8/hdf5-1.8.8.install ] ; then                    \
           echo '====> HDF5 has already been installed';                      \
        else                                                                  \
           if [ -f zlib-1.2.6/zlib-1.2.6.install ] ; then                 \
              cd hdf5-1.8.8                                               &&\
              ./configure                                                     \
                 --prefix=/opt/netcdf                                      \
                 --disable-shared                                             \
                 --with-zlib=/opt/netcdf                                   \
                 FC=ifort      FCFLAGS="-fpic -mcmodel=medium"                             \
                 CC=gcc      CFLAGS="-fpic -mcmodel=medium"                               \
                 CXX=g++    CXXFLAGS=-I/opt/netcdf/include                           \
                 CPP="gcc -c -E"    LDFLAGS=-L/opt/netcdf/lib                           &&\
              touch hdf5-1.8.8.config                                     &&\
              make                                                       &&\
              make install                                               &&\
              touch hdf5-1.8.8.install                                    &&\
              echo '====> HDF5 was installed successfully!';                  \
           else                                                               \
              echo '====> ERROR: ZLIB has not been installed!';               \
              exit;                                                           \
           fi;                                                                \
        fi
====> HDF5 has already been installed
if [ -f netcdf-fortran-4.2/netcdf-fortran-4.2.install ] ; then              \
           echo '====> NETCDF-4 has already been installed!';                 \
        else                                                                  \
           if [ -f hdf5-1.8.8/hdf5-1.8.8.install ] ; then                 \
              cd netcdf-4.2                                                &&\
              ./configure --prefix=/opt/netcdf                              \
                          --disable-shared                                    \
                          --disable-doxygen                                   \
                          --disable-dap                                       \
                          CC=gcc      CFLAGS="-fpic -mcmodel=medium"                      \
                          CPP="gcc -c -E"    CPPFLAGS=-I/opt/netcdf/include                  \
                          LIBS=  LDFLAGS=-L/opt/netcdf/lib                  &&\
              touch netcdf-4.2.config                                      &&\
              make check                                                 &&\
              make install                                               &&\
              touch netcdf-4.2.install                                     &&\
              cd ../netcdf-fortran-4.2                                         &&\
              lt_cv_ld_force_load=no                                        &&\
              LD_LIBRARY_PATH=/opt/netcdf/lib:                            &&\
              ./configure --prefix=/opt/netcdf                              \
                          --disable-shared                                    \
                          F77=ifort       FFLAGS="-fpic -mcmodel=medium"                   \
                          FC=ifort         FCFLAGS="-fpic -mcmodel=medium"                 \
                          CC=gcc         CFLAGS="-fpic -mcmodel=medium"                   \
                          CPP="gcc -c -E"       CPPFLAGS=-I/opt/netcdf/include               \
                          LIBS="-lnetcdf"  LDFLAGS=-L/opt/netcdf/lib               &&\
              touch netcdf-fortran-4.2.config                                  &&\
              make check                                                 &&\
              make install                                               &&\
              touch netcdf-fortran-4.2.install                                 &&\
              echo '====> NETCDF-4 has been installed successfully!';         \
           else                                                               \
              echo '====> ERROR: HDF5 has not been installed!';               \
              exit;                                                           \
           fi;                                                                \
        fi;
configure: netCDF 4.2
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: checking user options
checking whether a NCIO_MINBLOCKSIZE was specified... 256
checking if fsync support is enabled... yes
checking whether extra valgrind tests should be run... no
checking whether we should try to build netCDF-4... yes
checking whether reading of HDF4 SD files is to be enabled... no
checking whether to fetch some sample HDF4 files from Unidata ftp site to test HDF4 reading (requires wget)... no
checking whether parallel I/O for classic and 64-bit offset files using parallel-netcdf is to be enabled... no
checking whether extra example tests should be run... no
checking whether parallel IO tests should be run... no
checking whether a default chunk size in bytes was specified... 4194304
checking whether a maximum per-variable cache size for HDF5 was specified... 67108864
checking whether a number of chunks for the default per-variable cache was specified... 10
checking whether a default file cache size for HDF5 was specified... 4194304
checking whether a default file cache maximum number of elements for HDF5 was specified... 1009
checking whether a default cache preemption for HDF5 was specified... 0.75
checking whether netCDF-4 logging is enabled... no
checking whether cdmremote client is to be built... no
checking whether DAP client is to be built... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 dependency style of gcc... gcc3
checking for curl_easy_setopt in -lcurl... yes
checking whether dap remote testing should be enabled (default on)... no
checking whether netcdf4 group names should be enabled (default on)... configure: dap groups disabled because dap disabled or netcdf-4 disabled
no
checking whether the time-consuming dap tests should be enabled (default off)... no
checking whether netCDF extra tests should be run (developers only)... no
checking whether FFIO will be used... no
checking whether examples should be built... yes
checking whether v2 netCDF API should be built... yes
checking whether the ncgen/ncdump/nccopy should be built... yes
checking whether large file (> 2GB) tests should be run... no
checking whether benchmaks should be run (experimental)... no
checking whether extreme numbers should be used in tests... yes
checking where to put large temp files if large file tests are run... .
checking whether a win32 DLL is desired... no
configure: finding C compiler
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for an ANSI C-conforming const... yes
checking whether a CURLOPT_KEYPASSWD is defined... yes
configure: setting up libtool
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -c -E
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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) 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: finding other utilities
checking for doxygen... doxygen
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
configure: displaying some results
checking CPPFLAGS... -I/opt/netcdf/include
checking CC CFLAGS... gcc -fpic -mcmodel=medium
checking type gcc... gcc is /usr/bin/gcc
checking CXX... g++
checking CXXFLAGS...
checking type g++... g++ is /usr/bin/g++
checking FC... ifort
checking FFLAGS...
checking type ifort... ifort is /opt/intel/composer_xe_2013_sp1.2.144/bin/intel64/ifort
checking F90... unset
checking AR... ar
checking AR_FLAGS... cru
checking type ar... ar is /usr/bin/ar
checking NM... /usr/bin/nm -B
checking NMFLAGS...
configure: checking types, headers, and functions
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... 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 unistd.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for vprintf... yes
checking for _doprnt... no
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for strlcat... no
checking for strerror... yes
checking for snprintf... yes
checking for strchr... yes
checking for strrchr... yes
checking for strcat... yes
checking for strcpy... yes
checking for strdup... yes
checking for strcasecmp... yes
checking for strtod... yes
checking for strtoll... yes
checking for strtoull... yes
checking for strstr... yes
checking for mkstemp... yes
checking for getpid... yes
checking for getrlimit... yes
checking for gettimeofday... yes
checking for fsync... yes
checking for MPI_Comm_f2c... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking whether isnan is declared... yes
checking whether isinf is declared... yes
checking whether isfinite is declared... yes
checking whether signbit is declared... yes
checking for struct stat.st_blksize... yes
checking for IEEE floating point format... yes
checking for size_t... (cached) yes
checking for off_t... yes
checking for ssize_t... yes
checking for ptrdiff_t... yes
checking for uchar... no
checking for longlong... no
checking whether char is unsigned... no
checking whether byte ordering is bigendian... no
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of float... 4
checking size of double... 8
checking size of off_t... 8
checking size of size_t... 8
checking for library containing deflate... no
configure: error: Can't find or link to the z library. Turn off netCDF-4 and      opendap with --disable-netcdf-4 --disable-dap, or see config.log for errors.
make[1]: *** [nc4] Error 1
make[1]: Leaving directory `/home/pxd/Software/GEOS-Chem-Libraries/src'
make: *** [all] Error 2
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-29 18:15:19 | 显示全部楼层
夏朗的芒果 发表于 2014-3-29 17:06
前辈,我按照您说的安装GEO-CHEM库,前面提示zlib和hdf5都安装好,可是安装netcdf却出现问题。
make[1]: E ...

configure: error: Can't find or link to the z library. Turn off netCDF-4 and      opendap with --disable-netcdf-4 --disable-dap, or see config.log for errors.
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-1 10:31:10 | 显示全部楼层
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表