Issue about CCTM in CMAQv5.3.1

Dear all,
When I try to run CMAQv5.3.1 with my emission file, the CMAQ model crashed with the following error info. Can anyone help me with this issue?
I have also attached my run scripts and log files.

serial_test_1274822.txt (58.7 KB)
CTM_LOG_000.v531_intel_test_2012_4kmCA_20120713.txt (56.9 KB)

forrtl: severe (27): too many records in I/O statement, unit -5, file Internal Formatted Write
Image PC Routine Line Source
CCTM_v531.exe 000000000094200B for__io_return Unknown Unknown
CCTM_v531.exe 000000000098D7B1 for_write_int_fmt Unknown Unknown
CCTM_v531.exe 00000000005F9446 Unknown Unknown Unknown
CCTM_v531.exe 00000000005ECAE8 Unknown Unknown Unknown
CCTM_v531.exe 00000000005FE170 Unknown Unknown Unknown
CCTM_v531.exe 000000000067A536 Unknown Unknown Unknown
CCTM_v531.exe 000000000060ABCE Unknown Unknown Unknown
CCTM_v531.exe 0000000000603EA3 Unknown Unknown Unknown
CCTM_v531.exe 00000000006026AE Unknown Unknown Unknown
CCTM_v531.exe 000000000040F8A2 Unknown Unknown Unknown
libc-2.17.so 00002AAB5537A555 __libc_start_main Unknown Unknown
CCTM_v531.exe 000000000040F7A9 Unknown Unknown Unknown

Thanks!
Ryan

@hogrefe.christian @cgnolte @cjcoats @lizadams

Hi Ryan,

I found the following after doing a google search.

Perhaps this will help others diagnose what is going on.

Liz

When I use the CCTM with debug mode, I get the following results:
Processing Day/Time [YYYYDDD:HHMMSS]: 2012195:000000
Which is Equivalent to (UTC): 0:00:00 Friday, July 13, 2012
Time-Step Length (HHMMSS): 000230
forrtl: severe (27): too many records in I/O statement, unit -5, file Internal Formatted Write
Image PC Routine Line Source
CCTM_v531.exe 0000000001A1AD8B Unknown Unknown Unknown
CCTM_v531.exe 0000000001A66531 Unknown Unknown Unknown
CCTM_v531.exe 0000000000E31A1A emis_defn_mp_chec 2245 EMIS_DEFN.F
CCTM_v531.exe 0000000000DD1D66 emis_defn_mp_emis 1239 EMIS_DEFN.F
CCTM_v531.exe 0000000000D8076A emis_defn_mp_emis 209 EMIS_DEFN.F
CCTM_v531.exe 0000000001005006 vdiff_ 266 vdiffproc.F
CCTM_v531.exe 0000000000E78F3E sciproc_ 232 sciproc.F
CCTM_v531.exe 0000000000E5FB67 cmaq_driver_ 679 driver.F
CCTM_v531.exe 0000000000E580E8 MAIN__ 96 cmaq_main.F
CCTM_v531.exe 000000000040FCA2 Unknown Unknown Unknown
libc-2.17.so 00007F0105BC3555 __libc_start_main Unknown Unknown
CCTM_v531.exe 000000000040FBA9 Unknown Unknown Unknown

I would look at the emission control namelist file: EmissCtrl_*.nml that is in your BLD directory and make sure that the contents matches your emissions input files.
Line 2245 contains:

2242          ! Check for Time Units
2243          X = X + 2
2244          IF ( UNITS(X:) .EQ. 'S' .OR. UNITS(X:) .EQ. 'S-1' .OR.
2245      &        UNITS(X:) .EQ. 'SEC'.OR.UNITS(X:) .EQ. 'SEC-1' .OR.

Line 1239 contains

1236 ! Write Out All Available Stream Families to the Log File
1237          WRITE( LOGDEV, '(/,5x,A)' ),'|> Emission Stream Family Definitions:'
1238          WRITE( LOGDEV, '(5x,A)'   ),'======================================'
1239          WRITE( LOGDEV,'(8x,A19,15x,A)' ),'Stream Family Label','Stream Family Members'

Perhaps the error occurred when trying to write out the Emission Stream Family Definitions?

Line 209 contains

205 C Map the Emissions Species Available on the Input Files To the
 206 C Surrogates Identified by the User via the Namelists and Stop the model
 207 C or Print Warnings if Mistakes Are Made.
 208 
 209          CALL EMIS_SPC_MAP( JDATE, JTIME )

Hi Liz,
Thanks for your further clarification. However, I didn’t revise my EmissCtrl_.nml after compiling it. I have attached my EmissCtrl_.nml file here. Could you please have a look at it?
EmissCtrl_saprc07tic_ae7i_aq.nml.txt (32.9 KB)

I think lines 2245-2250 in CMAQv5.3.1 contain the following block

     WRITE( XMSG,'(A,A16,A,/,I3,A11,A16,A,/,A)' ),
 &              'ERROR: Surrogate Species ',TRIM(SPEC),' on emission stream ',
 &              ISRM, ' has units ',TRIM(UNITS),' which are unkown to CMAQ. ',
 &              'Please correct them to proceed.'
        CALL LOG_MESSAGE( OUTDEV, XMSG )
        STOP

This points to units in one or more of your emission files that aren’t known to CMAQ (e.g. not moles/s, g/s, etc.), and somehow the formatting of these unknown-to-CMAQ units trips up the formatted writing of this error message. If this formatted write hadn’t failed, CMAQ would have exited with the message shown above, pointing to the unknown units and species. I don’t know why the formatted write failed, but the underlying reason are unknown emission units.

To solve this, please check the units of all variables in your emission files, even for non-emission variables you might have in your files. CMAQ currently expects all variables contained in emission files to be emission variables and exits if any of them has units not recognized as valid emission units.

2 Likes

Good catch – I suspect this is exactly what is going on. It’s a syntax error in the source, which could be fixed by getting rid of the slash (/) new-record directives. And that is then hiding the underlying error in the model-setup, which is probably what Christian Hogrefe indicates.

Hi all,
Thanks a lot for all kind support. I have successfully solved this issue and Christian’s solution works for me. There is a wrong variable unit in the emission file. After making the correction, the model runs perfectly.

With regards,
Ryan

@Ryan , I’m glad you were able to find the problem with the emission units in your input file.

The article linked by @lizadams and the concurring statement by @cjcoats about the “/” being interpreted as new-record directive in the formatted write helped solve my confusion about why the formatted write had failed. This is something that’ll need to fixed in the CCTM code in the future.

Hi Christian,
I agree with this. Look forward to seeing the updated CCTM code in the future.