Setting some parameter values module_initialize_ideal.F (using nl_set_) has no effect (specifically for 'isice'). I ran into this issue when trying to set a value for ISICE in module_initialize_ideal:
but in the wrfinput global attributes, it has ISICE=0, which caused a problem with the ruclsm. (I'm doing some full physics testing in ideal mode.)
The setting of ISWATER does work, however, and the reason is curious, stemming from having multiple copies of these variables (grid, config_flags, and model_config_rec) and how output_wrf.F is coded. output_wrf.F uses both config_rec (through nl_get) for some variables but config_flags for others, which is confusing. In that code, ISWATER is pulled from nl_get, but ISICE from config_flags. A bunch of other values are pulled from nl_get that aren't used because the value written comes from config_flags. It seems like a lot of work to try to make things consistent in output_wrf (e.g., to only use config_rec values). (There is still a commented line in output_wrf.F that sets iswater from config_flags, so apparently this issue has been encountered before.)
module_initialize_ideal.F can set values in "grid" and "model_config_rec" (via the nl_set calls), but not "config_flags". (It has a local config_flags that is a copy from model_config_rec) In real_em.F, model_config_rec is copied into config_flags after the domain init, but that is not done in ideal_em.F. A simple fix is to add the same copy command to the med_initialdata_output subroutine in ideal_em.F so that it acts like real_em.F:
change config_flags from OUT to INOUT
add this line after init_domain
CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
I could do a PR if there's agreement on this. I suppose the test cases would all need to be checked for consistent results, though.
Relevant files:
module_initialize_ideal.F
output_wrf.F
ideal_em.F
Setting some parameter values module_initialize_ideal.F (using nl_set_) has no effect (specifically for 'isice'). I ran into this issue when trying to set a value for ISICE in module_initialize_ideal:
but in the wrfinput global attributes, it has ISICE=0, which caused a problem with the ruclsm. (I'm doing some full physics testing in ideal mode.)
The setting of ISWATER does work, however, and the reason is curious, stemming from having multiple copies of these variables (grid, config_flags, and model_config_rec) and how output_wrf.F is coded. output_wrf.F uses both config_rec (through nl_get) for some variables but config_flags for others, which is confusing. In that code, ISWATER is pulled from nl_get, but ISICE from config_flags. A bunch of other values are pulled from nl_get that aren't used because the value written comes from config_flags. It seems like a lot of work to try to make things consistent in output_wrf (e.g., to only use config_rec values). (There is still a commented line in output_wrf.F that sets iswater from config_flags, so apparently this issue has been encountered before.)
module_initialize_ideal.F can set values in "grid" and "model_config_rec" (via the nl_set calls), but not "config_flags". (It has a local config_flags that is a copy from model_config_rec) In real_em.F, model_config_rec is copied into config_flags after the domain init, but that is not done in ideal_em.F. A simple fix is to add the same copy command to the med_initialdata_output subroutine in ideal_em.F so that it acts like real_em.F:
change config_flags from OUT to INOUT
add this line after init_domain
CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
I could do a PR if there's agreement on this. I suppose the test cases would all need to be checked for consistent results, though.
Relevant files:
module_initialize_ideal.F
output_wrf.F
ideal_em.F