Hi,
running on a debug compiled WRF v4.5.1, I step into a floating point exception right at the beginning of the simulation with the Grell-Freitas cumulus scheme:
The line #1012 with the floating point exception in
Assuming that the floating point exception might come from the divisor which might become 0, NaN, ... I included the following
In doing that, one obtains:
As you can see, all the variables for the divisor are zero.
I am not an specialist in cumulus-schemes neither in the Grell-Freitas one. The calculation of
From a pure Fortran coding perspective, one could filter (via an
Lluís
running on a debug compiled WRF v4.5.1, I step into a floating point exception right at the beginning of the simulation with the Grell-Freitas cumulus scheme:
Code:
(...)
WRF NUMBER OF TILES = 1
[irene2054:3782323:0:3782323] Caught signal 8 (Floating point exception: floating-point invalid operation)
==== backtrace (tid:3782323) ====
0 0x0000000000012cf0 __funlockfile() :0
1 0x000000000ba3329f module_cu_gf_deep_mp_cup_gf_() /ccc/work/cont003/gen6877/fitabllu/WRF/v451_git_FPS/intel/20-0-0/netcdf_4-7-4netcdff_4-5-3/dmpar/WRFdbg/phys/module_cu_gf_deep.f90:1012
2 0x000000000b9c4719 module_cu_gf_wrfdrv_mp_gfdrv_() /ccc/work/cont003/gen6877/fitabllu/WRF/v451_git_FPS/intel/20-0-0/netcdf_4-7-4netcdff_4-5-3/dmpar/WRFdbg/phys/module_cu_gf_wrfdrv.f90:521
The line #1012 with the floating point exception in
phys/module_cu_gf_deep.f90
its the last line code of the following calculation found within the subroutine CUP_gf
:
Code:
ucd(i,ki)=(ucd(i,ki+1)*zdo(i,ki+1) &
-.5*dd_massdetru(i,ki)*ucd(i,ki+1)+ &
dd_massentru(i,ki)*us(i,ki) &
-pgcon*zdo(i,ki+1)*(us(i,ki+1)-us(i,ki))) / &
(zdo(i,ki+1)-.5*dd_massdetru(i,ki)+dd_massentru(i,ki))
Assuming that the floating point exception might come from the divisor which might become 0, NaN, ... I included the following
PRINT
statement to check that:
Code:
PRINT *,' Lluis', ki, ' zdo', zdo(i,ki+1), ' dd_massdetru', dd_massdetru(i,ki), &
' dd_massentru', dd_massentru(i,ki), ' prod', (zdo(i,ki+1)-.5*dd_massdetru(i,ki)+dd_massentru(i,ki))
ucd(i,ki)=(ucd(i,ki+1)*zdo(i,ki+1) &
-.5*dd_massdetru(i,ki)*ucd(i,ki+1)+ &
dd_massentru(i,ki)*us(i,ki) &
-pgcon*zdo(i,ki+1)*(us(i,ki+1)-us(i,ki))) / &
(zdo(i,ki+1)-.5*dd_massdetru(i,ki)+dd_massentru(i,ki))
Code:
(...)
Lluis 2 zdo 1.0179067E-30 dd_massdetru 3.0550365E-30
dd_massentru 2.0371298E-30 prod 1.5275183E-30
Lluis 1 zdo 0.0000000E+00 dd_massdetru 0.0000000E+00
dd_massentru 0.0000000E+00 prod 0.0000000E+00
As you can see, all the variables for the divisor are zero.
I am not an specialist in cumulus-schemes neither in the Grell-Freitas one. The calculation of
ucd
is related to the downdraft moist static energy + moisture budget. I can not guess what does physically mean that this variables are zero. From a pure Fortran coding perspective, one could filter (via an
IF
) the zero values, but I can not figure out, if this would make any physical sense.Lluís
Last edited: