Piggy_Packages V2026.1 帮助文档(四)WRF区域模式降尺度

张开发
2026/4/9 22:31:01 15 分钟阅读

分享文章

Piggy_Packages V2026.1 帮助文档(四)WRF区域模式降尺度
在上一节中我们运行了第一个WRF区域模式。运行完成之后我们通过可视化工具看到了一次大范围的降水过程。我们想要对这次降水过程进行更加精细化的模拟。WRF在运行时支持直接设置多层嵌套。但是有时我们已经运行完了d01想要直接计算d02以节省计算资源或者我们有多个需要关注的子区域这时通过ndown.exe进行区域模式降尺度运行是一种更好的办法。首先我们回到Home目录创建一个名称为Case2的目录并进入。cd mkdir -p Case2 cd Case2将WPS模块拷贝到当前目录。进入WPS目录修改namelist.wps配置文件。cp /pp_model/WRF-4.7.1/WPS . cd WPS open -e namelist.wps这回我们创建一个d02区域。清空原始内容将以下内容复制进去sharewrf_core ARW,max_dom 2,start_date 2026-03-29_00:00:00, 2026-03-29_00:00:00,end_date 2026-03-31_00:00:00, 2026-03-31_00:00:00,interval_seconds 10800/geogridparent_id 1, 1,parent_grid_ratio 1, 3,i_parent_start 1, 25,j_parent_start 1, 15,e_we 50, 52,e_sn 50, 52,geog_data_res lowres, lowres,dx 81000,dy 81000,map_proj lambert,ref_lat 30.0,ref_lon 110.0,truelat1 20.0,truelat2 50.0,stand_lon 108.9,geog_data_path /pp_model/WRF-4.7.1/WPS_GEOG//ungribout_format WPS,prefix FILE,/metgridfg_name FILE/保存后运行绘图命令plotgrids将会生成区域示意图检查无误后将Case1的ungrib.exe结果文件拷贝过来并重新运行geogrid.exe和metgrid.exeln -s ~/Case1/WPS/FILE* . mpirun -np 4 ./geogrid.exe mpirun -np 4 ./metgrid.exe返回到上级目录然后将WRF-Real拷贝过来并进入其中的run目录。cd .. cp /pp_model/WRF-4.7.1/WRF-Real . cd WRF-Real/run将WPS中的met_em.*链接到当前目录。ln -s ../../WPS/met_em.* .修改namelist.inputopen -e namelist.input把以下内容贴进去替换原始内容time_controlrun_days 2,run_hours 0,run_minutes 0,run_seconds 0,start_year 2026, 2026,start_month 03, 03,start_day 29, 29,start_hour 00, 00,end_year 2026, 2026,end_month 03, 03,end_day 31, 31,end_hour 00, 00,interval_seconds 10800input_from_file .true.,.true.,history_interval 10, 10,frames_per_outfile 1, 1,restart .false.,restart_interval 7200,io_form_history 2io_form_restart 2io_form_input 2io_form_boundary 2io_form_auxinput2 2/domainstime_step 120,time_step_fract_num 0,time_step_fract_den 1,max_dom 2,e_we 50, 52,e_sn 50, 52,e_vert 48, 48,dzbot 30.dzstretch_s 1.11dzstretch_u 1.10p_top_requested 5000,num_metgrid_levels 34,num_metgrid_soil_levels 4,dx 81000,dy 81000,grid_id 1, 2,parent_id 0, 1,i_parent_start 1, 25,j_parent_start 1, 15,parent_grid_ratio 1, 3,parent_time_step_ratio 1, 3,feedback 0,smooth_option 0/physicsphysics_suite CONUSmp_physics -1, -1,cu_physics -1, -1,ra_lw_physics -1, -1,ra_sw_physics -1, -1,bl_pbl_physics -1, -1,sf_sfclay_physics -1, -1,sf_surface_physics -1, -1,radt 15, 15,bldt 0, 0,cudt 0, 0,icloud 1,num_land_cat 21,sf_urban_physics 0, 0,fractional_seaice 1,/fdda/dynamicshybrid_opt 2,w_damping 0,diff_opt 2, 2,km_opt 4, 4,diff_6th_opt 0, 0,diff_6th_factor 0.12, 0.12,base_temp 290.damp_opt 3,zdamp 5000., 5000.,dampcoef 0.2, 0.2,khdif 0, 0,kvdif 0, 0,non_hydrostatic .true., .true.,moist_adv_opt 1, 1,scalar_adv_opt 1, 1,gwd_opt 0, 0,/bdy_controlspec_bdy_width 5,specified .true./grib2/namelist_quiltnio_tasks_per_group 0,nio_groups 1,/运行real.exe并将wrfinput_d02重命名为wrfndi_d02。将Case1中的wrfout文件链接过来。mpirun -np 4 ./real.exe mv wrfinput_d02 wrfndi_d02 ln -s ~/Case1/WRF-Real/run/wrfout_* .然后修改namelist.input找到 interval_seconds 将值修改为60010分钟以充分利用d01计算结果。open -e namelist.inputinterval_seconds 600运行ndown.exe。mpirun -np 4 ./ndown.exe删除链接过来的wrfout并删除d01初始场和边界条件将d02初始场和边界条件重命名为d01。修改namelist.input。rm wrfout* rm wrfbdy_d01 wrfinput_d01 mv wrfbdy_d02 wrfbdy_d01 ; mv wrfinput_d02 wrfinput_d01 open -e namelist.input修改domains将原始d02作为d01:domainstime_step 120,time_step_fract_num 0,time_step_fract_den 1,max_dom 1,e_we 52,e_sn 52,e_vert 48,dzbot 30.dzstretch_s 1.11dzstretch_u 1.10p_top_requested 5000,num_metgrid_levels 34,num_metgrid_soil_levels 4,dx 27000,dy 27000,grid_id 1,parent_id 0,i_parent_start 1,j_parent_start 1,parent_grid_ratio 1,parent_time_step_ratio 1,feedback 0,smooth_option 0/运行wrf.exempirun -np 4 ./wrf.exe【轻松时刻】运行WRF的时间会比较长为了打发时间Piggy_Packages内置了一些命令行小游戏、小组件可以体验噢。1月球跳跳车moon-buggy2204820483黑客帝国屏保Python重构版cmatrix4cowsaycowsay Hello World cowsay -b I Love WRF! cowthink Piggy is AMAZING~【教程继续】运行完成后通过可视化工具查看模拟结果Panoply wrfout_d01_2026-03-31_00:00:00同样我们计算并可视化24小时累计降水cdo -expr,precip(RAINCRAINNCRAINSH) -sub wrfout_d01_2026-03-31_00:00:00 wrfout_d01_2026-03-30_00:00:00 precip_24h_20260330.nc Panoply precip_24h_20260330.nc

更多文章