ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#1 Unread post by markus.qs »

Hello
I'm trying to model a local lake called Norsjø in ROMS.
When running ROMS I stumble over an error which my colleagues and I find quite difficult.

I represent the problem below:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0 0x7f5fa7588d21 in ???
#1 0x7f5fa7587ef5 in ???
#2 0x7f5fa68e320f in ???
#3 0x5579f202d98c in omega_tile
at /home/markus/roms_project2/NORSJO2/Build_romsG/omega.f90:215
#4 0x5579f203880e in __omega_mod_MOD_omega
at /home/markus/roms_project2/NORSJO2/Build_romsG/omega.f90:73
#5 0x5579f1fa5c44 in initial_
at /home/markus/roms_project2/NORSJO2/Build_romsG/initial.f90:193
#6 0x5579f1f9bf26 in __roms_kernel_mod_MOD_roms_initialize
at /home/markus/roms_project2/NORSJO2/Build_romsG/roms_kernel.f90:131
#7 0x5579f1f9c20f in myroms
at /home/markus/roms_project2/NORSJO2/Build_romsG/master.f90:73
#8 0x5579f1f9ca38 in main
at /home/markus/roms_project2/NORSJO2/Build_romsG/master.f90:50
Floating point exception (core dumped)

How do I solve this feedback?

Markus
Attachments
varinfo.dat
(160.58 KiB) Downloaded 192 times
roms_norsjo.in
(152.5 KiB) Downloaded 183 times
norsjo.h
(5.42 KiB) Downloaded 210 times
build_roms.sh
(11.63 KiB) Downloaded 190 times
norsjo_init.nc
(126.62 KiB) Downloaded 184 times
norsjo.nc
(1.27 MiB) Downloaded 176 times
norsjo_forcing_it_grid.nc
(80.38 MiB) Downloaded 270 times

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#2 Unread post by kate »

/home/markus/roms_project2/NORSJO2/Build_romsG/omega.f90:215
Can you show us what is on this line? Each person's omega.f90 can differ from the others due to differing cpp options.

markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#3 Unread post by markus.qs »

I figured it out.
I had to change the h_min value in the grid-file from 0 meter to 1 meter (or another value unequal to 0).

Thanks

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#4 Unread post by badpa.reza »

Hello there,

I am a beginner in ROMS. After running ROMS, I have faced this error, and I cannot figure out what is the problem.

Code: Select all

GET_2DFLD_NF90   - surface u-wind component,                            2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_wind_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min =  1.79217662E+00 Max =  2.23618578E+00)   regrid = T
  GET_2DFLD_NF90   - surface v-wind component,                            2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_wind_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min = -2.25005922E+00 Max = -1.64221652E-01)   regrid = T
  GET_2DFLD_NF90   - surface air pressure,                                2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_Pair_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min =  1.02043787E+03 Max =  1.02062727E+03)   regrid = T
  GET_2DFLD_NF90   - net solar shortwave radiation flux,                  2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_swrad_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min =  2.11117475E-20 Max =  2.11117475E-20)   regrid = T
  GET_2DFLD_NF90   - downward longwave radiation flux,                    2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_lwrad_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min =  5.16123890E-05 Max =  5.60720697E-05)   regrid = T
  GET_2DFLD_NF90   - surface air temperature,                             2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_Tair_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min = -1.46856628E+00 Max =  1.07004069E+00)   regrid = T
  GET_2DFLD_NF90   - surface air relative humidity,                       2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_Qair_era5.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min =  7.38970710E-01 Max =  8.75114982E-01)   regrid = T
  GET_2DFLD_NF90   - rain fall rate,                                      2000-01-01 00:00:00.00
                      (Grid=01, Rec=1, Index=1, File: lis_rain_era6.nc)
                      (Tmin=          0.0000 Tmax=         30.0000)   t =          0.0000
                      (Min =  1.00000001E-01 Max =  1.00000001E-01)   regrid = T

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x7faac4f67d21 in ???
#1  0x7faac4f66ef5 in ???
#2  0x7faac4c2e08f in ???
#3  0x5585a3907ed8 in __mod_netcdf_MOD_netcdf_get_fvar_1d
        at /home/rbadpa/roms_project/reza/Build_romsG/mod_netcdf.f90:1845
#4  0x5585a3d1719f in get_ngfld_nf90_
        at /home/rbadpa/roms_project/reza/Build_romsG/get_ngfld.f90:285
#5  0x5585a3d18fc6 in get_ngfld_
        at /home/rbadpa/roms_project/reza/Build_romsG/get_ngfld.f90:82
#6  0x5585a39b600f in get_data_
        at /home/rbadpa/roms_project/reza/Build_romsG/get_data.f90:214
#7  0x5585a31ef3b0 in initial_
        at /home/rbadpa/roms_project/reza/Build_romsG/initial.f90:249
