I got this error while preparing emission files for CMAQ. I am using gfortran and openmpi with netdcf-4.1.3. Below is this error message:
“SFILE” opened as OLD:READ-ONLY
File name “/home/catalyst/Desktop/Build_WRF/LIBRARIES/meic12/projected/combined_anth2/egts_meic_anthropogenic.20160131.ncf”
File type GRDDED3
Execution ID “???”
Grid name “36km”
Dimensions: 79 rows, 95 cols, 7 lays, 45 vbles
NetCDF ID: 65536 opened as READONLY
Starting date and time 2016031:000000 (0:00:00 Jan. 31, 2016)
Timestep 010000 (1:00:00 hh:mm:ss)
Maximum current record number 25
new species find from file 2
nvars is 57
variables name isPMFINE PMFINE
new species find from file 2
nvars is 58
variables name isSULF SULF
Record 1 of file 2
free(): invalid next size (normal)
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
What script? And are you using the COMBINE program created by EPA, or did you write your own? You will need to post more details.
What version of gfortran are you using? If it is old, get a newer version.
Assuming you are using the EPA COMBINE program, recompile the COMBINE program in debug mode. (Uncomment set MakeFileOnly in bldit_combine.csh, execute that script, then cd to the BLD directory and type “make DEBUG=TRUE”).
Rerun. What is the error message then?
According to the log file you posted, the segmentation fault occurred while reading (READ3) in data from one of the two input files. Probably it was due to the inconsistency of the array size intended to be read and data size available in the file. Please take a look at your combine_all program and make sure there is no array size issue.
When you combine (or merge) emission files, the same variable in various files should have the same unit. For example, if NO unit is mol/s in one file and Mgmol/grid in another file, you need to pre-process the second file to get mol/s emissions before combining.
Dear @dazhong.yin,
Thanks so much for your response.
Truly, the units of the variables in REAS2 files are mol/s (gas) and g/s (PMs) while that of the MEIC file is Mgmol/grid. I don’t know how to process the MEIC files to get the same units with REAS2 files.
Secondly, MEIC file has 7 layers while REAS2 file has only 1 layer. Could this also cause problem?
Furthermore, I don’t know how to check combine_all program as it’s a code and I am not the one that wrote it.
It is missing pthread library. Combining data is kind of a light job so you don’t need to take advantage of threads. Hence I suggest to remove anything related to thread in your built process.