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

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 9341|回复: 7

(已解决)WRF-CHEM编译

[复制链接]

新浪微博达人勋

发表于 2017-6-25 12:58:42 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 denglin19901030 于 2017-6-26 09:31 编辑

看了眼WRF/chem文件夹下的convert_emiss.F文件,发现里面有很多#ifdef DM这类的话,请问在编译./compile emi_conv的时候要先把convert_emiss.F的文件那些#行去掉吗?因为试了下如果不去的话,编译就停止住了,不往下进行,rsl.error.0000也没有显示错误信息(图2),请教各位大神指导啊
正如楼下所说,#不能随意去除,属于宏编译(预编译),也就是你在configure时候的选项会最终决定这块是选择if下面的语句还是else下面的语句。试验发现是图3所示的call wrf_dm_bcast_bytes这边过不去,有找到了这部分的subroutine发现是frame/module_dml里,然并不知道是个啥,感觉像是切换大小写以及判断截取字符还是数字,由于担心把这里一改会影响整个程序的运行,索性在convert_emiss里把call的这几行都#掉了,目前可以跑通,然新的问题又来鸟,苦逼的科研道路。

图1

图1

图2

图2
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2020-10-14 21:05:29 | 显示全部楼层
这个网站https://ruc.noaa.gov/wrf/wrf-chem/known-prob.htm,官网已经对bug声明修复方法了
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2017-6-25 14:03:19 | 显示全部楼层
带#号的是预编译的内容,在编译时会先处理掉

应该在编译时需要增加指定参数的,比如你截图里的内容应该是和 并行与否 的设定有关,常常会由 .F 文件生成相应 .f90 文件,之后编译f90,实际到了正常编译链接的时候只会留上下语句之一。
具体编译时的选项我就不懂了

然后你的问题前面的是编译,后面涉及运行
看着有点儿乱

仅供参考
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-6-25 17:24:48 | 显示全部楼层
123
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2017-6-26 09:02:41 | 显示全部楼层
哈哈哈哈哈哈,来膜拜大神了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-9-7 14:22:31 | 显示全部楼层
您好,想问下,我编译wrf成功出现4个exe,./compile emi_conv >& emcompile.log时,log显示无错误,但是并未出现convert_emiss.exe,因为我用虚拟机跑的,可能存在内存不够(20G运行内存)的原因。log代码,如下,
====================================================

