Error running real.exe (WRF v4.6.1) with chem_opt=112

65 views
Skip to first unread message

orfeas karathanas

unread,
Mar 14, 2025, 11:46:08 AMMar 14
to wrf-chem
Hello group,

I am a new user of WRF-Chem model and I would like your help.
I have compiled WRF (compile option =34/ dmpar GNU) coupled with KPP. I need to run my model with chem_opt=112
(MOZART Chemistry and GOCART aerosols (MOZCART) using KPP library). Running ./real.exe without chemistry (chem_opt=0)
is succesful, producing the wrf_bdy, wrfinput* files.

Also my wrfbiochemi_* files have been succesfully created. I am facing an error turning chemistry on (chem_opt=112) and running ./real.exe.
(rsl.error is attached). By choosing another chem_opt (e.g. 120), real.exe runs succefully. Probably there is an issue in my namelist.input (attached) but
I can't spot it, even if I 've read the users guide.

Finally my env.sh is also attached. (if needed)

Thanks in advance.
Orfeas
env.sh
rsl.error.0000
namelist.input

Gabriele Pfister

unread,
Mar 14, 2025, 12:21:50 PMMar 14
to orkara...@hotmail.com, wrf-chem
Hello Orfeas

looking at your namelist.input I see that you are using gocart background fields. These are only needed for aerosol only schemes. However, when you use chem_opt=112 then you will not need those since  gas phase chemistry is solved by the MOZART-4 mechanism. 
Below is an example namelist from our forecast runs which hopefully helps with providing some guidance on how to set the namelist.input. Note that for this setup we are not starting from a wrfinput file but using the model output from a previous cycle; so you will not use the auxinput12 entries. 

Gabi

