wrf安装

更新时间:2023-12-03 02:06:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

WRF安装

提示:PC机需要联接互联网 操作系统:UBUNTU 12.04 FORTRAN编译器:gfortran 4.6 安装命令:apt-get install gfortran

C编译器:gcc 版本 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 安装命令:linux系统自带

几个常用linux命令:

定位文件:locate libm.a (假设要找:libm.a) 以管理员身份打开文件夹:sudo nautilus 以管理员身份打开终端:sudo su

NETCDF安装 版本:netcdf-4.1.3

tar -xvf netcdf-4.1.3.tar.gz

./configure --disable-dap --disable-netcdf-4 --prefix=/usr/local/netcdf FC=gfortran make

make install

配置环境变量: vi /root/.bashrc 加入:

export NETCDF=/usr/local/netcdf

export PATH=$PATH:$NETCDF/bin:$NETCDF/include:$NETCDF/lib export MANPATH=$MANPATH:$NETCDF/share/man (注:该处参考气象家园的方法_西西同学) source /root/.bashrc

检查是否成功: ncdump 出现:

ncdump [-c|-h] [-v ...] [[-b|-f] [c|f]] [-l len] [-n name] [-p n[,n]] [-k] [-x] [-s] [-t] [-w] file [-c] Coordinate variable data and header information [-h] Header information only, no data [-v var1[,...]] Data for variable(s) ,... only

[-b [c|f]] Brief annotations for C or Fortran indices in data [-f [c|f]] Full annotations for C or Fortran indices in data [-l len] Line length maximum in data section (default 80) [-n name] Name for netCDF (default derived from file name)

[-p n[,n]] Display floating-point values with less precision [-k] Output kind of netCDF file

[-x] Output XML (NcML) instead of CDL [-s] Output special (virtual) attributes [-t] Output time data as date-time strings

[-w] Without client-side caching of variables for DAP URLs file Name of netCDF file

netcdf library version 4.1.3 of Nov 22 2013 22:36:15 $ 说明成功!

NCL安装

版本:ncl_ncarg-6.1.2.Linux_Debian6.0_i686_nodap_gcc445

tar -xvf ncl_ncarg-6.1.2.Linux_Debian6.0_i686_nodap_gcc445.tar.gz

该命令形成bin、include和lib文件夹,将其拷贝到:/usr/local/ncl目录(注:ncl是自己建立的)

配置环境变量: vi /root/.bashrc 加入:

export NCARG_ROOT=/usr/local/ncl export NCARG_LIB=/usr/local/ncl/lib export NCARG_INC=/usr/local/ncl/include export PATH=/usr/local/ncl/bin:$PATH

source /root/.bashrc

检查是否成功: ncl 出现:

Copyright (C) 1995-2013 - All Rights Reserved University Corporation for Atmospheric Research NCAR Command Language Version 6.1.2

The use of this software is governed by a License Agreement. See http://www.ncl.ucar.edu/ for more details. ncl 0> 说明成功!

zlib libpng jasper lapack blas安装 apt-get install zlib1g-dev 或

tar –zxvf zlib-1.2.8.tar.gz

./configure --prefix=/usr/local/zlib make

make install

tar –zxvf libpng-1.6.6.tar.gz

./configure --prefix=/usr/local/libpng make

make install

unzip jasper-1.900.1.zip

./configure --prefix=/usr/local/jasper make

make install

注意:以前要求上面的3个文件按顺序安装!

tar –zxvf lapack-3.5.0.tgz

在解压后的lapack-3.5.0目录下面有一个make.inc.example文件,将其改为make.inc。 如果是gfortran的编译器,则基本不需要修改这个文件。 把makefile文件中的: lib: lapacklib tmglib

#lib: blaslib variants lapacklib tmglib 改为:

#lib: lapacklib tmglib

lib: blaslib variants lapacklib tmglib 终端输入(在lapack-3.5.0目录下): make

然后把文件夹下面的liblapack.a,librefblas.a,libtmglib.a三个库拷贝到/usr/lib。

BLAS的全称是Basic Linear Algebra Subprograms,主要用于向量和矩阵计算的高性能数学库,本身是用Fortran写的。 tar –zxvf blas.tgz

根据系统修改make.inc和Makefile make

生成blas_LINUX.a文件

配置环境变量: vi /root/.bashrc 加入:

JASPER=/usr/local/jasper;export JASPER

JASPERLIB=/usr/local/jasper/lib;export JASPERLIB

JASPERINC=/usr/local/jasper/include;export JASPERINC

ZLIB=/usr/local/zlib;export ZLIB

ZLIBLIB=/usr/local/zlib/lib;export ZLIBLIB

ZLIBINC=/usr/local/zlib/include;export ZLIBINC

export BLAS=/usr/local/blas

export LAPACK=/usr/local/lapack

#注:安装WRF还需要加入下面配置

export WRFIO_NCD_LARGE_FILE_SUPPORT=1

source /root/.bashrc

apt-get install csh

apt-get install m4

WRFV3.5.1.TAR.gz、WPSV3.5.1.TAR.gz和WRFDA_V3.5.1.tar.gz拷贝到同一目录下,并解压形成三个文件夹:

tar -xvf WRFV3.5.1.TAR.gz tar -xvf WPSV3.5.1.TAR.gz tar -xvf WRFDA_V3.5.1.tar.gz ls -l

--------------------------------------------------------------------------- drwxr-xr-x 7 6840 kmem 4096 11月 26 13:59 WPS

-rw-r--r-- 1 root root 560948 11月 17 11:02 WPSV3.5.1.TAR.gz drwxr-xr-x 16 19974 69257 4096 11月 26 16:20 WRFDA

