爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 10632|回复: 8

学习WRFDA安装测试官网观测数据(这里还没有加入辐射数据同化)

[复制链接]

新浪微博达人勋

发表于 2022-8-8 09:14:43 | 显示全部楼层 |阅读模式

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

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

x
1. WRFDA安装,安装链接如下:https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.4/users_guide_chap6.html#_WRFDA_namelist_variables
困扰的一点就是如果单纯用3DVAR,就不必装WRFPLUS。直接装WRFDA。按照官网流程生成44个可执行文件。但是前提所有的库和环境配置合适。这些先决条件在安装WRF时是必须的。
(WRF安装流程以及所需的库:链接为 https://www2.mmm.ucar.edu/wrf/On ... _tutorial.php#STEP1)。
作为说明:
对于我个人而言,最好就是先装WRFPLUS,在装4DVAR,这样在后面如果使用到3DVAR,没有必要再去装。
安装流程官网上比较详细:
Installing WRFPLUS and WRFDA for 4DVAR Run
If you intend to run WRFDA 4DVAR, it is necessary to have WRFPLUS installed first. WRFPLUS contains the adjoint and tangent linear models based on a simplified WRF model, which includes a few simplified physics packages, such as surface drag, large scale condensation and precipitation, and cumulus parameterization.
Note: if you intend to run both 3DVAR and 4DVAR experiments, it is not necessary to compile the code twice. The da_wrfvar.exe executable compiled for 4DVAR can be used for both 3DVAR and 4DVAR assimilation.
  • The WRFPLUS code is fully integrated into WRF and TLM/ADJ code, located under the ‘wrftladj’ directory.  To obtain the WRF packaged file, see: http://www2.mmm.ucar.edu/wrf/users/download/get_source.html.
  • Unzip and untar the WRF file, rename it appropriately to WRFPLUS, and then run the configure script
> gunzip WRFV4.1.tar.gz
> tar -xf WRFV4.1.tar
> mv WRF WRFPLUS
> cd WRFPLUS
> ./configure wrfplus
As with 3D-Var, “serial” means single-processor, and “dmpar” means Distributed Memory Parallel (MPI). Be sure to select the same option for WRFPLUS as you will use for WRFDA.
  • Compile WRFPLUS
> ./compile wrfplus >& compile.out
> ls -ls main/*.exe
If compilation was successful, you should see the WRFPLUS executable (named wrfplus.exe):
53292 -rwxr-xr-x 1 user man 54513254 Apr  6 22:43 main/wrfplus.exe
Finally, set the environment variable WRFPLUS_DIR to the appropriate directory:
>setenv WRFPLUS_DIR ${your_source_code_dir}/WRFPLUS (这个很重要)
To install WRFDA for the 4D-Var run:
  • If you intend to use RTTOV to assimilate radiance data, you will need to set the appropriate environment variable at compile time. See the previous 3DVAR section for instructions.
>./configure 4dvar
>./compile all_wrfvar >& compile.out
>ls -ls var/build/*.exe var/obsproc/*.exe
You should see the same 44 executables as are listed in the above 3DVAR section, including da_wrfvar.exe

2. WRFDA测试,备注一下,WRF, WPS还有WRFDA最好安装同一版本:
测试数据,按照官网链接 https://www2.mmm.ucar.edu/wrf/users/wrfda/download/testdata.html
我使用的是Version 3.9 Test Data。
直接测试4DVAR,按照流程
To run WRF 4D-Var, first create and enter a working directory, such as $WRFDA_DIR/workdir. Set the WORK_DIR environment variable (e.g. setenv WORK_DIR $WRFDA_DIR/workdir)
1) Link the executable file
> cd $WORK_DIR
> ln -fs $WRFDA_DIR/var/da/da_wrfvar.exe .
2) Link the observational data, first guess, BE and LANDUSE.TBL, etc.
> ln -fs $DAT_DIR/ob/2008020512/ob01.ascii ob01.ascii
> ln -fs $DAT_DIR/ob/2008020513/ob02.ascii ob02.ascii
> ln -fs $DAT_DIR/ob/2008020514/ob03.ascii ob03.ascii
> ln -fs $DAT_DIR/ob/2008020515/ob04.ascii ob04.ascii
> ln -fs $DAT_DIR/ob/2008020516/ob05.ascii ob05.ascii
> ln -fs $DAT_DIR/ob/2008020517/ob06.ascii ob06.ascii
> ln -fs $DAT_DIR/ob/2008020518/ob07.ascii ob07.ascii
> ln -fs $DAT_DIR/rc/2008020512/wrfinput_d01 .
> ln -fs $DAT_DIR/rc/2008020512/wrfbdy_d01 .
> ln -fs wrfinput_d01 fg
> ln -fs $DAT_DIR/be/be.dat .
> ln -fs $WRFDA_DIR/run/LANDUSE.TBL .
> ln -fs $WRFDA_DIR/run/GENPARM.TBL .
> ln -fs $WRFDA_DIR/run/SOILPARM.TBL .
> ln -fs $WRFDA_DIR/run/VEGPARM.TBL .
> ln –fs $WRFDA_DIR/run/RRTM_DATA_DBL RRTM_DATA
> ln -fs $WRFDA_DIR/run/CAMtr_volume_mixing_ratio .

3)  > cp $DAT_DIR/namelist.input.4dvar namelist.input
4) Edit necessary namelist variables, link optional files
If you use PREPBUFR format data, set ob_format=1 in &wrfvar3 in namelist.input. Because 12UTC PREPBUFR data only includes the data from 9UTC to 15UTC, for 4D-Var you should include 18UTC PREPBUFR data as well:

> ln -fs $DAT_DIR/ob/2008020512/gdas1.t12z.prepbufr.nr  ob01.bufr
> ln -fs $DAT_DIR/ob/2008020518/gdas1.t18z.prepbufr.nr  ob02.bufr
5) Run WRF 4D-Var
> cd $WORK_DIR
> mpirun -np 4 ./da_wrfvar.exe >& wrfda.log &
运行结束后,在rsl.out中你发会发现错误提示,解决办法:具体见我发的帖子:http://bbs.06climate.com/forum.php?mod=viewthread&tid=103738
然后再去运行mpirun -np 4 ./da_wrfvar.exe >& wrfda.log &
仍然在rsl.out中会有错误提示:---- ERROR: Cannot have old input data when requesting use_theta_m=1
           CURRENT DATE          = 2008-02-05_12:00:00
           SIMULATION START DATE = 2008-02-05_12:00:00
          解决办法就是在&dynamics中加入use_theta_m=0,让它始终为0。
6)运行成功。
结果为rsl.out文件中查看。
我是初学者,学的比较皮毛,如果有什么问题,欢迎积极讨论。




rsl.out.0000

11.5 KB, 下载次数: 1, 下载积分: 金钱 -5

评分

参与人数 2金钱 +20 收起 理由
ayzqs + 10 很给力!
KIMO23 + 10 赞一个!

查看全部评分

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

新浪微博达人勋

发表于 2022-9-23 21:26:30 | 显示全部楼层
你好,楼主,我想问下,是先装wrf再装wrfda吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-9-23 21:57:40 | 显示全部楼层
lute 发表于 2022-9-23 21:26
你好,楼主,我想问下,是先装wrf再装wrfda吗?

先装WRF也行,环境还有安装成功之后装WRFDA,不过有时候可以不用装WRF,直接上手WRFDA也行。但是环境和库必须按照说明手册配置好。
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2022-9-23 22:15:49 | 显示全部楼层
任性小王子 发表于 2022-9-23 21:57
先装WRF也行,环境还有安装成功之后装WRFDA,不过有时候可以不用装WRF,直接上手WRFDA也行。但是环境和库 ...

感谢感谢,我先装一下试试
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-9-24 20:12:48 | 显示全部楼层
lute 发表于 2022-9-23 22:15
感谢感谢,我先装一下试试

好呐,按照说明手册装
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2022-9-27 14:54:34 | 显示全部楼层
任性小王子 发表于 2022-9-24 20:12
好呐,按照说明手册装

楼主我还想问一下,你是装在自己电脑上还是服务器上,如果装在自己电脑上跑起来会不会很慢?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-9-27 23:11:53 | 显示全部楼层
lute 发表于 2022-9-27 14:54
楼主我还想问一下,你是装在自己电脑上还是服务器上,如果装在自己电脑上跑起来会不会很慢?

我是在台式机上装了,在服务器上也装了,总之,装WRF不下于6次呐
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-9-28 07:44:49 | 显示全部楼层
lute 发表于 2022-9-27 14:54
楼主我还想问一下,你是装在自己电脑上还是服务器上,如果装在自己电脑上跑起来会不会很慢?

个人建议,如果装自己电脑上,处理器核数多一点也行,不过跑基本的就可以,如果数据量大,最好装到服务器上。有服务器干嘛不用呐
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2024-4-6 21:22:13 | 显示全部楼层
任性小王子 发表于 2022-9-28 07:44
个人建议,如果装自己电脑上,处理器核数多一点也行,不过跑基本的就可以,如果数据量大,最好装到服务器 ...

经过多次运行案例结果表明,最好装到服务器上。台式机涉及到内存问题和核数使用问题,服务器上最佳。
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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