WRF namelists配置生成器
项目描述
wrfconf
用于从结构化YAML文件生成WRF配置的命令行工具。
此包的目的是能够以可扩展的方式轻松生成WRF和WPS namelists。Namelists是从配置文件生成的,这些配置文件可以受源控制并包含不在namelist中存在的附加元数据
快速开始
可以使用pip安装wrfconf
pip install wrfconf
在生成WRF和WPS namelists之前,需要有一个描述时间、域和物理设置的yaml文件。这可以使用Python或其他脚本语言生成,或者手动编辑。一旦有了配置文件,就可以通过以下方式生成namelist.input和namelist.wps:
- ::
wrfconf create ../examples/run.yml
配置文件
在examples/run.yml中包含了一个示例YAML文件
--- meta: owner: Jared Lewis email: jared@jared.kiwi.nz run_name: test run_info: start_date: '2006-08-16_12:00:00' run_hours: 36 max_dom: 2 domain: parent_id: [1, 1] parent_grid_ratio: 1, 3, i_parent_start: 1, 34, j_parent_start: 1, 25, e_we: [ 85, 73] e_sn: [ 93, 79] dx: [36000, 12000] dy: [36000, 12000] map_proj: 'lambert' ref_lat: -41.276 ref_lon: 169.228 ref_x: 42.5 ref_y: 46.5 truelat1: -41.276 truelat2: -41.276 stand_lon: 169.228 geog_data_res: ['10m','2m'] wps: share: wrf_core: ARW interval_seconds: 10800 io_form_geogrid: 2 geogrid: geog_data_path: '/mnt/data/WRF/WPS_GEOG' opt_geogrid_tbl_path: 'geogrid/' ungrib: out_format: 'WPS' prefix: 'FILE' metgrid: fg_name: 'FILE' io_form_metgrid: 2 wrf: time_control: interval_seconds: 10800 input_from_file: [True, True, True, True] history_interval: [ 60, 60, 60, 60] frames_per_outfile: [ 1000, 1000, 1000, 1000] restart: False, restart_interval: 5000, io_form_history: 2 io_form_restart: 2 io_form_input: 2 io_form_boundary: 2 debug_level: 0 domains: time_step: 180 time_step_fract_num: 0 time_step_fract_den: 1 p_top_requested: 5000 num_metgrid_levels: 32 num_metgrid_soil_levels: 4 feedback: 1 smooth_option: 0 physics: mp_physics: [ 3, 3, 3, 3] ra_lw_physics: [ 1, 1, 1, 1] ra_sw_physics: [ 1, 1, 1, 1] radt: [ 30, 30, 30, 30] sf_sfclay_physics: [ 1, 1, 1, 1] sf_surface_physics: [ 2, 2, 2, 2] bl_pbl_physics: [ 1, 1, 1, 1] bldt: [ 0, 0, 0, 0] cu_physics: [ 1, 1, 0, 0] cudt: [ 5, 5, 5, 5] isfflx: 1, ifsnow: 1, icloud: 1, surface_input_source: 3, num_soil_layers: 4 num_land_cat: 21 sf_urban_physics: [ 0, 0, 0, 0] dynamics: w_damping: 0, diff_opt: [ 1, 1, 1, 1] km_opt: [ 4, 4, 4, 4] diff_6th_opt: [ 0, 0, 0, 0] diff_6th_factor: 0.12, 0.12, 0.12, 0.12 base_temp: 290. damp_opt: 0, zdamp: [5000., 5000., 5000., 5000.] dampcoef: [0.2, 0.2, 0.2, 0.2] khdif: [ 0, 0, 0, 0] kvdif: [ 0, 0, 0, 0] non_hydrostatic: [ True, True, True, True] moist_adv_opt: [ 1, 1, 1, 1] scalar_adv_opt: [ 1, 1, 1, 0] bdy_control: spec_bdy_width: 5, spec_zone: 1, relax_zone: 4, specified: [True, False,False,False] nested: [False, True, True,True] namelist_quilt: nio_tasks_per_group: 0, nio_groups: 1,
这些配置文件中有几个顶级键
meta
本节包含有关运行的元数据,不会影响生成的namelists。任何有效的YAML都可以包含在本节中
run_info
特定于此次运行的特定信息,例如开始时间和运行长度
domain
域特定信息
wps
覆盖WPS文件中的任何属性。本节遵循与WPS文件中相同的结构和命名约定
WRF
覆盖WRF配置文件中的任何属性。本节遵循与WRF配置文件相同的结构和命名约定
开发设置
git clone https://github.com/lewisjared/wrfconf.git cd wrfconf python setup.py develop
项目详情
关闭
wrfconf-0.5.2.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | bab5668796765c1ad8edfecfff20665b49698cc83cb41a26efb07c65fffd773a |
|
MD5 | eb762d4661f77f1d943b98b19915e002 |
|
BLAKE2b-256 | 291c134ee07233ff1211cbe76eb59a3a6ee33e70edc1f391546dcc7d0b5a85c6 |