I`m working with CMAQ v.5.3.1 and trying to run the model without emissions included. So I followed the steps from “CMAQ User Guide” and from this topic:
Unfortunately when I run CMAQ in such mode I get into segmentation fault (Program received signal SIGSEGV: Segmentation fault - invalid memory reference). What can be the reason for the problem? P.S.
Iam running CMAQ in "mpi" mode with the identical settings and it performs successful simulation on 24 h if "N_EMIS_PT" in config file is set to more than "0". I decided to turn emissions off since I want to check if concentration from BC transports well (also I dont have appropriate emission-files for my run).
Hi,
Did you compile the model by using the following setting in the bldit script?
set Debug_CCTM #> uncomment to compile CCTM with debug option equal to TRUE
Please try that, to see if human readable back tracing information will be generated in the CMAQ.log file.
Thank you very much for the advise. I did as you told and here is a new log-file. Now it can be seen that the problem is in the one of Fortran scripts:
“Error termination. Backtrace:
At line 414 of file EMIS_DEFN.F
Fortran runtime error: Assignment of scalar to unallocated array”
In script EMIS_DEFN.F on the line 414 I found this statement:
"VDEMIS_DIFF = 0.0
Sorry for this inconvenience. Please try moving that initialization line to a location a little lower in the code. Try right after this line:
IF ( N_EM_SRM .GT. 0 ) THEN
and before this one:
DO ISRM = 1,N_EM_SRM
I think this will allow the code to avoid accessing vdemis_diff in the case that it is not allocated.
Thank you very much! It works! But in addition I have also commented line 466 (“EMIS( :,1:EMLAYS ) = DTS * VDEMIS_DIFF( :,:,C,R )”) in a script “vdiffacmx.F” (located in a BLD-directory) because of an error I met during CMAQ run:
“Error termination. Backtrace:
At line 466 of file vdiffacmx.F
Fortran runtime error: Array bound mismatch for dimension 1 of array ‘emis’ (188/1)”.
After two these fixes I am able to run CMAQ without any offline emissions provided ( N_EMIS_GR=0, N_EMIS_PT=0)!
Thanks Georgy, I am upgrading the code now to put the problematic line in vdiffacmx conditional on the value of N_EM_SRM. For the problem in EMIS_DEFN, I don’t understand why you would need to roll back the changes. The variable vdemis_diff should be initialized correctly with the line moved to the new location. Can you confirm that you had to roll back both changes and not, perhaps, just the vdiffacmx change?
Frankly speaking I didnt try to roll back both changes separately. I just turned back both little fixes in EMIS_DEFN.F and vdiffacmx.F and made a successful CMAQ run with gridded emissions considered. I suppose that it has to work as you are saying but unfortunately I didnt check it. If it is still relevant I could run the model (by the middle of the week) without rolling back EMIS_DEFN.F to see how it will be going.