WRF模式运行及后处理简介-大气所于恩涛
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
interval_seconds history_interval – frames_per_outfile – restart = .true. restart_interval
同 namelist.wps 结果文件输出频率 每个结果文件保存多少时次 是否重启运行 输出重启文件的间隔
namelist.input (续)
/
there is more…
geogrid – 设置区域,生成静态数据
> ./geogrid.exe * 生成 geo_em.d01.nc * “Successfulቤተ መጻሕፍቲ ባይዱcompletion of geogrid.” 运行成功
Ungrib 准备强迫场资料
• 强迫场可以使用在分析或全球模式结果. • 需要指定合适的Vtable来解压grib1&grib2数 据
http://wrfportal.org/DomainWizard.html
WRF运行
• 流程
– 运行 real.exe (生成WRF运行所需的输入资 料) – 运行 wrf.exe
• 都使用namelist.input来控制
namelist.input
&time_control run_days run_hours run_minutes run_seconds start_year 2007 , start_month start_day start_hour start_minute start_second end_year 2007 , end_month end_day end_hour end_minute end_second
WPS&WRF下载与解压
1. 下载 WRFV3.2.1.TAR.gz 和 WPSV3.2.1.TAR.gz
>wget
http://www.mmm.ucar.edu/wrf/src/WRFV3.2.1.TAR.gz >wget http://www.mmm.ucar.edu/wrf/src/WPSV3.2.1.TAR.gz
“Successful completion of ungrib.” 说明运行
metgrid
> metgrid.exe
“Successful completion of metgrid.”
...Output ...
met_em.d01.2007-09-02_00:00:00.nc met_em.d01.2007-09-03_00:00:00.nc …….
可用于业务和科研
由包括NCEP、NCAR、NOAA等多家政府机构、 科研机构及大学合作开发与更新 采用F90语言,模块化代码编写,便于新模块耦 合与更新
哪些人使用WRF? • 大气科学家(动力过程,物理过程,
天气气候研究) • 天气气候业务预报人员
• 气象应用(空气质量,水文)
WRF应用领域:
• ARW&NMM – 物理过程/参数化研究 – 个例模拟
&domains time_step time_step_fract_num time_step_fract_den max_dom s_we e_we s_sn e_sn s_vert e_vert num_metgrid_levels dx dy grid_id parent_id i_parent_start j_parent_start parent_grid_ratio parent_time_step_ratio = 360,
namelist.input (续)
&physics mp_physics [Microphysics] = 1 , 1 , ra_lw_physics [Longwave rad] = 1 , 1 , ra_sw_physics [Shortwave rad] = 1 , 1 , radt [Radiation time step; min] = 60 , 10 , sf_sfclay_physics [Surface layer] = 1 , 1 , sf_surface_physics [Surface] = 1 , 1 , bl_pbl_physics [Boundary layer] = 1 , 1 , bldt [Boundary layer time step; min]= 0, 0, cu_physics [cumulus scheme] = 1 , 0 , cudt [cumulus time step; min] = 5 , isfflx = 1, ifsnow = 0, icloud = 1, surface_input_source = 1, num_soil_layers = 5 , mp_zero_out = 0 ,
WRF compile(1)
WRF compile(2)
如编译成功,则会生成可执行文件
Tips: 1. 编译首先从最简单开始,即最好先从串行开始编译,编译成功再尝试 编译并行。 2. 重新编译时,./clean –a 清除所有,再开始重新编译。 WPS tip: WPS使用WRF库函数,因此WPS必须放在WRF源代码同一个目录下。
namelist.input (续)
interval_seconds input_from_file history_interval frames_per_outfile restart restart_interval = 10800 = .true., .true., = 60, 60, = 6, 6, = .false., = 5000,
2. 设置netcdf路径 2. Export NETCDF=/usr/local… (netcdf库必须由 本机编译器编译)
3 解压
3.> tar zxfv WRFV3.2.1.TAR.gz > tar zxfv WPSV3.2.1.TAR.gz
WRF configure
生成configure.wrf文件
wrf.exe
• real.exe 生成文件:
– wrfbdy_d01 and wrfinput_d01 (NetCDF files)
– 多个区域 wrfinput会有多个 – SST update则会有wrflowinp • > mpirun -np 4 wrf.exe &
结果文件: wrfout_d01* rsl.out/rsl.error*
= 0, = 1,
= = = = = = = 27 = 1, 1, 1, 100, 259, 1, 1, 76, 199, 1, 1, 31, 31, 1, 94, 1, 91, 1, 31,
= 60000, 12000, 333, = 60000, 12000, 333, = 1, 2, 3, = 0, 1, 2, = 0, 53, 30, = 0, 65, 30, = 1, 3, 3, = 1, 3, 3,
• Microphysics (mp) scheme每个区域必须一致,但cumulus (cu) schemes各个区域可以不同 • 不同的组合结果可能不同,但也可能一些组合模式无法运行,需要 多多尝试
real
> mpirun -np 2 real.exe > tail –f rsl.out.0000 --> extrapolating TEMPERATURE near sfc: i,j,psfc, p target d01 2007-09-03_12:00:00 forcing artificial silty clay loam LAND CHANGE = 0 WATER CHANGE = 0 d01 2007-09-03_12:00:00 Timing for processing 0 s. LBC valid between these times 2007-09-03_09:00:00.0000 2007-09-03_12:00:00 d01 2007-09-03_12:00:00 Timing for output 0 s. d01 2007-09-03_12:00:00 Timing for loop # 13 = 0 s. d01 2007-09-03_12:00:00 real_em: SUCCESS COMPLETE REAL_EM INIT
– 天气预报系统研究
– 数据同化
• ARW
– 区域气候模拟
– 耦合大气化学
– 全球模拟 – Idealized模拟
实例
2000-2009中国地区夏季降水模拟
DOWNLOAD&COMPILE MODEL
Download source code Compile WRF Compile WPS
= 0, = 0, = 0, = 0, = 2007 , 09 , 09 , = 02 , 02 , = 00 , 00 , = 00, 00, = 00, 00, = 2007 , = 09 , 09 , = 03 , 03 , = 12 , 12 , = 00, 00, = 00, 00, =
For start_*, end_*, one column per domain
namelist.wps
&share wrf_core = 'ARW', max_dom = 1, start_date = '2007-09-02_00:00:00','2007-09-02_00:00:00', end_date = '2007-09-03_12:00:00','2007-09-03_12:00:00', interval_seconds = 21600, io_form_geogrid = 2, /
WRF后处理
推荐
http://www.mm m.ucar.edu/wrf /OnLineTutoria l/Graphics/NC L/index.html
NCL
load “$NCARG_ROOT/lib/ncarg/nclscripts/ csm/gsn_code.ncl" load “$NCARG_ROOT/lib/ncarg/nclscripts/ wrf/WRFUserARW.ncl" begin a = addfile("./geo_em.d01.nc","r") wks = gsn_open_wks("pdf","plt_ter5") res = True res@MainTitle = "GEOGRID FIELDS” pltres = True mpres = True ter = wrf_user_getvar(a,"HGT_M",0) res@cnFillOn = True res@ContourParameters = (/0.,1000.,50./) contour = wrf_contour(a,wks,ter,res) plot = wrf_map_overlays(a,wks,(/contour/),\ pltres,mpres) end
WPS compile
SETUP & RUN MODEL
WPS
• 流程 – (1) 设定domain,准备静态数据 • geogrid.exe – (2) 解压强迫场资料(GFS, NAM...) • ungrib.exe – (3) 将静态数据和强迫场资料转为WRF需要格 式 • metgrid.exe • 所有设定通过namelist.wps
• start_date, end_date 一个区域一列 • interval_seconds是强迫场资料的时间间隔
namelist.wps (续)
&geogrid parent_id = 1, 1, parent_grid_ratio = 1, 3, i_parent_start = 1, 53, j_parent_start = 1, 65, e_we = 100, 259, e_sn = 76, 199 geog_data_res = '2m','2m', dx = 60000, dy = 60000, map_proj = 'lambert', ref_lat = 35, ref_lon = 105.5, truelat1 = 30.0, truelat2 = 60.0, stand_lon = 105.0, geog_data_path = 'geog'
WRF模式运行及后处理 简介
竺可桢-南森国际研究中心 于恩涛 2010-9-9 yetsyu@mail.iap.ac.cn
报告提纲
1
2 3 4
• WRF模式简介 • 模式编译 • 模式设置及运行 • 后处理
WRF 是?
WRF: Weather Research and Forecasting Model