You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMAQ simulations for mercury with the CTM_HGBIDI option set to T will fail due to two issues in the current CMAQ code except for when using the STAGE dry deposition option for a single day simulation. The first issue affects only the M3Dry dry deposition option and causes a model crash if CTM_HGBIDI is set to T but CTM_ABFLUX (bidirectional flux option for NH3) is set to F. The second issue affects both the M3Dry and STAGE dry deposition options and leads to a model crash on the second day of the simulation when using a MEDIA_CONC restart file.
Scope and Impact
The current CMAQ code with not complete successfully for mercury simulations with the CTM_HGBIDI option set to T for multi-day simulations for both the M3Dry and STAGE dry deposition options. For M3Dry, the code will not complete successfully even on the first day of the simulation unless the CTM_ABFLUX is also set to T.
Solution
The first issue is caused by the land use fraction array needed by the Hg bidirectional calculations not being allocated and assigned a value in the M3Dry version of ASX_DATA_MOD.F. To fix this issue, change these statements on lines 557 and 638 from
If ( ABFLUX) Then
To
If ( ABFLUX .or. HGBIDI ) Then
The second issue is caused by subroutine INIT_BIDI in BIDI_MOD.F being called twice in both M3Dry and STAGE, leading to a duplicate allocation error. To fix this issue, the beginning of that subroutine should be modified as follows:
Current code (lines 75 – 80 in the M3Dry version of BIDI_MOD.F):
Integer :: STATUS
C--------------------------------------------------------------------------
! Set Mercury BiDi Processing Flag equal to false if there is
! no mercury gas-phase species.
If ( INDEX1( 'HG', N_GC_DDEP, GC_DDEP ) .EQ. 0 ) HGBIDI = .FALSE.
Updated code:
Integer :: STATUS
Logical, SAVE :: INITIALIZED = .FALSE.
C--------------------------------------------------------------------------
C Prevent initilializing the code twice
If ( INITIALIZED ) Return
INITIALIZED = .TRUE.
! Set Mercury BiDi Processing Flag equal to false if there is
! no mercury gas-phase species.
If ( INDEX1( 'HG', N_GC_DDEP, GC_DDEP ) .EQ. 0 ) HGBIDI = .FALSE.
For STAGE, corresponding changes would have to be made in lines 73 – 76 of the STAGE version of BIDI_MOD.F
Additional context
These issues will be fixed in the next release of CMAQ.
The text was updated successfully, but these errors were encountered:
Description
CMAQ simulations for mercury with the CTM_HGBIDI option set to T will fail due to two issues in the current CMAQ code except for when using the STAGE dry deposition option for a single day simulation. The first issue affects only the M3Dry dry deposition option and causes a model crash if CTM_HGBIDI is set to T but CTM_ABFLUX (bidirectional flux option for NH3) is set to F. The second issue affects both the M3Dry and STAGE dry deposition options and leads to a model crash on the second day of the simulation when using a MEDIA_CONC restart file.
Scope and Impact
The current CMAQ code with not complete successfully for mercury simulations with the CTM_HGBIDI option set to T for multi-day simulations for both the M3Dry and STAGE dry deposition options. For M3Dry, the code will not complete successfully even on the first day of the simulation unless the CTM_ABFLUX is also set to T.
Solution
The first issue is caused by the land use fraction array needed by the Hg bidirectional calculations not being allocated and assigned a value in the M3Dry version of ASX_DATA_MOD.F. To fix this issue, change these statements on lines 557 and 638 from
To
The second issue is caused by subroutine INIT_BIDI in BIDI_MOD.F being called twice in both M3Dry and STAGE, leading to a duplicate allocation error. To fix this issue, the beginning of that subroutine should be modified as follows:
Current code (lines 75 – 80 in the M3Dry version of BIDI_MOD.F):
Updated code:
For STAGE, corresponding changes would have to be made in lines 73 – 76 of the STAGE version of BIDI_MOD.F
Additional context
These issues will be fixed in the next release of CMAQ.
The text was updated successfully, but these errors were encountered: