Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Segmentation fault with real.exe and MOZCART

varun1490

New member
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 on this previous post but did not work for me Segmentation fault using real.exe with MOZART chemistry.
 

Attachments

  • namelist.input
    10.9 KB · Views: 6
  • rsl.error.0000
    1.8 KB · Views: 2
  • rsl.out.0000
    9.6 KB · Views: 0
Hi all,

It seems that this is also a problem with other Moz[c]art variants (101, 112, 201, 202,...).
I tried WRFv4.5.[1,2], compiled with ifort and gfortran, and I got the same errors.
This problem ist also discussed here: Segmentation fault using real.exe with MOZART chemistry.
The error occured in module_input_chem_data, subr.make_chem_profile (file module_input_chem_data.F, line 845).
For moz[c]art chemistry the values of the index array iref are not assigned.
For some other chemistry variants iref is assigned in subr.setup_gasprofile_maps,
but for variants of moz[c]art there is only the message: "setup_profile_maps: nothing done for..."
I don't think it makes sense to try out the values of iref (and other arrays) assigned for other chemistry variants.
We need a serious solution from the experts at NCAR.

Matthias
.
 
I have discussed this in wrf-chem group and I have found out that we only need to run real with no chemistry and then mozbc. And wrf.exe and it work fine.
 
Unfortunately this does not work for me. real.exe with chem_opt=0 will only shift the problems to the wrf.exe

#=running real.exe with chem_opt=202:
forrtl: severe (408): fort: (3): Subscript #4 of the array STOR has value 0 which is less than the lower bound of 1
==> module_input_chem_data: Subroutine make_chem_profile

#=running real.exe with chem_opt=0: real_em: SUCCESS COMPLETE REAL_EM INIT (as expected)
# AND THEN running wrf.exe with chem_opt=202:
forrtl: severe (408): fort: (3): Subscript #1 of the array XL has value 0 which is less than the lower bound of 1
==> module_input_chem_data: SUBROUTINE bdy_chem_value


The indices of some arrays (STOR, XL) are defined in these routines with the values of iref.
...in subr.make_chem_profile: stor(i,k,j,is) with is=iref(l-1)
...in subr.bdy_chem_value: xl(irefcur,kx+1-k) with irefcur=iref(nch-1)
For some chem_opt values the array iref is assigned in SUBROUTINE setup_gasprofile_maps, but not for moz[c]art chemistry.
With moz[c]art, however, the values are never assigned to iref (except for the default initial value, which depends on the compiler option and is 0 in my case).
> .....
> select case(chem_opt)
> .....
> case (MOZCART_KPP)
> call wrf_debug("setup_profile_maps: nothing done for mozcart_kpp")
> case (T1_MOZCART_KPP)
> call wrf_debug("setup_profile_maps: nothing done for t1_mozcart_kpp")
> case (MOZART_MOSAIC_4BIN_KPP)
> call wrf_debug("setup_profile_maps: nothing done for mozart_mosaic_4bin_kpp")
> case (MOZART_MOSAIC_4BIN_AQ_KPP)
> call wrf_debug("setup_profile_maps: nothing done for mozart_mosaic_4bin_aq_kpp")
> ...

I don't think it makes sense to try out the values for other chemistry options (radm, racm, saprc,...) without knowing whether they are also valid for moz[c]art.
I would be happy to get a a serious solution for useful values from iref.
 
Top