wrfchem/std wrfchem/std
#
Description#
VERSION HISTORY
2021-10-06 freum Moved copying namelist to native2inputs 2021-09-20 freum Removed CTDAS’ flux_optim etc. (now handled by CIF yml) 2021-09-09 freum Misc updates
Adapted ini_data to run WRF with preprocessed input data
Replaced input argument run_dir with plugin’s workdir
- 2021-08-17 freum Initial version
Based on LMDZ and TM5 plugins and CTDAS-WRF obsoper_wrfchem.rc
Some behavior is preliminary, e.g.: - Mandatory to fill ensemble member variables in wrfinput_d<nn> and wrfbdy_d01 in preprocessing instead of in cif - Mandatory to create wrfchemi-files in preprocessing
input_arguments that might need to be added (as in CTDAS’ obsoper_wrfchem.rc): - obs.column.footprint_samples_dim - no_rerun_wrf - save_wrf_step
YAML arguments#
The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:
Mandatory arguments#
- source_dir : str, mandatory
Directory like
WRF/run/
, including output ofreal.exe
, i.e.wrfbdy_d01
andwrfinput_d%02d
, both already containing tracer values.Necessary files are linked/copied (as needed) from source_dir at the start of running CIF. Files that are already present in run_dir are skipped.
namelist.input
is copied separately from path specified in argument namelist_input_file. Flux files are handled by the flux plugin.- namelist_input_file : str, mandatory
Path to namelist.input. Namelist settings that are controlled (overwritten) by CIF:
run period (start_year, …, end_second)
restart flag / interval (restart, restart_interval)
- Namelist settings necessary to run with CIF:
io_style_emissions = 2 # explicit fluxes per timestep
io_form_auxinput5 = 2 # netCDF
auxinput5_inname =
wrfchemi_d<domain>_<date>
write_hist_at_0h_rst = .true.
chem_opt = 17
emiss_opt = 17
- Recommended namelist settings:
Consider quilting to speed up i/o of history files
I only tested frames_per_auxinput5 = 1. The code is written to handle other cases as well, but this would have to be tested.
Use nudging to keep WRF meteorology close to the driving meteorology (e.g. spectral nudging)
Optional arguments#
- autoflush : bool, optional, default False
Cleans big temporary files when the simulation is done. Triggers the function
flushrun
of the model if available- periods : str, optional
Frequency for sub-simulations
- mpirun : str, optional, default “”
Command that calls
./wrf.exe
. Default is empty string, which is useful e.g. for interactive runs of small testcases. For using slurm inside a cif job, not sure about the format yet. Ultimately want something in the formatsrun -n 72 -t 10:00:00
- but need to read the resources the cif job has.
Requirements#
The current plugin requires the present plugins to run properly:
Requirement name |
Requirement type |
Explicit definition |
Any valid |
Default name |
Default version |
---|---|---|---|---|---|
domain |
False |
False |
wrfchem |
std |
|
chemistry |
True |
True |
None |
None |
|
flux |
True |
False |
wrfchem |
std |
|
latcond |
True |
False |
wrfchem |
icbc |
|
inicond |
True |
False |
wrfchem |
icbc |
YAML template#
Please find below a template for a YAML configuration:
1model:
2 plugin:
3 name: wrfchem
4 version: std
5 type: model
6
7 # Mandatory arguments
8 source_dir: XXXXX # str
9 namelist_input_file: XXXXX # str
10
11 # Optional arguments
12 autoflush: XXXXX # bool
13 periods: XXXXX # str
14 mpirun: XXXXX # str