NOAA-GFDL / FMS

GFDL's Flexible Modeling System
Other
87 stars 128 forks source link

data_override_0d bug #1490

Closed uramirez8707 closed 3 months ago

uramirez8707 commented 3 months ago

Describe the bug Data_override_0d crashes with

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source            
libpthread-2.28.s  00007F0230120CF0  Unknown               Unknown  Unknown
test_data_overrid  0000000000ACF4A3  data_override_r8_         903  data_override.inc
test_data_overrid  0000000000411172  MAIN__                     99  test_data_override_ongrid.F90
test_data_overrid  0000000000410A4D  Unknown               Unknown  Unknown
[libc-2.28.so](http://libc-2.28.so/)       00007F022F93CD85  __libc_start_main     Unknown  Unknown
test_data_overrid  000000000041096E  Unknown               Unknown  Unknown

That points to this line: https://github.com/NOAA-GFDL/FMS/blob/d32804592e05ec117c1495a5e318b2670d2c4575/data_override/include/data_override.inc#L903 data_table(index1)%time_records(1) is never "associated" (although it should probably be an allocatable ...), it is missing this: https://github.com/NOAA-GFDL/FMS/blob/d32804592e05ec117c1495a5e318b2670d2c4575/data_override/include/data_override.inc#L1440-L1442

To Reproduce Any attempt to do an data_override_0d will reproduce the problem. The issue was first seen by @nikizadehgfdl with the ESM4p2_longamip_J experiment

Expected behavior The code should not crash

System Environment This happens in any system

Additional context N/A