Segmentation fault with real.exe and MOZCART (Chem_opt==112 & 131)

181 views
Skip to first unread message

Varun Katoch

unread,
Jan 22, 2024, 5:20:03 PM1/22/24
to wrf-chem
I have run wrf using chem_opt=10 and it works fine but when I want to use chem_opt=112 & 131 I am facing the below error for both chemistry options.

Assume Noah LSM input
d01 2018-09-04_00:00:00 Timing for processing 0 s.
STARTING WITH BACKGROUND CHEMISTRY
Subroutine input_chem_profile:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x155554bb97c2 in ???
#1 0x155554bb8995 in ???
#2 0x155551f26d8f in ???
#3 0x275698d in ???
#4 0x275c605 in ???
#5 0x44eacd in ???
#6 0x44f68b in ???
#7 0x407400 in ???
#8 0x155551f11eaf in ???
#9 0x155551f11f5f in ???
#10 0x407434 in ???
#11 0xffffffffffffffff in ???

I have tried this solution mentioned in this previous post but did not work for me Segmentation fault using real.exe with MOZART chemistry.
rsl.out.0000
namelist.input
rsl.error.0000

Gabriele Pfister

unread,
Jan 22, 2024, 5:42:01 PM1/22/24
to varunkato...@gmail.com, wrf-chem
Hi Varun

just a few suggestions to your nameslist to see if that may help. 
  • Increase debug_level (e.g. to 100) to have more information in your logfiles. This hopefully can help with finding the error. 
  • You are having time_step = 180 sec but are using chemdt=12 min. Try running with chemdt the same as time_step (i.e. 3 minutes). 
  • You have phot_opt specified twice. I am surprised the model did not complain, but make sure to use phot_opt=4.  
  • Under &chem include: ne_area=210
  • Set cldchem_onoff = 0 
  • I am also puzzled by the setting for your fire and anthropogenic emission files. Why are you using 4320 minutes? Aren't your files hourly? 
  • For debugging try running a less complex setup, e.g. turn off lightning and aircraft emissions

For information I include an example file for chem_opt=112. 

Good luck,
Gabi


&time_control

 start_year                          = 2021, 2021, 2014, 2014,

 start_month                         = 07, 07,   04,   04,

 start_day                           = 20,20,   18,   18,

 start_hour                          = 00, 00,   00,   12,

 start_minute                        = 00,   00,   00,

 start_second                        = 00,   00,   00,

 end_year                            = 2021, 2021, 2014, 2014,

 end_month                           = 07, 07,  04,   04,

 end_day                             = 26,   26, 21,   21,

 end_hour                            = 00,  00,  00,   12,

 end_minute                          = 00,   00,   00,

 end_second                          = 00,   00,   00,

 interval_seconds                    = 10800,

 input_from_file                     = .true.,.true.,.true.,

 history_interval                    = 720,  720,   60,

 frames_per_outfile                  = 1, 1, 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.txt, my_file_d02.txt

 ignore_iofields_warning             = .true.,

 debug_level                         = 120

 auxinput5_inname                    = 'wrfchemi_d<domain>_<date>',

 io_form_auxinput5                   = 2,

 frames_per_auxinput5                = 1,

 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, 60,

 io_form_auxhist1                    = 2,

 frames_per_auxhist1                 = 1, 1,

 force_use_old_data                  = .true.

 /


 &domains

 time_step                           = 72,

 time_step_fract_num                 = 0,

 time_step_fract_den                 = 1,

 max_dom                             = 1,

 e_we                                = 390,    175,   94,

 e_sn                                = 230,    154,    91,

 e_vert                              = 43,    43,    43,

!nproc_x = 15

!nproc_y=15

 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,     105,    30,

 j_parent_start                      = 1,     96,    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,    4,    30,

 sf_sfclay_physics                   = 1,1,     1,

 sf_surface_physics                  =  2,2,     2,

 bl_pbl_physics                      = 8,8,  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

 grid_fdda                    =   1,    0,    0,

 gfdda_inname                 = "wrffdda_d<domain>",

 gfdda_end_h                  =  800,  800,   120,

 gfdda_interval_m             =  360,  360,  360,

 fgdt                         =   0,    0,    0,

 if_no_pbl_nudging_uv         =   1,    1,    0,

 if_no_pbl_nudging_t          =   1,    1,    1,

 if_no_pbl_nudging_q          =   1,    1,    1,

 if_zfac_uv                   =   0,    0,    1,

  k_zfac_uv                   =  10,   10,   10,

 if_zfac_t                    =   0,    0,    0,

  k_zfac_t                    =  10,   10,   10,

 if_zfac_q                    =   0,    0,    0,

  k_zfac_q                    =  10,   10,   10,

 guv                          = 0.0024, 0.0012, 0.0003,

 gt                           = 0.0024, 0.0012, 0.0003,

 gq                           = 0.0012, 0.0012, 0,

 if_ramping                   = 1,

 dtramp_min                   = 60.0,

 io_form_gfdda                = 2,    

 /


 &dynamics

 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,  114,

 bioemdt                             = 12,      4,    2,

 photdt                              = 12, 4,   30,

 chemdt                              = 1.2,     0.8,   0.5

 emiss_inpt_opt                      = 111, 111,   102,

 emiss_opt                           = 8, 8,   11,

 io_style_emissions                  = 2,

 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, 0,     2,

 plumerisefire_frq                   = 30,     0,    60,

 have_bcs_chem                       = .true., .false., .true.,

 have_bcs_upper                      = .false., .false., .false.,

 aer_ra_feedback                     = 0,       1,   1,

 aer_op_opt                          = 1,

 ne_area                             = 210,

 opt_pars_out                        = 1,

 scale_fire_emiss                    = .true.,

 is_full_tuv                         = .false.

 has_o3_exo_coldens                  = .true.

 pht_cldfrc_opt                      = 2

 cld_od_opt                          = 2

 chemdiag=1,1

 /


