IMAU-paleo / UFEMISM2.0

Version 2.0 of the Utrecht FinitE voluMe Ice-Sheet Model
6 stars 1 forks source link

Crash during mesh creation (initial or remapping) #105

Open erwinlambert opened 3 days ago

erwinlambert commented 3 days ago

In quite a bunch of configurations, the mesh creation crashes with the following error:

ERROR: Assertion failed: tia and tja are identical in UFEMISM_program/run_model(ANT)/update_mesh/create_mesh_from_meshed_geometry/create_mesh_from_reduced_geometry/create_mesh_from_reduced_geometry_singlecore/Lloyds_algorithm_single_iteration/move_vertex/flip_triangles_until_Delaunay/are_Delaunay/find_triangle_pair_local_geometry/assert_triangle_pair_local_geometry on process 0/1 (0 = master)
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
ERROR STOP 

In some cases, this occurs during remapping. Slight changes in the different resolutions solve it, but it's a bit of a gambling game. Would be nice if this could be made a bit more robust.

erwinlambert commented 3 days ago

For completeness and reproducibility, an example is the MISOMIP+ spinup with these resolutions. This setup crashes during the creation of the third mesh.

! Resolutions for different parts of the ice sheet
maximum_resolution_uniform_config            = 20e3                             ! [m]          Maximum resolution for the entire domain
maximum_resolution_grounded_ice_config       = 8e3                              ! [m]          Maximum resolution for grounded ice
maximum_resolution_floating_ice_config       = 3e3                              ! [m]          Maximum resolution for floating ice
maximum_resolution_grounding_line_config     = 2e3                              ! [m]          Maximum resolution for the grounding line
maximum_resolution_calving_front_config      = 5e3                              ! [m]          Maximum resolution for the calving front
maximum_resolution_ice_front_config          = 20e3                             ! [m]          Maximum resolution for the ice front
maximum_resolution_coastline_config          = 20e3                           ! [m]          Maximum resolution for the coastline

! Widths for each resolution band
grounding_line_width_config                  = 2.5e3                            ! [m]          Width of the band around the grounding line that should get this resolution
calving_front_width_config                   = 2.5e3                            ! [m]          Width of the band around the calving front that should get this resolution
ice_front_width_config                       = 10e3                             ! [m]          Width of the band around the ice front that should get this resolution
coastline_width_config                       = 1000e3                           ! [m]          Width of the band around the coastline that should get this resolution
erwinlambert commented 1 day ago

Hmm, so this becomes a lot more stable when using narrow widths of grounding_line and calving_front. Seems to be a conflict when these bands overlap? Based on trial and error, a width < maximum_resolution for grounding line and calving front appears to be a criterion for stable mesh creation.