Open hiker opened 1 month ago
The full explanation:
Kernel aerosol_ukca_kernel_mod
uses:
USE ukca_api_mod, ONLY: ukca_step_control, ukca_maxlen_message, ukca_maxlen_procname
And in ukca_api_mod
there is:
MODULE ukca_api_mod
USE ukca_step_control_mod, ONLY: ukca_step_control
So it compiles, because ukca_api_mod imports the module and makes it available, to be imported elsewhere. I don't know if this is done on purpose, but it appears ugly.
CallTreeUtils could test if a symbol cannot be found, if this symbol is imported (till the routine is found).
Or we can just fix the code :P But it appears that the api module is only created to import (and rename) a long list of symbols, so we might have to follow the import tree, including potential renaming, e.g. from the ukca_api_mod:
USE ukca_ddepaer_coeff_mod, ONLY: ukca_zhg_eg_nedleaf => zhg_eg_nedleaf, ukca_zhg_eg_brdleaf => zhg_eg_brdleaf, &
&ukca_zhg_dec_nedleaf => zhg_dec_nedleaf, ukca_zhg_dec_brdleaf => zhg_dec_brdleaf, &
While working on UKCA files:
But
ukca_step_control
is not used in ukca_api_mod. When trying to run kernel extraction, call_tree_utils fails in_resolve_calls_and_unknowns
. The following patch avoids the crash:The error message is:
Not sure why it seems to look in the wrong module for that subroutine :(