gscp_set_coefficients: igscp is optional, but still used if tune_v0snow set and <= 0
The parameter igscp
is an optional input to gscp_set_coefficients
but used if tune_v0snow
is set and <= 0.
Currently, the function is called without setting igcsp
in mo_nwp_reff_interface.f90 leading to a segmentation fault.
[m20428:66030:0] Caught signal 11 (Segmentation fault: address not mapped to object at address (nil))
==== backtrace ====
0 0x00000000011a8f2d gscp_data_mp_gscp_set_coefficients_() ???:0
1 0x0000000000877be9 mo_nwp_reff_interface_mp_init_reff_() ???:0
2 0x00000000008692de mo_nwp_phy_init_mp_init_nwp_phy_() /work/mh1119/m300843/icon/icon-aes/src/atm_phy_nwp/mo_nwp_phy_init.f90:743
3 0x0000000000463125 mo_nh_stepping_mp_perform_nh_stepping_() ???:0
4 0x000000000045bca8 mo_atmo_nonhydrostatic_mp_atmo_nonhydrostatic_() ???:0
5 0x0000000000419cb1 mo_atmo_model_mp_atmo_model_() ???:0
6 0x000000000041626c MAIN__() ???:0
7 0x0000000000415e0e main() ???:0
8 0x000000000001ed20 __libc_start_main() ???:0
9 0x0000000000415ce9 _start() ???:0
Either igcsp
should not be optional, or the following comparison need to be adapted:
IF (PRESENT(tune_v0snow)) THEN
IF (tune_v0snow <= 0._wp) THEN
IF (igscp == 2) THEN
v0snow = 20.0_wp ! default for graupel scheme
ELSE
v0snow = 25.0_wp ! default for cloud ice scheme
END IF
ELSE
v0snow = tune_v0snow ! use ICON namelist value
END IF
ELSE
v0snow = 20.0_wp ! COSMO default
ENDIF