How to call PM25AT data in PMDIAG for each calculated time step?

How to call PM25AT data in PMDIAG for each calculated time step? I have written a new calculation program, which is called when running CMAQ. When calculating, I need to use the ratio of organic aerosol (OA) and black carbon (BC). However, the calculation of these two real-time parameters needs to use PM25AT and other parameters in PMDIAG. I have been debugging this call for some time, but it still cannot run successfully.

Please provide more information of what you are trying to do. What modifications did you make to the code, and what is the error message or model behavior you are seeing?
Also, please state what version of CMAQ you are using.
Do you need to run this as part of the CCTM executable, or can this be done purely as a post-processing step?

Thanks for your reply, I think I have solved this part of the content. I added a class of substances to CMAQ. Because of its semi-volatile nature, I need to consider his gas particle distribution process. But instead of using the gas particle distribution algorithm for semi-volatile substances in the official version of CMAQ, I rewritten the gas particle distribution program and called it when CMAQ was running. Since its distribution is controlled by the proportion of OM and BC, I need to know the proportion of OM and BC. At present, I mainly consider its distribution in J mode, so data such as PM25AT is no longer needed. This can be achieved in the following way.

  OMJ = CGRID(C,R,L,327) + CGRID(C,R,L,328) + CGRID(C,R,L,329)
 & + CGRID(C,R,L,320) + CGRID(C,R,L,330) + CGRID(C,R,L,331)
 & + CGRID(C,R,L,322) + CGRID(C,R,L,254) + CGRID(C,R,L,255)
 & + CGRID(C,R,L,256) + CGRID(C,R,L,257) + CGRID(C,R,L,258)
 & + CGRID(C,R,L,259) + CGRID(C,R,L,260) + CGRID(C,R,L,261)
 & + CGRID(C,R,L,262) + CGRID(C,R,L,269) + CGRID(C,R,L,270)
 & + CGRID(C,R,L,271) + CGRID(C,R,L,266) + CGRID(C,R,L,267)
 & + CGRID(C,R,L,273) + CGRID(C,R,L,252) + CGRID(C,R,L,253)
 & + CGRID(C,R,L,274) + CGRID(C,R,L,311) + CGRID(C,R,L,310)
 & + CGRID(C,R,L,263) + CGRID(C,R,L,264) + CGRID(C,R,L,265)
 & + CGRID(C,R,L,313) + CGRID(C,R,L,314) + CGRID(C,R,L,315)
 & + CGRID(C,R,L,316) + CGRID(C,R,L,317) + CGRID(C,R,L,268)
 & + CGRID(C,R,L,272) + CGRID(C,R,L,312) + CGRID(C,R,L,318)
 & + CGRID(C,R,L,336) + CGRID(C,R,L,337) + CGRID(C,R,L,338)
 & + CGRID(C,R,L,339) + CGRID(C,R,L,340) + CGRID(C,R,L,323)

  TSPJ = CGRID(C,R,L,246) + CGRID(C,R,L,250) + CGRID(C,R,L,248)
 & + CGRID(C,R,L,299) + CGRID(C,R,L,301) + CGRID(C,R,L,275)
 & + CGRID(C,R,L,327) + CGRID(C,R,L,328) + CGRID(C,R,L,329)
 & + CGRID(C,R,L,320) + CGRID(C,R,L,330) + CGRID(C,R,L,331)
 & + CGRID(C,R,L,322) + CGRID(C,R,L,254) + CGRID(C,R,L,255)
 & + CGRID(C,R,L,256) + CGRID(C,R,L,257) + CGRID(C,R,L,258)
 & + CGRID(C,R,L,259) + CGRID(C,R,L,260) + CGRID(C,R,L,261)
 & + CGRID(C,R,L,262) + CGRID(C,R,L,269) + CGRID(C,R,L,270)
 & + CGRID(C,R,L,271) + CGRID(C,R,L,266) + CGRID(C,R,L,267)
 & + CGRID(C,R,L,273) + CGRID(C,R,L,252) + CGRID(C,R,L,253)
 & + CGRID(C,R,L,274) + CGRID(C,R,L,311) + CGRID(C,R,L,310)
 & + CGRID(C,R,L,263) + CGRID(C,R,L,264) + CGRID(C,R,L,265)
 & + CGRID(C,R,L,313) + CGRID(C,R,L,314) + CGRID(C,R,L,315)
 & + CGRID(C,R,L,316) + CGRID(C,R,L,317) + CGRID(C,R,L,268)
 & + CGRID(C,R,L,272) + CGRID(C,R,L,312) + CGRID(C,R,L,318)
 & + CGRID(C,R,L,336) + CGRID(C,R,L,337) + CGRID(C,R,L,338)
 & + CGRID(C,R,L,339) + CGRID(C,R,L,340) + CGRID(C,R,L,323)
 & + CGRID(C,R,L,277) + CGRID(C,R,L,279) + CGRID(C,R,L,281)
 & + CGRID(C,R,L,282) + CGRID(C,R,L,283) + CGRID(C,R,L,284)
 & + CGRID(C,R,L,286) + CGRID(C,R,L,280) + CGRID(C,R,L,285)

! OMJ = 0.2
! TSPJ = 1.0
FOMJ = OMJ/TSPJ