An error occurred while doing species mixing

When the combine gets to this point, I get an error. The combine will still continue, but the final merged file has a large concentration of substances, such as the O3 concentration will reach 10 to the 30th power. If I simplify the species file, e.g. there is only O3 in the file, then the resulting concentration will be normal.


SpecDef_cb6r3_ae7_aq.txt (15.9 KB)
run_combine.csh.36km.2.txt (7.3 KB)

Which step is the problem?

Looking forward to your help.

Can you please also post your full log file when running with the original SpecDef file you posted?

Given that simplifying your SpecDef file gives you reasonable results for O3 which is pulled from ACONC, the problem might be caused by some issues in the other input files referenced by SpecDef, though presumably you were able to run CMAQ with these METCRO2D and METCRO3D files, so I’m not quite sure what might be happening.

When you run with the original SpecDef file you posted, what do variables SFC_TMP and PBLH look like?

This might be tedious, but when simplifying your SpecDef file, it might be worth to go section-by-section (first, try to generate a COMBINE file with only the variables from the “Meteorology” section, then try to generate a COMBINE file with the variables from the “Meteorology” and “Gases” sections, etc.) and check each time if the variables in the COMBINE output file look reasonable even if the run doesn’t crash.

Here is the combined log file.

mylog.txt (323.9 KB)

My concentration file has 23 layers, but the APMDIAG file has only one layer. Will it be related to this?

I tried to combine only one layer of concentration files and the result is normal. The problem occurs only when I composite multiple layers.

Thanks for posting the log file and your follow-up comment.

Yes, mixing 3D and 2D files to create a 3D output file is the cause of your problem - if you want combine to generate a 3D output file (by changing the line #layer 1 in your SpecDef file to !#layer 1), all your input files need to be 3D files with the same number of layers. Otherwise, when mixing 3D and 2D files, some arrays will remain unfilled for the upper layers when combine reads 2D variables specified in the SpecDef file. If such variables are then used in any equations (like the expression containing the LOG function), these functions may cause a program error triggered by the large positive or negative uninitialized values. If they are just ‘passed through’ to the output file, the output file would contain bad values for these variables for the upper layers since they couldn’t be read from the (2D) input file.

If you want a 3D output file, the solution is to modify your SpecDef file to only reference variables for which you have 3D information available. If calculating sharp cut-off PM2.5 species is important for your work, you will have to make sure that you change your CCTM run script settings to create APMDIAG files for the same layers as your ACONC files. You would also have to remove any species from your SpecDef file that reference variables from the 2D METCRO2D file.

Please see posts 10 - 15 in this thread for an earlier discussion of the same problem.

1 Like

Thanks for the guide, I got it! !

1 Like