Provide default initialization for members of the met_data derived type#1453
Open
mgduda wants to merge 1 commit intoMPAS-Dev:developfrom
Open
Provide default initialization for members of the met_data derived type#1453mgduda wants to merge 1 commit intoMPAS-Dev:developfrom
mgduda wants to merge 1 commit intoMPAS-Dev:developfrom
Conversation
This commit adds default initialization for the members of the met_data derived type in the init_atm_read_met module. Without well-defined values for some members, unpredictable floating-point exceptions were possible, e.g., Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation. Backtrace for this error: #0 0x15494ec288ff in ??? MPAS-Dev#1 0x59ddc0 in __init_atm_read_met_MOD_read_next_met_field at src/core_init_atmosphere/mpas_init_atm_read_met.F:388 MPAS-Dev#2 0x4ccb7a in __init_atm_cases_MOD_init_atm_case_lbc at src/core_init_atmosphere/mpas_init_atm_cases.F:6218 MPAS-Dev#3 0x58a373 in __init_atm_cases_MOD_init_atm_setup_case at src/core_init_atmosphere/mpas_init_atm_cases.F:327 MPAS-Dev#4 0x497807 in __init_atm_core_MOD_init_atm_core_run at src/core_init_atmosphere/mpas_init_atm_core.F:92 MPAS-Dev#5 0x406084 in __mpas_subdriver_MOD_mpas_run at src/driver/mpas_subdriver.F:416 MPAS-Dev#6 0x4046da in mpas at src/driver/mpas.F:20 MPAS-Dev#7 0x404745 in main at src/driver/mpas.F:10 By initializing the members of the met_data type, these unpredictable errors can be avoided.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds default initialization for the members of the
met_dataderived type in theinit_atm_read_metmodule. Without well-defined values for some members, unpredictable floating-point exceptions were possible, e.g.,By initializing the members of the met_data type, these unpredictable errors can be avoided.