-rw-r--r-- 1 root root 66483774 11月 26 09:08 WRFDA_V3.5.1.tar.gz drwxr-xr-x 17 6840 kmem 4096 11月 26 11:01 WRFV3

-rw-r--r-- 1 root root 38997831 11月 17 11:05 WRFV3.5.1.TAR.gz

WRFV3.5.1安装 ./configure 选项说明:

serial means single processor 单核 smpar means Symmetric Multi-Processing/Shared Memory Parallel (OpenMP) 多核

dmpar means Distributed Memory Parallel (MPI) 分布式计算 dm+sm means Distributed Memory with Shared Memory 多核+分布式计算

选择:gfortran、gcc、serial这一组

接下来出现:探测C、FORTRAN编译器和测试NETCDF的提示信息 开始执行编译命令:

./compile em_real >& wrf_compile.log

wrf_compile.log文件中没有出现“错误”提示

WRFV3/main# ls -l

总用量 156428

-rw-r--r-- 1 6840 kmem 5477 9月 2 2011 convert_em.F -rw-r--r-- 1 6840 kmem 39702 8月 10 11:30 depend.common -rw-r--r-- 1 6840 kmem 11092 12月 6 2011 ideal_em.F -rw-r--r-- 1 6840 kmem 61627 12月 6 2011 ideal_nmm.F -rw-r--r-- 1 root root 31384012 11月 26 11:25 libwrflib.a -rw-r--r-- 1 6840 kmem 2562 12月 1 2012 Makefile

-rw-r--r-- 1 root root 3528286 11月 26 11:24 module_initialize_real.mod -rw-r--r-- 1 6840 kmem 21561 4月 28 2013 module_wrf_top.F -rw-r--r-- 1 root root 9249 11月 26 11:23 module_wrf_top.f90 -rw-r--r-- 1 root root 3033438 11月 26 11:23 module_wrf_top.mod -rw-r--r-- 1 root root 12588 11月 26 11:23 module_wrf_top.o -rw-r--r-- 1 6840 kmem 101460 1月 28 2013 ndown_em.F -rw-r--r-- 1 root root 80579 11月 26 11:24 ndown_em.f90 -rw-r--r-- 1 root root 158356 11月 26 11:24 ndown_em.o -rwxr-xr-x 1 root root 23682511 11月 26 11:25 ndown.exe -rw-r--r-- 1 6840 kmem 36624 4月 28 2013 nup_em.F -rw-r--r-- 1 root root 23775 11月 26 11:24 nup_em.f90 -rw-r--r-- 1 root root 32404 11月 26 11:24 nup_em.o -rwxr-xr-x 1 root root 23351361 11月 26 11:25 nup.exe

-rw-r--r-- 1 6840 kmem 56972 3月 27 2012 real_em.F -rw-r--r-- 1 root root 44823 11月 26 11:25 real_em.f90 -rw-r--r-- 1 root root 73848 11月 26 11:25 real_em.o -rwxr-xr-x 1 root root 23567563 11月 26 11:25 real.exe

-rw-r--r-- 1 6840 kmem 61620 6月 18 00:18 real_nmm.F -rw-r--r-- 1 6840 kmem 80126 2月 29 2012 tc_em.F -rw-r--r-- 1 root root 57708 11月 26 11:24 tc_em.f90 -rw-r--r-- 1 root root 142240 11月 26 11:25 tc_em.o -rwxr-xr-x 1 root root 23433628 11月 26 11:25 tc.exe

-rw-r--r-- 1 6840 kmem 44894 9月 2 2011 wrf_ESMFMod.F -rwxr-xr-x 1 root root 26884395 11月 26 11:23 wrf.exe -rw-r--r-- 1 6840 kmem 951 3月 28 2010 wrf.F -rw-r--r-- 1 root root 186 11月 26 11:23 wrf.f90 -rw-r--r-- 1 root root 1640 11月 26 11:23 wrf.o

-rw-r--r-- 1 6840 kmem 85396 9月 2 2011 wrf_SST_ESMF.F

WPSV3.5.1安装 ./configure

在配置选项中选13 形成configure.wps文件 修改后的configure.wps文件 # configure.wps #

# This file was automatically generated by the configure script in the # top level directory. You may make changes to the settings in this

# file but be aware they will be overwritten each time you run configure. # Ordinarily, it is necessary to run configure once, when the code is # first installed. #

# To permanently change options, change the settings for your platform # in the file arch/configure.defaults, the preamble, and the postamble - # then rerun configure. #

.SUFFIXES: .F .f .c .o

SHELL = /bin/sh

NCARG_LIBS = -L$(NCARG_ROOT)/lib -lncarg -lncarg_gks -lncarg_c \\ -L/usr/X11R6/lib -lX11

NCARG_LIBS2 = # May be overridden by architecture specific value below

FDEFS = -DUSE_JPEG2000 -DUSE_PNG

# Listing of options that are usually independent of machine type. # When necessary, these are over-ridden by each architecture.

ARFLAGS =

PERL = perl

RANLIB = echo

WRF_DIR = ../WRFV3

WRF_INCLUDE = -I$(WRF_DIR)/external/io_netcdf \\ -I$(WRF_DIR)/external/io_grib_share \\ -I$(WRF_DIR)/external/io_grib1 \\ -I$(WRF_DIR)/external/io_int \\ -I$(WRF_DIR)/inc \\ -I$(NETCDF)/include

WRF_LIB = -L$(WRF_DIR)/external/io_grib1 -lio_grib1 \\

-L$(WRF_DIR)/external/io_grib_share -lio_grib_share \\ -L$(WRF_DIR)/external/io_int -lwrfio_int \\ -L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \\

-L$(NETCDF)/lib -lnetcdff -lnetcdf

