CMAQv5.2 DDM - not able to output more than one sens

Hi. It seems that DDM in CMAQv5.2 only output one sensitivity. When additional sens files are added (EGRIDfile2), in the run script, it is not read in by the program. Is this the default of the DDM in version 5.2? Also, is a ddm3.q file needed for CMAQv5.2-DDM?

Hi Sergey, we believe we found the issue with our original questions. In addition, I guess there is some slight difference in setup and terminology between DDMv5.02 and DDMv5.2 that threw things off a bit for me initially. But just to be sure, DDMv5.2 does not require the ddm3.q file, correct? A curiosity question - is there a species mapping setup for cb6r3_ae7 to cb6r3_ae6? We noticed that the output in the SENS out file, seems to be doing all the species, despite only listing a minimal set in the sens.dat file. Is there a way to limit that? If not, do we then need to specify the species in the dat file if the default is to print out more than listed in the sens.dat file? Concerned about space, time, and memory - of note, we complied with ioapi-3.2 large.

Newer DDM-3D versions do not require ddm3.q file.

The DDM-3D ASENS output file is control by the same runscript variable as ACONC. Edit that to limit the number of species in the output file.


Hi @sergey Thank you for this. I tried to limit the amount of species in the run script (changed from ALL to a select few), and I think either the program crashed or it did not limit the reporting to those listed.

Yes sorry. I had forgotten that there is a bug in this logic. A piece of code was omitted in the release. I had submitted a fix and it is going through the review process. It should be available in the patch shortly after it is approved.

If you want to patch it yourself while you wait, its fairly easy:

  1. open the file opasens.F
  2. on line 35 add: USE RUNTIME_VARS
  3. starting on line 77, add the following block:

! Define N_ASENS_VARS when a subset of species is requested and it is
! not defined elsewhere

  IF ( N_ASENS_VARS .EQ. 0 ) THEN ! this happens when 'ALL' keyword
                                  !is not specified in the run script
     IF ( W_VEL ) THEN
     END IF

Again, this will be available in the next patch. Sorry for the inconvenience.


1 Like

Not a problem, @Sergey. Thank you so much for this. I will modify accordingly. Does this patch apply to both v5.2 and v5.4 DDM? Also, while I got you, some of our learnings (my first question regarding number of output send) is that we did not need to change the NPMAX value in the code, (under subdirectory src/ddm/DSENS.F) in order to output more than one sensitivity. Also memory is an issue. When we ran more than two sens, available memory among the nodes/processors was the reason the program stopped. Do you have a recommended number of sens to set up in the dat file? I’d like to go as high as 5 or 6, if I can.

My line 77 - where the cursor is - is this where the block of code should be (DDMv5.2)

If the run script determines the species output in the ASENS output, why is it necessary to list the species in the dat file?

Sorry, the patch I provided was for the newly released 5.4 version of the code. I should have specified.

I am not sure about your earlier question. NPMAX is set in the runscript and should match the number of sensitivities you define in sensinput.dat control file. You don’t need to change the actual code. And I don’t remember a file called DSENS.F in CMAQ. The memory issues are hardware specific. I don’t know exactly what you are running on, but one trick could be to ask for more processors than you actually use in order to reserve the memory from all them. We have fairly good computers here and I have certainly been able to run 10 and more sensitivities per simulation with out issues.


Thank you @sergey. I’ll test the limitations of configurations to see how many sensitivities I can run. I also had the incorrect file name earlier (re: NPMAX); it is DDM3D_DEFN.F.

Any available patch for DDM 5.2 regarding the output of the species, as there is for DDM 5.4? It seems like the proposed patch for 5.4 might work with 5.2, provided it is inserted in the correct section - maybe?

I’m not successful in modifying the code to limit the species output, how essential is it, to list specific species in the dat file as more than what is specified there will be written out to the output.

I think there is still some kind of misunderstanding. The way that DDM-3D works is that it calculates the sensitivity of the entire CMAQ species array - all of species - to emissions (or whatever) of species defined in the sensinput.dat file. So, sensitivity OF all species TO ones in the sensinput.dat file. You cannot change that and shouldn’t mess with the code in that regard. Once that is computed, you should be theoretically able to limit what species are written out to the output files. This is the part that was bugged and the fix I provided should address it for 5.4 version. Its likely something similar will work for 5.2, but unfortunately I don’t have the time right now to test that.

I see. I did not know it calculates the emission sensitivities for all the species at once. I thought that selected sensitivity calcs were set by the species list in the dat file!! Thank you @sergey!

@Sergey, a follow up question - with DDM5.2. All sensitivity of all CMAQ species are calculated with respect to what is in the sensinput.dat file. Should I list all the species I want to calculate the sensitivities to as follows (see following text file - under COA).

sensinput.dat.txt (560 Bytes)

Yes - that was the species formatting for 5.2