&time_control
 start_year                          = 2023, 2014, 2014,
 start_month                         = 06,   04,   04,
 start_day                           = 07,   18,   18,
 start_hour                          = 00,   00,   12,
 start_minute                        = 00,   00,   00,
 start_second                        = 00,   00,   00,
 end_year                            = 2023, 2014, 2014,
 end_month                           = 06,   04,   04,
 end_day                             = 09,   21,   21,
 end_hour                            = 00,   00,   12,
 end_minute                          = 00,   00,   00,
 end_second                          = 00,   00,   00,
 interval_seconds                    = 10800,
 input_from_file                     = .true.,.true.,.true.,
 history_interval                    = 360,  60,   60,
 frames_per_outfile                  = 1, 24, 1000,
 restart                             = .false.,
 restart_interval                    = 720,
 io_form_history                     = 2
 io_form_restart                     = 2
 io_form_input                       = 2
 io_form_boundary                    = 2
 iofields_filename                   = my_file_d01_shawn_NDOWN.txt, my_file_d02.txt
 ignore_iofields_warning             = .true.,
 debug_level                         = 0
 auxinput5_inname                    = 'wrfchemi_<hour>z_d<domain>',
 io_form_auxinput5                   = 2,
 frames_per_auxinput5                = 12,
 auxinput5_interval_m                = 60,
 auxinput7_inname                    = 'wrffirechemi_d<domain>_<date>',
 io_form_auxinput7                   = 2,
 frames_per_auxinput7                = 1,
 auxinput7_interval_m                = 60
 auxinput6_inname                    = 'wrfbiochemi_d<domain>',
 io_form_auxinput6                   = 2,
 auxinput6_interval_d                = 90,
 auxinput12_inname                  = 'wrf_chem_input',
 io_form_auxinput12                  = 2,
 auxhist1_outname                    = 'wrfout_hourly_d<domain>_<date>'
 auxhist1_interval_m                 = 60,
 io_form_auxhist1                    = 2,
 frames_per_auxhist1                 = 1,
 /

 &domains
 time_step                           = 15,
 time_step_fract_num                 = 0,
 time_step_fract_den                 = 1,
 max_dom                             = 1,
 e_we                                = 390,    154,   94,
 e_sn                                = 230,    136,    91,
 e_vert                              = 43,    43,    43,
 p_top_requested                     = 5000,
 num_metgrid_levels                  = 50,
 num_metgrid_soil_levels             = 4,
 dx                                  = 12000, 4000,  3333.33,
 dy                                  = 12000, 4000,  3333.33,
 grid_id                             = 1,     2,     3,
 parent_id                           = 0,     1,     2,
 i_parent_start                      = 1,     157,    30,
 j_parent_start                      = 1,     163,    30,
 parent_grid_ratio                   = 1,     3,     3,
 parent_time_step_ratio              = 1,     3,     3,
 feedback                            = 1,
 smooth_option                       = 0,
 eta_levels                          = 1.0,0.999,0.996,0.992,0.985,0.975,0.963,
                                       0.949,0.932,0.913,0.891,0.864,0.843,
                                       0.824,0.808,0.793,0.783,0.773,0.758,
                                       0.739,0.711,0.666,0.599,0.530,0.465,
                                       0.406,0.354,0.322,0.297,0.278,0.262,
                                       0.249,0.238,0.228,0.216,0.2,0.178,
                                       0.152,0.121,0.09,0.059,0.028,0.0,
 
 interp_type                         = 1,
 lowest_lev_from_sfc                 = .false.,
 lagrange_order                      = 1,
 force_sfc_in_vinterp                = 1,
 zap_close_levels                    = 500,
 sfcp_to_sfcp                        = .false.,
 adjust_heights                      = .false.,
 /

 &physics
 mp_physics                          = 8,     8,     3,
 ra_lw_physics                       = 4,     4,     1,
 ra_sw_physics                       = 4,     4,     1,
 radt                                = 12,    12,    30,
 sf_sfclay_physics                   = 1,1,     1,
 sf_surface_physics                  =  2,2,     2,
 bl_pbl_physics                      = 1, 1,  1,
 bldt                                = 0,     0,     0,
 cu_physics                          = 3, 3,     0,
 !physics_suite = 'conus',
 cudt                                = 0,     0,     5,
 cu_diag                             = 1, 1,
 cugd_avedx = 1
 isfflx                              = 1,
 ifsnow                              = 1,
 icloud                              = 1,
 surface_input_source                = 1,
 num_soil_layers                     = 2,
 num_land_cat                        = 21,
 sf_urban_physics                    = 0, 0,     0,
 mp_zero_out                         = 2,
 mp_zero_out_thresh                  = 1.e-12,
 maxiens                             = 1,
 maxens                              = 3,
 maxens2                             = 3,
 maxens3                             = 16,
 ensdim                              = 144,
 sst_update                          = 0,
 /

 &fdda
 /

 &dynamics
 tracer_opt                          = 3,      3
 tracer_adv_opt                      = 4,      4
 use_theta_m                         = 0
 rk_ord                              = 3,
 w_damping                           = 1,
 diff_opt                            = 1,      1,      1,
 km_opt                              = 4,      4,      4,
 diff_6th_opt                        = 0, 0,      0,
 diff_6th_factor                     = 0.05,   0.05,   0.12,
 base_temp                           = 290.
 damp_opt                            = 3,
 zdamp                               = 5000.,  5000.,  5000.,
 dampcoef                            = 0.15,    0.15,    0.2
 khdif                               = 0,      0,      0,
 kvdif                               = 0,      0,      0,
 non_hydrostatic                     = .true., .true., .true.,
 chem_adv_opt                        = 2,2 ,      1,
 moist_adv_opt                       = 2,2 ,      1,
 scalar_adv_opt                      = 2,2 ,      1,
 do_avgflx_em                        = 1,      1,
 tke_adv_opt                         = 2, 2
 /

 &bdy_control
 spec_bdy_width                      = 5,
 spec_zone                           = 1,
 relax_zone                          = 4,
 specified                           = .true., .false.,.false.,
 nested                              = .false., .true., .true.,
 /

 &grib2
 /

 &namelist_quilt
 nio_tasks_per_group = 0,
 nio_groups = 0,
 /

 &chem
 kemit                               = 10,
 chem_opt                            = 112,    112,  112,
 bioemdt                             = 2,      2,    2,
 photdt                              = 30,     30,   30,
 chemdt                              = 2,     1,   0.5,
 emiss_inpt_opt                      = 111,    111,  111,
 emiss_opt                           = 8,     8,    8,
 io_style_emissions                  = 1,
 chem_in_opt                         = 1,      1,    1,
 phot_opt                            = 4,      4,    4,
 gas_drydep_opt                      = 1,      1,    1,
 aer_drydep_opt                      = 1,      1,    1,
 aer_drydep_opt                      = 1,      1,    1,
 bio_emiss_opt                       = 3,      3,    3,
 gas_bc_opt                          = 1,    1,   1,
 gas_ic_opt                          = 1,    1,   1,
 aer_bc_opt                          = 1,    1,   1,
 aer_ic_opt                          = 1,    1,   1,
 gaschem_onoff                       = 1,      1,     1,
 aerchem_onoff                       = 1,      1,     1,
 wetscav_onoff                       = 1,      1,     1,
 cldchem_onoff                       = 0,      0,     0,
 vertmix_onoff                       = 1,      1,     1,
 chem_conv_tr                        = 1,      0,     0,
 conv_tr_wetscav                     = 1,      0,     1,
 conv_tr_aqchem                      = 1,      0,     1,
 seas_opt                            = 2,
 dust_opt                            = 1,
 dmsemis_opt                         = 1,
 biomass_burn_opt                    = 2,      2,     2,
 plumerisefire_frq                   = 60,     60,    60,
 have_bcs_chem                       = .true., .true., .true.,
 have_bcs_upper                      = .false., .false., .false.,
 aer_ra_feedback                     = 1,       1,   1,
 aer_op_opt                          = 1,
 ne_area                             = 500,
 opt_pars_out                        = 1,
 scale_fire_emiss                    = .true.,
 have_bcs_tracer                     = .true., .true.
 is_full_tuv                         = .false.
 has_o3_exo_coldens                  = .true.
 pht_cldfrc_opt                      = 2
 cld_od_opt                          = 2
 /