#8  0x5585a30b9cfe in __roms_kernel_mod_MOD_roms_initialize
        at /home/rbadpa/roms_project/reza/Build_romsG/roms_kernel.f90:134
#9  0x5585a30b890a in myroms
        at /home/rbadpa/roms_project/reza/Build_romsG/master.f90:75
#10  0x5585a30b8b43 in main
        at /home/rbadpa/roms_project/reza/Build_romsG/master.f90:50
My files are attached. It would be great if you guide me.
Thank you for your time and help in advance.
Attachments
varinfo.rar
(19.61 KiB) Downloaded 123 times
ROMS forcing file.rar
(78.57 MiB) Downloaded 153 times
mod_netcdf.f90
(263.61 KiB) Downloaded 109 times
lisound_ini.nc
(525.1 KiB) Downloaded 112 times
lisound_bry.nc
(1.11 MiB) Downloaded 115 times
lisound.in
(155.64 KiB) Downloaded 123 times
lisound.h
(6.69 KiB) Downloaded 139 times

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#5 Unread post by kate »

The questions is - what does get_data.f90 want to read after the rain field? Is there something wrong with that file? Have you looked at that file with say ncview?

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#6 Unread post by badpa.reza »

Dear Kate,

Thank you for your reply.
The first time, I checked the rain file, the magnitude was around 1.790271e-12. I have modified the magnitude, and again I received this error. I guessed maybe my header file has a problem, but I couldn't figure it out.

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#7 Unread post by kate »

No, the rain file is fine. What file does get_data want to read after that for *your* case?

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#8 Unread post by badpa.reza »

I did understand what you said. I checked the get_data file (attached), and it wants to read my boundary file. Apparently, the problem is related to bry file. I used matlab code to build the bry file by Mercator dataset.
Attachments
get_data.f90
(24.64 KiB) Downloaded 123 times
lisound_bry.nc
(1.11 MiB) Downloaded 103 times

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#9 Unread post by kate »

According to your input file:

Code: Select all

          Lm == 70	           ! Number of I-direction INTERIOR RHO-points
          Mm == 70           ! Number of J-direction INTERIOR RHO-points
           N == 30            ! Number of vertical levels
This is not the same size grid as your boundary file:

Code: Select all

netcdf lisound_bry {
dimensions:
	xi_rho = 57 ;
	xi_u = 56 ;
	xi_v = 57 ;
	eta_rho = 17 ;
	eta_u = 17 ;
	eta_v = 16 ;
	s_rho = 15 ;
	s_w = 16 ;
	tracer = 2 ;
	bry_time = UNLIMITED ; // (31 currently)
Also, the SE corner of your boundary conditions contain NaN values outside the domain. Then again, you have this:

Code: Select all

   LBC(isFsur) ==   Clo     Clo     Clo     Clo         ! free-surface
   LBC(isUbar) ==   Clo     Clo     Clo     Clo         ! 2D U-momentum
   LBC(isVbar) ==   Clo     Clo     Clo     Clo         ! 2D V-momentum
   LBC(isUvel) ==   Clo     Clo     Clo     Clo         ! 3D U-momentum
   LBC(isVvel) ==   Clo     Clo     Clo     Clo         ! 3D V-momentum
   LBC(isMtke) ==   Clo     Clo     Clo     Clo         ! mixing TKE
so it might not actually be reading the boundary file.

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#10 Unread post by badpa.reza »

Thank you so much for checking my files. However, I think my input file that I uploaded here in my first question is:

Code: Select all

          Lm == 55            ! Number of I-direction INTERIOR RHO-points
          Mm == 15            ! Number of J-direction INTERIOR RHO-points
           N == 15            ! Number of vertical levels
And my boundary condition is:

Code: Select all

LBC(isFsur) ==   Clo     Che     Che     Clo         ! free-surface
   LBC(isUbar) ==   Clo     Shc     Shc     Clo         ! 2D U-momentum
   LBC(isVbar) ==   Clo     Shc     Shc     Clo         ! 2D V-momentum
   LBC(isUvel) ==   Clo     Rad     Rad     Clo         ! 3D U-momentum
   LBC(isVvel) ==   Clo     Rad     Rad     Clo         ! 3D V-momentum
   LBC(isMtke) ==   Clo     Clo     Clo     Clo         ! mixing TKE

   LBC(isTvar) ==   Clo     Rad     Rad     Clo \       ! temperature
                           Clo     Rad     Rad     Clo         ! salinity
I think the input you mentioned does not belong to me. I attached it here.
I am so grateful for your help.
Attachments
lisound.in
(155.64 KiB) Downloaded 126 times

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: ERROR: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

#11 Unread post by badpa.reza »

Dear Kate,
I checked zeta_east, and as you mentioned the SE corner of my boundary conditions contains NaN values outside the domain.

Thank you so much for your help.
Reza

Post Reply