Welcome, Guest
Username: Password: Remember me

TOPIC: Help on debugging an ice formation problem using Khione

Help on debugging an ice formation problem using Khione 10 months 3 days ago #44265

  • Andrea
  • Andrea's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi,

I am trying to run a case involving the formation of ice in a river with the KHIONE module, but the model always crashes with the error
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 60 RELATIVE PRECISION: NaN.
I ran telemac with the debugger, and you will be able to find the output in the file 'outardes_ice.cas_2024...sortie' (inside the zip folder Files.zip)

File Attachment:

File Name: Files.zip
File Size: 562 KB

. From the output, it seems the error lies in the CVDFTR subroutine, but I couldn't find why or how to fix it.
The river has an upstream inflow boundary condition and a downstream water level boundary condition, both varying in time (found in the file 'outardes_CFliquides.liq').
I have also implemented a tracer (for temperature) in both boundaries.

Does the error lie in the solver used, the treatment for tidal flats, or elsewhere? Any help will be greatly appreciated.
Thank you,
Andrea M.
The administrator has disabled public write access.

Help on debugging an ice formation problem using Khione 10 months 2 days ago #44286

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1592
  • Thank you received: 606
Hello Andrea,

As told a few times in other posts, if a segmentation fault or a NaN (Not a Number) occurs, you should use a debug configuration with debug options to investigate.
See e.g. the S11.gfortran.debug configuration in the $HOMETEL/configs/systel.edf.cfg configuration file, in particular the flag fflags_debug_gfo for gfortran compiler.
fflags_debug_gfo: -g -Wall -fcheck=all -fbacktrace -fbounds-check -finit-integer=-1 -finit-real=nan -ffpe-trap=invalid,zero,overflow

It will show in which subroutine the issue/nan/segfault occurs, the first suspicious line and may help you to change something in your computation.

In your case, I have seen that you have negative depths in sources/khione/source_hydro_icover.f:
              IF( H%R(I).LT.EPS ) SP_EAU =
     &          MAX( SP_EAU, SQRT(GRAV*(EPS-H%R(I))*H%R(I)/EPS) )

which is not good.
You should better user TREATMENT OF NEGATIVE DEPTHS = 2 rather than 1 which allows negative depths (even slightly negative). You should then use SUPG OPTION = 0;0

Just after, I have seen that you use SCHEME FOR ADVECTION OF TRACERS = 1 (i.e. method of characteristics which is not conservative and shoud not be used for tracers). You can try scheme = 13 e.g. which works with tidal flats (but is quite diffusive).

Using 16 cores for only 7783 triangles in your mesh may be useless. I would be surprised that you get the best performances with so many cores.

Anyway, I would suggest you to use recommended option for the hydrodynamics part, described in the TELEMAC-2D user manual. I have not read your whole steering file carefully but you may use other not recommended options.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: Andrea

Help on debugging an ice formation problem using Khione 10 months 1 day ago #44291

  • Andrea
  • Andrea's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Yes, with these modifications, the code is now running with no error!
Thank you for your help Chi-Tuan!
The administrator has disabled public write access.

Help on debugging an ice formation problem using Khione 2 days 5 hours ago #46001

  • Ding
  • Ding's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 23
  • Thank you received: 1
Hi Chi-Tuan,

I also encounter the similar problem as Andrea's. I made modification to my file according to your suggestion, i.e. using SCHEME FOR ADVECTION OF TRACERS = 13, TREATMENT OF NEGATIVE DEPTHS = 2, SUPG OPTION = 0;0, but the problem is still unsolved. The model works well in the first 22h, but after 22h, it crashes with the error:

POSITIVE DEPTHS SOLVED IN 50 ITERATIONS = MAXIMUM
INCREASE MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
CVTRVF_NERD (SCHEME NERD, 13 OR 14): 50 ITERATIONS = MAXIMUM
INCREASE MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
CVTRVF_NERD (SCHEME NERD, 13 OR 14): 50 ITERATIONS = MAXIMUM
INCREASE MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
POSITIVE DEPTHS SOLVED IN 50 ITERATIONS = MAXIMUM
INCREASE MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
CVTRVF_NERD (SCHEME NERD, 13 OR 14): 50 ITERATIONS = MAXIMUM
INCREASE MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
CVTRVF_NERD (SCHEME NERD, 13 OR 14): 50 ITERATIONS = MAXIMUM
INCREASE MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 60 RELATIVE PRECISION: NaN

I tried to use different schemes for advection of tracers, but it still doesn't work. Could you give me some suggestions. Thank you in advance for your help.
The administrator has disabled public write access.

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.