starting compile_wkc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WKC - WRF-Chem/KPP coupler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KPP - symbolic chemistry Kinetics PreProcessor, Version 2.1
        (http://www.cs.vt.edu/~asandu/Software/KPP)
KPP is distributed under GPL, the general public licence
        (http://www.gnu.org/copyleft/gpl.html)
(C) 1995-1997, V. Damian & A. Sandu, CGRER, Univ. Iowa
   
(C) 1997-2003, A. Sandu, Michigan Tech
   
(C) 2003-2005, A. Sandu, Virginia Polytechnic Institute and State University
      
with contributions from:
      
R. Sander, Max-Planck Institute for Chemistry, Mainz, Germany


   
The current version of KPP was modified for WRF-Chem.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------
configure_kpp, settings:
location of flex library: /usr/local/flex/lib/libfl.a
OMPCC = # -fopenmp CCOMP = gcc
DESCRIPTION = GNU ($SFC/$SCC) SCC = gcc DM_CC = mpicc -cc=$(SCC) CC = $(SCC) -DFSEEKO64_OK CC_TOOLS = $(SCC) CC="$(SCC)" CFLAGS="$(CFLAGS)" \
writing chem/KPP/configure.kpp
/opt/Build_WRF/WRF
-----------------------------------------
compile kpp
make[1]: Entering directory '/opt/Build_WRF/WRF/chem/KPP/kpp/kpp-2.1/src'
  gcc -O y.tab.o lex.yy.o scanner.o scanutil.o kpp.o gen.o code.o code_c.o code_f77.o code_f90.o code_matlab.o debug.o -lm -L/usr/local/flex/lib -lfl -o kpp
make[1]: Leaving directory '/opt/Build_WRF/WRF/chem/KPP/kpp/kpp-2.1/src'
-----------------------------------------
compile the coupler
gcc -I../../../../inc  -c -g  gen_kpp.c
gen_kpp.c: In function ‘gen_kpp’:
gen_kpp.c:75:27: warning: implicit declaration of function ‘write_list_to_screen’ [-Wimplicit-function-declaration]
        if ( DEBUGR == 2 ) write_list_to_screen( WRFC_packs ) ;
                           ^~~~~~~~~~~~~~~~~~~~
gen_kpp.c:115:6: warning: implicit declaration of function ‘screen_out’ [-Wimplicit-function-declaration]
      screen_out( );
      ^~~~~~~~~~
gen_kpp.c:120:6: warning: implicit declaration of function ‘check_all’ [-Wimplicit-function-declaration]
      check_all ( kpp_dirname );
      ^~~~~~~~~
gcc -o registry_kpp -g   registry_kpp.o  my_strtok.o data.o type.o misc.o reg_parse.o gen_kpp.o get_wrf_chem_specs.o gen_kpp_mech_dr.o gen_kpp_interface.o get_kpp_chem_specs.o compare_kpp_to_species.o get_wrf_radicals.o get_wrf_jvals.o gen_kpp_utils.o change_chem_Makefile.o gen_kpp_interf_utils.o gen_kpp_args_to_Update_Rconst.o  kpp_data.o sym.o symtab_gen.o
compile the tuv_kpp
make: 'tuv_kpp' is up to date.
-----------------------------------------
check if Registry was touched
make: 'mod_registry.temp' is up to date.
-----------------------------------------
Run kpp for mechanisms in chem/KPP/mechanisms
=========================================================
mechanisms/cb05_sorg_aq
model cb05_sorg_aq
make: 'cb05_sorg_aq_Integrator.f90' is up to date.
=========================================================
mechanisms/cb05_sorg_vbs_aq
model cb05_sorg_vbs_aq
make: 'cb05_sorg_vbs_aq_Integrator.f90' is up to date.
=========================================================
mechanisms/cbm4
model cbm4
make: 'cbm4_Integrator.f90' is up to date.
=========================================================
mechanisms/cbmz_bb
model cbmz_bb
make: 'cbmz_bb_Integrator.f90' is up to date.
=========================================================
mechanisms/cbmz_mosaic
model cbmz_mosaic
make: 'cbmz_mosaic_Integrator.f90' is up to date.
=========================================================
mechanisms/crimech
model crimech
make: 'crimech_Integrator.f90' is up to date.
=========================================================
mechanisms/cri_mosaic_4bin_aq
model cri_mosaic_4bin_aq
make: 'cri_mosaic_4bin_aq_Integrator.f90' is up to date.
=========================================================
mechanisms/cri_mosaic_8bin_aq
model cri_mosaic_8bin_aq
make: 'cri_mosaic_8bin_aq_Integrator.f90' is up to date.
=========================================================
mechanisms/gocartracm
model gocartracm
make: 'gocartracm_Integrator.f90' is up to date.
=========================================================
mechanisms/mozart_mosaic_4bin_aq
model mozart_mosaic_4bin_aq
make: 'mozart_mosaic_4bin_aq_Integrator.f90' is up to date.
tuv_kpp: Argument = FIRST
tuv_kpp: Argument = mozart_mosaic_4bin_aq
tuv_kpp: Mechanism = mozart_mosaic_4bin_aq
=========================================================
mechanisms/mozart_mosaic_4bin
model mozart_mosaic_4bin
make: 'mozart_mosaic_4bin_Integrator.f90' is up to date.
tuv_kpp: Argument = mozart_mosaic_4bin
tuv_kpp: Mechanism = mozart_mosaic_4bin
=========================================================
mechanisms/mozart
model mozart
make: 'mozart_Integrator.f90' is up to date.
=========================================================
mechanisms/mozcart
model mozcart
make: 'mozcart_Integrator.f90' is up to date.
tuv_kpp: Argument = mozcart
tuv_kpp: Mechanism = mozcart
=========================================================
mechanisms/nmhc9
model nmhc9
make: 'nmhc9_Integrator.f90' is up to date.
=========================================================
mechanisms/racm_esrlsorg_aqchem
model racm_esrlsorg_aqchem
make: 'racm_esrlsorg_aqchem_Integrator.f90' is up to date.
=========================================================
mechanisms/racm_esrlsorg
model racm_esrlsorg
make: 'racm_esrlsorg_Integrator.f90' is up to date.
=========================================================
mechanisms/racm_mim
model racm_mim
make: 'racm_mim_Integrator.f90' is up to date.
=========================================================
mechanisms/racmpm
model racmpm
make: 'racmpm_Integrator.f90' is up to date.
=========================================================
mechanisms/racm
model racm
make: 'racm_Integrator.f90' is up to date.
=========================================================
mechanisms/racm_soa_vbs_aqchem
model racm_soa_vbs_aqchem
make: 'racm_soa_vbs_aqchem_Integrator.f90' is up to date.
=========================================================
mechanisms/racm_soa_vbs_het
model racm_soa_vbs_het
make: 'racm_soa_vbs_het_Integrator.f90' is up to date.
=========================================================
mechanisms/racm_soa_vbs
model racm_soa_vbs
make: 'racm_soa_vbs_Integrator.f90' is up to date.
=========================================================
mechanisms/racmsorg_aqchem
model racmsorg_aqchem
make: 'racmsorg_aqchem_Integrator.f90' is up to date.
=========================================================
mechanisms/racmsorg
model racmsorg
make: 'racmsorg_Integrator.f90' is up to date.
=========================================================
mechanisms/radm2
model radm2
make: 'radm2_Integrator.f90' is up to date.
=========================================================
mechanisms/radm2sorg
model radm2sorg
make: 'radm2sorg_Integrator.f90' is up to date.
=========================================================
mechanisms/saprc99_mosaic_4bin_vbs2
model saprc99_mosaic_4bin_vbs2
make: 'saprc99_mosaic_4bin_vbs2_Integrator.f90' is up to date.
=========================================================
mechanisms/saprc99_mosaic_8bin_vbs2_aq
model saprc99_mosaic_8bin_vbs2_aq
make: 'saprc99_mosaic_8bin_vbs2_aq_Integrator.f90' is up to date.
=========================================================
mechanisms/saprc99
model saprc99
make: 'saprc99_Integrator.f90' is up to date.
=========================================================
mechanisms/t1_mozcart
model t1_mozcart
make: 't1_mozcart_Integrator.f90' is up to date.
tuv_kpp: Argument = t1_mozcart
tuv_kpp: Mechanism = t1_mozcart
tuv_kpp: Argument = LAST
=========================================================
not running the WRF-Chem KPP coupler
end of compile_wkc
=========================================================
This option is not recognized: emi_conv
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-9-7 14:23:23 | 显示全部楼层
能否麻烦知道的前辈指点一下,不胜感激
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2023-10-21 15:12:30 | 显示全部楼层
阿萨德撒 发表于 2020-10-14 21:05
这个网站https://ruc.noaa.gov/wrf/wrf-chem/known-prob.htm,官网已经对bug声明修复方法了

膜拜大佬,还得是你{:eb511:}
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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