Combine only output 1 layer

Dear all,

I’m using CMAQ-combine to process CMAQ output files, but I only got 1 layer.
How can combine output all layers?

Yunqing

Hi Yunqing,

The layer(s) combined is controlled in the species definition file provided with Combine. At the top of your species definition file you should see something like this:

!#start YYYYJJJ 010000
!#end YYYYJJJ 000000
#layer 1

I believe if you change
#layer 1

to

!#layer 1

Combine will process all the layers. Please let me know if that works for you.

Wyat

3 Likes

Yes, Wyat is correct. In addition, please note that if you want to output the species defined in the SpecDef file for all layers, all the input file(s) referenced in the species equations need to have the same number of layers for meaningful output to be computed.

2 Likes

Dear Wyat,

Yes, it works! Thank you for the reply!

Yunqing

1 Like

Dear Wyat,
How do you know this? I didn’t find this explanation on CMAQ’s official website and GitHub. Where can I find the specific usage of the script? For example, enter “!” in this file,This means that this part of the code is enabled.

zhixu sun

“!” It seems to mean that this part is not enabled, that is, the program will process all layers by default. I seem to understand. But I still don’t know where to learn about this knowledge. The official GitHub uses the word “Klay”, which I really don’t understand.

It seems you already found the combine documentation, specifically this section:

 / records are comment lines
 ! records are comment lines
 # records can be used to define parameter
 #start   YYYYDDD  HHMMSS
 #end     YYYYDDD  HHMMSS
 #layer      KLAY     (default is all layers)

KLAY is shorthand for the layer number to be extracted if this record line is not commented out.

The default SpecDef files include this block:

!#start YYYYJJJ 010000
!#end YYYYJJJ 000000
#layer 1

Since the first two lines start with a “!”, they are treated as comments. The third line starts with a #, so the following number (1) instructs combine to extract layer 1, overriding the default behavior of extracting all layers.

Thank you very much
I got it!!