Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# Contributors

| GitHub user | Real Name | Affiliation | Date |
| ---------------- | ---------------------- | ----------- | ---------- |
| andrewcoughtrie | Andrew Coughtrie | Met Office | 2025.12.12 |
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| jedbakerMO | Jed Baker | Met Office | 2025-12-29 |
| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 |
| mo-marqh | Mark Hedley | Met Office | 2025-12-11 |
| mo-rickywong | Ricky Wong | Met Office | 2025-01-30 |
| mike-hobson | Mike Hobson | Met Office | 2025-12-17 |
| MatthewHambley | Matthew Hambley | Met Office | 2025-12-15 |
| mo-lottieturner | Lottie Turner | Met Office | 2025-12-16 |
| tommbendall | Thomas Bendall | Met Office | 2026-01-23 |
| yaswant | Yaswant Pradhan | Met Office | 2025-12-16 |
| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-08 |
| harry-shepherd | Harry Shepherd | Met Office | 2026-01-08 |
| EdHone | Ed Hone | Met Office | 2026-01-09 |
| tom-j-h | Tom Hill | Met Office | 2026-01-19 |
| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-12 |
| t00sa | Sam Clarke-Green | Met Office | 2026-01-27 |
| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-30 |
| jcsmeto | James Cunningham-Smith | Met Office | 2026-02-06 |
| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 |
| ericaneininger | Erica Neininger | Met Office | 2026-03-02 |
| mo-lucy-gordon | Lucy Gordon | Met Office | 2026-03-18 |
| GitHub user | Real Name | Affiliation | Date |
| ------------------- | ---------------------- | ----------- | ---------- |
| andrewcoughtrie | Andrew Coughtrie | Met Office | 2025.12.12 |
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| jedbakerMO | Jed Baker | Met Office | 2025-12-29 |
| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 |
| mo-marqh | Mark Hedley | Met Office | 2025-12-11 |
| mo-rickywong | Ricky Wong | Met Office | 2025-01-30 |
| mike-hobson | Mike Hobson | Met Office | 2025-12-17 |
| MatthewHambley | Matthew Hambley | Met Office | 2025-12-15 |
| mo-lottieturner | Lottie Turner | Met Office | 2025-12-16 |
| tommbendall | Thomas Bendall | Met Office | 2026-01-23 |
| yaswant | Yaswant Pradhan | Met Office | 2025-12-16 |
| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-08 |
| harry-shepherd | Harry Shepherd | Met Office | 2026-01-08 |
| EdHone | Ed Hone | Met Office | 2026-01-09 |
| tom-j-h | Tom Hill | Met Office | 2026-01-19 |
| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-12 |
| t00sa | Sam Clarke-Green | Met Office | 2026-01-27 |
| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-30 |
| jcsmeto | James Cunningham-Smith | Met Office | 2026-02-06 |
| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 |
| ericaneininger | Erica Neininger | Met Office | 2026-03-02 |
| mo-lucy-gordon | Lucy Gordon | Met Office | 2026-03-18 |
| ukmo-juan-castillo | Juan M. Castillo | Met Office | 2026-03-24 |

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ module sci_mapping_constants_mod
tik, LPROF

! Configuration
use base_mesh_config_mod, only: geometry_spherical, &
geometry_planar, &
topology_fully_periodic, &
topology_non_periodic
use finite_element_config_mod, only: element_order_h, &
element_order_v

Expand Down Expand Up @@ -273,6 +277,8 @@ contains
type(operator_type), pointer :: u_lat_sample
type(operator_type), pointer :: u_up_sample
integer(tik) :: id
integer(kind=i_def) :: geometry
integer(kind=i_def) :: topology

if (.not. u_lon_sample_inventory%is_initialised()) then
call u_lon_sample_inventory%initialise(name='u_lon_sample')
Expand All @@ -288,6 +294,17 @@ contains
chi => get_coordinates(mesh_id)
panel_id => get_panel_id(mesh_id)

if (mesh%is_geometry_planar()) then
geometry = geometry_planar
else if (mesh%is_geometry_spherical()) then
geometry = geometry_spherical
end if
if (mesh%is_topology_non_periodic()) then
topology = topology_non_periodic
else if (mesh%is_topology_periodic()) then
topology = topology_fully_periodic
end if

Comment on lines 295 to +307
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, though this doesn't seem like the appropriate place to be changing this. geometry, topology that reaches science code on core should be passed down from lfric2lfric code.

While code should try to be helpful, if shouldn't be changing configuration for the user/application. If the entries are wrong, it should break, not change them for the user.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you read one of my comments above I asked about this possibility. I will then need to pass the geometry and topology parameters through the interp_w3wth_to_w2_alg subroutine. Thank you for confirming!

