Trying to run the nonpoint sector scripts from EPA’s 2016v2 emissions platform. I get the following error:
*File "SRGPRO_PATH" opened for input on unit: 94*
Unexpected data type encountered in header of the file*
*** ERROR ABORT in subroutine RDSRGHDR*
Problem with processing grid information*
This error occurs when trying to process the area source inventories from Mexico/Canada. Any thoughts? Looked at the MEX_11_NOFILL.txt file and nothing obvious jumps out at me in that gridding surrogate file.
Can you please provide the log file from the Grdmat program?
We haven’t seen that error before. This may be a SMOKE compilation issue, or maybe something in that file triggers an error only on specific platforms.
Have you run any other sectors successfully, in particular the other Canada/Mexico sectors which use surrogates (othar, onroad_can, onroad_mex)?
Since the error seems to be with that specific file (MEX_11_NOFILL), try wiping out the entire header of that file except for the first line which starts with #GRID (that line is the only part of the header which is truly necessary), in case there is something weird about the header which causes problems only on specific platforms.
No, any other sectors that use the Canada/Mexico surrogates all crash at the same spot. I tried wiping out the header (except for #GRID) and the same error still occurred unfortunately.
We compiled SMOKE with a Portland group compiler, as an FYI.
Have you tried any of the precompiled SMOKE versions from EPA? They are released with each of our modeling platforms.
I had the same problem when running the 2019 NEI for the Canada/Mexico sectors.
It shows the program can’t prase the head line of “MEX_11_NOFILL.txt” correctly. I printed out the SEGMENT(1) to SEGMENT(16) and found SEGMENT(16) = 40.000000^M, which triggers “IF ( .NOT. CHKREAL( SEGMENT( 16 ) ) ) EFLAG = .TRUE.”.
The ^M is often seen at the ends of lines in Windows made text files (dos format).
The solution is converting the dos format text file to an unix format file (which marks the end of line using $, not ^M$) using the unix command:
dos2unix -ascii -437 MEX_11_NOFILL.txt MEX_11_NOFILL.txt
The ^M can’t be found using vim editor but will become visible by using cat -A MEX_11_NOFILL.txt | less or type :set ff? when open with vim and it will show dos as the file format.
Have you tried running dos2unix on the surrogate files? Than can often correct an issue like this.
Please reply with whether that fixes your problem.
Yes, that worked. I only had to run dos2unix for the MEX_11_NOFILL surrogate file. Thanks Zhiyong!!