From a398b2b0ced9a16b7e2b762cc8cb75697b3d5f1a Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:50:58 +0000 Subject: [PATCH 01/12] update all nml files and unit-tests --- .../adjoint_tests/example/configuration.nml | 2 + .../gravity_wave/example/configuration.nml | 2 + .../compute_q_operator_kernel_mod_test.pf | 4 +- .../initial_buoyancy_kernel_mod_test.pf | 4 +- .../gungho_model/example/configuration.nml | 2 + .../lam_example/baroclinic/config_driver.nml | 2 + .../lam_example/baroclinic/config_lam.nml | 2 + .../lam_example/straka/config_driver.nml | 2 + .../lam_example/straka/config_lam.nml | 2 + .../example/configuration.nml | 2 + .../example_forecast/configuration.nml | 2 + .../example_forecast_pseudo/configuration.nml | 2 + .../configuration_op.nml | 2 + .../example_id_tlm_tests/configuration.nml | 2 + .../example_tlm_forecast_tl/configuration.nml | 2 + .../configuration_op.nml | 2 + .../example_tlm_tests/configuration.nml | 2 + .../example_tlm_tests/configuration_dry.nml | 2 + .../configuration_dry_relaxed.nml | 2 + .../algorithm_test_configuration.nml | 2 + applications/jules/example/configuration.nml | 2 + .../lfric2lfric/example/configuration.nml | 2 + .../lfric_atm/example/configuration.nml | 2 + .../lfric_coupled/example/configuration.nml | 2 + .../linear_model/example/configuration.nml | 2 + .../example_file/config_linear.nml | 2 + .../example_file/config_nonlinear.nml | 2 + .../name_transport/example/configuration.nml | 2 + .../kernel/set_name_field_kernel_mod_test.pf | 4 +- .../ngarch/example/configuration_bl.nml | 2 + .../ngarch/example/configuration_casim.nml | 2 + .../shallow_water/example/configuration.nml | 2 + .../kernel/initial_geopot_kernel_mod_test.pf | 4 +- .../initial_swe_buoyancy_kernel_mod_test.pf | 4 +- .../initial_swe_tracer_kernel_mod_test.pf | 4 +- .../kernel/initial_swe_u_kernel_mod_test.pf | 5 +- applications/solver/example/configuration.nml | 2 + .../transport/example/configuration.nml | 2 + ...ial_tracer_field_sample_kernel_mod_test.pf | 4 +- .../set_tracer_field_kernel_mod_test.pf | 4 +- dependencies.yaml | 4 +- .../jedi_lfric_time_test_configuration.nml | 2 + rose-stem/app/gungho_model/rose-app.conf | 2 + rose-stem/app/lfric_atm/rose-app.conf | 2 + .../resources/cma_test_configuration.nml | 2 + .../orography/assign_orography_field_mod.F90 | 837 ++++++++++-------- ...compute_coriolis_matrix_kernel_mod_test.pf | 4 +- .../compute_dl_matrix_kernel_mod_test.pf | 4 +- ...te_vert_coriolis_matrix_kernel_mod_test.pf | 4 +- ...kinetic_energy_gradient_kernel_mod_test.pf | 4 +- .../lagged_orog_operator_kernel_mod_test.pf | 4 +- .../project_eos_pressure_kernel_mod_test.pf | 4 +- .../project_eos_rho_kernel_mod_test.pf | 4 +- .../rhs_project_eos_kernel_mod_test.pf | 4 +- .../vorticity_rhs_kernel_mod_test.pf | 4 +- .../compute_energetics_kernel_mod_test.pf | 4 +- .../compute_entropy_kernel_mod_test.pf | 4 +- .../compute_moist_mass_kernel_mod_test.pf | 4 +- .../compute_total_aam_kernel_mod_test.pf | 4 +- .../compute_total_pv_kernel_mod_test.pf | 4 +- .../diagnostics/reference_profile_mod_test.pf | 4 +- .../leonard_term_kl_kernel_mod_test.pf | 4 +- .../leonard_term_th_kernel_mod_test.pf | 4 +- .../momentum_viscosity_kernel_mod_test.pf | 4 +- ...tracer_smagorinsky_diff_kernel_mod_test.pf | 4 +- .../tracer_viscosity_kernel_mod_test.pf | 4 +- .../deep_hot_jupiter_kernel_mod_test.pf | 4 +- .../earth_like_kernel_mod_test.pf | 4 +- .../held_suarez_kernel_mod_test.pf | 4 +- .../shallow_hot_jupiter_kernel_mod_test.pf | 4 +- .../tidally_locked_earth_kernel_mod_test.pf | 4 +- .../hydrostatic_exner_kernel_mod_test.pf | 4 +- .../initial_rho_sample_kernel_mod_test.pf | 4 +- .../initial_u_kernel_mod_test.pf | 4 +- .../initialisation/set_rho_kernel_mod_test.pf | 4 +- .../create_w2bmask_kernel_mod_test.pf | 4 +- .../create_w2mask_blend_kernel_mod_test.pf | 4 +- .../create_w2mask_kernel_mod_test.pf | 4 +- .../create_w2mask_lbc_kernel_mod_test.pf | 4 +- .../create_w2mask_tang_kernel_mod_test.pf | 4 +- .../create_w3mask_blend_kernel_mod_test.pf | 4 +- .../create_w3mask_kernel_mod_test.pf | 4 +- .../create_w3mask_lbc_kernel_mod_test.pf | 4 +- ...create_wthetamask_blend_kernel_mod_test.pf | 4 +- .../create_wthetamask_kernel_mod_test.pf | 4 +- .../create_wthetamask_lbc_kernel_mod_test.pf | 4 +- .../eliminated_theta_q22_kernel_mod_test.pf | 4 +- .../project_eos_operators_kernel_mod_test.pf | 4 +- .../solver/weighted_div_kernel_mod_test.pf | 4 +- .../solver/weighted_m3_kernel_mod_test.pf | 4 +- .../calc_upwind_detj_at_w2_kernel_mod_test.pf | 4 +- .../panel_edge_coords_kernel_mod_test.pf | 4 +- .../panel_edge_weights_kernel_mod_test.pf | 4 +- .../vorticity_advection_kernel_mod_test.pf | 5 +- .../w2_vorticity_advection_kernel_mod_test.pf | 5 +- ...poly1d_advective_coeffs_kernel_mod_test.pf | 5 +- .../mol/poly1d_flux_coeffs_kernel_mod_test.pf | 5 +- ...poly2d_advective_coeffs_kernel_mod_test.pf | 5 +- .../mol/poly2d_flux_coeffs_kernel_mod_test.pf | 5 +- ...ytic_orography_field_cartesian_mod_test.pf | 19 +- ...ytic_orography_field_spherical_mod_test.pf | 20 +- .../ancil_orography_cartesian_mod_test.pf | 19 +- .../ancil_orography_spherical_mod_test.pf | 19 +- .../resources/runge_kutta_configuration.nml | 2 + .../resources/semi_implicit_configuration.nml | 2 + .../initial_theta_ref_kernel_mod_test.pf | 4 +- ...kinetic_energy_gradient_kernel_mod_test.pf | 4 +- ...tl_project_eos_pressure_kernel_mod_test.pf | 4 +- .../tl_rhs_project_eos_kernel_mod_test.pf | 4 +- .../tl_rhs_sample_eos_kernel_mod_test.pf | 4 +- .../tl_sample_eos_pressure_kernel_mod_test.pf | 4 +- .../tl_vorticity_advection_kernel_mod_test.pf | 4 +- 112 files changed, 798 insertions(+), 477 deletions(-) diff --git a/applications/adjoint_tests/example/configuration.nml b/applications/adjoint_tests/example/configuration.nml index 84ce2a779..19260dfbf 100644 --- a/applications/adjoint_tests/example/configuration.nml +++ b/applications/adjoint_tests/example/configuration.nml @@ -54,6 +54,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/gravity_wave/example/configuration.nml b/applications/gravity_wave/example/configuration.nml index 615f9d0bc..a0d7e7095 100644 --- a/applications/gravity_wave/example/configuration.nml +++ b/applications/gravity_wave/example/configuration.nml @@ -32,6 +32,8 @@ start_dump_filename = '' &finite_element cellshape = 'quadrilateral' coord_order = 1 +coord_order_multigrid = 1, +coord_space = 'Wchi', coord_system = 'native' element_order_h = 0 element_order_v = 0 diff --git a/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf b/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf index e4337c084..ecde0750a 100644 --- a/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf +++ b/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf @@ -31,7 +31,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only: cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only: feign_finite_element_config implicit none @@ -42,6 +42,8 @@ contains cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & coord_system=coord_system_xyz, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=1_i_def, & element_order_v=1_i_def, & rehabilitate=.true., & diff --git a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf index 8a3ca705d..cfb66af04 100644 --- a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf +++ b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf @@ -28,7 +28,7 @@ contains stretching_method_linear use sci_chi_transform_mod, only : init_chi_transforms use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_finite_element_config, & @@ -60,6 +60,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/applications/gungho_model/example/configuration.nml b/applications/gungho_model/example/configuration.nml index ea60b8aa1..a9f920a1e 100644 --- a/applications/gungho_model/example/configuration.nml +++ b/applications/gungho_model/example/configuration.nml @@ -48,6 +48,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wtheta', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/gungho_model/lam_example/baroclinic/config_driver.nml b/applications/gungho_model/lam_example/baroclinic/config_driver.nml index 43d72b197..a8af48cd6 100644 --- a/applications/gungho_model/lam_example/baroclinic/config_driver.nml +++ b/applications/gungho_model/lam_example/baroclinic/config_driver.nml @@ -43,6 +43,8 @@ lbc_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wtheta', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/gungho_model/lam_example/baroclinic/config_lam.nml b/applications/gungho_model/lam_example/baroclinic/config_lam.nml index d63ada536..ca0998f21 100644 --- a/applications/gungho_model/lam_example/baroclinic/config_lam.nml +++ b/applications/gungho_model/lam_example/baroclinic/config_lam.nml @@ -59,6 +59,8 @@ lbc_filename='lbc', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wtheta', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/gungho_model/lam_example/straka/config_driver.nml b/applications/gungho_model/lam_example/straka/config_driver.nml index 82fd2d418..9141d3226 100644 --- a/applications/gungho_model/lam_example/straka/config_driver.nml +++ b/applications/gungho_model/lam_example/straka/config_driver.nml @@ -45,6 +45,8 @@ lbc_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wtheta', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/gungho_model/lam_example/straka/config_lam.nml b/applications/gungho_model/lam_example/straka/config_lam.nml index 636c9e6e0..563c333d2 100644 --- a/applications/gungho_model/lam_example/straka/config_lam.nml +++ b/applications/gungho_model/lam_example/straka/config_lam.nml @@ -57,6 +57,8 @@ lbc_filename='lbc', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wtheta', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example/configuration.nml b/applications/jedi_lfric_tests/example/configuration.nml index b2d3c1ff0..e83ff167b 100644 --- a/applications/jedi_lfric_tests/example/configuration.nml +++ b/applications/jedi_lfric_tests/example/configuration.nml @@ -69,6 +69,8 @@ start_dump_filename='final_pert', cellshape='quadrilateral', coord_order=1, coord_system='native', +coord_order_multigrid=1, +coord_space='Wchi', element_order_h=0, element_order_v=0, rehabilitate=.true., diff --git a/applications/jedi_lfric_tests/example_forecast/configuration.nml b/applications/jedi_lfric_tests/example_forecast/configuration.nml index 016e61fbc..fdf56e773 100644 --- a/applications/jedi_lfric_tests/example_forecast/configuration.nml +++ b/applications/jedi_lfric_tests/example_forecast/configuration.nml @@ -76,6 +76,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml index 9447dfff7..9f1bce5ed 100644 --- a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml +++ b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml @@ -47,6 +47,8 @@ stretching_method='smooth', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml index c179e76eb..f15875635 100644 --- a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml +++ b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml @@ -47,6 +47,8 @@ stretching_method='smooth', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml index 53acee0fc..4e2e01597 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml @@ -106,6 +106,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml index f61e5aab0..5fdfff10e 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml @@ -106,6 +106,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml index 7b9d54bf3..49ecc15ed 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml @@ -106,6 +106,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml index 283c5dafb..fe7d6a8a7 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml @@ -107,6 +107,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml index c9b945825..f802be2ec 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml @@ -106,6 +106,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml index 1296925a7..09f983d90 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml @@ -104,6 +104,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml b/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml index 8f09d097b..d3c250ef0 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml +++ b/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml @@ -22,6 +22,8 @@ element_order_h=0, element_order_v=0, rehabilitate=.true., coord_order=1 +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native' / diff --git a/applications/jules/example/configuration.nml b/applications/jules/example/configuration.nml index fd648227e..862cf4c0b 100644 --- a/applications/jules/example/configuration.nml +++ b/applications/jules/example/configuration.nml @@ -46,6 +46,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/lfric2lfric/example/configuration.nml b/applications/lfric2lfric/example/configuration.nml index b70cd2d22..a1b9e89ef 100644 --- a/applications/lfric2lfric/example/configuration.nml +++ b/applications/lfric2lfric/example/configuration.nml @@ -38,6 +38,8 @@ element_order_h = 0, element_order_v = 0, rehabilitate = .true., coord_order = 1, +coord_order_multigrid = 1, +coord_space = 'Wchi', / &io diff --git a/applications/lfric_atm/example/configuration.nml b/applications/lfric_atm/example/configuration.nml index 5301f68ed..d4ed1438d 100644 --- a/applications/lfric_atm/example/configuration.nml +++ b/applications/lfric_atm/example/configuration.nml @@ -147,6 +147,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/lfric_coupled/example/configuration.nml b/applications/lfric_coupled/example/configuration.nml index 643f92211..f4843296c 100644 --- a/applications/lfric_coupled/example/configuration.nml +++ b/applications/lfric_coupled/example/configuration.nml @@ -78,6 +78,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wtheta', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/linear_model/example/configuration.nml b/applications/linear_model/example/configuration.nml index 5ed21fc6c..e20716692 100644 --- a/applications/linear_model/example/configuration.nml +++ b/applications/linear_model/example/configuration.nml @@ -48,6 +48,8 @@ ls_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/linear_model/example_file/config_linear.nml b/applications/linear_model/example_file/config_linear.nml index 18df08580..438da326a 100644 --- a/applications/linear_model/example_file/config_linear.nml +++ b/applications/linear_model/example_file/config_linear.nml @@ -45,6 +45,8 @@ ls_filename='ls', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/linear_model/example_file/config_nonlinear.nml b/applications/linear_model/example_file/config_nonlinear.nml index b32d3f15b..4c7a32ede 100644 --- a/applications/linear_model/example_file/config_nonlinear.nml +++ b/applications/linear_model/example_file/config_nonlinear.nml @@ -43,6 +43,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/name_transport/example/configuration.nml b/applications/name_transport/example/configuration.nml index 3bcb4b2f4..0e3207739 100644 --- a/applications/name_transport/example/configuration.nml +++ b/applications/name_transport/example/configuration.nml @@ -32,6 +32,8 @@ element_order_h=0, element_order_v=0, rehabilitate=.true., coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native' vorticity_in_w1=.true., / diff --git a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf index 7ae24e5d4..6c47db606 100644 --- a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf +++ b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf @@ -37,7 +37,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_finite_element_config, & @@ -67,6 +67,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/applications/ngarch/example/configuration_bl.nml b/applications/ngarch/example/configuration_bl.nml index 87c3e5318..bdc1cea37 100644 --- a/applications/ngarch/example/configuration_bl.nml +++ b/applications/ngarch/example/configuration_bl.nml @@ -116,6 +116,8 @@ surface_frac_ancil_path='vegetation/fractions_cci/qrparm.veg.frac.fixed', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/ngarch/example/configuration_casim.nml b/applications/ngarch/example/configuration_casim.nml index 4db857e52..d41f21910 100644 --- a/applications/ngarch/example/configuration_casim.nml +++ b/applications/ngarch/example/configuration_casim.nml @@ -160,6 +160,8 @@ surface_frac_ancil_path='vegetation/fractions_cci/qrparm.veg.frac.fixed', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', element_order_h=0, element_order_v=0, diff --git a/applications/shallow_water/example/configuration.nml b/applications/shallow_water/example/configuration.nml index d4ab292f9..4ac2428db 100644 --- a/applications/shallow_water/example/configuration.nml +++ b/applications/shallow_water/example/configuration.nml @@ -275,6 +275,8 @@ start_dump_directory = '' ! These do not need changing cellshape = 'quadrilateral' coord_order = 1 +coord_order_multigrid = 1 +coord_space = 'Wchi' coord_system = 'native' element_order_h = 0 element_order_v = 0 diff --git a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf index fe44262b4..3fe2e4712 100644 --- a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf @@ -51,7 +51,7 @@ contains feign_planet_config, & feign_shallow_water_settings_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use shallow_water_settings_config_mod, & only : momentum_form_momentum, & @@ -77,6 +77,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf index 3c69d79cb..984d7ce91 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains feign_shallow_water_settings_config use finite_element_config_mod, & only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use shallow_water_settings_config_mod, & only : momentum_form_momentum, & @@ -78,6 +78,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf index 29103cf75..19653ad39 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf @@ -51,7 +51,7 @@ contains feign_planet_config, & feign_shallow_water_settings_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use shallow_water_settings_config_mod, & only : momentum_form_momentum, & @@ -77,6 +77,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf index 846105876..db33c9827 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf @@ -57,7 +57,8 @@ contains feign_shallow_water_test_coeff_config, & feign_shallow_water_settings_config use finite_element_config_mod, only: cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, & + coord_space_wchi use shallow_water_settings_config_mod, only: momentum_form_momentum, & swe_test_swe_gaussian_hill, & time_scheme_semi_implicit @@ -76,6 +77,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & coord_system=coord_system_xyz, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/applications/solver/example/configuration.nml b/applications/solver/example/configuration.nml index 4eaececfd..e7721cddf 100644 --- a/applications/solver/example/configuration.nml +++ b/applications/solver/example/configuration.nml @@ -27,6 +27,8 @@ element_order_h=0, element_order_v=0, rehabilitate=.true., coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native', / diff --git a/applications/transport/example/configuration.nml b/applications/transport/example/configuration.nml index e240dc3ad..e99ba84d7 100644 --- a/applications/transport/example/configuration.nml +++ b/applications/transport/example/configuration.nml @@ -32,6 +32,8 @@ element_order_h=0, element_order_v=0, rehabilitate=.true., coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native' vorticity_in_w1=.true., / diff --git a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf index 7fcd8dc18..da3155fa4 100644 --- a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf @@ -46,7 +46,7 @@ contains feign_idealised_config, & feign_initial_tracer_field_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use idealised_config_mod, only : test_slotted_cylinder implicit none @@ -65,6 +65,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf index 04e00da19..3e7b4c0d4 100644 --- a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf @@ -49,7 +49,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_finite_element_config, & @@ -79,6 +79,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/dependencies.yaml b/dependencies.yaml index caab36487..791bdf83d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,8 +30,8 @@ lfric_apps: ref: lfric_core: - source: git@github.com:MetOffice/lfric_core.git - ref: 2025.12.1 + source: git@github.com:tommbendall/lfric_core.git + ref: TBendall/CoordSpace moci: source: git@github.com:MetOffice/moci.git diff --git a/interfaces/jedi_lfric_interface/integration-test/time/resources/jedi_lfric_time_test_configuration.nml b/interfaces/jedi_lfric_interface/integration-test/time/resources/jedi_lfric_time_test_configuration.nml index 08bd34982..9a6529b6c 100644 --- a/interfaces/jedi_lfric_interface/integration-test/time/resources/jedi_lfric_time_test_configuration.nml +++ b/interfaces/jedi_lfric_interface/integration-test/time/resources/jedi_lfric_time_test_configuration.nml @@ -22,6 +22,8 @@ element_order_h=0, element_order_v=0, rehabilitate=.true., coord_order=1 +coord_order_multigrid=1, +coord_space='Wchi', coord_system='native' / diff --git a/rose-stem/app/gungho_model/rose-app.conf b/rose-stem/app/gungho_model/rose-app.conf index d4bc76fa1..6e300935f 100644 --- a/rose-stem/app/gungho_model/rose-app.conf +++ b/rose-stem/app/gungho_model/rose-app.conf @@ -390,6 +390,8 @@ start_dump_filename='' [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wtheta' coord_system='native' element_order_h=0 element_order_v=0 diff --git a/rose-stem/app/lfric_atm/rose-app.conf b/rose-stem/app/lfric_atm/rose-app.conf index d7f7988a5..723211c48 100644 --- a/rose-stem/app/lfric_atm/rose-app.conf +++ b/rose-stem/app/lfric_atm/rose-app.conf @@ -415,6 +415,8 @@ surface_frac_ancil_path='vegetation/fractions_cci/qrparm.veg.frac.fixed' [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wtheta' coord_system='native' element_order_h=0 element_order_v=0 diff --git a/science/gungho/integration-test/cma_test/resources/cma_test_configuration.nml b/science/gungho/integration-test/cma_test/resources/cma_test_configuration.nml index d0821e849..e9897d51e 100644 --- a/science/gungho/integration-test/cma_test/resources/cma_test_configuration.nml +++ b/science/gungho/integration-test/cma_test/resources/cma_test_configuration.nml @@ -25,6 +25,8 @@ element_order_v = 0 rehabilitate = .true. coord_order = 1 + coord_order_multigrid = 1 + coord_space = 'Wchi' coord_system = 'native' vorticity_in_w1 = .false. / diff --git a/science/gungho/source/orography/assign_orography_field_mod.F90 b/science/gungho/source/orography/assign_orography_field_mod.F90 index 7b08cf38a..0669560cb 100644 --- a/science/gungho/source/orography/assign_orography_field_mod.F90 +++ b/science/gungho/source/orography/assign_orography_field_mod.F90 @@ -1,32 +1,34 @@ -!----------------------------------------------------------------------------- +!------------------------------------------------------------------------------- ! (C) Crown copyright 2017 Met Office. All rights reserved. ! The file LICENCE, distributed with this code, contains details of the terms ! under which the code may be used. -!----------------------------------------------------------------------------- - -!----------------------------------------------------------------------- -!> @brief Module to assign the values of the surface height to model -!> coordinates using either an analytic orography function or from -!> a surface_altitude field. -!> Note that unlike other algorithms, this is breaks encapsulation in order to -!> write to the chi field. This is an exception and only allowed in the set up -!> phase of the model. Generally, the chi field is read only (and this is -!> enforced through PSyClone). +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +!> @brief Updates the model's coordinates to include orography. +!> @details Module to assign the values of the surface height to model +!! coordinates using either an analytic orography function or from a +!! surface_altitude field. +!! Note that unlike other algorithms, this is breaks encapsulation in +!! order to write to the chi field. This is an exception and only +!! allowed in the set up phase of the model. Generally, the chi field +!! is read only (and this is enforced through PSyClone). !------------------------------------------------------------------------------- module assign_orography_field_mod use constants_mod, only : r_def, i_def, l_def - use orography_config_mod, only : orog_init_option, & - orog_init_option_analytic, & - orog_init_option_ancil, & - orog_init_option_none, & + use orography_config_mod, only : orog_init_option, & + orog_init_option_analytic, & + orog_init_option_ancil, & + orog_init_option_none, & orog_init_option_start_dump - use base_mesh_config_mod, only : geometry, & - geometry_spherical, & - topology, & - topology_fully_periodic - use finite_element_config_mod, only : coord_system, & - coord_order, & + use base_mesh_config_mod, only : geometry, & + geometry_spherical, & + topology, & + topology_fully_periodic, & + prime_mesh_name + use finite_element_config_mod, only : coord_system, & + coord_order, & coord_system_xyz use mesh_collection_mod, only : mesh_collection use coord_transform_mod, only : xyz2llr, llr2xyz @@ -43,7 +45,6 @@ module assign_orography_field_mod LOG_LEVEL_ERROR use fs_continuity_mod, only : W0, Wchi use function_space_mod, only : BASIS - use surface_altitude_alg_mod, only : surface_altitude_alg implicit none @@ -60,49 +61,64 @@ module assign_orography_field_mod interface - subroutine analytic_orography_interface(nlayers, & - ndf_chi, undf_chi, map_chi, & - ndf_pid, undf_pid, map_pid, & - domain_surface, domain_height, & + subroutine analytic_orography_interface(nlayers, & + ndf_chi, undf_chi, map_chi, & + ndf_pid, undf_pid, map_pid, & + domain_surface, domain_height, & + chi_1_in, chi_2_in, chi_3_in, & chi_1, chi_2, chi_3, panel_id) - import :: r_def, i_def + + import :: i_def, r_def + implicit none - integer(kind=i_def), intent(in) :: nlayers, undf_chi, undf_pid - integer(kind=i_def), intent(in) :: ndf_chi, ndf_pid - integer(kind=i_def), intent(in) :: map_chi(ndf_chi), map_pid(ndf_pid) - real(kind=r_def), intent(in) :: domain_surface, domain_height - real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi), chi_3(undf_chi) - real(kind=r_def), intent(in) :: panel_id(undf_pid) + + integer(kind=i_def), intent(in) :: nlayers, undf_chi, undf_pid + integer(kind=i_def), intent(in) :: ndf_chi, ndf_pid + integer(kind=i_def), intent(in) :: map_chi(ndf_chi), map_pid(ndf_pid) + real(kind=r_def), intent(in) :: domain_surface, domain_height + real(kind=r_def), intent(in) :: chi_1_in(undf_chi) + real(kind=r_def), intent(in) :: chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi) + real(kind=r_def), intent(inout) :: chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) + real(kind=r_def), intent(in) :: panel_id(undf_pid) + end subroutine analytic_orography_interface end interface interface - subroutine ancil_orography_interface(nlayers, & - chi_1, chi_2, chi_3, & - panel_id, & - surface_altitude, & - domain_surface, domain_height, & - ndf_chi, undf_chi, & - map_chi, & - ndf_pid, undf_pid, & - map_pid, & - ndf, undf, & - map, basis & - ) - import :: r_def, i_def + subroutine ancil_orography_interface(nlayers, & + chi_1, chi_2, chi_3, & + chi_1_in, chi_2_in, chi_3_in, & + panel_id, & + surface_altitude, & + domain_surface, domain_height, & + ndf_chi, undf_chi, map_chi, & + ndf_pid, undf_pid, map_pid, & + ndf, undf, map, basis) + + import :: i_def, r_def + implicit none - integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid - integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid - integer(kind=i_def), dimension(ndf), intent(in) :: map - integer(kind=i_def), dimension(ndf_chi), intent(in) :: map_chi - integer(kind=i_def), dimension(ndf_pid), intent(in) :: map_pid - real(kind=r_def), intent(in), dimension(ndf, ndf_chi) :: basis - real(kind=r_def), dimension(undf_chi), intent(inout) :: chi_1, chi_2, chi_3 - real(kind=r_def), dimension(undf_pid), intent(in) :: panel_id - real(kind=r_def), dimension(undf), intent(in) :: surface_altitude - real(kind=r_def), intent(in) :: domain_surface, domain_height + + integer(kind=i_def), intent(in) :: nlayers, undf_chi, undf_pid, undf + integer(kind=i_def), intent(in) :: ndf_chi, ndf_pid, ndf + integer(kind=i_def), intent(in) :: map_chi(ndf_chi), map_pid(ndf_pid) + integer(kind=i_def), intent(in) :: map(ndf) + real(kind=r_def), intent(in) :: basis(ndf,ndf_chi) + real(kind=r_def), intent(in) :: domain_surface, domain_height + real(kind=r_def), intent(in) :: surface_altitude(undf) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi) + real(kind=r_def), intent(in) :: chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi) + real(kind=r_def), intent(inout) :: chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) + real(kind=r_def), intent(in) :: panel_id(undf_pid) + end subroutine ancil_orography_interface end interface @@ -120,73 +136,65 @@ end subroutine ancil_orography_interface !> routines calculate analytic orography from horizontal coordinates or else !> use the surface_altitude field and then update the vertical coordinate. !> - !> @param[in,out] chi_inventory Contains all of the model's coordinate - !! fields, itemised by mesh - !> @param[in] panel_id_inventory Contains all of the model's panel ID - !! fields, itemised by mesh - !> @param[in] mesh Mesh to apply orography to - !> @param[in] surface_altitude Field containing the surface altitude + !> @param[in,out] chi_inventory Contains all of the model's coordinate + !! fields, itemised by mesh + !> @param[in] panel_id_inventory Contains all of the model's panel ID + !! fields, itemised by mesh + !> @param[in] mesh Mesh to apply orography to + !> @param[in] surface_altitude_w0 Field containing the surface altitude !============================================================================= - subroutine assign_orography_field(chi_inventory, panel_id_inventory, & - mesh, surface_altitude) + subroutine assign_orography_field(chi_inventory, panel_id_inventory, & + mesh, surface_altitude_w0) use inventory_by_mesh_mod, only : inventory_by_mesh_type use field_mod, only : field_type, field_proxy_type use mesh_mod, only : mesh_type use domain_mod, only : domain_type use orography_helper_functions_mod, only : set_horizontal_domain_size - use function_space_collection_mod, only : function_space_collection - use orography_config_mod, only : orog_init_option, & - orog_init_option_ancil, & + use orography_config_mod, only : orog_init_option, & + orog_init_option_ancil, & orog_init_option_start_dump use sci_field_minmax_alg_mod, only : log_field_minmax implicit none ! Arguments - type( inventory_by_mesh_type ), intent( inout ) :: chi_inventory - type( inventory_by_mesh_type ), intent( in ) :: panel_id_inventory - type( mesh_type ), intent( in ), pointer :: mesh + type(inventory_by_mesh_type), intent(inout) :: chi_inventory + type(inventory_by_mesh_type), intent(in) :: panel_id_inventory + type(mesh_type), pointer, intent(in) :: mesh ! We keep the surface_altitude as an optional argument since it is ! not needed for miniapps that only want analytic orography - type( field_type ), intent( in ), optional :: surface_altitude + type(field_type), optional, intent(in) :: surface_altitude_w0 ! Local variables - type( field_type ), pointer :: chi(:) => null() - type( field_type ), pointer :: panel_id => null() - type( field_proxy_type ) :: chi_proxy(3) - type( field_proxy_type ) :: panel_id_proxy - type( domain_type ) :: domain + type(field_type), pointer :: chi(:) + type(field_type), pointer :: panel_id + type(field_type) :: chi_in(3) + type(field_proxy_type) :: chi_proxy(3) + type(field_proxy_type) :: chi_in_proxy(3) + type(field_proxy_type) :: panel_id_proxy + type(domain_type) :: domain real(kind=r_def) :: domain_height, domain_surface integer(kind=i_def) :: cell integer(kind=i_def) :: undf_chi, ndf_chi, nlayers integer(kind=i_def) :: undf_pid, ndf_pid integer(kind=i_def) :: undf_sf, ndf_sf - integer(kind=i_def), pointer :: map_chi(:,:) => null() - integer(kind=i_def), pointer :: map_pid(:,:) => null() - integer(kind=i_def), pointer :: map_sf(:,:) => null() + integer(kind=i_def), pointer :: map_chi(:,:) + integer(kind=i_def), pointer :: map_pid(:,:) + integer(kind=i_def), pointer :: map_sf(:,:) - integer(kind=i_def) :: surface_order_h, surface_order_v - type( mesh_type ), pointer :: sf_mesh - type( field_type ) :: surface_altitude_w0 - type( field_proxy_type ) :: sfc_alt_proxy + type(field_proxy_type) :: sfc_alt_proxy - real(kind=r_def), pointer :: nodes(:,:) => null() - integer(kind=i_def) :: dim_sf, df, df_sf + real(kind=r_def), pointer :: nodes(:,:) + integer(kind=i_def) :: dim_sf, df, df_sf, depth ! Procedure pointer procedure(analytic_orography_interface), pointer :: analytic_orography => null() - procedure(ancil_orography_interface), pointer :: ancil_orography => null() + procedure(ancil_orography_interface), pointer :: ancil_orography => null() real(kind=r_def), allocatable :: basis_sf_on_chi(:,:,:) - if (coord_order == 0 .and. orog_init_option/=orog_init_option_none) then - call log_event( "assign_orography_field: "// & - "Orography assignment is currently only available with coord_order > 0.", & - LOG_LEVEL_ERROR ) - end if - call chi_inventory%get_field_array(mesh, chi) call panel_id_inventory%get_field(mesh, panel_id) @@ -200,19 +208,21 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & ! Get domain top from the mesh object and domain_surface domain_height = mesh%get_domain_top() + domain_surface - if (orog_init_option==orog_init_option_none) then + select case (orog_init_option) + case (orog_init_option_none) - call log_event( "assign_orography_field: "// & - "Flat surface requested.", LOG_LEVEL_INFO ) + call log_event( & + "assign_orography_field: Flat surface requested.", LOG_LEVEL_INFO & + ) - else if (orog_init_option==orog_init_option_analytic) then + case (orog_init_option_analytic) call log_event( "assign_orography_field: "// & "Assigning analytic orography.", LOG_LEVEL_INFO ) ! Point to appropriate procedure to assign orography - if ( geometry == geometry_spherical ) then - if ( coord_system == coord_system_xyz ) then + if (geometry == geometry_spherical) then + if (coord_system == coord_system_xyz) then analytic_orography => analytic_orography_spherical_xyz else analytic_orography => analytic_orography_spherical_native @@ -221,12 +231,20 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & analytic_orography => analytic_orography_cartesian end if + ! Copy chi to chi_in, to allow adjustment of continuous chi fields + call chi(1)%copy_field_properties(chi_in(1)) + call chi(2)%copy_field_properties(chi_in(2)) + call chi(3)%copy_field_properties(chi_in(3)) + ! Break encapsulation and get the proxy - chi_proxy(1) = chi(1)%get_proxy() - chi_proxy(2) = chi(2)%get_proxy() - chi_proxy(3) = chi(3)%get_proxy() - undf_chi = chi_proxy(1)%vspace%get_undf() - ndf_chi = chi_proxy(1)%vspace%get_ndf() + chi_proxy(1) = chi(1)%get_proxy() + chi_proxy(2) = chi(2)%get_proxy() + chi_proxy(3) = chi(3)%get_proxy() + chi_in_proxy(1) = chi_in(1)%get_proxy() + chi_in_proxy(2) = chi_in(2)%get_proxy() + chi_in_proxy(3) = chi_in(3)%get_proxy() + undf_chi = chi_proxy(1)%vspace%get_undf() + ndf_chi = chi_proxy(1)%vspace%get_ndf() panel_id_proxy = panel_id%get_proxy() undf_pid = panel_id_proxy%vspace%get_undf() ndf_pid = panel_id_proxy%vspace%get_ndf() @@ -235,34 +253,32 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & map_chi => chi_proxy(1)%vspace%get_whole_dofmap() map_pid => panel_id_proxy%vspace%get_whole_dofmap() + ! Copy data values into "chi_in" fields + chi_in_proxy(1)%data = chi_proxy(1)%data + chi_in_proxy(2)%data = chi_proxy(2)%data + chi_in_proxy(3)%data = chi_proxy(3)%data + ! Call column procedure - do cell = 1,chi_proxy(1)%vspace%get_ncell() - - call analytic_orography(nlayers, & - ndf_chi, & - undf_chi, & - map_chi(:,cell), & - ndf_pid, & - undf_pid, & - map_pid(:,cell), & - domain_surface, & - domain_height, & - chi_proxy(1)%data, & - chi_proxy(2)%data, & - chi_proxy(3)%data, & - panel_id_proxy%data ) + do cell = 1, chi_proxy(1)%vspace%get_ncell() + call analytic_orography( & + nlayers, ndf_chi, undf_chi, map_chi(:,cell), & + ndf_pid, undf_pid, map_pid(:,cell), & + domain_surface, domain_height, & + chi_in_proxy(1)%data, chi_in_proxy(2)%data, & + chi_in_proxy(3)%data, & + chi_proxy(1)%data, chi_proxy(2)%data, chi_proxy(3)%data, & + panel_id_proxy%data & + ) end do - - else if (orog_init_option==orog_init_option_ancil .or. & - orog_init_option==orog_init_option_start_dump) then + case (orog_init_option_ancil, orog_init_option_start_dump) call log_event( "assign_orography_field: "// & "Assigning orography from surface_altitude field.", LOG_LEVEL_INFO ) ! Point to appropriate procedure to assign orography - if ( geometry == geometry_spherical ) then - if ( coord_system == coord_system_xyz ) then + if (geometry == geometry_spherical) then + if (coord_system == coord_system_xyz) then ancil_orography => ancil_orography_spherical_xyz else ancil_orography => ancil_orography_spherical_sph @@ -271,34 +287,18 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & ancil_orography => ancil_orography_cartesian end if - if ( present(surface_altitude) ) then - - ! Set up the surface altitude field on W0 points - sf_mesh => surface_altitude%get_mesh() - surface_order_h = surface_altitude%get_element_order_h() - surface_order_v = surface_altitude%get_element_order_v() - call surface_altitude_w0%initialise( vector_space = & - function_space_collection%get_fs(sf_mesh, surface_order_h, & - surface_order_v, W0), & - halo_depth = sf_mesh%get_halo_depth() ) - - if (surface_altitude%which_function_space()==W0) then - call surface_altitude%copy_field_serial(surface_altitude_w0) - else - call surface_altitude_alg( surface_altitude_w0, surface_altitude ) - end if - - call log_field_minmax( LOG_LEVEL_INFO, 'srf_alt', surface_altitude ) - call log_field_minmax( LOG_LEVEL_INFO, 'srf_alt_w0', & - surface_altitude_w0 ) - - nullify ( sf_mesh ) - end if + ! Copy chi to chi_in, to allow adjustment of continuous chi fields + call chi(1)%copy_field_properties(chi_in(1)) + call chi(2)%copy_field_properties(chi_in(2)) + call chi(3)%copy_field_properties(chi_in(3)) ! Break encapsulation and get the proxy chi_proxy(1) = chi(1)%get_proxy() chi_proxy(2) = chi(2)%get_proxy() chi_proxy(3) = chi(3)%get_proxy() + chi_in_proxy(1) = chi_in(1)%get_proxy() + chi_in_proxy(2) = chi_in(2)%get_proxy() + chi_in_proxy(3) = chi_in(3)%get_proxy() panel_id_proxy = panel_id%get_proxy() sfc_alt_proxy = surface_altitude_w0%get_proxy() @@ -314,6 +314,11 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & map_sf => sfc_alt_proxy%vspace%get_whole_dofmap() map_pid => panel_id_proxy%vspace%get_whole_dofmap() + ! Copy data values into "chi_in" fields + chi_in_proxy(1)%data = chi_proxy(1)%data + chi_in_proxy(2)%data = chi_proxy(2)%data + chi_in_proxy(3)%data = chi_proxy(3)%data + dim_sf = sfc_alt_proxy%vspace%get_dim_space() nodes => chi_proxy(1)%vspace%get_nodes() allocate(basis_sf_on_chi(dim_sf, ndf_sf, ndf_chi)) @@ -328,33 +333,27 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & end do ! Ensure halo is clean - call sfc_alt_proxy%halo_exchange( & - depth=sfc_alt_proxy%get_field_proxy_halo_depth()) + depth = sfc_alt_proxy%get_field_proxy_halo_depth() + if (sfc_alt_proxy%is_dirty(depth=depth)) then + call sfc_alt_proxy%halo_exchange(depth=depth) + end if ! Call column procedure - do cell = 1,chi_proxy(1)%vspace%get_ncell() - - call ancil_orography(nlayers, & - chi_proxy(1)%data, & - chi_proxy(2)%data, & - chi_proxy(3)%data, & - panel_id_proxy%data, & - sfc_alt_proxy%data, & - domain_surface, domain_height, & - ndf_chi, undf_chi, & - map_chi(:,cell), & - ndf_pid, undf_pid, & - map_pid(:,cell), & - ndf_sf, undf_sf, & - map_sf(:,cell), & - basis_sf_on_chi) + do cell = 1, chi_proxy(1)%vspace%get_ncell() + call ancil_orography( & + nlayers, chi_proxy(1)%data, chi_proxy(2)%data, chi_proxy(3)%data, & + chi_in_proxy(1)%data, chi_in_proxy(2)%data, chi_in_proxy(3)%data, & + panel_id_proxy%data, sfc_alt_proxy%data, & + domain_surface, domain_height, & + ndf_chi, undf_chi, map_chi(:,cell), & + ndf_pid, undf_pid, map_pid(:,cell), & + ndf_sf, undf_sf, map_sf(:,cell), basis_sf_on_chi & + ) end do deallocate(basis_sf_on_chi) - end if - - nullify(chi, panel_id) + end select end subroutine assign_orography_field @@ -371,22 +370,27 @@ end subroutine assign_orography_field !> (x,y,z) form. !> !> @param[in] nlayers Number of vertical layers - !> @param[in] ndf_chi Array size and loop bound for map_chi - !> @param[in] undf_chi Column coordinates' array size and loop bound + !> @param[in] ndf_chi Num DoFs per cell for map_chi + !> @param[in] undf_chi Column coordinates' num DoFs this partition !> @param[in] map_chi Indirection map for coordinate field - !> @param[in] ndf_pid Array size and loop bound for map_pid - !> @param[in] undf_pid Panel ID array size and loop bound + !> @param[in] ndf_pid Num DoFs per cell for map_pid + !> @param[in] undf_pid Panel ID num DoFs this partition !> @param[in] map_pid Indirection map for panel_id !> @param[in] domain_surface Physical height of flat domain surface (m) - !> @param[in] domain_height Physical height of domain top (m) - !> @param[in,out] chi_1 1st coordinate field in Wchi - !> @param[in,out] chi_2 2nd coordinate field in Wchi - !> @param[in,out] chi_3 3rd coordinate field in Wchi + !> @param[in] domain_height Physical height of domain top (m) + !> @param[in] chi_1_in 1st coordinate field in Wchi (input) + !> @param[in] chi_2_in 2nd coordinate field in Wchi (input) + !> @param[in] chi_3_in 3rd coordinate field in Wchi (input) + !> @param[in,out] chi_1 1st coordinate field in Wchi (output) + !> @param[in,out] chi_2 2nd coordinate field in Wchi (output) + !> @param[in,out] chi_3 3rd coordinate field in Wchi (output) !> @param[in] panel_id Field giving the ID for mesh panels !============================================================================= - subroutine analytic_orography_spherical_xyz(nlayers, ndf_chi, undf_chi, map_chi, & - ndf_pid, undf_pid, map_pid, & - domain_surface, domain_height, & + subroutine analytic_orography_spherical_xyz(nlayers, & + ndf_chi, undf_chi, map_chi, & + ndf_pid, undf_pid, map_pid, & + domain_surface, domain_height, & + chi_1_in, chi_2_in, chi_3_in, & chi_1, chi_2, chi_3, panel_id) implicit none @@ -397,7 +401,10 @@ subroutine analytic_orography_spherical_xyz(nlayers, ndf_chi, undf_chi, map_chi, integer(kind=i_def), intent(in) :: map_chi(ndf_chi) integer(kind=i_def), intent(in) :: map_pid(ndf_pid) real(kind=r_def), intent(in) :: domain_surface, domain_height - real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi), chi_3(undf_chi) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi), chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) real(kind=r_def), intent(in) :: panel_id(undf_pid) ! Internal variables integer(kind=i_def) :: k, df, dfk @@ -413,9 +420,12 @@ subroutine analytic_orography_spherical_xyz(nlayers, ndf_chi, undf_chi, map_chi, do k = 0, nlayers-1 dfk = map_chi(df)+k - ! Model coordinates for spherical domain are in (x,y,z) form so they need - ! to be converted to (long,lat,r) first - call xyz2llr(chi_1(dfk), chi_2(dfk), chi_3(dfk), longitude, latitude, r) + ! Model coordinates for spherical domain are in (x,y,z) form so they + ! need to be converted to (long,lat,r) first + call xyz2llr( & + chi_1_in(dfk), chi_2_in(dfk), chi_3_in(dfk), & + longitude, latitude, r & + ) ! Calculate surface height for each DoF using selected analytic orography surface_height = orography_profile%analytic_orography(longitude, latitude) @@ -426,16 +436,21 @@ subroutine analytic_orography_spherical_xyz(nlayers, ndf_chi, undf_chi, map_chi, select case(stretching_method) case(stretching_method_linear) - chi_3_r = eta2z_linear(eta, domain_surface + surface_height, domain_height) + chi_3_r = eta2z_linear( & + eta, domain_surface + surface_height, domain_height & + ) case default - chi_3_r = domain_surface + & - eta2z_smooth(eta, surface_height, domain_depth, stretching_height) + chi_3_r = ( & + domain_surface + eta2z_smooth( & + eta, surface_height, domain_depth, stretching_height & + ) & + ) end select ! Convert spherical coordinates back to model (x,y,z) form - call llr2xyz(longitude, latitude, chi_3_r, & - chi_1(dfk), chi_2(dfk), chi_3(dfk)) - + call llr2xyz( & + longitude, latitude, chi_3_r, chi_1(dfk), chi_2(dfk), chi_3(dfk) & + ) end do end do @@ -450,31 +465,29 @@ end subroutine analytic_orography_spherical_xyz !> cubed sphere (alpha,beta,r) or (lon,lat,r) coordinates. !> !> @param[in] nlayers Number of vertical layers - !> @param[in] ndf_chi Array size and loop bound for map_chi - !> @param[in] undf_chi Column coordinates' array size and loop bound + !> @param[in] ndf_chi Num DoFs per cell for map_chi + !> @param[in] undf_chi Column coordinates' num DoFs this partition !> @param[in] map_chi Indirection map for coordinate field - !> @param[in] ndf_pid Array size and loop bound for map_pid - !> @param[in] undf_pid Panel ID array size and loop bound - !> @param[in] map_pid Indirection map for panel_id + !> @param[in] ndf_pid Num DoFs per cell for map_pid + !> @param[in] undf_pid Panel ID num DoFs this partition + !> @param[in] map_pid Indirection map for panel_id !> @param[in] domain_surface Physical height of flat domain surface (m) - !> @param[in] domain_height Physical height of domain top (m) - !> @param[in,out] chi_1 1st coordinate field in Wchi - !> @param[in,out] chi_2 2nd coordinate field in Wchi - !> @param[in,out] chi_3 3rd coordinate field in Wchi + !> @param[in] domain_height Physical height of domain top (m) + !> @param[in] chi_1_in 1st coordinate field in Wchi (input) + !> @param[in] chi_2_in 2nd coordinate field in Wchi (input) + !> @param[in] chi_3_in 3rd coordinate field in Wchi (input) + !> @param[in,out] chi_1 1st coordinate field in Wchi (output) + !> @param[in,out] chi_2 2nd coordinate field in Wchi (output) + !> @param[in,out] chi_3 3rd coordinate field in Wchi (output) !> @param[in] panel_id Field giving the ID for mesh panels !============================================================================= - subroutine analytic_orography_spherical_native(nlayers, & - ndf_chi, & - undf_chi, & - map_chi, & - ndf_pid, & - undf_pid, & - map_pid, & - domain_surface, & - domain_height, & - chi_1, & - chi_2, & - chi_3, & + subroutine analytic_orography_spherical_native(nlayers, & + ndf_chi, undf_chi, map_chi, & + ndf_pid, undf_pid, map_pid, & + domain_surface, & + domain_height, & + chi_1_in, chi_2_in, chi_3_in, & + chi_1, chi_2, chi_3, & panel_id) implicit none @@ -485,7 +498,10 @@ subroutine analytic_orography_spherical_native(nlayers, & integer(kind=i_def), intent(in) :: map_chi(ndf_chi) integer(kind=i_def), intent(in) :: map_pid(ndf_pid) real(kind=r_def), intent(in) :: domain_surface, domain_height - real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi), chi_3(undf_chi) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi), chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) real(kind=r_def), intent(in) :: panel_id(undf_pid) ! Internal variables integer(kind=i_def) :: k, df, dfk, ipanel @@ -504,22 +520,26 @@ subroutine analytic_orography_spherical_native(nlayers, & ! Model coordinates need to be converted to (long,lat,r) for reading ! analytic orography - radius = chi_3(dfk) + domain_surface - call chi2llr(chi_1(dfk), chi_2(dfk), radius, & - ipanel, longitude, latitude, dummy_radius) + radius = chi_3_in(dfk) + domain_surface + call chi2llr( & + chi_1_in(dfk), chi_2_in(dfk), radius, ipanel, & + longitude, latitude, dummy_radius & + ) ! Calculate surface height for each DoF using selected analytic orography surface_height = orography_profile%analytic_orography(longitude, latitude) ! Calculate nondimensional coordinate from current height coordinate ! (chi_3) with flat domain_surface - eta = z2eta_linear(chi_3(dfk), 0.0_r_def, domain_depth) + eta = z2eta_linear(chi_3_in(dfk), 0.0_r_def, domain_depth) select case(stretching_method) case(stretching_method_linear) chi_3(dfk) = eta2z_linear(eta, surface_height, domain_depth) case default - chi_3(dfk) = eta2z_smooth(eta, surface_height, domain_depth, stretching_height) + chi_3(dfk) = eta2z_smooth( & + eta, surface_height, domain_depth, stretching_height & + ) end select end do @@ -537,23 +557,30 @@ end subroutine analytic_orography_spherical_native !> coordinate. !> !> @param[in] nlayers Number of vertical layers - !> @param[in] ndf_chi Array size and loop bound for map_chi - !> @param[in] undf_chi Column coordinates' array size and loop bound + !> @param[in] ndf_chi Num DoFs per cell for map_chi + !> @param[in] undf_chi Column coordinates' num DoFs this partition !> @param[in] map_chi Indirection map for coordinate field - !> @param[in] ndf_pid Array size and loop bound for map_pid - !> @param[in] undf_pid Panel ID array size and loop bound + !> @param[in] ndf_pid Num DoFs per cell for map_pid + !> @param[in] undf_pid Panel ID num DoFs this partition !> @param[in] map_pid Indirection map for panel_id !> @param[in] domain_surface Physical height of flat domain surface (m) - !> @param[in] domain_height Physical height of domain top (m) - !> @param[in,out] chi_1 1st coordinate field in Wchi - !> @param[in,out] chi_2 2nd coordinate field in Wchi - !> @param[in,out] chi_3 3rd coordinate field in Wchi + !> @param[in] domain_height Physical height of domain top (m) + !> @param[in] chi_1_in 1st coordinate field in Wchi (input) + !> @param[in] chi_2_in 2nd coordinate field in Wchi (input) + !> @param[in] chi_3_in 3rd coordinate field in Wchi (input) + !> @param[in,out] chi_1 1st coordinate field in Wchi (output) + !> @param[in,out] chi_2 2nd coordinate field in Wchi (output) + !> @param[in,out] chi_3 3rd coordinate field in Wchi (output) !> @param[in] panel_id Field giving the ID for mesh panels !============================================================================= - subroutine analytic_orography_cartesian(nlayers, ndf_chi, undf_chi, map_chi, & + subroutine analytic_orography_cartesian(nlayers, & + ndf_chi, undf_chi, map_chi, & ndf_pid, undf_pid, map_pid, & - domain_surface, domain_height, & - chi_1, chi_2, chi_3, panel_id) + domain_surface, & + domain_height, & + chi_1_in, chi_2_in, chi_3_in, & + chi_1, chi_2, chi_3, & + panel_id) implicit none @@ -563,7 +590,10 @@ subroutine analytic_orography_cartesian(nlayers, ndf_chi, undf_chi, map_chi, & integer(kind=i_def), intent(in) :: map_chi(ndf_chi) integer(kind=i_def), intent(in) :: map_pid(ndf_pid) real(kind=r_def), intent(in) :: domain_surface, domain_height - real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi), chi_3(undf_chi) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi), chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi), chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) real(kind=r_def), intent(in) :: panel_id(undf_pid) ! Internal variables @@ -578,19 +608,24 @@ subroutine analytic_orography_cartesian(nlayers, ndf_chi, undf_chi, map_chi, & do k = 0, nlayers-1 dfk = map_chi(df)+k - ! Calculate surface height for each DoF using selected analytic orography - surface_height = orography_profile%analytic_orography(chi_1(dfk), chi_2(dfk)) + ! Calculate surf height for each DoF using selected analytic orography + surface_height = orography_profile%analytic_orography( & + chi_1_in(dfk), chi_2_in(dfk) & + ) ! Calculate nondimensional coordinate from current height coordinate ! (chi_3) with flat domain_surface - eta = z2eta_linear(chi_3(dfk), domain_surface, domain_height) + eta = z2eta_linear(chi_3_in(dfk), domain_surface, domain_height) select case(stretching_method) case(stretching_method_linear) - chi_3(dfk) = eta2z_linear(eta, domain_surface + surface_height, domain_height) + chi_3(dfk) = eta2z_linear( & + eta, domain_surface + surface_height, domain_height & + ) case default - chi_3(dfk) = domain_surface + & - eta2z_smooth(eta, surface_height, domain_depth, stretching_height) + chi_3(dfk) = domain_surface + eta2z_smooth( & + eta, surface_height, domain_depth, stretching_height & + ) end select end do end do @@ -599,61 +634,62 @@ subroutine analytic_orography_cartesian(nlayers, ndf_chi, undf_chi, map_chi, & end subroutine analytic_orography_cartesian !============================================================================= - !> @brief Modify vertical coordinate based on the input surface_altitude field. - !> For spherical geometries with a Cartesian coordinate system. - !> Note that this routine assumes the chi coordinates in a column are - !> associated with a flat domain on input and then modified on output. - !> Therefore it will not operate correctly with a horizontally continuous chi - !> field. - !> - !> @param[in] nlayers Number of vertical layers - !> @param[in,out] chi_1 1st coordinate field in Wchi - !> @param[in,out] chi_2 2nd coordinate field in Wchi - !> @param[in,out] chi_3 3rd coordinate field in Wchi - !> @param[in] panel_id Field giving the ID for mesh panels + !> @brief Modify vertical coordinate based on input surface_altitude field. + !! For spherical geometries with a Cartesian coordinate system. + !> @param[in] nlayers Number of vertical layers + !> @param[in,out] chi_1 1st coordinate field in Wchi (output) + !> @param[in,out] chi_2 2nd coordinate field in Wchi (output) + !> @param[in,out] chi_3 3rd coordinate field in Wchi (output)# + !> @param[in] chi_1_in 1st coordinate field in Wchi (input) + !> @param[in] chi_2_in 2nd coordinate field in Wchi (input) + !> @param[in] chi_3_in 3rd coordinate field in Wchi (input) + !> @param[in] panel_id Field giving the ID for mesh panels !> @param[in] surface_altitude Surface altitude field data - !> @param[in] domain_surface Physical height of flat domain surface (m) - !> @param[in] domain_height Physical height of domain top (m) - !> @param[in] ndf_chi Array size and loop bound for map_chi - !> @param[in] undf_chi Column coordinates' array size and loop bound - !> @param[in] map_chi Indirection map for coordinate field - !> @param[in] ndf_pid Array size and loop bound for map_pid - !> @param[in] undf_pid Panel ID array size and loop bound - !> @param[in] map_pid Indirection map for pid - !> @param[in] ndf Array size and loop bound for surface altitude field - !> @param[in] undf Total number of dofs for surface altitude field - !> @param[in] map Indirection map for surface altitude field - !> @param[in] basis Basis functions for surface altitude field + !> @param[in] domain_surface Physical height of flat domain surface (m) + !> @param[in] domain_height Physical height of domain top (m) + !> @param[in] ndf_chi Num DoFs per cell for map_chi + !> @param[in] undf_chi Column coords' num DoFs this partition + !> @param[in] map_chi Indirection map for coordinate field + !> @param[in] ndf_pid Num DoFs per cell for map_pid + !> @param[in] undf_pid Panel ID num DoFs this partition + !> @param[in] map_pid Indirection map for pid + !> @param[in] ndf Num DoFs per cell for surface altitude + !> @param[in] undf Num DoFs this partition for surf altitude + !> @param[in] map Indirection map for surface altitude + !> @param[in] basis Basis functions for surface altitude !============================================================================= - subroutine ancil_orography_spherical_xyz(nlayers, & - chi_1, chi_2, chi_3, & - panel_id, & - surface_altitude, & - domain_surface, domain_height, & - ndf_chi, undf_chi, & - map_chi, & - ndf_pid, undf_pid, & - map_pid, & - ndf, undf, & - map, basis & + subroutine ancil_orography_spherical_xyz(nlayers, & + chi_1, chi_2, chi_3, & + chi_1_in, chi_2_in, chi_3_in, & + panel_id, & + surface_altitude, & + domain_surface, domain_height, & + ndf_chi, undf_chi, & + map_chi, & + ndf_pid, undf_pid, & + map_pid, & + ndf, undf, & + map, basis & ) implicit none ! Arguments - integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid - integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid - - integer(kind=i_def), dimension(ndf), intent(in) :: map - integer(kind=i_def), dimension(ndf_chi), intent(in) :: map_chi - integer(kind=i_def), dimension(ndf_pid), intent(in) :: map_pid - - real(kind=r_def), intent(in), dimension(ndf, ndf_chi) :: basis - - real(kind=r_def), dimension(undf_chi), intent(inout) :: chi_1, chi_2, chi_3 - real(kind=r_def), dimension(undf_pid), intent(in) :: panel_id - real(kind=r_def), dimension(undf), intent(in) :: surface_altitude - real(kind=r_def), intent(in) :: domain_surface, domain_height + integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid + integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid + integer(kind=i_def), intent(in) :: map(ndf) + integer(kind=i_def), intent(in) :: map_chi(ndf_chi) + integer(kind=i_def), intent(in) :: map_pid(ndf_pid) + real(kind=r_def), intent(in) :: basis(ndf, ndf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi) + real(kind=r_def), intent(inout) :: chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi) + real(kind=r_def), intent(in) :: chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(in) :: panel_id(undf_pid) + real(kind=r_def), intent(in) :: surface_altitude(undf) + real(kind=r_def), intent(in) :: domain_surface, domain_height ! Internal variables integer(kind=i_def) :: k, df, dfchi, dfk @@ -667,7 +703,8 @@ subroutine ancil_orography_spherical_xyz(nlayers, & surface_height(:) = 0.0_r_def do dfchi = 1, ndf_chi do df = 1, ndf - surface_height(dfchi) = surface_height(dfchi) + surface_altitude(map(df))*basis(df,dfchi) + surface_height(dfchi) = surface_height(dfchi) & + + surface_altitude(map(df))*basis(df, dfchi) end do end do @@ -678,7 +715,9 @@ subroutine ancil_orography_spherical_xyz(nlayers, & ! Model coordinates for spherical domain are in (x,y,z) form so they need ! to be converted to (long,lat,r) first - call xyz2llr(chi_1(dfk), chi_2(dfk), chi_3(dfk), longitude, latitude, r) + call xyz2llr( & + chi_1_in(dfk), chi_2_in(dfk), chi_3_in(dfk), longitude, latitude, r & + ) ! Calculate nondimensional coordinate from current flat height coordinate ! (chi_3) with flat domain_surface @@ -688,77 +727,82 @@ subroutine ancil_orography_spherical_xyz(nlayers, & ! nondimensional coordinate eta and surface_height select case(stretching_method) case(stretching_method_linear) - chi_3_r = eta2z_linear(eta, domain_surface+surface_height(df), domain_height) + chi_3_r = eta2z_linear( & + eta, domain_surface+surface_height(df), domain_height & + ) case default - chi_3_r = domain_surface + & - eta2z_smooth(eta, surface_height(df), domain_depth, stretching_height) + chi_3_r = domain_surface + eta2z_smooth( & + eta, surface_height(df), domain_depth, stretching_height & + ) end select ! Convert spherical coordinates back to model (x,y,z) form - call llr2xyz(longitude, latitude, chi_3_r, & - chi_1(dfk), chi_2(dfk), chi_3(dfk)) + call llr2xyz( & + longitude, latitude, chi_3_r, chi_1(dfk), chi_2(dfk), chi_3(dfk) & + ) end do end do end subroutine ancil_orography_spherical_xyz !============================================================================= - !> @brief Modify vertical coordinate based on the input surface_altitude field. - !> For spherical geometries with (alpha,beta,r) or (lon,lat,r) - !> coordinate systems. - !> Note that this routine assumes the chi coordinates in a column are - !> associated with a flat domain on input and then modified on output. - !> Therefore it will not operate correctly with a horizontally continuous chi - !> field. - !> - !> @param[in] nlayers Number of vertical layers - !> @param[in,out] chi_1 1st coordinate field in Wchi - !> @param[in,out] chi_2 2nd coordinate field in Wchi - !> @param[in,out] chi_3 3rd coordinate field in Wchi - !> @param[in] panel_id Field giving the ID for mesh panels + !> @brief Modify vertical coordinate based on input surface_altitude field. + !! For spherical geometries with (alpha,beta,r) or (lon,lat,r) + !! coordinate systems. + !> @param[in] nlayers Number of vertical layers + !> @param[in,out] chi_1 1st coordinate field in Wchi (output) + !> @param[in,out] chi_2 2nd coordinate field in Wchi (output) + !> @param[in,out] chi_3 3rd coordinate field in Wchi (output)# + !> @param[in] chi_1_in 1st coordinate field in Wchi (input) + !> @param[in] chi_2_in 2nd coordinate field in Wchi (input) + !> @param[in] chi_3_in 3rd coordinate field in Wchi (input) + !> @param[in] panel_id Field giving the ID for mesh panels !> @param[in] surface_altitude Surface altitude field data - !> @param[in] domain_surface Physical height of flat domain surface (m) - !> @param[in] domain_height Physical height of domain top (m) - !> @param[in] ndf_chi Array size and loop bound for map_chi - !> @param[in] undf_chi Column coordinates' array size and loop bound - !> @param[in] map_chi Indirection map for coordinate field - !> @param[in] ndf_pid Array size and loop bound for map_pid - !> @param[in] undf_pid Panel ID array size and loop bound - !> @param[in] map_pid Indirection map for panel ID - !> @param[in] ndf Array size and loop bound for surface altitude field - !> @param[in] undf Total number of dofs for surface altitude field - !> @param[in] map Indirection map for surface altitude field - !> @param[in] basis Basis functions for surface altitude field + !> @param[in] domain_surface Physical height of flat domain surface (m) + !> @param[in] domain_height Physical height of domain top (m) + !> @param[in] ndf_chi Num DoFs per cell for map_chi + !> @param[in] undf_chi Column coords' num DoFs this partition + !> @param[in] map_chi Indirection map for coordinate field + !> @param[in] ndf_pid Num DoFs per cell for map_pid + !> @param[in] undf_pid Panel ID num DoFs this partition + !> @param[in] map_pid Indirection map for pid + !> @param[in] ndf Num DoFs per cell for surface altitude + !> @param[in] undf Num DoFs this partition for surf altitude + !> @param[in] map Indirection map for surface altitude + !> @param[in] basis Basis functions for surface altitude !============================================================================= - subroutine ancil_orography_spherical_sph(nlayers, & - chi_1, chi_2, chi_3, & - panel_id, & - surface_altitude, & - domain_surface, domain_height, & - ndf_chi, undf_chi, & - map_chi, & - ndf_pid, undf_pid, & - map_pid, & - ndf, undf, & - map, basis & + subroutine ancil_orography_spherical_sph(nlayers, & + chi_1, chi_2, chi_3, & + chi_1_in, chi_2_in, chi_3_in, & + panel_id, & + surface_altitude, & + domain_surface, domain_height, & + ndf_chi, undf_chi, & + map_chi, & + ndf_pid, undf_pid, & + map_pid, & + ndf, undf, & + map, basis & ) implicit none ! Arguments - integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid - integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid - - integer(kind=i_def), dimension(ndf), intent(in) :: map - integer(kind=i_def), dimension(ndf_chi), intent(in) :: map_chi - integer(kind=i_def), dimension(ndf_pid), intent(in) :: map_pid - - real(kind=r_def), intent(in), dimension(ndf, ndf_chi) :: basis - - real(kind=r_def), dimension(undf_chi), intent(inout) :: chi_1, chi_2, chi_3 - real(kind=r_def), dimension(undf_pid), intent(in) :: panel_id - real(kind=r_def), dimension(undf), intent(in) :: surface_altitude - real(kind=r_def), intent(in) :: domain_surface, domain_height + integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid + integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid + integer(kind=i_def), intent(in) :: map(ndf) + integer(kind=i_def), intent(in) :: map_chi(ndf_chi) + integer(kind=i_def), intent(in) :: map_pid(ndf_pid) + real(kind=r_def), intent(in) :: basis(ndf, ndf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi) + real(kind=r_def), intent(inout) :: chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi) + real(kind=r_def), intent(in) :: chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(in) :: panel_id(undf_pid) + real(kind=r_def), intent(in) :: surface_altitude(undf) + real(kind=r_def), intent(in) :: domain_surface, domain_height ! Internal variables integer(kind=i_def) :: k, df, dfchi, dfk @@ -771,7 +815,8 @@ subroutine ancil_orography_spherical_sph(nlayers, & surface_height(:) = 0.0_r_def do dfchi = 1, ndf_chi do df = 1, ndf - surface_height(dfchi) = surface_height(dfchi) + surface_altitude(map(df))*basis(df,dfchi) + surface_height(dfchi) = surface_height(dfchi) & + + surface_altitude(map(df))*basis(df,dfchi) end do end do @@ -782,7 +827,7 @@ subroutine ancil_orography_spherical_sph(nlayers, & ! Calculate nondimensional coordinate from current flat height coordinate ! (chi_3) with flat domain_surface - eta = z2eta_linear(chi_3(dfk), 0.0_r_def, domain_depth) + eta = z2eta_linear(chi_3_in(dfk), 0.0_r_def, domain_depth) ! Calculate new height coordinate from its nondimensional coordinate ! eta and surface_height @@ -790,7 +835,9 @@ subroutine ancil_orography_spherical_sph(nlayers, & case(stretching_method_linear) chi_3(dfk) = eta2z_linear(eta, surface_height(df), domain_depth) case default - chi_3(dfk) = eta2z_smooth(eta, surface_height(df), domain_depth, stretching_height) + chi_3(dfk) = eta2z_smooth( & + eta, surface_height(df), domain_depth, stretching_height & + ) end select end do end do @@ -798,61 +845,62 @@ subroutine ancil_orography_spherical_sph(nlayers, & end subroutine ancil_orography_spherical_sph !============================================================================= - !> @brief Modify vertical coordinate based on the input surface_altitude field. - !> For Cartesian geometries. - !> Note that this routine assumes the chi coordinates in a column are - !> associated with a flat domain on input and then modified on output. - !> Therefore it will not operate correctly with a horizontally continuous chi - !> field. - !> - !> @param[in] nlayers Number of vertical layers - !> @param[in,out] chi_1 1st coordinate field in Wchi - !> @param[in,out] chi_2 2nd coordinate field in Wchi - !> @param[in,out] chi_3 3rd coordinate field in Wchi - !> @param[in] panel_id Field giving the ID for mesh panels + !> @brief Modify vertical coordinate based on input surface_altitude field. + !! For Cartesian geometries. + !> @param[in] nlayers Number of vertical layers + !> @param[in,out] chi_1 1st coordinate field in Wchi (output) + !> @param[in,out] chi_2 2nd coordinate field in Wchi (output) + !> @param[in,out] chi_3 3rd coordinate field in Wchi (output) + !> @param[in] chi_1_in 1st coordinate field in Wchi (input) + !> @param[in] chi_2_in 2nd coordinate field in Wchi (input) + !> @param[in] chi_3_in 3rd coordinate field in Wchi (input) + !> @param[in] panel_id Field giving the ID for mesh panels !> @param[in] surface_altitude Surface altitude field data - !> @param[in] domain_surface Physical height of flat domain surface (m) - !> @param[in] domain_height Physical height of domain top (m) - !> @param[in] ndf_chi Array size and loop bound for map_chi - !> @param[in] undf_chi Column coordinates' array size and loop bound - !> @param[in] map_chi Indirection map for coordinate field - !> @param[in] ndf_pid Array size and loop bound for map_pid - !> @param[in] undf_pid Panel ID array size and loop bound - !> @param[in] map_pid Indirection map for panel_id - !> @param[in] ndf Array size and loop bound for surface altitude field - !> @param[in] undf Total number of dofs for surface altitude field - !> @param[in] map Indirection map for surface altitude field - !> @param[in] basis Basis functions for surface altitude field + !> @param[in] domain_surface Physical height of flat domain surface (m) + !> @param[in] domain_height Physical height of domain top (m) + !> @param[in] ndf_chi Num DoFs per cell for map_chi + !> @param[in] undf_chi Column coords' num DoFs this partition + !> @param[in] map_chi Indirection map for coordinate field + !> @param[in] ndf_pid Num DoFs per cell for map_pid + !> @param[in] undf_pid Panel ID num DoFs this partition + !> @param[in] map_pid Indirection map for pid + !> @param[in] ndf Num DoFs per cell for surface altitude + !> @param[in] undf Num DoFs this partition for surf altitude + !> @param[in] map Indirection map for surface altitude + !> @param[in] basis Basis functions for surface altitude !============================================================================= - subroutine ancil_orography_cartesian(nlayers, & - chi_1, chi_2, chi_3, & - panel_id, & - surface_altitude, & - domain_surface, domain_height, & - ndf_chi, undf_chi, & - map_chi, & - ndf_pid, undf_pid, & - map_pid, & - ndf, undf, & - map, basis & + subroutine ancil_orography_cartesian(nlayers, & + chi_1, chi_2, chi_3, & + chi_1_in, chi_2_in, chi_3_in, & + panel_id, & + surface_altitude, & + domain_surface, domain_height, & + ndf_chi, undf_chi, & + map_chi, & + ndf_pid, undf_pid, & + map_pid, & + ndf, undf, & + map, basis & ) implicit none ! Arguments - integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid - integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid - - integer(kind=i_def), dimension(ndf), intent(in) :: map - integer(kind=i_def), dimension(ndf_chi), intent(in) :: map_chi - integer(kind=i_def), dimension(ndf_pid), intent(in) :: map_pid - - real(kind=r_def), intent(in), dimension(ndf, ndf_chi) :: basis - - real(kind=r_def), dimension(undf_chi), intent(inout) :: chi_1, chi_2, chi_3 - real(kind=r_def), dimension(undf_pid), intent(in) :: panel_id - real(kind=r_def), dimension(undf), intent(in) :: surface_altitude - real(kind=r_def), intent(in) :: domain_surface, domain_height + integer(kind=i_def), intent(in) :: nlayers, ndf, ndf_chi, ndf_pid + integer(kind=i_def), intent(in) :: undf, undf_chi, undf_pid + integer(kind=i_def), intent(in) :: map(ndf) + integer(kind=i_def), intent(in) :: map_chi(ndf_chi) + integer(kind=i_def), intent(in) :: map_pid(ndf_pid) + real(kind=r_def), intent(in) :: basis(ndf, ndf_chi) + real(kind=r_def), intent(inout) :: chi_1(undf_chi) + real(kind=r_def), intent(inout) :: chi_2(undf_chi) + real(kind=r_def), intent(inout) :: chi_3(undf_chi) + real(kind=r_def), intent(in) :: chi_1_in(undf_chi) + real(kind=r_def), intent(in) :: chi_2_in(undf_chi) + real(kind=r_def), intent(in) :: chi_3_in(undf_chi) + real(kind=r_def), intent(in) :: panel_id(undf_pid) + real(kind=r_def), intent(in) :: surface_altitude(undf) + real(kind=r_def), intent(in) :: domain_surface, domain_height ! Internal variables integer(kind=i_def) :: k, df, dfchi, dfk @@ -865,7 +913,8 @@ subroutine ancil_orography_cartesian(nlayers, & surface_height(:) = 0.0_r_def do dfchi = 1, ndf_chi do df = 1, ndf - surface_height(dfchi) = surface_height(dfchi) + surface_altitude(map(df))*basis(df,dfchi) + surface_height(dfchi) = surface_height(dfchi) & + + surface_altitude(map(df))*basis(df,dfchi) end do end do @@ -876,16 +925,18 @@ subroutine ancil_orography_cartesian(nlayers, & ! Calculate nondimensional coordinate from current height coordinate ! (chi_3) with flat domain_surface - eta = z2eta_linear(chi_3(dfk), domain_surface, domain_height) + eta = z2eta_linear(chi_3_in(dfk), domain_surface, domain_height) ! Calculate new height coordinate from its nondimensional coordinate ! eta and surface_height select case(stretching_method) case(stretching_method_linear) - chi_3(dfk) = eta2z_linear(eta, domain_surface+surface_height(df), domain_height) + chi_3(dfk) = eta2z_linear( & + eta, domain_surface+surface_height(df), domain_height & + ) case default - chi_3(dfk) = domain_surface + & - eta2z_smooth(eta, surface_height(df), domain_depth, stretching_height) + chi_3(dfk) = domain_surface + eta2z_smooth( & + eta, surface_height(df), domain_depth, stretching_height) end select end do end do diff --git a/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf index 658e676fd..1d8a4cea2 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf @@ -43,7 +43,7 @@ contains use base_mesh_config_mod, only : geometry_planar, & topology_fully_periodic use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use formulation_config_mod, only : eos_method_sampled, & moisture_formulation_dry use feign_config_mod, only : feign_base_mesh_config, & @@ -70,6 +70,8 @@ contains element_order_v=0_i_def, & rehabilitate=.true., & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & vorticity_in_w1=.false. ) diff --git a/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf index 348fb1efa..ad2da74af 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf @@ -45,7 +45,7 @@ contains runge_kutta_method_ssp3 use extrusion_config_mod, only: method_uniform, stretching_method_linear use finite_element_config_mod, only: cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only: init_chi_transforms implicit none @@ -61,6 +61,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf index dc3e55e0d..802fa0bdd 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf @@ -48,7 +48,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native + coord_system_native, coord_space_wchi use formulation_config_mod, only : eos_method_sampled, & moisture_formulation_dry use feign_config_mod, only : feign_base_mesh_config, & @@ -86,6 +86,8 @@ contains element_order_v=0_i_def, & rehabilitate=.true., & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_native, & vorticity_in_w1=.false. & ) diff --git a/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf index aa9b4b51b..722dd7814 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf @@ -50,7 +50,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use formulation_config_mod, only : eos_method_sampled, & moisture_formulation_dry use feign_config_mod, only : feign_finite_element_config, & @@ -64,6 +64,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/core_dynamics/lagged_orog_operator_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/lagged_orog_operator_kernel_mod_test.pf index 8e4e36223..ccf6f45c6 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/lagged_orog_operator_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/lagged_orog_operator_kernel_mod_test.pf @@ -33,7 +33,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config implicit none @@ -43,6 +43,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=1_i_def, & element_order_v=1_i_def, & diff --git a/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf index 7dbe255e1..60153cc5b 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf @@ -47,7 +47,7 @@ contains feign_planet_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use initial_temperature_config_mod, & only : perturb_none use sci_chi_transform_mod, only : init_chi_transforms @@ -69,6 +69,8 @@ contains eta_values=(/0.5_r_def/) ) call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf index f08a05fd7..46eef8ca7 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf @@ -58,7 +58,7 @@ contains use base_mesh_config_mod, only : geometry_planar, & topology_fully_periodic use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_initial_temperature_config, & feign_finite_element_config @@ -78,6 +78,8 @@ contains fplane=.false., f_lat_deg=0.0_r_def ) call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf index 47193101b..66ae3a874 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf @@ -57,7 +57,7 @@ contains use base_mesh_config_mod, only : geometry_planar, & topology_fully_periodic use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_initial_temperature_config, & feign_planet_config, & @@ -78,6 +78,8 @@ contains fplane=.false., f_lat_deg=0.0_r_def ) call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf index f5751b76d..0317f811f 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf @@ -31,7 +31,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -42,6 +42,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf index e9e92bf81..29a50f04f 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf @@ -57,7 +57,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -68,6 +68,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf index 6e4dd39b0..e45c95794 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf @@ -46,7 +46,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf index 63133246b..a1c76a750 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf @@ -50,7 +50,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -61,6 +61,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf index 851d06ebc..38206a930 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf @@ -46,7 +46,7 @@ contains stretching_method_linear use sci_chi_transform_mod, only : init_chi_transforms use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_extrusion_config, & feign_finite_element_config, & feign_base_mesh_config, & @@ -71,6 +71,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf index 4eae5a9be..0002972ed 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf @@ -49,7 +49,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_extrusion_config, & feign_finite_element_config, & feign_planet_config, & @@ -76,6 +76,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/diagnostics/reference_profile_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/reference_profile_mod_test.pf index b31ac6b98..07223a7f0 100644 --- a/science/gungho/unit-test/kernel/diagnostics/reference_profile_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/reference_profile_mod_test.pf @@ -48,7 +48,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_initial_temperature_config, & @@ -97,6 +97,8 @@ contains call feign_finite_element_config( & cellshape = cellshape_quadrilateral, & coord_order = 0_i_def, & + coord_order_multigrid = 1_i_def, & + coord_space = coord_space_wchi, & coord_system = coord_system_xyz, & element_order_h = 0_i_def, & element_order_v = 0_i_def, & diff --git a/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf index b11b8e28a..265b4f69e 100644 --- a/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf @@ -37,7 +37,7 @@ contains use feign_config_mod, only : feign_finite_element_config, & feign_mixing_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use mixing_config_mod, only : method_3d_smag, & smag_l_calc, smag_l_calc_UseDx @@ -59,6 +59,8 @@ contains element_order_h=0_i_def, & element_order_v=0_i_def, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & rehabilitate=.true., & vorticity_in_w1=.false. ) diff --git a/science/gungho/unit-test/kernel/diffusion/leonard_term_th_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/leonard_term_th_kernel_mod_test.pf index 0d63fc078..6ee076ef7 100644 --- a/science/gungho/unit-test/kernel/diffusion/leonard_term_th_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/leonard_term_th_kernel_mod_test.pf @@ -36,7 +36,7 @@ contains use feign_config_mod, only : feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -47,6 +47,8 @@ contains element_order_h=0_i_def, & element_order_v=0_i_def, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & rehabilitate=.true., & vorticity_in_w1=.false. ) diff --git a/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf index 31f0bb9cf..18ff9ac4a 100644 --- a/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf @@ -36,7 +36,7 @@ contains use feign_config_mod, only : feign_finite_element_config use mixing_config_mod, only : method_3d_smag use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -46,6 +46,8 @@ contains cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & coord_system=coord_system_xyz, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf index 604ca9319..a1c550dc3 100644 --- a/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use mixing_config_mod, only : method_3d_smag, smag_l_calc, & smag_l_calc_UseDx use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -59,6 +59,8 @@ contains cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & coord_system=coord_system_xyz, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf index 495c48dff..a09149e64 100644 --- a/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf @@ -32,7 +32,7 @@ contains use feign_config_mod, only : feign_finite_element_config use mixing_config_mod, only : method_3d_smag use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -41,6 +41,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf index 00640b1af..b2388fe1a 100644 --- a/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf @@ -35,7 +35,7 @@ contains feign_planet_config, & feign_timestepping_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use timestepping_config_mod, only : method_semi_implicit, & runge_kutta_method_ssp3 @@ -52,6 +52,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf index 17e485b6b..85984d458 100644 --- a/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf @@ -39,7 +39,7 @@ contains feign_planet_config, & feign_timestepping_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use timestepping_config_mod, only : method_semi_implicit, & runge_kutta_method_ssp3 @@ -56,6 +56,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf index d1e1f11e9..c468b27e6 100644 --- a/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf @@ -37,7 +37,7 @@ contains feign_planet_config, & feign_timestepping_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use timestepping_config_mod, only : method_semi_implicit, & runge_kutta_method_ssp3 @@ -55,6 +55,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf index 854255e9c..a588c7bf3 100644 --- a/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf @@ -37,7 +37,7 @@ contains feign_planet_config, & feign_timestepping_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use timestepping_config_mod, only : method_semi_implicit, & runge_kutta_method_ssp3 @@ -54,6 +54,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf index 5971150fe..a88b7a57a 100644 --- a/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf @@ -36,7 +36,7 @@ contains feign_planet_config, & feign_timestepping_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use sci_chi_transform_mod, only : init_chi_transforms use timestepping_config_mod, only : method_semi_implicit, & runge_kutta_method_ssp3 @@ -53,6 +53,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf index e91b2770c..6aaa75118 100644 --- a/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf @@ -73,7 +73,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_finite_element_config, & @@ -118,6 +118,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf index 4c2b182e8..363d73f3c 100644 --- a/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf @@ -43,7 +43,7 @@ contains feign_idealised_config, & feign_initial_density_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use idealised_config_mod, only : test_constant_field use initial_density_config_mod, only : density_background @@ -66,6 +66,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf index 4ff877458..9731ebd3e 100644 --- a/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf @@ -70,7 +70,7 @@ contains topology_fully_periodic use sci_chi_transform_mod, only : init_chi_transforms use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config, & feign_base_mesh_config, & feign_initial_wind_config @@ -90,6 +90,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf index dac91d1a6..dddbd21fe 100644 --- a/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf @@ -63,7 +63,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_finite_element_config, & @@ -99,6 +99,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w2bmask_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w2bmask_kernel_mod_test.pf index 403f908bc..30206c3e6 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w2bmask_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w2bmask_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w2mask_blend_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w2mask_blend_kernel_mod_test.pf index 9da369349..2423f12fb 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w2mask_blend_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w2mask_blend_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w2mask_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w2mask_kernel_mod_test.pf index 959ddb390..70dbb6903 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w2mask_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w2mask_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w2mask_lbc_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w2mask_lbc_kernel_mod_test.pf index b7c4aa269..3dcb3b93e 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w2mask_lbc_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w2mask_lbc_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w2mask_tang_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w2mask_tang_kernel_mod_test.pf index 42069242d..d14af6437 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w2mask_tang_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w2mask_tang_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w3mask_blend_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w3mask_blend_kernel_mod_test.pf index 63963b6ff..2c49a8208 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w3mask_blend_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w3mask_blend_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w3mask_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w3mask_kernel_mod_test.pf index 41ab8a7ec..cdd97b420 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w3mask_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w3mask_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_w3mask_lbc_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_w3mask_lbc_kernel_mod_test.pf index bc1b4a244..62f8ff04b 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_w3mask_lbc_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_w3mask_lbc_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_wthetamask_blend_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_wthetamask_blend_kernel_mod_test.pf index d30a6ba29..2bff2bf3b 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_wthetamask_blend_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_wthetamask_blend_kernel_mod_test.pf @@ -41,7 +41,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none class(create_wthetamask_blend_test_type), intent(inout) :: this @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_wthetamask_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_wthetamask_kernel_mod_test.pf index 827948041..7604e9576 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_wthetamask_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_wthetamask_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/limited_area/create_wthetamask_lbc_kernel_mod_test.pf b/science/gungho/unit-test/kernel/limited_area/create_wthetamask_lbc_kernel_mod_test.pf index 76c587d60..888878277 100644 --- a/science/gungho/unit-test/kernel/limited_area/create_wthetamask_lbc_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/limited_area/create_wthetamask_lbc_kernel_mod_test.pf @@ -40,7 +40,7 @@ contains use feign_config_mod, only : feign_base_mesh_config, & feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -57,6 +57,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf index 96a0b0d16..caa797d84 100644 --- a/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf @@ -31,7 +31,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -42,6 +42,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf index 4537740b9..912324654 100644 --- a/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf @@ -48,7 +48,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_initial_temperature_config, & @@ -77,6 +77,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & element_order_h=0_i_def, & element_order_v=0_i_def, & rehabilitate=.true., & diff --git a/science/gungho/unit-test/kernel/solver/weighted_div_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/weighted_div_kernel_mod_test.pf index f2698dc97..fc28b3268 100644 --- a/science/gungho/unit-test/kernel/solver/weighted_div_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/weighted_div_kernel_mod_test.pf @@ -42,7 +42,7 @@ contains use feign_config_mod, only : feign_finite_element_config use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi implicit none @@ -51,6 +51,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=1_i_def, & element_order_v=1_i_def, & diff --git a/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf index e23ec3575..e009d5858 100644 --- a/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf @@ -31,7 +31,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -42,6 +42,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/transport/common/calc_upwind_detj_at_w2_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/calc_upwind_detj_at_w2_kernel_mod_test.pf index 4687a3be6..13c2fbe2a 100644 --- a/science/gungho/unit-test/kernel/transport/common/calc_upwind_detj_at_w2_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/calc_upwind_detj_at_w2_kernel_mod_test.pf @@ -35,7 +35,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use formulation_config_mod, only : eos_method_sampled, & moisture_formulation_dry use feign_config_mod, only : feign_finite_element_config, & @@ -48,6 +48,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf index e85a0bc8a..aaf138b33 100644 --- a/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf @@ -35,7 +35,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native + coord_system_native, coord_space_wchi use feign_config_mod, only : feign_finite_element_config, & feign_base_mesh_config, & feign_extrusion_config, & @@ -73,6 +73,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_native, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf index bd34c90e1..a33294632 100644 --- a/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf @@ -35,7 +35,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native + coord_system_native, coord_space_wchi use feign_config_mod, only : feign_finite_element_config, & feign_base_mesh_config, & feign_extrusion_config, & @@ -73,6 +73,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_native, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf index fd1051185..492e378d4 100644 --- a/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf @@ -31,7 +31,8 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, & + coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -42,6 +43,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf index 071d03792..17ee1adc4 100644 --- a/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf @@ -31,7 +31,8 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, & + coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms @@ -42,6 +43,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf index d2e8ae4ee..23f29b2ce 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf @@ -31,7 +31,8 @@ contains use base_mesh_config_mod, only: geometry_planar, & topology_fully_periodic use finite_element_config_mod, only: coord_system_xyz, & - cellshape_quadrilateral + cellshape_quadrilateral, & + coord_space_wchi use sci_chi_transform_mod, only: init_chi_transforms implicit none @@ -46,6 +47,8 @@ contains call feign_finite_element_config( cellshape = cellshape_quadrilateral, & coord_order = 1, & + coord_order_multigrid = 1, & + coord_space = coord_space_wchi, & coord_system = coord_system_xyz, & element_order_h = 0, & element_order_v = 0, & diff --git a/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf index 26c6a3be1..11672a13f 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf @@ -31,7 +31,8 @@ contains use base_mesh_config_mod, only: geometry_planar, & topology_fully_periodic use finite_element_config_mod, only: coord_system_xyz, & - cellshape_quadrilateral + cellshape_quadrilateral, & + coord_space_wchi use sci_chi_transform_mod, only: init_chi_transforms implicit none @@ -46,6 +47,8 @@ contains call feign_finite_element_config( cellshape = cellshape_quadrilateral, & coord_order = 1, & + coord_order_multigrid = 1, & + coord_space = coord_space_wchi, & coord_system = coord_system_xyz, & element_order_h = 0, & element_order_v = 0, & diff --git a/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf index eec36089b..6a1dadc15 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf @@ -31,7 +31,8 @@ contains use base_mesh_config_mod, only: geometry_planar, & topology_fully_periodic use finite_element_config_mod, only: coord_system_xyz, & - cellshape_quadrilateral + cellshape_quadrilateral, & + coord_space_wchi use sci_chi_transform_mod, only: init_chi_transforms implicit none @@ -46,6 +47,8 @@ contains call feign_finite_element_config( cellshape = cellshape_quadrilateral, & coord_order = 1, & + coord_order_multigrid = 1, & + coord_space = coord_space_wchi, & coord_system = coord_system_xyz, & element_order_h = 0, & element_order_v = 0, & diff --git a/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf index bc2105654..217811006 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf @@ -31,7 +31,8 @@ contains use base_mesh_config_mod, only: geometry_planar, & topology_fully_periodic use finite_element_config_mod, only: coord_system_xyz, & - cellshape_quadrilateral + cellshape_quadrilateral, & + coord_space_wchi use sci_chi_transform_mod, only: init_chi_transforms implicit none @@ -45,6 +46,8 @@ contains fplane=.false., f_lat_deg=0.0_r_def ) call feign_finite_element_config( cellshape = cellshape_quadrilateral, & coord_order = 1, & + coord_order_multigrid = 1, & + coord_space = coord_space_wchi, & coord_system = coord_system_xyz, & element_order_h = 0, & element_order_v = 0, & diff --git a/science/gungho/unit-test/orography/analytic_orography_field_cartesian_mod_test.pf b/science/gungho/unit-test/orography/analytic_orography_field_cartesian_mod_test.pf index 2ea45a953..043518895 100644 --- a/science/gungho/unit-test/orography/analytic_orography_field_cartesian_mod_test.pf +++ b/science/gungho/unit-test/orography/analytic_orography_field_cartesian_mod_test.pf @@ -58,7 +58,7 @@ contains use base_mesh_config_mod, only : geometry_planar, & topology_fully_periodic use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config, & feign_base_mesh_config, & feign_extrusion_config, & @@ -94,6 +94,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & @@ -183,6 +185,7 @@ contains real(r_def), parameter :: tol = 1.0e-3_r_def real(r_def) :: height_flat_surface, height_domain_top real(r_def) :: chi_1(undf), chi_2(undf), chi_3(undf) + real(r_def) :: chi_1_in(undf), chi_2_in(undf), chi_3_in(undf) real(r_def) :: panel_id(undf) real(r_def) :: eta(0:nlayers) real(r_def) :: vertex_coords_2d(3,1), chi_surf, chi_test @@ -235,13 +238,17 @@ contains do i = 1, undf chi_3(i) = eta2z_linear(eta(i-1), height_flat_surface, height_domain_top) end do + chi_1_in(:) = chi_1(:) + chi_2_in(:) = chi_2(:) + chi_3_in(:) = chi_3(:) panel_id(:) = 1.0_r_def ! Test Cartesian orography assignment - call analytic_orography_cartesian( nlayers, ndf, undf, map, & - ndf, undf, map, & - height_flat_surface, & - height_domain_top, & - chi_1, chi_2, chi_3, & + call analytic_orography_cartesian( nlayers, ndf, undf, map, & + ndf, undf, map, & + height_flat_surface, & + height_domain_top, & + chi_1_in, chi_2_in, chi_3_in, & + chi_1, chi_2, chi_3, & panel_id ) ! Test selected chi_3 diff --git a/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf b/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf index e45d1fd81..223d51af3 100644 --- a/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf +++ b/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf @@ -59,7 +59,8 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, & + coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_finite_element_config, & @@ -119,6 +120,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & @@ -194,6 +197,7 @@ contains real(r_def) :: use_tol real(r_def) :: height_flat_surface, height_domain_top real(r_def) :: chi_1(undf), chi_2(undf), chi_3(undf) + real(r_def) :: chi_1_in(undf), chi_2_in(undf), chi_3_in(undf) real(r_def) :: chi_1_cart(undf), chi_2_cart(undf), chi_3_cart(undf) real(r_def) :: panel_id(undf) real(r_def) :: eta(0:nlayers) @@ -251,11 +255,17 @@ contains call llr2xyz(chi_1(i), chi_2(i), chi_3(i), & chi_1_cart(i), chi_2_cart(i), chi_3_cart(i)) end do + + chi_1_in(:) = chi_1_cart(:) + chi_2_in(:) = chi_2_cart(:) + chi_3_in(:) = chi_3_cart(:) + ! Test spherical orography assignment - call analytic_orography_spherical_xyz( nlayers, ndf, undf, map, & - ndf, undf, map, & - height_flat_surface, & - height_domain_top, & + call analytic_orography_spherical_xyz( nlayers, ndf, undf, map, & + ndf, undf, map, & + height_flat_surface, & + height_domain_top, & + chi_1_in, chi_2_in, chi_3_in, & chi_1_cart, chi_2_cart, chi_3_cart, & panel_id ) ! Transform coordinate field back to (long, lat, r) for comparison diff --git a/science/gungho/unit-test/orography/ancil_orography_cartesian_mod_test.pf b/science/gungho/unit-test/orography/ancil_orography_cartesian_mod_test.pf index bdb77e02b..2562d7e26 100644 --- a/science/gungho/unit-test/orography/ancil_orography_cartesian_mod_test.pf +++ b/science/gungho/unit-test/orography/ancil_orography_cartesian_mod_test.pf @@ -33,7 +33,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config, & feign_base_mesh_config, & feign_extrusion_config @@ -61,6 +61,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & @@ -108,6 +110,7 @@ contains real(r_def), allocatable :: srf_alt_w0(:) real(r_def), allocatable :: multipl_w0_sl(:) real(r_def), allocatable :: chi1(:), chi2(:), chi3(:), panel_id(:) + real(r_def), allocatable :: chi1_in(:), chi2_in(:), chi3_in(:) real(r_def) :: answer @@ -155,6 +158,9 @@ contains allocate( chi1(undf_wchi) ) allocate( chi2(undf_wchi) ) allocate( chi3(undf_wchi) ) + allocate( chi1_in(undf_wchi) ) + allocate( chi2_in(undf_wchi) ) + allocate( chi3_in(undf_wchi) ) allocate( srf_alt_w3(undf_w3_sl) ) allocate( srf_alt_w0(undf_w0_sl) ) allocate( multipl_w0_sl(undf_w0_sl) ) @@ -172,6 +178,11 @@ contains ! This generates the w0 surface_altitude srf_alt_w3(:)=0.0_r_def srf_alt_w3(5)=400.0_r_def + + chi1_in(:) = chi1(:) + chi2_in(:) = chi2(:) + chi3_in(:) = chi3(:) + do cell = 1, ncells call average_w3_to_w0_code(1, & @@ -195,6 +206,9 @@ contains chi1, & chi2, & chi3, & + chi1_in, & + chi2_in, & + chi3_in, & panel_id, & srf_alt_w0, & domain_surface, & @@ -237,6 +251,9 @@ contains deallocate( chi1 ) deallocate( chi2 ) deallocate( chi3 ) + deallocate( chi1_in ) + deallocate( chi2_in ) + deallocate( chi3_in ) deallocate( panel_id ) deallocate( basis_w0_on_wchi ) diff --git a/science/gungho/unit-test/orography/ancil_orography_spherical_mod_test.pf b/science/gungho/unit-test/orography/ancil_orography_spherical_mod_test.pf index 8ca918b03..261f110e0 100644 --- a/science/gungho/unit-test/orography/ancil_orography_spherical_mod_test.pf +++ b/science/gungho/unit-test/orography/ancil_orography_spherical_mod_test.pf @@ -34,7 +34,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config, & feign_base_mesh_config, & feign_extrusion_config @@ -61,6 +61,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & @@ -111,6 +113,7 @@ contains real(r_def), allocatable :: srf_alt_w0(:) real(r_def), allocatable :: multipl_w0_sl(:) real(r_def), allocatable :: chi1(:), chi2(:), chi3(:), panel_id(:) + real(r_def), allocatable :: chi1_in(:), chi2_in(:), chi3_in(:) real(r_def) :: answer, lat, lon, r real(r_def) :: use_tol @@ -159,6 +162,9 @@ contains allocate( chi1(undf_wchi) ) allocate( chi2(undf_wchi) ) allocate( chi3(undf_wchi) ) + allocate( chi1_in(undf_wchi) ) + allocate( chi2_in(undf_wchi) ) + allocate( chi3_in(undf_wchi) ) allocate( srf_alt_w3(undf_w3_sl) ) allocate( srf_alt_w0(undf_w0_sl) ) allocate( multipl_w0_sl(undf_w0_sl) ) @@ -176,6 +182,11 @@ contains ! This generates the w0 surface_altitude srf_alt_w3(:)=0.0_r_def srf_alt_w3(5)=400.0_r_def + + chi1_in(:) = chi1(:) + chi2_in(:) = chi2(:) + chi3_in(:) = chi3(:) + do cell = 1, ncells call average_w3_to_w0_code(1, & @@ -199,6 +210,9 @@ contains chi1, & chi2, & chi3, & + chi1_in, & + chi2_in, & + chi3_in, & panel_id, & srf_alt_w0, & domain_surface, & @@ -266,6 +280,9 @@ contains deallocate( chi1 ) deallocate( chi2 ) deallocate( chi3 ) + deallocate( chi1_in ) + deallocate( chi2_in ) + deallocate( chi3_in ) deallocate( panel_id ) deallocate( basis_w0_on_wchi ) diff --git a/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml b/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml index 9298f96f7..f3321092c 100644 --- a/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml +++ b/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml @@ -47,6 +47,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='xyz', element_order_h=0, element_order_v=0, diff --git a/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml b/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml index 2b208a451..999b6e772 100644 --- a/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml +++ b/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml @@ -47,6 +47,8 @@ start_dump_filename='', &finite_element cellshape='quadrilateral', coord_order=1, +coord_order_multigrid=1, +coord_space='Wchi', coord_system='xyz', element_order_h=0, element_order_v=0, diff --git a/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf index c3b98a7b0..d44aa2138 100644 --- a/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use initial_pressure_config_mod, only : method_balanced use initial_temperature_config_mod, & only : perturb_none @@ -86,6 +86,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf index 9a44a87ab..acc390de6 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf @@ -49,7 +49,7 @@ contains subroutine setUp( this ) use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use formulation_config_mod, only : eos_method_sampled, & moisture_formulation_dry use feign_config_mod, only : feign_finite_element_config, & @@ -63,6 +63,8 @@ contains call feign_finite_element_config( & cellshape = cellshape_quadrilateral, & coord_order = 0_i_def, & + coord_order_multigrid = 1_i_def, & + coord_space = coord_space_wchi, & coord_system = coord_system_xyz, & element_order_h = 0_i_def, & element_order_v = 0_i_def, & diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf index e739d0615..008db1568 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf @@ -42,7 +42,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_initial_temperature_config, & @@ -71,6 +71,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf index c80f072b3..7be6a9fde 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf @@ -57,7 +57,7 @@ contains use base_mesh_config_mod, only : geometry_planar, & topology_fully_periodic use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_initial_temperature_config, & feign_finite_element_config @@ -77,6 +77,8 @@ contains fplane=.false., f_lat_deg=0.0_r_def ) call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_rhs_sample_eos_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_rhs_sample_eos_kernel_mod_test.pf index e347b4128..3b8cf2c4a 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_rhs_sample_eos_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_rhs_sample_eos_kernel_mod_test.pf @@ -57,7 +57,7 @@ contains use base_mesh_config_mod, only : geometry_planar, & topology_fully_periodic use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_initial_temperature_config, & feign_finite_element_config @@ -76,6 +76,8 @@ contains fplane=.false., f_lat_deg=0.0_r_def ) call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf index e1dc1c860..79d885730 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf @@ -42,7 +42,7 @@ contains use extrusion_config_mod, only : method_uniform, & stretching_method_linear use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_base_mesh_config, & feign_extrusion_config, & feign_initial_temperature_config, & @@ -71,6 +71,8 @@ contains call feign_finite_element_config( cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & diff --git a/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf b/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf index 9dea4bf34..a6e8624fb 100644 --- a/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf @@ -12,7 +12,7 @@ module tl_vorticity_advection_kernel_mod_test use finite_element_config_mod, & only : cellshape_quadrilateral, & - coord_system_xyz + coord_system_xyz, coord_space_wchi use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms, & final_chi_transforms @@ -128,6 +128,8 @@ contains call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & coord_order=0_i_def, & + coord_order_multigrid=1_i_def, & + coord_space=coord_space_wchi, & coord_system=coord_system_xyz, & element_order_h=0_i_def, & element_order_v=0_i_def, & From 487faa66f61c27e16928fc39f3245e4b8eca987e Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Thu, 22 Jan 2026 20:49:10 +0000 Subject: [PATCH 02/12] keep Wchi for bubble tests --- rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf | 3 +++ .../app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf | 3 +++ rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf | 3 +++ rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf | 3 +++ .../app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf | 3 +++ rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf | 3 +++ rose-stem/app/solver/rose-app.conf | 2 ++ 7 files changed, 20 insertions(+) diff --git a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf index d1cd6a8b2..1bfcfcb04 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf @@ -6,6 +6,9 @@ geometry='planar' [namelist:extrusion] number_of_layers=100 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf index 93339cdb9..f7ea98e3a 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf @@ -6,6 +6,9 @@ geometry='planar' [namelist:extrusion] number_of_layers=100 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf b/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf index 0194ec96f..1b8dab25c 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf @@ -7,6 +7,9 @@ geometry='planar' domain_height=2400.0 number_of_layers=100 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf index 436275a25..8a630dc41 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf @@ -25,6 +25,9 @@ rim_width_ns=-1 domain_height=1500.0 number_of_layers=150 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf index d950a0730..9bc7827fe 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf @@ -7,6 +7,9 @@ geometry='planar' domain_height=1500.0 number_of_layers=300 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf index 0ea5ca86b..26124c775 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf @@ -7,6 +7,9 @@ geometry='planar' domain_height=1500.0 number_of_layers=150 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/solver/rose-app.conf b/rose-stem/app/solver/rose-app.conf index 51300e343..3cc3be0b6 100644 --- a/rose-stem/app/solver/rose-app.conf +++ b/rose-stem/app/solver/rose-app.conf @@ -47,6 +47,8 @@ planet_radius=6371229.0 [namelist:finite_element] cellshape='quadrilateral' coord_order=2 +coord_order_multigrid=2 +coord_space='Wchi' coord_system='xyz' element_order_h=0 element_order_v=0 From f1d1cc515b94341cf59a1a79f789a97b4e437205 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Thu, 22 Jan 2026 21:24:33 +0000 Subject: [PATCH 03/12] these weren't picked up by upgrade macro --- .../lfric-solver/HEAD/rose-meta.conf | 27 +++++++++++++++++++ rose-stem/app/lfric2um/rose-app.conf | 2 ++ 2 files changed, 29 insertions(+) diff --git a/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf b/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf index e068d8a6e..cd53e9a20 100644 --- a/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf +++ b/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf @@ -280,6 +280,33 @@ range=0: sort-key=Panel-A03 type=integer +[namelist:finite_element=coord_order] +compulsory=true +description=Horizontal polynomial order of the coordinate space. +fail-if=this < 1 ; +help=Horizontal order of the polynomials used to describe the coordinate space. + =The vertical order is determined by the coordinate system. If a native + =coordinates system is chosen, the vertical coordinates are linear. + =If Cartesian coordinates are chosen, the vertical coordinates have the same + =order as the horizontal. +!kind=default +range=1: +sort-key=Panel-A03 +type=integer + +[namelist:finite_element=coord_order_multigrid] +compulsory=true +description=Horizontal polynomial order of coordinates for multigrid meshes. +fail-if=this < 1 ; +help=The order of the coordinate spaces can be set separately for the prime + =mesh and the others in a multigrid chain. For instance it may not be + =necessary to use higher order coordinates on coarser meshes. + =The vertical order is set as for the coord_order option. +!kind=default +range=1: +sort-key=Panel-A03 +type=integer + [namelist:finite_element=coord_system] compulsory=true description=The coordinate system that will be stored in the chi coordinate diff --git a/rose-stem/app/lfric2um/rose-app.conf b/rose-stem/app/lfric2um/rose-app.conf index 6271a1339..bce23d074 100644 --- a/rose-stem/app/lfric2um/rose-app.conf +++ b/rose-stem/app/lfric2um/rose-app.conf @@ -79,6 +79,8 @@ planet_radius=6371229.0 [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wchi' coord_system='native' element_order_h=0 element_order_v=0 From 3241a6b836bc3d443fa3d75871c05003891dd46e Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:27:48 +0000 Subject: [PATCH 04/12] fixes to solver and scintelapi --- .../lfric-solver/HEAD/rose-meta.conf | 30 +++++++++++-------- rose-stem/app/scintelapi/rose-app.conf | 2 ++ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf b/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf index cd53e9a20..8f95fc215 100644 --- a/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf +++ b/applications/solver/rose-meta/lfric-solver/HEAD/rose-meta.conf @@ -267,19 +267,6 @@ sort-key=Panel-A01 value-titles=Triangluar, Quadrilateral values='triangle', 'quadrilateral' -[namelist:finite_element=coord_order] -compulsory=true -description=Order of the coordinate space. -fail-if=this < 0 ; -help=Order of the coordinate space. If 0 is chosen, this will be the continuous - =W0 space, with the order set by the element order. This option is only - =possible for certain geometries and topologies. Otherwise, this will be - =a discontinuous space. -!kind=default -range=0: -sort-key=Panel-A03 -type=integer - [namelist:finite_element=coord_order] compulsory=true description=Horizontal polynomial order of the coordinate space. @@ -307,6 +294,23 @@ range=1: sort-key=Panel-A03 type=integer +[namelist:finite_element=coord_space] +compulsory=true +description=The finite element space to use to hold the coordinate fields. +!enumeration=true +fail-if= +help=Different spaces have different continuity properties: + =Wchi: fully discontinuous. + =Wtheta: discontinuous in the horizontal, but continuous in the vertical. + = This is only appropriate for native coordinate systems, which + = separate the horizontal and vertical coordinates. + =W0: fully continuous. This is only appropriate for non-periodic planar + = domains, or when using the 'xyz' coordinate system on spherical + = domains. +sort-key=Panel-A04 +value-titles='Wchi', 'Wtheta', 'W0' +values='Wchi', 'Wtheta', 'W0' + [namelist:finite_element=coord_system] compulsory=true description=The coordinate system that will be stored in the chi coordinate diff --git a/rose-stem/app/scintelapi/rose-app.conf b/rose-stem/app/scintelapi/rose-app.conf index 4133bc9a9..b7e7f9db8 100644 --- a/rose-stem/app/scintelapi/rose-app.conf +++ b/rose-stem/app/scintelapi/rose-app.conf @@ -50,6 +50,8 @@ planet_radius=6371229.0 [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wchi' coord_system='xyz' element_order_h=0 element_order_v=0 From bccbce25857d726aaaa7d8908d22baaf7c75b9bf Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Fri, 23 Jan 2026 16:17:47 +0000 Subject: [PATCH 05/12] remove workaround for vertical slice tests --- rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf | 3 --- .../app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf | 3 --- rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf | 3 --- rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf | 3 --- .../app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf | 3 --- rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf | 3 --- 6 files changed, 18 deletions(-) diff --git a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf index 1bfcfcb04..d1cd6a8b2 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-dry.conf @@ -6,9 +6,6 @@ geometry='planar' [namelist:extrusion] number_of_layers=100 -[namelist:finite_element] -coord_space='Wchi' - [namelist:formulation] rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf index f7ea98e3a..93339cdb9 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-bryan_fritsch-moist.conf @@ -6,9 +6,6 @@ geometry='planar' [namelist:extrusion] number_of_layers=100 -[namelist:finite_element] -coord_space='Wchi' - [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf b/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf index 1b8dab25c..0194ec96f 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-grabowski-clark.conf @@ -7,9 +7,6 @@ geometry='planar' domain_height=2400.0 number_of_layers=100 -[namelist:finite_element] -coord_space='Wchi' - [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf index 8a630dc41..436275a25 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf @@ -25,9 +25,6 @@ rim_width_ns=-1 domain_height=1500.0 number_of_layers=150 -[namelist:finite_element] -coord_space='Wchi' - [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf index 9bc7827fe..d950a0730 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag-l300.conf @@ -7,9 +7,6 @@ geometry='planar' domain_height=1500.0 number_of_layers=300 -[namelist:finite_element] -coord_space='Wchi' - [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf index 26124c775..0ea5ca86b 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-smag.conf @@ -7,9 +7,6 @@ geometry='planar' domain_height=1500.0 number_of_layers=150 -[namelist:finite_element] -coord_space='Wchi' - [namelist:formulation] moisture_formulation='traditional' rotating=.false. From 56ab18d7a27c9aa50080bbfeab0877f8b7660bc7 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Fri, 23 Jan 2026 16:18:47 +0000 Subject: [PATCH 06/12] another contributor signing --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index da42a74b5..74b8826f0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,3 +5,4 @@ | james-bruten-mo | James Bruten | Met Office | 2025-12-09 | | jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | | mo-marqh | mark Hedley | Met Office | 2025-12-11 | +| tommbendall | Thomas Bendall | Met Office | 2026-01-23 | \ No newline at end of file From 25904f010809a16f20812b8fd65ce9502ddc9562 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Sun, 25 Jan 2026 10:53:59 +0000 Subject: [PATCH 07/12] set other apps to use Wtheta, and fix remaining failures --- rose-stem/app/jedi_lfric_tests/rose-app.conf | 2 + rose-stem/app/linear_model/rose-app.conf | 2 + rose-stem/app/um2lfric/rose-app.conf | 2 + .../limited_area_masks_alg_mod.x90 | 272 ++++++++++++------ 4 files changed, 191 insertions(+), 87 deletions(-) diff --git a/rose-stem/app/jedi_lfric_tests/rose-app.conf b/rose-stem/app/jedi_lfric_tests/rose-app.conf index a683eda8f..0ab0f2101 100644 --- a/rose-stem/app/jedi_lfric_tests/rose-app.conf +++ b/rose-stem/app/jedi_lfric_tests/rose-app.conf @@ -396,6 +396,8 @@ start_dump_filename='final_pert' [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wtheta' coord_system='native' element_order_h=0 element_order_v=0 diff --git a/rose-stem/app/linear_model/rose-app.conf b/rose-stem/app/linear_model/rose-app.conf index 1c83c6635..bf1d8730a 100644 --- a/rose-stem/app/linear_model/rose-app.conf +++ b/rose-stem/app/linear_model/rose-app.conf @@ -400,6 +400,8 @@ start_dump_filename='final_2021060200-2021060207.pert' [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wtheta' coord_system='native' element_order_h=0 element_order_v=0 diff --git a/rose-stem/app/um2lfric/rose-app.conf b/rose-stem/app/um2lfric/rose-app.conf index 7e5482141..c0e185f5e 100644 --- a/rose-stem/app/um2lfric/rose-app.conf +++ b/rose-stem/app/um2lfric/rose-app.conf @@ -69,6 +69,8 @@ planet_radius=6371229.0 [namelist:finite_element] cellshape='quadrilateral' coord_order=1 +coord_order_multigrid=1 +coord_space='Wchi' coord_system='native' element_order_h=0 element_order_v=0 diff --git a/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 b/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 index 103e24cfe..cf8d20a1e 100644 --- a/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 +++ b/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 @@ -12,6 +12,7 @@ module limited_area_masks_alg_mod use field_mod, only: field_type + use fs_continuity_mod, only: Wchi, W3, Wtheta, W2 use constants_mod, only: i_def, r_def, l_def, PI, & degrees_to_radians, & radians_to_degrees @@ -21,6 +22,7 @@ module limited_area_masks_alg_mod LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & LOG_LEVEL_WARNING + use function_space_collection_mod, only: function_space_collection use function_space_mod, only: function_space_type use mesh_mod, only: mesh_type use create_edge_mask_kernel_mod, only: create_edge_mask_kernel_type @@ -31,6 +33,7 @@ module limited_area_masks_alg_mod use create_boundary_mask_kernel_mod, only: create_boundary_mask_kernel_type use boundaries_config_mod, only: rim_width_ns, lbc_method, & lbc_method_onion_layer + use sci_nodal_coordinates_kernel_mod, only: nodal_coordinates_kernel_type implicit none @@ -292,30 +295,32 @@ contains boundary_e, boundary_w, & rim_width_ns, rim_width_ew, & outer_width_ns, outer_width_ew - use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: onion_layers - type(field_type), intent(in) :: chi(:) - integer(i_def) :: fs_enum - integer(i_def) :: rim_s, rim_n, & - rim_e, rim_w - integer(i_def) :: outer_s, outer_n, & - outer_e, outer_w - real(r_def) :: coord_outer_s, coord_outer_n, & - coord_outer_e, coord_outer_w, & - coord_rim_s, coord_rim_n, & - coord_rim_e, coord_rim_w - real(r_def) :: threshold - - type(function_space_type), pointer :: function_space => null() - type(mesh_type), pointer :: mesh => null() - - type(domain_type) :: domain - - if ( lbc_method == lbc_method_onion_layer )then + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: onion_layers + type(field_type), target, intent(in) :: chi(:) + integer(i_def) :: fs_enum, i + integer(i_def) :: coord_order_h, coord_order_v + integer(i_def) :: rim_s, rim_n, & + rim_e, rim_w + integer(i_def) :: outer_s, outer_n, & + outer_e, outer_w + real(r_def) :: coord_outer_s, coord_outer_n, & + coord_outer_e, coord_outer_w, & + coord_rim_s, coord_rim_n, & + coord_rim_e, coord_rim_w + real(r_def) :: threshold + + type(function_space_type), pointer :: function_space + type(function_space_type), pointer :: wchi_fs + type(mesh_type), pointer :: mesh + type(field_type), pointer :: chi_to_use(:) + type(field_type), target :: chi_wchi(3) + type(domain_type) :: domain + + if ( lbc_method == lbc_method_onion_layer ) then ! |<---------blending region---------->| @@ -351,6 +356,23 @@ contains mesh => function_space%get_mesh() domain = mesh%get_domain() + ! The kernels require chi to be in Wchi + if (chi(1)%which_function_space() == Wtheta) then + ! Convert coordinates to Wchi + coord_order_h = chi(1)%get_element_order_h() + coord_order_v = chi(1)%get_element_order_v() + wchi_fs => function_space_collection%get_fs( & + mesh, coord_order_h, coord_order_v, Wchi & + ) + do i = 1, 3 + call chi_wchi(i)%initialise(wchi_fs) + end do + call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) + chi_to_use => chi_wchi + else + chi_to_use => chi + end if + if ( rim_width_ns > 0 ) then outer_n = boundary_n - outer_width_ns outer_s = boundary_s - outer_width_ns @@ -475,34 +497,36 @@ contains inner_width_ns, inner_width_ew, & edge_cells_ns, edge_cells_ew, & blending_weights - use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: onion_layers - type(field_type), intent(in) :: chi(:) - integer(i_def) :: fs_enum - integer(i_def) :: rim_s, rim_n, & - rim_e, rim_w - integer(i_def) :: blend_s, blend_n, & - blend_e, blend_w - integer(i_def) :: outer_s, outer_n, & - outer_e, outer_w - real(r_def) :: coord_outer_s, coord_outer_n, & - coord_outer_e, coord_outer_w, & - coord_rim_s, coord_rim_n, & - coord_rim_e, coord_rim_w, & - coord_blend_s, coord_blend_n, & - coord_blend_e, coord_blend_w + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: onion_layers + type(field_type), target, intent(in) :: chi(:) + integer(i_def) :: fs_enum, i + integer(i_def) :: coord_order_h, coord_order_v + integer(i_def) :: rim_s, rim_n, & + rim_e, rim_w + integer(i_def) :: blend_s, blend_n, & + blend_e, blend_w + integer(i_def) :: outer_s, outer_n, & + outer_e, outer_w + real(r_def) :: coord_outer_s, coord_outer_n, & + coord_outer_e, coord_outer_w, & + coord_rim_s, coord_rim_n, & + coord_rim_e, coord_rim_w, & + coord_blend_s, coord_blend_n, & + coord_blend_e, coord_blend_w integer(i_def) :: stencil_depth = 1 - type(function_space_type), pointer :: function_space => null() - type(mesh_type), pointer :: mesh => null() - - type(domain_type) :: domain + type(function_space_type), pointer :: function_space + type(function_space_type), pointer :: wchi_fs + type(mesh_type), pointer :: mesh + type(field_type), pointer :: chi_to_use(:) + type(field_type), target :: chi_wchi(3) + type(domain_type) :: domain - if ( lbc_method == lbc_method_onion_layer )then + if ( lbc_method == lbc_method_onion_layer ) then fs_enum = mask%which_function_space() @@ -541,6 +565,23 @@ contains mesh => function_space%get_mesh() domain = mesh%get_domain() + ! The kernels require chi to be in Wchi + if (chi(1)%which_function_space() == Wtheta) then + ! Convert coordinates to Wchi + coord_order_h = chi(1)%get_element_order_h() + coord_order_v = chi(1)%get_element_order_v() + wchi_fs => function_space_collection%get_fs( & + mesh, coord_order_h, coord_order_v, Wchi & + ) + do i = 1, 3 + call chi_wchi(i)%initialise(wchi_fs) + end do + call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) + chi_to_use => chi_wchi + else + chi_to_use => chi + end if + if ( rim_width_ns > 0 ) then outer_n = boundary_n - outer_width_ns outer_s = boundary_s - outer_width_ns @@ -684,24 +725,26 @@ contains use boundaries_config_mod, only: boundary_s, boundary_n, & boundary_e, boundary_w, & rim_width_ns, rim_width_ew - use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: chi(:) - integer(i_def) :: fs_enum - integer(i_def) :: rim_s, rim_n, & - rim_e, rim_w - real(r_def) :: coord_bound_s, coord_bound_n, & - coord_bound_e, coord_bound_w, & - coord_rim_s, coord_rim_n, & - coord_rim_e, coord_rim_w - - type(function_space_type), pointer :: function_space => null() - type(mesh_type), pointer :: mesh => null() - - type(domain_type) :: domain + type(field_type), intent(inout) :: mask + type(field_type), target, intent(in) :: chi(:) + integer(i_def) :: fs_enum, i + integer(i_def) :: coord_order_h, coord_order_v + integer(i_def) :: rim_s, rim_n, & + rim_e, rim_w + real(r_def) :: coord_bound_s, coord_bound_n, & + coord_bound_e, coord_bound_w, & + coord_rim_s, coord_rim_n, & + coord_rim_e, coord_rim_w + + type(function_space_type), pointer :: function_space + type(function_space_type), pointer :: wchi_fs + type(mesh_type), pointer :: mesh + type(field_type), pointer :: chi_to_use(:) + type(field_type), target :: chi_wchi(3) + type(domain_type) :: domain ! Calculate coordinates of boundary 1 cell in. @@ -716,6 +759,23 @@ contains mesh => function_space%get_mesh() domain = mesh%get_domain() + ! The kernels require chi to be in Wchi + if (chi(1)%which_function_space() == Wtheta) then + ! Convert coordinates to Wchi + coord_order_h = chi(1)%get_element_order_h() + coord_order_v = chi(1)%get_element_order_v() + wchi_fs => function_space_collection%get_fs( & + mesh, coord_order_h, coord_order_v, Wchi & + ) + do i = 1, 3 + call chi_wchi(i)%initialise(wchi_fs) + end do + call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) + chi_to_use => chi_wchi + else + chi_to_use => chi + end if + call calculate_boundary_coordinates( & coord_bound_s, & coord_bound_n, & @@ -778,24 +838,26 @@ contains rim_width_ns, rim_width_ew, & blending_weights, & solver_boundary_depth - use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: onion_layers - type(field_type), intent(in) :: chi(:) - integer(i_def) :: fs_enum - real(r_def) :: coord_bound_s, coord_bound_n, & - coord_bound_e, coord_bound_w - real(r_def) :: threshold - - type(function_space_type), pointer :: function_space => null() - type(mesh_type), pointer :: mesh => null() + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: onion_layers + type(field_type), target, intent(in) :: chi(:) + integer(i_def) :: fs_enum, i + integer(i_def) :: coord_order_h, coord_order_v + real(r_def) :: coord_bound_s, coord_bound_n, & + coord_bound_e, coord_bound_w + real(r_def) :: threshold - type(domain_type) :: domain + type(function_space_type), pointer :: function_space + type(function_space_type), pointer :: wchi_fs + type(mesh_type), pointer :: mesh + type(field_type), pointer :: chi_to_use(:) + type(field_type), target :: chi_wchi(3) + type(domain_type) :: domain - if ( lbc_method == lbc_method_onion_layer )then + if ( lbc_method == lbc_method_onion_layer ) then threshold = size( blending_weights ) - solver_boundary_depth ! Set the mask OFF in the region between solver boundary and domain edge @@ -809,6 +871,23 @@ contains mesh => function_space%get_mesh() domain = mesh%get_domain() + ! The kernels require chi to be in Wchi + if (chi(1)%which_function_space() == Wtheta) then + ! Convert coordinates to Wchi + coord_order_h = chi(1)%get_element_order_h() + coord_order_v = chi(1)%get_element_order_v() + wchi_fs => function_space_collection%get_fs( & + mesh, coord_order_h, coord_order_v, Wchi & + ) + do i = 1, 3 + call chi_wchi(i)%initialise(wchi_fs) + end do + call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) + chi_to_use => chi_wchi + else + chi_to_use => chi + end if + call calculate_boundary_coordinates( & coord_bound_s, & coord_bound_n, & @@ -872,25 +951,27 @@ contains boundary_e, boundary_w, & rim_width_ns, rim_width_ew, & blending_weights, solver_boundary_depth - use fs_continuity_mod, only: W2 implicit none - type(field_type), intent(inout) :: boundary_mask - type(field_type), intent(in) :: onion_layers - type(field_type), intent(in) :: chi(:) - integer(i_def) :: fs_enum - real(r_def) :: coord_bound_s, coord_bound_n, & - coord_bound_e, coord_bound_w - real(r_def) :: inner_boundary_cell - integer(i_def) :: stencil_depth = 1 - - type(function_space_type), pointer :: function_space => null() - type(mesh_type), pointer :: mesh => null() - - type(domain_type) :: domain - - if ( lbc_method == lbc_method_onion_layer )then + type(field_type), intent(inout) :: boundary_mask + type(field_type), intent(in) :: onion_layers + type(field_type), target, intent(in) :: chi(:) + integer(i_def) :: fs_enum, i + integer(i_def) :: coord_order_h, coord_order_v + real(r_def) :: coord_bound_s, coord_bound_n, & + coord_bound_e, coord_bound_w + real(r_def) :: inner_boundary_cell + integer(i_def) :: stencil_depth = 1 + + type(function_space_type), pointer :: function_space + type(function_space_type), pointer :: wchi_fs + type(mesh_type), pointer :: mesh + type(field_type), pointer :: chi_to_use(:) + type(field_type), target :: chi_wchi(3) + type(domain_type) :: domain + + if ( lbc_method == lbc_method_onion_layer ) then inner_boundary_cell = real( & size( blending_weights ) - solver_boundary_depth, r_def ) @@ -906,6 +987,23 @@ contains mesh => function_space%get_mesh() domain = mesh%get_domain() + ! The kernels require chi to be in Wchi + if (chi(1)%which_function_space() == Wtheta) then + ! Convert coordinates to Wchi + coord_order_h = chi(1)%get_element_order_h() + coord_order_v = chi(1)%get_element_order_v() + wchi_fs => function_space_collection%get_fs( & + mesh, coord_order_h, coord_order_v, Wchi & + ) + do i = 1, 3 + call chi_wchi(i)%initialise(wchi_fs) + end do + call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) + chi_to_use => chi_wchi + else + chi_to_use => chi + end if + call calculate_boundary_coordinates( & coord_bound_s, & coord_bound_n, & From f8abde96b81e7248c2cf04e4a7d06e0a427833f7 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Mon, 26 Jan 2026 08:38:12 +0000 Subject: [PATCH 08/12] change coordinate settings for planar tests with issues --- .../opt/rose-app-agnesi_hyd_cart.conf | 3 + .../opt/rose-app-agnesi_nhyd_cart.conf | 3 + .../opt/rose-app-robert-moist-lam.conf | 3 + .../opt/rose-app-schar3d_cart.conf | 3 + .../gungho_model/opt/rose-app-schar_cart.conf | 3 + .../opt/rose-app-schar_cart_8s.conf | 3 + .../limited_area_masks_alg_mod.x90 | 279 +++++++----------- 7 files changed, 129 insertions(+), 168 deletions(-) diff --git a/rose-stem/app/gungho_model/opt/rose-app-agnesi_hyd_cart.conf b/rose-stem/app/gungho_model/opt/rose-app-agnesi_hyd_cart.conf index 910eb4fba..fc744b4fe 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-agnesi_hyd_cart.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-agnesi_hyd_cart.conf @@ -11,6 +11,9 @@ dl_str=0.015 domain_height=50000.0 number_of_layers=200 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] dlayer_on=.true. rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-agnesi_nhyd_cart.conf b/rose-stem/app/gungho_model/opt/rose-app-agnesi_nhyd_cart.conf index e5e155e81..66f3a7d0b 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-agnesi_nhyd_cart.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-agnesi_nhyd_cart.conf @@ -11,6 +11,9 @@ dl_str=0.015 domain_height=35000.0 number_of_layers=140 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] dlayer_on=.true. rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf index 436275a25..8a630dc41 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-robert-moist-lam.conf @@ -25,6 +25,9 @@ rim_width_ns=-1 domain_height=1500.0 number_of_layers=150 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='traditional' rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-schar3d_cart.conf b/rose-stem/app/gungho_model/opt/rose-app-schar3d_cart.conf index 734b66817..a64ae874f 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-schar3d_cart.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-schar3d_cart.conf @@ -11,6 +11,9 @@ dl_str=0.15 domain_height=30000.0 number_of_layers=100 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] dlayer_on=.true. rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-schar_cart.conf b/rose-stem/app/gungho_model/opt/rose-app-schar_cart.conf index c5f027b99..f79c2e010 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-schar_cart.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-schar_cart.conf @@ -11,6 +11,9 @@ dl_str=0.15 domain_height=30000.0 number_of_layers=100 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] dlayer_on=.true. rotating=.false. diff --git a/rose-stem/app/gungho_model/opt/rose-app-schar_cart_8s.conf b/rose-stem/app/gungho_model/opt/rose-app-schar_cart_8s.conf index bf8322559..476c7bb34 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-schar_cart_8s.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-schar_cart_8s.conf @@ -11,6 +11,9 @@ dl_str=0.15 domain_height=30000.0 number_of_layers=100 +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] dlayer_on=.true. rotating=.false. diff --git a/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 b/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 index cf8d20a1e..c87f577ba 100644 --- a/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 +++ b/science/gungho/source/algorithm/limited_area/limited_area_masks_alg_mod.x90 @@ -12,7 +12,7 @@ module limited_area_masks_alg_mod use field_mod, only: field_type - use fs_continuity_mod, only: Wchi, W3, Wtheta, W2 + use fs_continuity_mod, only: Wchi use constants_mod, only: i_def, r_def, l_def, PI, & degrees_to_radians, & radians_to_degrees @@ -22,7 +22,6 @@ module limited_area_masks_alg_mod LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & LOG_LEVEL_WARNING - use function_space_collection_mod, only: function_space_collection use function_space_mod, only: function_space_type use mesh_mod, only: mesh_type use create_edge_mask_kernel_mod, only: create_edge_mask_kernel_type @@ -33,7 +32,6 @@ module limited_area_masks_alg_mod use create_boundary_mask_kernel_mod, only: create_boundary_mask_kernel_type use boundaries_config_mod, only: rim_width_ns, lbc_method, & lbc_method_onion_layer - use sci_nodal_coordinates_kernel_mod, only: nodal_coordinates_kernel_type implicit none @@ -295,32 +293,30 @@ contains boundary_e, boundary_w, & rim_width_ns, rim_width_ew, & outer_width_ns, outer_width_ew + use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: onion_layers - type(field_type), target, intent(in) :: chi(:) - integer(i_def) :: fs_enum, i - integer(i_def) :: coord_order_h, coord_order_v - integer(i_def) :: rim_s, rim_n, & - rim_e, rim_w - integer(i_def) :: outer_s, outer_n, & - outer_e, outer_w - real(r_def) :: coord_outer_s, coord_outer_n, & - coord_outer_e, coord_outer_w, & - coord_rim_s, coord_rim_n, & - coord_rim_e, coord_rim_w - real(r_def) :: threshold - - type(function_space_type), pointer :: function_space - type(function_space_type), pointer :: wchi_fs - type(mesh_type), pointer :: mesh - type(field_type), pointer :: chi_to_use(:) - type(field_type), target :: chi_wchi(3) - type(domain_type) :: domain - - if ( lbc_method == lbc_method_onion_layer ) then + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: onion_layers + type(field_type), intent(in) :: chi(:) + integer(i_def) :: fs_enum + integer(i_def) :: rim_s, rim_n, & + rim_e, rim_w + integer(i_def) :: outer_s, outer_n, & + outer_e, outer_w + real(r_def) :: coord_outer_s, coord_outer_n, & + coord_outer_e, coord_outer_w, & + coord_rim_s, coord_rim_n, & + coord_rim_e, coord_rim_w + real(r_def) :: threshold + + type(function_space_type), pointer :: function_space => null() + type(mesh_type), pointer :: mesh => null() + + type(domain_type) :: domain + + if ( lbc_method == lbc_method_onion_layer )then ! |<---------blending region---------->| @@ -357,20 +353,11 @@ contains domain = mesh%get_domain() ! The kernels require chi to be in Wchi - if (chi(1)%which_function_space() == Wtheta) then - ! Convert coordinates to Wchi - coord_order_h = chi(1)%get_element_order_h() - coord_order_v = chi(1)%get_element_order_v() - wchi_fs => function_space_collection%get_fs( & - mesh, coord_order_h, coord_order_v, Wchi & + if (chi(1)%which_function_space() /= Wchi) then + call log_event( & + 'Coordinate based LBC method only implemented for coordinates ' // & + 'in the Wchi function space', LOG_LEVEL_ERROR & ) - do i = 1, 3 - call chi_wchi(i)%initialise(wchi_fs) - end do - call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) - chi_to_use => chi_wchi - else - chi_to_use => chi end if if ( rim_width_ns > 0 ) then @@ -497,36 +484,34 @@ contains inner_width_ns, inner_width_ew, & edge_cells_ns, edge_cells_ew, & blending_weights + use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: onion_layers - type(field_type), target, intent(in) :: chi(:) - integer(i_def) :: fs_enum, i - integer(i_def) :: coord_order_h, coord_order_v - integer(i_def) :: rim_s, rim_n, & - rim_e, rim_w - integer(i_def) :: blend_s, blend_n, & - blend_e, blend_w - integer(i_def) :: outer_s, outer_n, & - outer_e, outer_w - real(r_def) :: coord_outer_s, coord_outer_n, & - coord_outer_e, coord_outer_w, & - coord_rim_s, coord_rim_n, & - coord_rim_e, coord_rim_w, & - coord_blend_s, coord_blend_n, & - coord_blend_e, coord_blend_w + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: onion_layers + type(field_type), intent(in) :: chi(:) + integer(i_def) :: fs_enum + integer(i_def) :: rim_s, rim_n, & + rim_e, rim_w + integer(i_def) :: blend_s, blend_n, & + blend_e, blend_w + integer(i_def) :: outer_s, outer_n, & + outer_e, outer_w + real(r_def) :: coord_outer_s, coord_outer_n, & + coord_outer_e, coord_outer_w, & + coord_rim_s, coord_rim_n, & + coord_rim_e, coord_rim_w, & + coord_blend_s, coord_blend_n, & + coord_blend_e, coord_blend_w integer(i_def) :: stencil_depth = 1 - type(function_space_type), pointer :: function_space - type(function_space_type), pointer :: wchi_fs - type(mesh_type), pointer :: mesh - type(field_type), pointer :: chi_to_use(:) - type(field_type), target :: chi_wchi(3) - type(domain_type) :: domain + type(function_space_type), pointer :: function_space => null() + type(mesh_type), pointer :: mesh => null() - if ( lbc_method == lbc_method_onion_layer ) then + type(domain_type) :: domain + + if ( lbc_method == lbc_method_onion_layer )then fs_enum = mask%which_function_space() @@ -566,20 +551,11 @@ contains domain = mesh%get_domain() ! The kernels require chi to be in Wchi - if (chi(1)%which_function_space() == Wtheta) then - ! Convert coordinates to Wchi - coord_order_h = chi(1)%get_element_order_h() - coord_order_v = chi(1)%get_element_order_v() - wchi_fs => function_space_collection%get_fs( & - mesh, coord_order_h, coord_order_v, Wchi & + if (chi(1)%which_function_space() /= Wchi) then + call log_event( & + 'Coordinate based LBC method only implemented for coordinates ' // & + 'in the Wchi function space', LOG_LEVEL_ERROR & ) - do i = 1, 3 - call chi_wchi(i)%initialise(wchi_fs) - end do - call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) - chi_to_use => chi_wchi - else - chi_to_use => chi end if if ( rim_width_ns > 0 ) then @@ -725,26 +701,24 @@ contains use boundaries_config_mod, only: boundary_s, boundary_n, & boundary_e, boundary_w, & rim_width_ns, rim_width_ew + use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), target, intent(in) :: chi(:) - integer(i_def) :: fs_enum, i - integer(i_def) :: coord_order_h, coord_order_v - integer(i_def) :: rim_s, rim_n, & - rim_e, rim_w - real(r_def) :: coord_bound_s, coord_bound_n, & - coord_bound_e, coord_bound_w, & - coord_rim_s, coord_rim_n, & - coord_rim_e, coord_rim_w - - type(function_space_type), pointer :: function_space - type(function_space_type), pointer :: wchi_fs - type(mesh_type), pointer :: mesh - type(field_type), pointer :: chi_to_use(:) - type(field_type), target :: chi_wchi(3) - type(domain_type) :: domain + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: chi(:) + integer(i_def) :: fs_enum + integer(i_def) :: rim_s, rim_n, & + rim_e, rim_w + real(r_def) :: coord_bound_s, coord_bound_n, & + coord_bound_e, coord_bound_w, & + coord_rim_s, coord_rim_n, & + coord_rim_e, coord_rim_w + + type(function_space_type), pointer :: function_space => null() + type(mesh_type), pointer :: mesh => null() + + type(domain_type) :: domain ! Calculate coordinates of boundary 1 cell in. @@ -759,22 +733,13 @@ contains mesh => function_space%get_mesh() domain = mesh%get_domain() - ! The kernels require chi to be in Wchi - if (chi(1)%which_function_space() == Wtheta) then - ! Convert coordinates to Wchi - coord_order_h = chi(1)%get_element_order_h() - coord_order_v = chi(1)%get_element_order_v() - wchi_fs => function_space_collection%get_fs( & - mesh, coord_order_h, coord_order_v, Wchi & - ) - do i = 1, 3 - call chi_wchi(i)%initialise(wchi_fs) - end do - call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) - chi_to_use => chi_wchi - else - chi_to_use => chi - end if + ! The kernels require chi to be in Wchi + if (chi(1)%which_function_space() /= Wchi) then + call log_event( & + 'Coordinate based LBC method only implemented for coordinates ' // & + 'in the Wchi function space', LOG_LEVEL_ERROR & + ) + end if call calculate_boundary_coordinates( & coord_bound_s, & @@ -838,26 +803,24 @@ contains rim_width_ns, rim_width_ew, & blending_weights, & solver_boundary_depth + use fs_continuity_mod, only: W3, Wtheta, W2 implicit none - type(field_type), intent(inout) :: mask - type(field_type), intent(in) :: onion_layers - type(field_type), target, intent(in) :: chi(:) - integer(i_def) :: fs_enum, i - integer(i_def) :: coord_order_h, coord_order_v - real(r_def) :: coord_bound_s, coord_bound_n, & - coord_bound_e, coord_bound_w - real(r_def) :: threshold + type(field_type), intent(inout) :: mask + type(field_type), intent(in) :: onion_layers + type(field_type), intent(in) :: chi(:) + integer(i_def) :: fs_enum + real(r_def) :: coord_bound_s, coord_bound_n, & + coord_bound_e, coord_bound_w + real(r_def) :: threshold + + type(function_space_type), pointer :: function_space => null() + type(mesh_type), pointer :: mesh => null() - type(function_space_type), pointer :: function_space - type(function_space_type), pointer :: wchi_fs - type(mesh_type), pointer :: mesh - type(field_type), pointer :: chi_to_use(:) - type(field_type), target :: chi_wchi(3) - type(domain_type) :: domain + type(domain_type) :: domain - if ( lbc_method == lbc_method_onion_layer ) then + if ( lbc_method == lbc_method_onion_layer )then threshold = size( blending_weights ) - solver_boundary_depth ! Set the mask OFF in the region between solver boundary and domain edge @@ -872,20 +835,11 @@ contains domain = mesh%get_domain() ! The kernels require chi to be in Wchi - if (chi(1)%which_function_space() == Wtheta) then - ! Convert coordinates to Wchi - coord_order_h = chi(1)%get_element_order_h() - coord_order_v = chi(1)%get_element_order_v() - wchi_fs => function_space_collection%get_fs( & - mesh, coord_order_h, coord_order_v, Wchi & + if (chi(1)%which_function_space() /= Wchi) then + call log_event( & + 'Coordinate based LBC method only implemented for coordinates ' // & + 'in the Wchi function space', LOG_LEVEL_ERROR & ) - do i = 1, 3 - call chi_wchi(i)%initialise(wchi_fs) - end do - call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) - chi_to_use => chi_wchi - else - chi_to_use => chi end if call calculate_boundary_coordinates( & @@ -951,27 +905,25 @@ contains boundary_e, boundary_w, & rim_width_ns, rim_width_ew, & blending_weights, solver_boundary_depth + use fs_continuity_mod, only: W2 implicit none - type(field_type), intent(inout) :: boundary_mask - type(field_type), intent(in) :: onion_layers - type(field_type), target, intent(in) :: chi(:) - integer(i_def) :: fs_enum, i - integer(i_def) :: coord_order_h, coord_order_v - real(r_def) :: coord_bound_s, coord_bound_n, & - coord_bound_e, coord_bound_w - real(r_def) :: inner_boundary_cell - integer(i_def) :: stencil_depth = 1 - - type(function_space_type), pointer :: function_space - type(function_space_type), pointer :: wchi_fs - type(mesh_type), pointer :: mesh - type(field_type), pointer :: chi_to_use(:) - type(field_type), target :: chi_wchi(3) - type(domain_type) :: domain - - if ( lbc_method == lbc_method_onion_layer ) then + type(field_type), intent(inout) :: boundary_mask + type(field_type), intent(in) :: onion_layers + type(field_type), intent(in) :: chi(:) + integer(i_def) :: fs_enum + real(r_def) :: coord_bound_s, coord_bound_n, & + coord_bound_e, coord_bound_w + real(r_def) :: inner_boundary_cell + integer(i_def) :: stencil_depth = 1 + + type(function_space_type), pointer :: function_space => null() + type(mesh_type), pointer :: mesh => null() + + type(domain_type) :: domain + + if ( lbc_method == lbc_method_onion_layer )then inner_boundary_cell = real( & size( blending_weights ) - solver_boundary_depth, r_def ) @@ -988,20 +940,11 @@ contains domain = mesh%get_domain() ! The kernels require chi to be in Wchi - if (chi(1)%which_function_space() == Wtheta) then - ! Convert coordinates to Wchi - coord_order_h = chi(1)%get_element_order_h() - coord_order_v = chi(1)%get_element_order_v() - wchi_fs => function_space_collection%get_fs( & - mesh, coord_order_h, coord_order_v, Wchi & + if (chi(1)%which_function_space() /= Wchi) then + call log_event( & + 'Coordinate based LBC method only implemented for coordinates ' // & + 'in the Wchi function space', LOG_LEVEL_ERROR & ) - do i = 1, 3 - call chi_wchi(i)%initialise(wchi_fs) - end do - call invoke( nodal_coordinates_kernel_type(chi_wchi, chi) ) - chi_to_use => chi_wchi - else - chi_to_use => chi end if call calculate_boundary_coordinates( & From cfc3f166d320d7a6627bae64fa81397f9f8c6180 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:51:49 +0000 Subject: [PATCH 09/12] increase TLM tolerance --- applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 index f2266fdb5..15b09c8e6 100644 --- a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 @@ -74,7 +74,7 @@ program jedi_tlm_tests character( str_def ) :: forecast_length_str real( kind=r_def ) :: dot_product_1 real( kind=r_def ) :: dot_product_2 - real( kind=r_def ), parameter :: absolute_tolerance = 1.0E-4_r_def + real( kind=r_def ), parameter :: absolute_tolerance = 2.0E-4_r_def real( kind=r_def ) :: machine_tolerance real( kind=r_def ) :: absolute_diff real( kind=r_def ) :: relative_diff From 4a8d2002bdfe6abbcf503530489bc966cf2e3a03 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:12:09 +0000 Subject: [PATCH 10/12] increase tolerance again --- applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 index 15b09c8e6..0b8e24dcd 100644 --- a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 @@ -74,7 +74,7 @@ program jedi_tlm_tests character( str_def ) :: forecast_length_str real( kind=r_def ) :: dot_product_1 real( kind=r_def ) :: dot_product_2 - real( kind=r_def ), parameter :: absolute_tolerance = 2.0E-4_r_def + real( kind=r_def ), parameter :: absolute_tolerance = 3.0E-4_r_def real( kind=r_def ) :: machine_tolerance real( kind=r_def ) :: absolute_diff real( kind=r_def ) :: relative_diff From 0015b2372fef03e19ff05230a06f4efeb7b3e1b6 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:03:18 +0000 Subject: [PATCH 11/12] replace Wchi in kernels --- .../deep_hot_jupiter_kernel_mod.F90 | 5 ++-- .../earth_like_kernel_mod.F90 | 5 ++-- .../shallow_hot_jupiter_kernel_mod.F90 | 5 ++-- .../initial_rho_sample_kernel_mod.F90 | 5 ++-- .../initialisation/set_rho_kernel_mod.F90 | 4 +-- .../eliminated_theta_q22_kernel_mod.F90 | 27 ++++++++--------- .../solver/w2_normalisation_kernel_mod.F90 | 10 +++---- ...init_remap_on_extended_mesh_kernel_mod.F90 | 8 ++--- .../common/panel_edge_weights_kernel_mod.F90 | 7 +++-- .../mol/consistent_wind_kernel_mod.F90 | 29 ++++++++++--------- .../orography/assign_orography_field_mod.F90 | 22 ++++---------- 11 files changed, 61 insertions(+), 66 deletions(-) diff --git a/science/gungho/source/kernel/external_forcing/deep_hot_jupiter_kernel_mod.F90 b/science/gungho/source/kernel/external_forcing/deep_hot_jupiter_kernel_mod.F90 index f898cd611..376c727bf 100644 --- a/science/gungho/source/kernel/external_forcing/deep_hot_jupiter_kernel_mod.F90 +++ b/science/gungho/source/kernel/external_forcing/deep_hot_jupiter_kernel_mod.F90 @@ -21,11 +21,12 @@ module deep_hot_jupiter_kernel_mod GH_READ, GH_READWRITE, & GH_SCALAR, & ANY_DISCONTINUOUS_SPACE_3, & + ANY_SPACE_9, & GH_READ, CELL_COLUMN use constants_mod, only: r_def, i_def use sci_chi_transform_mod, only: chi2llr use calc_exner_pointwise_mod, only: calc_exner_pointwise - use fs_continuity_mod, only: Wtheta, Wchi + use fs_continuity_mod, only: Wtheta use deep_hot_jupiter_forcings_mod, only: deep_hot_jupiter_newton_frequency, & deep_hot_jupiter_equilibrium_theta use kernel_mod, only: kernel_type @@ -46,7 +47,7 @@ module deep_hot_jupiter_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READWRITE, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_SCALAR, GH_REAL, GH_READ) & /) diff --git a/science/gungho/source/kernel/external_forcing/earth_like_kernel_mod.F90 b/science/gungho/source/kernel/external_forcing/earth_like_kernel_mod.F90 index 3699e7df6..8cd1cdf1c 100644 --- a/science/gungho/source/kernel/external_forcing/earth_like_kernel_mod.F90 +++ b/science/gungho/source/kernel/external_forcing/earth_like_kernel_mod.F90 @@ -21,11 +21,12 @@ module earth_like_kernel_mod GH_READ, GH_READWRITE, & GH_SCALAR, & ANY_DISCONTINUOUS_SPACE_3, & + ANY_SPACE_9, & GH_READ, CELL_COLUMN use constants_mod, only: r_def, i_def use sci_chi_transform_mod, only: chi2llr use calc_exner_pointwise_mod, only: calc_exner_pointwise - use fs_continuity_mod, only: Wtheta, Wchi + use fs_continuity_mod, only: Wtheta use earth_like_forcings_mod, only: earth_like_newton_frequency, & earth_like_equilibrium_theta use kernel_mod, only: kernel_type @@ -47,7 +48,7 @@ module earth_like_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_SCALAR, GH_REAL, GH_READ), & arg_type(GH_SCALAR, GH_REAL, GH_READ) & diff --git a/science/gungho/source/kernel/external_forcing/shallow_hot_jupiter_kernel_mod.F90 b/science/gungho/source/kernel/external_forcing/shallow_hot_jupiter_kernel_mod.F90 index 28994c674..6413a4be0 100644 --- a/science/gungho/source/kernel/external_forcing/shallow_hot_jupiter_kernel_mod.F90 +++ b/science/gungho/source/kernel/external_forcing/shallow_hot_jupiter_kernel_mod.F90 @@ -21,11 +21,12 @@ module shallow_hot_jupiter_kernel_mod GH_READ, GH_READWRITE, & GH_SCALAR, & ANY_DISCONTINUOUS_SPACE_3, & + ANY_SPACE_9, & GH_READ, CELL_COLUMN use constants_mod, only: r_def, i_def use sci_chi_transform_mod, only: chi2llr use calc_exner_pointwise_mod, only: calc_exner_pointwise - use fs_continuity_mod, only: Wtheta, Wchi + use fs_continuity_mod, only: Wtheta use shallow_hot_jupiter_forcings_mod, only: shallow_hot_jupiter_newton_frequency, & shallow_hot_jupiter_equilibrium_theta use kernel_mod, only: kernel_type @@ -47,7 +48,7 @@ module shallow_hot_jupiter_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_SCALAR, GH_REAL, GH_READ), & arg_type(GH_SCALAR, GH_REAL, GH_READ) & diff --git a/science/gungho/source/kernel/initialisation/initial_rho_sample_kernel_mod.F90 b/science/gungho/source/kernel/initialisation/initial_rho_sample_kernel_mod.F90 index 45fafaf31..4327e91d1 100644 --- a/science/gungho/source/kernel/initialisation/initial_rho_sample_kernel_mod.F90 +++ b/science/gungho/source/kernel/initialisation/initial_rho_sample_kernel_mod.F90 @@ -19,7 +19,6 @@ module initial_rho_sample_kernel_mod ANY_DISCONTINUOUS_SPACE_1, & ANY_DISCONTINUOUS_SPACE_3, & CELL_COLUMN, GH_EVALUATOR - use fs_continuity_mod, only : Wchi use constants_mod, only : r_def, i_def use idealised_config_mod, only : test use kernel_mod, only : kernel_type @@ -35,12 +34,12 @@ module initial_rho_sample_kernel_mod private type(arg_type) :: meta_args(4) = (/ & arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_SCALAR, GH_REAL, GH_READ) & /) type(func_type) :: meta_funcs(1) = (/ & - func_type(Wchi, GH_BASIS) & + func_type(ANY_SPACE_9, GH_BASIS) & /) integer :: operates_on = CELL_COLUMN integer :: gh_shape = GH_EVALUATOR diff --git a/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 b/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 index bc6f1bf39..dc243c379 100644 --- a/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 +++ b/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 @@ -34,13 +34,13 @@ module set_rho_kernel_mod private type(arg_type) :: meta_args(4) = (/ & arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_SCALAR, GH_REAL, GH_READ) & /) type(func_type) :: meta_funcs(2) = (/ & func_type(ANY_DISCONTINUOUS_SPACE_1, GH_BASIS), & - func_type(Wchi, GH_BASIS, GH_DIFF_BASIS) & + func_type(ANY_SPACE_9, GH_BASIS, GH_DIFF_BASIS) & /) integer :: operates_on = CELL_COLUMN integer :: gh_shape = GH_QUADRATURE_XYoZ diff --git a/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 b/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 index acabd2c24..ec2e9f530 100644 --- a/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 @@ -16,18 +16,19 @@ !! https://code.metoffice.gov.uk/trac/lfric/wiki/GhaspSupport/Documentation module eliminated_theta_q22_kernel_mod - use argument_mod, only: arg_type, func_type, & - GH_OPERATOR, GH_FIELD, & - GH_REAL, GH_SCALAR, & - GH_READ, GH_WRITE, & - GH_BASIS, GH_DIFF_BASIS, & - CELL_COLUMN, & - GH_QUADRATURE_XYoZ, & - ANY_DISCONTINUOUS_SPACE_3 + use argument_mod, only: arg_type, func_type, & + GH_OPERATOR, GH_FIELD, & + GH_REAL, GH_SCALAR, & + GH_READ, GH_WRITE, & + GH_BASIS, GH_DIFF_BASIS, & + CELL_COLUMN, & + GH_QUADRATURE_XYoZ, & + ANY_DISCONTINUOUS_SPACE_3, & + ANY_SPACE_9 use constants_mod, only: i_def, r_def, r_solver use sci_coordinate_jacobian_mod, only: coordinate_jacobian - use fs_continuity_mod, only: W2, Wtheta, Wchi + use fs_continuity_mod, only: W2, Wtheta use kernel_mod, only: kernel_type implicit none @@ -45,14 +46,14 @@ module eliminated_theta_q22_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_SCALAR, GH_REAL, GH_READ) & /) type(func_type) :: meta_funcs(3) = (/ & - func_type(W2, GH_BASIS), & - func_type(Wtheta, GH_DIFF_BASIS), & - func_type(Wchi, GH_BASIS, GH_DIFF_BASIS) & + func_type(W2, GH_BASIS), & + func_type(Wtheta, GH_DIFF_BASIS), & + func_type(ANY_SPACE_9, GH_BASIS, GH_DIFF_BASIS) & /) integer :: operates_on = CELL_COLUMN integer :: gh_shape = GH_QUADRATURE_XYoZ diff --git a/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 b/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 index 7116bbdb7..06ef2a9d4 100644 --- a/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 @@ -22,7 +22,7 @@ module w2_normalisation_kernel_mod GH_BASIS, GH_DIFF_BASIS, & CELL_COLUMN, GH_EVALUATOR use constants_mod, only : r_def, r_solver, i_def - use fs_continuity_mod, only : W2, Wchi + use fs_continuity_mod, only : W2 use kernel_mod, only : kernel_type implicit none @@ -39,14 +39,14 @@ module w2_normalisation_kernel_mod private type(arg_type) :: meta_args(4) = (/ & arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & arg_type(GH_FIELD, GH_REAL, GH_READ, W2) & /) - type(func_type) :: meta_funcs(2) = (/ & - func_type(W2, GH_BASIS), & - func_type(Wchi, GH_BASIS, GH_DIFF_BASIS) & + type(func_type) :: meta_funcs(2) = (/ & + func_type(W2, GH_BASIS), & + func_type(ANY_SPACE_9, GH_BASIS, GH_DIFF_BASIS) & /) integer :: operates_on = CELL_COLUMN integer :: gh_shape = GH_EVALUATOR diff --git a/science/gungho/source/kernel/transport/common/init_remap_on_extended_mesh_kernel_mod.F90 b/science/gungho/source/kernel/transport/common/init_remap_on_extended_mesh_kernel_mod.F90 index 7f88ff248..1fc8dc3d3 100644 --- a/science/gungho/source/kernel/transport/common/init_remap_on_extended_mesh_kernel_mod.F90 +++ b/science/gungho/source/kernel/transport/common/init_remap_on_extended_mesh_kernel_mod.F90 @@ -19,12 +19,12 @@ module init_remap_on_extended_mesh_kernel_mod GH_READ, GH_WRITE, & ANY_DISCONTINUOUS_SPACE_1, & ANY_DISCONTINUOUS_SPACE_3, & + ANY_SPACE_9, & GH_BASIS, & HALO_CELL_COLUMN, & STENCIL, CROSS2D, & GH_EVALUATOR use constants_mod, only: r_tran, r_def, i_def, l_def, LARGE_REAL_POSITIVE -use fs_continuity_mod, only: Wchi implicit none @@ -39,14 +39,14 @@ module init_remap_on_extended_mesh_kernel_mod type(arg_type) :: meta_args(7) = (/ & arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & arg_type(GH_FIELD, GH_INTEGER, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi, STENCIL(CROSS2D)), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9, STENCIL(CROSS2D)), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3, STENCIL(CROSS2D)), & arg_type(GH_SCALAR, GH_LOGICAL, GH_READ), & arg_type(GH_SCALAR, GH_INTEGER, GH_READ) & /) type(func_type) :: meta_funcs(1) = (/ & - func_type(Wchi, GH_BASIS) & + func_type(ANY_SPACE_9, GH_BASIS) & /) integer :: operates_on = HALO_CELL_COLUMN integer :: gh_shape = GH_EVALUATOR diff --git a/science/gungho/source/kernel/transport/common/panel_edge_weights_kernel_mod.F90 b/science/gungho/source/kernel/transport/common/panel_edge_weights_kernel_mod.F90 index 2d51a6417..2a4e40b85 100644 --- a/science/gungho/source/kernel/transport/common/panel_edge_weights_kernel_mod.F90 +++ b/science/gungho/source/kernel/transport/common/panel_edge_weights_kernel_mod.F90 @@ -16,10 +16,10 @@ module panel_edge_weights_kernel_mod ANY_DISCONTINUOUS_SPACE_3, & ANY_DISCONTINUOUS_SPACE_5, & ANY_DISCONTINUOUS_SPACE_9, & + ANY_SPACE_9, & GH_BASIS, GH_EVALUATOR, & CELL_COLUMN, STENCIL, CROSS2D use constants_mod, only: r_tran, r_def, i_def, l_def, LARGE_REAL_POSITIVE -use fs_continuity_mod, only: Wchi use reference_element_mod, only: W, S, N, E implicit none @@ -37,7 +37,8 @@ module panel_edge_weights_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_5), & arg_type(GH_FIELD, GH_INTEGER, GH_WRITE, ANY_DISCONTINUOUS_SPACE_5), & arg_type(GH_FIELD, GH_INTEGER, GH_WRITE, ANY_DISCONTINUOUS_SPACE_5), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi, STENCIL(CROSS2D)), & + arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9, & + STENCIL(CROSS2D)), & arg_type(GH_FIELD*2, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_9), & arg_type(GH_FIELD*2, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_9), & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3, & @@ -47,7 +48,7 @@ module panel_edge_weights_kernel_mod arg_type(GH_SCALAR, GH_INTEGER, GH_READ) & /) type(func_type) :: meta_funcs(2) = (/ & - func_type(Wchi, GH_BASIS), & + func_type(ANY_SPACE_9, GH_BASIS), & func_type(ANY_DISCONTINUOUS_SPACE_9, GH_BASIS) & /) integer :: operates_on = CELL_COLUMN diff --git a/science/gungho/source/kernel/transport/mol/consistent_wind_kernel_mod.F90 b/science/gungho/source/kernel/transport/mol/consistent_wind_kernel_mod.F90 index fed6b05c8..d986123af 100644 --- a/science/gungho/source/kernel/transport/mol/consistent_wind_kernel_mod.F90 +++ b/science/gungho/source/kernel/transport/mol/consistent_wind_kernel_mod.F90 @@ -13,13 +13,14 @@ module consistent_wind_kernel_mod -use argument_mod, only : arg_type, func_type, & - GH_FIELD, GH_REAL, & - GH_READWRITE, GH_READ, & - GH_BASIS, GH_DIFF_BASIS, & - CELL_COLUMN, GH_EVALUATOR +use argument_mod, only : arg_type, func_type, & + GH_FIELD, GH_REAL, & + GH_READWRITE, GH_READ, & + GH_BASIS, GH_DIFF_BASIS, & + CELL_COLUMN, GH_EVALUATOR, & + ANY_SPACE_9 use constants_mod, only : r_def, i_def, r_tran -use fs_continuity_mod, only : Wtheta, W2, W2v, Wchi +use fs_continuity_mod, only : Wtheta, W2, W2v use kernel_mod, only : kernel_type implicit none @@ -31,15 +32,15 @@ module consistent_wind_kernel_mod !> The type declaration for the kernel. Contains the metadata needed by the PSy layer type, public, extends(kernel_type) :: consistent_wind_kernel_type private - type(arg_type) :: meta_args(4) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_READWRITE, W2v), & - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & - arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & - arg_type(GH_FIELD, GH_REAL, GH_READ, Wchi) & + type(arg_type) :: meta_args(4) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_READWRITE, W2v), & + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & + arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & + arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_SPACE_9) & /) - type(func_type) :: meta_funcs(2) = (/ & - func_type(W2, GH_BASIS), & - func_type(Wchi, GH_DIFF_BASIS) & + type(func_type) :: meta_funcs(2) = (/ & + func_type(W2, GH_BASIS), & + func_type(ANY_SPACE_9, GH_DIFF_BASIS) & /) integer :: operates_on = CELL_COLUMN integer :: gh_shape = GH_EVALUATOR diff --git a/science/gungho/source/orography/assign_orography_field_mod.F90 b/science/gungho/source/orography/assign_orography_field_mod.F90 index 0669560cb..9c8a02c0e 100644 --- a/science/gungho/source/orography/assign_orography_field_mod.F90 +++ b/science/gungho/source/orography/assign_orography_field_mod.F90 @@ -232,9 +232,9 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & end if ! Copy chi to chi_in, to allow adjustment of continuous chi fields - call chi(1)%copy_field_properties(chi_in(1)) - call chi(2)%copy_field_properties(chi_in(2)) - call chi(3)%copy_field_properties(chi_in(3)) + call chi(1)%copy_field_serial(chi_in(1)) + call chi(2)%copy_field_serial(chi_in(2)) + call chi(3)%copy_field_serial(chi_in(3)) ! Break encapsulation and get the proxy chi_proxy(1) = chi(1)%get_proxy() @@ -253,11 +253,6 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & map_chi => chi_proxy(1)%vspace%get_whole_dofmap() map_pid => panel_id_proxy%vspace%get_whole_dofmap() - ! Copy data values into "chi_in" fields - chi_in_proxy(1)%data = chi_proxy(1)%data - chi_in_proxy(2)%data = chi_proxy(2)%data - chi_in_proxy(3)%data = chi_proxy(3)%data - ! Call column procedure do cell = 1, chi_proxy(1)%vspace%get_ncell() call analytic_orography( & @@ -288,9 +283,9 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & end if ! Copy chi to chi_in, to allow adjustment of continuous chi fields - call chi(1)%copy_field_properties(chi_in(1)) - call chi(2)%copy_field_properties(chi_in(2)) - call chi(3)%copy_field_properties(chi_in(3)) + call chi(1)%copy_field_serial(chi_in(1)) + call chi(2)%copy_field_serial(chi_in(2)) + call chi(3)%copy_field_serial(chi_in(3)) ! Break encapsulation and get the proxy chi_proxy(1) = chi(1)%get_proxy() @@ -314,11 +309,6 @@ subroutine assign_orography_field(chi_inventory, panel_id_inventory, & map_sf => sfc_alt_proxy%vspace%get_whole_dofmap() map_pid => panel_id_proxy%vspace%get_whole_dofmap() - ! Copy data values into "chi_in" fields - chi_in_proxy(1)%data = chi_proxy(1)%data - chi_in_proxy(2)%data = chi_proxy(2)%data - chi_in_proxy(3)%data = chi_proxy(3)%data - dim_sf = sfc_alt_proxy%vspace%get_dim_space() nodes => chi_proxy(1)%vspace%get_nodes() allocate(basis_sf_on_chi(dim_sf, ndf_sf, ndf_chi)) From 7ade22a5f20e319e2a26e5b2277b06682cff6d51 Mon Sep 17 00:00:00 2001 From: Thomas Bendall <14180399+tommbendall@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:48:28 +0000 Subject: [PATCH 12/12] test tweak --- rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf index e05601b1a..7879e5ef4 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf @@ -78,6 +78,9 @@ start_dump_directory='' start_dump_filename='' !!surface_frac_ancil_path='' +[namelist:finite_element] +coord_space='Wchi' + [namelist:formulation] moisture_formulation='dry' shallow=.false.