WRF官网案例运行01

11 篇文章 28 订阅

WRF官网案例运行01


本案例为WRF官网2001年1月的默认案例 (官网参考链接

安装好WRF之后开始进行WRF模式运行

WRF的预处理系统(WPS)

熟悉一下wps三个程序组成模块的作用(为模拟准备输入场)

(1)geogrid:确定模式区域并把静态地理数据插值到格点。

(2)ungrib:从GRIB格式的数据中提取气象要素场。

(3)metgrid:把提取出的气象要素场水平插值到由geogrid确定的网格点上。

0 运行geogrid.exe

首先我们要从WRF官网上下载静态地理数据
Static geography data
WRF建模系统能够创建理想的模拟,尽管大多数用户对实际数据案例感兴趣。 要启动实际数据案例,必须创建域在地球上的物理位置以及该位置的静态信息。
这需要一个数据集,其中包括地形和土地用途分类等字段。 移至Build_WRF目录,下载文件并解压缩。 解压缩文件为“ geog”文件夹,将其重命名为“ WPS_GEOG”。
The tar file can be found at:
geog_complete.tar.bz2
geog_10m.tar.gz

不wget了,直接下载放到Build_WRF文件夹下面解压

tar -zxvf geog_10m.tar.gz

把解压出来的geog文件夹改名字成WPS_GEOG

mv geog WPS_GEOG

The directory infomation is given to the geogrid program in the namelist.wps file in the &geogrid section. The complete data expands to approximately 10 GB. This data allows a user to run the geogrid.exe program.

修改namelist.wps静态地理数据的打开路径

xiaomo@ubuntu:~/Build_WRF$ cd WPS
xiaomo@ubuntu:~/Build_WRF/WPS$ nano namelist.wps

终端在WPS目录下输入nano namelist.wps (非root用户需要输入密码) 或者vi namelist.wps 进入编辑模式。

将max_dom后的嵌套修改为1。

将geog_data_path后面的路径修改为静态地理数据的储存路径
我的是把geog_data_path = ‘/glade/p/work/wrfhelp/WPS_GEOG/’
改成geog_data_path = ‘/home/xiaomo/Build_WRF/WPS_GEOG/’

保存后退出(ctrl+s,ctrl+x)

接着输入

./geogrid.exe

完成后会生成一个静态文件geo_em.d01.nc (如果有错误可以查看geogrid.log寻找error)

这时候可能遇到地理数据不全的情况:

xiaomo@ubuntu:~/Build_WRF/WPS$ ./geogrid.exe
Parsed 28 entries in GEOGRID.TBL
Processing domain 1 of 1
ERROR: Could not open /home/xiaomo/Build_WRF/WPS_GEOG/orogwd_10m/con/index
application called MPI_Abort(MPI_COMM_WORLD, 22077) - process 0

这时候就缺啥补啥,哪里不会点哪里哈哈哈,如上面的例子就是缺少orogwd_10m文件

https://www2.mmm.ucar.edu/wrf/users/download/get_sources_wps_geog.html这个网址下载相应数据即可

我少了不少,网又不好,下载了好久┭┮﹏┭┮,看下面这一个个的,还只是一部分!!!

xiaomo@ubuntu:~/Build_WRF/WPS$ ./geogrid.exe
Parsed 28 entries in GEOGRID.TBL
Processing domain 1 of 1
ERROR: Could not open /home/xiaomo/Build_WRF/WPS_GEOG/lai_modis_10m/index
application called MPI_Abort(MPI_COMM_WORLD, 21953) - process 0
xiaomo@ubuntu:~/Build_WRF/WPS-4.1$ ./geogrid.exe
Parsed 28 entries in GEOGRID.TBL
Processing domain 1 of 1
ERROR: Could not open /home/xiaomo/Build_WRF/WPS_GEOG/maxsnowalb_modis/index
application called MPI_Abort(MPI_COMM_WORLD, 22056) - process 0
xiaomo@ubuntu:~/Build_WRF/WPS-4.1$ ./geogrid.exe
Parsed 28 entries in GEOGRID.TBL
Processing domain 1 of 1
ERROR: Could not open /home/xiaomo/Build_WRF/WPS_GEOG/orogwd_10m/con/index
application called MPI_Abort(MPI_COMM_WORLD, 22077) - process 0
xiaomo@ubuntu:~/Build_WRF/WPS$ ./geogrid.exe

好在最后成功了:

xiaomo@ubuntu:~/Build_WRF/WPS$ ./geogrid.exe
Parsed 28 entries in GEOGRID.TBL
Processing domain 1 of 1
  Processing XLAT and XLONG
  Processing MAPFAC
  Processing F and E
  Processing ROTANG
  Processing LANDUSEF
  Calculating landmask from LANDUSEF ( WATER =  17  21 )
  Processing HGT_M
  Processing SOILTEMP
  Processing SOILCTOP
  Processing SCT_DOM
  Processing SOILCBOT
  Processing SCB_DOM
  Processing ALBEDO12M
  Processing GREENFRAC
  Processing LAI12M
  Processing SNOALB
  Processing CON
  Processing VAR
  Processing OA1
  Processing OA2
  Processing OA3
  Processing OA4
  Processing OL1
  Processing OL2
  Processing OL3
  Processing OL4

  Optional fields not processed by geogrid:
    VAR_SSO (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/varsso_10m/')
    LAKE_DEPTH (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/lake_depth/')
    URB_PARAM (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/NUDAPT44_1km/')
    FRC_URB2D (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/urbfrac_nlcd2011/')
    IMPERV (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/nlcd2011_imp_ll_9s/')
    CANFRA (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/nlcd2011_can_ll_9s/')
    EROD (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/erod/')
    CLAYFRAC (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/clayfrac_5m/')
    SANDFRAC (priority=1, resolution='default', path='/home/xiaomo/Build_WRF/WPS_GEOG/sandfrac_5m/')

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  Successful completion of geogrid.        !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

完成后会生成一个静态文件geo_em.d01.:
在这里插入图片描述

或者用ncview 软件查看.

#安装ncview
xiaomo@ubuntu:~/Build_WRF/WPS$ sudo apt install ncview
[sudo] password for xiaomo: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic
  linux-image-5.4.0-42-generic linux-modules-5.4.0-42-generic
  linux-modules-extra-5.4.0-42-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libaec0 libhdf5-103 libnetcdf15 libsz2 libudunits2-0 libudunits2-data
The following NEW packages will be installed:
  libaec0 libhdf5-103 libnetcdf15 libsz2 libudunits2-0 libudunits2-data ncview
0 upgraded, 7 newly installed, 0 to remove and 209 not upgraded.
Need to get 434 kB/2,179 kB of archives.
After this operation, 8,539 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 ncview amd64 2.1.8+ds-3build2 [434 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 ncview amd64 2.1.8+ds-3build2 [434 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 ncview amd64 2.1.8+ds-3build2 [434 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 ncview amd64 2.1.8+ds-3build2 [434 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 ncview amd64 2.1.8+ds-3build2 [434 kB]
Fetched 15.6 kB in 5min 11s (50 B/s)
Selecting previously unselected package libaec0:amd64.
(Reading database ... 230851 files and directories currently installed.)
Preparing to unpack .../0-libaec0_1.0.4-1_amd64.deb ...
Unpacking libaec0:amd64 (1.0.4-1) ...
Selecting previously unselected package libsz2:amd64.
Preparing to unpack .../1-libsz2_1.0.4-1_amd64.deb ...
Unpacking libsz2:amd64 (1.0.4-1) ...
Selecting previously unselected package libhdf5-103:amd64.
Preparing to unpack .../2-libhdf5-103_1.10.4+repack-11ubuntu1_amd64.deb ...
Unpacking libhdf5-103:amd64 (1.10.4+repack-11ubuntu1) ...
Selecting previously unselected package libnetcdf15:amd64.
Preparing to unpack .../3-libnetcdf15_1%3a4.7.3-1_amd64.deb ...
Unpacking libnetcdf15:amd64 (1:4.7.3-1) ...
Selecting previously unselected package libudunits2-data.
Preparing to unpack .../4-libudunits2-data_2.2.26-5_all.deb ...
Unpacking libudunits2-data (2.2.26-5) ...
Selecting previously unselected package libudunits2-0:amd64.
Preparing to unpack .../5-libudunits2-0_2.2.26-5_amd64.deb ...
Unpacking libudunits2-0:amd64 (2.2.26-5) ...
Selecting previously unselected package ncview.
Preparing to unpack .../6-ncview_2.1.8+ds-3build2_amd64.deb ...
Unpacking ncview (2.1.8+ds-3build2) ...
Setting up libaec0:amd64 (1.0.4-1) ...
Setting up libudunits2-data (2.2.26-5) ...
Setting up libsz2:amd64 (1.0.4-1) ...
Setting up libhdf5-103:amd64 (1.10.4+repack-11ubuntu1) ...
Setting up libnetcdf15:amd64 (1:4.7.3-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for sgml-base (1.29.1) ...
Setting up libudunits2-0:amd64 (2.2.26-5) ...
Setting up ncview (2.1.8+ds-3build2) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...

#查看
xiaomo@ubuntu:~/Build_WRF/WPS$ ncview geo_em.d01.nc
Ncview 2.1.8 David W. Pierce  8 March 2017
http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html
Copyright (C) 1993 through 2015, David W. Pierce
Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.
This is free software licensed under the Gnu General Public License version 3; type `ncview -c' for redistribution details.

Note: could not open file /home/xiaomo/.ncviewrc for reading
Warning: Cannot convert string "-*-lucida-bold-r-*-*-14-*-*-*-*-*-*-*" to type FontStruct
X connection to :0 broken (explicit kill or server shutdown).

查看结果:
在这里插入图片描述

1 运行./ungrib.exe

在与WPS同级别目录下创建DATA文件夹

将从官网下载的JAN00_GFS_FNL.tar.gz文件放在其目录下.

解压文件

tar -zxvf JAN00_GFS_FNL.tar.gz

链接Variable_Table文件,运行ungrib.exe,解码GRIB数据,提取气象场。

首先通过一个数据文件运g1print

xiaomo@ubuntu:~/Build_WRF/WPS$ ./util/g1print.exe ../DATA/JAN00/fnl_20000124_12_00.grib1
#运行结果:
Copen: File = ../DATA/JAN00/fnl_20000124_12_00.grib1                                                                                  
Fortran Unit = 0
UNIX File descriptor: 3

----------------------------------------------------
 rec GRIB GRIB  Lvl  Lvl  Lvl         Time      Fcst
 Num Code name  Code one  two                   hour
----------------------------------------------------
   1   7 HGT      100 1000    0  2000-01-24_12:00 + 00
   2   7 HGT      100  975    0  2000-01-24_12:00 + 00
   3   7 HGT      100  950    0  2000-01-24_12:00 + 00
   4   7 HGT      100  925    0  2000-01-24_12:00 + 00
   5   7 HGT      100  900    0  2000-01-24_12:00 + 00
   6   7 HGT      100  850    0  2000-01-24_12:00 + 00
   7   7 HGT      100  800    0  2000-01-24_12:00 + 00
   8   7 HGT      100  750    0  2000-01-24_12:00 + 00
   9   7 HGT      100  700    0  2000-01-24_12:00 + 00
  10   7 HGT      100  650    0  2000-01-24_12:00 + 00
  11   7 HGT      100  600    0  2000-01-24_12:00 + 00
  12   7 HGT      100  550    0  2000-01-24_12:00 + 00
  13   7 HGT      100  500    0  2000-01-24_12:00 + 00
  14   7 HGT      100  450    0  2000-01-24_12:00 + 00
  15   7 HGT      100  400    0  2000-01-24_12:00 + 00
  16   7 HGT      100  350    0  2000-01-24_12:00 + 00
  17   7 HGT      100  300    0  2000-01-24_12:00 + 00
  18   7 HGT      100  250    0  2000-01-24_12:00 + 00
  19   7 HGT      100  200    0  2000-01-24_12:00 + 00
  20   7 HGT      100  150    0  2000-01-24_12:00 + 00
  21   7 HGT      100  100    0  2000-01-24_12:00 + 00
  22   7 HGT      100   70    0  2000-01-24_12:00 + 00
  23   7 HGT      100   50    0  2000-01-24_12:00 + 00
  24   7 HGT      100   30    0  2000-01-24_12:00 + 00
  25   7 HGT      100   20    0  2000-01-24_12:00 + 00
  26   7 HGT      100   10    0  2000-01-24_12:00 + 00
  27  11 TMP      100 1000    0  2000-01-24_12:00 + 00
  28  11 TMP      100  975    0  2000-01-24_12:00 + 00
  29  11 TMP      100  950    0  2000-01-24_12:00 + 00
  30  11 TMP      100  925    0  2000-01-24_12:00 + 00
  31  11 TMP      100  900    0  2000-01-24_12:00 + 00
  32  11 TMP      100  850    0  2000-01-24_12:00 + 00
  33  11 TMP      100  800    0  2000-01-24_12:00 + 00
  34  11 TMP      100  750    0  2000-01-24_12:00 + 00
  35  11 TMP      100  700    0  2000-01-24_12:00 + 00
  36  11 TMP      100  650    0  2000-01-24_12:00 + 00
  37  11 TMP      100  600    0  2000-01-24_12:00 + 00
  38  11 TMP      100  550    0  2000-01-24_12:00 + 00
  39  11 TMP      100  500    0  2000-01-24_12:00 + 00
  40  11 TMP      100  450    0  2000-01-24_12:00 + 00
  41  11 TMP      100  400    0  2000-01-24_12:00 + 00
  42  11 TMP      100  350    0  2000-01-24_12:00 + 00
  43  11 TMP      100  300    0  2000-01-24_12:00 + 00
  44  11 TMP      100  250    0  2000-01-24_12:00 + 00
  45  11 TMP      100  200    0  2000-01-24_12:00 + 00
  46  11 TMP      100  150    0  2000-01-24_12:00 + 00
  47  11 TMP      100  100    0  2000-01-24_12:00 + 00
  48  11 TMP      100   70    0  2000-01-24_12:00 + 00
  49  11 TMP      100   50    0  2000-01-24_12:00 + 00
  50  11 TMP      100   30    0  2000-01-24_12:00 + 00
  51  11 TMP      100   20    0  2000-01-24_12:00 + 00
  52  11 TMP      100   10    0  2000-01-24_12:00 + 00
  53  39 V VEL    100 1000    0  2000-01-24_12:00 + 00
  54  39 V VEL    100  975    0  2000-01-24_12:00 + 00
  55  39 V VEL    100  950    0  2000-01-24_12:00 + 00
  56  39 V VEL    100  925    0  2000-01-24_12:00 + 00
  57  39 V VEL    100  900    0  2000-01-24_12:00 + 00
  58  39 V VEL    100  850    0  2000-01-24_12:00 + 00
  59  39 V VEL    100  800    0  2000-01-24_12:00 + 00
  60  39 V VEL    100  750    0  2000-01-24_12:00 + 00
  61  39 V VEL    100  700    0  2000-01-24_12:00 + 00
  62  39 V VEL    100  650    0  2000-01-24_12:00 + 00
  63  39 V VEL    100  600    0  2000-01-24_12:00 + 00
  64  39 V VEL    100  550    0  2000-01-24_12:00 + 00
  65  39 V VEL    100  500    0  2000-01-24_12:00 + 00
  66  39 V VEL    100  450    0  2000-01-24_12:00 + 00
  67  39 V VEL    100  400    0  2000-01-24_12:00 + 00
  68  39 V VEL    100  350    0  2000-01-24_12:00 + 00
  69  39 V VEL    100  300    0  2000-01-24_12:00 + 00
  70  39 V VEL    100  250    0  2000-01-24_12:00 + 00
  71  39 V VEL    100  200    0  2000-01-24_12:00 + 00
  72  39 V VEL    100  150    0  2000-01-24_12:00 + 00
  73  39 V VEL    100  100    0  2000-01-24_12:00 + 00
  74  52 R H      100 1000    0  2000-01-24_12:00 + 00
  75  52 R H      100  975    0  2000-01-24_12:00 + 00
  76  52 R H      100  950    0  2000-01-24_12:00 + 00
  77  52 R H      100  925    0  2000-01-24_12:00 + 00
  78  52 R H      100  900    0  2000-01-24_12:00 + 00
  79  52 R H      100  850    0  2000-01-24_12:00 + 00
  80  52 R H      100  800    0  2000-01-24_12:00 + 00
  81  52 R H      100  750    0  2000-01-24_12:00 + 00
  82  52 R H      100  700    0  2000-01-24_12:00 + 00
  83  52 R H      100  650    0  2000-01-24_12:00 + 00
  84  52 R H      100  600    0  2000-01-24_12:00 + 00
  85  52 R H      100  550    0  2000-01-24_12:00 + 00
  86  52 R H      100  500    0  2000-01-24_12:00 + 00
  87  52 R H      100  450    0  2000-01-24_12:00 + 00
  88  52 R H      100  400    0  2000-01-24_12:00 + 00
  89  52 R H      100  350    0  2000-01-24_12:00 + 00
  90  52 R H      100  300    0  2000-01-24_12:00 + 00
  91  52 R H      100  250    0  2000-01-24_12:00 + 00
  92  52 R H      100  200    0  2000-01-24_12:00 + 00
  93  52 R H      100  150    0  2000-01-24_12:00 + 00
  94  52 R H      100  100    0  2000-01-24_12:00 + 00
  95  41 ABS V    100 1000    0  2000-01-24_12:00 + 00
  96  41 ABS V    100  975    0  2000-01-24_12:00 + 00
  97  41 ABS V    100  950    0  2000-01-24_12:00 + 00
  98  41 ABS V    100  925    0  2000-01-24_12:00 + 00
  99  41 ABS V    100  900    0  2000-01-24_12:00 + 00
 100  41 ABS V    100  850    0  2000-01-24_12:00 + 00
 101  41 ABS V    100  800    0  2000-01-24_12:00 + 00
 102  41 ABS V    100  750    0  2000-01-24_12:00 + 00
 103  41 ABS V    100  700    0  2000-01-24_12:00 + 00
 104  41 ABS V    100  650    0  2000-01-24_12:00 + 00
 105  41 ABS V    100  600    0  2000-01-24_12:00 + 00
 106  41 ABS V    100  550    0  2000-01-24_12:00 + 00
 107  41 ABS V    100  500    0  2000-01-24_12:00 + 00
 108  41 ABS V    100  450    0  2000-01-24_12:00 + 00
 109  41 ABS V    100  400    0  2000-01-24_12:00 + 00
 110  41 ABS V    100  350    0  2000-01-24_12:00 + 00
 111  41 ABS V    100  300    0  2000-01-24_12:00 + 00
 112  41 ABS V    100  250    0  2000-01-24_12:00 + 00
 113  41 ABS V    100  200    0  2000-01-24_12:00 + 00
 114  41 ABS V    100  150    0  2000-01-24_12:00 + 00
 115  41 ABS V    100  100    0  2000-01-24_12:00 + 00
 116  41 ABS V    100   70    0  2000-01-24_12:00 + 00
 117  41 ABS V    100   50    0  2000-01-24_12:00 + 00
 118  41 ABS V    100   30    0  2000-01-24_12:00 + 00
 119  41 ABS V    100   20    0  2000-01-24_12:00 + 00
 120  41 ABS V    100   10    0  2000-01-24_12:00 + 00
 121 154 O3MR     100  100    0  2000-01-24_12:00 + 00
 122 154 O3MR     100   70    0  2000-01-24_12:00 + 00
 123 154 O3MR     100   50    0  2000-01-24_12:00 + 00
 124 154 O3MR     100   30    0  2000-01-24_12:00 + 00
 125 154 O3MR     100   20    0  2000-01-24_12:00 + 00
 126 154 O3MR     100   10    0  2000-01-24_12:00 + 00
 127 222 5WAVH    100  500    0  2000-01-24_12:00 + 00
 128  33 U GRD    100 1000    0  2000-01-24_12:00 + 00
 129  33 U GRD    100  975    0  2000-01-24_12:00 + 00
 130  33 U GRD    100  950    0  2000-01-24_12:00 + 00
 131  33 U GRD    100  925    0  2000-01-24_12:00 + 00
 132  33 U GRD    100  900    0  2000-01-24_12:00 + 00
 133  33 U GRD    100  850    0  2000-01-24_12:00 + 00
 134  33 U GRD    100  800    0  2000-01-24_12:00 + 00
 135  33 U GRD    100  750    0  2000-01-24_12:00 + 00
 136  33 U GRD    100  700    0  2000-01-24_12:00 + 00
 137  33 U GRD    100  650    0  2000-01-24_12:00 + 00
 138  33 U GRD    100  600    0  2000-01-24_12:00 + 00
 139  33 U GRD    100  550    0  2000-01-24_12:00 + 00
 140  33 U GRD    100  500    0  2000-01-24_12:00 + 00
 141  33 U GRD    100  450    0  2000-01-24_12:00 + 00
 142  33 U GRD    100  400    0  2000-01-24_12:00 + 00
 143  33 U GRD    100  350    0  2000-01-24_12:00 + 00
 144  33 U GRD    100  300    0  2000-01-24_12:00 + 00
 145  33 U GRD    100  250    0  2000-01-24_12:00 + 00
 146  33 U GRD    100  200    0  2000-01-24_12:00 + 00
 147  33 U GRD    100  150    0  2000-01-24_12:00 + 00
 148  33 U GRD    100  100    0  2000-01-24_12:00 + 00
 149  33 U GRD    100   70    0  2000-01-24_12:00 + 00
 150  33 U GRD    100   50    0  2000-01-24_12:00 + 00
 151  33 U GRD    100   30    0  2000-01-24_12:00 + 00
 152  33 U GRD    100   20    0  2000-01-24_12:00 + 00
 153  33 U GRD    100   10    0  2000-01-24_12:00 + 00
 154  34 V GRD    100 1000    0  2000-01-24_12:00 + 00
 155  34 V GRD    100  975    0  2000-01-24_12:00 + 00
 156  34 V GRD    100  950    0  2000-01-24_12:00 + 00
 157  34 V GRD    100  925    0  2000-01-24_12:00 + 00
 158  34 V GRD    100  900    0  2000-01-24_12:00 + 00
 159  34 V GRD    100  850    0  2000-01-24_12:00 + 00
 160  34 V GRD    100  800    0  2000-01-24_12:00 + 00
 161  34 V GRD    100  750    0  2000-01-24_12:00 + 00
 162  34 V GRD    100  700    0  2000-01-24_12:00 + 00
 163  34 V GRD    100  650    0  2000-01-24_12:00 + 00
 164  34 V GRD    100  600    0  2000-01-24_12:00 + 00
 165  34 V GRD    100  550    0  2000-01-24_12:00 + 00
 166  34 V GRD    100  500    0  2000-01-24_12:00 + 00
 167  34 V GRD    100  450    0  2000-01-24_12:00 + 00
 168  34 V GRD    100  400    0  2000-01-24_12:00 + 00
 169  34 V GRD    100  350    0  2000-01-24_12:00 + 00
 170  34 V GRD    100  300    0  2000-01-24_12:00 + 00
 171  34 V GRD    100  250    0  2000-01-24_12:00 + 00
 172  34 V GRD    100  200    0  2000-01-24_12:00 + 00
 173  34 V GRD    100  150    0  2000-01-24_12:00 + 00
 174  34 V GRD    100  100    0  2000-01-24_12:00 + 00
 175  34 V GRD    100   70    0  2000-01-24_12:00 + 00
 176  34 V GRD    100   50    0  2000-01-24_12:00 + 00
 177  34 V GRD    100   30    0  2000-01-24_12:00 + 00
 178  34 V GRD    100   20    0  2000-01-24_12:00 + 00
 179  34 V GRD    100   10    0  2000-01-24_12:00 + 00
 180  11 TMP      116   30    0  2000-01-24_12:00 + 00
 181  52 R H      116   30    0  2000-01-24_12:00 + 00
 182  51 SPF H    116   30    0  2000-01-24_12:00 + 00
 183  33 U GRD    116   30    0  2000-01-24_12:00 + 00
 184  34 V GRD    116   30    0  2000-01-24_12:00 + 00
 185  11 TMP      103 1829    0  2000-01-24_12:00 + 00
 186  11 TMP      103 2743    0  2000-01-24_12:00 + 00
 187  11 TMP      103 3658    0  2000-01-24_12:00 + 00
 188  33 U GRD    103 1829    0  2000-01-24_12:00 + 00
 189  33 U GRD    103 2743    0  2000-01-24_12:00 + 00
 190  33 U GRD    103 3658    0  2000-01-24_12:00 + 00
 191  34 V GRD    103 1829    0  2000-01-24_12:00 + 00
 192  34 V GRD    103 2743    0  2000-01-24_12:00 + 00
 193  34 V GRD    103 3658    0  2000-01-24_12:00 + 00
 194   1 PRES       1    0    0  2000-01-24_12:00 + 00
 195  54 P WAT    200    0    0  2000-01-24_12:00 + 00
 196  52 R H      200    0    0  2000-01-24_12:00 + 00
 197   7 HGT        7    0    0  2000-01-24_12:00 + 00
 198  11 TMP        7    0    0  2000-01-24_12:00 + 00
 199   1 PRES       7    0    0  2000-01-24_12:00 + 00
 200 136 VW SH      7    0    0  2000-01-24_12:00 + 00
 201 131 LFT X      1    0    0  2000-01-24_12:00 + 00
 202 157 CAPE       1    0    0  2000-01-24_12:00 + 00
 203 156 CIN        1    0    0  2000-01-24_12:00 + 00
 204 132 4LFTX      1    0    0  2000-01-24_12:00 + 00
 205 157 CAPE     116  180    0  2000-01-24_12:00 + 00
 206 156 CIN      116  180    0  2000-01-24_12:00 + 00
 207   7 HGT        6    0    0  2000-01-24_12:00 + 00
 208  11 TMP        6    0    0  2000-01-24_12:00 + 00
 209   1 PRES       6    0    0  2000-01-24_12:00 + 00
 210   7 HGT        1    0    0  2000-01-24_12:00 + 00
 211   2 PRMSL    102    0    0  2000-01-24_12:00 + 00
 212  52 R H      108   44  100  2000-01-24_12:00 + 00
 213  52 R H      108   72   94  2000-01-24_12:00 + 00
 214  52 R H      108   44   72  2000-01-24_12:00 + 00
 215  52 R H      108   33  100  2000-01-24_12:00 + 00
 216  13 POT      107 9950    0  2000-01-24_12:00 + 00
 217  11 TMP      107 9950    0  2000-01-24_12:00 + 00
 218  39 V VEL    107 9950    0  2000-01-24_12:00 + 00
 219  52 R H      107 9950    0  2000-01-24_12:00 + 00
 220  10 TOZNE    200    0    0  2000-01-24_12:00 + 00
 221  33 U GRD      7    0    0  2000-01-24_12:00 + 00
 222  33 U GRD      6    0    0  2000-01-24_12:00 + 00
 223  33 U GRD    107 9950    0  2000-01-24_12:00 + 00
 224  34 V GRD      7    0    0  2000-01-24_12:00 + 00
 225  34 V GRD      6    0    0  2000-01-24_12:00 + 00
 226  34 V GRD    107 9950    0  2000-01-24_12:00 + 00
 227  11 TMP        1    0    0  2000-01-24_12:00 + 00
 228 144 SOILW    112    0   10  2000-01-24_12:00 + 00
 229 144 SOILW    112   10  200  2000-01-24_12:00 + 00
 230  11 TMP      112    0   10  2000-01-24_12:00 + 00
 231  11 TMP      112   10  200  2000-01-24_12:00 + 00
 232  65 WEASD      1    0    0  2000-01-24_12:00 + 00
 233  81 LAND       1    0    0  2000-01-24_12:00 + 00
 234  91 ICE C      1    0    0  2000-01-24_12:00 + 00
 235  11 TMP      105    2    0  2000-01-24_12:00 + 00
 236  51 SPF H    105    2    0  2000-01-24_12:00 + 00
 237 221 HPBL       1    0    0  2000-01-24_12:00 + 00
 238  71 T CDC    244    0    0  2000-01-24_12:00 + 00
 239   1 PRES     243    0    0  2000-01-24_12:00 + 00
 240   1 PRES     242    0    0  2000-01-24_12:00 + 00
 241  52 R H      105    2    0  2000-01-24_12:00 + 00
 242  33 U GRD    105   10    0  2000-01-24_12:00 + 00
 243  34 V GRD    105   10    0  2000-01-24_12:00 + 00
 244  27 GP A     100 1000    0  2000-01-24_12:00 + 00
 245  27 GP A     100  500    0  2000-01-24_12:00 + 00
 246 230 5WAVA    100  500    0  2000-01-24_12:00 + 00

***** End-Of-File on C unit   3

链接Variable_Table文件

ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable

通过脚本./link_grib.csh链接GRIB数据

./link_grib.csh ../DATA/JAN00/fnl_2000012

Note: For explanation of these variables see Chapter 3 of the WRF User’s Guide, or our Best Practice WPS Namelist web page for detailed descriptions of the namelist variables, and suggestions for best practices.

修改namelist.wps静态地理数据的开始和结束时间

终端在WPS目录下输入:

nano namelist.wps 

将namelist.wps中的时间:


 start_date = '2006-08-16_12:00:00','2006-08-16_12:00:00',
 end_date   = '2006-08-16_18:00:00','2006-08-16_12:00:00',

更改为以下:

**start_date = '2000-01-24_12:00:00',
end_date = '2000-01-25_12:00:00',**
start_date = '2000-01-24_12:00:00','2000-01-24_12:00:00',
end_date   = '2000-01-25_12:00:00','2000-01-25_12:00:00',

另外注意这两项对不对

**interval_seconds = 21600,

prefix = 'FILE',**

运行ungrib.exe

./ungrib.exe

(这里有可能报错./ungrib.exe: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory 其实就是你的libpng没有安装到它默认的路径下。解决办法如下:找到你的libpng12.so.0的安装路径,一般实在一个/lib文件夹下面。终端在WPS目录下输入以下命令:

vim /etc/ld.so.conf    
#按i进入编辑模式将libpng12.so.0的安装路径输入进去.
这是我自己的安装路径 eg:/home/xiaomo/Build_WRF/LIBRAREIES/grib2/lib 然后按住Esc再按shift+zz保存退出

接着输入命令

ldconfig

这样这个error就解决了。另一个error好象是DATA NOT FOUND,我没有遇到,可以去气象家园看看相关解决办法的帖子。

再运行

./ungrib.exe

结果如下

./ungrib.exe运行结果截取部分如下:

**********
Deleting temporary files created by ungrib...
**********

Deleting file:  ./PFILE:2000-01-24_12
Deleting file:  ./PFILE:2000-01-24_18
Deleting file:  ./PFILE:2000-01-25_00
Deleting file:  ./PFILE:2000-01-25_06
Deleting file:  ./PFILE:2000-01-25_12

**********
Done deleting temporary files.
**********

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  Successful completion of ungrib.   !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

这将创建以下文件:

FILE:2000-01-24_12

FILE:2000-01-24_18

FILE:2000-01-25_00

FILE:2000-01-25_06

FILE:2000-01-25_12

同时解码成功后会在WPS下面生成以GRIBFILE.为开头的文件。eg:GRIBFILE.AAA GRIBFILE.AAB GRIBFILE.AAC
在这里插入图片描述

运行此操作时,将自动创建一个ungrib.log文件。它包含有关输入文件中的字段以及这些字段在哪些级别可用的信息。如果此步骤中出现问题,它也有助于进行故障排除。细读此日志以确保找到 Vtable 中的所有字段。

2 运行./metgrid.exe

将输入数据插值到我们的模型域(metgrid.exe)

./metgrid.exe

The text below should appear on your screen during run time. Look for "Successful completion of metgrid " at the end of the run, indicating that all went well during the execution. A metgrid.log file containing more information will also be created, and can be useful for troubleshooting purposes if the run is not successful.

下面的文本应该在运行时出现在屏幕上。在运行结束时查看“成功完成metgrid”,表明在执行期间一切都进展顺利。还将创建一个包含更多信息的metgrid.log文件,如果运行不成功,这个文件对于排除故障非常有用。

xiaomo@ubuntu:~/Build_WRF/WPS$ ./metgrid.exe
Processing domain 1 of 1
 Processing 2000-01-24_12
    FILE
 Processing 2000-01-24_18
    FILE
 Processing 2000-01-25_00
    FILE
 Processing 2000-01-25_06
    FILE
 Processing 2000-01-25_12
    FILE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  Successful completion of metgrid.  !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Note: The following floating-point exceptions are signalling: IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

此步骤将创建以下文件

met_em.d01.2000-01-24_12:00:00.nc

met_em.d01.2000-01-24_18:00:00.nc

met_em.d01.2000-01-25_00:00:00.nc

met_em.d01.2000-01-25_06:00:00.nc

met_em.d01.2000-01-25_12:00:00.nc
在这里插入图片描述
(至此,前处理完毕)

3 运行WRF

进入WRF模式的主体 ,终端进入WRF目录下

cd test/em_real

将上一步生成的met_em.文件链接到WRF运行的路径下

ln -sf ../../../WPS/met_em.d01.2000-01* .

修改namelist.input(参照官网参数修改wrf.php),可以在文件夹下直接打开namelist.input修改,也可以用vi命令来编辑(namelist.input的存放路径在/WRF/test/em_real下)

Note 1: You should not need to make any changes, as these are the default settings, but check to ensure they are set as below

Note 2: As we are only interested in domain 1, you can ignore all values in other columns, and the model will do the same.

Note3: For explanation of these variables, in addition to some suggestions for best practices, see our Best Practice WRF Namelist page or Chapter 5 of the WRF User’s Guide.
run_days = 0,

run_hours = 12,

run_minutes = 0,

run_seconds = 0,

start_year = 2000,

start_month = 01,

start_day = 24,

start_hour = 12,

end_year = 2000,

end_month = 01,

end_day = 25,

end_hour = 12,

interval_seconds = 21600

input_from_file = .true.,

history_interval = 180,

frames_per_outfile = 1000,

time_step = 180,

max_dom = 1,

s_we = 1,

e_we = 74,

s_sn = 1,

e_sn = 61,

s_vert = 1,

e_vert = 33,

num_metgrid_levels = 27

dx = 30000,

dy = 30000,

#执行real.exe,初始化模式

./real.exe

#检查有没有出错

tail rsl.error.0000

(根据具体error修改namelist.input参数,然后再执行./real.exe。再检查有没有出错)

出错了:

xiaomo@ubuntu:~/Build_WRF/WRF/test/em_real$ tail rsl.error.0000
 metgrid input_wrf.F first_date_nml = 2000-01-24_12:00:00
d01 2000-01-24_12:00:00 Timing for input          0 s.
d01 2000-01-24_12:00:00          flag_soil_layers read from met_em file is  1
Max map factor in domain 1 =  1.03. Scale the dt in the model accordingly.
ERROR in psfc: flag_psfc =  1, flag_soilhgt =  1, flag_slp =  0, sfcp_to_sfcp = F
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    1396
not enough info for a p sfc computation
-------------------------------------------
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

可见ERROR in psfc: flag_psfc = 1, flag_soilhgt = 1, flag_slp = 0, sfcp_to_sfcp = F

解决方法:
在namelist.input文件的“domains”部分添加下面这一条即可
sfcp_to_sfcp = .true.
再次运行,成功。

(运行成功后会生成wrfbdy_d01 , wrfinput_d01两个文件)
在这里插入图片描述

运行wrf.exe

./wrf.exe

(完了后检查rsl.out.0000文件)

运行成功后会生成wrfout_d01_2000-01-24_12:00:00文件
在这里插入图片描述

Quick check of the contents of this file:

a. Use the ncdump utility:

ncdump -h wrfout_d01_2000-01-24_12:00:00    
ncdump -v Times wrfout_d01_2000-01-24_12:00:00 
(to see which forecast times are in the file)

b. Use the ncview utility.

下次写用WRF Domain Wizard来运行官网案例O(∩_∩)O

评论 52
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值