In order to design a WRF4G experiment you need to edit a file called experiment.wrf4g. From this file, WRF4G will generate all WRF configuration files required to run the simulations planned for the experiment.
The configuration experiment file consists of sections, each led by a [section] header, followed by key = value entries. Allowing sections are [DEFAULT], [ensemble/tag] and [resource/resource_name]. Lines beginning with # are ignored.
The DEFAULT section provides default values for all other sections. And its key values are:
date_time = 1979-01-01_06:00:00 | 2010-12-31_18:00:00 | 36 hours | 24 hours | 36 hours
date_time = 1979-01-01_06:00:00 | 2010-12-31_18:00:00 | 36 hours | 1 days | 36 hours
date_time = 2011-08-20_12:00:00 | 2011-08-30_00:00:00 | 12 hours 2011-09-23_12:00:00 | 2011-09-29_00:00:00 | 12 hours
preprocessor_optargs = member | 0 | 1 runtime | 12 | 12
[experiment_name] `-- [realization_name] +-- log ( logs files) +-- output ( output WRF files ) +-- restart ( restart WRF files ) `-- realout ( real.exe output files )
parallel_run = mpirun -np 32 -pernode 16 --mca mpi_paffinity_alone 1
parallel_run_pernode = mpirun -pernode
Example for one domain :
namelist_values = single:ra_sw_physics | 3 single:ra_lw_physics | 3Example for one domain specifying the record :
namelist_values = physics.ra_sw_physics | 3 physics.ra_lw_physics | 3Example for two domains :
namelist_values = ra_sw_physics | 2, 2 ra_lw_physics | 2, 2
Using ensemble sections involve creating independent simulations.
Each ensemble section has to begin with the line [ensemble/tag] followed by key = value entries. This type of section allows to create independent realizations by overloading the key described in DEFAULT section, all keys expect name can be overloaded. Thus, ensemble sections are well-suited for sensitivity studies by modifying physical schemes, initial conditions and boundary conditions, and so on. The following experiment configuration example tries to show how to take advantage of this WRF4G feature by setting two ensemble sections with WRF compiled with two different compilers:
[DEFAULT] # Experiment configuration name = test # Simulation domain max_dom = 1 # Experiment time-specification # start_date | end_date | chunk_size_h date_time = 2011-08-28_12:00:00 | 2011-08-30_00:00:00 | 12 hours calendar = standard timestep_dxfactor = 6 # Running options np = 1 requirements = ARCH = "x86_64" clean_after_run = yes save_wps = no parallel_env = MPIRUN parallel_real = yes parallel_wrf = yes # Vtables must exist as Vtable.[input_extdata] extdata_vtable = GFS # Seconds between global analysis input times extdata_interval = 21600 preprocessor = default postprocessor = SFC domain_path = /home/user/repository/domains/Santander_50km extdata_path = /home/user/repository/input/NCEP/GFS output_path = /home/user/test/output # WRF-namelist parameters. Override namelist.input variables here namelist_version = 3.4.1 namelist_values = spec_bdy_width | 10 spec_zone | 1 relax_zone | 9 feedback | 0 history_interval | 180 frames_per_outfile | 3 e_vert | 28 radt | 15 mp_physics | 5 cu_physics | 1 ra_lw_physics | 1 ra_sw_physics | 1 sf_sfclay_physics | 2 bl_pbl_physics | 2 sf_surface_physics | 2 physics.topo_wind | 3 [ensemble/gfortran] app = wrf_all_in_one | bundle | /home/user/repository/apps/WRF/WRFbin-3.4.1_gfortran.tar.gz [ensemble/intel] app = wrf_all_in_one | bundle | /home/user/repository/apps/WRF/WRFbin-3.4.1_intel.tar.gz
Using resource sections do NOT involve creating independent simulations.
Each resource section has to begin with the line [resource/resource_name] followed by key = value entries. Experiment variables such as clean_after_run, save_wps, parallel_environment, parallel_real, parallel_wrf, domain_path, preprocessor, extdata_path, postprocessor, app and output_path can be defined independently on each computing resource. Therefore, realizations are able to be simulated concurrently on different resources. For instance, different resources usually have different paths :
[DEFAULT] # Experiment configuration name = test # Simulation domain max_dom = 1 # Experiment time-specification # start_date | end_date | chunk_size_h date_time = 2011-08-28_12:00:00 | 2011-08-30_00:00:00 | 12 hours calendar = standard timestep_dxfactor = 6 # Running options np = 1 requirements = ARCH = "x86_64" clean_after_run = yes save_wps = no parallel_env = MPIRUN parallel_real = yes parallel_wrf = yes # Vtables must exist as Vtable.[input_extdata] extdata_vtable = GFS # Seconds between global analysis input times extdata_interval = 21600 preprocessor = default postprocessor = SFC # WRF-namelist parameters. Override namelist.input variables here namelist_version = 3.4.1 namelist_values = spec_bdy_width | 10 spec_zone | 1 relax_zone | 9 feedback | 0 history_interval | 180 frames_per_outfile | 3 e_vert | 28 mp_physics | 4 radt | 15 ra_lw_physics | 3 ra_sw_physics | 3 [resource/name_of_resource_1] app = wrf_all_in_one | bundle | /home/user/repository/apps/WRF/WRFbin-3.4.1_r2265_gfortran.tar.gz domain_path = /home/user/repository/domains/Santander_50km extdata_path = /home/user/repository/input/NCEP/GFS output_path = /home/user/test/output [resource/name_of_resource_2] app = wrf_all_in_one | bundle | /home/user2/repository/apps/WRF/WRFbin-3.4.1_r2265_gfortran.tar.gz domain_path = /home/user2/repository/domains/Santander_50km extdata_path = /home/user2/repository/input/NCEP/GFS output_path = /home/user2/test/output
You can write a experiment.wrf4g from scratch or use the templates that WRF4G provides (e.g. single, physics or default) by typing :
$ wrf4g exp test define --from-template single $ cat ./test/experiment.wrf4g [DEFAULT] # Experiment configuration name = test # Simulation domain max_dom = 1 # Experiment time-specification # start_date | end_date | chunk_size_h date_time = 2011-08-28_12:00:00 | 2011-08-30_00:00:00 | 12 hours calendar = standard timestep_dxfactor = 6 # Running options np = 1 requirements = ARCH = "x86_64" clean_after_run = yes save_wps = no parallel_env = MPIRUN parallel_real = yes parallel_wrf = yes # Input data domain_path = /home/user/WRF4G_2_0/repository/domains/Santander_50km # Vtables must exist as Vtable.[input_extdata] extdata_vtable = GFS extdata_path = /home/user/WRF4G_2_0/repository/input/NCEP/GFS # Seconds between global analysis input times extdata_interval = 21600 preprocessor = default # Output output_path = /home/user/test/output postprocessor = SFC # app app = wrf_all_in_one | bundle | /home/user/wrf4g/repository/apps/WRF/WRFbin-3.4.1_r2265_gfortran.tar.gz # WRF-namelist parameters. Override namelist.input variables here namelist_version = 3.4.1 namelist_values = spec_bdy_width | 10 spec_zone | 1 relax_zone | 9 feedback | 0 history_interval | 180 frames_per_outfile | 3 e_vert | 28 mp_physics | 4 radt | 15 ra_lw_physics | 3 ra_sw_physics | 3