--
================================
Gabriele Pfister
Atmospheric Chemistry Observations & Modeling (ACOM) Lab
NSF National Center for Atmospheric Research (NCAR)
Email: pfi...@ucar.edu
Work Phone: +1 303 497 2915
Web: https://staff.ucar.edu/users/pfister

orfeas karathanas

unread,
Mar 17, 2025, 8:59:47 AMMar 17
to wrf-chem, pfi...@ucar.edu, wrf-chem, orfeas karathanas
Dear Gabriele,

Thank you for your response.

I made some changes to my namelist.input file, based on yours, mainly in &phys and &chem. 
Unfortunately, once again real.exe with chem_opt=112 didn't run and I got the same error.

My new namelist.input file is also attached 

Thank you once again.
Orfeas
namelist.input

Gabriele Pfister

unread,
Mar 17, 2025, 1:43:25 PMMar 17
to orfeas karathanas, wrf-chem
Hi Orfeas

since you have already run real.exe without chemistry and created your wrfinput and wrfbdy, you not necessary would have to run it again. 
I assume though you have set chemical initial and boundary conditions (e.g. using the mozbc tool) and also created your wrfchemi* and wrffirechemi* files. If so, have you tried running wrf.exe? I suggest also setting debug_level = 12 (or higher). This way your log files will include more details on any potential errors. 

Gabi

orfeas karathanas

unread,
Mar 18, 2025, 2:41:45 PMMar 18
to wrf-chem, pfi...@ucar.edu, wrf-chem, orfeas karathanas
Hello Gabriele,

I really appreciate your help. I followed your guidelines and did not run real.exe with chem_opt=112. 
I have created the wrfinput* and wrfbdy files by running real.exe with chem_opt=0. The wrfbiochemi_d0* and wrfchemi_d0* files have been created, and the chemical initial and boundary conditions have been set using the mozbc tool. 

Additionally, wrf_season_wes_usgs_d0* and exo_coldens_d0* have been created. Finally, I ran wrf.exe (mpirun -n 36) and encountered the errors attached (debug_level=0,12). Of course, my namelist is also attached.  

Many thanks.
Orfeas


--
Orfeas Karathanasopoulos
Research Fellow | PhD(c)

Institute for Environmental Research and Sustainable Development (IERSD)
National Observatory of Athens (NOA) | Department of Chemistry, University of Crete (UoC)

rsl.error.0000
rsl.error_debug_level_12.0000
namelist.input

Gabriele Pfister

unread,
Mar 19, 2025, 10:02:33 AMMar 19
to orfeas karathanas, wrf-chem
Hi Orfeas

unfortunately the log file does not tell much. Have you tried running a single domain only, maybe it is a memory issue? You might also want to set the debug level even higher, maybe that provides more information. 
If you are using a newer version of WRF-Chem, you will also need to set mozart_ph_diag =1 in your namelist. See here for more information. 

Gabi
Reply all
Reply to author
Forward
0 new messages