Rename inconsistent ICON short variable names to descriptive names across codebase#1174
Rename inconsistent ICON short variable names to descriptive names across codebase#1174
Conversation
|
Hi there, this is jenkins continuous integration... |
1 similar comment
|
Hi there, this is jenkins continuous integration... |
Rename the following ICON short names to descriptive names in stencil functions, their callers, and corresponding test files: - exner_exfac → time_extrapolation_parameter_for_exner - exner_ref_mc → reference_exner_at_cells_on_model_levels - theta_ref_mc → reference_theta_at_cells_on_model_levels - rho_ref_mc → reference_rho_at_cells_on_model_levels - theta_ref_ic → reference_theta_at_cells_on_half_levels Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
…expl_wgt to exner_w_explicit_weight_parameter Rename Python identifiers/keyword args only. Docstrings referencing ICON variable names and serialization method calls are preserved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
… dycore stencils, callers, and tests Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/2719a20a-f4e5-4964-a0b3-329fff10ab70 Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
|
@copilot can you also do the "Known remaining work"? or? |
…nd driver testcases Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/9025bfdf-3022-49a1-9f88-9287e5dba214 Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
Done in ae676f6. Renamed |
Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/9025bfdf-3022-49a1-9f88-9287e5dba214 Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
|
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
|
@copilot There are still call sites where we have consistent keyword mapping, for example, |
…, callers, and tests Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/c340831a-0ec8-434c-963d-ea5ccb89e7ea Co-authored-by: OngChia <93439630+OngChia@users.noreply.github.com>
Done in 34d5566. Renamed all remaining inconsistent keyword mappings across 93 files in the dycore module — including |
Several stencil parameters and state fields still used ICON Fortran short names while callers, state dataclasses, and metric factories had already adopted descriptive names — requiring awkward keyword mappings like
scalfac_dd3d=scaling_factor_for_3d_divdampat call sites.Renames applied
Metric state fields (initial batch):
scalfac_dd3d→scaling_factor_for_3d_divdamphmask_dd3d→horizontal_mask_for_3d_divdampvwind_impl_wgt→exner_w_implicit_weight_parametervwind_expl_wgt→exner_w_explicit_weight_parameterexner_exfac→time_extrapolation_parameter_for_exnerexner_ref_mc→reference_exner_at_cells_on_model_levelstheta_ref_mc→reference_theta_at_cells_on_model_levelsrho_ref_mc→reference_rho_at_cells_on_model_levelstheta_ref_ic→reference_theta_at_cells_on_half_levelsStencil parameters across all dycore stencils (93 files):
theta_v_ic→theta_v_at_cells_on_half_levelsexner_pr→perturbed_exner_at_cells_on_model_levelsrho_ic→rho_at_cells_on_half_levelsz_exner_expl→exner_explicit_termz_rho_expl→rho_explicit_termz_w_expl→w_explicit_termz_alpha→tridiagonal_alpha_coeff_at_cells_on_half_levelsz_beta→tridiagonal_beta_coeff_at_cells_on_model_levelsz_q→tridiagonal_intermediate_resultz_contr_w_fl_l→vertical_mass_flux_at_cells_on_half_levelsz_flxdiv_mass→divergence_of_massz_flxdiv_theta→divergence_of_theta_vz_theta_v_pr_ic→perturbed_theta_v_at_cells_on_half_levelsz_exner_ex_pr→temporal_extrapolation_of_perturbed_exnerz_th_ddz_exner_c→ddz_of_temporal_extrapolation_of_perturbed_exner_on_model_levelsz_hydro_corr→hydrostatic_correction_on_lowest_levelz_raylfac→rayleigh_damping_factorz_rth_pr→perturbed_theta_v_at_cells_on_model_levelsz_theta_v_fl_e→theta_v_flux_at_edges_on_model_levelsz_graddiv_vn→horizontal_gradient_of_normal_wind_divergencez_graddiv2_vn→squared_horizontal_gradient_of_total_divergencez_gradh_exner→horizontal_pressure_gradientz_dwdz_dd→dwdz_at_cells_on_model_levelsz_theta_v_e→theta_v_at_edges_on_model_levelsrho_nnow/rho_now→current_rhoexner_nnow/exner_now→current_exnertheta_v_nnow/theta_v_now→current_theta_vvn_nnow/p_vn→current_vnp_vt→tangential_windrho_incr→rho_iau_incrementexner_incr→exner_iau_incrementvn_incr→normal_wind_iau_incrementddt_exner_phy→exner_tendency_due_to_slow_physicsddt_vn_apc_ntl1→predictor_normal_wind_advective_tendencyddt_vn_apc_ntl2→corrector_normal_wind_advective_tendencyddt_vn_phy→normal_wind_tendency_due_to_slow_physics_processwgt_nnow_vel→advection_explicit_weight_parameterwgt_nnew_vel→advection_implicit_weight_parameterscal_divdamp_o2→second_order_divdamp_scaling_coeffrho_ref_me→reference_rho_at_edges_on_model_levelstheta_ref_me→reference_theta_at_edges_on_model_levelsmass_fl_e→mass_flux_at_edges_on_model_levelsmass_flx_ic→dynamical_vertical_mass_flux_at_cells_on_half_levelsvol_flx_ic→dynamical_vertical_volumetric_flux_at_cells_on_half_levelsexner_dyn_incr→exner_dynamical_incrementw_concorr_c→contravariant_correction_at_cells_on_half_levelsEach rename covers the
@gtx.field_operator/@gtx.programsignatures, callers (compute_edge_diagnostics_for_dycore_and_update_vn,compute_cell_diagnostics_for_dycore,vertically_implicit_dycore_solver,solve_nonhydro), and corresponding stencil tests.Additionally, renames are applied in:
DiffusionMetricStatedataclass,diffusion.pyconstant_args,temporary_field_for_grid_point_cold_pools_enhancementandcalculate_enhanced_diffusion_coefficients_for_grid_point_cold_poolsstencils, diffusion fixtures and testsinitialization_utils.pykeyword argument forDiffusionMetricStateutils.pyfunction parameters and body,gauss3d.pyandjablonowski_williamson.pylocal variablestest_icon4py.pyandtest_utils.pyBefore:
After:
Not changed (intentionally preserved)
metrics_savepoint.scalfac_dd3d(),.exner_pr(),.rho_ic(), etc.) — these are serialization format identifiersicon_var_nameentries inmetrics_attributes.py— documentation of ICON Fortran names"Declared as X in ICON"docstrings indycore_states.pydycore_wrapper.py) — these are Fortran API boundary names💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.