#### Architecture specific settings ####

COMPRESSION_LIBS = # intentionally left blank, fill in COMPRESSION_LIBS below

COMPRESSION_INC = # intentionally left blank, fill in COMPRESSION_INC below #

# Settings for Linux i486 i586 i686, gfortran (serial) # #

COMPRESSION_LIBS = -L/usr/local/jasper/lib -ljasper -lpng -lz COMPRESSION_INC = -I/usr/local/jasper/include FDEFS = -DUSE_JPEG2000 -DUSE_PNG SFC = gfortran SCC = gcc

DM_FC = mpif90 -f90=gfortran DM_CC = mpicc -cc=gcc FC = $(SFC) CC = $(SCC) LD = $(FC)

FFLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4 F77FLAGS = -ffixed-form -O -fconvert=big-endian -frecord-marker=4 FCSUFFIX =

FNGFLAGS = $(FFLAGS) LDFLAGS = CFLAGS =

CPP = /usr/bin/cpp -C -P -traditional

CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL

RANLIB = ranlib

######################################################################################################################## #

# Macros, these should be generic for all machines

LN = ln -sf

MAKE = make -i -r RM = /bin/rm -f CP = /bin/cp AR = ar ru

.IGNORE:

.SUFFIXES: .c .f .F .o

# There is probably no reason to modify these rules .c.o:

$(RM) $@

$(CC) $(CPPFLAGS) $(CFLAGS) -c $< .f.o:

$(RM) $@ $*.mod

$(FC) $(F77FLAGS) -c $< $(WRF_INCLUDE) .F.o:

$(RM) $@ $*.mod

$(CPP) $(CPPFLAGS) $(FDEFS) $(WRF_INCLUDE) $< > $*.f90 $(FC) $(FFLAGS) -c $*.f90 $(WRF_INCLUDE) # $(RM) $*.f90

以上是完整文件,注意下面两条语句:

COMPRESSION_LIBS = -L/usr/local/jasper/lib -ljasper -lpng -lz COMPRESSION_INC = -I/usr/local/jasper/include

其中libpng和libzib库文件是从/usr/local/libpng和/usr/local/zlib文件夹下找到,直接手工考到/usr/local/jasper/lib文件夹下的。

同时,把/usr/local/libpng文件夹下的include子目录拷贝到/usr/local/jasper文件夹下。

./compile >& wps_compile.log

wps_compile.log文件中没有出现“错误”提示 WPS相关的.exe文件形成

WRFDA_V3.5.1安装 ./configure wrfda

./compile all_wrfvar >& wrfvar_compile.log

wrfvar_compile.log文件中没有出现“错误”提示 相关的.exe文件形成

RIP4安装

对于RIP4安装,我在2011年初的那次努力就是以失败告终的! http://mnmuc.org/thread-610-1-1.html

这是当时在“Meteorological Numerical Model Union of China (MNMUC) 中国气象数值模式联盟”网站上寻求帮助的贴子。

时隔数年,我在这次努力中也用了将近3天的时间。

其实,我SURFER和GRADS用得挺好,但问题不解决,心里总是放不下。

Cairo是一个2D图形库。http://cairographics.org/download/ RIP4安装必须先安装Cairo,命令如下:

apt-get install libcairo2-dev

./configure

修改configure.rip # configure.rip #

# This file was automatically generated by the configure script in the # top level directory. You may make changes to the settings in this

# file but be aware they will be overwritten each time you run configure. # Ordinarily, it is necessary to run configure once, when the code is # first installed. #

# To permanently change options, change the settings for your platform # in the file arch/configure.defaults, the preamble, and the postamble - # then rerun configure. #

.SUFFIXES: .F90 .f90 .F .f .c .o

SHELL = /bin/sh

# Listing of options that are usually independent of machine type. # When necessary, these are over-ridden by each architecture.

ARFLAGS =

PERL = perl

RANLIB = echo

NETCDFLIB = -L${NETCDF}/lib -lnetcdf -lnetcdff

NETCDFINC = -I${NETCDF}/include

NCARGLIBS = -L${NCARG_ROOT}/lib -lncarg -lcgm -L/usr/lib/i386-linux-gnu -lX11 -lm

-lncarg_gks -lncarg_c

#### Architecture specific settings ####

# Settings for PC Linux i486 i586 i686 x86_64, gfortran compiler #

FC = gfortran

FFLAGS = -I. -fcray-pointer -fconvert=big-endian -frecord-marker=4 CCFLAGS = -I. -DLITTLE -DUNDERSCORE -c LDFLAGS =

LOCAL_LIBS = -L/usr/X11R6/lib -lX11 -lf2c -L/usr/lib/gcc/i686-linux-gnu/4.6 -lgcc -lgfortran -lcairo -lfreetype

########################################################### #

# Macros, these should be generic for all machines

LN = ln -sf

MAKE = make -i -r RM = /bin/rm -f CP = /bin/cp AR = ar ru

.IGNORE:

.SUFFIXES: .c .f90 .F90 .f .F .o

# There is probably no reason to modify these rules .c.o:

$(RM) $@

$(CC) $(CCFLAGS) $(CFLAGS) -c $< .f.o:

$(FC) $(FFLAGS) -c $*.f

.f90.o:

$(RM) $@ $*.mod $(CP) $< $*.f

$(FC) $(FFLAGS) -c $*.f $(RM) $*.f

.F90.o:

$(RM) $@ $*.mod

$(CPP) $(CCFLAGS) $(FDEFS) $< > $*.f $(FC) $(FFLAGS) -c $*.f ${NETCDF_INC} $(RM) $*.f

以上是完整文件,注意下面这条语句:

