Project

General

Profile

Bug #10451

Division by zero in NUCL_BL

Added by Philippe Le Sager over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/12/2018
Due date:
% Done:

100%


Description

The mo_aero_nucl/nuck_bl M7 routine "calculates of 2 nm formation rate based on semi-empirical equation". When using the Moguntia chemistry, I got division by zero right at the first time step:

forrtl: error (73): floating divide by zero
Image              PC                Routine            Line        Source             
libintlc.so.5      00002AAAAC30ACF1  tbk_trace_stack_i     Unknown  Unknown
libintlc.so.5      00002AAAAC308E2B  tbk_string_stack_     Unknown  Unknown
mogu.x             00000000013BDFC4  Unknown               Unknown  Unknown
mogu.x             00000000013BDDD6  Unknown               Unknown  Unknown
mogu.x             00000000013659D9  Unknown               Unknown  Unknown
mogu.x             000000000136A439  Unknown               Unknown  Unknown
libpthread-2.11.3  00002AAAAD8A1850  Unknown               Unknown  Unknown
mogu.x             0000000000D64ADE  mo_aero_nucl_mp_n         633  mo_aero_nucl.F90
mogu.x             0000000000A8F79D  m7_nuck_                  248  m7_nuck.F90
mogu.x             0000000000A85D1D  m7_dnum_                  157  m7_dnum.F90
mogu.x             0000000000A8D96A  m7_                       238  m7.F90
mogu.x             00000000004F09DF  chemistry_mp_chem        1332  chemistry.F90
mogu.x             0000000000D69DF1  modelintegration_         706  modelIntegration.F90
mogu.x             0000000000D693E7  modelintegration_         540  modelIntegration.F90
mogu.x             0000000000EE29DE  tm5_mp_tm5_model_        1204  tm5.F90
mogu.x             0000000000FB54D4  MAIN__                     63  tracer.F90
mogu.x             00000000004113BE  Unknown               Unknown  Unknown
libc-2.11.3.so     00002AAAADD47C36  __libc_start_main     Unknown  Unknown
mogu.x             00000000004112C9  Unknown               Unknown  Unknown
I tracked it down to ELVOC concentration being 0 when entering the routine.

In the part of the code (l.603-675) that starts with:

        ! Sanity checks and limiters
        ! Limiting formation rate based on both sulphuric acid and ELVOC concentration.
the following variables are updated but not used anymore (l.670-671 and l.633-634):
            vfr_sa  = vtot * avo * dh2so4 / (xmh2so4 * n_sa)    ! (==[H2SO4]/(dT*J) )            
            vfr_org = vtot * avo * delvoc / (xmelvoc * n_org)
They are also the ones where division by zero occurs. Since they are not used anymore, I removed them and the run went through. Assuming that the formation rates returned by the subroutine can be zero, there is then nothing else to do. I have contacted Risto for comment.

I haven't investigated why input concentration (sulphuric acid and ELVOC) can be zero in the first place: this is happening with Moguntia and not CB05. Should we get to the bottom of that or accept it as a possibility?

History

#1 Updated by Stelios Myriokefalitakis over 3 years ago

  • Subject changed from Divisionby zero in NUCL_BL to Division by zero in NUCL_BL

Philippe Le Sager wrote:

The mo_aero_nucl/nuck_bl M7 routine "calculates of 2 nm formation rate based on semi-empirical equation". When using the Moguntia chemistry, I got division by zero right at the first time step:
[...]I tracked it down to ELVOC concentration being 0 when entering the routine.

In the part of the code (l.603-675) that starts with:
[...]the following variables are updated but not used anymore (l.670-671 and l.633-634):
[...]They are also the ones where division by zero occurs. Since they are not used anymore, I removed them and the run went through. Assuming that the formation rates returned by the subroutine can be zero, there is then nothing else to do. I have contacted Risto for comment.

I haven't investigated why input concentration (sulphuric acid and ELVOC) can be zero in the first place: this is happening with Moguntia and not CB05. Should we get to the bottom of that or accept it as a possibility?

SVOC and ELVOC should be also included in KPP solver also for the MOGUNTIA chemistry, as for the CB05 - it is not now
I will include the ELVOC/SVOC production in the KPP for MOGUNTIA chemistry and check again.

#2 Updated by Stelios Myriokefalitakis over 3 years ago

Philippe Le Sager wrote:

The mo_aero_nucl/nuck_bl M7 routine "calculates of 2 nm formation rate based on semi-empirical equation". When using the Moguntia chemistry, I got division by zero right at the first time step:
[...]I tracked it down to ELVOC concentration being 0 when entering the routine.

In the part of the code (l.603-675) that starts with:
[...]the following variables are updated but not used anymore (l.670-671 and l.633-634):
[...]They are also the ones where division by zero occurs. Since they are not used anymore, I removed them and the run went through. Assuming that the formation rates returned by the subroutine can be zero, there is then nothing else to do. I have contacted Risto for comment.

I haven't investigated why input concentration (sulphuric acid and ELVOC) can be zero in the first place: this is happening with Moguntia and not CB05. Should we get to the bottom of that or accept it as a possibility?

I have include SVOC and ELVOC species in KPP mechanism as in the CB05. It should be run without problems now also for the MOGUNTIA chemistry.
For cartesius, no zero devisions occur now. All changes are committed.

#3 Updated by Philippe Le Sager about 3 years ago

  • % Done changed from 50 to 70

I did a checkrun on the cca machine at ECMWF, and the FPE is gone. I am waiting on Risto feedback before closing the issue.

#4 Updated by Philippe Le Sager about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 70 to 100

Commented the unneeded code in r899.

Also available in: Atom PDF