if ( LPROF ) call start_timing( id, 'runtime_constants.mapping' )

! Kernels only work for lowest order spaces so use finite volume
Expand All @@ -303,7 +320,8 @@ contains
compute_sample_u_ops_kernel_type(u_lon_sample, &
u_lat_sample, &
u_up_sample, &
chi, panel_id) )
chi, panel_id, &
geometry, topology) )

if ( LPROF ) call stop_timing( id, 'runtime_constants.mapping' )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
module sci_compute_sample_u_ops_kernel_mod

use argument_mod, only : arg_type, func_type, &
GH_FIELD, GH_REAL, &
GH_OPERATOR, &
GH_FIELD, GH_SCALAR, GH_REAL,&
GH_INTEGER, GH_OPERATOR, &
GH_INC, GH_READ, GH_WRITE, &
ANY_DISCONTINUOUS_SPACE_3, &
GH_BASIS, GH_DIFF_BASIS, &
Expand All @@ -33,8 +33,7 @@ module sci_compute_sample_u_ops_kernel_mod
use reference_element_mod, only : W, S, N, E, T, B

use finite_element_config_mod, only: coord_system
use base_mesh_config_mod, only: geometry, topology, &
geometry_spherical, &
use base_mesh_config_mod, only: geometry_spherical, &
geometry_planar
use planet_config_mod, only: scaled_radius

Expand All @@ -50,12 +49,14 @@ module sci_compute_sample_u_ops_kernel_mod
!>
type, public, extends(kernel_type) :: compute_sample_u_ops_kernel_type
private
type(arg_type) :: meta_args(5) = (/ &
arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, W2broken, W3), &
arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, W2broken, W3), &
arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, W2broken, WTHETA), &
arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), &
arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3) &
type(arg_type) :: meta_args(7) = (/ &
arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, W2broken, W3), &
arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, W2broken, W3), &
arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, W2broken, WTHETA), &
arg_type(GH_FIELD*3, GH_REAL, GH_READ, Wchi), &
arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), &
arg_type(GH_SCALAR, GH_INTEGER, GH_READ), &
arg_type(GH_SCALAR, GH_INTEGER, GH_READ) &
/)
type(func_type) :: meta_funcs(1) = (/ &
func_type(Wchi, GH_BASIS, GH_DIFF_BASIS) &
Expand Down Expand Up @@ -89,6 +90,8 @@ module sci_compute_sample_u_ops_kernel_mod
!> @param[in] chi2 Coordinates in the second direction
!> @param[in] chi3 Coordinates in the third direction
!> @param[in] panel_id A field giving the ID for mesh panels
!> @param[in] geometry Mesh geometry type
!> @param[in] topology Mesh topology type
!> @param[in] ndf_w2b Number of DoFs per cell for broken W2
!> @param[in] ndf_w3 Number of DoFs per cell for W3
!> @param[in] ndf_wt Number of DoFs per cell for Wtheta
Expand All @@ -110,6 +113,7 @@ subroutine compute_sample_u_ops_code( col, nlayers, &
ncell_3d_3, u_rad_op, &
chi1, chi2, chi3, &
panel_id, &
geometry, topology, &
ndf_w2b, ndf_w3, ndf_wt, &
ndf_chi, undf_chi, map_chi, &
chi_basis, chi_diff_basis, &
Expand Down Expand Up @@ -137,6 +141,8 @@ subroutine compute_sample_u_ops_code( col, nlayers, &
! Fields
real(kind=r_def), dimension(undf_pid), intent(in) :: panel_id
real(kind=r_def), dimension(undf_chi), intent(in) :: chi1, chi2, chi3
integer(kind=i_def), intent(in) :: geometry
integer(kind=i_def), intent(in) :: topology

! Operators
real(kind=r_def), dimension(ncell_3d_1,ndf_w2b,ndf_w3), intent(inout) :: u_lon_op
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ contains
@test
subroutine test_all()

use base_mesh_config_mod, only : geometry_spherical, &
topology_non_periodic
use matrix_vector_kernel_mod, only : matrix_vector_code
use sci_average_w2b_to_w2_kernel_mod, only : average_w2b_to_w2_code
use sci_compute_sample_u_ops_kernel_mod, only : compute_sample_u_ops_code
Expand Down Expand Up @@ -275,6 +277,8 @@ contains
chi_data(:,2), &
chi_data(:,3), &
panel_id_data, &
geometry_spherical, &
topology_non_periodic, &
ndf_w2b, ndf_w3, ndf_wt, &
ndf_wchi, undf_wchi, map_wchi(:,cell), &
basis_wchi, diff_basis_wchi, &
Expand Down
Loading