NETCDFLIB = -L${NETCDF}/lib -lnetcdf -lnetcdff 后面的-lnetcdff,是手工加上的,这就是关键。

./compile >& rip4_compile.log

rip4_compile.log文件中没有出现“错误”提示 ls -l

总用量 1636

drwxr-xr-x 2 6840 kmem 4096 11月 27 08:52 arch

-rw-r--r-- 1 6840 kmem 11398 10月 4 12:15 CHANGES -rwxr-xr-x 1 6840 kmem 658 2月 27 2009 clean -rw-r--r-- 1 6840 kmem 5008 1月 11 2011 color.tbl -rwxr-xr-x 1 6840 kmem 1282 10月 15 2008 compile -rwxr-xr-x 1 6840 kmem 4257 10月 15 2008 configure -rw-r--r-- 1 root root 1912 11月 27 09:25 configure.rip -rw-r--r-- 1 root root 1858 11月 27 08:53 configure.rip~ -rw-r--r-- 1 root root 1807 11月 22 09:16 configure.rip4 drwxr-xr-x 2 6840 kmem 4096 11月 22 09:15 Doc

-rw-r--r-- 1 6840 kmem 30200 7月 10 2007 eta_micro_lookup.dat -rw-r--r-- 1 6840 kmem 14104 3月 19 2008 Makefile

-rw-r--r-- 1 6840 kmem 347079 7月 10 2007 psadilookup.dat -rw-r--r-- 1 6840 kmem 4028 3月 31 2012 README lrwxrwxrwx 1 root root 7 11月 27 09:34 rip -> src/rip -rw-r--r-- 1 root root 15225 11月 27 09:34 rip4_compile.log

lrwxrwxrwx 1 root root 11 11月 27 09:34 ripcomp -> src/ripcomp lrwxrwxrwx 1 root root 10 11月 27 09:34 ripcut -> src/ripcut

lrwxrwxrwx 1 root root 13 11月 27 09:34 ripdp_mm5 -> src/ripdp_mm5 lrwxrwxrwx 1 root root 16 11月 27 09:34 ripdp_wrfarw -> src/ripdp_wrfarw lrwxrwxrwx 1 root root 16 11月 27 09:34 ripdp_wrfnmm -> src/ripdp_wrfnmm lrwxrwxrwx 1 root root 13 11月 27 09:34 ripinterp -> src/ripinterp lrwxrwxrwx 1 root root 11 11月 27 09:34 ripshow -> src/ripshow drwxr-xr-x 2 6840 kmem 4096 11月 22 09:15 sample_infiles

lrwxrwxrwx 1 root root 12 11月 27 09:34 showtraj -> src/showtraj drwxr-xr-x 2 6840 kmem 12288 11月 27 09:34 src

-rw-r--r-- 1 6840 kmem 1123389 7月 10 2007 stationlist

lrwxrwxrwx 1 root root 11 11月 27 09:34 tabdiag -> src/tabdiag lrwxrwxrwx 1 root root 11 11月 27 09:34 upscale -> src/upscale

-rw-r--r-- 1 root root 55557 11月 26 18:38 wps_compile.log~

配置环境变量: vi /root/.bashrc 加入:

export RIP_ROOT=/usr/local/RIP4 export PATH=$RIP_ROOT:$PATH

source /root/.bashrc 结语

感谢气象家园。 感谢各位气象同仁,你们曾经的努力对于我找到解决问题的方法非常重要,更重要的是你们努力解决问题的精神,是你们鼓舞了我。 感谢UBUNTU,和为此努力和付出的人们。

感谢gfortran,我真的不想再去盗版PGI;感谢ifort(intel),因为如果gfortran用不好,ifort是一个选择。 感谢gcc。

向微软表示歉意,因为我使用的VC++ 6.0 是盗版的,而我又实在离不开C++

ARWpost安装

ARWpost把WRF结果转为GrADS或Vis5D可辨识的数据格式。 步骤:

tar zxvf ARWpost_V3.tar.gz ./configure

生成configure.arwp

修改Makefile文件 (注:在/src子目录下)

修改后的Makefile文件

include ../configure.arwp

OBJS = module_model_basics.o constants_module.o gridinfo_module.o ARWpost.o input_module.o output_module.o module_map_utils.o misc_definitions_module.o module_date_pack.o module_debug.o process_domain_module.o module_get_file_names.o module_interp.o module_basic_arrays.o module_diagnostics.o module_arrays.o module_pressure.o module_calc_height.o module_calc_pressure.o module_calc_theta.o

module_calc_tk.o module_calc_tc.o module_calc_td.o module_calc_td2.o module_calc_rh.o module_calc_rh2.o module_calc_uvmet.o module_calc_slp.o module_calc_dbz.o module_calc_cape.o module_calc_wdir.o module_calc_wspd.o module_calc_clfr.o

wrong:

clear ; @echo \

@echo \ @echo \ @echo \

all: ARWpost.exe

ARWpost.exe: $(OBJS)

$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $(OBJS) \\

-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdf -lnetcdff

module_model_basics.o:

constants_module.o:

misc_definitions_module.o:

module_date_pack.o:

module_get_file_names.o:

module_arrays.o: module_model_basics.o gridinfo_module.o

module_pressure.o: module_model_basics.o

module_interp.o: input_module.o module_arrays.o module_pressure.o

module_map_utils.o:

module_debug.o:

gridinfo_module.o: misc_definitions_module.o module_debug.o module_get_file_names.o

input_module.o: gridinfo_module.o misc_definitions_module.o

output_module.o: input_module.o module_model_basics.o module_arrays.o module_interp.o

process_domain_module.o: module_date_pack.o gridinfo_module.o input_module.o output_module.o misc_definitions_module.o module_debug.o module_interp.o module_basic_arrays.o module_diagnostics.o module_arrays.o module_model_basics.o module_pressure.o

