Isca
Isca copied to clipboard
gfortran float to integer type conversion problems
Description
When running with gfortran @daw538 have had various nml errors of the type:
FATAL from PE 0: check_nml_error in fms_mod: Unknown namelist, or mistyped namelist variable in namelist main_nml, (IOSTAT = 5010 )
Upon a bit of digging, this is happening when you set variables in the namelist as floats when Isca's fortran expects them as integers. E.g. if you set seconds
in main_nml
to a float in the python script then Isca will error with gfortran because seconds
is expected to be an integer.
When running with the Intel compilers this does not cause an error. It seems that gfortran is a bit fussier about this type of type conversion.
The solution to this is tricky to think about, as it would require the python to know about the fortran types in order to catch this sort of error. Just putting it here to note for anyone with this issue, and so that we can discuss potential work-arounds sometime.