PIK-LPJmL / LPJmL

Welcome to the central open-source repository of LPJmL at PIK. You are free to download the code under the AGPLv3 license, see LICENSE file. Have fun. Please note that there is absolutely no support outside agreed collaborations. We also don't provide any input data, which is derived from other sources.
GNU Affero General Public License v3.0
72 stars 48 forks source link

ERROR019: Floating point exception occurred #31

Closed KaixuanDai closed 9 months ago

KaixuanDai commented 9 months ago

Hi, After I prepared the basic soil grids input data by the LandInG, and the necessary climate data by this repository. My input parameters are:

Simulation "LPJmL Run"
Simulation with fire, permafrost, new phenology, wood fires.
Working directory: /media/geo/data/lpjml
Starting from scratch.
Input files:
Variable   Fmt  Filename
---------- ---- --------------------------------------------------------------
soil       clm  input/soil_30arcmin_13_types.bin
coord      clm  input/CRU_grid.clm
temp       clm  input/CRUDATA_TS3_23/tmp.clm
prec       clm  input/CRUDATA_TS3_23/pre.clm
lwnet      clm  input/MRI-ESM2-0/rlds.clm
swdown     clm  input/MRI-ESM2-0/rsds.clm
co2        txt  input/co2_historical_1861-2005.dat
---------- ---- --------------------------------------------------------------
Writing restart file 'restart/restart_1840_nv_stdfire.lpj' after year 1840.
No output files written.
Spinup years:                  1000
Cycle length during spinup:      40
First year:                    1910
Last year:                     1910
Index of first cell:          27410
Number of grid cells:             1
==============================================================================

When I run the -fpe flag, the model sometimes shows the error ERROR019: Floating point exception occurred.

              Carbon flux (GtC)                Water (km3)
       ------------------------------- --------------------------
Spinup NEP     estab   fire    total   transp     evap    interc
------ ------- ------- ------- ------- ---------- ------- -------
   910   0.000   0.000   0.000   0.000        0.0     1.2     0.0
temp = 3.00 prec = 59.10 wet = 0.00lwnet = 289.56 swdown = 16.61
day=1 cell=0
ERROR019: Floating point exception occurred, program terminated unsuccessfully.
Aborted (core dumped)

However, by removing the -fpe flag, the the succeed runnng as fallows:

              Carbon flux (GtC)                Water (km3)
       ------------------------------- --------------------------
Year   NEP     estab   fire    total   transp     evap    interc
------ ------- ------- ------- ------- ---------- ------- -------
  1910  -0.000   0.000   0.000  -0.000        0.6     0.7     0.0
Simulation ended.
lpjml successfully terminated, 1 grid cells processed.
Wall clock time:    3 sec, 0.003 sec/cell/year.
Total wall clock time:  3 sec (00:00:03).

I would like to know what problem might be causing this error? Thanks.

sostberg commented 9 months ago

You would need to analyze the core dump to find out where exactly the error occurred. It's impossible to diagnose this from afar.

One thing that caught my eye is that it looks like you supply long-wave downwelling radiation (rlds.clm) as your "lwnet" input file. That is the wrong type of radiation. The value of lwnet = 289.56 in your output is outside the range of what you would expect as long wave net radiation so I can imagine that this causes unexpected model behaviour. You should either provide long wave net radiation as input, or you can change the "radiation" setting in your configuration file to RADIATION_LWDOWN to have LPJmL convert long-wave downwelling radiation to long wave net radiation. Note, however, that using long wave downwelling vs. using long wave net radiation will lead to different results if you use monthly climate input data.

KaixuanDai commented 9 months ago

Thanks for the suggestion, I changed the parameters to and still get the above error. The new output is :

Simulation begins...
temp = 24.40 prec = 0.60 wet = 0.88 lwdown = 362.56 swdown = 226.71

Subsequently I would like to try debugging the program to find the real cause of the error, thank you a lot.