ARWpost.o: gridinfo_module.o module_debug.o process_domain_module.o

module_basic_arrays.o: gridinfo_module.o module_arrays.o module_pressure.o module_interp.o constants_module.o

module_diagnostics.o: gridinfo_module.o output_module.o module_arrays.o module_interp.o module_pressure.o constants_module.o module_calc_height.o module_calc_pressure.o module_calc_tk.o module_calc_tc.o module_calc_theta.o module_calc_td.o module_calc_td2.o module_calc_rh.o module_calc_rh2.o module_calc_uvmet.o module_calc_slp.o module_calc_dbz.o module_calc_cape.o module_calc_wdir.o module_calc_wspd.o module_calc_clfr.o

module_calc_cape.o: module_model_basics.o constants_module.o module_calc_dbz.o: module_model_basics.o constants_module.o module_calc_height.o: module_model_basics.o constants_module.o module_calc_pressure.o: module_model_basics.o

module_calc_slp.o: module_model_basics.o constants_module.o module_calc_rh.o: module_model_basics.o constants_module.o module_calc_rh2.o: module_model_basics.o constants_module.o module_calc_tk.o: module_model_basics.o constants_module.o module_calc_tc.o: module_model_basics.o constants_module.o module_calc_td.o: module_model_basics.o module_calc_td2.o: module_model_basics.o module_calc_theta.o: module_model_basics.o module_calc_uvmet.o: module_model_basics.o module_calc_wdir.o: module_model_basics.o module_calc_wspd.o: module_model_basics.o module_calc_clfr.o: module_model_basics.o

clean:

rm -f $(OBJS) *.mod

clobber:

rm -f $(OBJS) *.mod rm -f *.f

rm -f ARWpost.exe

以上是完整文件,注意下面这条语句: ARWpost.exe: $(OBJS)

$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $(OBJS) \\

-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdf -lnetcdff

后面的-lnetcdff,是手工加上的,这就是关键。(类似于修改RIP4的configure.rip)

./compile ls -l

总用量 56

drwxr-xr-x 2 9140 users 4096 11月 22 09:50 arch

lrwxrwxrwx 1 root root 15 11月 27 18:52 ARWpost.exe -> src/ARWpost.exe -rwxr-xr-x 1 9140 users 905 5月 25 2007 clean -rwxr-xr-x 1 9140 users 490 12月 16 2010 compile -rwxr-xr-x 1 9140 users 4257 5月 25 2007 configure -rw-r--r-- 1 root root 1759 11月 27 18:40 configure.arwp -rw-r--r-- 1 9140 users 12 5月 25 2007 fields.plt -rw-r--r-- 1 9140 users 19 5月 25 2007 myLIST

-rw-r--r-- 1 9140 users 1150 12月 16 2010 namelist.ARWpost -rw-r--r-- 1 9140 users 7189 12月 16 2010 README drwxr-xr-x 2 9140 users 4096 11月 22 09:50 scripts drwxr-xr-x 2 9140 users 4096 11月 27 18:52 src drwxr-xr-x 2 9140 users 4096 3月 2 2011 util 生成ARWpost.exe,表明安装成功

安装WPS前要先安装zlib、libpng和jasper三个外部库,用于识别GRIB2格式的数据;安装WRFDAV前要先安装另外三个外部库bufr(如不用bufr格式的数据,可以不用装,这是3.1版本之前的WRFDA所不允许的),lapack和blas。

用 ldd 察看软件依赖的库,如:

ldd ungrib.exe

linux-gate.so.1 => (0xb77da000)

libpng16.so.16 => /usr/local/jasper/lib/libpng16.so.16 (0xb77a1000) libgfortran.so.3 => /usr/lib/i386-linux-gnu/libgfortran.so.3 (0xb7690000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7663000)

libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb7645000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb749b000) libz.so.1 => /usr/local/jasper/lib/libz.so.1 (0xb7483000)

libquadmath.so.0 => /usr/lib/i386-linux-gnu/libquadmath.so.0 (0xb740f000) /lib/ld-linux.so.2 (0xb77db000)

假设缺:libpng16.so.16 locate libpng16

假设libpng16.so.16在/usr/local/jasper/lib,则: export LD_LIBRARY_PAH=/usr/local/jasper/lib

WRF(三层嵌套)试运行: 修改namelist.wps:

&share

wrf_core = 'ARW', max_dom = 3,

start_date = '2013-08-16_00:00:00','2013-08-16_00:00:00','2013-08-16_00:00:00', end_date = '2013-08-16_12:00:00','2013-08-16_12:00:00','2013-08-16_12:00:00', interval_seconds = 21600 io_form_geogrid = 2, /

&geogrid

parent_id = 1, 1, 2, parent_grid_ratio = 1, 3, 3, i_parent_start = 1, 27, 30, j_parent_start = 1, 11, 22, e_we = 74, 124, 232, e_sn = 61, 118, 220, geog_data_res = '10m','2m','30s', dx = 30000, dy = 30000,

map_proj = 'lambert', ref_lat = 42.00, ref_lon = 118.00, truelat1 = 30.0, truelat2 = 60.0, stand_lon = 118.0,

geog_data_path = '/home/wrf/geog' /

&ungrib

out_format = 'WPS', prefix = 'FILE', /

&metgrid

fg_name = 'FILE'

io_form_metgrid = 2, /

以上namelist.wps完整文件

./geogrid.exe

ln -s /home/wrf/WPS/ungrib/Variable_Tables/Vtable.GFS Vtable ./link_grib.csh /home/wrf/fnl_wyx/fnl_20130816_* ./ungrib.exe ./metgrid.exe

