Species index-CMAQ-5.3.1

Hi everyone,
I am using CMAQ-5.3.1 and working on adding a new module to use BRO profile. I am stuck in finding out the CGRID function index for the species. The CGRID function is CGRID(COL,ROW,LAYER,SPCIES). I checked the RXNS_DATA file and tried the cgrid index of species in this file but it does not work properly. Does anyone know how to find out the right index of a specific species? Could you help with this index problem?
Thanks!
Lin

Hi,
Species are stored in CGRID in the order they appear in the species namelist files in the MECHS folders. The order starts with Gases (GC namelist), then aerosols (AE namelist), nonreactive species (NR namelist) and finally tracers (TR namelist).

If your BRO species are all gases, then they should have indices equal to their position on the GC namelist. For aerosols, it’s a bit more complicated because CGRID includes an index for air density after the last gas species and before the first aerosol species.

Best wishes,
Ben

Good morning Ben,
I am still kind of confused after trying what you said. I checked the species orders in the GC namelist file and the GAS_CHEM_SPC order in the RXNS_DATA file, it seems the orders are not exactly the same(i checked the racm2_ae6_aq mechanism). The order of the first 134 species are the same, but from 135, this is not the case. The CHEMISTRY_SPC and CGRID_INDEX speices orders are also different from the GC namelist species order. It seems the gas speices orders in NUMB_MECH_SPC and in GC namelist are the same. The CHEMISTRY_SPC and CGRID_INDEX orders are the same.
Do you know why this is the case?
Thanks!
Lin

Hi Lin,
This question needs to go to @bhutzell. There are nuances to the chemical mechanism mapping and definition that I may not be able to articulate very well.
Best regards,
Ben

GAS_CHEM_SPC is the GC and NR species that take part in a mechanism reactions listed in the mech_${MECHANISM}.def. Its order of these species type is determined by when a species first occurs in the reactions list.

CHEMISTRY_SPC is the GC, NR and AE species that take part in a mechanism reactions. Its order of species is determined by when a species first occurs in the reactions list.

In both SPC arrays, CGRID_INDEX gives where the species is located in the CGRID array.

Thanks for your help! That totally makes sense! :+1: :+1:
So does this mean the species number in CGRID(COLS, ROWS, LAY, SPC) is the CGRID_INDEX?
Lin

Yeah, the value of SPC in CGRID(COLS, ROWS, LAY, SPC).