1、20102010年年8 8月月2929日日WRF模式基本结构模式基本结构 主要内容主要内容一、WPS二、WRF-3DVAR三、WRFV3四、WRF模式物理过程WRF 模式软件设计结构WPS FlowchartgeogridungribmetgridModified real/wrfWPS Program ComponentsWPS FlowchartFunctions of WPS Componentsgeogrid(WRF SI:gridgen;MM5:terrain)定义模式格点、计算格点经纬度值、地图投影因子、科氏参数等。插值静态资料到模式格点上。ungrib(WRF SI:grib_p
2、rep;MM5:pregrid)解码GRIB数据文件,读出气象场metgrid(WRF SI:hinterp;MM5:regridder)将气象场精细水平插值到模式格点。Differences between WPS and SI新的参数列表文件namelist输入的地形数据文件数据格式进行了调整。中间文件格式变了,但仍然支持以前的数据格式。输出的文件名变了。运行时减少了对perl和环境变量的依赖,使运行流程变得简单易行。Improvements:Overall与WRF模式本事的参数进行了统一运行速度快geogridandmetgrid可以并行运行输入/输出使用WRF的输入/输出函数库使用户使
3、用新数据或者变量特殊处理变得简单灵活文件目录结构简化添加了一些诊断程序Improvements:geogrid速度明显加快多种分辩率数据可以同时使用:30sec,2min,5min,and10minfortopography,landuse,andsoiltypes与WRF模式的参数列表相统一用户可以自己控制插值方法和平滑选项输入/输出使用WRF的输入/输出函数库使用户使用新数据或者变量特殊处理变得简单灵活Improvements:ungrib支持GRIB2数据格式需要的库函数:JasPer(JPEG2000“lossy”compressionlibrary)PNG(“lossless”com
4、pressionlibrary)zlib(compressionlibraryusedbyPNG)仍然支持SI/grib_prepandMM5/pregrid的中间数据文件格式Improvements:metgrid支持MPI并行运行用户自己可以控制插值方法改善了滤网插值(maskedinterpolation)方法,以及质量守恒插值方法输入/输出使用WRF的输入/输出函数库Running geogridSTEP 1:Edit namelist.wps For geogrid,only the&share and&geogrid namelists need to be edited in n
5、amelist.wpsRunning geogridSTEP 1:Edit namelist.wps&sharewrf_core=ARW,max_dom=2,io_form_geogrid=2,Running geogridSTEP 1:Edit namelist.wpsRunning geogridSTEP 1:Edit namelist.wpsRunning geogridSTEP 2:Run geogrid.exe./geogrid.exeParsed 11 entries in GEOGRID.TBLProcessing domain 1 of 2Processing XLAT and
6、 XLONGProcessing MAPFACProcessing F and EProcessing ROTANGProcessing LANDUSEFCalculating landmask from LANDUSEFProcessing HGT_M!Successful completion of geogrid.!Running geogridRunning ungribSTEP 1:Edit namelist.wpsFor ungrib,only the&share and&ungrib namelistsneedtobeeditedRunning ungribRunning ung
7、ribSTEP 2:Link the correct Vtable to the file name“Vtable”intherundirectorySome Vtables are provided with WPS in the WPS/ungrib/Variable_ Tables directory!E.g.,Vtable.GFS,Vtable.SST,Vtable.ECMWF!Ungrib always expects to find a file named Vtable inthe run directoryRunning ungribSTEP 3:Link GRIB files
8、 to the correct file namesintherundirectoryUngribalwaysexpectsGRIBfilestobenamedGRIBFILE.AAA,GRIBFILE.AAB,GRIBFILE.AAC,etc.,intherundirectory!Thelink_grib.cshscriptcanbeusedtolinkGRIBfilestothesefilenames:Running ungribSTEP 4:Run ungrib.exe ./ungrib.exe*Starting program ungrib.exe*Start_date=2006-08
9、16_12:00:00,End_date=2006-08-16_12:00:00output format is WPSPath to intermediate files is./ungrib-grib edition num 2#Inventory for date=2006-08-16 12:00:00PRES TT UU VV RH HGT-2013.0 O O O O O O2001.0 X X X X O X1000.0 X X X X X975.0 X X X X X950.0 X X X X X925.0 X X X X X900.0 X X X X XRunning ung
10、ribRunning metgridSTEP 1:Edit namelist.wps&metgridfg_name=GFS,io_form_metgrid=2,/Metgrid I/O format:Which I/O formattouseformetgridoutput?2=netCDFisrecommended.Intermediate file prefixes:Prefix(orprefixes)ofintermediatefilestointerpolatetomodeldomain.Shouldmatchprefixgiventoungrib.Running metgridSTE
11、P 3:Run metgrid.exe ./metgrib.exeProcessing domain 1 of 2Processing 2006-04-01_00GFSProcessing 2006-04-01_06GFSProcessing domain 2 of 2Processing 2006-04-01_00GFS!Successful completion of metgrid.!Running metgridWPS运行过程小结运行过程小结1、准备资料(geogNCEP)2、修改namelist.wps3、连接变量列表Vtablelnsfungrib/Variable_Tables/
12、Vtable.GFSVtable2.连接GRIB文件成GRIB.?格式:link_grib.cshfnl_3.运行程序:./geogrid.exe&run_geogrid.log(不修改区域可以不运行)./ungrib.exe&run_ungrib.log./metgrid.exe&run_metgrib.logWPS Utility Programsplotgrids.exe查看模式区域格点rd_intermediate.exe查看中间文件plotfmt.exe绘制中间文件数据的图形g1print.exe,g2print.exe查看GRIB1和GRIB2数据的信息WPS Utility Pr
13、ogramsavg_sfcs.exe计算地表平均温度,在metgrid中使用,使地表温度更准确(仅用于slab方案)mod_levs.exe滤去全球模式多余的垂直数据层Plotting programsForgeogridandmetgridoutput:Use RIP4,NCL,andnew ARWpost(includingWRF2GrADS)New GUI:Domain WizardSimilartoSIGUIDevelopedbyNOAA/ESRL/GSDWeb-based utility to configure domainsandrunWPSWRFVAR 流程图流程图xb为背景场
14、yo为观测资料,B0为背景场误差,xa为得到的分析场,xlbc为侧边界;蓝色框为运行程序。1 编译编译下载地址:http:/www.mmm.ucar.edu/wrf/users/wrfda/download/get_source.html以WRFDA3.2版为例:下载:WRFDAV3.2.tar.gz解压:gunzipcWRFDAV3.2.tar.gz|tarxvf设置:./configurewrfda选择合适的编译选项编译:./compileall_wrfvar2 观测资料预处理观测资料预处理输入数据为MM5LITTLE_R格式,可以由观测报经gts_decoder解报得到。编译成功后生成
15、WRFDA/var/obsproc/src/obsproc.exe运行修改namelist.obsprocobs_gts_filename=文件名time_window_min=数据窗口开始时间time_analysis=分析时间time_window_max=数据窗口结束时间&record7和&record8是区域设置部分,修改和模式运行区域一致执行obsproc.exe,输出文件obs_gts_2010-08-26_00:00:00.3DVAR查看观测资料分布查看观测资料分布cdMAP_plotmake编辑Map.csh,给出obs_gts.3dvar的路径和分析时间setTIME_WIN
16、DOW_MIN=2010082523setTIME_ANALYSIS=2010082600setTIME_WINDOW_MAX=2010082601setOBSDATA=./obs_gts_2010-08-26_00:00:00.3DVAR运行后得到gmeta.2010082600。用ncarg工具idt查看。3 生成背景场误差生成背景场误差需要几个月的WRF模式运行输出数据(只需要12h和24h预报场)数据目录及文件名格式如下:-rw-r-r-1users115564922008020512/wrfout_d01_2008-02-06_00:00:00-rw-r-r-1users115564
17、922008020512/wrfout_d01_2008-02-06_12:00:00-rw-r-r-1users115564922008020600/wrfout_d01_2008-02-06_12:00:00-rw-r-r-1users115564922008020600/wrfout_d01_2008-02-07_00:00:00-rw-r-r-1users115564922008020612/wrfout_d01_2008-02-07_00:00:00-rw-r-r-1users115564922008020612/wrfout_d01_2008-02-07_12:00:00cdWRF
18、DA/var/scripts/gen_be编辑gen_be_wrapper.ksh设置一些参数exportWRFVAR_DIR=$HOME/WRFDAexportSTART_DATE=2008020612#thefirstperturbationvaliddateexportEND_DATE=2008020700#thelastperturbationvaliddateexportNUM_LEVELS=40#e_vert-1exportBIN_TYPE=5exportFC_DIR=$HOME/expt/fc#wherewrfforecastsareexportRUN_DIR=$HOME/exp
19、s/friendlies/gen_be$BIN_TYPE运行gen_be_wrapper.ksh,在$RUN_DIR中生成be.dat背景场误差文件。4 运行运行WRFVAR建立运行目录:mkdirrun_wrfvar链接文件:ln-sfWRFDA/run/LANDUSE.TBL./LANDUSE.TBLln-sf$DAT_DIR/rc/2008020512/wrfinput_d01./fgln-sfWRFDA/var/obsproc/obs_gts_2010-08-26_00:00:00.3DVAR./ob.asciiln-sf$DAT_DIR/be/be.dat./be.datln-sfW
20、RFDA/var/da/da_wrfvar.exe./编译运行参数文件:namelist.input需要修改的变量见右侧运行da_wrfvar.exe生成文件名为wrfvar_outputanalysis_date=2008-02-05_12:00:00.0000,time_window_min=2008-02-05_11:00:00.0000,time_window_max=2008-02-05_13:00:00.0000,start_year=2008start_month=02,start_day=05,start_hour=12,end_year=2008,end_month=02,e
21、nd_day=05,end_hour=12,e_we=90,e_sn=60,e_vert=41,dx=60000,dy=60000,mp_physics=3,ra_lw_physics=1,ra_sw_physics=1,radt=60,sf_sfclay_physics=1,sf_surface_physics=1,bl_pbl_physics=1,cu_physics=1,cudt=5,num_soil_layers=5mp_zero_out=2,co2tf=0,5 更新边条件更新边条件cdWRFDA/var/test/update_bc输入文件wrfvar_outputWRFVAR分析w
22、rfbdy_d01原边条件wrfinput_d01原初始条件编辑运行参数parame.inwrfvar_output_file=wrfvar_outputwrf_bdy_file=wrfbdy_d01wrf_input=wrfinput_d01运行./da_updatebc.exe后,更新wrfbdy_d01WRFV3 结构图结构图Running WRFStep1:LinkorcopyWPSoutputfilestotherundirectory:cd WRFV3/test/em_realln-s./././WPS/met_em.d01.*.Running WRFStep2:Editnamel
23、ist.input file操作手册操作手册微物理参数化微物理参数化&physicsmp_physics(max_dom)此选项设置微物理过程方案,默认值为0。目前的有效选择值为:=0,不采用微物理过程方案=1,Kessler方案(暖雨方案)=2,Lin等的方案(水汽、雨、雪、云水、冰、冰雹)=3,WSM3类简单冰方案=4,WSM5类方案=5,Ferrier(newEta)微物理方案(水汽、云水)=6,WSM6类冰雹方案=8,Thompson等方案=98,NCEP3类简单冰方案(水汽、云/冰和雨/雪)(将放弃)=99,NCEP5类方案(水汽、雨、雪、云水和冰)(将放弃)积云参数化方案积云参数化
24、方案&physicscu_physics(max_dom)此选项指定积云参数化方案,默认值为0。有效选择值有:=0,不采用积云参数化方案=1,浅对流Kain-Fritsch(newEta)方案=2,Betts-Miller-Janjic方案=3,Grell-Devenyi集合方案=4,简化Arakawa-Schubert方案=99,老Kain-Fritsch方案边界层参数化方案边界层参数化方案&physicsbl_pbl_physics(max_dom)此选项指定边界层方案,默认值为0。有效选择值有:=0,不采用边界层方案=1,YSU方案=2,EtaMellor-Yamada-JanjicTK
25、E(湍流动能)方案=3,NCEPGlobalForecastSystemscheme=99,MRF方案辐射参数化方案辐射参数化方案&physicsra_lw_physics(max_dom)此选项指定长波辐射方案,默认值为0。有效选择值如下:=0,不采用长波辐射方案=1,rrtm方案=99,GFDL(Eta)长波方案(semi-supported)ra_sw_physics(max_dom)此选项指定短波辐射方案,默认值为0。有效选择值如下:=0,不采用短波辐射方案=1,Dudhia方案=2,Goddard短波方案=99,GFDL(Eta)短波方案(semi-supported)命名规则命名规
26、则module_yy_xxx.F (module)yy=ra is for radiation bl is for PBL cu is for cumulus mp is for microphysics.xxx =individual scheme Example module_cu_kf.FRunning WRFStep3:Runthereal-datainitializationprogram:./real.exe&out.log&wrfinput_d01wrfbdy_d01Running WRFStep3:Runthemodelexecutablebytyping:./wrf.exe&
27、wrf.out&wrfout_d01_2008-08-28_00:00:00wrf:SUCCESSCOMPLETEWRF有用的资源有用的资源资料网址:WRFV3源程序网址http:/www.mmm.ucar.edu/wrf/users/download/get_source.htmlWRFV3操作说明网址http:/www.mmm.ucar.edu/wrf/users/tutorial/201001/ncargncl源程序http:/www.earthsystemgrid.org/home.htmNETCDF源程序https:/www.unidata.ucar.edu/software/netcdf/NCEP再分析资料http:/nomad3.ncep.noaa.gov/ncep_data/index.htmlhttp:/dss.ucar.edu/datasets/ds083.2/NCEP实时预报资料ftp:/ftp.ncep.noaa.gov/pub/data/nccf/com/gfs/prodECMWF资料http:/data.ecmwf.int/data/有用的资源有用的资源交流论坛:动力论坛:http:/ 谢