以上WPS处理过程!

cd .../WRFV3/test/em_real 修改namelist.input:

&time_control

run_days run_hours run_minutes run_seconds start_year start_month start_day start_hour start_minute start_second end_year end_month end_day end_hour end_minute end_second interval_seconds input_from_file history_interval frames_per_outfile restart restart_interval io_form_history io_form_restart io_form_input io_form_boundary debug_level /

&domains

time_step time_step_fract_num time_step_fract_den = 0, = 12, = 0, = 0,

= 2013, 2013, 2013, = 08, 08, 08, = 16, 16, 16, = 00, 00, 00, = 00, 00, 00, = 00, 00, 00, = 2013, 2013, 2013, = 08, 08, 08, = 16, 16, 16, = 12, 12, 12, = 00, 00, 00, = 00, 00, 00, = 21600

= .true.,.true.,.true., = 180, 60, 60, = 1000, 1000, 1000, = .false., = 2 = 2 = 2 = 2 = 0 = 180, = 0, = 1,

= 5000, max_dom = 3,

e_we = 74, 124, 232, e_sn = 61, 118, 220, e_vert = 30, 30, 30, p_top_requested = 5000, num_metgrid_levels = 27, num_metgrid_soil_levels = 4,

dx = 30000, 10000, 3333.33, dy = 30000, 10000, 3333.33, grid_id parent_id i_parent_start j_parent_start parent_grid_ratio parent_time_step_ratio feedback smooth_option /

&physics

mp_physics ra_lw_physics ra_sw_physics radt sf_sfclay_physics sf_surface_physics bl_pbl_physics bldt cu_physics cudt isfflx ifsnow icloud surface_input_source num_soil_layers sf_urban_physics /

&fdda /

&dynamics

w_damping diff_opt = 1, = 0, = 1, = 1, = 1, = 1, = 1, = 0 = 3, = 1, = 1, = 30, = 2, = 1, = 0, = 1, = 5, = 1, = 1, = 1, = 4,

= 0, = 0, = 1,

2, 3, 1, 2, 27, 30, 11, 22, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 30, 30, 1, 2, 2, 1, 1, 0, 0, 1, 0, 5, 5, 0, 0, = 1, 1, = 1, km_opt = 4,

diff_6th_opt = 0, 0, 0, diff_6th_factor = 0.12, 0.12, 0.12, base_temp = 290. damp_opt = 0,

zdamp = 5000., 5000., 5000., dampcoef = 0.2, 0.2, 0.2 khdif = 0, 0, 0, kvdif = 0, 0, 0, non_hydrostatic = .true., .true., .true.,

moist_adv_opt = 1, 1, 1, scalar_adv_opt = 1, 1, 1, /

&bdy_control

spec_bdy_width = 5, spec_zone = 1, relax_zone = 4,

specified = .true., .false.,.false., nested = .false., .true., .true., /

&grib2 /

&namelist_quilt

nio_tasks_per_group = 0, nio_groups = 1, /

以上namelist.input完整文件

ln -s /home/wrf/WPS/met_em.d0* ./ ./real.exe ./wrf.exe

12 小时 30分后形成:

-rw-r--r-- 1 root root 45160832 12月 4 00:05 wrfout_d01_2013-08-16_00:00:00 -rw-r--r-- 1 root root 385124632 12月 4 00:05 wrfout_d02_2013-08-16_00:00:00 -rw-r--r-- 1 root root 1353001672 12月 4 00:05 wrfout_d03_2013-08-16_00:00:00

以上WRF处理过程!

给自己设置一个个性的签名吧~

回复 支持 反对 使用道具 评分 举报

sywyx

新浪微博达人勋 12 主题 159 帖子 2185 积分 大雨

Rank: 4 积分2185

发消息串个门打招呼

18#

楼主| 发表于 2013-12-4 11:26:49 | 只看该作者 修改namelist.ARWpost:

&datetime

start_date = '2013-08-16_00:00:00', end_date = '2013-08-16_12:00:00', interval_seconds = 3600, tacc = 0,

debug_level = 0, / &io

input_root_name = '/home/wrf/fnl_wyx/wrfout_d03_2013-08-16_00:00:00' output_root_name = '/home/wrf/grads_wyx/grads_wyx' plot = 'all_list'

fields = 'height,pressure,tk,tc' mercator_defs = .true. /

split_output = .true. frames_per_outfile = 2

plot = 'all' plot = 'list' plot = 'all_list'

! Below is a list of all available diagnostics fields = 'height,geopt,theta,tc,tk,td,td2,rh,rh2,umet,vmet,pressure,u10m,v10m,wdir,wspd,wd10,ws10,slp,mcape,mcin,lcl,lfc,cape,cin,dbz,max_dbz,clfr'

&interp

interp_method = 1,

interp_levels = 1000.,950.,900.,850.,800.,750.,700.,650.,600.,550.,500.,450.,400.,350.,300.,250.,200.,150.,100., /

extrapolate = .true.

interp_method = 1, ! 0 is model levels, -1 is nice height levels, 1 is user specified pressure/height

interp_levels = 1000.,950.,900.,850.,800.,750.,700.,650.,600.,550.,500.,450.,400.,350.,300.,250.,200.,150.,100.,

interp_levels = 0.25, 0.50, 0.75, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00, 8.00, 9.00, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 以上namelist.ARWpost完整文件

./ARWpost.exe

形成的grads_wyx.ctl文件如下:

dset ^grads_wyx.dat options byteswapped undef 1.e30

title OUTPUT FROM WRF V3.5.1 MODEL

pdef 231 219 lcc 41.674 122.481 116.000 110.000 60.00000 30.00000 118.00000 3333.330 3333.330

