Hg simulation using CMAQ-5.3.2

Hi everyone,
I use CMAQ-5.3.2 to simulate Hg and the model runs smoothly with “CTM_HGBIDI N”. Once i turn on the mercury bi-directional flux for in-line deposition velocities(CTM_HGBIDI Y), the following error appears:


Could you help with this?
My run script is attached here.run_cctm_brhgo.txt (36.4 KB)

It would be helpful to re-build the model for debug and run the debug-executable: that way, when we get the seg-fault, the traceback will list the files and lines related to the fault.

Note that you need to remove all the optimized “.o” and “.mod” files before you do the debug-make… the current CMAQ build-system doesn’t separate debug-builds from optimized-builds.

Thanks, I will try that!
Lin

Hi,
I rebuilt the model in debug mode and run it again. The following information shows:


I checked these scripts for more detail:

  1. HGSIM.F line 174-176:
    IF(CAT_LU(L) .EQ. ‘EVEFOR’) THEN
    fevgrn(c,r) = fevgrn(c,r) + Grid_Data%lufrac(c,r,l)
    End IF
  2. vdiffproc.F line 242-244:
    IF ( HGBIDI ) THEN ! Initialize HGSIM module
    CALL INIT_HGSIM(JDATE, JTIME)
    END IF
  3. sciproc.F line 243:
    CALL VDIFF ( CGRID, JDATE, JTIME, TSTEP )
  4. driver.F line 717:
    CALL SCIPROC ( CGRID, JDATE, JTIME, TSTEP, ASTEP )
  5. cmaq_main.F line 96-98:
    DO ISTEP = 1, NSTEPS
    CALL CMAQ_DRIVER (STDATE, STTIME, MODEL_TSTEP, JDATE, JTIME, (ISTEP .EQ. NSTEPS))
    END DO
    I am confused and have no clue how to fix this, could you please help?
    Thanks!
    Lin

This is quite curious. The possibilities would seem to be

  • subscript out of bounds in fevgrn(c,r) or Grid_Data%lufrac(c,r,l), which seems quite improbable given the loop-bounds in the enclosing loop-nest and the ALLOCATE statements immediately above HGSIM.F line 174-176; or
  • Grid_Data%lufrac(c,r,l) not yet allocated (which seems unlkely, also.

BTW, this is lousy code that has the relationship between subscripts and loop-orders exactly backwards for good performance (and the bad performance will get worse and worse as the problem size gets larger and larger; for reasonable performance, the loop order should have been:

 DO L = 1, N_LUFRAC
     DO R = 1, NROWS
           DO C = 1, NCOLS

Hi,
I changed the HGSIM.F loop according to what you said and the HGSIM.F error disappear. But the other three are still there. Does this mean to fix this problem i need to change all these three files as well? Could you please help with it?
Thanks!
Lin