From 3ebb3f4dc56469887614e0bb709ca103bbed9982 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Thu, 21 May 2026 15:53:16 +0100 Subject: [PATCH 1/8] added universal use of rule and removed associated errors, as well as unused preview rules --- .../algorithm/process_send_fields_2d_mod.X90 | 4 +- .../kernel/set_r_ocean_fraction_mod.F90 | 2 +- .../jedi_lfric_interface/fortitude.toml | 4 +- .../field/atlas_field_interface_mod.F90 | 10 +- .../algorithm/update_ancils_alg_mod.x90 | 2 +- .../source/kernel/jules_exp_kernel_mod.F90 | 2 +- .../source/kernel/jules_extra_kernel_mod.F90 | 2 +- .../source/kernel/jules_imp_kernel_mod.F90 | 2 +- .../physics_schemes_interface/fortitude.toml | 4 +- .../source/algorithm/aerosol_ukca_alg_mod.x90 | 34 +++---- .../source/algorithm/bl_imp_alg_mod.x90 | 4 +- .../source/algorithm/blpert_main_alg_mod.x90 | 4 +- .../source/algorithm/conv_gr_alg_mod.x90 | 2 +- .../source/algorithm/iau/iau_main_alg_mod.X90 | 6 +- .../algorithm/iau/update_iau_sst_alg_mod.x90 | 6 +- .../algorithm/strat_aerosol_alg_mod.x90 | 2 +- .../source/constants/planet_constants_mod.F90 | 2 +- .../source/kernel/aerosol_ukca_kernel_mod.F90 | 8 +- .../source/kernel/calc_albedo_kernel_mod.F90 | 18 ++-- .../source/kernel/conv_gr_kernel_mod.F90 | 4 +- .../kernel/map_pseudophotol_kernel_mod.F90 | 16 ++-- .../kernel/orographic_drag_kernel_mod.F90 | 10 +- .../source/kernel/photol_diags_kernel_mod.F90 | 24 ++--- .../source/kernel/photol_kernel_mod.F90 | 92 +++++++++---------- .../kernel/pseudo_photol_kernel_mod.F90 | 2 +- .../atmos_ukca_humidity_mod.F90 | 6 +- .../source/psy/psykal_lite_phys_mod.F90 | 12 +-- .../source/support/fastjx_inphot_mod.f90 | 10 +- .../source/support/fastjx_specs_mod.f90 | 14 +-- .../source/support/um_physics_init_mod.f90 | 2 +- .../stph/skeb_biharm_diss_kernel_mod_test.pf | 2 +- .../init_radiation_fields_alg_mod.x90 | 2 +- .../source/algorithm/rad_cloud_alg_mod.x90 | 4 +- .../source/kernel/lw_kernel_mod.F90 | 6 +- .../file/fortitude.toml | 23 ++--- 35 files changed, 174 insertions(+), 173 deletions(-) diff --git a/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 b/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 index b9f6eb244..6f8ee6a64 100644 --- a/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 +++ b/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 @@ -100,7 +100,7 @@ module process_send_fields_2d_mod call depository%get_field("r_ocean_fraction", r_ocean_fraction) ! Calculate the reciprocal of acc_step - ! If this is the first step after a restart then the division by + ! If this is the first step after a restart then the division by ! acc_step has already been done in accumulate_send_fields before ! the field was written to the restart file so we set r_acc_step=1 ! as we still need to divide by sea-ice fraction and copy values from @@ -268,7 +268,7 @@ module process_send_fields_2d_mod call invoke(set_reciprocal_type(r_sea_ice_frac_raw, sea_ice_fraction_ptr, ndata)) ! Calculate the ocean fraction (for scaling ocean fluxes) - call invoke(set_r_ocean_fraction_type(r_ocean_fraction, sea_ice_fraction_ptr, ndata)) + call invoke(set_r_ocean_fraction_type(r_ocean_fraction, sea_ice_fraction_ptr, ndata)) end subroutine save_marine_fractions diff --git a/interfaces/coupled_interface/source/kernel/set_r_ocean_fraction_mod.F90 b/interfaces/coupled_interface/source/kernel/set_r_ocean_fraction_mod.F90 index cac4b0c27..9b5474c2c 100644 --- a/interfaces/coupled_interface/source/kernel/set_r_ocean_fraction_mod.F90 +++ b/interfaces/coupled_interface/source/kernel/set_r_ocean_fraction_mod.F90 @@ -86,7 +86,7 @@ subroutine set_r_ocean_fraction_code(nlayers, & ! Calculate the total sea ice fraction. total_sea_ice_fraction = 0.0_r_def do i = 1, n_sea_ice_tile - total_sea_ice_fraction = total_sea_ice_fraction + & + total_sea_ice_fraction = total_sea_ice_fraction + & sea_ice_fraction(map_sea_ice(1) + i-1) end do diff --git a/interfaces/jedi_lfric_interface/fortitude.toml b/interfaces/jedi_lfric_interface/fortitude.toml index ccbfa012e..e78fa8afd 100644 --- a/interfaces/jedi_lfric_interface/fortitude.toml +++ b/interfaces/jedi_lfric_interface/fortitude.toml @@ -18,8 +18,8 @@ output-format = "grouped" #group results by file [check.per-file-ignores] -"jedi_lfric_linear_modeldb_driver_mod.f90" = ["S101"] -"atlas_field_interface_mod.F90" = ["S101"] +# "jedi_lfric_linear_modeldb_driver_mod.f90" = ["S101"] +# "atlas_field_interface_mod.F90" = ["S101"] "jedi_lfric_field_meta_mod.f90" = ["C061"] "jedi_lfric_wind_fields_mod.f90" = ["C061"] "atlas_field_interface_test.pf" = ["C021"] diff --git a/interfaces/jedi_lfric_interface/source/field/atlas_field_interface_mod.F90 b/interfaces/jedi_lfric_interface/source/field/atlas_field_interface_mod.F90 index d1715d984..fe45846fe 100644 --- a/interfaces/jedi_lfric_interface/source/field/atlas_field_interface_mod.F90 +++ b/interfaces/jedi_lfric_interface/source/field/atlas_field_interface_mod.F90 @@ -325,7 +325,7 @@ subroutine copy_from_lfric(self, return_code) "Unexpected field type in atlas_field_interface_type%copy_from_lfric", & log_level_error & ) - end select + end select ! Get indices for atlas and LFRic data atlas_kstart = self % atlas_kstart @@ -377,7 +377,7 @@ subroutine copy_to_lfric( self, return_code ) "Unexpected field type in atlas_field_interface_type%copy_to_lfric", & log_level_error & ) - end select + end select ! Get indices for atlas and LFRic data lfric_kstart = self%lfric_kstart @@ -450,7 +450,7 @@ subroutine copy_from_lfric_ad(self) "Unexpected field type in atlas_field_interface_type%copy_from_lfric_ad", & log_level_error & ) - end select + end select ! Get indices for atlas and LFRic data atlas_kstart = self % atlas_kstart @@ -504,7 +504,7 @@ subroutine copy_to_lfric_ad( self ) "Unexpected field type in atlas_field_interface_type%copy_to_lfric_ad", & log_level_error & ) - end select + end select ! Get indices for atlas and LFRic data lfric_kstart = self%lfric_kstart @@ -572,7 +572,7 @@ subroutine zero_lfric( self ) "Unexpected field type in atlas_field_interface_type%zero_lfric", & log_level_error & ) - end select + end select end subroutine zero_lfric diff --git a/interfaces/jules_interface/source/algorithm/update_ancils_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/update_ancils_alg_mod.x90 index 3f6a3b7bf..0bab932a5 100644 --- a/interfaces/jules_interface/source/algorithm/update_ancils_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/update_ancils_alg_mod.x90 @@ -65,7 +65,7 @@ contains if (surface == surface_jules) then call surface_fields%get_field('sea_ice_thickness', sea_ice_thickness) - call surface_fields%get_field('tile_fraction', tile_fraction) + call surface_fields%get_field('tile_fraction', tile_fraction) call surface_fields%get_field('tile_temperature', tile_temperature) ! Get the data from ancil_fields (if applicable for your model) diff --git a/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 b/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 index 24e2aceb5..180db6b24 100644 --- a/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 +++ b/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 @@ -1721,7 +1721,7 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & do n = 1, n_land_tile do m = 1, sm_levels - i_tile=sm_levels*(n-1)+ m - 1 + i_tile=sm_levels*(n-1)+ m - 1 do k = 1, ainfo%surft_pts(n) l = ainfo%surft_index(k,n) tile_water_extract(map_smtile(1,ainfo%land_index(l))+i_tile) = wt_ext_surft(l,m,n) diff --git a/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 b/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 index 14885cc8b..8e0ffdddc 100644 --- a/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 +++ b/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 @@ -1013,7 +1013,7 @@ subroutine jules_extra_code( & do n = 1, nsurft do j = 1, nsmax do l = 1, land_pts - i_snow = nsmax*(n-1) + j - 1 + i_snow = nsmax*(n-1) + j - 1 ! Thickness of snow layers snow_layer_thickness(map_snow(1,ainfo%land_index(l))+i_snow) = real(progs%ds_surft(l,n,j), r_def) ! Mass of ice in snow layers diff --git a/interfaces/jules_interface/source/kernel/jules_imp_kernel_mod.F90 b/interfaces/jules_interface/source/kernel/jules_imp_kernel_mod.F90 index 618b6f307..8c9777f00 100644 --- a/interfaces/jules_interface/source/kernel/jules_imp_kernel_mod.F90 +++ b/interfaces/jules_interface/source/kernel/jules_imp_kernel_mod.F90 @@ -1066,7 +1066,7 @@ subroutine jules_imp_code(nlayers, seg_len, & do n = 1, n_land_tile do m = 1, sm_levels - i_tile=sm_levels*(n-1) + m - 1 + i_tile=sm_levels*(n-1) + m - 1 do k = 1, ainfo%surft_pts(n) l = ainfo%surft_index(k,n) wt_ext_surft(l,m,n) = tile_water_extract(map_smtile(1,ainfo%land_index(l))+i_tile) diff --git a/interfaces/physics_schemes_interface/fortitude.toml b/interfaces/physics_schemes_interface/fortitude.toml index 25cd906d4..237d14d03 100644 --- a/interfaces/physics_schemes_interface/fortitude.toml +++ b/interfaces/physics_schemes_interface/fortitude.toml @@ -8,7 +8,7 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "C001", "C031", "C032", "C043", +select = ["E000", "S101", "C001", "C031", "C032", "C043", "C051", "C071", "C072", "C091", "C082", "C092", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "PORT011", "PORT012", "PORT021", "FORT001", @@ -27,5 +27,5 @@ output-format = "grouped" #group results by file "um_sizes_init_mod.f90" = ["MOD021"] # Leaving out for now (these rules are used in the universal config): -# S101, C081, C021, C022, C061, S071, E001, C121 +# C081, C021, C022, C061, S071, E001, C121 diff --git a/interfaces/physics_schemes_interface/source/algorithm/aerosol_ukca_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/aerosol_ukca_alg_mod.x90 index 4a50a0f80..4d8bfeff9 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/aerosol_ukca_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/aerosol_ukca_alg_mod.x90 @@ -82,7 +82,7 @@ contains chem_timestep, & photol_scheme, photol_scheme_off, & photol_scheme_prescribed, & - photol_scheme_fastjx + photol_scheme_fastjx use sci_field_minmax_alg_mod, only: log_field_minmax use microphysics_config_mod, only: microphysics_casim @@ -117,7 +117,7 @@ contains use um_sizes_init_mod, only: um_sizes_init use um_ukca_init_mod, only: n_phot_spc, ratj_varnames use ukca_photol_param_mod, only: jppj, jrate_fac, jp_names - + use pseudo_photol_kernel_mod, only: pseudo_photol_kernel_type use map_pseudophotol_kernel_mod, only: map_pseudophotol_kernel_type use calc_albedo_kernel_mod, only: calc_albedo_kernel_type @@ -165,7 +165,7 @@ contains type( field_type ), pointer :: sw_up_tile type( field_type ), pointer :: sw_down_surf - + ! Microphysics fields type( field_type ), pointer :: ls_rain_3d type( field_type ), pointer :: ls_snow_3d @@ -428,7 +428,7 @@ contains type( field_type ) :: sulp_aitken type( field_type ) :: aod_sulp_accum type( field_type ) :: aod_sulp_aitken - + ! Photolysis rates from Socrates - expected to be linked with ! photolysis_rates_rts field, which is currently a diagnostic type( field_type ) :: photol_rates_rts_jo2 @@ -999,14 +999,14 @@ contains if (microphysics_casim) then call invoke(inc_X_plus_Y(mr_ice, mr(imr_ci))) end if - + ! Fields needed by UKCA and Photolysis call zh%copy_field_properties(conv_cloud_lwp) call zh%copy_field_properties(surf_albedo) call invoke( setval_c(conv_cloud_lwp, 0.0_r_def), & setval_c(surf_albedo, 0.0_r_def) ) - + ! Multi-dimensional field: photol_rates vector_space=>function_space_collection%get_fs(mesh,0,0,Wtheta, & get_ndata_val('photol_species') ) @@ -1016,7 +1016,7 @@ contains if ( chem_scheme == chem_scheme_strattrop .and. & photol_scheme /= photol_scheme_off ) then - ! Photolysis currently linked to Strattrop + ! Photolysis currently linked to Strattrop ! Sample Rates to output; wtheta grid call ls_rain_3d%copy_field_properties(photol_rate_jo1d) @@ -1024,7 +1024,7 @@ contains call invoke( setval_c(photol_rate_jo1d, 0.0_r_def), & setval_c(photol_rate_jno2, 0.0_r_def) ) - + ! Only call photolysis if this is a chemistry timestep as photol rates ! are only used by chemistry if (mod( model_clock%get_step(), & @@ -1042,7 +1042,7 @@ contains call ls_rain_3d%copy_field_properties(aod_sulp_aitken) call ls_rain_3d%copy_field_properties(photol_rates_rts_jo2) call ls_rain_3d%copy_field_properties(photol_rates_rts_jo2b) - + call invoke ( setval_c(sulp_accum, 1.0e-25_r_def), & setval_c(sulp_aitken, 1.0e-25_r_def), & setval_c(aod_sulp_accum, 1.0e3_r_def), & @@ -1050,7 +1050,7 @@ contains setval_c(photol_rates_rts_jo2, 0.0_r_def), & setval_c(photol_rates_rts_jo2b, 0.0_r_def) ) - ! Calculate Relative humidity (as fraction: 0.0-1.0) + ! Calculate Relative humidity (as fraction: 0.0-1.0) call mr(imr_v)%copy_field_properties(msat) call mr(imr_v)%copy_field_properties(rel_humid_frac) call invoke( setval_c(msat, 0.0_r_def), & @@ -1061,7 +1061,7 @@ contains inc_max_aX(0.0_r_def, rel_humid_frac), & inc_min_aX(1.0_r_def, rel_humid_frac) ) - ! Derive required inputs, surface albedo first + ! Derive required inputs, surface albedo first call invoke ( calc_albedo_kernel_type ( surf_albedo, & sw_down_surf, & tile_fraction, & @@ -1109,7 +1109,7 @@ contains do jp1 = 1, n_phot_spc select case(trim(ratj_varnames(jp1))) case ('jo3a') - ! jO(1D) + ! jO(1D) call invoke ( photol_diags_kernel_type(photol_rate_jo1d, & jp1, & photol_rates) ) @@ -1120,9 +1120,9 @@ contains photol_rates) ) end select end do - + end if ! Fast-JX - + ! Specified photolysis rates - based on location and local time if ( photol_scheme == photol_scheme_prescribed ) then call ls_rain_3d%copy_field_properties(photol_rate_profile) @@ -1151,9 +1151,9 @@ contains end if ! photol_scheme = fastjx/ prescribed if ( LPROF ) call stop_timing( id_photo, 'ukca.photolysis_alg' ) - + end if ! Chem timestep - + end if ! Chem/ photolysis schemes ! Do UKCA time step @@ -1567,7 +1567,7 @@ contains if (photol_scheme /= photol_scheme_off ) then call photol_rate_jo1d%write_field('chemistry__photol_rate_jo1d') call photol_rate_jno2%write_field('chemistry__photol_rate_jno2') - end if + end if end if ! chem_scheme_strattrop call dms%write_field('chemistry__dms') diff --git a/interfaces/physics_schemes_interface/source/algorithm/bl_imp_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/bl_imp_alg_mod.x90 index 541d574c1..6ee343148 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/bl_imp_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/bl_imp_alg_mod.x90 @@ -117,7 +117,7 @@ contains t1p5m_ssi, q1p5m_ssi, & qcl1p5m_ssi, t1p5m_land, & q1p5m_land, qcl1p5m_land - + type( field_type ), intent( in ) :: theta, exner, mr_n(nummr), & theta_latest, u_latest @@ -415,7 +415,7 @@ contains flag_blpert = (blpert_type == blpert_type_theta_star .or. & blpert_type == blpert_type_theta_and_moist) - if ((use_xios_io .and. write_diag .and. diag_step .and. & + if ((use_xios_io .and. write_diag .and. diag_step .and. & outer == outer_iterations) .or. flag_blpert) then call taux%copy_field_properties(tauz) call ustar_implicit%copy_field_properties(theta_star_surf) diff --git a/interfaces/physics_schemes_interface/source/algorithm/blpert_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/blpert_main_alg_mod.x90 index ca8c73bad..af22b205e 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/blpert_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/blpert_main_alg_mod.x90 @@ -122,9 +122,9 @@ contains ntml, cumulus, blpert_flag, blpert_rand_fld, & rand_numb_data) - call turbulence_fields%get_field('ntml', ntml) + call turbulence_fields%get_field('ntml', ntml) call turbulence_fields%get_field('cumulus', cumulus) - call stph_fields%get_field('blpert_flag', blpert_flag) + call stph_fields%get_field('blpert_flag', blpert_flag) call stph_fields%get_field('blpert_rand_fld', blpert_rand_fld) call blpert_flag % copy_field_properties(blpert_area) diff --git a/interfaces/physics_schemes_interface/source/algorithm/conv_gr_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/conv_gr_alg_mod.x90 index 8692b476a..dfa763586 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/conv_gr_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/conv_gr_alg_mod.x90 @@ -522,7 +522,7 @@ contains ! Switch UM to running i-first on whole domain ncells = mesh%get_last_edge_cell() call um_sizes_init(ncells) - + ! set increments to zero call invoke( setval_c(dt_conv, 0.0_r_def), & setval_c(dmv_conv, 0.0_r_def), & diff --git a/interfaces/physics_schemes_interface/source/algorithm/iau/iau_main_alg_mod.X90 b/interfaces/physics_schemes_interface/source/algorithm/iau/iau_main_alg_mod.X90 index 3fe288997..9accb6fe2 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/iau/iau_main_alg_mod.X90 +++ b/interfaces/physics_schemes_interface/source/algorithm/iau/iau_main_alg_mod.X90 @@ -71,7 +71,7 @@ module iau_main_alg_mod ! required time window. This IAU behaviour is required when the ! analysis increments have been produced by a 3D-Var DA if ( iau_mode == iau_mode_time_window ) then - + if ( ( current_step >= iau_ts_start ) .and. & ( current_step <= calc_iau_ts_end( modeldb%clock ) ) ) then @@ -119,7 +119,7 @@ module iau_main_alg_mod end if !(current_step test) - end if !(iau_mode) + end if !(iau_mode) ! If used, additive inflation and bias correction are applied throughout ! the whole model run @@ -139,7 +139,7 @@ module iau_main_alg_mod field_collection_ptr => modeldb%fields%get_field_collection("iau_tot_inc") call field_collection_ptr%clear() end if ! (test logicals) - + end subroutine iau_main_alg end module iau_main_alg_mod diff --git a/interfaces/physics_schemes_interface/source/algorithm/iau/update_iau_sst_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/iau/update_iau_sst_alg_mod.x90 index 4ec055b15..ae0eecd92 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/iau/update_iau_sst_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/iau/update_iau_sst_alg_mod.x90 @@ -25,7 +25,7 @@ module update_iau_sst_alg_mod contains !> @brief Update the surface temperature field with IAU sst increments - !> @details Inputs are increments of sea surface temperature. + !> @details Inputs are increments of sea surface temperature. !> These are applied to the sea tile of the full prognostic tile !> temperature field. !> @param[in] iau_sst_fields The collection of iau sst fields @@ -46,14 +46,14 @@ module update_iau_sst_alg_mod type( field_type ), pointer :: tstar_sea_inc ! local field - type( field_type ) :: tile_temp_inc + type( field_type ) :: tile_temp_inc ! get fields needed for sst IAU call surface_fields%get_field( 'tile_temperature', tile_temperature ) call surface_fields%get_field( 'sea_surf_temp_pert', sea_surf_temp_pert ) ! get fields needed for sst IAU incs - call iau_sst_fields%get_field( 'tstar_sea_inc', tstar_sea_inc ) + call iau_sst_fields%get_field( 'tstar_sea_inc', tstar_sea_inc ) if ( l_esm_couple .or. l_esm_couple_test) then call invoke( setval_X( sea_surf_temp_pert, tstar_sea_inc ) ) diff --git a/interfaces/physics_schemes_interface/source/algorithm/strat_aerosol_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/strat_aerosol_alg_mod.x90 index 7dbdceeb4..84bc4a449 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/strat_aerosol_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/strat_aerosol_alg_mod.x90 @@ -47,7 +47,7 @@ subroutine strat_aerosol_alg( aerosol_fields, trop_level, exner ) type(function_space_type), pointer :: wth_aero => null() type(mesh_type), pointer :: aerosol_mesh => null() integer(tik) :: id - + if ( LPROF ) call start_timing( id, 'aerosol.stratosphere' ) if (coarse_rad_aerosol) then diff --git a/interfaces/physics_schemes_interface/source/constants/planet_constants_mod.F90 b/interfaces/physics_schemes_interface/source/constants/planet_constants_mod.F90 index 707ad3367..007237744 100644 --- a/interfaces/physics_schemes_interface/source/constants/planet_constants_mod.F90 +++ b/interfaces/physics_schemes_interface/source/constants/planet_constants_mod.F90 @@ -238,7 +238,7 @@ subroutine set_planet_constants() lcrcp_def = real(lcrcp, r_def) lsrcp_def = real(lsrcp, r_def) recip_kappa_def = real(recip_kappa, r_def) - + end subroutine set_planet_constants end module planet_constants_mod diff --git a/interfaces/physics_schemes_interface/source/kernel/aerosol_ukca_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/aerosol_ukca_kernel_mod.F90 index 0afec4650..94cb99e78 100644 --- a/interfaces/physics_schemes_interface/source/kernel/aerosol_ukca_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/aerosol_ukca_kernel_mod.F90 @@ -1684,7 +1684,7 @@ subroutine aerosol_ukca_code( nlayers, & real(r_um) :: exner_theta_top ! Exner pressure at top theta level ! switches to indicate whether derived humidity fields are required by UKCA - logical :: l_req_rel_humid + logical :: l_req_rel_humid logical :: l_req_rel_humid_clear_sky logical :: l_req_svp logical :: l_req_p_theta_lev @@ -2983,7 +2983,7 @@ subroutine aerosol_ukca_code( nlayers, & end do end do - end if + end if if (l_req_rel_humid) then allocate( rel_humid(seg_len, 1, nlayers) ) @@ -4246,7 +4246,7 @@ subroutine aerosol_ukca_code( nlayers, & m_fields = size(env_names_fullhtphot_real) allocate(environ_fullhtphot_real( seg_len, 1, nlayers, n_phot_spc, m_fields )) - + do m = 1, m_fields if ( env_names_fullhtphot_real(m) == fldname_photol_rates ) then ! Photol rates @@ -4265,7 +4265,7 @@ subroutine aerosol_ukca_code( nlayers, & call log_event( log_scratch_space, LOG_LEVEL_ERROR ) end if end do ! m_fields - + else ! Allocate to minimal size and initialise allocate(environ_fullhtphot_real( 1, 1, 1, 1, 0 )) diff --git a/interfaces/physics_schemes_interface/source/kernel/calc_albedo_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/calc_albedo_kernel_mod.F90 index 9f611f660..2fc74f947 100644 --- a/interfaces/physics_schemes_interface/source/kernel/calc_albedo_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/calc_albedo_kernel_mod.F90 @@ -32,9 +32,9 @@ module calc_albedo_kernel_mod private type(arg_type) :: meta_args(4) = (/ & arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! surf_albedo - arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! sw_down_surf + arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! sw_down_surf arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2), & ! tile_fraction - arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2) & ! sw_up_tile + arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2) & ! sw_up_tile /) integer :: operates_on = CELL_COLUMN contains @@ -65,7 +65,7 @@ subroutine calc_albedo_code(nlayers, & ndf_2d, undf_2d, map_2d, & ndf_tile, undf_tile, map_tile) - use jules_control_init_mod, only: n_surf_tile + use jules_control_init_mod, only: n_surf_tile implicit none @@ -78,24 +78,24 @@ subroutine calc_albedo_code(nlayers, & real(r_def), intent(inout) :: surf_albedo(undf_2d) real(r_def), intent(in) :: sw_down_surf(undf_2d) - + real(r_def), intent(in) :: tile_fraction(undf_tile) real(r_def), intent(in) :: sw_up_tile(undf_tile) ! Local variables for the kernel - integer(i_def) :: i + integer(i_def) :: i real(r_def) :: sw_up_gb - + ! Calculate gridcell mean upward SW flux sw_up_gb = 0.0_r_def do i = 1, n_surf_tile sw_up_gb = sw_up_gb + ( tile_fraction( map_tile(1) + i - 1 ) * & - sw_up_tile( map_tile(1) + i - 1 ) ) + sw_up_tile( map_tile(1) + i - 1 ) ) end do if ( sw_down_surf(map_2d(1)) > 0.0 ) then surf_albedo(map_2d(1)) = sw_up_gb / sw_down_surf(map_2d(1)) - end if - + end if + surf_albedo(map_2d(1)) = max(surf_albedo(map_2d(1)), 0.0_r_def) surf_albedo(map_2d(1)) = min(surf_albedo(map_2d(1)), 0.99_r_def) diff --git a/interfaces/physics_schemes_interface/source/kernel/conv_gr_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/conv_gr_kernel_mod.F90 index 12cf5ee5c..dae196bfe 100644 --- a/interfaces/physics_schemes_interface/source/kernel/conv_gr_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/conv_gr_kernel_mod.F90 @@ -1300,7 +1300,7 @@ subroutine conv_gr_code(nlayers, & do i = 1, ncells cumulus(i,1) = (cumulus_2d(map_2d(1,i)) == 1_i_def) ntml(i,1) = ntml_2d(map_2d(1,i)) - + zh(i,1) = zh_2d(map_2d(1,i)) l_shallow(i,1) = (shallow_flag(map_2d(1,i)) == 1_i_def) uw0(i,1) = uw0_flux(map_2d(1,i)) @@ -1349,7 +1349,7 @@ subroutine conv_gr_code(nlayers, & q_conv(i,1,k) = m_v(map_wth(1,i) + k) qcl_conv(i,1,k) = m_cl(map_wth(1,i) + k) qcf_conv(i,1,k) = m_cf(map_wth(1,i) + k) - + cf_liquid_conv(i,1,k) = cf_liq(map_wth(1,i) + k) cf_frozen_conv(i,1,k) = cf_ice(map_wth(1,i) + k) bulk_cf_conv(i,1,k) = cf_bulk(map_wth(1,i) + k) diff --git a/interfaces/physics_schemes_interface/source/kernel/map_pseudophotol_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/map_pseudophotol_kernel_mod.F90 index 00158fb45..c1e4d5969 100644 --- a/interfaces/physics_schemes_interface/source/kernel/map_pseudophotol_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/map_pseudophotol_kernel_mod.F90 @@ -26,12 +26,12 @@ module map_pseudophotol_kernel_mod type, public, extends(kernel_type) :: map_pseudophotol_kernel_type private - type(arg_type) :: meta_args(4) = (/ & + type(arg_type) :: meta_args(4) = (/ & arg_type( GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1 ), & ! Photol_rates all species arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! Photol_rate single arg_type( GH_SCALAR, GH_INTEGER, GH_READ), & ! Index to process arg_type( GH_SCALAR, GH_REAL, GH_READ) & ! Factor to apply - + /) integer :: operates_on = CELL_COLUMN @@ -62,24 +62,24 @@ subroutine map_pseudophotol_code( nlayers, & ndf_nphot, undf_nphot, map_nphot ) use constants_mod, only: r_def, i_def - + implicit none ! Arguments - integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: nlayers integer(kind=i_def), intent(in) :: ndf_wth integer(kind=i_def), intent(in) :: undf_wth integer(kind=i_def), dimension(ndf_wth), intent(in) :: map_wth integer(kind=i_def), intent(in) :: ndf_nphot integer(kind=i_def), intent(in) :: undf_nphot integer(kind=i_def), dimension(ndf_nphot), intent(in) :: map_nphot - + real(kind=r_def), intent(in out), dimension(undf_nphot) :: photol_rates real(kind=r_def), intent(in), dimension(undf_wth) :: photol_rate_single integer(kind=i_def), intent(in) :: jp2 real(kind=r_def), intent(in) :: jrate_fac - + ! Local variables for the kernel integer(kind=i_def) :: k @@ -87,8 +87,8 @@ subroutine map_pseudophotol_code( nlayers, & do k = 1, nlayers photol_rates( map_nphot(1) + ( (jp2-1)*(nlayers+1) ) + k ) = & photol_rate_single( map_wth(1) + k ) * jrate_fac - end do - + end do + return end subroutine map_pseudophotol_code diff --git a/interfaces/physics_schemes_interface/source/kernel/orographic_drag_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/orographic_drag_kernel_mod.F90 index ab95fca5c..9b47a8665 100644 --- a/interfaces/physics_schemes_interface/source/kernel/orographic_drag_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/orographic_drag_kernel_mod.F90 @@ -145,10 +145,10 @@ subroutine orographic_drag_kernel_code( & ! Arguments !---------------------------------------------------------------------- integer(i_def), intent(in) :: nlayers, max_pos_cells, seg_len !nlayers, total cells (whether orogrogaphically relevant or not), segment length - integer(i_def), intent(in), dimension(seg_len) :: cell_index + integer(i_def), intent(in), dimension(seg_len) :: cell_index integer(i_def), intent(in) :: ndf_w3, ndf_wth, ndf_2d integer(i_def), intent(in) :: undf_w3, undf_wth, undf_2d - integer(i_def), intent(in), dimension(ndf_w3, max_pos_cells) :: map_w3 + integer(i_def), intent(in), dimension(ndf_w3, max_pos_cells) :: map_w3 integer(i_def), intent(in), dimension(ndf_wth, max_pos_cells) :: map_wth integer(i_def), intent(in), dimension(ndf_2d, max_pos_cells) :: map_2d @@ -336,7 +336,7 @@ subroutine orographic_drag_kernel_code( & orog_f3(i) = 0.0_r_um orog_amp(i) = 0.0_r_um end do !i - + ! Recasting of LFRic to UM namelist inputs fbcd = real(cd_flow_blocking, r_um) gsharp = real(gwd_scaling, r_um) @@ -446,7 +446,7 @@ subroutine orographic_drag_kernel_code( & dtemp_orog_gwd(map_wth(1,cell_index(i)) + k) = real(dtemp_dt_orog_gwd(i,k)*timestep, r_def) end do ! k end do !i - + ! Set level 0 increment such that theta increment will equal level 1 do i = 1, seg_len dtemp_orog_blk(map_wth(1,cell_index(i)) + 0) = real(dtemp_dt_blk(i,1)*timestep, r_def) & @@ -478,7 +478,7 @@ subroutine orographic_drag_kernel_code( & end do end if end do !i - + end subroutine orographic_drag_kernel_code end module orographic_drag_kernel_mod diff --git a/interfaces/physics_schemes_interface/source/kernel/photol_diags_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/photol_diags_kernel_mod.F90 index 5d92e5fb3..7d06b36bf 100644 --- a/interfaces/physics_schemes_interface/source/kernel/photol_diags_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/photol_diags_kernel_mod.F90 @@ -25,11 +25,11 @@ module photol_diags_kernel_mod type, public, extends(kernel_type) :: photol_diags_kernel_type private - type(arg_type) :: meta_args(3) = (/ & + type(arg_type) :: meta_args(3) = (/ & arg_type( GH_FIELD, GH_REAL, GH_READWRITE, WTHETA), & ! Photol_rate single arg_type( GH_SCALAR, GH_INTEGER, GH_READ), & ! Index to extract arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1 ) & ! Photol_rates all species - + /) integer :: operates_on = CELL_COLUMN @@ -42,7 +42,7 @@ module photol_diags_kernel_mod contains !> @brief UKCA Photolysis diagnostic calculation. -!> @details Copy specified photolysis rates from full photol rates array to +!> @details Copy specified photolysis rates from full photol rates array to ! a 3-D diagnostic field. !> @param[in] nlayers Number of layers @@ -50,15 +50,15 @@ module photol_diags_kernel_mod !> @param[in] photol_rates Photolysis rates all species (s-1) !> @param[in] jp1 Index of species to extract -subroutine photol_diags_code( nlayers, & +subroutine photol_diags_code( nlayers, & photol_rate_single, & jp1, & - photol_rates, & + photol_rates, & ndf_wth, undf_wth, map_wth, & ndf_nphot, undf_nphot, map_nphot ) use constants_mod, only: r_def, i_def - + implicit none ! Arguments @@ -70,20 +70,20 @@ subroutine photol_diags_code( nlayers, & integer(kind=i_def), intent(in) :: ndf_nphot integer(kind=i_def), intent(in) :: undf_nphot integer(kind=i_def), dimension(ndf_nphot), intent(in) :: map_nphot - + real(kind=r_def), intent(in out), dimension(undf_wth) :: photol_rate_single integer(kind=i_def), intent(in) :: jp1 real(kind=r_def), intent(in), dimension(undf_nphot) :: photol_rates - + ! Local variables for the kernel - integer(kind=i_def) :: k + integer(kind=i_def) :: k ! Transfer rates from full array to diags array - do k = 1, nlayers + do k = 1, nlayers photol_rate_single( map_wth(1) + k ) = & photol_rates( map_nphot(1) + ( (jp1-1)*(nlayers+1) ) + k ) - end do - + end do + return end subroutine photol_diags_code diff --git a/interfaces/physics_schemes_interface/source/kernel/photol_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/photol_kernel_mod.F90 index 195f8d8e1..7727aa902 100644 --- a/interfaces/physics_schemes_interface/source/kernel/photol_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/photol_kernel_mod.F90 @@ -39,19 +39,19 @@ module photol_kernel_mod arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! current_time_hour arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! current_time_minute arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! current_time_second - arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! current_time_daynum + arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! current_time_daynum arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! previous_time_hour arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! previous_time_minute - arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! previous_time_second - arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! o3 + arg_type( GH_SCALAR, GH_INTEGER, GH_READ ), & ! previous_time_second + arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! o3 arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! theta_wth arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! exner_in_wth arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! height_in_wth arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! m_cl_n arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! m_cf_n - arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! rel_humid_frac + arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! rel_humid_frac arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! conv_cloud_amount - arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! area_cloud_frac + arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! area_cloud_frac arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! sulp_accum arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! sulp_aitken arg_type( GH_FIELD, GH_REAL, GH_READ, WTHETA ), & ! aod_sulp_accum @@ -62,9 +62,9 @@ module photol_kernel_mod arg_type( GH_FIELD, GH_REAL, GH_READ, W3 ), & ! exner_in_w3 arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3 ), & ! tile_fraction arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! latitude - arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! longitude + arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! longitude arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! sin_stellar_declination_rts - arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! stellar_eqn_of_time_rts + arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! stellar_eqn_of_time_rts arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! conv_cloud_lwp arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! surf_albedo arg_type( GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4 ), & ! conv_cloud_base @@ -81,7 +81,7 @@ module photol_kernel_mod contains !> @brief UKCA Photolysis scheme time step. -!> @details Copy or create the environmental driver fields required for the +!> @details Copy or create the environmental driver fields required for the !> current Photolysis configuration, perform a photolysis timestep !> and finally copy the rates array back as a LFRic field. @@ -197,7 +197,7 @@ subroutine photol_code( nlayers, & photol_fldnames_fullht_real, & photol_fldnames_fullht0_real, & photol_fldnames_fullhtphot_real - + use chemistry_config_mod, only: chem_scheme, chem_scheme_strattrop, & photol_scheme, photol_scheme_fastjx @@ -232,7 +232,7 @@ subroutine photol_code( nlayers, & photol_fldname_tan_latitude, & photol_fldname_z_top_of_model, & photol_step_control - ! UM modules + ! UM modules use planet_constants_mod, only: p_zero, kappa, planet_radius ! UKCA API module @@ -256,10 +256,10 @@ subroutine photol_code( nlayers, & integer(kind=i_def), dimension(ndf_w3, seg_len), intent(in) :: map_w3 integer(kind=i_def), intent(in) :: ndf_tile integer(kind=i_def), intent(in) :: undf_tile - integer(kind=i_def), dimension(ndf_tile, seg_len), intent(in) :: map_tile + integer(kind=i_def), dimension(ndf_tile, seg_len), intent(in) :: map_tile integer(kind=i_def), intent(in) :: ndf_2d integer(kind=i_def), intent(in) :: undf_2d - integer(kind=i_def), dimension(ndf_2d, seg_len), intent(in) :: map_2d + integer(kind=i_def), dimension(ndf_2d, seg_len), intent(in) :: map_2d real(kind=r_def), intent(in out), dimension(undf_nphot) :: photol_rates @@ -292,17 +292,17 @@ subroutine photol_code( nlayers, & real(kind=r_def), intent(in), dimension(undf_w3) :: height_w3 real(kind=r_def), intent(in), dimension(undf_w3) :: exner_in_w3 - real(kind=r_def), intent(in), dimension(undf_tile) :: tile_fraction + real(kind=r_def), intent(in), dimension(undf_tile) :: tile_fraction real(kind=r_def), intent(in), dimension(undf_2d) :: latitude - real(kind=r_def), intent(in), dimension(undf_2d) :: longitude + real(kind=r_def), intent(in), dimension(undf_2d) :: longitude real(kind=r_def), intent(in), dimension(undf_2d) :: & sin_stellar_declination_rts - real(kind=r_def), intent(in), dimension(undf_2d) :: stellar_eqn_of_time_rts + real(kind=r_def), intent(in), dimension(undf_2d) :: stellar_eqn_of_time_rts real(kind=r_def), intent(in), dimension(undf_2d) :: conv_cloud_lwp real(kind=r_def), intent(in), dimension(undf_2d) :: surf_albedo real(kind=r_def), intent(in), dimension(undf_2d) :: conv_cloud_base real(kind=r_def), intent(in), dimension(undf_2d) :: conv_cloud_top - + ! Local variables for the kernel ! Current model time (year, month, day, hour, minute, second, day number) @@ -310,7 +310,7 @@ subroutine photol_code( nlayers, & ! Seconds since midnight real(r_um) :: sec_since_midnight - ! Groups of environment driving fields + ! Groups of environment driving fields ! Scalars, dimension (m_fields) real(r_um), allocatable :: fldgroup_scalar_real(:) @@ -323,7 +323,7 @@ subroutine photol_code( nlayers, & ! Dimensions: (seg_len, 1, 0:nlayers, m_fields) real(r_um), allocatable :: fldgroup_fullht0_real(:,:,:,:) ! Dimensions: (seg_len, 1, nlayers, n_phot, M=1) - real(r_um), allocatable :: fldgroup_fullhtphot_real(:,:,:,:,:) + real(r_um), allocatable :: fldgroup_fullhtphot_real(:,:,:,:,:) ! Environmental driver fields to be calculated real(r_um) :: r_theta_levels(seg_len,1,0:nlayers) @@ -333,7 +333,7 @@ subroutine photol_code( nlayers, & real(r_um) :: p_layer_boundaries(seg_len,1,0:nlayers) real(r_um) :: frac_land(seg_len,1) ! Land fraction in cell - + ! Photolysis rates in UM type, to be passed to control routine real(r_um), allocatable :: photol_rates_loc(:,:,:,:) @@ -342,7 +342,7 @@ subroutine photol_code( nlayers, & ! Working variables integer(i_um) :: m_fields ! Number of fields in a group integer(i_um) :: n_land_pts ! Number of land points - integer(i_um) :: i ! Model horizontal loop counter + integer(i_um) :: i ! Model horizontal loop counter integer(i_um) :: k ! Model level loop counter integer(i_um) :: m ! Fields Loop counter integer(i_um) :: n ! Fields counter @@ -374,7 +374,7 @@ subroutine photol_code( nlayers, & current_time(5) = int( current_time_minute, i_um ) current_time(6) = int( current_time_second, i_um ) current_time(7) = int( current_time_daynum, i_um ) - + sec_since_midnight = real( (previous_time_hour * 3600_i_def + & previous_time_minute * 60_i_def + & previous_time_second), r_um) @@ -420,7 +420,7 @@ subroutine photol_code( nlayers, & r_theta_levels( i, 1, k ) = & real( height_wth( map_wth(1,i) + k ), r_um ) + planet_radius end do - end do + end do ! height of rho levels from centre of planet do i = 1, seg_len @@ -444,7 +444,7 @@ subroutine photol_code( nlayers, & r_rho_levels(:,:,:) = 0.0_r_um frac_land(:,:) = 0.0_r_um end if ! if fast-jx scheme - + ! Add the driving fields into field groups, based on list of names received ! via the photolysis api (in um_ukca_init). Also, append the name of the ! added field to list of env_fieldnames passed separately. @@ -458,11 +458,11 @@ subroutine photol_code( nlayers, & if (m_fields > 0 ) then allocate(fldgroup_scalar_real(m_fields)) fldgroup_scalar_real(:) = 0.0_r_um - do m = 1, m_fields + do m = 1, m_fields select case(photol_fldnames_scalar_real(m)) case(photol_fldname_equation_of_time) ! Eqn of time - fldgroup_scalar_real(m) = real(stellar_eqn_of_time_rts(map_2d(1,1)), r_um) + fldgroup_scalar_real(m) = real(stellar_eqn_of_time_rts(map_2d(1,1)), r_um) call append_fieldname(n, photol_fldname_equation_of_time, & env_fldnames_avail) case(photol_fldname_sec_since_midnight) @@ -473,12 +473,12 @@ subroutine photol_code( nlayers, & case(photol_fldname_sin_declination) ! Sin declination angle fldgroup_scalar_real(m) = & - real( sin_stellar_declination_rts( map_2d(1,1) ), r_um ) + real( sin_stellar_declination_rts( map_2d(1,1) ), r_um ) call append_fieldname(n,photol_fldname_sin_declination, & env_fldnames_avail) case(photol_fldname_z_top_of_model) ! Top of model (height from surface) - fldgroup_scalar_real(m) = z_top_of_model + fldgroup_scalar_real(m) = z_top_of_model call append_fieldname(n,photol_fldname_z_top_of_model, & env_fldnames_avail) case default @@ -499,7 +499,7 @@ subroutine photol_code( nlayers, & if (m_fields > 0 ) then allocate(fldgroup_flat_integer(seg_len,1,m_fields)) fldgroup_flat_integer(:,:,:) = 0_i_um - do m = 1, m_fields + do m = 1, m_fields select case(photol_fldnames_flat_integer(m)) case(photol_fldname_conv_cloud_base) ! Base (model level) for convective cloud @@ -507,7 +507,7 @@ subroutine photol_code( nlayers, & fldgroup_flat_integer(i,1,m) = int(conv_cloud_base(map_2d(1,i)), i_um) end do call append_fieldname(n,photol_fldname_conv_cloud_base, & - env_fldnames_avail) + env_fldnames_avail) case(photol_fldname_conv_cloud_top) ! Top (model level) for convective cloud do i = 1, seg_len @@ -524,7 +524,7 @@ subroutine photol_code( nlayers, & end do ! m_fields else - allocate(fldgroup_flat_integer(1,1,0)) + allocate(fldgroup_flat_integer(1,1,0)) end if ! Populate FLDGROUP_FLAT_REAL @@ -532,7 +532,7 @@ subroutine photol_code( nlayers, & if (m_fields > 0 ) then allocate(fldgroup_flat_real(seg_len,1,m_fields)) fldgroup_flat_real(:,:,:) = 0.0_r_um - do m = 1, m_fields + do m = 1, m_fields select case(photol_fldnames_flat_real(m)) case(photol_fldname_conv_cloud_lwp) ! Convective cloud liquid water path @@ -551,7 +551,7 @@ subroutine photol_code( nlayers, & case(photol_fldname_land_fraction) ! Fraction of land in grid box do i = 1, seg_len - fldgroup_flat_real(i,1,m) = frac_land(i, 1) + fldgroup_flat_real(i,1,m) = frac_land(i, 1) end do call append_fieldname(n,photol_fldname_land_fraction, & env_fldnames_avail) @@ -596,7 +596,7 @@ subroutine photol_code( nlayers, & end do ! m_fields else - allocate(fldgroup_flat_real(1,1,0)) + allocate(fldgroup_flat_real(1,1,0)) end if ! Populate FLDGROUP_FULLHT_REAL @@ -604,7 +604,7 @@ subroutine photol_code( nlayers, & if (m_fields > 0 ) then allocate(fldgroup_fullht_real(seg_len,1,nlayers,m_fields)) fldgroup_fullht_real(:,:,:,:) = 0.0_r_um - do m = 1, m_fields + do m = 1, m_fields select case(photol_fldnames_fullht_real(m)) case(photol_fldname_aod_sulph_aitk) ! Optical depth from Sulphate in aitken mode @@ -631,7 +631,7 @@ subroutine photol_code( nlayers, & do i = 1, seg_len do k = 1, nlayers fldgroup_fullht_real(i,1,k,m) = & - real(area_cloud_frac( map_wth(1,i) + k ), r_um) + real(area_cloud_frac( map_wth(1,i) + k ), r_um) end do end do call append_fieldname(n,photol_fldname_area_cloud_fraction, & @@ -650,7 +650,7 @@ subroutine photol_code( nlayers, & ! Ozone mass mixing ratio do i = 1, seg_len do k = 1, nlayers - fldgroup_fullht_real(i,1,k,m) = real(o3( map_wth(1,i) + k ), r_um) + fldgroup_fullht_real(i,1,k,m) = real(o3( map_wth(1,i) + k ), r_um) end do end do call append_fieldname(n,photol_fldname_ozone_mmr, & @@ -659,7 +659,7 @@ subroutine photol_code( nlayers, & ! Pressure on theta levels do i = 1, seg_len do k = 1, nlayers - fldgroup_fullht_real(i,1,k,m) = p_theta_levels(i, 1, k ) + fldgroup_fullht_real(i,1,k,m) = p_theta_levels(i, 1, k ) end do end do call append_fieldname(n,photol_fldname_p_theta_levels, & @@ -709,7 +709,7 @@ subroutine photol_code( nlayers, & end do end do call append_fieldname(n,photol_fldname_r_rho_levels, & - env_fldnames_avail) + env_fldnames_avail) case(photol_fldname_so4_accum) ! Mass mix ratio of sulphate aeroosol in accumulation mode do i = 1, seg_len @@ -734,7 +734,7 @@ subroutine photol_code( nlayers, & ! Temperature on theta levels do i = 1, seg_len do k = 1, nlayers - fldgroup_fullht_real(i,1,k,m) = t_theta_levels( i, 1, k ) + fldgroup_fullht_real(i,1,k,m) = t_theta_levels( i, 1, k ) end do end do call append_fieldname(n,photol_fldname_t_theta_levels, & @@ -748,7 +748,7 @@ subroutine photol_code( nlayers, & end do ! m_fields else - allocate(fldgroup_fullht_real(1,1,1,0)) + allocate(fldgroup_fullht_real(1,1,1,0)) end if ! Populate FLDGROUP_FULLHT0_REAL @@ -756,13 +756,13 @@ subroutine photol_code( nlayers, & if (m_fields > 0 ) then allocate(fldgroup_fullht0_real(seg_len,1,0:nlayers,m_fields)) fldgroup_fullht0_real(:,:,:,:) = 0.0_r_um - do m = 1, m_fields + do m = 1, m_fields select case(photol_fldnames_fullht0_real(m)) case(photol_fldname_p_layer_boundaries) ! Pressure on level boundaries do i = 1, seg_len do k = 0, nlayers - fldgroup_fullht0_real(i,1,k,m) = p_layer_boundaries( i, 1, k ) + fldgroup_fullht0_real(i,1,k,m) = p_layer_boundaries( i, 1, k ) end do end do call append_fieldname(n,photol_fldname_p_layer_boundaries, & @@ -771,7 +771,7 @@ subroutine photol_code( nlayers, & ! Distance of level from planet centre do i = 1, seg_len do k = 0, nlayers - fldgroup_fullht0_real(i,1,k,m) = r_theta_levels( i, 1, k ) + fldgroup_fullht0_real(i,1,k,m) = r_theta_levels( i, 1, k ) end do end do call append_fieldname(n,photol_fldname_r_theta_levels, & @@ -794,7 +794,7 @@ subroutine photol_code( nlayers, & allocate(photol_rates_loc(seg_len,1,nlayers,n_phot_spc)) end if photol_rates_loc(:,:,:,:) = 0.0_r_um - + call photol_step_control(current_time, seg_len, 1, nlayers, n_phot_spc, & ratj_data, ratj_varnames, error_code, photol_rates_loc,& ! names of environment fields provided @@ -822,7 +822,7 @@ subroutine photol_code( nlayers, & photol_rates_loc(i, 1, k, jp1) end do end do - end do + end do ! deallocate field groups and local arrays if (allocated(photol_rates_loc)) deallocate(photol_rates_loc) if (allocated(fldgroup_fullht0_real)) deallocate(fldgroup_fullht0_real) @@ -854,7 +854,7 @@ subroutine append_fieldname(x,fldname_in, fldnames_avail) 'ERROR from photol_kernel_mod: append_filename: ', & ' Index exceeds env_fldnames_avail arraysize ' call log_event(log_scratch_space, LOG_LEVEL_ERROR) -ELSE +ELSE ! Append to list of fieldnames being provided. fldnames_avail(x) = fldname_in END IF diff --git a/interfaces/physics_schemes_interface/source/kernel/pseudo_photol_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/pseudo_photol_kernel_mod.F90 index f88ca28f4..f11372268 100644 --- a/interfaces/physics_schemes_interface/source/kernel/pseudo_photol_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/pseudo_photol_kernel_mod.F90 @@ -79,7 +79,7 @@ subroutine pseudo_photol_code(nlayers, & implicit none ! Arguments - integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: nlayers integer(kind=i_def), intent(in) :: ndf_wtheta integer(kind=i_def), intent(in) :: undf_wtheta integer(kind=i_def), dimension(ndf_wtheta), intent(in) :: map_wtheta diff --git a/interfaces/physics_schemes_interface/source/legacy/ukca_interface/atmos_ukca_humidity_mod.F90 b/interfaces/physics_schemes_interface/source/legacy/ukca_interface/atmos_ukca_humidity_mod.F90 index 33983d66a..e4d5b2119 100644 --- a/interfaces/physics_schemes_interface/source/legacy/ukca_interface/atmos_ukca_humidity_mod.F90 +++ b/interfaces/physics_schemes_interface/source/legacy/ukca_interface/atmos_ukca_humidity_mod.F90 @@ -49,7 +49,7 @@ subroutine atmos_ukca_humidity(row_length, rows, model_levels, & ! ***************************************************************************** !!!! NOTE: Corrections are required to calculations below which currently treat !!!! specific humidity and water vapour mixing ratio as interchangeable. -!!!! The necessary corrections are detailed in inline comments. +!!!! The necessary corrections are detailed in inline comments. !------------------------------------------------------------------------------ use qsat_mod, only: qsat, qsat_wat_mix @@ -73,7 +73,7 @@ subroutine atmos_ukca_humidity(row_length, rows, model_levels, & real, intent(in) :: p_theta_levels(row_length, rows, model_levels) ! Pressure on theta levels (Pa) real, intent(in) :: q_mr(row_length, rows, model_levels) - ! Water vapour mixing ratio + ! Water vapour mixing ratio real, allocatable, intent(in) :: qcf_mr(:,:,:) ! Cloud ice mixing ratio (for clear-sky RH only) real, allocatable, intent(in) :: cloud_liq_frac(:,:,:) @@ -90,7 +90,7 @@ subroutine atmos_ukca_humidity(row_length, rows, model_levels, & ! Local variables -integer :: i +integer :: i integer :: j integer :: k diff --git a/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 b/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 index a064523c8..a6f37b37a 100644 --- a/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 +++ b/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 @@ -14,7 +14,7 @@ module psykal_lite_phys_mod use field_mod, only : field_type, field_proxy_type use integer_field_mod, only : integer_field_type, integer_field_proxy_type use mesh_mod, only : mesh_type - + implicit none public @@ -72,13 +72,13 @@ subroutine invoke_orographic_drag_kernel( & ! Integers for segmentation integer :: applicable_points, nlayers, loop_upper_bound, segment, seg_len, & l_bound, u_bound, n_segments , seg_target - + ! These are in ANY_DISCONTINUOUS_SPACE_1 integer :: ndf_adspc1_sd_orog, undf_adspc1_sd_orog integer, allocatable :: cell_index(:) !dhc record the points with orography - + type(field_proxy_type) :: du_blk_proxy, dv_blk_proxy, & du_orog_gwd_proxy, dv_orog_gwd_proxy, & dtemp_blk_proxy, dtemp_orog_gwd_proxy, & @@ -149,9 +149,9 @@ subroutine invoke_orographic_drag_kernel( & undf_adspc1_sd_orog = sd_orog_proxy%vspace%get_undf() ! Temporary variable for loop bound helps OpenMP - loop_upper_bound = mesh%get_last_edge_cell() - - applicable_points = 0 + loop_upper_bound = mesh%get_last_edge_cell() + + applicable_points = 0 !cell index padded with 0s beyond applicable_points allocate(cell_index(loop_upper_bound)) cell_index = 0 diff --git a/interfaces/physics_schemes_interface/source/support/fastjx_inphot_mod.f90 b/interfaces/physics_schemes_interface/source/support/fastjx_inphot_mod.f90 index bc954ccad..6fc6b4ad3 100644 --- a/interfaces/physics_schemes_interface/source/support/fastjx_inphot_mod.f90 +++ b/interfaces/physics_schemes_interface/source/support/fastjx_inphot_mod.f90 @@ -50,16 +50,16 @@ subroutine fastjx_inphot( & ! Variables used for/ set from solar cycle data n_solcyc_ts, solcyc_av, solcyc_quanta, solcyc_ts, & solcyc_spec ) - + use fastjx_specs_mod, only: fastjx_rd_xxx, & fastjx_rd_sol, fastjx_rd_mie use chemistry_config_mod, only: fastjx_dir, fjx_spec_file, & fjx_scat_file, fjx_solar_file, & - fastjx_numwavel, fjx_solcyc_type + fastjx_numwavel, fjx_solcyc_type use errormessagelength_mod, only: errormessagelength use io_utility_mod, only: claim_io_unit, release_io_unit - + implicit none ! Arguments - dimensions @@ -111,7 +111,7 @@ subroutine fastjx_inphot( & integer :: ukcafjsol_unit character(len=errormessagelength) :: cmessage ! Error message - + write( log_scratch_space, '(A,I6)' ) 'fastjx_numwl=', fastjx_numwavel call log_event( log_scratch_space, LOG_LEVEL_INFO ) @@ -174,7 +174,7 @@ subroutine fastjx_inphot( & call fastjx_rd_mie( ukcafjsc_unit, jv_fullpath, jtaumx, naa, atau, & atau0, daa, paa, qaa, raa, saa, waa ) call release_io_unit( ukcafjsc_unit ) - + return end subroutine fastjx_inphot end module fastjx_inphot_mod \ No newline at end of file diff --git a/interfaces/physics_schemes_interface/source/support/fastjx_specs_mod.f90 b/interfaces/physics_schemes_interface/source/support/fastjx_specs_mod.f90 index 43b7492cc..a7ee8d0d8 100644 --- a/interfaces/physics_schemes_interface/source/support/fastjx_specs_mod.f90 +++ b/interfaces/physics_schemes_interface/source/support/fastjx_specs_mod.f90 @@ -31,9 +31,9 @@ module fastjx_specs_mod sw_band_aer => photol_sw_band_aer, sw_phases => photol_sw_phases, & wx_ => photol_max_wvl, x_ => photol_max_crossec, & jpwav => photol_wvl_intervals - + use chemistry_config_mod, only: fastjx_numwavel - + use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_ERROR, LOG_LEVEL_INFO, & @@ -52,7 +52,7 @@ module fastjx_specs_mod public fastjx_rd_mie, fastjx_rd_xxx, fastjx_rd_sol contains - + ! ###################################################################### !----------------------------------------------------------------------- !-------aerosols/cloud scattering data set for fast-JX (ver 5.3+) @@ -157,7 +157,7 @@ subroutine fastjx_rd_xxx( nj1, namfil, jppj, njval, nw1, nw2, fl, & real(kind=r_um), intent(out) :: wl(wx_) ! effective wavelengths character(len=photol_jlabel_len), intent(in) :: jlabel(jppj) - real(kind=r_um), intent(in) :: jfacta(jppj) ! Quantum yields + real(kind=r_um), intent(in) :: jfacta(jppj) ! Quantum yields integer(kind=i_um), intent(out) :: jind(jppj) ! Index of species from file character (len=errormessagelength) :: cmessage @@ -254,7 +254,7 @@ end subroutine fastjx_rd_xxx ! Read in solar cycle data !----------------------------------------------------------------------- subroutine fastjx_rd_sol( nj1, namfil, n_solcyc_ts, solcyc_av, & - solcyc_quanta, solcyc_ts, solcyc_spec ) + solcyc_quanta, solcyc_ts, solcyc_spec ) implicit none @@ -267,7 +267,7 @@ subroutine fastjx_rd_sol( nj1, namfil, n_solcyc_ts, solcyc_av, & real(kind=r_um), intent(out) :: solcyc_ts(n_solcyc_ts) ! Observed tseries real(kind=r_um), intent(out) :: solcyc_spec(wx_) ! Spectral component - integer(kind=i_um) :: n_solcyc_ts_file + integer(kind=i_um) :: n_solcyc_ts_file ! Pointer to pass to read routine real(kind=r_um), pointer :: solcyc_ts_ptr(:) @@ -282,7 +282,7 @@ subroutine fastjx_rd_sol( nj1, namfil, n_solcyc_ts, solcyc_av, & '. Check chemistry namelist value fjx_solcyc_months ' call log_event( log_scratch_space, LOG_LEVEL_WARNING ) end if - ! Copy data to array, to enable broadcast + ! Copy data to array, to enable broadcast solcyc_ts(:) = solcyc_ts_ptr(:) end if diff --git a/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 b/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 index 09273c6c8..1efa888af 100644 --- a/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 +++ b/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 @@ -1390,7 +1390,7 @@ subroutine um_physics_init() ! Set up stochastic physics options l_rp2_casim = l_rp2 - + ! Set up options for CASIM cloud fraction scheme l_cfrac_casim_diag_scheme = .false. diff --git a/interfaces/physics_schemes_interface/unit-test/kernel/stph/skeb_biharm_diss_kernel_mod_test.pf b/interfaces/physics_schemes_interface/unit-test/kernel/stph/skeb_biharm_diss_kernel_mod_test.pf index 2060c58b9..45bac66ea 100644 --- a/interfaces/physics_schemes_interface/unit-test/kernel/stph/skeb_biharm_diss_kernel_mod_test.pf +++ b/interfaces/physics_schemes_interface/unit-test/kernel/stph/skeb_biharm_diss_kernel_mod_test.pf @@ -115,7 +115,7 @@ contains norm_xi => empty_real_data norm_div => empty_real_data - + norm_xi_flag = .false. norm_div_flag = .false. diff --git a/interfaces/socrates_interface/source/algorithm/init_radiation_fields_alg_mod.x90 b/interfaces/socrates_interface/source/algorithm/init_radiation_fields_alg_mod.x90 index 2091d2f3b..a87697b19 100644 --- a/interfaces/socrates_interface/source/algorithm/init_radiation_fields_alg_mod.x90 +++ b/interfaces/socrates_interface/source/algorithm/init_radiation_fields_alg_mod.x90 @@ -33,7 +33,7 @@ contains use radiative_gases_config_mod, only: o3_rad_opt, o3_rad_opt_profile, & o3_profile_size, o3_profile_data,& o3_profile_heights - + !> @todo Data passed to the kernel via module 'use' statements. !> When PSyclone supports passing of arrays into kernels (issue #1312), !> these data should be passed through the argument list of the invoke. diff --git a/interfaces/socrates_interface/source/algorithm/rad_cloud_alg_mod.x90 b/interfaces/socrates_interface/source/algorithm/rad_cloud_alg_mod.x90 index 4fad4bcb9..97cf12733 100644 --- a/interfaces/socrates_interface/source/algorithm/rad_cloud_alg_mod.x90 +++ b/interfaces/socrates_interface/source/algorithm/rad_cloud_alg_mod.x90 @@ -49,10 +49,10 @@ contains !> @param[in,out] conv_frozen_mmr Convective frozen gridbox MMR !> @param[in,out] conv_frozen_number Convective frozen number conc !> @param[in] temperature_in_wth Temperature field in wth space -!> @param[in] theta Potential temperature in wth +!> @param[in] theta Potential temperature in wth !> @param[in] cloud_fields Fields for cloud scheme !> @param[in] convection_fields Fields for convection scheme -!> @param[in] derived_fields Derived dynamics fields +!> @param[in] derived_fields Derived dynamics fields !> @param[in] rad_this_tstep Flag for radiation timestep !> @param[in] rad_inc_this_tstep Flag for radiation increment timestep !> @param[in] cosp_this_tstep Flag for COSP this timestep diff --git a/interfaces/socrates_interface/source/kernel/lw_kernel_mod.F90 b/interfaces/socrates_interface/source/kernel/lw_kernel_mod.F90 index 3175f4612..c1bd5165e 100644 --- a/interfaces/socrates_interface/source/kernel/lw_kernel_mod.F90 +++ b/interfaces/socrates_interface/source/kernel/lw_kernel_mod.F90 @@ -430,10 +430,10 @@ subroutine lw_code(nlayers, n_profile, & ! Segmentation variables for threading call to Socrates integer(i_def) :: max_threads, soc_lw_block, seg_start, seg_end, & ncols_per_thread, nblocks - + ! Note, changes to variables in this file may require corresponding changes in ! applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/lw_kernel_mod.py - + ! Set indexing wth_0 = map_wth(1,1) wth_1 = map_wth(1,1)+1 @@ -577,7 +577,7 @@ subroutine lw_code(nlayers, n_profile, & else l_aerosol_mode = .false. end if - + max_threads = 1 !$ max_threads = omp_get_max_threads() diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 678b60b9c..71ccb01f6 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -8,12 +8,18 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C061", "C071", "C072", "C081", "C091", "C082", "C092", "C121", +select = ["E000", "E001", "C001", "C021", "C022", "C061", "C071", "C072", +"C081", "C091", "C092", "C121", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] +# select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", +# "C051", "C061", "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"] + # 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, @@ -66,9 +72,6 @@ output-format = "grouped" #group results by file "lfric_apps_version_mod_test.pf" = ["E001"] # science/socrates_interface: -"init_radiation_fields_alg_mod.x90" = ["S101"] -"rad_cloud_alg_mod.x90" = ["S101"] -"lw_kernel_mod.F90" = ["S101"] "set_thermodynamic_kernel_mod_test.pf" = ["E001", "C121"] "set_rad_cloud_kernel_mod_test.pf" = ["E001", "C121"] "set_n_cloud_layer_kernel_mod_test.pf" = ["E001", "C121"] @@ -76,18 +79,16 @@ output-format = "grouped" #group results by file "set_topography_kernel_mod.F90" = ["C081"] # interfaces/coupled_interface: -"process_send_fields_2d_mod.X90" = ["S101"] -"set_r_ocean_fraction_mod.F90" = ["S101"] "coupler_mod.F90" = ["MOD021"] "value_based_mask_kernel_mod.F90" = ["MOD021"] "convert_to_celsius_kernel_mod_test.pf" = ["C121", "E001"] "value_based_mask_kernel_mod_test.pf" = ["E001"] # interfaces/jules_interface: -"update_ancils_alg_mod.x90" = ["S101"] -"jules_exp_kernel_mod.F90" = ["S101"] -"jules_extra_kernel_mod.F90" = ["S101"] -"jules_imp_kernel_mod.F90" = ["S101"] +# "update_ancils_alg_mod.x90" = ["S101"] +# "jules_exp_kernel_mod.F90" = ["S101"] +# "jules_extra_kernel_mod.F90" = ["S101"] +# "jules_imp_kernel_mod.F90" = ["S101"] "jules_imp_alg_mod.x90" = ["C061"] "jules_control_init_mod.f90" = ["C081"] "jules_physics_init_mod.f90" = ["C081"] From 7a6a717f6866e14a4c088651d6acf0f3c5828827 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Thu, 21 May 2026 16:01:51 +0100 Subject: [PATCH 2/8] removed some comments --- interfaces/jedi_lfric_interface/fortitude.toml | 2 -- .../app/check_fortitude_linter/file/fortitude.toml | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/interfaces/jedi_lfric_interface/fortitude.toml b/interfaces/jedi_lfric_interface/fortitude.toml index e78fa8afd..a987e3972 100644 --- a/interfaces/jedi_lfric_interface/fortitude.toml +++ b/interfaces/jedi_lfric_interface/fortitude.toml @@ -18,8 +18,6 @@ output-format = "grouped" #group results by file [check.per-file-ignores] -# "jedi_lfric_linear_modeldb_driver_mod.f90" = ["S101"] -# "atlas_field_interface_mod.F90" = ["S101"] "jedi_lfric_field_meta_mod.f90" = ["C061"] "jedi_lfric_wind_fields_mod.f90" = ["C061"] "atlas_field_interface_test.pf" = ["C021"] diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 71ccb01f6..24ff892ca 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -14,12 +14,6 @@ select = ["E000", "E001", "C001", "C021", "C022", "C061", "C071", "C072", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] -# select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", -# "C051", "C061", "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"] - # 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, @@ -85,10 +79,6 @@ output-format = "grouped" #group results by file "value_based_mask_kernel_mod_test.pf" = ["E001"] # interfaces/jules_interface: -# "update_ancils_alg_mod.x90" = ["S101"] -# "jules_exp_kernel_mod.F90" = ["S101"] -# "jules_extra_kernel_mod.F90" = ["S101"] -# "jules_imp_kernel_mod.F90" = ["S101"] "jules_imp_alg_mod.x90" = ["C061"] "jules_control_init_mod.f90" = ["C081"] "jules_physics_init_mod.f90" = ["C081"] From b3809783bb43d907abbd4831817e5c613e77e5e0 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Thu, 28 May 2026 13:11:26 +0100 Subject: [PATCH 3/8] added mod021 rule and fixed associated errors --- applications/shallow_water/fortitude.toml | 7 ------- .../source/initialisation/galewsky_test_case_mod.F90 | 4 ++-- interfaces/coupled_interface/source/coupler_mod.F90 | 4 ++-- .../source/kernel/value_based_mask_kernel_mod.F90 | 4 ++-- interfaces/physics_schemes_interface/fortitude.toml | 3 +-- .../source/psy/psykal_lite_phys_mod.F90 | 4 ++-- .../source/support/um_sizes_init_mod.f90 | 2 +- rose-stem/app/check_fortitude_linter/file/fortitude.toml | 2 -- science/adjoint/fortitude.toml | 1 - science/gungho/fortitude.toml | 1 - .../transport/common/departure_points_support_mod.F90 | 8 ++++---- 11 files changed, 14 insertions(+), 26 deletions(-) diff --git a/applications/shallow_water/fortitude.toml b/applications/shallow_water/fortitude.toml index b518d1166..3e684a1cb 100644 --- a/applications/shallow_water/fortitude.toml +++ b/applications/shallow_water/fortitude.toml @@ -17,11 +17,4 @@ select = ["E000", "C001", "C021", "C022", "C031", "C032", "C043", output-format = "grouped" #group results by file -[check.per-file-ignores] - -"galewsky_test_case_mod.F90" = ["MOD021"] - - -# Leaving out for now (these rules are used in the universal config): -# E001, C121 diff --git a/applications/shallow_water/source/initialisation/galewsky_test_case_mod.F90 b/applications/shallow_water/source/initialisation/galewsky_test_case_mod.F90 index 238b97c2b..46536e901 100644 --- a/applications/shallow_water/source/initialisation/galewsky_test_case_mod.F90 +++ b/applications/shallow_water/source/initialisation/galewsky_test_case_mod.F90 @@ -90,7 +90,7 @@ subroutine galewsky_profile(lat, long, psi_loc, h_loc) ! Set denominator in eq(2) of Galewsky et al. den = (l1 - lat0)*(l1 - lat1) ! Set u(lat) as per eq(2) of Galewsky et al. - if (den .lt. 0.0_r_def) then + if (den < 0.0_r_def) then uu1 = umen*exp(1.0_r_def/den) else uu1 = 0.0_r_def @@ -99,7 +99,7 @@ subroutine galewsky_profile(lat, long, psi_loc, h_loc) ! Set denominator in eq(2) of Galewsky et al. den = (l2 - lat0)*(l2 - lat1) ! Set u(lat) as per eq(2) of Galewsky et al. - if (den .lt. 0.0_r_def) then + if (den < 0.0_r_def) then uu2 = umen*exp(1.0_r_def/den) else uu2 = 0.0_r_def diff --git a/interfaces/coupled_interface/source/coupler_mod.F90 b/interfaces/coupled_interface/source/coupler_mod.F90 index 6791d3a78..bb779190a 100644 --- a/interfaces/coupled_interface/source/coupler_mod.F90 +++ b/interfaces/coupled_interface/source/coupler_mod.F90 @@ -723,7 +723,7 @@ subroutine generate_coupling_field_collections(cpl_snd_2d, & ! Multiple category entry (so will need a multidata lfric field) if (index_cat > 0) then ! Check if name ends in cpl_cat substring followed by 2 characters - if (len(trim(name)) - index_cat+1 - len(cpl_cat) .ne. 2 ) then + if (len(trim(name)) - index_cat+1 - len(cpl_cat) /= 2 ) then write(log_scratch_space,'(3A)') & "generate_coupling_field_collections : ", & "incorrect send variable name in coupling config: ", name @@ -778,7 +778,7 @@ subroutine generate_coupling_field_collections(cpl_snd_2d, & index_cat = index(name, cpl_cat) ! if name ends in cpl_cat substring, check it is the correct length if (index_cat > 0 .and. & - (index_cat - 1 + len(cpl_cat) + len(cpl_fixed_catno) .ne. & + (index_cat - 1 + len(cpl_cat) + len(cpl_fixed_catno) /= & len(trim(name)))) then write(log_scratch_space,'(3A)') & "generate_coupling_field_collections : ", & diff --git a/interfaces/coupled_interface/source/kernel/value_based_mask_kernel_mod.F90 b/interfaces/coupled_interface/source/kernel/value_based_mask_kernel_mod.F90 index 69553343f..c926e29fb 100644 --- a/interfaces/coupled_interface/source/kernel/value_based_mask_kernel_mod.F90 +++ b/interfaces/coupled_interface/source/kernel/value_based_mask_kernel_mod.F90 @@ -74,8 +74,8 @@ subroutine value_based_mask(nlayers, mask, values, & real(kind=r_def), intent(in) :: min_value, max_value - if ( (values(map_2d(1)) .ge. min_value) .and. & - (values(map_2d(1)) .le. max_value)) then + if ( (values(map_2d(1)) >= min_value) .and. & + (values(map_2d(1)) <= max_value)) then mask(map_2d(1)) = 1.0_r_def else mask(map_2d(1)) = 0.0_r_def diff --git a/interfaces/physics_schemes_interface/fortitude.toml b/interfaces/physics_schemes_interface/fortitude.toml index 237d14d03..fb3a47035 100644 --- a/interfaces/physics_schemes_interface/fortitude.toml +++ b/interfaces/physics_schemes_interface/fortitude.toml @@ -23,8 +23,7 @@ output-format = "grouped" #group results by file "fastjx_inphot_mod.f90" = ["C072"] "umprintmgr.f90" = ["C072", "C132"] "ukca_photol_param_mod.f90" = ["C072", "C132"] -"psykal_lite_phys_mod.F90" = ["C132", "MOD021"] -"um_sizes_init_mod.f90" = ["MOD021"] +"psykal_lite_phys_mod.F90" = ["C132"] # Leaving out for now (these rules are used in the universal config): # C081, C021, C022, C061, S071, E001, C121 diff --git a/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 b/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 index a6f37b37a..af959b8de 100644 --- a/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 +++ b/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 @@ -169,7 +169,7 @@ subroutine invoke_orographic_drag_kernel( & end do ! Check that the value of gw_segment is acceptable as a target length, otherwise use 1 for safety - if (gw_segment .le. 0 .or. gw_segment .gt. applicable_points) then + if (gw_segment <= 0 .or. gw_segment > applicable_points) then seg_target = 1 else seg_target = gw_segment @@ -179,7 +179,7 @@ subroutine invoke_orographic_drag_kernel( & ! Call orographic_drag_kernel_code if you have applicable points ! seg_len will be seg_target unless you have too few points at the end - l and u bound are of the segment iterated over - if (applicable_points .gt. 0) then + if (applicable_points > 0) then !$omp parallel do default(shared), private(segment, seg_len, l_bound, u_bound), schedule(dynamic) do segment=1, n_segments seg_len = min(seg_target, applicable_points - (segment - 1) * seg_target) diff --git a/interfaces/physics_schemes_interface/source/support/um_sizes_init_mod.f90 b/interfaces/physics_schemes_interface/source/support/um_sizes_init_mod.f90 index 2505a052b..31e88cba7 100644 --- a/interfaces/physics_schemes_interface/source/support/um_sizes_init_mod.f90 +++ b/interfaces/physics_schemes_interface/source/support/um_sizes_init_mod.f90 @@ -78,7 +78,7 @@ subroutine um_sizes_init(ncells) ! a kernel is passed. !keep the first - if (configure_segments .and. row_length .gt. 1) then + if (configure_segments .and. row_length > 1) then select case (ls_ppn_segment) case (:-1) write(log_scratch_space,'(A)') & diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 24ff892ca..102cb61df 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -73,8 +73,6 @@ output-format = "grouped" #group results by file "set_topography_kernel_mod.F90" = ["C081"] # interfaces/coupled_interface: -"coupler_mod.F90" = ["MOD021"] -"value_based_mask_kernel_mod.F90" = ["MOD021"] "convert_to_celsius_kernel_mod_test.pf" = ["C121", "E001"] "value_based_mask_kernel_mod_test.pf" = ["E001"] diff --git a/science/adjoint/fortitude.toml b/science/adjoint/fortitude.toml index e8e0efa36..720abb2b1 100644 --- a/science/adjoint/fortitude.toml +++ b/science/adjoint/fortitude.toml @@ -18,7 +18,6 @@ select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", output-format = "grouped" #group results by file [check.per-file-ignores] - "setop_average_two_fields_kernel_mod_test.pf" = ["E001"] "setop_random_kernel_mod_test.pf" = ["E001"] "adj_mixed_operator_alg_mod.x90" = ["C061"] diff --git a/science/gungho/fortitude.toml b/science/gungho/fortitude.toml index 529f49fb6..20cf23152 100644 --- a/science/gungho/fortitude.toml +++ b/science/gungho/fortitude.toml @@ -20,7 +20,6 @@ output-format = "grouped" #group results by file [check.per-file-ignores] "pressure_gradient_p0_kernel_mod_test.pf" = ["C092"] -"departure_points_support_mod.F90" = ["MOD021"] "psykal_lite_mod.F90" = ["C132", "S071"] "psykal_lite_transport_mod.F90" = ["C132", "S071"] diff --git a/science/gungho/source/kernel/transport/common/departure_points_support_mod.F90 b/science/gungho/source/kernel/transport/common/departure_points_support_mod.F90 index f7ee0e69e..999e1605c 100644 --- a/science/gungho/source/kernel/transport/common/departure_points_support_mod.F90 +++ b/science/gungho/source/kernel/transport/common/departure_points_support_mod.F90 @@ -170,7 +170,7 @@ subroutine calc_vertical_dep_cfl( x_arrival_comp, & cfl = deltaT*u_arrival else do iloop=1,nCellEdges-1 - if (x_departure .le. height(iloop+1) .AND. x_departure .gt. height(iloop)) then + if (x_departure <= height(iloop+1) .AND. x_departure > height(iloop)) then x0 = height(iloop) x1 = height(iloop+1) x_departure_comp = real(iloop-1, r_tran) + (x_departure-x0)/(x1-x0) @@ -279,7 +279,7 @@ function calc_u_in_vertical_comp(x_in,nCellEdges,u_wind) result(u_out) iCellRight = iEdge + 1_i_def end if - if (x_in .le. 0.0_r_tran .OR. x_in .ge. real(nCellEdges-1,r_tran) ) then + if (x_in <= 0.0_r_tran .OR. x_in >= real(nCellEdges-1,r_tran) ) then u_out=0.0_r_tran else u_out = (1.0_r_tran-fractional_x_value)*u_wind(iEdge) + & @@ -315,11 +315,11 @@ function calc_u_in_vertical_phys(x_in,nCellEdges,u_wind,height) result(u_out) real(kind=r_tran) :: x0 real(kind=r_tran) :: x1 - if (x_in .le. height(1) .OR. x_in .ge. height(nCellEdges)) then + if (x_in <= height(1) .OR. x_in >= height(nCellEdges)) then u_out=0.0_r_tran else do iloop=1,nCellEdges-1 - if (x_in .le. height(iloop+1) .AND. x_in .gt. height(iloop)) then + if (x_in <= height(iloop+1) .AND. x_in > height(iloop)) then iEdge = iloop From 1f2d5e511f502f02e7854b4dd1e9609e68cf9a1f Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Tue, 2 Jun 2026 17:27:35 +0100 Subject: [PATCH 4/8] added rule S071,fixed associated errors, re-added a comment that was previously removed by accident --- applications/lfricinputs/fortitude.toml | 1 - .../generators/toolset/read_from_file_mod.f90 | 2 +- applications/shallow_water/fortitude.toml | 3 + .../physics_schemes_interface/fortitude.toml | 4 +- .../source/psy/psykal_lite_phys_mod.F90 | 82 ++++++++--------- science/adjoint/fortitude.toml | 5 +- .../psykal_lite_gen_adj_lookup_tables_mod.f90 | 92 +++++++++---------- ...voke_adj_apply_helmholtz_op_lookup_mod.f90 | 16 ++-- .../invoke_adj_poly1d_recon_lookup_mod.f90 | 16 ++-- .../invoke_adj_poly2d_recon_lookup_mod.f90 | 16 ++-- .../invoke_adj_poly_adv_upd_lookup_mod.f90 | 20 ++-- .../invoke_atl_poly1d_vert_w3_recon_mod.F90 | 12 +-- science/gungho/fortitude.toml | 4 +- science/gungho/source/psy/psykal_lite_mod.F90 | 46 +++++----- .../source/psy/psykal_lite_transport_mod.F90 | 58 ++++++------ 15 files changed, 189 insertions(+), 188 deletions(-) diff --git a/applications/lfricinputs/fortitude.toml b/applications/lfricinputs/fortitude.toml index 99c157fb6..8689e9b2e 100644 --- a/applications/lfricinputs/fortitude.toml +++ b/applications/lfricinputs/fortitude.toml @@ -22,7 +22,6 @@ output-format = "grouped" #group results by file "lfricinp_unit_handler_mod.f90" = ["C022"] "lfricinp_gather_lfric_field_mod.f90" = ["C121"] -"read_from_file_mod.f90" = ["S071"] # Leaving out for now (these rules are used in the universal config): # C081, C061 diff --git a/applications/lfricinputs/source/scintelapi/generators/toolset/read_from_file_mod.f90 b/applications/lfricinputs/source/scintelapi/generators/toolset/read_from_file_mod.f90 index 27dbf6adb..5f48b6cf1 100644 --- a/applications/lfricinputs/source/scintelapi/generators/toolset/read_from_file_mod.f90 +++ b/applications/lfricinputs/source/scintelapi/generators/toolset/read_from_file_mod.f90 @@ -44,7 +44,7 @@ subroutine read_from_file(dep_graph) character(len=genpar_len) :: parlist ! ! Id of field to read from file -character(len=field_name_len) field_io_name +character(len=field_name_len) :: field_io_name ! Error code for reading parameter list integer :: ioerr diff --git a/applications/shallow_water/fortitude.toml b/applications/shallow_water/fortitude.toml index 3e684a1cb..2b5fb5ed6 100644 --- a/applications/shallow_water/fortitude.toml +++ b/applications/shallow_water/fortitude.toml @@ -17,4 +17,7 @@ select = ["E000", "C001", "C021", "C022", "C031", "C032", "C043", output-format = "grouped" #group results by file +# Leaving out for now (these rules are used in the universal config): +# E001, C121 + diff --git a/interfaces/physics_schemes_interface/fortitude.toml b/interfaces/physics_schemes_interface/fortitude.toml index fb3a47035..12b05e409 100644 --- a/interfaces/physics_schemes_interface/fortitude.toml +++ b/interfaces/physics_schemes_interface/fortitude.toml @@ -10,7 +10,7 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types select = ["E000", "S101", "C001", "C031", "C032", "C043", "C051", "C071", "C072", "C091", "C082", "C092", -"C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", +"C132", "C141", "S071", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] @@ -26,5 +26,5 @@ output-format = "grouped" #group results by file "psykal_lite_phys_mod.F90" = ["C132"] # Leaving out for now (these rules are used in the universal config): -# C081, C021, C022, C061, S071, E001, C121 +# C081, C021, C022, C061, E001, C121 diff --git a/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 b/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 index af959b8de..b9adc98af 100644 --- a/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 +++ b/interfaces/physics_schemes_interface/source/psy/psykal_lite_phys_mod.F90 @@ -242,12 +242,12 @@ subroutine invoke_spectral_2_cs_kernel_type(fp, longitude, pnm_star, & integer(KIND=i_def), intent(in) :: stph_level_bottom, stph_level_top,stph_n_min, stph_n_max type(field_type), intent(in) :: fp, longitude, pnm_star - integer(KIND=i_def) cell - integer(KIND=i_def) nlayers - type(field_proxy_type) fp_proxy, longitude_proxy, pnm_star_proxy + integer(KIND=i_def) :: cell + integer(KIND=i_def) :: nlayers + type(field_proxy_type) :: fp_proxy, longitude_proxy, pnm_star_proxy integer(KIND=i_def), pointer :: map_adspc1_longitude(:,:) => null(), map_adspc2_pnm_star(:,:) => null(), & &map_wspace(:,:) => null() - integer(KIND=i_def) ndf_wspace, undf_wspace, ndf_adspc1_longitude, undf_adspc1_longitude, ndf_adspc2_pnm_star, & + integer(KIND=i_def) :: ndf_wspace, undf_wspace, ndf_adspc1_longitude, undf_adspc1_longitude, ndf_adspc2_pnm_star, & &undf_adspc2_pnm_star type(mesh_type), pointer :: mesh => null() @@ -363,9 +363,9 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth TYPE(integer_field_type), intent(in) :: n_snow_layers, blend_height_tq, ocn_cpl_point INTEGER(KIND=i_def), intent(in) :: stencil_depth, ncells, ncells_halo, day_of_year, second_of_day REAL(KIND=r_def), intent(in) :: flux_e, flux_h - INTEGER(KIND=i_def) nlayers - TYPE(integer_field_proxy_type) n_snow_layers_proxy, blend_height_tq_proxy, ocn_cpl_point_proxy - TYPE(field_proxy_type) theta_proxy, exner_in_wth_proxy, u_in_w3_proxy, v_in_w3_proxy, mr_n_proxy, mr_n_1_proxy, & + INTEGER(KIND=i_def) :: nlayers + TYPE(integer_field_proxy_type) :: n_snow_layers_proxy, blend_height_tq_proxy, ocn_cpl_point_proxy + TYPE(field_proxy_type) :: theta_proxy, exner_in_wth_proxy, u_in_w3_proxy, v_in_w3_proxy, mr_n_proxy, mr_n_1_proxy, & &mr_n_2_proxy, height_w3_proxy, height_wth_proxy, zh_proxy, z0msea_proxy, z0m_proxy, tile_fraction_proxy, leaf_area_index_proxy, & &canopy_height_proxy, peak_to_trough_orog_proxy, silhouette_area_orog_proxy, soil_albedo_proxy, soil_roughness_proxy, & &soil_moist_wilt_proxy, soil_moist_crit_proxy, soil_moist_sat_proxy, soil_thermal_cond_proxy, soil_suction_sat_proxy, & @@ -392,13 +392,13 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &map_adspc4_sea_ice_temperature(:,:) => null(), map_adspc5_snow_layer_thickness(:,:) => null(), & &map_adspc6_soil_temperature(:,:) => null(), map_adspc7_surf_interp(:,:) => null(), map_adspc8_tile_water_extract(:,:) => null(), & &map_adspc9_albedo_obs_scaling(:,:) => null(), map_w3(:,:) => null(), map_wtheta(:,:) => null() - INTEGER(KIND=i_def) ndf_wtheta, undf_wtheta, ndf_w3, undf_w3, ndf_adspc1_zh, undf_adspc1_zh, ndf_adspc2_tile_fraction, & + INTEGER(KIND=i_def) :: ndf_wtheta, undf_wtheta, ndf_w3, undf_w3, ndf_adspc1_zh, undf_adspc1_zh, ndf_adspc2_tile_fraction, & &undf_adspc2_tile_fraction, ndf_adspc3_leaf_area_index, undf_adspc3_leaf_area_index, ndf_adspc4_sea_ice_temperature, & &undf_adspc4_sea_ice_temperature, ndf_adspc5_snow_layer_thickness, undf_adspc5_snow_layer_thickness, ndf_adspc6_soil_temperature, & &undf_adspc6_soil_temperature, ndf_adspc7_surf_interp, undf_adspc7_surf_interp, ndf_adspc8_tile_water_extract, & &undf_adspc8_tile_water_extract, ndf_adspc9_albedo_obs_scaling, undf_adspc9_albedo_obs_scaling, ndf_adspc10_dust_mrel, & &undf_adspc10_dust_mrel - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() INTEGER(KIND=i_def), pointer :: tile_fraction_stencil_size(:) => null() INTEGER(KIND=i_def), pointer :: tile_fraction_stencil_dofmap(:,:,:) => null() @@ -744,15 +744,15 @@ SUBROUTINE invoke_heaviside_kernel_type(exner_wth, nplev, plevs, plev_heaviside, INTEGER(KIND=i_def), intent(in) :: nplev REAL(KIND=r_def), intent(in) :: plevs(nplev) TYPE(field_type), intent(in) :: exner_wth, plev_heaviside - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers REAL(KIND=r_def), pointer, dimension(:) :: plev_heaviside_data => null() REAL(KIND=r_def), pointer, dimension(:) :: exner_wth_data => null() - TYPE(field_proxy_type) exner_wth_proxy, plev_heaviside_proxy + TYPE(field_proxy_type) :: exner_wth_proxy, plev_heaviside_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_exner_wth(:,:) => null(), map_adspc2_plev_heaviside(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_exner_wth, undf_adspc1_exner_wth, ndf_adspc2_plev_heaviside, undf_adspc2_plev_heaviside - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: ndf_adspc1_exner_wth, undf_adspc1_exner_wth, ndf_adspc2_plev_heaviside, undf_adspc2_plev_heaviside + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() ! ! Initialise field and/or operator proxies @@ -822,20 +822,20 @@ SUBROUTINE invoke_temp_on_pres_kernel_type(temp, exner_wth, & INTEGER(KIND=i_def), intent(in) :: nplev REAL(KIND=r_def), intent(in) :: plevs(nplev) TYPE(field_type), intent(in) :: temp, exner_wth, height_wth, plev_temp - INTEGER(KIND=i_def) cell - INTEGER df - INTEGER(KIND=i_def) loop1_start, loop1_stop - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers + INTEGER(KIND=i_def) :: cell + INTEGER :: df + INTEGER(KIND=i_def) :: loop1_start, loop1_stop + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers REAL(KIND=r_def), pointer, dimension(:) :: plev_temp_data => null() REAL(KIND=r_def), pointer, dimension(:) :: height_wth_data => null() REAL(KIND=r_def), pointer, dimension(:) :: exner_wth_data => null() REAL(KIND=r_def), pointer, dimension(:) :: temp_data => null() - TYPE(field_proxy_type) temp_proxy, exner_wth_proxy, height_wth_proxy, plev_temp_proxy + TYPE(field_proxy_type) :: temp_proxy, exner_wth_proxy, height_wth_proxy, plev_temp_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_temp(:,:) => null(), map_adspc2_plev_temp(:,:) => null(), map_wtheta(:,:) => null() - INTEGER(KIND=i_def) ndf_aspc1_temp, undf_aspc1_temp, ndf_adspc1_temp, undf_adspc1_temp, ndf_wtheta, undf_wtheta, & + INTEGER(KIND=i_def) :: ndf_aspc1_temp, undf_aspc1_temp, ndf_adspc1_temp, undf_adspc1_temp, ndf_wtheta, undf_wtheta, & &ndf_adspc2_plev_temp, undf_adspc2_plev_temp - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() ! ! Initialise field and/or operator proxies @@ -919,16 +919,16 @@ SUBROUTINE invoke_pres_interp_kernel_type(u_in_w3, exner_w3, nplev, plevs, plev_ INTEGER(KIND=i_def), intent(in) :: nplev REAL(KIND=r_def), intent(in) :: plevs(nplev) TYPE(field_type), intent(in) :: u_in_w3, exner_w3, plev_u - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers REAL(KIND=r_def), pointer, dimension(:) :: plev_u_data => null() REAL(KIND=r_def), pointer, dimension(:) :: exner_w3_data => null() REAL(KIND=r_def), pointer, dimension(:) :: u_in_w3_data => null() - TYPE(field_proxy_type) u_in_w3_proxy, exner_w3_proxy, plev_u_proxy + TYPE(field_proxy_type) :: u_in_w3_proxy, exner_w3_proxy, plev_u_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_u_in_w3(:,:) => null(), map_adspc2_plev_u(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_u_in_w3, undf_adspc1_u_in_w3, ndf_adspc2_plev_u, undf_adspc2_plev_u - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: ndf_adspc1_u_in_w3, undf_adspc1_u_in_w3, ndf_adspc2_plev_u, undf_adspc2_plev_u + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() ! ! Initialise field and/or operator proxies @@ -999,21 +999,21 @@ SUBROUTINE invoke_geo_on_pres_kernel_type(height_w3, exner_w3, theta_wth, height INTEGER(KIND=i_def), intent(in) :: nplev REAL(KIND=r_def), intent(in) :: plevs(nplev) TYPE(field_type), intent(in) :: height_w3, exner_w3, theta_wth, height_wth, exner_wth, plev_geopot - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers REAL(KIND=r_def), pointer, dimension(:) :: plev_geopot_data => null() REAL(KIND=r_def), pointer, dimension(:) :: exner_wth_data => null() REAL(KIND=r_def), pointer, dimension(:) :: height_wth_data => null() REAL(KIND=r_def), pointer, dimension(:) :: theta_wth_data => null() REAL(KIND=r_def), pointer, dimension(:) :: exner_w3_data => null() REAL(KIND=r_def), pointer, dimension(:) :: height_w3_data => null() - TYPE(field_proxy_type) height_w3_proxy, exner_w3_proxy, theta_wth_proxy, height_wth_proxy, exner_wth_proxy, plev_geopot_proxy + TYPE(field_proxy_type) :: height_w3_proxy, exner_w3_proxy, theta_wth_proxy, height_wth_proxy, exner_wth_proxy, plev_geopot_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_height_w3(:,:) => null(), map_adspc2_plev_geopot(:,:) => null(), & &map_wtheta(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_height_w3, undf_adspc1_height_w3, ndf_wtheta, undf_wtheta, ndf_adspc2_plev_geopot, & + INTEGER(KIND=i_def) :: ndf_adspc1_height_w3, undf_adspc1_height_w3, ndf_wtheta, undf_wtheta, ndf_adspc2_plev_geopot, & &undf_adspc2_plev_geopot - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() ! ! Initialise field and/or operator proxies @@ -1095,16 +1095,16 @@ SUBROUTINE invoke_thetaw_kernel_type(plev_thetaw, plev_temp, plev_qv, nplev, ple INTEGER(KIND=i_def), intent(in) :: nplev TYPE(field_type), intent(in) :: plev_temp, plev_qv, plev_thetaw REAL(KIND=r_def), intent(in) :: plevs(nplev) - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_plev_thetaw + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_plev_thetaw REAL(KIND=r_def), pointer, dimension(:) :: plev_thetaw_data => null() REAL(KIND=r_def), pointer, dimension(:) :: plev_qv_data => null() REAL(KIND=r_def), pointer, dimension(:) :: plev_temp_data => null() - TYPE(field_proxy_type) plev_qv_proxy, plev_thetaw_proxy, plev_temp_proxy + TYPE(field_proxy_type) :: plev_qv_proxy, plev_thetaw_proxy, plev_temp_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_plev_thetaw(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_plev_thetaw, undf_adspc1_plev_thetaw - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: ndf_adspc1_plev_thetaw, undf_adspc1_plev_thetaw + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() ! ! Initialise field and/or operator proxies diff --git a/science/adjoint/fortitude.toml b/science/adjoint/fortitude.toml index 720abb2b1..e84afded5 100644 --- a/science/adjoint/fortitude.toml +++ b/science/adjoint/fortitude.toml @@ -10,7 +10,7 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", "C051", "C061", "C071", "C072", "C081", "C091", "C082", "C092", "C121", -"C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", +"C132", "C141", "S071", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] @@ -22,6 +22,5 @@ output-format = "grouped" #group results by file "setop_random_kernel_mod_test.pf" = ["E001"] "adj_mixed_operator_alg_mod.x90" = ["C061"] -# Leaving out for now (these rules are used in the universal config): -# S071 + diff --git a/science/adjoint/source/psy/lookup/psykal_lite_gen_adj_lookup_tables_mod.f90 b/science/adjoint/source/psy/lookup/psykal_lite_gen_adj_lookup_tables_mod.f90 index b28a36dd9..ae5e14468 100644 --- a/science/adjoint/source/psy/lookup/psykal_lite_gen_adj_lookup_tables_mod.f90 +++ b/science/adjoint/source/psy/lookup/psykal_lite_gen_adj_lookup_tables_mod.f90 @@ -33,26 +33,26 @@ subroutine invoke_gen_poly1d_lookup_kernel(tracer, coeff, reconstruction, lookup &set_counts_poly1d_field_dummy integer(kind=i_def), intent(in) :: stencil_extent integer, intent(in) :: loop_halo_depth - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_tracer + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_tracer integer(kind=i_def), pointer, dimension(:) :: set_counts_poly1d_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly1d_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: set_counts_poly1d_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly1d_field_data - type(integer_field_proxy_type) lookup_poly1d_field_proxy, set_counts_poly1d_field_proxy, lookup_poly1d_field_dummy_proxy, & + type(integer_field_proxy_type) :: lookup_poly1d_field_proxy, set_counts_poly1d_field_proxy, lookup_poly1d_field_dummy_proxy, & &set_counts_poly1d_field_dummy_proxy real(kind=r_tran), pointer, dimension(:) :: reconstruction_data real(kind=r_tran), pointer, dimension(:) :: coeff_data real(kind=r_tran), pointer, dimension(:) :: tracer_data - type(r_tran_field_proxy_type) tracer_proxy, coeff_proxy, reconstruction_proxy + type(r_tran_field_proxy_type) :: tracer_proxy, coeff_proxy, reconstruction_proxy integer(kind=i_def), pointer :: map_adspc1_tracer(:,:), map_adspc2_coeff(:,:), & &map_adspc3_reconstruction(:,:), map_adspc4_lookup_poly1d_field(:,:), & &map_adspc5_set_counts_poly1d_field(:,:) - integer(kind=i_def) ndf_adspc1_tracer, undf_adspc1_tracer, ndf_adspc2_coeff, undf_adspc2_coeff, ndf_adspc3_reconstruction, & + integer(kind=i_def) :: ndf_adspc1_tracer, undf_adspc1_tracer, ndf_adspc2_coeff, undf_adspc2_coeff, ndf_adspc3_reconstruction, & &undf_adspc3_reconstruction, ndf_adspc4_lookup_poly1d_field, undf_adspc4_lookup_poly1d_field, ndf_adspc5_set_counts_poly1d_field, & &undf_adspc5_set_counts_poly1d_field - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh integer(kind=i_def), pointer :: set_counts_poly1d_field_dummy_stencil_size(:) integer(kind=i_def), pointer :: set_counts_poly1d_field_dummy_stencil_dofmap(:,:,:) @@ -194,26 +194,26 @@ subroutine invoke_gen_poly2d_lookup_kernel(tracer, coeff, reconstruction, lookup &set_counts_poly2d_field_dummy integer(kind=i_def), intent(in) :: stencil_extent integer, intent(in) :: loop_halo_depth - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_tracer + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_tracer integer(kind=i_def), pointer, dimension(:) :: set_counts_poly2d_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly2d_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: set_counts_poly2d_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly2d_field_data - type(integer_field_proxy_type) lookup_poly2d_field_proxy, set_counts_poly2d_field_proxy, lookup_poly2d_field_dummy_proxy, & + type(integer_field_proxy_type) :: lookup_poly2d_field_proxy, set_counts_poly2d_field_proxy, lookup_poly2d_field_dummy_proxy, & &set_counts_poly2d_field_dummy_proxy real(kind=r_tran), pointer, dimension(:) :: reconstruction_data real(kind=r_tran), pointer, dimension(:) :: coeff_data real(kind=r_tran), pointer, dimension(:) :: tracer_data - type(r_tran_field_proxy_type) tracer_proxy, coeff_proxy, reconstruction_proxy + type(r_tran_field_proxy_type) :: tracer_proxy, coeff_proxy, reconstruction_proxy integer(kind=i_def), pointer :: map_adspc1_tracer(:,:), map_adspc2_coeff(:,:), & &map_adspc3_reconstruction(:,:), map_adspc4_lookup_poly2d_field(:,:), & &map_adspc5_set_counts_poly2d_field(:,:) - integer(kind=i_def) ndf_adspc1_tracer, undf_adspc1_tracer, ndf_adspc2_coeff, undf_adspc2_coeff, ndf_adspc3_reconstruction, & + integer(kind=i_def) :: ndf_adspc1_tracer, undf_adspc1_tracer, ndf_adspc2_coeff, undf_adspc2_coeff, ndf_adspc3_reconstruction, & &undf_adspc3_reconstruction, ndf_adspc4_lookup_poly2d_field, undf_adspc4_lookup_poly2d_field, ndf_adspc5_set_counts_poly2d_field, & &undf_adspc5_set_counts_poly2d_field - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh integer(kind=i_def), pointer :: set_counts_poly2d_field_dummy_stencil_size(:) integer(kind=i_def), pointer :: set_counts_poly2d_field_dummy_stencil_dofmap(:,:,:) @@ -353,38 +353,38 @@ subroutine invoke_gen_poly_adv_upd_lookup_kernel(advective, reconstruction_big_h type(integer_field_type), intent(in) :: lookup_field, set_counts_field, lookup_field_dummy, set_counts_field_dummy integer(kind=i_def), intent(in) :: stencil_extent integer, intent(in) :: loop_halo_depth - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_advective + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_advective integer(kind=i_def), pointer, dimension(:) :: set_counts_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: set_counts_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_data - type(integer_field_proxy_type) lookup_field_proxy, set_counts_field_proxy, lookup_field_dummy_proxy, & + type(integer_field_proxy_type) :: lookup_field_proxy, set_counts_field_proxy, lookup_field_dummy_proxy, & &set_counts_field_dummy_proxy real(kind=r_tran), pointer, dimension(:) :: wind_big_halo_data real(kind=r_tran), pointer, dimension(:) :: reconstruction_big_halo_data real(kind=r_tran), pointer, dimension(:) :: advective_data - type(r_tran_field_proxy_type) advective_proxy, reconstruction_big_halo_proxy, wind_big_halo_proxy + type(r_tran_field_proxy_type) :: advective_proxy, reconstruction_big_halo_proxy, wind_big_halo_proxy integer(kind=i_def), pointer :: map_adspc1_reconstruction_big_halo(:,:), map_adspc2_lookup_field(:,:), & &map_adspc3_set_counts_field(:,:), map_w2(:,:), map_wtheta(:,:) - integer(kind=i_def) ndf_wtheta, undf_wtheta, ndf_adspc1_reconstruction_big_halo, undf_adspc1_reconstruction_big_halo, & + integer(kind=i_def) :: ndf_wtheta, undf_wtheta, ndf_adspc1_reconstruction_big_halo, undf_adspc1_reconstruction_big_halo, & &ndf_w2, undf_w2, ndf_adspc2_lookup_field, undf_adspc2_lookup_field, ndf_adspc3_set_counts_field, undf_adspc3_set_counts_field - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh - integer(kind=i_def) set_counts_field_dummy_max_branch_length + integer(kind=i_def) :: set_counts_field_dummy_max_branch_length integer(kind=i_def), pointer :: set_counts_field_dummy_stencil_size(:,:) integer(kind=i_def), pointer :: set_counts_field_dummy_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: set_counts_field_dummy_stencil_map - integer(kind=i_def) lookup_field_dummy_max_branch_length + integer(kind=i_def) :: lookup_field_dummy_max_branch_length integer(kind=i_def), pointer :: lookup_field_dummy_stencil_size(:,:) integer(kind=i_def), pointer :: lookup_field_dummy_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: lookup_field_dummy_stencil_map - integer(kind=i_def) wind_big_halo_max_branch_length + integer(kind=i_def) :: wind_big_halo_max_branch_length integer(kind=i_def), pointer :: wind_big_halo_stencil_size(:,:) integer(kind=i_def), pointer :: wind_big_halo_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: wind_big_halo_stencil_map - integer(kind=i_def) reconstruction_big_halo_max_branch_length + integer(kind=i_def) :: reconstruction_big_halo_max_branch_length integer(kind=i_def), pointer :: reconstruction_big_halo_stencil_size(:,:) integer(kind=i_def), pointer :: reconstruction_big_halo_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: reconstruction_big_halo_stencil_map @@ -536,35 +536,35 @@ subroutine invoke_gen_w3h_adv_upd_lookup_kernel(advective_increment, wind, m3_in type(integer_field_type), intent(in) :: lookup_field, set_counts_field, lookup_field_dummy, set_counts_field_dummy integer(kind=i_def), intent(in) :: stencil_extent integer, intent(in) :: loop_halo_depth - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_advective_increment + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_advective_increment real(kind=r_def), pointer, dimension(:,:,:) :: m3_inv_local_stencil - type(operator_proxy_type) m3_inv_proxy + type(operator_proxy_type) :: m3_inv_proxy integer(kind=i_def), pointer, dimension(:) :: set_counts_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: set_counts_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_data - type(integer_field_proxy_type) lookup_field_proxy, set_counts_field_proxy, lookup_field_dummy_proxy, & + type(integer_field_proxy_type) :: lookup_field_proxy, set_counts_field_proxy, lookup_field_dummy_proxy, & &set_counts_field_dummy_proxy real(kind=r_tran), pointer, dimension(:) :: wind_data real(kind=r_tran), pointer, dimension(:) :: advective_increment_data - type(r_tran_field_proxy_type) advective_increment_proxy, wind_proxy + type(r_tran_field_proxy_type) :: advective_increment_proxy, wind_proxy integer(kind=i_def), pointer :: map_adspc1_lookup_field(:,:), map_adspc2_set_counts_field(:,:), & &map_any_w2(:,:), map_w3(:,:) - integer(kind=i_def) ndf_w3, undf_w3, ndf_any_w2, undf_any_w2, ndf_adspc1_lookup_field, undf_adspc1_lookup_field, & + integer(kind=i_def) :: ndf_w3, undf_w3, ndf_any_w2, undf_any_w2, ndf_adspc1_lookup_field, undf_adspc1_lookup_field, & &ndf_adspc2_set_counts_field, undf_adspc2_set_counts_field - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh - integer(kind=i_def) set_counts_field_dummy_max_branch_length + integer(kind=i_def) :: set_counts_field_dummy_max_branch_length integer(kind=i_def), pointer :: set_counts_field_dummy_stencil_size(:,:) integer(kind=i_def), pointer :: set_counts_field_dummy_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: set_counts_field_dummy_stencil_map - integer(kind=i_def) lookup_field_dummy_max_branch_length + integer(kind=i_def) :: lookup_field_dummy_max_branch_length integer(kind=i_def), pointer :: lookup_field_dummy_stencil_size(:,:) integer(kind=i_def), pointer :: lookup_field_dummy_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: lookup_field_dummy_stencil_map - integer(kind=i_def) wind_max_branch_length + integer(kind=i_def) :: wind_max_branch_length integer(kind=i_def), pointer :: wind_stencil_size(:,:) integer(kind=i_def), pointer :: wind_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: wind_stencil_map @@ -699,32 +699,32 @@ subroutine invoke_gen_a_h_o_lookup_kernel(dummy_w3_big_halo, lookup_field, set_c type(integer_field_type), intent(in) :: lookup_field, set_counts_field, lookup_field_dummy, set_counts_field_dummy integer(kind=i_def), intent(in) :: stencil_extent integer, intent(in) :: loop_halo_depth - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_dummy_w3_big_halo + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_dummy_w3_big_halo integer(kind=i_def), pointer, dimension(:) :: set_counts_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_dummy_data integer(kind=i_def), pointer, dimension(:) :: set_counts_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_data - type(integer_field_proxy_type) lookup_field_proxy, set_counts_field_proxy, lookup_field_dummy_proxy, & + type(integer_field_proxy_type) :: lookup_field_proxy, set_counts_field_proxy, lookup_field_dummy_proxy, & &set_counts_field_dummy_proxy real(kind=r_solver), pointer, dimension(:) :: dummy_w3_big_halo_data - type(r_solver_field_proxy_type) dummy_w3_big_halo_proxy + type(r_solver_field_proxy_type) :: dummy_w3_big_halo_proxy integer(kind=i_def), pointer :: map_adspc1_lookup_field(:,:), map_adspc2_set_counts_field(:,:), & &map_w3(:,:) - integer(kind=i_def) ndf_w3, undf_w3, ndf_adspc1_lookup_field, undf_adspc1_lookup_field, ndf_adspc2_set_counts_field, & + integer(kind=i_def) :: ndf_w3, undf_w3, ndf_adspc1_lookup_field, undf_adspc1_lookup_field, ndf_adspc2_set_counts_field, & &undf_adspc2_set_counts_field - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh - integer(kind=i_def) set_counts_field_dummy_max_branch_length + integer(kind=i_def) :: set_counts_field_dummy_max_branch_length integer(kind=i_def), pointer :: set_counts_field_dummy_stencil_size(:,:) integer(kind=i_def), pointer :: set_counts_field_dummy_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: set_counts_field_dummy_stencil_map - integer(kind=i_def) lookup_field_dummy_max_branch_length + integer(kind=i_def) :: lookup_field_dummy_max_branch_length integer(kind=i_def), pointer :: lookup_field_dummy_stencil_size(:,:) integer(kind=i_def), pointer :: lookup_field_dummy_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: lookup_field_dummy_stencil_map - integer(kind=i_def) dummy_w3_big_halo_max_branch_length + integer(kind=i_def) :: dummy_w3_big_halo_max_branch_length integer(kind=i_def), pointer :: dummy_w3_big_halo_stencil_size(:,:) integer(kind=i_def), pointer :: dummy_w3_big_halo_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: dummy_w3_big_halo_stencil_map diff --git a/science/adjoint/source/psy/lookup/solver/invoke_adj_apply_helmholtz_op_lookup_mod.f90 b/science/adjoint/source/psy/lookup/solver/invoke_adj_apply_helmholtz_op_lookup_mod.f90 index 726e77eb0..a290ff9df 100644 --- a/science/adjoint/source/psy/lookup/solver/invoke_adj_apply_helmholtz_op_lookup_mod.f90 +++ b/science/adjoint/source/psy/lookup/solver/invoke_adj_apply_helmholtz_op_lookup_mod.f90 @@ -28,25 +28,25 @@ subroutine invoke_adj_a_h_o_lookup_kernel(vector_mx, vector_amx, helmholtz_opera logical(kind=l_def), intent(in) :: lam_mesh type(r_solver_field_type), intent(in) :: vector_mx, vector_amx, helmholtz_operator(9) type(integer_field_type), intent(in) :: lookup_field, set_counts_field - integer(kind=i_def) cell - integer(kind=i_def) i - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_vector_mx + integer(kind=i_def) :: cell + integer(kind=i_def) :: i + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_vector_mx integer(kind=i_def), pointer, dimension(:) :: set_counts_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_field_data - type(integer_field_proxy_type) lookup_field_proxy, set_counts_field_proxy + type(integer_field_proxy_type) :: lookup_field_proxy, set_counts_field_proxy real(kind=r_solver), pointer, dimension(:) :: helmholtz_operator_1_data, helmholtz_operator_2_data, & &helmholtz_operator_3_data, helmholtz_operator_4_data, helmholtz_operator_5_data, & &helmholtz_operator_6_data, helmholtz_operator_7_data, helmholtz_operator_8_data, & &helmholtz_operator_9_data real(kind=r_solver), pointer, dimension(:) :: vector_amx_data real(kind=r_solver), pointer, dimension(:) :: vector_mx_data - type(r_solver_field_proxy_type) vector_mx_proxy, vector_amx_proxy, helmholtz_operator_proxy(9) + type(r_solver_field_proxy_type) :: vector_mx_proxy, vector_amx_proxy, helmholtz_operator_proxy(9) integer(kind=i_def), pointer :: map_adspc1_lookup_field(:,:), map_adspc2_set_counts_field(:,:), & &map_w3(:,:) - integer(kind=i_def) ndf_w3, undf_w3, ndf_adspc1_lookup_field, undf_adspc1_lookup_field, ndf_adspc2_set_counts_field, & + integer(kind=i_def) :: ndf_w3, undf_w3, ndf_adspc1_lookup_field, undf_adspc1_lookup_field, ndf_adspc2_set_counts_field, & &undf_adspc2_set_counts_field - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh nullify( set_counts_field_data, lookup_field_data, helmholtz_operator_1_data, & diff --git a/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly1d_recon_lookup_mod.f90 b/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly1d_recon_lookup_mod.f90 index daae5be22..712f66e78 100644 --- a/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly1d_recon_lookup_mod.f90 +++ b/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly1d_recon_lookup_mod.f90 @@ -27,23 +27,23 @@ subroutine invoke_adj_poly1d_recon_lookup(reconstruction, tracer, lookup_poly1d_ integer(kind=i_def), intent(in) :: nsets, nindices, stencil_extent type(r_tran_field_type), intent(in) :: reconstruction, tracer, coeff type(integer_field_type), intent(in) :: lookup_poly1d_field, num_sets_poly1d_field - integer(kind=i_def) cell - integer(kind=i_def) loop1_start, loop1_stop - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_reconstruction + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop1_start, loop1_stop + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_reconstruction integer(kind=i_def), pointer, dimension(:) :: num_sets_poly1d_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly1d_field_data - type(integer_field_proxy_type) lookup_poly1d_field_proxy, num_sets_poly1d_field_proxy + type(integer_field_proxy_type) :: lookup_poly1d_field_proxy, num_sets_poly1d_field_proxy real(kind=r_tran), pointer, dimension(:) :: coeff_data real(kind=r_tran), pointer, dimension(:) :: tracer_data real(kind=r_tran), pointer, dimension(:) :: reconstruction_data - type(r_tran_field_proxy_type) reconstruction_proxy, tracer_proxy, coeff_proxy + type(r_tran_field_proxy_type) :: reconstruction_proxy, tracer_proxy, coeff_proxy integer(kind=i_def), pointer :: map_adspc1_reconstruction(:,:), map_adspc2_tracer(:,:), & &map_adspc3_lookup_poly1d_field(:,:), map_adspc4_num_sets_poly1d_field(:,:), map_adspc5_coeff(:,:) - integer(kind=i_def) ndf_adspc1_reconstruction, undf_adspc1_reconstruction, ndf_adspc2_tracer, undf_adspc2_tracer, & + integer(kind=i_def) :: ndf_adspc1_reconstruction, undf_adspc1_reconstruction, ndf_adspc2_tracer, undf_adspc2_tracer, & &ndf_adspc3_lookup_poly1d_field, undf_adspc3_lookup_poly1d_field, ndf_adspc4_num_sets_poly1d_field, & &undf_adspc4_num_sets_poly1d_field, ndf_adspc5_coeff, undf_adspc5_coeff - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh nullify( num_sets_poly1d_field_data, lookup_poly1d_field_data, & diff --git a/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly2d_recon_lookup_mod.f90 b/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly2d_recon_lookup_mod.f90 index d545e158b..97fdb47b1 100644 --- a/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly2d_recon_lookup_mod.f90 +++ b/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly2d_recon_lookup_mod.f90 @@ -27,23 +27,23 @@ subroutine invoke_adj_poly2d_recon_lookup(reconstruction, tracer, & integer(kind=i_def), intent(in) :: nsets, nindices, stencil_extent type(r_tran_field_type), intent(in) :: reconstruction, tracer, coeff type(integer_field_type), intent(in) :: lookup_poly2d_field, set_count_poly2d_field - integer(kind=i_def) cell - integer(kind=i_def) loop1_start, loop1_stop - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_reconstruction + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop1_start, loop1_stop + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_reconstruction integer(kind=i_def), pointer, dimension(:) :: set_count_poly2d_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly2d_field_data - type(integer_field_proxy_type) lookup_poly2d_field_proxy, set_count_poly2d_field_proxy + type(integer_field_proxy_type) :: lookup_poly2d_field_proxy, set_count_poly2d_field_proxy real(kind=r_tran), pointer, dimension(:) :: coeff_data real(kind=r_tran), pointer, dimension(:) :: tracer_data real(kind=r_tran), pointer, dimension(:) :: reconstruction_data - type(r_tran_field_proxy_type) reconstruction_proxy, tracer_proxy, coeff_proxy + type(r_tran_field_proxy_type) :: reconstruction_proxy, tracer_proxy, coeff_proxy integer(kind=i_def), pointer :: map_adspc1_reconstruction(:,:), map_adspc2_tracer(:,:), & &map_adspc3_lookup_poly2d_field(:,:), map_adspc4_set_count_poly2d_field(:,:), map_adspc5_coeff(:,:) - integer(kind=i_def) ndf_adspc1_reconstruction, undf_adspc1_reconstruction, ndf_adspc2_tracer, undf_adspc2_tracer, & + integer(kind=i_def) :: ndf_adspc1_reconstruction, undf_adspc1_reconstruction, ndf_adspc2_tracer, undf_adspc2_tracer, & &ndf_adspc3_lookup_poly2d_field, undf_adspc3_lookup_poly2d_field, ndf_adspc4_set_count_poly2d_field, & &undf_adspc4_set_count_poly2d_field, ndf_adspc5_coeff, undf_adspc5_coeff - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh nullify( set_count_poly2d_field_data, lookup_poly2d_field_data, & diff --git a/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly_adv_upd_lookup_mod.f90 b/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly_adv_upd_lookup_mod.f90 index 018b011a1..81c173613 100644 --- a/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly_adv_upd_lookup_mod.f90 +++ b/science/adjoint/source/psy/lookup/transport/mol/invoke_adj_poly_adv_upd_lookup_mod.f90 @@ -31,28 +31,28 @@ subroutine invoke_adj_poly_adv_upd_lookup(advective, reconstruction, & type(r_tran_field_type), intent(in) :: advective, reconstruction, wind, wind_dir type(integer_field_type), intent(in) :: lookup_poly_adv_upd_field, num_sets_poly_adv_upd_field integer(kind=i_def), intent(in) :: stencil_extent - integer(kind=i_def) df - integer(kind=i_def) cell - integer(kind=i_def) loop1_start, loop1_stop - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_advective + integer(kind=i_def) :: df + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop1_start, loop1_stop + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_advective integer(kind=i_def), pointer, dimension(:) :: num_sets_poly_adv_upd_field_data integer(kind=i_def), pointer, dimension(:) :: lookup_poly_adv_upd_field_data - type(integer_field_proxy_type) lookup_poly_adv_upd_field_proxy, num_sets_poly_adv_upd_field_proxy + type(integer_field_proxy_type) :: lookup_poly_adv_upd_field_proxy, num_sets_poly_adv_upd_field_proxy real(kind=r_tran), pointer, dimension(:) :: wind_dir_data real(kind=r_tran), pointer, dimension(:) :: wind_data real(kind=r_tran), pointer, dimension(:) :: reconstruction_data real(kind=r_tran), pointer, dimension(:) :: advective_data - type(r_tran_field_proxy_type) advective_proxy, reconstruction_proxy, wind_proxy, wind_dir_proxy + type(r_tran_field_proxy_type) :: advective_proxy, reconstruction_proxy, wind_proxy, wind_dir_proxy integer(kind=i_def), pointer :: map_adspc1_reconstruction(:,:), & &map_adspc2_lookup_poly_adv_upd_field(:,:), map_adspc3_num_sets_poly_adv_upd_field(:,:), & &map_w2(:,:), map_wtheta(:,:) - integer(kind=i_def) ndf_wtheta, undf_wtheta, ndf_adspc1_reconstruction, undf_adspc1_reconstruction, & + integer(kind=i_def) :: ndf_wtheta, undf_wtheta, ndf_adspc1_reconstruction, undf_adspc1_reconstruction, & &ndf_adspc2_lookup_poly_adv_upd_field, undf_adspc2_lookup_poly_adv_upd_field, ndf_adspc3_num_sets_poly_adv_upd_field, & &undf_adspc3_num_sets_poly_adv_upd_field, ndf_w2, undf_w2, ndf_aspc1_advective, undf_aspc1_advective - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh - integer(kind=i_def) wind_max_branch_length + integer(kind=i_def) :: wind_max_branch_length integer(kind=i_def), pointer :: wind_stencil_size(:,:) integer(kind=i_def), pointer :: wind_stencil_dofmap(:,:,:,:) type(stencil_2D_dofmap_type), pointer :: wind_stencil_map diff --git a/science/adjoint/source/psy/transport/mol/invoke_atl_poly1d_vert_w3_recon_mod.F90 b/science/adjoint/source/psy/transport/mol/invoke_atl_poly1d_vert_w3_recon_mod.F90 index bada97551..b6e81bf9f 100644 --- a/science/adjoint/source/psy/transport/mol/invoke_atl_poly1d_vert_w3_recon_mod.F90 +++ b/science/adjoint/source/psy/transport/mol/invoke_atl_poly1d_vert_w3_recon_mod.F90 @@ -32,19 +32,19 @@ subroutine invoke_atl_poly1d_vert_w3_recon_kernel_type(field_new, field_old, ls_ logical(kind=l_def), intent(in) :: logspace type(field_type), intent(in) :: field_new, field_old, ls_field_old, vert_flux_coeffs integer(kind=i_def), intent(inout), allocatable, dimension(:,:,:) :: stencil - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers_field_new + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers_field_new real(kind=r_def), pointer, dimension(:) :: vert_flux_coeffs_data real(kind=r_def), pointer, dimension(:) :: ls_field_old_data real(kind=r_def), pointer, dimension(:) :: field_old_data real(kind=r_def), pointer, dimension(:) :: field_new_data - type(field_proxy_type) field_new_proxy, field_old_proxy, ls_field_old_proxy, vert_flux_coeffs_proxy + type(field_proxy_type) :: field_new_proxy, field_old_proxy, ls_field_old_proxy, vert_flux_coeffs_proxy integer(kind=i_def), pointer :: map_adspc1_field_new(:,:), map_adspc2_vert_flux_coeffs(:,:), & &map_w3(:,:) - integer(kind=i_def) ndf_adspc1_field_new, undf_adspc1_field_new, ndf_w3, undf_w3, ndf_adspc2_vert_flux_coeffs, & + integer(kind=i_def) :: ndf_adspc1_field_new, undf_adspc1_field_new, ndf_w3, undf_w3, ndf_adspc2_vert_flux_coeffs, & &undf_adspc2_vert_flux_coeffs - integer(kind=i_def) max_halo_depth_mesh + integer(kind=i_def) :: max_halo_depth_mesh type(mesh_type), pointer :: mesh ! ! Initialise field and/or operator proxies diff --git a/science/gungho/fortitude.toml b/science/gungho/fortitude.toml index 20cf23152..c482f5acb 100644 --- a/science/gungho/fortitude.toml +++ b/science/gungho/fortitude.toml @@ -20,8 +20,8 @@ output-format = "grouped" #group results by file [check.per-file-ignores] "pressure_gradient_p0_kernel_mod_test.pf" = ["C092"] -"psykal_lite_mod.F90" = ["C132", "S071"] -"psykal_lite_transport_mod.F90" = ["C132", "S071"] +"psykal_lite_mod.F90" = ["C132"] +"psykal_lite_transport_mod.F90" = ["C132"] # Leaving out for now (these rules are used in the universal config): diff --git a/science/gungho/source/psy/psykal_lite_mod.F90 b/science/gungho/source/psy/psykal_lite_mod.F90 index 80509dc1d..9c12f78d9 100644 --- a/science/gungho/source/psy/psykal_lite_mod.F90 +++ b/science/gungho/source/psy/psykal_lite_mod.F90 @@ -90,14 +90,14 @@ subroutine invoke_helmholtz_operator_kernel_type(helmholtz_operator, hb_lumped_i type(r_solver_operator_type), intent(in) :: div_star, ptheta2v, compound_div, m3_exner_star, p3theta integer(kind=i_def), intent(in) :: stencil_depth integer(kind=i_def) :: stencil_size - integer(kind=i_def) cell - integer(kind=i_def) nlayers - type(r_solver_operator_proxy_type) div_star_proxy, ptheta2v_proxy, compound_div_proxy, m3_exner_star_proxy, p3theta_proxy - type(r_solver_field_proxy_type) helmholtz_operator_proxy(9) - type(r_solver_field_proxy_type) hb_lumped_inv_proxy, u_normalisation_proxy, t_normalisation_proxy, & + integer(kind=i_def) :: cell + integer(kind=i_def) :: nlayers + type(r_solver_operator_proxy_type) :: div_star_proxy, ptheta2v_proxy, compound_div_proxy, m3_exner_star_proxy, p3theta_proxy + type(r_solver_field_proxy_type) :: helmholtz_operator_proxy(9) + type(r_solver_field_proxy_type) :: hb_lumped_inv_proxy, u_normalisation_proxy, t_normalisation_proxy, & w2_mask_proxy integer(kind=i_def), pointer :: map_w2(:,:) => null(), map_w3(:,:) => null(), map_wtheta(:,:) => null() - integer(kind=i_def) ndf_w3, undf_w3, ndf_w2, undf_w2, ndf_wtheta, undf_wtheta + integer(kind=i_def) :: ndf_w3, undf_w3, ndf_w2, undf_w2, ndf_wtheta, undf_wtheta type(mesh_type), pointer :: mesh => null() INTEGER(KIND=i_def) :: hb_lumped_inv_max_branch_length integer(kind=i_def), pointer :: hb_lumped_inv_stencil_sizes(:,:) => null() @@ -105,7 +105,7 @@ subroutine invoke_helmholtz_operator_kernel_type(helmholtz_operator, hb_lumped_i type(stencil_2d_dofmap_type), pointer :: hb_lumped_inv_stencil_map => null() integer(kind=i_def) :: i,j integer(kind=i_def), allocatable :: cell_stencil(:) - integer(kind=i_def) nfaces_re_h + integer(kind=i_def) :: nfaces_re_h class(reference_element_type), pointer :: reference_element => null() ! ! Initialise field and/or operator proxies @@ -277,21 +277,21 @@ subroutine invoke_elim_helmholtz_operator_kernel_type(helmholtz_operator, hb_lum type(r_solver_operator_type), intent(in) :: div_star, m3_exner_star, Q32 integer(kind=i_def), intent(in) :: stencil_depth integer(kind=i_def) :: stencil_size - integer(kind=i_def) cell - integer(kind=i_def) nlayers - type(r_solver_operator_proxy_type) div_star_proxy, m3_exner_star_proxy, Q32_proxy - type(r_solver_field_proxy_type) helmholtz_operator_proxy(9) - type(r_solver_field_proxy_type) hb_lumped_inv_proxy, u_normalisation_proxy, & + integer(kind=i_def) :: cell + integer(kind=i_def) :: nlayers + type(r_solver_operator_proxy_type) :: div_star_proxy, m3_exner_star_proxy, Q32_proxy + type(r_solver_field_proxy_type) :: helmholtz_operator_proxy(9) + type(r_solver_field_proxy_type) :: hb_lumped_inv_proxy, u_normalisation_proxy, & w2_mask_proxy integer(kind=i_def), pointer :: map_w2(:,:) => null(), map_w3(:,:) => null() - integer(kind=i_def) ndf_w3, undf_w3, ndf_w2, undf_w2 + integer(kind=i_def) :: ndf_w3, undf_w3, ndf_w2, undf_w2 type(mesh_type), pointer :: mesh => null() - integer(kind=i_def) hb_lumped_inv_stencil_size + integer(kind=i_def) :: hb_lumped_inv_stencil_size integer(kind=i_def), pointer :: hb_lumped_inv_stencil_dofmap(:,:,:) => null() type(stencil_dofmap_type), pointer :: hb_lumped_inv_stencil_map => null() integer(kind=i_def) :: i integer(kind=i_def), allocatable :: cell_stencil(:) - integer(kind=i_def) nfaces_re_h + integer(kind=i_def) :: nfaces_re_h class(reference_element_type), pointer :: reference_element => null() ! ! Initialise field and/or operator proxies @@ -605,18 +605,18 @@ subroutine invoke_restrict_multidata_scalar_kernel_type(target_field, source_fie use mesh_mod, only: mesh_type type(field_type), intent(in) :: target_field, source_field integer(kind=i_def), intent(in) :: ndata - integer(kind=i_def) cell - integer(kind=i_def) loop0_start, loop0_stop - integer(kind=i_def) nlayers - type(field_proxy_type) target_field_proxy, source_field_proxy + integer(kind=i_def) :: cell + integer(kind=i_def) :: loop0_start, loop0_stop + integer(kind=i_def) :: nlayers + type(field_proxy_type) :: target_field_proxy, source_field_proxy integer(kind=i_def), pointer :: map_adspc1_target_field(:,:) => null(), map_adspc2_source_field(:,:) => 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) ncell_source_field, ncpc_source_field_target_field_x, ncpc_source_field_target_field_y + integer(kind=i_def) :: ndf_adspc1_target_field, undf_adspc1_target_field, ndf_adspc2_source_field, undf_adspc2_source_field + 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 diff --git a/science/gungho/source/psy/psykal_lite_transport_mod.F90 b/science/gungho/source/psy/psykal_lite_transport_mod.F90 index 5b67dc58a..13b778ede 100644 --- a/science/gungho/source/psy/psykal_lite_transport_mod.F90 +++ b/science/gungho/source/psy/psykal_lite_transport_mod.F90 @@ -326,10 +326,10 @@ end subroutine invoke_remap_on_extended_mesh_kernel_type !! Ticket #4302 will investigate replacing this with redundant computation SUBROUTINE invoke_deep_X_times_Y(field_1, field_2, field_3) TYPE(r_tran_field_type), intent(in) :: field_1, field_2, field_3 - INTEGER(KIND=i_def) depth, clean_depth, max_depth - INTEGER df - INTEGER(KIND=i_def) loop_start, loop_stop - TYPE(r_tran_field_proxy_type) field_1_proxy, field_2_proxy, field_3_proxy + INTEGER(KIND=i_def) :: depth, clean_depth, max_depth + INTEGER :: df + INTEGER(KIND=i_def) :: loop_start, loop_stop + TYPE(r_tran_field_proxy_type) :: field_1_proxy, field_2_proxy, field_3_proxy ! ! Initialise field and/or operator proxies ! @@ -377,10 +377,10 @@ END SUBROUTINE invoke_deep_X_times_Y !! Ticket #4302 will investigate replacing this with redundant computation SUBROUTINE invoke_deep_X_divideby_Y(field_1, field_2, field_3) TYPE(r_tran_field_type), intent(in) :: field_1, field_2, field_3 - INTEGER(KIND=i_def) depth, clean_depth, max_depth - INTEGER df - INTEGER(KIND=i_def) loop_start, loop_stop - TYPE(r_tran_field_proxy_type) field_1_proxy, field_2_proxy, field_3_proxy + INTEGER(KIND=i_def) :: depth, clean_depth, max_depth + INTEGER :: df + INTEGER(KIND=i_def) :: loop_start, loop_stop + TYPE(r_tran_field_proxy_type) :: field_1_proxy, field_2_proxy, field_3_proxy ! ! Initialise field and/or operator proxies ! @@ -432,13 +432,13 @@ END SUBROUTINE invoke_deep_X_divideby_Y SUBROUTINE invoke_deep_shift_mass(mass_shifted, mass_prime) USE sci_shift_mass_w3_kernel_mod, ONLY: shift_mass_w3_code TYPE(r_tran_field_type), intent(in) :: mass_shifted, mass_prime - INTEGER(KIND=i_def) depth, clean_depth, max_depth - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers - TYPE(r_tran_field_proxy_type) mass_shifted_proxy, mass_prime_proxy + INTEGER(KIND=i_def) :: depth, clean_depth, max_depth + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers + TYPE(r_tran_field_proxy_type) :: mass_shifted_proxy, mass_prime_proxy INTEGER(KIND=i_def), pointer :: map_adspc3_mass_shifted(:,:) => null(), map_w3(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc3_mass_shifted, undf_adspc3_mass_shifted, ndf_w3, undf_w3 + INTEGER(KIND=i_def) :: ndf_adspc3_mass_shifted, undf_adspc3_mass_shifted, ndf_w3, undf_w3 TYPE(mesh_type), pointer :: mesh => null() ! ! Initialise field and/or operator proxies @@ -535,9 +535,9 @@ SUBROUTINE invoke_panel_edge_remap_kernel_type( & panel_edge_dist(4), halo_mask_x, halo_mask_y INTEGER(KIND=i_def), intent(in) :: cross_depth_x, cross_depth_y INTEGER, intent(in) :: ffsl_depth - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_remapped_in_x + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_remapped_in_x INTEGER(KIND=i_def), pointer, dimension(:) :: panel_edge_dist_1_data => null(), & panel_edge_dist_2_data => null(), & panel_edge_dist_3_data => null(), & @@ -546,7 +546,7 @@ SUBROUTINE invoke_panel_edge_remap_kernel_type( & INTEGER(KIND=i_def), pointer, dimension(:) :: panel_edge_indices_x_data => null() INTEGER(KIND=i_def), pointer, dimension(:) :: halo_mask_x_data => null() INTEGER(KIND=i_def), pointer, dimension(:) :: halo_mask_y_data => null() - TYPE(integer_field_proxy_type) panel_edge_indices_x_proxy, panel_edge_indices_y_proxy, & + TYPE(integer_field_proxy_type) :: panel_edge_indices_x_proxy, panel_edge_indices_y_proxy, & panel_edge_dist_proxy(4), halo_mask_x_proxy, halo_mask_y_proxy REAL(KIND=r_tran), pointer, dimension(:) :: panel_edge_weights_y_data => null() REAL(KIND=r_tran), pointer, dimension(:) :: panel_edge_weights_x_data => null() @@ -554,20 +554,20 @@ SUBROUTINE invoke_panel_edge_remap_kernel_type( & REAL(KIND=r_tran), pointer, dimension(:) :: field_for_x_ptr_data => null() REAL(KIND=r_tran), pointer, dimension(:) :: remapped_in_y_data => null() REAL(KIND=r_tran), pointer, dimension(:) :: remapped_in_x_data => null() - TYPE(r_tran_field_proxy_type) remapped_in_x_proxy, remapped_in_y_proxy, & + TYPE(r_tran_field_proxy_type) :: remapped_in_x_proxy, remapped_in_y_proxy, & field_for_x_ptr_proxy, field_for_y_ptr_proxy, & panel_edge_weights_x_proxy, panel_edge_weights_y_proxy INTEGER(KIND=i_def), pointer :: map_adspc1_remapped_in_x(:,:) => null(), & map_adspc3_panel_edge_dist(:,:) => null(), & map_adspc5_panel_edge_weights_x(:,:) => null(), & map_adspc7_field_for_x_ptr(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc1_remapped_in_x, undf_adspc1_remapped_in_x, & + INTEGER(KIND=i_def) :: ndf_adspc1_remapped_in_x, undf_adspc1_remapped_in_x, & ndf_adspc7_field_for_x_ptr, undf_adspc7_field_for_x_ptr, & ndf_adspc5_panel_edge_weights_x, undf_adspc5_panel_edge_weights_x, & ndf_adspc3_panel_edge_dist, undf_adspc3_panel_edge_dist - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() - INTEGER(KIND=i_def) field_for_x_ptr_max_branch_length, field_for_y_ptr_max_branch_length + INTEGER(KIND=i_def) :: field_for_x_ptr_max_branch_length, field_for_y_ptr_max_branch_length INTEGER(KIND=i_def), pointer :: field_for_x_ptr_stencil_size(:,:) => null() INTEGER(KIND=i_def), pointer :: field_for_y_ptr_stencil_size(:,:) => null() INTEGER(KIND=i_def), pointer :: field_for_x_ptr_stencil_dofmap(:,:,:,:) => null() @@ -736,18 +736,18 @@ SUBROUTINE invoke_halo_mask_xy_kernel_type(halo_mask_x, halo_mask_y, halo_mask, TYPE(integer_field_type), intent(in) :: halo_mask_x, halo_mask_y, halo_mask INTEGER(KIND=i_def), intent(in) :: cross_depth INTEGER, intent(in) :: max_halo_depth - INTEGER(KIND=i_def) cell - INTEGER(KIND=i_def) loop0_start, loop0_stop - INTEGER(KIND=i_def) nlayers_halo_mask_x + INTEGER(KIND=i_def) :: cell + INTEGER(KIND=i_def) :: loop0_start, loop0_stop + INTEGER(KIND=i_def) :: nlayers_halo_mask_x INTEGER(KIND=i_def), pointer, dimension(:) :: halo_mask_data => null() INTEGER(KIND=i_def), pointer, dimension(:) :: halo_mask_y_data => null() INTEGER(KIND=i_def), pointer, dimension(:) :: halo_mask_x_data => null() - TYPE(integer_field_proxy_type) halo_mask_x_proxy, halo_mask_y_proxy, halo_mask_proxy + TYPE(integer_field_proxy_type) :: halo_mask_x_proxy, halo_mask_y_proxy, halo_mask_proxy INTEGER(KIND=i_def), pointer :: map_adspc3_halo_mask_x(:,:) => null() - INTEGER(KIND=i_def) ndf_adspc3_halo_mask_x, undf_adspc3_halo_mask_x - INTEGER(KIND=i_def) max_halo_depth_mesh + INTEGER(KIND=i_def) :: ndf_adspc3_halo_mask_x, undf_adspc3_halo_mask_x + INTEGER(KIND=i_def) :: max_halo_depth_mesh TYPE(mesh_type), pointer :: mesh => null() - INTEGER(KIND=i_def) halo_mask_max_branch_length + INTEGER(KIND=i_def) :: halo_mask_max_branch_length INTEGER(KIND=i_def), pointer :: halo_mask_stencil_size(:,:) => null() INTEGER(KIND=i_def), pointer :: halo_mask_stencil_dofmap(:,:,:,:) => null() TYPE(stencil_2D_dofmap_type), pointer :: halo_mask_stencil_map => null() From f17179eba6f1a2361fc295886d0c850764663664 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Wed, 3 Jun 2026 16:16:33 +0100 Subject: [PATCH 5/8] removed remaining unused preview rules --- applications/lfricinputs/fortitude.toml | 4 ++-- applications/shallow_water/fortitude.toml | 4 ++-- interfaces/jedi_lfric_interface/fortitude.toml | 4 ++-- interfaces/physics_schemes_interface/fortitude.toml | 4 ++-- rose-stem/app/check_fortitude_linter/file/fortitude.toml | 4 ++-- science/adjoint/fortitude.toml | 4 ++-- science/gungho/fortitude.toml | 4 ++-- science/linear/fortitude.toml | 4 ++-- science/physics_schemes/fortitude.toml | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/applications/lfricinputs/fortitude.toml b/applications/lfricinputs/fortitude.toml index 8689e9b2e..d92bd902a 100644 --- a/applications/lfricinputs/fortitude.toml +++ b/applications/lfricinputs/fortitude.toml @@ -9,8 +9,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C071", "C072", "C091", "C082", "C092", "C121", +select = ["E000", "E001", "C001", "C021", "C022", +"C071", "C072", "C091", "C092", "C121", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/applications/shallow_water/fortitude.toml b/applications/shallow_water/fortitude.toml index 2b5fb5ed6..c8adc1d94 100644 --- a/applications/shallow_water/fortitude.toml +++ b/applications/shallow_water/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C061", "C071", "C072", "C081", "C091", "C082", "C092", +select = ["E000", "C001", "C021", "C022", +"C061", "C071", "C072", "C081", "C091", "C092", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/interfaces/jedi_lfric_interface/fortitude.toml b/interfaces/jedi_lfric_interface/fortitude.toml index a987e3972..c57c72db3 100644 --- a/interfaces/jedi_lfric_interface/fortitude.toml +++ b/interfaces/jedi_lfric_interface/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C061", "C071", "C072", "C091", "C082", "C092", +select = ["E000", "C001", "C021", "C022", +"C061", "C071", "C072", "C091", "C092", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/interfaces/physics_schemes_interface/fortitude.toml b/interfaces/physics_schemes_interface/fortitude.toml index 12b05e409..43edadd53 100644 --- a/interfaces/physics_schemes_interface/fortitude.toml +++ b/interfaces/physics_schemes_interface/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "S101", "C001", "C031", "C032", "C043", -"C051", "C071", "C072", "C091", "C082", "C092", +select = ["E000", "S101", "C001", +"C071", "C072", "C091", "C092", "C132", "C141", "S071", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 102cb61df..5aa4cf532 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -19,7 +19,7 @@ select = ["E000", "E001", "C001", "C021", "C022", "C061", "C071", "C072", # 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, C061 missing-intent, C071 assumed-size, +# C061 missing-intent, 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, @@ -96,7 +96,7 @@ output-format = "grouped" #group results by file # Rules that pass for whole Lfric repo with no exceptions: -# E000, C031, C032, C043, C051, C091, C082, C141, +# E000, C031, C032, C043, C091, C082, C141, # OB011, OB021, OB051, OB061, MOD001, PORT011, PORT012, # PORT021, FORT001, FORT002, FORT003, FORT004, FORT005 diff --git a/science/adjoint/fortitude.toml b/science/adjoint/fortitude.toml index e84afded5..f71cb6a09 100644 --- a/science/adjoint/fortitude.toml +++ b/science/adjoint/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "E001", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C061", "C071", "C072", "C081", "C091", "C082", "C092", "C121", +select = ["E000", "E001", "C001", "C021", "C022", +"C061", "C071", "C072", "C081", "C091", "C092", "C121", "C132", "C141", "S071", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/science/gungho/fortitude.toml b/science/gungho/fortitude.toml index c482f5acb..91c3db6d7 100644 --- a/science/gungho/fortitude.toml +++ b/science/gungho/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "C021", "C022", "C031", "C032", "C043", -"C051", "C071", "C072", "C091", "C082", "C092", +select = ["E000", "C021", "C022", +"C071", "C072", "C091", "C092", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/science/linear/fortitude.toml b/science/linear/fortitude.toml index b56823cc1..59de2462d 100644 --- a/science/linear/fortitude.toml +++ b/science/linear/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "C001", "C021", "C022", "C031", "C032", "C043", -"C051", "C061", "C071", "C072", "C091", "C082", "C092", +select = ["E000", "C001", "C021", "C022", +"C061", "C071", "C072", "C091", "C092", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] diff --git a/science/physics_schemes/fortitude.toml b/science/physics_schemes/fortitude.toml index 7a89b4edf..17c1b9949 100644 --- a/science/physics_schemes/fortitude.toml +++ b/science/physics_schemes/fortitude.toml @@ -8,8 +8,8 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "E001", "C001", "C031", "C032", "C043", -"C051", "C071", "C072", "C081", "C091", "C082", "C092", "C121", +select = ["E000", "E001", "C001", +"C071", "C072", "C081", "C091", "C092", "C121", "C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", "S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", "FORT002", "FORT003", "FORT004", "FORT005"] From 401c90eff48683f6f8de196399aeda8789555de0 Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Thu, 4 Jun 2026 15:41:41 +0100 Subject: [PATCH 6/8] removed comments --- rose-stem/app/check_fortitude_linter/file/fortitude.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index 5aa4cf532..c03d22b85 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -17,12 +17,11 @@ select = ["E000", "E001", "C001", "C021", "C022", "C061", "C071", "C072", # 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, +# C022 implicit-real-kind, # C061 missing-intent, 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, +# 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, @@ -96,7 +95,7 @@ output-format = "grouped" #group results by file # Rules that pass for whole Lfric repo with no exceptions: -# E000, C031, C032, C043, C091, C082, C141, +# E000, C091, C141, # OB011, OB021, OB051, OB061, MOD001, PORT011, PORT012, # PORT021, FORT001, FORT002, FORT003, FORT004, FORT005 From 8d7dcb74a0c6acf15e9b84f084a6be8ad349b0de Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Fri, 5 Jun 2026 16:25:52 +0100 Subject: [PATCH 7/8] post update error fix --- .../source/algorithm/process_send_fields_2d_mod.X90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 b/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 index 0e2be82bf..0aabb9cb8 100644 --- a/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 +++ b/interfaces/coupled_interface/source/algorithm/process_send_fields_2d_mod.X90 @@ -105,7 +105,7 @@ module process_send_fields_2d_mod ! the field was written to the restart file so we set r_acc_step=1 ! as we still need to divide by sea-ice fraction and copy values from ! depository field (dep_fld) to fld ready for coupling. - ! In this case acc_step will have been set to zero + ! In this case acc_step will have been set to zero ! so we can use this as a test. call modeldb%values%get_value( 'accumulation_steps', acc_step ) From 8d928bf1880ae333a8c7049012599fb0d6b933fd Mon Sep 17 00:00:00 2001 From: mo-lucy-gordon Date: Wed, 10 Jun 2026 11:20:14 +0100 Subject: [PATCH 8/8] restructured select rules and descriptors --- .../file/fortitude.toml | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/rose-stem/app/check_fortitude_linter/file/fortitude.toml b/rose-stem/app/check_fortitude_linter/file/fortitude.toml index c03d22b85..6ed0db715 100644 --- a/rose-stem/app/check_fortitude_linter/file/fortitude.toml +++ b/rose-stem/app/check_fortitude_linter/file/fortitude.toml @@ -8,29 +8,37 @@ file-extensions= ["f90", "F90", "X90", "x90", "pf"] #check these file types -select = ["E000", "E001", "C001", "C021", "C022", "C061", "C071", "C072", -"C081", "C091", "C092", "C121", -"C132", "C141", "OB011", "OB021", "OB051", "OB061", "MOD001", "MOD021", -"S101", "S071", "PORT011", "PORT012", "PORT021", "FORT001", -"FORT002", "FORT003", "FORT004", "FORT005"] - -# 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, -# C061 missing-intent, C071 assumed-size, -# C072 character has assumed size but does not have intent(in), -# C081 initialisation-in-declaration, C091 external-procedure, -# 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 +select = [ +"E000", # io-error, +"E001", # syntax-error +"C001", # missing implicit none +"C021", # real literal missing kind suffix +"C022", # implicit-real-kind +"C061", # missing-intent +"C071", # assumed-size variables +"C072", # character has assumed size but does not have intent(in) +"C081", # initialisation-in-declaration and no explicit save/parameter +"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 @@ -93,9 +101,3 @@ output-format = "grouped" #group results by file "atlt_derive_exner_from_eos_alg_mod.x90" = ["C132"] "adjt_compute_vorticity_alg_mod.x90" = ["C132"] - -# Rules that pass for whole Lfric repo with no exceptions: -# E000, C091, C141, -# OB011, OB021, OB051, OB061, MOD001, PORT011, PORT012, -# PORT021, FORT001, FORT002, FORT003, FORT004, FORT005 -