该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
(2009-04-24 10:14:50)
转载▼
标签: 杂谈 分类: 输送模式
提醒下cmaq4.7需要ioapi3.0,而不是ioapi2.2
安装说明
IOAPI 3.0 - 30 September 2008
I/O API V3.0 的源代码,说明文档和适用于不同操作平台的binary 库在下面的网址:
http://www.baronams.com/products/ioapi/AVAIL.html
这个web站点说明了建立ioapi binary的详细方法,简单的摘要如下:
1、解压缩下载的文件
tar xvfz ioapi-3.0.tar.gz
2、根据你的机器结构和可用的fortran和c编译器
命令"uname -a"提供了机器结构的信息
例如:
3、去ioapi的次级目录决定支持的结构和编译器
ls -al Makeinclude.*
The Makeinclude file extensions are named according to the type of
architecture and compiler.
For instance, if your machine is a Linux box with Pentium
processor and you are using an Portland Group Fortran compiler
(pgf90), you should use Makeinclude.Linux2_x86pg.
4) Set up the library directory:
setenv BIN
where is the file extension you determined in step #3.
Using the previous example, you would type:
在csh下
setenv BIN Linux2_x86pg
在bash下
export BIN= Linux2_x86pg
5) 进入ioapi-3.0/ioapi ,Select the no-couple Makefile:
cp Makefile.nocpl Makefile
你需要编译Makefile来设置BASEDIR的根目录
You may need to edit the Makefile to set the location for BASEDIR.
6) For this version of CMAQ, the I/O API default limit for the number
of species in a file (MXVARS3) will need to be changed from 120.
To accommodate all of our in-house diagnostic model versions, we
set MXVARS3 to a very large number (50000).
Edit the value of MXVARS3 in the following files:
PARMS3.EXT
parms3.h
fixed_src/PARMS3.EXT
7) 补充 在ioapi-3.0/ioapi Build the library by typing:
make
在此出现了Makefile:1: *** 遗漏分隔符这个错误,解决办法是
makefile的命令要以TAB开头,依赖条件顶格
如果还是出错,则可以打开makefile,在84行找到
#include ${SRCDIR}/Makeinclude.${BIN} 此行注释掉,并把makeinclude.BIN的文件内容拷贝到此处,编译即可。
Note: 1. If the compilers you chose are not found, check Makeinclude.
to see whether the compiler paths are set correctly.
2. In our compilation, we used pgf90 and gcc. We made the
following changes to the Makeinclude.Linux2_x86pg file ("patch"
style difference):
25c25,26
< CC = pgcc
---
> #CC = pgcc
> CC = /usr/bin/gcc
33c34,35
< OMPFLAGS = -mp
---
> #OMPFLAGS = -mp
> OMPFLAGS =
35,36c37,40
< COPTFLAGS = -O2 ${MFLAGS}
< FOPTFLAGS = -O2 ${MFLAGS}
---
> #COPTFLAGS = -O2 ${MFLAGS}
> COPTFLAGS = -O2 -ffast-math -DIOAPI_NO_STDOUT
> #FOPTFLAGS = -O2 ${MFLAGS}
> FOPTFLAGS = -O2 -fast -DIOAPI_NO_STDOUT
38c42,43
< FSFLAGS = -Msave
---
> #FSFLAGS = -Msave
> FSFLAGS = -Bstatic
Note: You can change the file by using the Unix "patch"
utility. Cut the indented section listed above and paste into a
file, say "mod." Then type "patch
The -DIOAPI_NO_STDOUT in COPTFLAGS and FOPTFLAGS in the
Makeinclude. file avoids verbose run-time output messages.
3. The library is created in the subdirectory (see step #4).