xdef 691 linear 117.54185 0.01501500 ydef 494 linear 37.87466 0.01501500 zdef 19 levels 1000.00000 950.00000 900.00000 850.00000 800.00000 750.00000 700.00000 650.00000 600.00000 550.00000 500.00000 450.00000 400.00000 350.00000 300.00000

250.00000 200.00000 150.00000 100.00000

tdef 13 linear 00Z16AUG2013 60MN VARS 101

XLAT 1 0 LATITUDE, SOUTH IS NEGATIVE (degree_north) XLONG 1 0 LONGITUDE, WEST IS NEGATIVE (degree_east) LU_INDEX 1 0 LAND USE CATEGORY (-)

VAR_SSO LAP_HGT U V W PH PHB T MU MUB NEST_POS P PB P_HYD Q2 T2 TH2 PSFC U10 V10 QVAPOR QCLOUD QRAIN SHDMAX SHDMIN SNOALB TSLB SMOIS SH2O SMCREL SEAICE XICEM SFROFF UDROFF IVGTYP 1 0 variance of subgrid-scale orography (m2) 1 0 Laplacian of orography (m) 19 0 x-wind component (m s-1) 19 0 y-wind component (m s-1) 19 0 z-wind component (m s-1)

19 0 perturbation geopotential (m2 s-2) 19 0 base-state geopotential (m2 s-2)

19 0 perturbation potential temperature (theta-t0) (K) 1 0 perturbation dry air mass in column (Pa) 1 0 base state dry air mass in column (Pa) 1 0 - (-)

19 0 perturbation pressure (Pa) 19 0 BASE STATE PRESSURE (Pa) 19 0 hydrostatic pressure (Pa) 1 0 QV at 2 M (kg kg-1) 1 0 TEMP at 2 M (K)

1 0 POT TEMP at 2 M (K) 1 0 SFC PRESSURE (Pa) 1 0 U at 10 M (m s-1) 1 0 V at 10 M (m s-1)

19 0 Water vapor mixing ratio (kg kg-1) 19 0 Cloud water mixing ratio (kg kg-1) 19 0 Rain water mixing ratio (kg kg-1) 1 0 ANNUAL MAX VEG FRACTION (-) 1 0 ANNUAL MIN VEG FRACTION (-)

1 0 ANNUAL MAX SNOW ALBEDO IN FRACTION (-) 4 0 SOIL TEMPERATURE (K) 4 0 SOIL MOISTURE (m3 m-3) 4 0 SOIL LIQUID WATER (m3 m-3) 4 0 RELATIVE SOIL MOISTURE (-) 1 0 SEA ICE FLAG (-)

1 0 SEA ICE FLAG (PREVIOUS STEP) (-) 1 0 SURFACE RUNOFF (mm)

1 0 UNDERGROUND RUNOFF (mm)

1 0 DOMINANT VEGETATION CATEGORY (-)

ISLTYP 1 0 DOMINANT SOIL CATEGORY (-) VEGFRA 1 0 VEGETATION FRACTION (-) GRDFLX 1 0 GROUND HEAT FLUX (W m-2)

ACGRDFLX 1 0 ACCUMULATED GROUND HEAT FLUX (J m-2) ACSNOM 1 0 ACCUMULATED MELTED SNOW (kg m-2) SNOW 1 0 SNOW WATER EQUIVALENT (kg m-2) SNOWH 1 0 PHYSICAL SNOW DEPTH (m) CANWAT 1 0 CANOPY WATER (kg m-2)

SSTSK 1 0 SKIN SEA SURFACE TEMPERATURE (K)

COSZEN 1 0 COS of SOLAR ZENITH ANGLE (dimensionless) LAI 1 0 Leaf area index (area/area) VAR 1 0 OROGRAPHIC VARIANCE (-)

MAPFAC_M 1 0 Map scale factor on mass grid (-)

MAPFAC_MX 1 0 Map scale factor on mass grid, x direction (-) MAPFAC_MY 1 0 Map scale factor on mass grid, y direction (-) MF_VX_INV 1 0 Inverse map scale factor on v-grid, x direction (-) F 1 0 Coriolis sine latitude term (s-1) E 1 0 Coriolis cosine latitude term (s-1) SINALPHA 1 0 Local sine of map rotation (-) COSALPHA 1 0 Local cosine of map rotation (-) HGT 1 0 Terrain Height (m)

TSK 1 0 SURFACE SKIN TEMPERATURE (K)

RAINC 1 0 ACCUMULATED TOTAL CUMULUS PRECIPITATION (mm) RAINSH 1 0 ACCUMULATED SHALLOW CUMULUS PRECIPITATION (mm) RAINNC 1 0 ACCUMULATED TOTAL GRID SCALE PRECIPITATION (mm) SNOWNC 1 0 ACCUMULATED TOTAL GRID SCALE SNOW AND ICE (mm) GRAUPELNC 1 0 ACCUMULATED TOTAL GRID SCALE GRAUPEL (mm) HAILNC 1 0 ACCUMULATED TOTAL GRID SCALE HAIL (mm) REFL_10CM 19 0 Radar reflectivity (lamda = 10 cm) (dBZ) CLDFRA 19 0 CLOUD FRACTION (-)

SWDOWN 1 0 DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE (W m-2)

GLW 1 0 DOWNWARD LONG WAVE FLUX AT GROUND SURFACE (W m-2) SWNORM 1 0 NORMAL SHORT WAVE FLUX AT GROUND SURFACE (SLOPE-DEPENDENT) (W m-2)

SWDDIR 1 0 Shortwave surface downward direct irradiance (W/m^2)

