From 32f2c32e6a670522fa6f71ac44a272edf4e39e56 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Thu, 7 May 2026 16:52:36 +0100 Subject: [PATCH 1/6] added rule exceptions and some fixes --- .../source/driver/coupled_driver_mod.f90 | 2 +- components/coupling/source/coupling_mod.F90 | 6 +- .../lfric-xios/source/lfric_xios_mock_mod.f90 | 2 +- .../source/psy/sci_psykal_light_mod.f90 | 112 +++++++++--------- .../solver/sci_iterative_solver_mod.f90 | 9 ++ .../file/fortitude.toml | 51 +++++++- 6 files changed, 118 insertions(+), 64 deletions(-) diff --git a/applications/coupled/source/driver/coupled_driver_mod.f90 b/applications/coupled/source/driver/coupled_driver_mod.f90 index ee3fda2aa..a284eebac 100644 --- a/applications/coupled/source/driver/coupled_driver_mod.f90 +++ b/applications/coupled/source/driver/coupled_driver_mod.f90 @@ -188,7 +188,7 @@ subroutine finalise( program_name, modeldb ) depository => modeldb%fields%get_field_collection("depository") call depository%get_field("field_2", field_2) - ! Write checksum of coupled field (on incoming component) to file + ! Write checksum of coupled field (on incoming component) to file call modeldb%values%get_value("cpl_name", cpl_component_name) if (trim(cpl_component_name) == "lfric_i") then call checksum_alg(program_name, field_2, 'coupled_field_2') diff --git a/components/coupling/source/coupling_mod.F90 b/components/coupling/source/coupling_mod.F90 index ff11bc24c..1d24bed14 100644 --- a/components/coupling/source/coupling_mod.F90 +++ b/components/coupling/source/coupling_mod.F90 @@ -102,14 +102,14 @@ subroutine initialise(self, cpl_name, comm_out, comm_in, comm_is_split) kinfo, & commworld=comm_in%get_comm_mpi_val()) - if (kinfo .NE. prism_ok) then + if (kinfo /= prism_ok) then call oasis_abort(self%comp_id, trim(cpl_name), 'initialise') endif call oasis_get_localcomm(comm, kinfo) call comm_out%set_comm_mpi_val(comm) - if (kinfo .NE. prism_ok) then + if (kinfo /= prism_ok) then call oasis_abort(self%comp_id, trim(cpl_name), 'initialise') endif @@ -508,7 +508,7 @@ subroutine finalise(self) kinfo = prism_ok call oasis_terminate(kinfo) - if (kinfo .NE. prism_ok) then + if (kinfo /= prism_ok) then write(log_scratch_space,'(A, I4)') & "finalise: oasis_terminate error: ", kinfo call log_event( log_scratch_space, LOG_LEVEL_ERROR ) diff --git a/components/lfric-xios/source/lfric_xios_mock_mod.f90 b/components/lfric-xios/source/lfric_xios_mock_mod.f90 index 0bd2abc90..b3a5ca843 100644 --- a/components/lfric-xios/source/lfric_xios_mock_mod.f90 +++ b/components/lfric-xios/source/lfric_xios_mock_mod.f90 @@ -177,7 +177,7 @@ function xios_is_valid_axis(axis_id) result(status) implicit none character(len=*), intent(in) :: axis_id - logical(l_def) status + logical(l_def) :: status status = .true. end function xios_is_valid_axis diff --git a/components/science/source/psy/sci_psykal_light_mod.f90 b/components/science/source/psy/sci_psykal_light_mod.f90 index de13f593f..9e31a46fb 100644 --- a/components/science/source/psy/sci_psykal_light_mod.f90 +++ b/components/science/source/psy/sci_psykal_light_mod.f90 @@ -278,29 +278,29 @@ SUBROUTINE invoke_weights_scalar_inter_element_order_kernel_type(dummy_fine, dum USE mesh_mod, ONLY: mesh_type TYPE(field_type), intent(in) :: dummy_fine, dummy_coarse, weights_high_low, weights_low_high TYPE(quadrature_xyoz_type), intent(in) :: qr - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop REAL(KIND=r_def), allocatable :: basis_adspc2_dummy_coarse_qr(:,:,:,:) - INTEGER(KIND=i_def) dim_adspc2_dummy_coarse + INTEGER(KIND=i_def) :: dim_adspc2_dummy_coarse REAL(KIND=r_def), pointer :: weights_xy_qr(:) => null(), weights_z_qr(:) => null() - INTEGER(KIND=i_def) np_xy_qr, np_z_qr - INTEGER(KIND=i_def) nlayers_dummy_fine + INTEGER(KIND=i_def) :: np_xy_qr, np_z_qr + INTEGER(KIND=i_def) :: nlayers_dummy_fine REAL(KIND=r_def), pointer, dimension(:) :: weights_low_high_data => null() REAL(KIND=r_def), pointer, dimension(:) :: weights_high_low_data => null() REAL(KIND=r_def), pointer, dimension(:) :: dummy_coarse_data => null() REAL(KIND=r_def), pointer, dimension(:) :: dummy_fine_data => null() - TYPE(field_proxy_type) dummy_fine_proxy, dummy_coarse_proxy, weights_high_low_proxy, weights_low_high_proxy - TYPE(quadrature_xyoz_proxy_type) qr_proxy + TYPE(field_proxy_type) :: dummy_fine_proxy, dummy_coarse_proxy, weights_high_low_proxy, weights_low_high_proxy + TYPE(quadrature_xyoz_proxy_type) :: qr_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_dummy_fine(:,:) => null(), map_adspc2_dummy_coarse(:,:) => null(), & &map_adspc3_weights_high_low(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_dummy_fine, undf_adspc1_dummy_fine, ndf_adspc2_dummy_coarse, undf_adspc2_dummy_coarse, & + INTEGER(KIND=i_def) :: ndf_adspc1_dummy_fine, undf_adspc1_dummy_fine, ndf_adspc2_dummy_coarse, undf_adspc2_dummy_coarse, & &ndf_adspc3_weights_high_low, undf_adspc3_weights_high_low - INTEGER(KIND=i_def) ncell_dummy_fine, ncpc_dummy_fine_dummy_coarse_x, ncpc_dummy_fine_dummy_coarse_y + INTEGER(KIND=i_def) :: ncell_dummy_fine, ncpc_dummy_fine_dummy_coarse_x, ncpc_dummy_fine_dummy_coarse_y INTEGER(KIND=i_def), pointer :: cell_map_dummy_coarse(:,:,:) => null() TYPE(mesh_map_type), pointer :: mmap_dummy_fine_dummy_coarse => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_dummy_fine + INTEGER(KIND=i_def) :: max_halo_depth_mesh_dummy_fine TYPE(mesh_type), pointer :: mesh_dummy_fine => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_dummy_coarse + INTEGER(KIND=i_def) :: max_halo_depth_mesh_dummy_coarse TYPE(mesh_type), pointer :: mesh_dummy_coarse => null() ! ! Initialise field and/or operator proxies @@ -406,23 +406,23 @@ SUBROUTINE invoke_map_scalar_fe_to_fv_kernel_type(fine_field, coarse_field, weig USE mesh_map_mod, ONLY: mesh_map_type USE mesh_mod, ONLY: mesh_type TYPE(field_type), intent(in) :: fine_field, coarse_field, weights_high_to_low - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_fine_field + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_fine_field REAL(KIND=r_def), pointer, dimension(:) :: weights_high_to_low_data => null() REAL(KIND=r_def), pointer, dimension(:) :: coarse_field_data => null() REAL(KIND=r_def), pointer, dimension(:) :: fine_field_data => null() - TYPE(field_proxy_type) fine_field_proxy, coarse_field_proxy, weights_high_to_low_proxy + TYPE(field_proxy_type) :: fine_field_proxy, coarse_field_proxy, weights_high_to_low_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_fine_field(:,:) => null(), map_adspc2_coarse_field(:,:) => null(), & &map_adspc3_weights_high_to_low(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_fine_field, undf_adspc1_fine_field, ndf_adspc2_coarse_field, undf_adspc2_coarse_field, & + INTEGER(KIND=i_def) :: ndf_adspc1_fine_field, undf_adspc1_fine_field, ndf_adspc2_coarse_field, undf_adspc2_coarse_field, & &ndf_adspc3_weights_high_to_low, undf_adspc3_weights_high_to_low - INTEGER(KIND=i_def) ncell_fine_field, ncpc_fine_field_coarse_field_x, ncpc_fine_field_coarse_field_y + INTEGER(KIND=i_def) :: ncell_fine_field, ncpc_fine_field_coarse_field_x, ncpc_fine_field_coarse_field_y INTEGER(KIND=i_def), pointer :: cell_map_coarse_field(:,:,:) => null() TYPE(mesh_map_type), pointer :: mmap_fine_field_coarse_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_fine_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_fine_field TYPE(mesh_type), pointer :: mesh_fine_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_coarse_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_coarse_field TYPE(mesh_type), pointer :: mesh_coarse_field => null() ! ! Initialise field and/or operator proxies @@ -504,23 +504,23 @@ SUBROUTINE invoke_map_scalar_fv_to_fe_kernel_type(coarse_field, fine_field, weig USE mesh_map_mod, ONLY: mesh_map_type USE mesh_mod, ONLY: mesh_type TYPE(field_type), intent(in) :: coarse_field, fine_field, weights_low_to_high - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_coarse_field + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_coarse_field REAL(KIND=r_def), pointer, dimension(:) :: weights_low_to_high_data => null() REAL(KIND=r_def), pointer, dimension(:) :: fine_field_data => null() REAL(KIND=r_def), pointer, dimension(:) :: coarse_field_data => null() - TYPE(field_proxy_type) coarse_field_proxy, fine_field_proxy, weights_low_to_high_proxy + TYPE(field_proxy_type) :: coarse_field_proxy, fine_field_proxy, weights_low_to_high_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_coarse_field(:,:) => null(), map_adspc2_fine_field(:,:) => null(), & &map_adspc3_weights_low_to_high(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_coarse_field, undf_adspc1_coarse_field, ndf_adspc2_fine_field, undf_adspc2_fine_field, & + INTEGER(KIND=i_def) :: ndf_adspc1_coarse_field, undf_adspc1_coarse_field, ndf_adspc2_fine_field, undf_adspc2_fine_field, & &ndf_adspc3_weights_low_to_high, undf_adspc3_weights_low_to_high - INTEGER(KIND=i_def) ncell_fine_field, ncpc_fine_field_coarse_field_x, ncpc_fine_field_coarse_field_y + INTEGER(KIND=i_def) :: ncell_fine_field, ncpc_fine_field_coarse_field_x, ncpc_fine_field_coarse_field_y INTEGER(KIND=i_def), pointer :: cell_map_coarse_field(:,:,:) => null() TYPE(mesh_map_type), pointer :: mmap_fine_field_coarse_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_fine_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_fine_field TYPE(mesh_type), pointer :: mesh_fine_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_coarse_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_coarse_field TYPE(mesh_type), pointer :: mesh_coarse_field => null() ! ! Initialise field and/or operator proxies @@ -605,29 +605,29 @@ SUBROUTINE invoke_weights_w2_inter_element_order_kernel_type(dummy_fine, dummy_c USE mesh_mod, ONLY: mesh_type TYPE(field_type), intent(in) :: dummy_fine, dummy_coarse, weights_high_low, weights_low_high TYPE(quadrature_xyoz_type), intent(in) :: qr - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop REAL(KIND=r_def), allocatable :: basis_adspc2_dummy_coarse_qr(:,:,:,:) - INTEGER(KIND=i_def) dim_adspc2_dummy_coarse + INTEGER(KIND=i_def) :: dim_adspc2_dummy_coarse REAL(KIND=r_def), pointer :: weights_xy_qr(:) => null(), weights_z_qr(:) => null() - INTEGER(KIND=i_def) np_xy_qr, np_z_qr - INTEGER(KIND=i_def) nlayers_dummy_fine + INTEGER(KIND=i_def) :: np_xy_qr, np_z_qr + INTEGER(KIND=i_def) :: nlayers_dummy_fine REAL(KIND=r_def), pointer, dimension(:) :: weights_low_high_data => null() REAL(KIND=r_def), pointer, dimension(:) :: weights_high_low_data => null() REAL(KIND=r_def), pointer, dimension(:) :: dummy_coarse_data => null() REAL(KIND=r_def), pointer, dimension(:) :: dummy_fine_data => null() - TYPE(field_proxy_type) dummy_fine_proxy, dummy_coarse_proxy, weights_high_low_proxy, weights_low_high_proxy - TYPE(quadrature_xyoz_proxy_type) qr_proxy + TYPE(field_proxy_type) :: dummy_fine_proxy, dummy_coarse_proxy, weights_high_low_proxy, weights_low_high_proxy + TYPE(quadrature_xyoz_proxy_type) :: qr_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_dummy_fine(:,:) => null(), map_adspc2_dummy_coarse(:,:) => null(), & &map_adspc3_weights_high_low(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_dummy_fine, undf_adspc1_dummy_fine, ndf_adspc2_dummy_coarse, undf_adspc2_dummy_coarse, & + INTEGER(KIND=i_def) :: ndf_adspc1_dummy_fine, undf_adspc1_dummy_fine, ndf_adspc2_dummy_coarse, undf_adspc2_dummy_coarse, & &ndf_adspc3_weights_high_low, undf_adspc3_weights_high_low - INTEGER(KIND=i_def) ncell_dummy_fine, ncpc_dummy_fine_dummy_coarse_x, ncpc_dummy_fine_dummy_coarse_y + INTEGER(KIND=i_def) :: ncell_dummy_fine, ncpc_dummy_fine_dummy_coarse_x, ncpc_dummy_fine_dummy_coarse_y INTEGER(KIND=i_def), pointer :: cell_map_dummy_coarse(:,:,:) => null() TYPE(mesh_map_type), pointer :: mmap_dummy_fine_dummy_coarse => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_dummy_fine + INTEGER(KIND=i_def) :: max_halo_depth_mesh_dummy_fine TYPE(mesh_type), pointer :: mesh_dummy_fine => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_dummy_coarse + INTEGER(KIND=i_def) :: max_halo_depth_mesh_dummy_coarse TYPE(mesh_type), pointer :: mesh_dummy_coarse => null() ! ! Initialise field and/or operator proxies @@ -735,26 +735,26 @@ SUBROUTINE invoke_map_w2_fv_to_fe_kernel_type(target_field, source_field, weight USE mesh_mod, ONLY: mesh_type TYPE(field_type), intent(in) :: target_field, source_field, weights TYPE(integer_field_type), intent(in) :: face_selector_ew, face_selector_ns - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_target_field + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_target_field INTEGER(KIND=i_def), pointer, dimension(:) :: face_selector_ns_data => null() INTEGER(KIND=i_def), pointer, dimension(:) :: face_selector_ew_data => null() - TYPE(integer_field_proxy_type) face_selector_ew_proxy, face_selector_ns_proxy + TYPE(integer_field_proxy_type) :: face_selector_ew_proxy, face_selector_ns_proxy REAL(KIND=r_def), pointer, dimension(:) :: weights_data => null() REAL(KIND=r_def), pointer, dimension(:) :: source_field_data => null() REAL(KIND=r_def), pointer, dimension(:) :: target_field_data => null() - TYPE(field_proxy_type) target_field_proxy, source_field_proxy, weights_proxy + TYPE(field_proxy_type) :: target_field_proxy, source_field_proxy, weights_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_target_field(:,:) => null(), map_adspc2_source_field(:,:) => null(), & &map_adspc3_weights(:,:) => null(), map_adspc4_face_selector_ew(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_target_field, undf_adspc1_target_field, ndf_adspc2_source_field, undf_adspc2_source_field, & + INTEGER(KIND=i_def) :: ndf_adspc1_target_field, undf_adspc1_target_field, ndf_adspc2_source_field, undf_adspc2_source_field, & &ndf_adspc3_weights, undf_adspc3_weights, ndf_adspc4_face_selector_ew, undf_adspc4_face_selector_ew - INTEGER(KIND=i_def) ncell_source_field, ncpc_source_field_target_field_x, ncpc_source_field_target_field_y + INTEGER(KIND=i_def) :: ncell_source_field, ncpc_source_field_target_field_x, ncpc_source_field_target_field_y INTEGER(KIND=i_def), pointer :: cell_map_target_field(:,:,:) => null() TYPE(mesh_map_type), pointer :: mmap_source_field_target_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_target_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_target_field TYPE(mesh_type), pointer :: mesh_target_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_source_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_source_field TYPE(mesh_type), pointer :: mesh_source_field => null() ! ! Initialise field and/or operator proxies @@ -846,26 +846,26 @@ SUBROUTINE invoke_map_w2_fe_to_fv_kernel_type(target_field, source_field, weight USE mesh_mod, ONLY: mesh_type TYPE(field_type), intent(in) :: target_field, source_field, weights TYPE(integer_field_type), intent(in) :: face_selector_ew, face_selector_ns - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_target_field + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_target_field INTEGER(KIND=i_def), pointer, dimension(:) :: face_selector_ns_data => null() INTEGER(KIND=i_def), pointer, dimension(:) :: face_selector_ew_data => null() - TYPE(integer_field_proxy_type) face_selector_ew_proxy, face_selector_ns_proxy + TYPE(integer_field_proxy_type) :: face_selector_ew_proxy, face_selector_ns_proxy REAL(KIND=r_def), pointer, dimension(:) :: weights_data => null() REAL(KIND=r_def), pointer, dimension(:) :: source_field_data => null() REAL(KIND=r_def), pointer, dimension(:) :: target_field_data => null() - TYPE(field_proxy_type) target_field_proxy, source_field_proxy, weights_proxy + TYPE(field_proxy_type) :: target_field_proxy, source_field_proxy, weights_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_target_field(:,:) => null(), map_adspc2_source_field(:,:) => null(), & &map_adspc3_weights(:,:) => null(), map_adspc4_face_selector_ew(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_target_field, undf_adspc1_target_field, ndf_adspc2_source_field, undf_adspc2_source_field, & + INTEGER(KIND=i_def) :: ndf_adspc1_target_field, undf_adspc1_target_field, ndf_adspc2_source_field, undf_adspc2_source_field, & &ndf_adspc3_weights, undf_adspc3_weights, ndf_adspc4_face_selector_ew, undf_adspc4_face_selector_ew - INTEGER(KIND=i_def) ncell_target_field, ncpc_target_field_source_field_x, ncpc_target_field_source_field_y + INTEGER(KIND=i_def) :: ncell_target_field, ncpc_target_field_source_field_x, ncpc_target_field_source_field_y INTEGER(KIND=i_def), pointer :: cell_map_source_field(:,:,:) => null() TYPE(mesh_map_type), pointer :: mmap_target_field_source_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_target_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_target_field TYPE(mesh_type), pointer :: mesh_target_field => null() - INTEGER(KIND=i_def) max_halo_depth_mesh_source_field + INTEGER(KIND=i_def) :: max_halo_depth_mesh_source_field TYPE(mesh_type), pointer :: mesh_source_field => null() ! ! Initialise field and/or operator proxies diff --git a/components/science/source/solver/sci_iterative_solver_mod.f90 b/components/science/source/solver/sci_iterative_solver_mod.f90 index 48a1fde6a..568c66ee6 100644 --- a/components/science/source/solver/sci_iterative_solver_mod.f90 +++ b/components/science/source/solver/sci_iterative_solver_mod.f90 @@ -444,6 +444,7 @@ end module sci_iterative_solver_mod ! Submodule with procedures for conjugate gradient ! submodule(sci_iterative_solver_mod) conjugate_gradient_smod + implicit none contains !> Constructs a conjugate_gradient solver. @@ -595,6 +596,7 @@ end subroutine cg_solve ! submodule for the bicgstab procedures -- ! submodule(sci_iterative_solver_mod) bicgstab_smod + implicit none contains !> Constructs a bicgstab_type solver. @@ -781,6 +783,7 @@ end subroutine bicgstab_solve end submodule bicgstab_smod submodule(sci_iterative_solver_mod) gmres_smod + implicit none contains !> constructs a gmres_type solver !> sets the values for the solver such as the residual (r_tol) and @@ -1004,6 +1007,7 @@ end subroutine gmres_solve end submodule gmres_smod submodule(sci_iterative_solver_mod) fgmres_smod + implicit none contains !> constructs a fgmres_type solver !> sets the values for the solver such as the residual (r_tol) and @@ -1238,6 +1242,7 @@ end subroutine fgmres_solve end submodule fgmres_smod submodule(sci_iterative_solver_mod) gcr_smod + implicit none contains !> constructs a gcr_type solver !> sets the values for the solver such as the residual (r_tol) and @@ -1409,6 +1414,7 @@ end subroutine gcr_solve end submodule gcr_smod submodule(sci_iterative_solver_mod) block_gcr_smod + implicit none contains !> constructs a block_gcr_type solver !> sets the values for the solver such as the residual (r_tol) and @@ -1630,6 +1636,7 @@ end subroutine block_gcr_solve ! Submodule with procedures for Precondition only ! submodule(sci_iterative_solver_mod) precondition_only_smod + implicit none contains !> constructs a precondition_only solver !> sets the values for the solver such as the residual (r_tol) and @@ -1697,6 +1704,7 @@ end subroutine precondition_only_solve ! Submodule with procedures for Jacobi solver ! submodule(sci_iterative_solver_mod) jacobi_smod + implicit none contains !> Constructs a Jacobi solver !> sets the values for the solver such as the residual (r_tol) and @@ -1817,6 +1825,7 @@ end subroutine jacobi_solve submodule(sci_iterative_solver_mod) chebyshev_smod + implicit none contains !> constructs a chebyshev solver !> sets the values for the solver such as the residual (r_tol) and diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 577dcd310..a6ea36586 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -6,10 +6,55 @@ [check] -file-extensions= ["f90", "F90", "X90", "x90"] #check these file types +file-extensions= ["f90", "F90", "X90", "x90"] #check these file types -select = ["C121"] +# select = ["C121"] +select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", +"C051", "C071", "C072", "C081", "C091", "C082", "C092", "C121", +"C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", +"S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", +"FORT002", "FORT003", "FORT004", "FORT005"] -output-format = "grouped" #group results by file + +# output-format = "grouped" #group results by file +output-format = "full" + +[check.per-file-ignores] #don't run these rules on these files: + +# infrastructure/source: +"constants_mod.F90" = ["MOD001", "C022"] +"lfric_mpi_mod.F90" = ["E001"] +"random_number_generator_mod.f90" = ["C022"] + +# components/science: +"sci_psykal_builtin_light_mod.f90" = ["C132"] + +# infrastructure/source: +"polynomial_mod.f90" = ["C132"] +"namelist_item_mod.f90" = ["C072"] +"namelist_mod.F90" = ["C072"] +"io_utility_mod.f90" = ["C072"] +"ncdf_quad_mod.F90" = ["C072"] +"ugrid_2d_mod.F90" = ["C072"] +"ugrid_file_mod.F90" = ["C072"] +"key_value_collection_mod.f90" = ["C072"] +"local_mesh_mod.f90" = ["C081"] +"log_mod.F90" = ["C081"] + +# components/lfric-xios: +"lfric_xios_mock_mod.f90" = ["C072"] +"lfric_xios_process_output_mod.f90" = ["C081"] +"lfric_xios_setup_mod.x90" = ["C081"] + +# components/science: +"get_unit_test_planar_mesh_mod.f90" = ["C081"] +"get_unit_test_qfaces_mod.f90" = ["C081"] +"sci_psykal_light_mod.f90" = ["C132"] + +# mesh_tools/source: +"calc_global_cell_map_mod.F90" = ["C081"] +"gen_lbc_mod.F90" = ["C081"] +"gen_planar_mod.F90" = ["C081"] +"gencube_ps_mod.F90" = ["C081"] From 7c3bdb724349107d756516483fcf6c2973187a7b Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Mon, 11 May 2026 15:38:00 +0100 Subject: [PATCH 2/6] more style fixes --- .../handwritten/psy/preprocessed_alg_psy.f90 | 4 ++-- .../handwritten/psy/unprocessed_alg_psy.f90 | 4 ++-- .../system-test/source/epsilon_two_submod.f90 | 1 + .../file/fortitude.toml | 19 +++++++++++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/infrastructure/build/psyclone/tests/source/handwritten/psy/preprocessed_alg_psy.f90 b/infrastructure/build/psyclone/tests/source/handwritten/psy/preprocessed_alg_psy.f90 index dfd2d4e3d..760d3abd6 100644 --- a/infrastructure/build/psyclone/tests/source/handwritten/psy/preprocessed_alg_psy.f90 +++ b/infrastructure/build/psyclone/tests/source/handwritten/psy/preprocessed_alg_psy.f90 @@ -6,8 +6,8 @@ MODULE preprocessed_alg_mod_psy SUBROUTINE invoke_0(one) implicit none TYPE(field_type), intent(in) :: one - INTEGER df - TYPE(field_proxy_type) one_proxy + INTEGER :: df + TYPE(field_proxy_type) :: one_proxy ! ! Initialise field and/or operator proxies ! diff --git a/infrastructure/build/psyclone/tests/source/handwritten/psy/unprocessed_alg_psy.f90 b/infrastructure/build/psyclone/tests/source/handwritten/psy/unprocessed_alg_psy.f90 index d8f8c596d..82675da3f 100644 --- a/infrastructure/build/psyclone/tests/source/handwritten/psy/unprocessed_alg_psy.f90 +++ b/infrastructure/build/psyclone/tests/source/handwritten/psy/unprocessed_alg_psy.f90 @@ -6,8 +6,8 @@ MODULE unprocessed_alg_mod_psy SUBROUTINE invoke_0(one) implicit none TYPE(field_type), intent(in) :: one - INTEGER df - TYPE(field_proxy_type) one_proxy + INTEGER :: df + TYPE(field_proxy_type) :: one_proxy ! ! Initialise field and/or operator proxies ! diff --git a/infrastructure/build/tools/system-test/source/epsilon_two_submod.f90 b/infrastructure/build/tools/system-test/source/epsilon_two_submod.f90 index 3294f917b..706d36a13 100644 --- a/infrastructure/build/tools/system-test/source/epsilon_two_submod.f90 +++ b/infrastructure/build/tools/system-test/source/epsilon_two_submod.f90 @@ -1,4 +1,5 @@ submodule (epsilon_mod) epsilon_two_submod +implicit none contains module function new_cart_type(x,y) implicit none diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index a6ea36586..46517e4ed 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -9,17 +9,14 @@ file-extensions= ["f90", "F90", "X90", "x90"] #check these file types -# select = ["C121"] - select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", "C051", "C071", "C072", "C081", "C091", "C082", "C092", "C121", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] +output-format = "full" #group results by file -# output-format = "grouped" #group results by file -output-format = "full" [check.per-file-ignores] #don't run these rules on these files: @@ -43,6 +40,20 @@ output-format = "full" "local_mesh_mod.f90" = ["C081"] "log_mod.F90" = ["C081"] +# infrastructure/build: +"content_mod.f90" = ["C081"] +"one_each_mod.f90" = ["E001"] +"alpha_mod.f90" = ["C022"] +"epsilon_mod.f90" = ["C022"] +"epsilon_one_submod.f90" = ["C022"] +"eta_mod.F90" = ["C022"] +"one.f90" = ["C022"] + + + + + + # components/lfric-xios: "lfric_xios_mock_mod.f90" = ["C072"] "lfric_xios_process_output_mod.f90" = ["C081"] From 6464d5aaa7270c1f76db498a2fb3f2038ab92ef3 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Mon, 11 May 2026 18:01:25 +0100 Subject: [PATCH 3/6] added comments --- .../file/fortitude.toml | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 46517e4ed..8166fff77 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -18,6 +18,28 @@ select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", output-format = "full" #group results by file +# List of what the rules used are checking for: +# E000 io-error, E001 syntax-error, C001 missing implicit none, +# C021 real literal missing kind suffix, +# C022 implicit-real-kind, C031 magic-number-in-array-size, +# C032 magic unit in IO statement, C043 missing-action-specifier, +# C051 trailing-backslash, C071 assumed-size, +# C072 character has assumed size but does not have intent(in), +# C081 initialisation-in-declaration, C091 external-procedure, +# C082 pointer-initialisation-in-declaration, C092 procedure-not-in-module, +# C121 use-all, C132 default-public-accessibility, +# C141 missing-exit-or-cycle-label, OB011 common-block, OB021 entry-statement, +# OB051 pause-statement, OB061 deprecated-character-syntax, +# MOD001 double-precision, MOD021 deprecated-relational-operator, +# S101 trailing-whitespace, S071 missing-double-colon, +# PORT011 literal-kind, PORT012 literal-kind-suffix, +# PORT021 star-kind, FORT001 invalid-rule-code-or-name, +# FORT002 unused-allow-comment, FORT003 redirected-allow-comment, +# FORT004 duplicated-allow-comment, FORT005 disabled-allow-comment + +# Repos containing only a few files with errors for the above rules +# are dealt with below: + [check.per-file-ignores] #don't run these rules on these files: # infrastructure/source: @@ -49,11 +71,6 @@ output-format = "full" #group results by file "eta_mod.F90" = ["C022"] "one.f90" = ["C022"] - - - - - # components/lfric-xios: "lfric_xios_mock_mod.f90" = ["C072"] "lfric_xios_process_output_mod.f90" = ["C081"] @@ -69,3 +86,4 @@ output-format = "full" #group results by file "gen_lbc_mod.F90" = ["C081"] "gen_planar_mod.F90" = ["C081"] "gencube_ps_mod.F90" = ["C081"] + From ff19a812096a2d925e652909ce2bde800f12adb5 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Tue, 12 May 2026 14:25:42 +0100 Subject: [PATCH 4/6] reverted output format --- rose-stem/app/check_fortitude_linter/file/fortitude.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 8166fff77..eb339c637 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -15,7 +15,7 @@ select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] -output-format = "full" #group results by file +output-format = "grouped" #group results by file # List of what the rules used are checking for: From d7422737f083652ddc518d608f9d7b2c83689255 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Tue, 12 May 2026 15:36:03 +0100 Subject: [PATCH 5/6] tidied config andf removed unecessary config file --- infrastructure/fortitude.toml | 14 -------------- .../app/check_fortitude_linter/file/fortitude.toml | 8 +++----- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 infrastructure/fortitude.toml diff --git a/infrastructure/fortitude.toml b/infrastructure/fortitude.toml deleted file mode 100644 index 2019891b4..000000000 --- a/infrastructure/fortitude.toml +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################## -# (c) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## - -[check] - -file-extensions= ["f90", "F90", "X90", "x90"] #check these file types - - -select = ["C121"] - -output-format = "grouped" #group results by file diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index eb339c637..6c3144ce4 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -46,11 +46,6 @@ output-format = "grouped" #group results by file "constants_mod.F90" = ["MOD001", "C022"] "lfric_mpi_mod.F90" = ["E001"] "random_number_generator_mod.f90" = ["C022"] - -# components/science: -"sci_psykal_builtin_light_mod.f90" = ["C132"] - -# infrastructure/source: "polynomial_mod.f90" = ["C132"] "namelist_item_mod.f90" = ["C072"] "namelist_mod.F90" = ["C072"] @@ -71,6 +66,9 @@ output-format = "grouped" #group results by file "eta_mod.F90" = ["C022"] "one.f90" = ["C022"] +# components/science: +"sci_psykal_builtin_light_mod.f90" = ["C132"] + # components/lfric-xios: "lfric_xios_mock_mod.f90" = ["C072"] "lfric_xios_process_output_mod.f90" = ["C081"] From fe561405f8a751da0c20fee07395a5a87340eca8 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Thu, 21 May 2026 15:25:47 +0100 Subject: [PATCH 6/6] rearranged rules and comments, and added to comments --- .../file/fortitude.toml | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 6c3144ce4..9d8e8b85d 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -8,35 +8,46 @@ file-extensions= ["f90", "F90", "X90", "x90"] #check these file types - -select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C071", "C072", "C081", "C091", "C082", "C092", "C121", -"C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", -"S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", -"FORT002", "FORT003", "FORT004", "FORT005"] +select = [ +"E000", # io-error +"E001", # syntax-error +"C001", # missing implicit none +"C021", # real literal missing kind suffix +"C022", # implicit-real-kind +"C031", # magic-number-in-array-size +"C032", # magic unit in IO statement +"C043", # missing action specifier when opening files +"C051", # trailing-backslash +"C071", # assumed-size +"C072", # character has assumed size but does not have intent(in) +"C081", # initialisation-in-declaration and no explicit save/parameter +"C082", # pointer-initialisation-in-declaration +"C091", # external-procedure +"C092", # procedure not contained within module +"C121", # use-all - use missing "only" clause +"C132", # default-public-accessibility +"C141", # missing-exit-or-cycle-label +"OB011", # common-block, obsolescent +"OB021", # entry-statement, obsolescent +"OB051", # pause-statement, deleted feature +"OB061", # deprecated-character-syntax +"MOD001", # don't use double-precision +"MOD021", # deprecated-relational-operator +"S101", # trailing-whitespace +"S071", # missing-double-colon +"PORT011", # literal-kind +"PORT012", # literal-kind-suffix +"PORT021", # star-kind, non-standard syntax +"FORT001", # invalid-rule-code-or-name +"FORT002", # unused-allow-comment +"FORT003", # redirected-allow-comment +"FORT004", # duplicated-allow-comment +"FORT005" # disabled-allow-comment +] output-format = "grouped" #group results by file -# List of what the rules used are checking for: -# E000 io-error, E001 syntax-error, C001 missing implicit none, -# C021 real literal missing kind suffix, -# C022 implicit-real-kind, C031 magic-number-in-array-size, -# C032 magic unit in IO statement, C043 missing-action-specifier, -# C051 trailing-backslash, C071 assumed-size, -# C072 character has assumed size but does not have intent(in), -# C081 initialisation-in-declaration, C091 external-procedure, -# C082 pointer-initialisation-in-declaration, C092 procedure-not-in-module, -# C121 use-all, C132 default-public-accessibility, -# C141 missing-exit-or-cycle-label, OB011 common-block, OB021 entry-statement, -# OB051 pause-statement, OB061 deprecated-character-syntax, -# MOD001 double-precision, MOD021 deprecated-relational-operator, -# S101 trailing-whitespace, S071 missing-double-colon, -# PORT011 literal-kind, PORT012 literal-kind-suffix, -# PORT021 star-kind, FORT001 invalid-rule-code-or-name, -# FORT002 unused-allow-comment, FORT003 redirected-allow-comment, -# FORT004 duplicated-allow-comment, FORT005 disabled-allow-comment - # Repos containing only a few files with errors for the above rules # are dealt with below: