成都专业做网站的公司,佛山网红打卡点,百度推广关键词排名规则,在本地用dedecms做好的网站如何上传到服务器?沙尘传输模拟教程(基于wrf-chem) 文章目录 沙尘传输模拟教程(基于wrf-chem)简介实验目的wrf-chem简介 软件准备wps、wrf-chem安装conda安装ncl安装ncap安装 数据准备气象数据准备下垫面数据准备 WPS数据预处理namelist.wps的设置geogrid.exe下垫面处理ungrib.exe气象数据预处理…沙尘传输模拟教程(基于wrf-chem) 文章目录 沙尘传输模拟教程(基于wrf-chem)简介实验目的wrf-chem简介 软件准备wps、wrf-chem安装conda安装ncl安装ncap安装 数据准备气象数据准备下垫面数据准备 WPS数据预处理namelist.wps的设置geogrid.exe下垫面处理ungrib.exe气象数据预处理metgrid.exe气象插值 WRF模型运行参数设置沙尘模式选择real.exe生成气象场 wrf-chem进行沙尘侵蚀和传输模拟后处理与结果展示数据后处理结果图 参考 简介
实验目的
本实验的目的是使用 WRF-Chem 模拟和分析地表(沙漠)区域产生的沙尘的侵蚀和传输过程。通过构建一个包含沙尘侵蚀图的 WRF 域domain研究沙尘在大气中的输送和扩散情况。
我们的实验区域为中国黄河附近的沙漠研究时间为2024年7月11日-7月16日最后得到这段时间的沙尘侵蚀和传输情况。 wrf-chem简介
WRFWeather Research and Forecasting Model是一个用于大气研究和天气预报的数值模型。 WRF-Chem 是 WRF 模型的一个扩展版本它集成了大气化学和气溶胶过程的模拟功能。WRF-Chem可用于
化学过程模拟包括气态污染物、气溶胶和化学反应。气溶胶过程模拟气溶胶的生成、增长、凝结、沉降和输送。污染物传输模拟污染物在大气中的水平和垂直输送过程。反馈机制化学成分和气溶胶对气象过程的反馈如辐射和云微物理过程。
软件准备
wps、wrf-chem安装
本教程这是官方例子https://ruc.noaa.gov/wrf/wrf-chem/tutorialexercises.htm的扩充我们使用官方推荐的wrf 3.9和wps 3.9版本熟悉这个过程后可以切换为WRF V4版本。
前往网站https://www2.mmm.ucar.edu/wrf/users/download/get_sources.html下载。 参考网站https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php
按照网站给出的8个步骤依次进行测试、安装好netcdf、mpich等包最后再安装wps和wrf。 安装注意事项
1WPS安装
安装wps3.9版本在configure后会有一个configure.wps文件需要手动修改WRF_DIR参数改为wrf安装目录的相对路径。 2wrf-chem安装
安装wrf时打开bashrc设置安装过程中编译wrf-chemwrf默认是不安装的需要手动开启
#先打开环境变量
vim ~/.bashrc然后在环境变量中添加以下参数开启wrf-chem
# 启用WRF-Chem
export WRF_EM_CORE1
export EM_CORE1
export NMM_CORE0
export WRF_CHEM1
export EM_CORE1这样wrf安装完毕后wrf-chem也同时编译完成了。
conda安装
在Linux系统中安装conda前往网站https://docs.anaconda.com/miniconda/ 下载miniconda 安装过程参考官网可以选择离线和在线两种安装方式安装完成后新建一个环境
conda create -n nco_ncl_env
conda activate nco_ncl_env设置频道优先级优先使用 conda-forge 提供的包:
conda config --add channels conda-forge
conda config --set channel_priority strictncl安装
NCLThe NCAR Command Language是由美国国家大气研究中心NCAR开发的一种专门用于气象数据展示的一门语言。有多种方式可以安装我们选择最方便的conda进行安装。
conda install -c conda-forge nclncap安装
我们后面还需要用到ncap处理wrfout数据把不同颗粒大小的沙尘汇总。
ncap 是 NCO (NetCDF Operators) 工具包中的一个命令行工具用于处理 NetCDF 文件中的变量及其数据。这里我们依然可以偷懒使用conda快速安装。
conda install -c conda-forge nco数据准备
气象数据准备
前往FNL数据的官网https://rda.ucar.edu/datasets/ds083.2/选择Complete File List全气象要素包含70多种气象要素。 选择时间下载气象数据 这里我下载了2024.07.11到2024.07.16的气象数据请按照你的时间要求下载。
下垫面数据准备
前往网站https://www2.mmm.ucar.edu/wrf/users/download/get_sources_wps_geog_V3.html下载wrf v3的下垫面数据 这个下垫面数据包含有全球的地表特征包括地形高度、土地利用、土壤类型、植被指数、水体覆盖和地表反照率等也有我们这次实验需要模拟的沙尘侵蚀erodibility数据。下垫面数据大概是3G解压后大概是20个G。
WPS数据预处理
namelist.wps的设置
可以根据自己的区域和时间段进行调整下面是我的设置
sharewrf_core ARW,max_dom 1,start_date 2024-07-11_00:00:00,end_date 2024-07-16_00:00:00,interval_seconds 21600io_form_geogrid 2,
/geogridparent_id 1, parent_grid_ratio 1, i_parent_start 1, j_parent_start 1, e_we 41, e_sn 41, dx 100000,dy 100000,map_proj lambert,ref_lat 38.00,ref_lon 104.00,truelat1 35.0,truelat2 45.0,stand_lon 104.0,geog_data_path /WRF3_GEOG/geog
/ungribout_format WPS,prefix FILE,
/metgridfg_name FILEio_form_metgrid 2,
/geogrid.exe下垫面处理
cd geogridln -svf GEOGRID.TBL.ARW_CHEM GEOGRID.TBLcd .../geogrid.exe文件夹中会多一个geo_em.d0*.nc 的文件这个包含了研究区域的下垫面数据
ungrib.exe气象数据预处理
使用ungrib.exe处理数据 metgrid.exe气象插值 WRF模型运行
参数设置
namelist的具体参数可以参考官方说明由于太多这里不做说明可查看官方网站的说明https://www2.mmm.ucar.edu/wrf/users/namelist_best_prac_wrf.html time_controlrun_days 2,run_hours 0,run_minutes 0,run_seconds 0,start_year 2024,start_month 07,start_day 13,start_hour 00,start_minute 00,start_second 00,end_year 2024,end_month 07,end_day 15,end_hour 00,end_minute 00,end_second 00,interval_seconds 21600,input_from_file .true.,history_interval 60,frames_per_outfile 72,restart .false.,restart_interval 0,io_form_history 2,io_form_restart 2,io_form_input 2,io_form_boundary 2,auxinput6_inname wrfbiochemi_d01,auxinput7_inname wrffirechemi_ddomain,auxinput8_inname wrfchemi_gocart_bg_ddomain,auxinput12_inname wrf_chem_input,auxinput5_interval_m 86400,auxinput7_interval_m 86400,auxinput8_interval_m 86400,io_form_auxinput2 2,io_form_auxinput5 0,io_form_auxinput6 0,io_form_auxinput7 0,io_form_auxinput8 0,io_form_auxinput12 0,debug_level 0,auxinput1_inname met_em.ddomain.date,
/auxinput13_inname wrfchemv_ddomain,auxinput13_interval_m 86400,io_form_auxinput13 0,dfi_control
/domainstime_step 600,time_step_fract_num 0,time_step_fract_den 1,max_dom 1,s_we 1,e_we 41,s_sn 1,e_sn 41,e_vert 31,num_metgrid_levels 42,num_metgrid_soil_levels 4,dx 100000,dy 100000,grid_id 1,parent_id 0,i_parent_start 1,j_parent_start 1,parent_grid_ratio 1,parent_time_step_ratio 1,p_top_requested 5000,feedback 1,smooth_option 0,p_top_requested 5000,zap_close_levels 50,interp_type 1,t_extrap_type 2,force_sfc_in_vinterp 0,use_levels_below_ground .true.,use_surface .true.,lagrange_order 1,/sfcp_to_sfcp .true.,physicsnum_land_cat 21,mp_physics 4,progn 0,ra_lw_physics 1,ra_sw_physics 2,radt 30,sf_sfclay_physics 1,sf_surface_physics 2,bl_pbl_physics 1,bldt 0,cu_physics 5,cu_diag 1,cudt 0,ishallow 0,isfflx 1,ifsnow 1,icloud 1,surface_input_source 1,num_soil_layers 4,sf_urban_physics 0,mp_zero_out 2,mp_zero_out_thresh 1.e-12,maxiens 1,maxens 3,maxens2 3,maxens3 16,ensdim 144,cu_rad_feedback .true.,/fdda/dynamicsrk_ord 3,w_damping 1,diff_opt 1,km_opt 4,diff_6th_opt 0,diff_6th_factor 0.12,base_temp 290.damp_opt 0,zdamp 5000.,dampcoef 0.01,khdif 0,kvdif 0,non_hydrostatic .true.,moist_adv_opt 2,scalar_adv_opt 2,chem_adv_opt 2,tke_adv_opt 2,time_step_sound 4,h_mom_adv_order 5,v_mom_adv_order 3,h_sca_adv_order 5,v_sca_adv_order 3,/bdy_controlspec_bdy_width 5,spec_zone 1,relax_zone 4,specified .true.,nested .false.,/grib2/namelist_quiltnio_tasks_per_group 0,nio_groups 1,/chemkemit 1,chem_opt 401,bioemdt 0,photdt 0,chemdt 10,io_style_emissions 0,emiss_opt 3,emiss_opt_vol 0,emiss_ash_hgt 20000.,chem_in_opt 0,phot_opt 0,gas_drydep_opt 0,aer_drydep_opt 1,bio_emiss_opt 0,ne_area 0,dust_opt 1,dmsemis_opt 0,seas_opt 0,depo_fact 0.25,gas_bc_opt 0,gas_ic_opt 0,aer_bc_opt 1,aer_ic_opt 1,gaschem_onoff 0,aerchem_onoff 1,wetscav_onoff 0,cldchem_onoff 0,vertmix_onoff 1,chem_conv_tr 0,conv_tr_wetscav 0,conv_tr_aqchem 0,biomass_burn_opt 0,plumerisefire_frq 30,have_bcs_chem .false.,aer_ra_feedback 0,aer_op_opt 0,opt_pars_out 0,diagnostic_chem 0,/
沙尘模式选择
也可以试试其他沙尘传输模型在namelist.input中修改这里我选择的是dust_opt1 GOCART 沙尘方案dust_opt1 使用 GOCARTGoddard Chemistry Aerosol Radiation and Transport沙尘排放方案。 AFWA 沙尘方案dust_opt3 使用 AFWAAir Force Weather Agency沙尘排放方案。 UoC 沙尘方案dust_opt4 使用 UoCUniversity of Cologne沙尘排放方案。
real.exe生成气象场
使用命令
#使用mpich并行运行,并用nohup后台运行
nohup mpirun -np 8 ./real.exe realexe.log
#或者直接run
./real.exe#查看进度
tail -f rsl.out.0000如果计算量比较大可以用sbatch提交到超算平台进行计算。
wrf-chem进行沙尘侵蚀和传输模拟
mpirun -np 8 ./wrf.exe
#wrf.exe也可以用sbatch提交作业到超算平台上
tail rsl.out.0000运行完成。
后处理与结果展示
数据后处理
我们模拟的不同大小的沙尘相加: 使用ncap2进行汇总
ncap2 -v -s total_dustDUST_1DUST_2DUST_3DUST_4DUST_5 wrfout_d01_2024-07-13_00:00:00 dust1_all.nc结果图
我们可以用ncl直接出图也可以下载到本地用panoply查看。
1地中海区域的沙尘传输浓度图2010年某时刻 1部分中国区域的沙尘浓度分布情况2024年7月某时刻 自此实验完毕
由于我还在入门难免有不周到之处后续还会继续更新这方面的教程。
参考
官方实验地址https://ruc.noaa.gov/wrf/wrf-chem/tutorialexercises.htm
WRF/WPS V3版本:https://www2.mmm.ucar.edu/wrf/users/download/get_sources.html
WRF安装指南https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php
WPS的namelist制作与出图https://zhuanlan.zhihu.com/p/705431890
下垫面数据https://www2.mmm.ucar.edu/wrf/users/download/get_sources_wps_geog_V3.html
conda下载地址https://docs.anaconda.com/miniconda/
NCL出图https://www.ncl.ucar.edu/Download/
namelist.wps的设置https://www2.mmm.ucar.edu/wrf/users/namelist_best_prac_wps.html
namelist.input的设置https://www2.mmm.ucar.edu/wrf/users/namelist_best_prac_wrf.html