SWDDNI 1 0 Shortwave surface downward direct normal irradiance (W/m^2) SWDDIF 1 0 Shortwave surface downward diffuse irradiance (W/m^2) OLR 1 0 TOA OUTGOING LONG WAVE (W m-2) ALBEDO 1 0 ALBEDO (-)

CLAT 1 0 COMPUTATIONAL GRID LATITUDE, SOUTH IS NEGATIVE (degree_north)

ALBBCK 1 0 BACKGROUND ALBEDO (-) EMISS 1 0 SURFACE EMISSIVITY (-)

NOAHRES 1 0 RESIDUAL OF THE NOAH SURFACE ENERGY BUDGET (W m{-2})

FLX4 1 0 sensible heat from canopy (W m{-2})

FVB 1 0 fraction of vegetation with snow below (-) FBUR 1 0 fraction of vegetation covered by snow (-) FGSN 1 0 fraction of ground covered by snow (-)

TMN 1 0 SOIL TEMPERATURE AT LOWER BOUNDARY (K) XLAND 1 0 LAND MASK (1 FOR LAND, 2 FOR WATER) (-) UST 1 0 U* IN SIMILARITY THEORY (m s-1) PBLH 1 0 PBL HEIGHT (m)

HFX 1 0 UPWARD HEAT FLUX AT THE SURFACE (W m-2)

QFX 1 0 UPWARD MOISTURE FLUX AT THE SURFACE (kg m-2 s-1) LH 1 0 LATENT HEAT FLUX AT THE SURFACE (W m-2)

ACHFX 1 0 ACCUMULATED UPWARD HEAT FLUX AT THE SURFACE (J m-2) ACLHF 1 0 ACCUMULATED UPWARD LATENT HEAT FLUX AT THE SURFACE (J m-2)

SNOWC 1 0 FLAG INDICATING SNOW COVERAGE (1 FOR SNOW COVER) (-) SR 1 0 fraction of frozen precipitation (-)

LANDMASK 1 0 LAND MASK (1 FOR LAND, 0 FOR WATER) (-) SST 1 0 SEA SURFACE TEMPERATURE (K) pressure 19 0 Model pressure (hPa) height 19 0 Model height (km) tk 19 0 Temperature (K) tc 19 0 Temperature (C) ENDVARS

@ global String comment TITLE = OUTPUT FROM WRF V3.5.1 MODEL @ global String comment START_DATE = 2013-08-16_00:00:00

@ global String comment SIMULATION_START_DATE = 2013-08-16_00:00:00 @ global String comment WEST-EAST_GRID_DIMENSION = 232 @ global String comment SOUTH-NORTH_GRID_DIMENSION = 220 @ global String comment BOTTOM-TOP_GRID_DIMENSION = 30 @ global String comment DX = 3333.33 @ global String comment DY = 3333.33

@ global String comment STOCH_FORCE_OPT = 0 @ global String comment GRIDTYPE = C

@ global String comment DIFF_OPT = 1 @ global String comment KM_OPT = 4 @ global String comment DAMP_OPT = 0

@ global String comment DAMPCOEF = 0.20 @ global String comment KHDIF = 0.00 @ global String comment KVDIF = 0.00 @ global String comment MP_PHYSICS = 3 @ global String comment RA_LW_PHYSICS = 1 @ global String comment RA_SW_PHYSICS = 1

@ global String comment SF_SFCLAY_PHYSICS = 1 @ global String comment SF_SURFACE_PHYSICS = 2 @ global String comment BL_PBL_PHYSICS = 1 @ global String comment CU_PHYSICS = 0

@ global String comment SURFACE_INPUT_SOURCE = 1 @ global String comment SST_UPDATE = 0 @ global String comment GRID_FDDA = 0

@ global String comment GFDDA_INTERVAL_M = 0 @ global String comment GFDDA_END_H = 0 @ global String comment GRID_SFDDA = 0

@ global String comment SGFDDA_INTERVAL_M = 0 @ global String comment SGFDDA_END_H = 0 @ global String comment HYPSOMETRIC_OPT = 2 @ global String comment SF_URBAN_PHYSICS = 0 @ global String comment SHCU_PHYSICS = 0 @ global String comment MFSHCONV = 0 @ global String comment FEEDBACK = 1

@ global String comment SMOOTH_OPTION = 0 @ global String comment SWRAD_SCAT = 1.00 @ global String comment W_DAMPING = 0 @ global String comment DT = 20.00 @ global String comment RADT = 30.00 @ global String comment BLDT = 0.00 @ global String comment CUDT = 5.00 @ global String comment SWINT_OPT = 0

@ global String comment MOIST_ADV_OPT = 1 @ global String comment SCALAR_ADV_OPT = 1 @ global String comment TKE_ADV_OPT = 1 @ global String comment DIFF_6TH_OPT = 0

@ global String comment DIFF_6TH_FACTOR = 0.12 @ global String comment OBS_NUDGE_OPT = 0 @ global String comment BUCKET_MM = -1.00 @ global String comment BUCKET_J = -1.00

@ global String comment PREC_ACC_DT = 0.00 @ global String comment SF_OCEAN_PHYSICS = 0 @ global String comment ISFTCFLX = 0 @ global String comment ISHALLOW = 0 @ global String comment DFI_OPT = 0

@ global String comment WEST-EAST_PATCH_START_UNSTAG = 1 @ global String comment WEST-EAST_PATCH_END_UNSTAG = 231 @ global String comment WEST-EAST_PATCH_START_STAG = 1 @ global String comment WEST-EAST_PATCH_END_STAG = 232

@ global String comment SOUTH-NORTH_PATCH_START_UNSTAG = 1 @ global String comment SOUTH-NORTH_PATCH_END_UNSTAG = 219

本文来源:https://www.bwwdw.com/article/055t.html

Top