--
================================
Gabriele Pfister
Atmospheric Chemistry Observations & Modeling (ACOM) Lab
NSF National Center for Atmospheric Research (NCAR)
Email: pfi...@ucar.edu
Temporary Home Office Phone: +1 303 241 1329
Work Phone: +1 303 497 2915
Web: https://staff.ucar.edu/users/pfister

Varun Katoch

unread,
Jan 22, 2024, 6:06:51 PM1/22/24
to Gabriele Pfister, wrf-chem
Thank you for your response Gabriel.

I have a query regarding anthropogenic emissions in the WRF-Chem model.

I currently have two files, namely wrfchemi_00z_d0 and wrfchemi_12z_d0, each containing 12 hours of time steps for the first day (4th September). The former covers the initial 12 hours, while the latter includes the subsequent 12 hours of the same day.

Now, my simulation involves running the WRF-Chem model for two consecutive days, 4th and 5th September 2018. Given that I am using a 60-minute interval for anthropogenic emissions, I am unsure whether the emissions from the files pertaining to 4th September will be considered for the 5th September simulation as well.

Could you kindly provide clarification on whether the anthropogenic emissions for 4th September will extend to influence the simulation on 5th September, or if additional steps are needed to account for emissions on the latter date?

Thank you for your assistance.

Varun Katoch 

Varun Katoch

unread,
Jan 22, 2024, 6:37:54 PM1/22/24
to Gabriele Pfister, wrf-chem
Hello Gabriele

as per the suggestion, I have modified the namelist.input but getting the same error attaching the files below.


Best Regards

___________________________________________________

Varun Katoch

 

Doctoral Student

IMT Nord Europe / Centre of Education, Research and Innovation "Energy and Environment"
Douai Campus : 941 rue Charles Bourseul
CS 10838 - 59508 Douai Cedex – FRANCE

E-Mail/Skype varun....@imt-nord-europe.fr

tel : +91-978-044-8995

Google Scholar - https://scholar.google.com/citations?user=GfwWtAwAAAAJ&hl=en

___________________________________________________

Go green, avoid printing unless necessary

 


rsl.error.0000
namelist.input
rsl.out.0000

Gabriele Pfister

unread,
Jan 22, 2024, 7:20:39 PM1/22/24
to Varun Katoch, wrf-chem
Hi Varun

with io_style_emissions = 1 you specify that WRF-Chem reads in two 12-hour emission files that only include the hour. The model will cycle through these for each day. 

Gabi

Gabriele Pfister

unread,
Jan 22, 2024, 7:35:42 PM1/22/24
to Varun Katoch, wrf-chem
Hi Varun

one other thing to change is to set chem_in_opt=1 ( I assume you are having chemistry fields in your wrfinput and wrfbdy and not using an idealized profile). See https://ruc.noaa.gov/wrf/wrf-chem/Users_guide.pdf

And following up on your previous email, you will need to set io_style_emissions=1. And make sure the kemit in your emission files is indeed 10, else adjust your namelist setting. 

Also change to chemdt=3 (min), i.e. to have the same time step as you use for the 
meteorology (time_step=180sec). 

I suggest going carefully through all your namelist settings and make sure you have it configured correctly for your setup. 

Gabi

Varun Katoch

unread,
Jan 23, 2024, 3:23:21 AM1/23/24
to Gabriele Pfister, wrf-chem
Thank you Gabriele finally it works for real.exe without any error I have submitted a job on cluster to WRF to run if I get an error or if it runs successfully in bothcase will let you know.
I have a few questions
1.  As I have used chem_in_opt=1 do I need to run mozbc. 
2. What if I don't have the wrf_chem_input_d01 file then in that case I get an error as the model is searching for wrf_chem_input_d01.
3. Following 2nd question If I switch off chem_in_opt=0 then I am dealing with the previous error while running real.exe.
Reply all
Reply to author
Forward
0 new messages