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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 |
| mike-hobson | Mike Hobson | Met Office | 2025-12-17 |
| mo-marqh | mark Hedley | Met Office | 2025-12-11 |
| mo-rickywong | Ricky Wong | Met Office | 2026-02-03 |
| yaswant | Yaswant Pradhan | Met Office | 2025-12-16 |
| oakleybrunt | Oakley Brunt | Met Office | 2025-12-19 |
| harry-shepherd | Harry Shepherd | Met Office | 2026-01-08 |
Expand Down
4 changes: 3 additions & 1 deletion applications/adjoint_tests/source/adjoint_tests.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ program adjoint_tests
modeldb%mpi => global_mpi

call modeldb%configuration%initialise( application_name, table_len=10 )
call modeldb%config%initialise( application_name )

call modeldb%values%initialise('values', 5)

Expand All @@ -65,7 +66,8 @@ program adjoint_tests
call init_comm( application_name, modeldb )

call init_config( filename, gungho_required_namelists, &
modeldb%configuration )
configuration=modeldb%configuration, &
config=modeldb%config )
call init_logger( modeldb%mpi%get_comm(), application_name )

io_nml => modeldb%configuration%get_namelist('io')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ subroutine initialise_infrastructure( program_name, &
apply_partition_check = .true.
end if

call init_mesh( modeldb%configuration, &
modeldb%mpi%get_comm_rank(), &
modeldb%mpi%get_comm_size(), &
base_mesh_names, &
extrusion, stencil_depth, &
call init_mesh( modeldb%config, &
modeldb%mpi%get_comm_rank(), &
modeldb%mpi%get_comm_size(), &
base_mesh_names, &
extrusion, stencil_depth, &
apply_partition_check )

allocate( twod_names, source=base_mesh_names )
Expand Down
5 changes: 4 additions & 1 deletion applications/gravity_wave/source/gravity_wave.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ program gravity_wave
call parse_command_line( filename )

call modeldb%configuration%initialise( program_name, table_len=10 )
call modeldb%config%initialise( program_name )

modeldb%mpi => global_mpi
call init_comm( program_name, modeldb )
call init_config( filename, gravity_wave_required_namelists, &
modeldb%configuration )
configuration=modeldb%configuration, &
config=modeldb%config )

deallocate( filename )

call init_logger( modeldb%mpi%get_comm(), program_name )
Expand Down
4 changes: 3 additions & 1 deletion applications/gungho_model/source/gungho_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ program gungho_model

call modeldb%configuration%initialise( application_name, &
table_len=10 )
call modeldb%config%initialise( application_name )
call modeldb%values%initialise( 'values', 5 )

! Create the depository, prognostics and diagnostics field collections
Expand All @@ -75,7 +76,8 @@ program gungho_model
call init_comm( application_name, modeldb )

call init_config( filename, gungho_required_namelists, &
modeldb%configuration )
configuration=modeldb%configuration, &
config=modeldb%config )
call init_logger( modeldb%mpi%get_comm(), application_name )
io_nml => modeldb%configuration%get_namelist('io')
call io_nml%get_value('subroutine_timers', lsubroutine_timers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ program algorithm_test
use add_mesh_map_mod, only: assign_mesh_maps
use configuration_mod, only: final_configuration, &
read_configuration
use config_mod, only: config_type
use constants_mod, only: i_def, r_def, str_def, l_def
use create_mesh_mod, only: create_extrusion, create_mesh
use test_algorithm_mod, only: test_algorithm_finalise, &
Expand Down Expand Up @@ -52,6 +53,7 @@ program algorithm_test
character(:), allocatable :: filename

type(namelist_collection_type), save :: configuration
type(config_type), save :: config

! Variables used for parsing command line arguments
integer :: length, status, nargs
Expand Down Expand Up @@ -145,7 +147,10 @@ program algorithm_test

! Setup configuration, mesh, and fem
call configuration%initialise( program_name, table_len=10 )
call read_configuration( filename, configuration )
call config%initialise( program_name )
call read_configuration( filename, &
configuration=configuration, &
config=config )

call init_collections()

Expand Down Expand Up @@ -199,7 +204,7 @@ program algorithm_test
!-------------------------------------------------------------------------
stencil_depth = 1
apply_partition_check = .false.
call init_mesh( configuration, &
call init_mesh( config, &
local_rank, total_ranks, &
base_mesh_names, extrusion, &
stencil_depth, &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module jedi_geometry_mod
use, intrinsic :: iso_fortran_env, only : real64

use calendar_mod, only : calendar_type
use config_mod, only : config_type
use constants_mod, only : i_def, l_def, str_def, &
r_second, i_timestep
use extrusion_mod, only : extrusion_type, TWOD
Expand Down Expand Up @@ -92,9 +93,8 @@ module jedi_geometry_mod

!> @brief Initialiser for jedi_geometry_type
!>
subroutine initialise( self, mpi_comm, configuration )
subroutine initialise( self, mpi_comm, configuration, config )
! Access config directly until modeldb ready
use driver_mesh_mod, only: init_mesh
use driver_config_mod, only: init_config
use jedi_lfric_mesh_setup_mod, only: initialise_mesh
use jedi_lfric_tests_mod, only: jedi_lfric_tests_required_namelists
Expand All @@ -104,6 +104,7 @@ subroutine initialise( self, mpi_comm, configuration )
class( jedi_geometry_type ), intent(inout) :: self
integer( kind=i_def ), intent(in) :: mpi_comm
type(namelist_collection_type), intent(in) :: configuration
type(config_type), intent(in) :: config

! Local
type(mesh_type), pointer :: mesh
Expand All @@ -121,7 +122,7 @@ subroutine initialise( self, mpi_comm, configuration )

! Setup mesh
mpi_obj = self%get_mpi_comm()
call initialise_mesh( self%mesh_name, configuration, mpi_obj )
call initialise_mesh( self%mesh_name, configuration, config, mpi_obj )

geometry_configuration => configuration%get_namelist('jedi_geometry')
! Setup the IO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
!
module jedi_run_mod

use config_mod, only : config_type
use constants_mod, only : i_def, l_def, str_def
use namelist_collection_mod, only : namelist_collection_type

Expand All @@ -21,6 +22,7 @@ module jedi_run_mod
private
character(str_def) :: jedi_run_name
type(namelist_collection_type) :: configuration
type(config_type) :: config
logical(kind=l_def) :: timers_finalised

contains
Expand All @@ -34,6 +36,9 @@ module jedi_run_mod
!> Get a pointer to the stored configuration.
procedure, public :: get_configuration

!> Get a pointer to the stored config
procedure, public :: get_config

!> Just finalise subroutine timing; to get useful timing statistics from failed adjoint tests
procedure, public :: finalise_timers

Expand Down Expand Up @@ -109,13 +114,15 @@ subroutine initialise_infrastructure( self, filename, model_communicator )

! Initialise the configuration
call self%configuration%initialise( self%jedi_run_name, table_len=10 )
call self%config%initialise( self%jedi_run_name )

! Initialise the model communicator to setup global_mpi
call init_internal_comm( model_communicator )

! Setup the config which is curently global
call init_config( filename, jedi_lfric_tests_required_namelists, &
self%configuration )
configuration=self%configuration, &
config=self%config )

! Initialise the logger
call lfric_comm%set_comm_mpi_val(model_communicator)
Expand Down Expand Up @@ -144,6 +151,19 @@ function get_configuration(self) result(configuration)

end function get_configuration

!> @brief Get pointer to the stored configuration
!>
!> @return config A pointer to the configuration
function get_config(self) result(config)

class( jedi_run_type ), target, intent(inout) :: self

type( config_type ), pointer :: config

config => self%config

end function get_config

!> @brief Just finalise subroutine timing; to get useful timing statistics from failed adjoint tests
!>
subroutine finalise_timers(self)
Expand Down
5 changes: 4 additions & 1 deletion applications/jedi_lfric_tests/source/jedi_forecast.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
program jedi_forecast

use cli_mod, only : parse_command_line
use config_mod, only : config_type
use constants_mod, only : PRECISION_REAL, i_def, str_def
use field_collection_mod, only : field_collection_type
use log_mod, only : log_event, log_scratch_space, &
Expand Down Expand Up @@ -47,6 +48,7 @@ program jedi_forecast

! Local
type( namelist_collection_type ), pointer :: configuration
type( config_type ), pointer :: config
character(:), allocatable :: filename
integer( i_def ) :: model_communicator
type( jedi_duration_type ) :: forecast_length
Expand Down Expand Up @@ -76,14 +78,15 @@ program jedi_forecast

! Get the configuration
configuration => jedi_run%get_configuration()
config => jedi_run%get_config()

! Get the forecast length
jedi_lfric_settings_config => configuration%get_namelist('jedi_lfric_settings')
call jedi_lfric_settings_config%get_value( 'forecast_length', forecast_length_str )
call forecast_length%init(forecast_length_str)

! Create geometry
call jedi_geometry%initialise( model_communicator, configuration )
call jedi_geometry%initialise( model_communicator, configuration, config )

! Create state (requires the configuration file name to setup the modeldb)
call jedi_state%initialise( jedi_geometry, configuration, filename )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
program jedi_forecast_pseudo

use cli_mod, only : parse_command_line
use config_mod, only : config_type
use constants_mod, only : PRECISION_REAL, i_def, str_def
use field_collection_mod, only : field_collection_type
use log_mod, only : log_event, log_scratch_space, &
Expand Down Expand Up @@ -47,6 +48,8 @@ program jedi_forecast_pseudo

! Local
type( namelist_collection_type ), pointer :: configuration
type( config_type ), pointer :: config

character(:), allocatable :: filename
integer(i_def) :: model_communicator
type( jedi_duration_type ) :: forecast_length
Expand Down Expand Up @@ -75,14 +78,15 @@ program jedi_forecast_pseudo

! Get the configuration
configuration => jedi_run%get_configuration()
config => jedi_run%get_config()

! Get the forecast length
jedi_lfric_settings_config => configuration%get_namelist('jedi_lfric_settings')
call jedi_lfric_settings_config%get_value( 'forecast_length', forecast_length_str )
call forecast_length%init(forecast_length_str)

! Create geometry
call jedi_geometry%initialise( model_communicator, configuration )
call jedi_geometry%initialise( model_communicator, configuration, config )

! Create state
call jedi_state%initialise( jedi_geometry, configuration )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
program jedi_id_tlm_tests

use cli_mod, only : parse_command_line
use config_mod, only : config_type
use constants_mod, only : PRECISION_REAL, i_def, str_def, r_def
use field_collection_mod, only : field_collection_type
use log_mod, only : log_event, log_scratch_space, &
Expand Down Expand Up @@ -81,6 +82,8 @@ program jedi_id_tlm_tests

! Local
type( namelist_collection_type ), pointer :: configuration
type( config_type ), pointer :: config

character(:), allocatable :: filename
integer( kind=i_def ) :: model_communicator
type( jedi_duration_type ) :: forecast_length
Expand Down Expand Up @@ -115,14 +118,15 @@ program jedi_id_tlm_tests

! Get the configuration
configuration => run%get_configuration()
config => run%get_config()

! Get the forecast length
jedi_lfric_settings_config => configuration%get_namelist('jedi_lfric_settings')
call jedi_lfric_settings_config%get_value( 'forecast_length', forecast_length_str )
call forecast_length%init(forecast_length_str)

! Create geometry
call geometry%initialise( model_communicator, configuration )
call geometry%initialise( model_communicator, configuration, config )

! Create state
call state%initialise( geometry, configuration )
Expand Down
5 changes: 4 additions & 1 deletion applications/jedi_lfric_tests/source/jedi_lfric_tests.f90
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ program jedi_lfric_tests
modeldb%mpi => global_mpi

call modeldb%configuration%initialise( application_name, table_len=10 )
call modeldb%config%initialise( application_name )

call modeldb%values%initialise('values', 5)

Expand All @@ -68,7 +69,9 @@ program jedi_lfric_tests
call init_comm( application_name, modeldb )

call init_config( filename, gungho_required_namelists, &
modeldb%configuration )
configuration=modeldb%configuration, &
config=modeldb%config )

call init_logger( modeldb%mpi%get_comm(), application_name )
io_nml => modeldb%configuration%get_namelist('io')
call io_nml%get_value('subroutine_timers', lsubroutine_timers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
program jedi_tlm_forecast_tl

use cli_mod, only : parse_command_line
use config_mod, only : config_type
use constants_mod, only : PRECISION_REAL, i_def, str_def
use field_collection_mod, only : field_collection_type
use log_mod, only : log_event, log_scratch_space, &
Expand Down Expand Up @@ -53,6 +54,8 @@ program jedi_tlm_forecast_tl

! Local
type( namelist_collection_type ), pointer :: configuration
type( config_type ), pointer :: config

character(:), allocatable :: filename
integer( kind=i_def ) :: model_communicator
type( jedi_duration_type ) :: forecast_length
Expand Down Expand Up @@ -81,14 +84,15 @@ program jedi_tlm_forecast_tl

! Get the configuration
configuration => jedi_run%get_configuration()
config => jedi_run%get_config()

! Get the forecast length
jedi_lfric_settings_config => configuration%get_namelist('jedi_lfric_settings')
call jedi_lfric_settings_config%get_value( 'forecast_length', forecast_length_str )
call forecast_length%init(forecast_length_str)

! Create geometry
call jedi_geometry%initialise( model_communicator, configuration )
call jedi_geometry%initialise( model_communicator, configuration, config )

! Create state
call jedi_state%initialise( jedi_geometry, configuration )
Expand Down
5 changes: 4 additions & 1 deletion applications/jedi_lfric_tests/source/jedi_tlm_tests.f90
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
program jedi_tlm_tests

use cli_mod, only : parse_command_line
use config_mod, only : config_type
use constants_mod, only : PRECISION_REAL, i_def, str_def, r_def
use field_collection_mod, only : field_collection_type
use log_mod, only : log_event, log_scratch_space, &
Expand Down Expand Up @@ -67,6 +68,7 @@ program jedi_tlm_tests

! Local
type( namelist_collection_type ), pointer :: configuration
type( config_type ), pointer :: config
character(:), allocatable :: filename
integer( kind=i_def ) :: model_communicator
type( jedi_duration_type ) :: forecast_length
Expand Down Expand Up @@ -101,14 +103,15 @@ program jedi_tlm_tests

! Get the configuration
configuration => run%get_configuration()
config => run%get_config()

! Get the forecast length
jedi_lfric_settings_config => configuration%get_namelist('jedi_lfric_settings')
call jedi_lfric_settings_config%get_value( 'forecast_length', forecast_length_str )
call forecast_length%init(forecast_length_str)

! Create geometry
call geometry%initialise( model_communicator, configuration )
call geometry%initialise( model_communicator, configuration, config )

! Create state
call state%initialise( geometry, configuration )
Expand Down
Loading
Loading