From 121d1dc9566f9cd56c846c147557fef13460dffe Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Fri, 9 Jan 2026 09:35:55 +0000 Subject: [PATCH 01/17] Use the lfric_core with new config api --- dependencies.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index 473a2c6ee..43552fbed 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,8 +30,8 @@ lfric_apps: ref: lfric_core: - source: git@github.com:MetOffice/lfric_core.git - ref: 5d4d72f0e35f00e71b1757df6beadec21ece97f0 + source: git@github.com:mo-rickywong/lfric_core.git + ref: ConfigTypeAccess moci: source: git@github.com:MetOffice/moci.git From 9521e1d2abc0ecb1f3f5ae6f140603578c131729 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Fri, 9 Jan 2026 23:05:44 +0000 Subject: [PATCH 02/17] Port as much across to new api without incurring a linked ticket --- .../adjoint_tests/source/adjoint_tests.f90 | 5 +- .../source/algorithm/gravity_wave_alg_mod.x90 | 42 +++++--------- .../gravity_wave_infrastructure_mod.f90 | 38 +++--------- .../gravity_wave/source/gravity_wave.f90 | 4 +- .../analytic_buoyancy_profiles_mod_test.pf | 2 +- .../compute_q_operator_kernel_mod_test.pf | 2 +- .../initial_buoyancy_kernel_mod_test.pf | 4 +- .../gungho_model/source/gungho_model.f90 | 5 +- .../algorithm/algorithm_test.f90 | 34 +++++------ .../jedi-interface/jedi_checksum_mod.f90 | 10 ++-- .../source/jedi-interface/jedi_run_mod.f90 | 23 +++++++- .../source/jedi_lfric_tests.f90 | 5 +- applications/jules/source/jules.f90 | 6 +- .../source/driver/lfric2lfric_driver_mod.F90 | 22 +++---- .../lfric2lfric_infrastructure_mod.X90 | 44 ++++++-------- .../lfric2lfric/source/lfric2lfric.F90 | 6 +- applications/lfric_atm/source/lfric_atm.f90 | 12 ++-- .../lfric_coupled/source/lfric_coupled.f90 | 5 +- .../common/lfricinp_lfric_driver_mod.f90 | 37 ++++++------ .../linear_model/source/linear_model.f90 | 5 +- .../driver/name_transport_driver_mod.f90 | 37 ++++-------- .../name_transport/source/name_transport.f90 | 5 +- .../analytic_name_field_profiles_mod_test.pf | 2 +- .../kernel/set_name_field_kernel_mod_test.pf | 4 +- applications/ngarch/source/ngarch.f90 | 8 ++- .../source/driver/shallow_water_model_mod.F90 | 26 ++------- .../shallow_water/source/shallow_water.f90 | 6 +- .../analytic_geopot_profiles_mod_test.pf | 2 +- ...analytic_swe_buoyancy_profiles_mod_test.pf | 2 +- ...ic_swe_streamfunction_profiles_mod_test.pf | 2 +- .../analytic_swe_wind_profiles_mod_test.pf | 2 +- .../galewsky_test_case_mod_test.pf | 2 +- .../kernel/initial_geopot_kernel_mod_test.pf | 4 +- .../initial_swe_buoyancy_kernel_mod_test.pf | 4 +- .../initial_swe_tracer_kernel_mod_test.pf | 2 +- .../kernel/initial_swe_u_kernel_mod_test.pf | 4 +- ...buoyancy_gradient_facet_kernel_mod_test.pf | 2 +- applications/solver/source/solver.F90 | 37 +++++------- .../source/driver/transport_driver_mod.f90 | 58 +++++-------------- applications/transport/source/transport.f90 | 7 ++- ...analytic_tracer_field_profiles_mod_test.pf | 2 +- ...ial_tracer_field_sample_kernel_mod_test.pf | 2 +- .../set_tracer_field_kernel_mod_test.pf | 4 +- .../jedi_lfric_linear_modeldb_driver_mod.f90 | 5 +- .../nl/jedi_lfric_nl_modeldb_driver_mod.f90 | 5 +- .../timestepping/atl_si_timestep_alg_mod.x90 | 9 +-- .../integration-test/cma_test/cma_test.f90 | 39 ++++++------- .../limited_area/init_gungho_lbcs_alg_mod.x90 | 11 +--- .../semi_implicit_timestep_alg_mod.X90 | 32 ++++------ .../gungho/source/driver/gungho_model_mod.F90 | 44 ++++---------- .../iau_multifile_io/iau_firstfile_io_mod.F90 | 29 ++++------ .../runge_kutta/runge_kutta.f90 | 8 ++- .../semi_implicit/semi_implicit.f90 | 8 ++- .../timestepping/tl_si_timestep_alg_mod.x90 | 8 +-- .../source/driver/linear_driver_mod.f90 | 51 +++++----------- 55 files changed, 322 insertions(+), 462 deletions(-) diff --git a/applications/adjoint_tests/source/adjoint_tests.f90 b/applications/adjoint_tests/source/adjoint_tests.f90 index 5fa5b2232..06e9ccf45 100644 --- a/applications/adjoint_tests/source/adjoint_tests.f90 +++ b/applications/adjoint_tests/source/adjoint_tests.f90 @@ -38,6 +38,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) @@ -59,7 +60,9 @@ 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 ) call init_collections() call init_time( modeldb ) diff --git a/applications/gravity_wave/source/algorithm/gravity_wave_alg_mod.x90 b/applications/gravity_wave/source/algorithm/gravity_wave_alg_mod.x90 index f5a9bbd93..7a0fcd983 100644 --- a/applications/gravity_wave/source/algorithm/gravity_wave_alg_mod.x90 +++ b/applications/gravity_wave/source/algorithm/gravity_wave_alg_mod.x90 @@ -18,7 +18,6 @@ module gravity_wave_alg_mod LOG_LEVEL_INFO, & LOG_LEVEL_ERROR, & LOG_LEVEL_TRACE - use namelist_mod, only: namelist_type ! Configuration options use finite_element_config_mod, only: element_order_h, element_order_v @@ -496,7 +495,6 @@ contains use transpose_matrix_vector_kernel_mod, only: transpose_matrix_vector_kernel_type use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type use fs_continuity_mod, only: W0, W2, W3, Wtheta - use boundaries_config_mod, only: limited_area implicit none @@ -513,34 +511,23 @@ contains type( field_type ) :: rhs_p type(mesh_type), pointer :: mesh => null() - ! Namelists - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: timestepping_nml - type(namelist_type), pointer :: initial_temperature_nml - type(namelist_type), pointer :: gravity_wave_constants_nml - type(namelist_type), pointer :: io_nml - ! Namelist parameters - character(len=str_def) :: prime_mesh_name - real(kind=r_second) :: dt - real(kind=r_def) :: bvf_square - integer(kind=i_def) :: b_space - logical(kind=l_def) :: subroutine_timers + character(str_def) :: prime_mesh_name + real(r_second) :: dt + real(r_def) :: bvf_square + integer(i_def) :: b_space + logical(l_def) :: subroutine_timers + logical(l_def) :: limited_area ! Auxiliary constants to group invokes real(kind=r_def) :: const1, const2 - if ( subroutine_timers ) call timer('gravity_wave_alg') - - ! Pointers to namelists - timestepping_nml => modeldb%configuration%get_namelist('timestepping') - initial_temperature_nml => modeldb%configuration%get_namelist('initial_temperature') - io_nml => modeldb%configuration%get_namelist('io') + dt = modeldb%config%timestepping%dt() + bvf_square = modeldb%config%initial_temperature%bvf_square() + subroutine_timers = modeldb%config%io%subroutine_timers() + limited_area = modeldb%config%boundaries%limited_area() - ! Obtain namelist parameters - call timestepping_nml%get_value( 'dt', dt ) - call initial_temperature_nml%get_value( 'bvf_square', bvf_square ) - call io_nml%get_value( 'subroutine_timers', subroutine_timers ) + if ( subroutine_timers ) call timer('gravity_wave_alg') !=== Do a single timestep ==============================================! mesh => wind%get_mesh() @@ -548,10 +535,9 @@ contains m3_inv => get_inverse_mass_matrix_fe(W3, mesh%get_id()) if ( limited_area ) then - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - gravity_wave_constants_nml => modeldb%configuration%get_namelist('gravity_wave_constants') - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call gravity_wave_constants_nml%get_value( 'b_space', b_space ) + + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + b_space = modeldb%config%gravity_wave_constants%b_space() select case(b_space) case(b_space_w0) diff --git a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 index 46b88ddad..c19930b51 100644 --- a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 +++ b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 @@ -30,7 +30,6 @@ module gravity_wave_infrastructure_mod LOG_LEVEL_ALWAYS, & LOG_LEVEL_ERROR use mesh_collection_mod, only : mesh_collection - use namelist_mod, only : namelist_type use field_mod, only : field_type use driver_fem_mod, only : init_fem, init_function_space_chains use driver_io_mod, only : init_io, final_io @@ -89,43 +88,24 @@ subroutine initialise_infrastructure( program_name, & real(r_def) :: domain_height real(r_def) :: scaled_radius - type(namelist_type), pointer :: base_mesh_nml => null() - type(namelist_type), pointer :: formulation_nml => null() - type(namelist_type), pointer :: extrusion_nml => null() - type(namelist_type), pointer :: planet_nml => null() - type(namelist_type), pointer :: multigrid_nml => null() - integer(i_def) :: i integer(i_def), parameter :: one_layer = 1_i_def !======================================================================= ! 0.0 Extract configuration variables !======================================================================= - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - formulation_nml => modeldb%configuration%get_namelist('formulation') - extrusion_nml => modeldb%configuration%get_namelist('extrusion') - planet_nml => modeldb%configuration%get_namelist('planet') - - call formulation_nml%get_value( 'l_multigrid', l_multigrid ) - + l_multigrid = modeldb%config%formulation%l_multigrid() if (l_multigrid) then - multigrid_nml => modeldb%configuration%get_namelist('multigrid') - call multigrid_nml%get_value( 'chain_mesh_tags', chain_mesh_tags ) - multigrid_nml => null() + chain_mesh_tags = modeldb%config%multigrid%chain_mesh_tags() end if - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - - base_mesh_nml => null() - extrusion_nml => null() - formulation_nml => null() - planet_nml => null() + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + geometry = modeldb%config%base_mesh%geometry() + prepartitioned = modeldb%config%base_mesh%prepartitioned() + method = modeldb%config%extrusion%method() + domain_height = modeldb%config%extrusion%domain_height() + number_of_layers = modeldb%config%extrusion%number_of_layers() + scaled_radius = modeldb%config%planet%scaled_radius() !------------------------------------------------------------------------- ! Initialise infrastructure diff --git a/applications/gravity_wave/source/gravity_wave.f90 b/applications/gravity_wave/source/gravity_wave.f90 index e1a988dd0..7fb067f84 100644 --- a/applications/gravity_wave/source/gravity_wave.f90 +++ b/applications/gravity_wave/source/gravity_wave.f90 @@ -35,11 +35,13 @@ 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 ) diff --git a/applications/gravity_wave/unit-test/initialisation/analytic_buoyancy_profiles_mod_test.pf b/applications/gravity_wave/unit-test/initialisation/analytic_buoyancy_profiles_mod_test.pf index 743fdf381..5c7e44646 100644 --- a/applications/gravity_wave/unit-test/initialisation/analytic_buoyancy_profiles_mod_test.pf +++ b/applications/gravity_wave/unit-test/initialisation/analytic_buoyancy_profiles_mod_test.pf @@ -116,7 +116,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf b/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf index e4337c084..2b0edf682 100644 --- a/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf +++ b/applications/gravity_wave/unit-test/kernel/compute_q_operator_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine tearDown( this ) - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf index 8a3ca705d..8b18ba861 100644 --- a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf +++ b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf @@ -85,8 +85,8 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration - use sci_chi_transform_mod, only: final_chi_transforms + use config_loader_mod, only: final_configuration + use sci_chi_transform_mod, only: final_chi_transforms implicit none diff --git a/applications/gungho_model/source/gungho_model.f90 b/applications/gungho_model/source/gungho_model.f90 index da2050f69..50d4b2170 100644 --- a/applications/gungho_model/source/gungho_model.f90 +++ b/applications/gungho_model/source/gungho_model.f90 @@ -47,6 +47,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 @@ -70,7 +71,9 @@ 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 ) call init_timers( application_name ) call init_collections() diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 index 9748e3f94..4b4614f1c 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 @@ -13,8 +13,9 @@ program algorithm_test use add_mesh_map_mod, only: assign_mesh_maps - use configuration_mod, only: final_configuration, & + use config_loader_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, & @@ -36,7 +37,6 @@ program algorithm_test LOG_LEVEL_ERROR, & LOG_LEVEL_INFO use namelist_collection_mod, only: namelist_collection_type - use namelist_mod, only: namelist_type use base_mesh_config_mod, only: GEOMETRY_SPHERICAL, & GEOMETRY_PLANAR @@ -52,6 +52,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 @@ -76,10 +77,6 @@ program algorithm_test real(r_def) :: domain_height real(r_def) :: scaled_radius - type(namelist_type), pointer :: base_mesh_nml => null() - type(namelist_type), pointer :: planet_nml => null() - type(namelist_type), pointer :: extrusion_nml => null() - integer(i_def) :: i integer(i_def), parameter :: one_layer = 1_i_def @@ -145,27 +142,22 @@ 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() !-------------------------------------- ! 0.0 Extract namelist variables !-------------------------------------- - base_mesh_nml => configuration%get_namelist('base_mesh') - planet_nml => configuration%get_namelist('planet') - extrusion_nml => configuration%get_namelist('extrusion') - - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - - base_mesh_nml => null() - planet_nml => null() - extrusion_nml => null() + prime_mesh_name = config%base_mesh%prime_mesh_name() + geometry = config%base_mesh%geometry() + method = config%extrusion%method() + domain_height = config%extrusion%domain_height() + number_of_layers = config%extrusion%number_of_layers() + scaled_radius = config%planet%scaled_radius() !-------------------------------------- ! 1.0 Create the meshes diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_checksum_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_checksum_mod.f90 index b5c3faf9f..f383262a3 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_checksum_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_checksum_mod.f90 @@ -58,7 +58,6 @@ subroutine output_linear_checksum( program_name, modeldb ) use constants_mod, only: i_def use formulation_config_mod, only: moisture_formulation_dry - use namelist_mod, only: namelist_type implicit none @@ -73,11 +72,11 @@ subroutine output_linear_checksum( program_name, modeldb ) type(field_type), pointer :: theta type(field_type), pointer :: u type(field_type), pointer :: rho - type(namelist_type), pointer :: formulation_nml - integer(kind=i_def) :: moisture_formulation + + integer(i_def) :: moisture_formulation nullify(moisture_fields, prognostic_fields, mr_array) - nullify(mr, theta, u, rho, formulation_nml) + nullify(mr, theta, u, rho) ! Get the fields to checksum prognostic_fields => modeldb%fields%get_field_collection("prognostic_fields") @@ -90,8 +89,7 @@ subroutine output_linear_checksum( program_name, modeldb ) mr => mr_array%bundle ! Get configuration to inform if moisture is output - formulation_nml => modeldb%configuration%get_namelist('formulation') - call formulation_nml%get_value( 'moisture_formulation', moisture_formulation ) + moisture_formulation = modeldb%config%formulation%moisture_formulation() ! Write checksums to file if (moisture_formulation /= moisture_formulation_dry) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 index 8e981a2e9..943b1d691 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 @@ -13,6 +13,8 @@ module jedi_run_mod use constants_mod, only : i_def, l_def, str_def use namelist_collection_mod, only : namelist_collection_type + use config_mod, only : config_type + implicit none private @@ -21,6 +23,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 @@ -34,6 +37,9 @@ module jedi_run_mod !> Get a pointer to the stored configuration. procedure, public :: get_configuration + !> Get a pointer to the stored config_type. + procedure, public :: get_config + !> Just finalise subroutine timing; to get useful timing statistics from failed adjoint tests procedure, public :: finalise_timers @@ -104,13 +110,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) @@ -137,6 +145,19 @@ function get_configuration(self) result(configuration) end function get_configuration +!> @brief Get pointer to the stored configuration (config_type) +!> +!> @return configuration 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) diff --git a/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 b/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 index 2937a18de..dad145aed 100644 --- a/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 @@ -43,6 +43,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) @@ -64,7 +65,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 ) call init_timers( application_name ) call init_collections() diff --git a/applications/jules/source/jules.f90 b/applications/jules/source/jules.f90 index 5b2ca853a..522930328 100644 --- a/applications/jules/source/jules.f90 +++ b/applications/jules/source/jules.f90 @@ -44,6 +44,7 @@ program jules 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 @@ -65,8 +66,11 @@ program jules call modeldb%io_contexts%initialise(application_name, 100) 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 ) call init_timers( application_name ) call init_collections() diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 b/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 index c38f37b34..6dea31420 100644 --- a/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 +++ b/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 @@ -7,7 +7,8 @@ !> module lfric2lfric_driver_mod - use constants_mod, only: str_def, i_def, l_def, r_second + use constants_mod, only: str_def, str_max_filename, & + i_def, l_def, r_second use driver_fem_mod, only: final_fem use driver_io_mod, only: final_io use driver_modeldb_mod, only: modeldb_type @@ -25,7 +26,6 @@ module lfric2lfric_driver_mod log_scratch_space use mesh_collection_mod, only: mesh_collection use mesh_mod, only: mesh_type - use namelist_mod, only: namelist_type use sci_checksum_alg_mod, only: checksum_alg !------------------------------------ @@ -94,13 +94,11 @@ subroutine run( modeldb ) integer(kind=i_def), parameter :: start_timestep = 1_i_def ! Namelist variables - character(len=str_def) :: start_dump_filename - character(len=str_def) :: checkpoint_stem_name - integer(kind=i_def) :: regrid_method + character(str_max_filename) :: start_dump_filename + character(str_max_filename) :: checkpoint_stem_name + integer(i_def) :: regrid_method ! Local parameters - type(namelist_type), pointer :: files_nml - type(namelist_type), pointer :: lfric2lfric_nml type(field_collection_type), pointer :: source_fields type(field_collection_type), pointer :: target_fields @@ -117,14 +115,10 @@ subroutine run( modeldb ) real(r_second) :: checkpoint_times(1) - ! Namelist pointers - files_nml => modeldb%configuration%get_namelist('files') - lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') - ! Extract configuration variables - call files_nml%get_value( 'start_dump_filename', start_dump_filename ) - call files_nml%get_value( 'checkpoint_stem_name', checkpoint_stem_name ) - call lfric2lfric_nml%get_value( 'regrid_method', regrid_method ) + start_dump_filename = modeldb%config%files%start_dump_filename() + checkpoint_stem_name = modeldb%config%files%checkpoint_stem_name() + regrid_method = modeldb%config%lfric2lfric%regrid_method() ! Point to source and target field collections source_fields => modeldb%fields%get_field_collection(source_collection_name) diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index 108104c11..c4ec19867 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -14,7 +14,8 @@ module lfric2lfric_infrastructure_mod use add_mesh_map_mod, only: assign_mesh_maps use blend_orography_alg_mod, only: blend_orography - use constants_mod, only: str_def, r_def, i_def, l_def, r_second + use constants_mod, only: str_def, str_max_filename, & + r_def, i_def, l_def, r_second use create_mesh_mod, only: create_extrusion, & create_mesh use driver_modeldb_mod, only: modeldb_type @@ -154,16 +155,12 @@ contains type(uniform_extrusion_type), allocatable :: extrusion_2d ! Pointers for namelists - type(namelist_type), pointer :: planet_nml - type(namelist_type), pointer :: extrusion_nml type(namelist_type), pointer :: lfric2lfric_nml - type(namelist_type), pointer :: files_nml - type(namelist_type), pointer :: finite_element_nml ! Namelist parameters character(len=str_def) :: mesh_names(2) character(len=str_def), allocatable :: twod_names(:) - character(len=str_def) :: start_dump_filename + character(str_max_filename) :: start_dump_filename ! lfric2lfric namelist parameters integer(kind=i_def) :: origin_domain @@ -213,31 +210,24 @@ contains ! ------------------------------- ! Extract namelist variables ! ------------------------------- - planet_nml => modeldb%configuration%get_namelist('planet') - extrusion_nml => modeldb%configuration%get_namelist('extrusion') - lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') - files_nml => modeldb%configuration%get_namelist('files') - finite_element_nml => modeldb%configuration%get_namelist('finite_element') - - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - call extrusion_nml%get_value( 'method', extrusion_method ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call extrusion_nml%get_value( 'domain_height', domain_height ) ! Check lfric2lfric configuration settings are allowed + lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') call lfric2lfric_check_configuration( lfric2lfric_nml ) - call lfric2lfric_nml%get_value( 'origin_domain', origin_domain ) - call lfric2lfric_nml%get_value( 'regrid_method', regrid_method ) - call lfric2lfric_nml%get_value( 'destination_mesh_name', & - mesh_names(dst) ) - call lfric2lfric_nml%get_value( 'source_mesh_name', & - mesh_names(src) ) - call lfric2lfric_nml%get_value( 'target_domain', target_domain ) - call lfric2lfric_nml%get_value( 'source_geometry', source_geometry ) - call files_nml%get_value( 'start_dump_filename', start_dump_filename ) - call finite_element_nml%get_value( 'element_order_h', element_order_h) - call finite_element_nml%get_value( 'element_order_v', element_order_v) + scaled_radius = modeldb%config%planet%scaled_radius() + extrusion_method = modeldb%config%extrusion%method() + number_of_layers = modeldb%config%extrusion%number_of_layers() + domain_height = modeldb%config%extrusion%domain_height() + origin_domain = modeldb%config%lfric2lfric%origin_domain() + regrid_method = modeldb%config%lfric2lfric%regrid_method() + mesh_names(dst) = modeldb%config%lfric2lfric%destination_mesh_name() + mesh_names(src) = modeldb%config%lfric2lfric%source_mesh_name() + target_domain = modeldb%config%lfric2lfric%target_domain() + source_geometry = modeldb%config%lfric2lfric%source_geometry() + start_dump_filename = modeldb%config%files%start_dump_filename() + element_order_h = modeldb%config%finite_element%element_order_h() + element_order_v = modeldb%config%finite_element%element_order_v() !======================================================================= ! Mesh diff --git a/applications/lfric2lfric/source/lfric2lfric.F90 b/applications/lfric2lfric/source/lfric2lfric.F90 index c40c5cc3d..92d560706 100644 --- a/applications/lfric2lfric/source/lfric2lfric.F90 +++ b/applications/lfric2lfric/source/lfric2lfric.F90 @@ -49,6 +49,7 @@ program lfric2lfric call parse_command_line( filename ) call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name ) write(log_scratch_space,'(A)') & 'Application built with '// trim(precision_real) // & @@ -67,8 +68,11 @@ program lfric2lfric call modeldb%values%add_key_value('coupling_dst', coupler) #endif call init_comm( program_name, modeldb ) + call init_config( filename, lfric2lfric_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), program_name ) call init_collections() call init_time( modeldb ) diff --git a/applications/lfric_atm/source/lfric_atm.f90 b/applications/lfric_atm/source/lfric_atm.f90 index 8f314f64d..e6b39ad23 100644 --- a/applications/lfric_atm/source/lfric_atm.f90 +++ b/applications/lfric_atm/source/lfric_atm.f90 @@ -28,7 +28,6 @@ program lfric_atm use driver_modeldb_mod, only: modeldb_type use gungho_driver_mod, only: initialise, step, finalise use lfric_mpi_mod, only: global_mpi - use namelist_mod, only: namelist_type use timing_mod, only: init_timing, start_timing, stop_timing, final_timing, tik, LPROF @@ -40,7 +39,6 @@ program lfric_atm character(*), parameter :: application_name = "lfric_atm" character(:), allocatable :: filename integer(tik) :: timing_handle_global - type(namelist_type), pointer :: io_nml logical :: lsubroutine_timers call parse_command_line( filename ) @@ -49,6 +47,7 @@ program lfric_atm 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 @@ -72,14 +71,15 @@ program lfric_atm 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 ) call init_timers( application_name ) - io_nml => modeldb%configuration%get_namelist('io') - call io_nml%get_value('subroutine_timers', lsubroutine_timers) + lsubroutine_timers = modeldb%config%io%subroutine_timers() call init_timing( modeldb%mpi%get_comm(), lsubroutine_timers ) - nullify( io_nml ) + if ( LPROF ) call start_timing( timing_handle_global, '__lfric_atm__ ') call init_collections() diff --git a/applications/lfric_coupled/source/lfric_coupled.f90 b/applications/lfric_coupled/source/lfric_coupled.f90 index 16b5d7375..41cde4cd5 100644 --- a/applications/lfric_coupled/source/lfric_coupled.f90 +++ b/applications/lfric_coupled/source/lfric_coupled.f90 @@ -43,6 +43,7 @@ program lfric_coupled 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 ) @@ -67,7 +68,9 @@ program lfric_coupled 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 ) call init_collections() call init_time( modeldb ) diff --git a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 index a0630d7bf..e250353d9 100644 --- a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 +++ b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 @@ -13,6 +13,8 @@ module lfricinp_lfric_driver_mod ! LFRic Modules use add_mesh_map_mod, only: assign_mesh_maps use create_mesh_mod, only: create_mesh +use config_mod, only: config_type + use driver_collections_mod, only: init_collections, final_collections use driver_mesh_mod, only: init_mesh use driver_fem_mod, only: init_fem @@ -117,10 +119,7 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & type(namelist_collection_type), save :: configuration - -type(namelist_type), pointer :: base_mesh_nml -type(namelist_type), pointer :: planet_nml -type(namelist_type), pointer :: extrusion_nml +type(config_type), save :: config class(extrusion_type), allocatable :: extrusion type(uniform_extrusion_type), allocatable :: extrusion_2d @@ -164,8 +163,9 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & call initialise_halo_comms( comm ) call configuration%initialise( program_name_arg, table_len=10 ) +call config%initialise( program_name_arg ) call load_configuration( lfric_nl_fname, required_lfric_namelists, & - configuration ) + configuration, config ) ! Initialise logging system call init_logger( comm, program_name ) @@ -184,16 +184,12 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & ! ------------------------------- ! 0.0 Extract namelist variables ! ------------------------------- -base_mesh_nml => configuration%get_namelist('base_mesh') -planet_nml => configuration%get_namelist('planet') -extrusion_nml => configuration%get_namelist('extrusion') - -call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) -call base_mesh_nml%get_value( 'geometry', geometry ) -call planet_nml%get_value( 'scaled_radius', scaled_radius ) -call extrusion_nml%get_value( 'method', extrusion_method ) -call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) -call extrusion_nml%get_value( 'domain_height', domain_height ) +prime_mesh_name = config%base_mesh%prime_mesh_name() +geometry = config%base_mesh%geometry() +scaled_radius = config%planet%scaled_radius() +extrusion_method = config%extrusion%method() +number_of_layers = config%extrusion%number_of_layers() +domain_height = config%extrusion%domain_height() !------------------------------------------------------------------------- ! 1.0 Create the meshes @@ -279,12 +275,12 @@ end subroutine lfricinp_initialise_lfric !------------------------------------------------------------------ subroutine load_configuration( lfric_nl, required_lfric_namelists, & - configuration ) + configuration, config ) ! Description: ! Reads lfric namelists and checks that all required namelists are present -use configuration_mod, only: read_configuration, ensure_configuration +use config_loader_mod, only: read_configuration, ensure_configuration implicit none @@ -292,7 +288,8 @@ subroutine load_configuration( lfric_nl, required_lfric_namelists, & character(*), intent(in) :: required_lfric_namelists(:) -type(namelist_collection_type), intent(INOUT) :: configuration +type(namelist_collection_type), intent(inout) :: configuration +type(config_type), intent(inout) :: config logical :: okay logical, allocatable :: success_map(:) @@ -303,7 +300,9 @@ subroutine load_configuration( lfric_nl, required_lfric_namelists, & call log_event('Loading '//trim(program_name)//' configuration ...', & LOG_LEVEL_ALWAYS) -call read_configuration( lfric_nl, configuration ) +call read_configuration( lfric_nl, & + configuration=configuration, & + config=config ) okay = ensure_configuration(required_lfric_namelists, success_map) if (.not. okay) then diff --git a/applications/linear_model/source/linear_model.f90 b/applications/linear_model/source/linear_model.f90 index e58099d46..d113c68d1 100644 --- a/applications/linear_model/source/linear_model.f90 +++ b/applications/linear_model/source/linear_model.f90 @@ -42,6 +42,7 @@ program linear_model 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) @@ -63,7 +64,9 @@ program linear_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 ) call init_timers( application_name ) call init_collections() diff --git a/applications/name_transport/source/driver/name_transport_driver_mod.f90 b/applications/name_transport/source/driver/name_transport_driver_mod.f90 index 94e8365c0..01964e2f9 100644 --- a/applications/name_transport/source/driver/name_transport_driver_mod.f90 +++ b/applications/name_transport/source/driver/name_transport_driver_mod.f90 @@ -39,7 +39,6 @@ module name_transport_driver_mod use mesh_mod, only: mesh_type use mesh_collection_mod, only: mesh_collection use model_clock_mod, only: model_clock_type - use namelist_mod, only: namelist_type use runtime_constants_mod, only: create_runtime_constants use sci_checksum_alg_mod, only: checksum_alg use sci_geometric_constants_mod, only: get_chi_inventory, & @@ -123,38 +122,22 @@ subroutine initialise_name_transport( program_name, modeldb ) logical(kind=l_def) :: write_diag logical(kind=l_def) :: use_xios_io - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: extrusion_nml - type(namelist_type), pointer :: planet_nml - type(namelist_type), pointer :: io_nml - integer(i_def) :: i integer(i_def), parameter :: one_layer = 1_i_def !======================================================================= ! 0.0 Extract configuration variables !======================================================================= - - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - extrusion_nml => modeldb%configuration%get_namelist('extrusion') - planet_nml => modeldb%configuration%get_namelist('planet') - io_nml => modeldb%configuration%get_namelist('io') - - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - call io_nml%get_value( 'nodal_output_on_w3', nodal_output_on_w3 ) - call io_nml%get_value( 'write_diag', write_diag ) - call io_nml%get_value( 'use_xios_io', use_xios_io ) - - base_mesh_nml => null() - extrusion_nml => null() - planet_nml => null() - io_nml => null() + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + geometry = modeldb%config%base_mesh%geometry() + prepartitioned = modeldb%config%base_mesh%prepartitioned() + method = modeldb%config%extrusion%method() + domain_height = modeldb%config%extrusion%domain_height() + number_of_layers = modeldb%config%extrusion%number_of_layers() + scaled_radius = modeldb%config%planet%scaled_radius() + nodal_output_on_w3 = modeldb%config%io%nodal_output_on_w3() + write_diag = modeldb%config%io%write_diag() + use_xios_io = modeldb%config%io%use_xios_io() !----------------------------------------------------------------------- ! Initialise infrastructure diff --git a/applications/name_transport/source/name_transport.f90 b/applications/name_transport/source/name_transport.f90 index 7f8faab1d..baa29557d 100644 --- a/applications/name_transport/source/name_transport.f90 +++ b/applications/name_transport/source/name_transport.f90 @@ -40,10 +40,13 @@ program name_transport 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, name_transport_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) call init_logger( modeldb%mpi%get_comm(), program_name ) call log_event( 'Miniapp will run with default precision set as:', & diff --git a/applications/name_transport/unit-test/initialisation/analytic_name_field_profiles_mod_test.pf b/applications/name_transport/unit-test/initialisation/analytic_name_field_profiles_mod_test.pf index 9cd49a2b4..3882ca469 100644 --- a/applications/name_transport/unit-test/initialisation/analytic_name_field_profiles_mod_test.pf +++ b/applications/name_transport/unit-test/initialisation/analytic_name_field_profiles_mod_test.pf @@ -59,7 +59,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf index 7ae24e5d4..1376cdc32 100644 --- a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf +++ b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf @@ -99,8 +99,8 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration - use sci_chi_transform_mod, only: final_chi_transforms + use config_loader_mod, only: final_configuration + use sci_chi_transform_mod, only: final_chi_transforms implicit none diff --git a/applications/ngarch/source/ngarch.f90 b/applications/ngarch/source/ngarch.f90 index 919eec564..a4d445918 100644 --- a/applications/ngarch/source/ngarch.f90 +++ b/applications/ngarch/source/ngarch.f90 @@ -35,6 +35,7 @@ program ngarch call parse_command_line( filename ) call modeldb%configuration%initialise( application_name, table_len=10 ) + call modeldb%config%initialise( application_name ) call modeldb%values%initialise( 'values', 5 ) ! Create the field collections in modeldb @@ -58,9 +59,10 @@ program ngarch modeldb%mpi => global_mpi call init_comm( application_name, modeldb ) - call init_config( filename, & - ngarch_required_namelists, & - modeldb%configuration ) + call init_config( filename, ngarch_required_namelists, & + configuration=modeldb%configuration, & + config=modeldb%config ) + deallocate( filename ) call init_logger( modeldb%mpi%get_comm(), application_name ) diff --git a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 index f2706ce97..35e0d4402 100644 --- a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 +++ b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 @@ -43,8 +43,6 @@ module shallow_water_model_mod use minmax_tseries_mod, only: minmax_tseries, & minmax_tseries_init, & minmax_tseries_final - use namelist_collection_mod, only: namelist_collection_type - use namelist_mod, only: namelist_type use runtime_constants_mod, only: create_runtime_constants use shallow_water_setup_io_mod, only: init_shallow_water_files use xios, only: xios_update_calendar @@ -87,10 +85,6 @@ subroutine initialise_infrastructure( program_name, modeldb) class(extrusion_type), allocatable :: extrusion type(uniform_extrusion_type), allocatable :: extrusion_2d - type(namelist_type), pointer :: base_mesh_nml => null() - type(namelist_type), pointer :: planet_nml => null() - type(namelist_type), pointer :: extrusion_nml => null() - character(str_def) :: prime_mesh_name integer(i_def) :: stencil_depth @@ -108,20 +102,12 @@ subroutine initialise_infrastructure( program_name, modeldb) !======================================================================= ! 0.0 Extract configuration variables !======================================================================= - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - planet_nml => modeldb%configuration%get_namelist('planet') - extrusion_nml => modeldb%configuration%get_namelist('extrusion') - - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - - base_mesh_nml => null() - planet_nml => null() - extrusion_nml => null() + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + geometry = modeldb%config%base_mesh%geometry() + method = modeldb%config%extrusion%method() + domain_height = modeldb%config%extrusion%domain_height() + number_of_layers = modeldb%config%extrusion%number_of_layers() + scaled_radius = modeldb%config%planet%scaled_radius() !------------------------------------------------------------------------- ! Initialise aspects of the infrastructure diff --git a/applications/shallow_water/source/shallow_water.f90 b/applications/shallow_water/source/shallow_water.f90 index c74a664b5..2b4fe2459 100644 --- a/applications/shallow_water/source/shallow_water.f90 +++ b/applications/shallow_water/source/shallow_water.f90 @@ -45,6 +45,7 @@ program shallow_water modeldb%mpi => global_mpi call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name ) ! Create the depository and prognostics field collections call modeldb%fields%add_empty_field_collection("depository", & @@ -58,8 +59,11 @@ program shallow_water call modeldb%io_contexts%initialise(program_name, 100) call init_comm( program_name, modeldb ) + call init_config( filename, shallow_water_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( global_mpi%get_comm(), program_name ) call init_timers( program_name ) call init_counters( program_name ) diff --git a/applications/shallow_water/unit-test/initialisation/analytic_geopot_profiles_mod_test.pf b/applications/shallow_water/unit-test/initialisation/analytic_geopot_profiles_mod_test.pf index a985748e0..b6ef9f975 100644 --- a/applications/shallow_water/unit-test/initialisation/analytic_geopot_profiles_mod_test.pf +++ b/applications/shallow_water/unit-test/initialisation/analytic_geopot_profiles_mod_test.pf @@ -93,7 +93,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/initialisation/analytic_swe_buoyancy_profiles_mod_test.pf b/applications/shallow_water/unit-test/initialisation/analytic_swe_buoyancy_profiles_mod_test.pf index 3fe39d2bb..ae0fc9ecb 100644 --- a/applications/shallow_water/unit-test/initialisation/analytic_swe_buoyancy_profiles_mod_test.pf +++ b/applications/shallow_water/unit-test/initialisation/analytic_swe_buoyancy_profiles_mod_test.pf @@ -94,7 +94,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/initialisation/analytic_swe_streamfunction_profiles_mod_test.pf b/applications/shallow_water/unit-test/initialisation/analytic_swe_streamfunction_profiles_mod_test.pf index 3a773ccfd..be54919c6 100644 --- a/applications/shallow_water/unit-test/initialisation/analytic_swe_streamfunction_profiles_mod_test.pf +++ b/applications/shallow_water/unit-test/initialisation/analytic_swe_streamfunction_profiles_mod_test.pf @@ -95,7 +95,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/initialisation/analytic_swe_wind_profiles_mod_test.pf b/applications/shallow_water/unit-test/initialisation/analytic_swe_wind_profiles_mod_test.pf index 5e1740da0..7bd513eeb 100644 --- a/applications/shallow_water/unit-test/initialisation/analytic_swe_wind_profiles_mod_test.pf +++ b/applications/shallow_water/unit-test/initialisation/analytic_swe_wind_profiles_mod_test.pf @@ -94,7 +94,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/initialisation/galewsky_test_case_mod_test.pf b/applications/shallow_water/unit-test/initialisation/galewsky_test_case_mod_test.pf index 20365147d..3ee3b9185 100644 --- a/applications/shallow_water/unit-test/initialisation/galewsky_test_case_mod_test.pf +++ b/applications/shallow_water/unit-test/initialisation/galewsky_test_case_mod_test.pf @@ -93,7 +93,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf index fe44262b4..3d1b1f697 100644 --- a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf @@ -104,8 +104,8 @@ contains @after subroutine tear_down() - use sci_chi_transform_mod, only: final_chi_transforms - use configuration_mod, only: final_configuration + use sci_chi_transform_mod, only: final_chi_transforms + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf index 3c69d79cb..151ecd58b 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf @@ -105,8 +105,8 @@ contains @after subroutine tear_down() - use sci_chi_transform_mod, only: final_chi_transforms - use configuration_mod, only: final_configuration + use sci_chi_transform_mod, only: final_chi_transforms + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf index 29103cf75..8a7da1b3a 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf @@ -105,7 +105,7 @@ contains subroutine tear_down() use sci_chi_transform_mod, only: final_chi_transforms - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf index 846105876..439798b5d 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf @@ -103,8 +103,8 @@ contains !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine tearDown( this ) - use sci_chi_transform_mod, only: final_chi_transforms - use configuration_mod, only: final_configuration + use sci_chi_transform_mod, only: final_chi_transforms + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/shallow_water/unit-test/kernel/swe_buoyancy_gradient_facet_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/swe_buoyancy_gradient_facet_kernel_mod_test.pf index aa6e2d9fb..d848994a3 100644 --- a/applications/shallow_water/unit-test/kernel/swe_buoyancy_gradient_facet_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/swe_buoyancy_gradient_facet_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/solver/source/solver.F90 b/applications/solver/source/solver.F90 index 9c06cb220..acac6298b 100644 --- a/applications/solver/source/solver.F90 +++ b/applications/solver/source/solver.F90 @@ -12,6 +12,8 @@ program solver use add_mesh_map_mod, only: assign_mesh_maps + use config_mod, only: config_type + use config_loader_mod, only: final_configuration use constants_mod, only: i_def, r_def, PRECISION_REAL, str_def use convert_to_upper_mod, only: convert_to_upper use cli_mod, only: parse_command_line @@ -34,7 +36,6 @@ program solver use field_mod, only: field_type use sci_field_vector_mod, only: field_vector_type use solver_miniapp_alg_mod, only: solver_miniapp_alg - use configuration_mod, only: final_configuration use solver_miniapp_mod, only: solver_required_namelists use log_mod, only: log_event, & log_scratch_space, & @@ -44,10 +45,8 @@ program solver use mesh_mod, only: mesh_type use mesh_collection_mod, only: mesh_collection use namelist_collection_mod, only: namelist_collection_type - use namelist_mod, only: namelist_type use sci_checksum_alg_mod, only: checksum_alg - !------------------------------------ ! Configuration modules !------------------------------------ @@ -60,6 +59,7 @@ program solver character(:), allocatable :: filename type(namelist_collection_type), SAVE :: configuration + type(config_type), SAVE :: config integer(i_def) :: total_ranks, local_rank type(lfric_comm_type) :: comm @@ -80,10 +80,6 @@ program solver class(extrusion_type), allocatable :: extrusion type(uniform_extrusion_type), allocatable :: extrusion_2d - type(namelist_type), pointer :: base_mesh_nml => null() - type(namelist_type), pointer :: planet_nml => null() - type(namelist_type), pointer :: extrusion_nml => null() - character(str_def) :: prime_mesh_name integer(i_def) :: stencil_depth @@ -117,8 +113,12 @@ program solver local_rank = global_mpi%get_comm_rank() call configuration%initialise( program_name, table_len=10 ) + call config%initialise( program_name ) + call init_config( filename, solver_required_namelists, & - configuration ) + configuration=configuration, & + config=config ) + call init_logger( comm, program_name ) call init_collections() @@ -132,24 +132,15 @@ program solver !-------------------------------------- ! 0.0 Extract namelist variables !-------------------------------------- - base_mesh_nml => configuration%get_namelist('base_mesh') - planet_nml => configuration%get_namelist('planet') - extrusion_nml => configuration%get_namelist('extrusion') - - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - - base_mesh_nml => null() - planet_nml => null() - extrusion_nml => null() + prime_mesh_name = config%base_mesh%prime_mesh_name() + geometry = config%base_mesh%geometry() + method = config%extrusion%method() + domain_height = config%extrusion%domain_height() + number_of_layers = config%extrusion%number_of_layers() + scaled_radius = config%planet%scaled_radius() call log_event( 'Initialising '//program_name//' ...', LOG_LEVEL_ALWAYS ) - !======================================================================= ! 1.0 Mesh !======================================================================= diff --git a/applications/transport/source/driver/transport_driver_mod.f90 b/applications/transport/source/driver/transport_driver_mod.f90 index 2f9d4361d..530b49009 100644 --- a/applications/transport/source/driver/transport_driver_mod.f90 +++ b/applications/transport/source/driver/transport_driver_mod.f90 @@ -11,7 +11,7 @@ module transport_driver_mod use add_mesh_map_mod, only: assign_mesh_maps use sci_checksum_alg_mod, only: checksum_alg use check_configuration_mod, only: get_required_stencil_depth - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration use constants_mod, only: i_def, l_def, & r_def, r_second, str_def use create_mesh_mod, only: create_mesh, create_extrusion @@ -49,7 +49,6 @@ module transport_driver_mod use mesh_collection_mod, only: mesh_collection use model_clock_mod, only: model_clock_type use mr_indices_mod, only: nummr - use namelist_mod, only: namelist_type use runtime_constants_mod, only: create_runtime_constants use timer_mod, only: timer use transport_init_fields_alg_mod, only: transport_init_fields_alg @@ -142,58 +141,33 @@ subroutine initialise_transport( program_name, modeldb ) logical(kind=l_def) :: write_diag logical(kind=l_def) :: use_xios_io - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: formulation_nml - type(namelist_type), pointer :: extrusion_nml - type(namelist_type), pointer :: planet_nml - type(namelist_type), pointer :: multigrid_nml - type(namelist_type), pointer :: multires_coupling_nml - type(namelist_type), pointer :: io_nml - integer(i_def) :: i integer(i_def), parameter :: one_layer = 1_i_def !======================================================================= ! 0.0 Extract configuration variables !======================================================================= - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - formulation_nml => modeldb%configuration%get_namelist('formulation') - extrusion_nml => modeldb%configuration%get_namelist('extrusion') - planet_nml => modeldb%configuration%get_namelist('planet') - io_nml => modeldb%configuration%get_namelist('io') - - call formulation_nml%get_value( 'l_multigrid', l_multigrid ) - call formulation_nml%get_value( 'use_multires_coupling', & - use_multires_coupling ) + l_multigrid = modeldb%config%formulation%l_multigrid() + use_multires_coupling = modeldb%config%formulation%use_multires_coupling() + if (use_multires_coupling) then - multires_coupling_nml => modeldb%configuration%get_namelist('multires_coupling') - call multires_coupling_nml%get_value( 'aerosol_mesh_name', & - aerosol_mesh_name ) - multires_coupling_nml => null() + aerosol_mesh_name = modeldb%config%multires_coupling%aerosol_mesh_name() end if if (l_multigrid) then - multigrid_nml => modeldb%configuration%get_namelist('multigrid') - call multigrid_nml%get_value( 'chain_mesh_tags', chain_mesh_tags ) - multigrid_nml => null() + chain_mesh_tags = modeldb%config%multigrid%chain_mesh_tags() end if - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - call io_nml%get_value( 'nodal_output_on_w3', nodal_output_on_w3 ) - call io_nml%get_value( 'write_diag', write_diag ) - call io_nml%get_value( 'use_xios_io', use_xios_io ) - - base_mesh_nml => null() - extrusion_nml => null() - formulation_nml => null() - planet_nml => null() - io_nml => null() + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + geometry = modeldb%config%base_mesh%geometry() + prepartitioned = modeldb%config%base_mesh%prepartitioned() + method = modeldb%config%extrusion%method() + domain_height = modeldb%config%extrusion%domain_height() + number_of_layers = modeldb%config%extrusion%number_of_layers() + scaled_radius = modeldb%config%planet%scaled_radius() + nodal_output_on_w3 = modeldb%config%io%nodal_output_on_w3() + write_diag = modeldb%config%io%write_diag() + use_xios_io = modeldb%config%io%use_xios_io() !----------------------------------------------------------------------- ! Initialise infrastructure diff --git a/applications/transport/source/transport.f90 b/applications/transport/source/transport.f90 index a4ea8347a..bcc454675 100644 --- a/applications/transport/source/transport.f90 +++ b/applications/transport/source/transport.f90 @@ -37,10 +37,15 @@ program transport 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, transport_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), program_name ) call log_event( 'Miniapp will run with default precision set as:', & diff --git a/applications/transport/unit-test/initialisation/analytic_tracer_field_profiles_mod_test.pf b/applications/transport/unit-test/initialisation/analytic_tracer_field_profiles_mod_test.pf index 9628fa396..2b000cb90 100644 --- a/applications/transport/unit-test/initialisation/analytic_tracer_field_profiles_mod_test.pf +++ b/applications/transport/unit-test/initialisation/analytic_tracer_field_profiles_mod_test.pf @@ -60,7 +60,7 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf index 7fcd8dc18..db903e964 100644 --- a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf @@ -90,7 +90,7 @@ contains subroutine tearDown( this ) use sci_chi_transform_mod, only: final_chi_transforms - use configuration_mod, only: final_configuration + use config_loader_mod, only: final_configuration implicit none diff --git a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf index 04e00da19..6d57a726b 100644 --- a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf @@ -111,8 +111,8 @@ contains @after subroutine tear_down() - use configuration_mod, only: final_configuration - use sci_chi_transform_mod, only: final_chi_transforms + use config_loader_mod, only: final_configuration + use sci_chi_transform_mod, only: final_chi_transforms implicit none diff --git a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 index c7d2bb148..4ddd50aae 100644 --- a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 @@ -119,7 +119,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ ! 1. Initialise modeldb field collections, configuration and mpi. modeldb%mpi => mpi_obj call modeldb%configuration%initialise( modeldb_name, table_len=10 ) - + call modeldb%config%initialise( modeldb_name ) call modeldb%values%initialise('values', 5) ! Create the depository, prognostics and diagnostics field collections @@ -139,7 +139,8 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ call modeldb%io_contexts%initialise(modeldb_name, table_len=100) call init_config( filename, gungho_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) ! 2. Setup some model modeldb%values and initialise infrastructure call modeldb%values%add_key_value( 'temperature_correction_rate', 0.0_r_def ) diff --git a/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 index 6d1405ba6..37773a05e 100644 --- a/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 @@ -67,7 +67,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb ) ! 1. Initialise modeldb field collections, configuration and mpi. modeldb%mpi => mpi_obj call modeldb%configuration%initialise( modeldb_name, table_len=10 ) - + call modeldb%config%initialise( modeldb_name ) call modeldb%values%initialise('values', table_len = 5) ! 2. Create the depository, prognostics and diagnostics field collections @@ -89,7 +89,8 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb ) call modeldb%io_contexts%initialise(modeldb_name, table_len=100) call init_config( filename, gungho_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) ! 3. Initialise the clock and calendar call init_time( modeldb ) diff --git a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 index 04c466748..31d40ccd1 100644 --- a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 +++ b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 @@ -12,7 +12,6 @@ module atl_si_timestep_alg_mod use log_mod, only: log_event, log_scratch_space, & LOG_LEVEL_INFO, LOG_LEVEL_ERROR use driver_modeldb_mod, only: modeldb_type - use namelist_mod, only: namelist_type use reference_element_mod, only: T use formulation_config_mod, only: dlayer_on, exner_from_eos, si_momentum_equation, & moisture_formulation, moisture_formulation_dry, & @@ -314,8 +313,6 @@ contains integer(kind=i_def) :: ls_outer, ls_inner integer(kind=i_def) :: next_outer, next_inner real(kind=r_def) :: varalpha, varbeta - type(namelist_type), pointer :: mixed_solver_nml - type(namelist_type), pointer :: base_mesh_nml real(kind=r_def) :: mixed_solver_a_tol type(field_type) :: rhs_n_igh_u type(field_type) :: advected_u @@ -329,8 +326,7 @@ contains qr => get_qr_fe() ! Get mesh - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() mesh => mesh_collection%get_mesh(prime_mesh_name) mm_wt => get_mass_matrix_fe( Wtheta, mesh%get_id() ) @@ -627,8 +623,7 @@ contains ! Solve adjoint of semi-implicit system: A * inc = rhs !----------------------------------------------------------------------- - mixed_solver_nml => modeldb%configuration%get_namelist('mixed_solver') - call mixed_solver_nml%get_value( 'mixed_solver_a_tol', mixed_solver_a_tol ) + mixed_solver_a_tol = modeldb%config%mixed_solver%mixed_solver_a_tol() ! If self%state is zero, there is no need to call the SI solver if (.not. bundle_is_zero( mixed_solver_a_tol, self%state, bundle_size )) then diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 2797865da..31179bda1 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -29,8 +29,10 @@ program cma_test test_cma_add, & test_cma_apply_inv, & test_cma_diag_DhMDhT + use config_mod, only : config_type use constants_mod, only : i_def, r_def, i_def, l_def, & - r_solver, pi, str_def + r_solver, pi, str_def, & + str_max_filename use derived_config_mod, only : set_derived_config use extrusion_mod, only : extrusion_type, & uniform_extrusion_type, & @@ -57,8 +59,6 @@ program cma_test use mesh_mod, only : mesh_type use mesh_collection_mod, only : mesh_collection use namelist_collection_mod, only : namelist_collection_type - use namelist_mod, only : namelist_type - use base_mesh_config_mod, only : GEOMETRY_SPHERICAL use create_mesh_mod, only : create_mesh use add_mesh_map_mod, only : assign_mesh_maps @@ -125,13 +125,11 @@ program cma_test ! Namelist and configuration variables type(namelist_collection_type), save :: configuration + type(config_type), save :: config - type(namelist_type), pointer :: extrusion_nml - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: planet_nml + character(str_max_filename) :: file_prefix integer(i_def) :: stencil_depth - character(str_def) :: file_prefix character(str_def) :: prime_mesh_name real(r_def) :: radius real(r_def) :: scaled_radius @@ -232,6 +230,7 @@ program cma_test end select call configuration%initialise( program_name, table_len=10 ) + call config%initialise( program_name ) deallocate(program_name) deallocate(test_flag) @@ -243,7 +242,9 @@ program cma_test call log_event( log_scratch_space, LOG_LEVEL_INFO ) allocate( success_map(size(required_configuration)) ) - call read_configuration( filename, configuration ) + call read_configuration( filename, & + configuration=configuration, & + config=config ) okay = ensure_configuration( required_configuration, success_map ) if (.not. okay) then @@ -262,19 +263,15 @@ program cma_test call init_collections() - extrusion_nml => configuration%get_namelist('extrusion') - base_mesh_nml => configuration%get_namelist('base_mesh') - planet_nml => configuration%get_namelist('planet') - - call extrusion_nml%get_value( 'method', extrusion_method ) - call extrusion_nml%get_value( 'planet_radius', radius ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call base_mesh_nml%get_value( 'file_prefix', file_prefix ) - call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) + extrusion_method = config%extrusion%method() + radius = config%extrusion%planet_radius() + number_of_layers = config%extrusion%number_of_layers() + domain_height = config%extrusion%domain_height() + file_prefix = config%base_mesh%file_prefix() + prepartitioned = config%base_mesh%prepartitioned() + geometry = config%base_mesh%geometry() + prime_mesh_name = config%base_mesh%prime_mesh_name() + scaled_radius = config%planet%scaled_radius() !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Initialise diff --git a/science/gungho/source/algorithm/limited_area/init_gungho_lbcs_alg_mod.x90 b/science/gungho/source/algorithm/limited_area/init_gungho_lbcs_alg_mod.x90 index 24391689a..d93de2056 100644 --- a/science/gungho/source/algorithm/limited_area/init_gungho_lbcs_alg_mod.x90 +++ b/science/gungho/source/algorithm/limited_area/init_gungho_lbcs_alg_mod.x90 @@ -91,18 +91,11 @@ module init_gungho_lbcs_alg_mod integer(i_def) :: imr type(mesh_type), pointer :: mesh - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: formulation_nml - character(len=str_def) :: prime_mesh_name integer(i_def) :: moisture_formulation - - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - formulation_nml => modeldb%configuration%get_namelist('formulation') - - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call formulation_nml%get_value( 'moisture_formulation', moisture_formulation ) + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + moisture_formulation = modeldb%config%formulation%moisture_formulation() call prognostic_fields%get_field( 'theta', theta ) call prognostic_fields%get_field( 'u', u ) diff --git a/science/gungho/source/algorithm/timestepping/semi_implicit_timestep_alg_mod.X90 b/science/gungho/source/algorithm/timestepping/semi_implicit_timestep_alg_mod.X90 index 7aa360475..4f10820d6 100644 --- a/science/gungho/source/algorithm/timestepping/semi_implicit_timestep_alg_mod.X90 +++ b/science/gungho/source/algorithm/timestepping/semi_implicit_timestep_alg_mod.X90 @@ -14,7 +14,6 @@ module semi_implicit_timestep_alg_mod log_scratch_space, & LOG_LEVEL_INFO use extrusion_mod, only: TWOD - use namelist_mod, only: namelist_type use sci_fem_constants_mod, only: get_mass_matrix_fe, & get_mass_matrix_fv use sci_field_bundle_builtins_mod, & @@ -651,40 +650,29 @@ contains logical(kind=l_def) :: checkpoint_reference_fields ! Namelist parameters - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: initialization_nml - type(namelist_type), pointer :: microphysics_nml - type(namelist_type), pointer :: aerosol_nml - type(namelist_type), pointer :: timestepping_nml - - character(str_def) :: prime_mesh_name - integer(i_def) :: lbc_option - logical(l_def) :: microphysics_casim - logical(l_def) :: murk_lbc - real(r_def) :: tau_r + character(str_def) :: prime_mesh_name + integer(i_def) :: lbc_option + logical(l_def) :: microphysics_casim + logical(l_def) :: murk_lbc + real(r_def) :: tau_r if ( subroutine_timers ) call timer('semi_implicit_timestep_alg') cast_dt = real(model_clock%get_seconds_per_step(), r_def) if (limited_area .and. use_wavedynamics) then - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - initialization_nml => modeldb%configuration%get_namelist('initialization') - timestepping_nml => modeldb%configuration%get_namelist('timestepping') - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call initialization_nml%get_value( 'lbc_option', lbc_option ) - call timestepping_nml%get_value( 'tau_r', tau_r ) + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + lbc_option = modeldb%config%initialization%lbc_option() + tau_r = modeldb%config%timestepping%tau_r() if (lbc_option == lbc_option_um2lfric_file) then - aerosol_nml => modeldb%configuration%get_namelist('aerosol') - call aerosol_nml%get_value( 'murk_lbc', murk_lbc ) + murk_lbc = modeldb%config%aerosol%murk_lbc() end if end if if (lbc_option == lbc_option_um2lfric_file .or. & (use_physics .and. cloud == cloud_um)) then - microphysics_nml => modeldb%configuration%get_namelist('microphysics') - call microphysics_nml%get_value( 'microphysics_casim', microphysics_casim ) + microphysics_casim = modeldb%config%microphysics%microphysics_casim() end if if (element_order_h == 0 .and. element_order_v == 0) then diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index e91f0fbd6..8a885b432 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -73,8 +73,6 @@ module gungho_model_mod use model_clock_mod, only : model_clock_type use moisture_conservation_alg_mod, & only : moisture_conservation_alg - use namelist_collection_mod, only : namelist_collection_type - use namelist_mod, only : namelist_type use mr_indices_mod, only : nummr use no_timestep_alg_mod, only : no_timestep_type use remove_duplicates_mod, only : remove_duplicates @@ -451,12 +449,6 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) real(r_def) :: scaled_radius integer(i_def) :: number_of_layers - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: formulation_nml - type(namelist_type), pointer :: extrusion_nml - type(namelist_type), pointer :: planet_nml - type(namelist_type), pointer :: multigrid_nml - type(namelist_type), pointer :: multires_coupling_nml #ifdef UM_PHYSICS real(r_def) :: dt #endif @@ -473,37 +465,25 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) call check_configuration(modeldb) - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - formulation_nml => modeldb%configuration%get_namelist('formulation') - extrusion_nml => modeldb%configuration%get_namelist('extrusion') - planet_nml => modeldb%configuration%get_namelist('planet') - multires_coupling_nml => null() - multigrid_nml => null() - - call formulation_nml%get_value( 'l_multigrid', l_multigrid ) - call formulation_nml%get_value( 'use_multires_coupling', & - use_multires_coupling ) + l_multigrid = modeldb%config%formulation%l_multigrid() + use_multires_coupling = modeldb%config%formulation%use_multires_coupling() if ( use_multires_coupling ) then - multires_coupling_nml => modeldb%configuration%get_namelist('multires_coupling') - call multires_coupling_nml%get_value( 'multires_coupling_mesh_tags', & - multires_coupling_mesh_tags ) - call multires_coupling_nml%get_value( 'orography_mesh_name', & - orography_mesh_name ) + multires_coupling_mesh_tags = modeldb%config%multires_coupling%multires_coupling_mesh_tags() + orography_mesh_name = modeldb%config%multires_coupling%orography_mesh_name() end if if ( l_multigrid ) then - multigrid_nml => modeldb%configuration%get_namelist('multigrid') - call multigrid_nml%get_value( 'chain_mesh_tags', chain_mesh_tags ) + chain_mesh_tags = modeldb%config%multigrid%chain_mesh_tags() end if - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'method', extrusion_method ) - call extrusion_nml%get_value( 'number_of_layers', number_of_layers ) - call planet_nml%get_value( 'scaled_radius', scaled_radius ) + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + geometry = modeldb%config%base_mesh%geometry() + prepartitioned = modeldb%config%base_mesh%prepartitioned() + domain_height = modeldb%config%extrusion%domain_height() + extrusion_method = modeldb%config%extrusion%method() + number_of_layers = modeldb%config%extrusion%number_of_layers() + scaled_radius = modeldb%config%planet%scaled_radius() !------------------------------------------------------------------------- ! Initialise infrastructure diff --git a/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 b/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 index efca60c32..dfc166e87 100644 --- a/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 +++ b/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 @@ -9,7 +9,7 @@ module iau_firstfile_io_mod use calendar_mod, only: calendar_type - use constants_mod, only: str_def, l_def + use constants_mod, only: str_def, str_max_filename, l_def use driver_modeldb_mod, only: modeldb_type use field_collection_mod, only: field_collection_type use field_mod, only: field_type @@ -22,7 +22,6 @@ module iau_firstfile_io_mod use linked_list_mod, only: linked_list_type use mesh_collection_mod, only: mesh_collection use mesh_mod, only: mesh_type - use namelist_mod, only: namelist_type use sci_geometric_constants_mod, only: get_chi_inventory, & get_panel_id_inventory use step_calendar_mod, only: step_calendar_type @@ -58,10 +57,6 @@ subroutine iau_incs_firstfile_io ( io_context_name, modeldb, & type(lfric_xios_context_type), pointer :: io_context type(linked_list_type), pointer :: file_list type(field_collection_type), pointer :: multifile_fields - type(namelist_type), pointer :: time_nml - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: files_nml - type(namelist_type), pointer :: io_nml class(calendar_type), allocatable :: tmp_calendar @@ -69,8 +64,9 @@ subroutine iau_incs_firstfile_io ( io_context_name, modeldb, & character(str_def) :: time_start character(str_def) :: prime_mesh_name character(str_def) :: context_name - character(str_def) :: iau_addinf_path - character(str_def) :: iau_bcorr_path + + character(str_max_filename) :: iau_addinf_path + character(str_max_filename) :: iau_bcorr_path logical(l_def) :: use_xios_io @@ -81,17 +77,12 @@ subroutine iau_incs_firstfile_io ( io_context_name, modeldb, & chi_inventory => get_chi_inventory() panel_id_inventory => get_panel_id_inventory() - time_nml => modeldb%configuration%get_namelist('time') - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - files_nml => modeldb%configuration%get_namelist('files') - io_nml => modeldb%configuration%get_namelist('io') - - call time_nml%get_value('calendar_origin', time_origin) - call time_nml%get_value('calendar_start', time_start) - call base_mesh_nml%get_value('prime_mesh_name', prime_mesh_name) - call files_nml%get_value('iau_addinf_path', iau_addinf_path) - call files_nml%get_value('iau_bcorr_path', iau_bcorr_path) - call io_nml%get_value('use_xios_io', use_xios_io) + time_origin = modeldb%config%time%calendar_origin() + time_start = modeldb%config%time%calendar_start() + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + iau_addinf_path = modeldb%config%files%iau_addinf_path() + iau_bcorr_path = modeldb%config%files%iau_bcorr_path() + use_xios_io = modeldb%config%io%use_xios_io() ! get filename and set up context name for this file context_name = "multifile_context_" // trim(iau_incs_path) diff --git a/science/linear/integration-test/runge_kutta/runge_kutta.f90 b/science/linear/integration-test/runge_kutta/runge_kutta.f90 index f460201ac..d49c8638f 100644 --- a/science/linear/integration-test/runge_kutta/runge_kutta.f90 +++ b/science/linear/integration-test/runge_kutta/runge_kutta.f90 @@ -10,7 +10,7 @@ !! corresponding nonlinear code. program runge_kutta - use configuration_mod, only: read_configuration, final_configuration + use config_loader_mod, only: read_configuration, final_configuration use driver_collections_mod, only: init_collections, final_collections use driver_time_mod, only: init_time, final_time use driver_modeldb_mod, only: modeldb_type @@ -146,7 +146,11 @@ program runge_kutta end select call modeldb%configuration%initialise( program_name, table_len=10 ) - call read_configuration( filename, modeldb%configuration ) + call modeldb%config%initialise( program_name ) + call read_configuration( filename, & + configuration=modeldb%configuration, & + config=modeldb%config ) + deallocate( filename ) call init_collections() diff --git a/science/linear/integration-test/semi_implicit/semi_implicit.f90 b/science/linear/integration-test/semi_implicit/semi_implicit.f90 index af625729c..4ee8e4888 100644 --- a/science/linear/integration-test/semi_implicit/semi_implicit.f90 +++ b/science/linear/integration-test/semi_implicit/semi_implicit.f90 @@ -10,7 +10,7 @@ !! corresponding nonlinear code. program semi_implicit - use configuration_mod, only: read_configuration, final_configuration + use config_loader_mod, only: read_configuration, final_configuration use driver_collections_mod, only: init_collections, final_collections use driver_time_mod, only: init_time, final_time use driver_modeldb_mod, only: modeldb_type @@ -22,7 +22,6 @@ program semi_implicit log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO - use namelist_collection_mod, only: namelist_collection_type use tl_test_driver_mod, only: initialise, & finalise, & run_timesteps, & @@ -133,7 +132,10 @@ program semi_implicit end select call modeldb%configuration%initialise( program_name, table_len=10 ) - call read_configuration( filename, modeldb%configuration ) + call modeldb%config%initialise( program_name ) + call read_configuration( filename, & + configuration=modeldb%configuration, & + config=modeldb%config ) deallocate( filename ) call init_collections() diff --git a/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 b/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 index c4bfedbd2..97638f671 100644 --- a/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 +++ b/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 @@ -14,7 +14,6 @@ module tl_si_timestep_alg_mod LOG_LEVEL_INFO, & LOG_LEVEL_ERROR use driver_modeldb_mod, only: modeldb_type - use namelist_mod, only: namelist_type use reference_element_mod, only: T ! Configuration options @@ -394,8 +393,7 @@ contains logical( kind=l_def ) :: write_moisture_diag = .false. ! Configuration - type( namelist_type ), pointer :: mixed_solver_nml - real( kind=r_def ) :: mixed_solver_a_tol + real( kind=r_def ) :: mixed_solver_a_tol if ( subroutine_timers ) call timer('semi_implicit_timestep_alg') @@ -803,9 +801,7 @@ contains ! Solve semi-implicit system: A*inc = rhs, and increment state by inc !-------------------------------------------------------------------- - mixed_solver_nml => modeldb%configuration%get_namelist('mixed_solver') - call mixed_solver_nml%get_value( 'mixed_solver_a_tol', & - mixed_solver_a_tol ) + mixed_solver_a_tol = modeldb%config%mixed_solver%mixed_solver_a_tol() ! If rhs_np1 is zero, there is no need to call the SI solver if ( .not. & diff --git a/science/linear/source/driver/linear_driver_mod.f90 b/science/linear/source/driver/linear_driver_mod.f90 index 662faea60..9b6d80282 100644 --- a/science/linear/source/driver/linear_driver_mod.f90 +++ b/science/linear/source/driver/linear_driver_mod.f90 @@ -49,7 +49,6 @@ module linear_driver_mod use linear_data_algorithm_mod, only : update_ls_file_alg use mesh_mod, only : mesh_type use mesh_collection_mod, only : mesh_collection - use namelist_mod, only : namelist_type use create_tl_prognostics_mod, only : create_tl_prognostics implicit none @@ -79,11 +78,6 @@ subroutine initialise( program_name, modeldb ) type( mesh_type ), pointer :: aerosol_mesh type( mesh_type ), pointer :: aerosol_twod_mesh - type( namelist_type ), pointer :: base_mesh_nml - type( namelist_type ), pointer :: multires_coupling_nml - type( namelist_type ), pointer :: initialization_nml - type( namelist_type ), pointer :: io_nml - character( len=str_def ) :: prime_mesh_name character( len=str_def ) :: aerosol_mesh_name logical( kind=l_def ) :: coarse_aerosol_ancil @@ -101,7 +95,6 @@ subroutine initialise( program_name, modeldb ) real(r_def), allocatable :: real_array(:) nullify( mesh, twod_mesh, aerosol_mesh, aerosol_twod_mesh, depository ) - nullify( base_mesh_nml, multires_coupling_nml, initialization_nml ) depository => modeldb%fields%get_field_collection("depository") fd_fields => modeldb%fields%get_field_collection("fd_fields") @@ -129,26 +122,21 @@ subroutine initialise( program_name, modeldb ) call modeldb%values%add_key_value('model_axes', model_axes) ! Get primary and 2D meshes for initialising model data - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() + mesh => mesh_collection%get_mesh(prime_mesh_name) twod_mesh => mesh_collection%get_mesh(mesh, TWOD) ! Get initialization configuration - initialization_nml => modeldb%configuration%get_namelist('initialization') - call initialization_nml%get_value( 'coarse_aerosol_ancil', & - coarse_aerosol_ancil ) - call initialization_nml%get_value( 'coarse_ozone_ancil', & - coarse_ozone_ancil ) - call initialization_nml%get_value( 'init_option', init_option ) + coarse_aerosol_ancil = modeldb%config%initialization%coarse_aerosol_ancil() + coarse_ozone_ancil = modeldb%config%initialization%coarse_ozone_ancil() + init_option = modeldb%config%initialization%init_option() ! If aerosol data is on a different mesh, get this if (coarse_aerosol_ancil .or. coarse_ozone_ancil) then ! For now use the coarsest mesh - multires_coupling_nml => & - modeldb%configuration%get_namelist('multires_coupling') - call multires_coupling_nml%get_value( 'aerosol_mesh_name', & - aerosol_mesh_name ) + aerosol_mesh_name = modeldb%config%multires_coupling%aerosol_mesh_name() + aerosol_mesh => mesh_collection%get_mesh(aerosol_mesh_name) aerosol_twod_mesh => mesh_collection%get_mesh(aerosol_mesh, TWOD) write( log_scratch_space,'(A,A)' ) "aerosol mesh name:", aerosol_mesh%get_mesh_name() @@ -196,8 +184,7 @@ subroutine initialise( program_name, modeldb ) modeldb ) ! Get io configuration - io_nml => modeldb%configuration%get_namelist('io') - call io_nml%get_value( 'nodal_output_on_w3', nodal_output_on_w3 ) + nodal_output_on_w3 = modeldb%config%io%nodal_output_on_w3() ! Initial output call write_initial_output( modeldb, mesh, twod_mesh, & @@ -227,16 +214,14 @@ subroutine step( modeldb ) type( gungho_time_axes_type ), pointer :: model_axes type( mesh_type ), pointer :: mesh type( mesh_type ), pointer :: twod_mesh - type( namelist_type ), pointer :: base_mesh_nml - type( namelist_type ), pointer :: initialization_nml - type( namelist_type ), pointer :: io_nml + character( len=str_def ) :: prime_mesh_name integer( kind=i_def ) :: ls_option logical( kind=l_def ) :: write_diag integer( kind=i_medium ) :: diagnostic_frequency logical( kind=l_def ) :: nodal_output_on_w3 - nullify(mesh, twod_mesh, base_mesh_nml, initialization_nml, io_nml) + nullify(mesh, twod_mesh) nullify(moisture_fields, ls_mr_array, ls_moist_dyn_array) ! Get model_axes out of modeldb @@ -248,10 +233,7 @@ subroutine step( modeldb ) ls_fields => modeldb%fields%get_field_collection("ls_fields") - ! Get initialization configuration - initialization_nml => modeldb%configuration%get_namelist('initialization') - call initialization_nml%get_value( 'ls_option', ls_option ) - + ls_option = modeldb%config%initialization%ls_option() if ( ls_option == ls_option_file ) then call update_ls_file_alg( model_axes%ls_times_list, & modeldb%clock, & @@ -261,19 +243,16 @@ subroutine step( modeldb ) end if ! Get Mesh - base_mesh_nml => modeldb%configuration%get_namelist('base_mesh') - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) + prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() mesh => mesh_collection%get_mesh(prime_mesh_name) twod_mesh => mesh_collection%get_mesh(mesh, TWOD) call linear_step( mesh, twod_mesh, & modeldb, modeldb%clock ) - ! Get io configuration - io_nml => modeldb%configuration%get_namelist('io') - call io_nml%get_value( 'diagnostic_frequency', diagnostic_frequency ) - call io_nml%get_value( 'write_diag', write_diag ) - call io_nml%get_value( 'nodal_output_on_w3', nodal_output_on_w3 ) + diagnostic_frequency = modeldb%config%io%diagnostic_frequency() + write_diag = modeldb%config%io%write_diag() + nodal_output_on_w3 = modeldb%config%io%nodal_output_on_w3() if ( ( mod(modeldb%clock%get_step(), diagnostic_frequency) == 0 ) & .and. ( write_diag ) ) then From 577447858067be0774c63297b82fdb06f337019c Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Mon, 12 Jan 2026 07:25:01 +0000 Subject: [PATCH 03/17] Add some kinds --- applications/lfric_atm/source/lfric_atm.f90 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/applications/lfric_atm/source/lfric_atm.f90 b/applications/lfric_atm/source/lfric_atm.f90 index e6b39ad23..757f207b9 100644 --- a/applications/lfric_atm/source/lfric_atm.f90 +++ b/applications/lfric_atm/source/lfric_atm.f90 @@ -17,6 +17,7 @@ program lfric_atm use cli_mod, only: parse_command_line + use constants_mod, only: l_def use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm use driver_config_mod, only: init_config, final_config @@ -29,7 +30,8 @@ program lfric_atm use gungho_driver_mod, only: initialise, step, finalise use lfric_mpi_mod, only: global_mpi - use timing_mod, only: init_timing, start_timing, stop_timing, final_timing, tik, LPROF + use timing_mod, only: init_timing, start_timing, & + stop_timing, final_timing, tik, LPROF implicit none @@ -39,7 +41,8 @@ program lfric_atm character(*), parameter :: application_name = "lfric_atm" character(:), allocatable :: filename integer(tik) :: timing_handle_global - logical :: lsubroutine_timers + + logical(l_def) :: lsubroutine_timers call parse_command_line( filename ) From 7867f00f179d3882f5048bb61bb97d5240ff63fe Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:09:39 +0000 Subject: [PATCH 04/17] Remove configuration variables that weren't being used --- .../source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 b/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 index dfc166e87..0dd45d4c0 100644 --- a/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 +++ b/science/gungho/source/driver/iau_multifile_io/iau_firstfile_io_mod.F90 @@ -65,9 +65,6 @@ subroutine iau_incs_firstfile_io ( io_context_name, modeldb, & character(str_def) :: prime_mesh_name character(str_def) :: context_name - character(str_max_filename) :: iau_addinf_path - character(str_max_filename) :: iau_bcorr_path - logical(l_def) :: use_xios_io procedure(callback_clock_arg), pointer :: before_close @@ -80,8 +77,6 @@ subroutine iau_incs_firstfile_io ( io_context_name, modeldb, & time_origin = modeldb%config%time%calendar_origin() time_start = modeldb%config%time%calendar_start() prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name() - iau_addinf_path = modeldb%config%files%iau_addinf_path() - iau_bcorr_path = modeldb%config%files%iau_bcorr_path() use_xios_io = modeldb%config%io%use_xios_io() ! get filename and set up context name for this file From 438c54da661ddd083a46896090fefd94c923a2bd Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:43:27 +0000 Subject: [PATCH 05/17] Only changes that allow Apps to work with the purge of intermediate namelist api from core --- .../adjoint_tests/source/adjoint_tests.f90 | 8 +- .../gravity_wave_infrastructure_mod.f90 | 10 +- .../gravity_wave/source/gravity_wave.f90 | 7 +- .../gungho_model/source/gungho_model.f90 | 8 +- .../algorithm/algorithm_test.f90 | 11 +- .../jedi-interface/jedi_geometry_mod.f90 | 7 +- .../source/jedi-interface/jedi_run_mod.f90 | 25 +- .../jedi_lfric_tests/source/jedi_forecast.f90 | 5 +- .../source/jedi_forecast_pseudo.f90 | 6 +- .../source/jedi_id_tlm_tests.f90 | 6 +- .../source/jedi_lfric_tests.f90 | 9 +- .../source/jedi_tlm_forecast_tl.f90 | 6 +- .../source/jedi_tlm_tests.f90 | 5 +- applications/jules/source/jules.f90 | 9 +- .../lfric2lfric_infrastructure_mod.X90 | 2 +- .../initialisation/lfric2lfric_init_mesh.f90 | 42 +- .../lfric2lfric/source/lfric2lfric.F90 | 7 +- applications/lfric_atm/source/lfric_atm.f90 | 6 +- .../lfric_coupled/source/lfric_coupled.f90 | 8 +- .../common/lfricinp_lfric_driver_mod.f90 | 20 +- .../linear_model/source/linear_model.f90 | 7 +- .../driver/name_transport_driver_mod.f90 | 10 +- .../name_transport/source/name_transport.f90 | 9 +- applications/ngarch/source/ngarch.f90 | 12 +- .../source/driver/shallow_water_model_mod.F90 | 3 +- .../shallow_water/source/shallow_water.f90 | 8 +- applications/solver/source/solver.F90 | 11 +- .../source/driver/transport_driver_mod.f90 | 2 +- applications/transport/source/transport.f90 | 12 +- dependencies.yaml | 4 +- .../time/jedi_lfric_time_test.f90 | 12 +- .../jedi_lfric_linear_modeldb_driver_mod.f90 | 6 +- .../nl/jedi_lfric_nl_modeldb_driver_mod.f90 | 7 +- .../source/mesh/jedi_lfric_mesh_setup_mod.F90 | 7 +- .../integration-test/cma_test/cma_test.f90 | 14 +- .../gungho/source/driver/gungho_model_mod.F90 | 3 +- .../runge_kutta/runge_kutta.f90 | 7 +- .../semi_implicit/semi_implicit.f90 | 7 +- .../source/utils/check_config_api_mod.f90 | 393 ++++++++++++++++++ 39 files changed, 665 insertions(+), 76 deletions(-) create mode 100644 science/shared/source/utils/check_config_api_mod.f90 diff --git a/applications/adjoint_tests/source/adjoint_tests.f90 b/applications/adjoint_tests/source/adjoint_tests.f90 index 5fa5b2232..6b507c26c 100644 --- a/applications/adjoint_tests/source/adjoint_tests.f90 +++ b/applications/adjoint_tests/source/adjoint_tests.f90 @@ -10,6 +10,7 @@ program adjoint_tests + use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use driver_collections_mod, only : init_collections, final_collections use driver_comm_mod, only : init_comm, final_comm @@ -38,6 +39,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) @@ -59,8 +61,12 @@ 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 ) + + call check_config_api( modeldb%configuration, modeldb%config ) + call init_collections() call init_time( modeldb ) deallocate( filename ) diff --git a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 index 46b88ddad..5ecef8fd2 100644 --- a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 +++ b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 @@ -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 ) diff --git a/applications/gravity_wave/source/gravity_wave.f90 b/applications/gravity_wave/source/gravity_wave.f90 index e1a988dd0..1492a7b68 100644 --- a/applications/gravity_wave/source/gravity_wave.f90 +++ b/applications/gravity_wave/source/gravity_wave.f90 @@ -11,6 +11,7 @@ program gravity_wave + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_modeldb_mod, only: modeldb_type use driver_collections_mod, only: init_collections, final_collections @@ -35,11 +36,15 @@ 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 ) + call check_config_api( modeldb%configuration, modeldb%config ) + deallocate( filename ) call init_logger( modeldb%mpi%get_comm(), program_name ) diff --git a/applications/gungho_model/source/gungho_model.f90 b/applications/gungho_model/source/gungho_model.f90 index da2050f69..6d9d5bdc5 100644 --- a/applications/gungho_model/source/gungho_model.f90 +++ b/applications/gungho_model/source/gungho_model.f90 @@ -15,6 +15,7 @@ program gungho_model + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use derived_config_mod, only: l_esm_couple use driver_collections_mod, only: init_collections, final_collections @@ -47,6 +48,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 @@ -70,8 +72,12 @@ 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 ) + + call check_config_api( modeldb%configuration, modeldb%config ) + call init_timers( application_name ) call init_collections() call init_time( modeldb ) diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 index 9748e3f94..093539b9b 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 @@ -13,8 +13,10 @@ program algorithm_test use add_mesh_map_mod, only: assign_mesh_maps + use check_config_api_mod, only: check_config_api 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, & @@ -52,6 +54,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 @@ -145,7 +148,11 @@ 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 check_config_api( configuration, config ) call init_collections() @@ -199,7 +206,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, & diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 index 4fd1b473b..5e5dc3761 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 index 8e981a2e9..cf463dc68 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 @@ -10,6 +10,8 @@ ! module jedi_run_mod + use check_config_api_mod, only : check_config_api + use config_mod, only : config_type use constants_mod, only : i_def, l_def, str_def use namelist_collection_mod, only : namelist_collection_type @@ -21,6 +23,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 @@ -34,6 +37,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 @@ -104,18 +110,22 @@ 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) call init_logger( lfric_comm, self%jedi_run_name ) + call check_config_api( self%configuration, self%config ) + ! Initialise subroutine timers call init_timers( self%jedi_run_name ) self%timers_finalised = .false. @@ -137,6 +147,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) diff --git a/applications/jedi_lfric_tests/source/jedi_forecast.f90 b/applications/jedi_lfric_tests/source/jedi_forecast.f90 index 00150b30d..fcf48de84 100644 --- a/applications/jedi_lfric_tests/source/jedi_forecast.f90 +++ b/applications/jedi_lfric_tests/source/jedi_forecast.f90 @@ -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, & @@ -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 @@ -76,6 +78,7 @@ 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') @@ -83,7 +86,7 @@ program jedi_forecast 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 ) diff --git a/applications/jedi_lfric_tests/source/jedi_forecast_pseudo.f90 b/applications/jedi_lfric_tests/source/jedi_forecast_pseudo.f90 index cec71e9d4..eb30c92c3 100644 --- a/applications/jedi_lfric_tests/source/jedi_forecast_pseudo.f90 +++ b/applications/jedi_lfric_tests/source/jedi_forecast_pseudo.f90 @@ -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, & @@ -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 @@ -75,6 +78,7 @@ 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') @@ -82,7 +86,7 @@ program jedi_forecast_pseudo 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 ) diff --git a/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 index ed8b0db66..adfa8a2b3 100644 --- a/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 @@ -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, & @@ -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 @@ -115,6 +118,7 @@ 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') @@ -122,7 +126,7 @@ program jedi_id_tlm_tests 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 ) diff --git a/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 b/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 index 2937a18de..dd9a75c29 100644 --- a/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 @@ -15,6 +15,7 @@ !> program jedi_lfric_tests + use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use driver_collections_mod, only : init_collections, final_collections use driver_comm_mod, only : init_comm, final_comm @@ -43,6 +44,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) @@ -64,8 +66,13 @@ 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 ) + + call check_config_api( modeldb%configuration, modeldb%config ) + call init_timers( application_name ) call init_collections() call init_time( modeldb ) diff --git a/applications/jedi_lfric_tests/source/jedi_tlm_forecast_tl.f90 b/applications/jedi_lfric_tests/source/jedi_tlm_forecast_tl.f90 index b3c2aa004..728b3e04f 100644 --- a/applications/jedi_lfric_tests/source/jedi_tlm_forecast_tl.f90 +++ b/applications/jedi_lfric_tests/source/jedi_tlm_forecast_tl.f90 @@ -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, & @@ -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 @@ -81,6 +84,7 @@ 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') @@ -88,7 +92,7 @@ program jedi_tlm_forecast_tl 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 ) diff --git a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 index da7f0342b..bfff68a72 100644 --- a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 @@ -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, & @@ -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 @@ -101,6 +103,7 @@ 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') @@ -108,7 +111,7 @@ program jedi_tlm_tests 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 ) diff --git a/applications/jules/source/jules.f90 b/applications/jules/source/jules.f90 index 5b2ca853a..e772b358d 100644 --- a/applications/jules/source/jules.f90 +++ b/applications/jules/source/jules.f90 @@ -16,6 +16,7 @@ program jules + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm @@ -44,6 +45,7 @@ program jules 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 @@ -66,8 +68,13 @@ program jules 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 ) + + call check_config_api( modeldb%configuration, modeldb%config ) + call init_timers( application_name ) call init_collections() call init_time( modeldb ) diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index 108104c11..70f23cb84 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -316,7 +316,7 @@ contains ! Create the required meshes !----------------------------------------------------------------------- stencil_depth = get_required_stencil_depth() - call init_mesh( modeldb%configuration, & + call init_mesh( modeldb%config, modeldb%configuration, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & mesh_names, extrusion, & diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 index f1134fce5..b2b544282 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 @@ -25,6 +25,7 @@ module lfric2lfric_init_mesh_mod use add_mesh_map_mod, only: assign_mesh_maps + use config_mod, only: config_type use constants_mod, only: i_def, l_def, str_max_filename use check_local_mesh_mod, only: check_local_mesh use create_mesh_mod, only: create_mesh @@ -81,17 +82,21 @@ module lfric2lfric_init_mesh_mod !> regridding method is 'map'. !> (unpartitioned mesh input only) !=============================================================================== -subroutine init_mesh( configuration, & +subroutine init_mesh( config, configuration, & local_rank, total_ranks, & mesh_names, & extrusion, & stencil_depth, & regrid_method ) + use partitioning_nml_iterator_mod, only: partitioning_nml_iterator_type + use partitioning_nml_mod, only: partitioning_nml_type + implicit none ! Arguments - type(namelist_collection_type) :: configuration + type(namelist_collection_type), intent(in) :: configuration + type(config_type), intent(in) :: config integer(kind=i_def), intent(in) :: local_rank integer(kind=i_def), intent(in) :: total_ranks @@ -108,8 +113,10 @@ subroutine init_mesh( configuration, & ! Namelist variables type(namelist_type), pointer :: lfric2lfric_nml => null() - type(namelist_type), pointer :: src_partitioning_nml => null() - type(namelist_type), pointer :: dst_partitioning_nml => null() + + type(partitioning_nml_type), pointer :: partitioning + type(partitioning_nml_type), pointer :: src_partitioning_nml + type(partitioning_nml_type), pointer :: dst_partitioning_nml ! partitioning namelist variables logical(l_def) :: generate_inner_halos(2) @@ -131,23 +138,28 @@ subroutine init_mesh( configuration, & class(panel_decomposition_type), allocatable :: decomposition_src, & decomposition_dst + type(partitioning_nml_iterator_type) :: iter !============================================================================ ! Extract and check configuration variables !============================================================================ - ! Read partitioning namelist for source and destination meshes - src_partitioning_nml => configuration%get_namelist('partitioning', & - 'source') - call src_partitioning_nml%get_value( 'generate_inner_halos', & - generate_inner_halos(src) ) + call iter%initialise(config%partitioning) + do while (iter%has_next()) + + partitioning => iter%next() + + if (trim(partitioning%get_profile_name()) == 'source') then + src_partitioning_nml => partitioning + else if (trim(partitioning%get_profile_name()) == 'destination') then + dst_partitioning_nml => partitioning + end if + end do - dst_partitioning_nml => configuration%get_namelist('partitioning', & - 'destination') - call dst_partitioning_nml%get_value( 'generate_inner_halos', & - generate_inner_halos(dst) ) + generate_inner_halos(src) = src_partitioning_nml%generate_inner_halos() + generate_inner_halos(dst) = dst_partitioning_nml%generate_inner_halos() ! Read lfric2lfric namelist - lfric2lfric_nml => configuration%get_namelist('lfric2lfric') + lfric2lfric_nml => configuration%get_namelist('lfric2lfric') call lfric2lfric_nml%get_value( 'prepartitioned_meshes', & prepartitioned ) @@ -231,7 +243,7 @@ subroutine init_mesh( configuration, & ! meshes are suitable for the supplied application ! configuration. !=========================================================== - call check_local_mesh( configuration, & + call check_local_mesh( config, & stencil_depth, & mesh_names ) diff --git a/applications/lfric2lfric/source/lfric2lfric.F90 b/applications/lfric2lfric/source/lfric2lfric.F90 index c40c5cc3d..8d119094c 100644 --- a/applications/lfric2lfric/source/lfric2lfric.F90 +++ b/applications/lfric2lfric/source/lfric2lfric.F90 @@ -15,6 +15,7 @@ program lfric2lfric use cli_mod, only: parse_command_line + use check_config_api_mod, only: check_config_api use constants_mod, only: precision_real use driver_collections_mod, only: init_collections, final_collections use driver_config_mod, only: init_config, final_config @@ -49,6 +50,7 @@ program lfric2lfric call parse_command_line( filename ) call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name ) write(log_scratch_space,'(A)') & 'Application built with '// trim(precision_real) // & @@ -68,8 +70,11 @@ program lfric2lfric #endif call init_comm( program_name, modeldb ) call init_config( filename, lfric2lfric_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), program_name ) + call check_config_api( modeldb%configuration, modeldb%config ) call init_collections() call init_time( modeldb ) deallocate( filename ) diff --git a/applications/lfric_atm/source/lfric_atm.f90 b/applications/lfric_atm/source/lfric_atm.f90 index 8f314f64d..e20bb167f 100644 --- a/applications/lfric_atm/source/lfric_atm.f90 +++ b/applications/lfric_atm/source/lfric_atm.f90 @@ -16,6 +16,7 @@ program lfric_atm + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm @@ -49,6 +50,7 @@ program lfric_atm 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 @@ -72,8 +74,10 @@ program lfric_atm 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 ) + call check_config_api( modeldb%configuration, modeldb%config ) call init_timers( application_name ) io_nml => modeldb%configuration%get_namelist('io') diff --git a/applications/lfric_coupled/source/lfric_coupled.f90 b/applications/lfric_coupled/source/lfric_coupled.f90 index 16b5d7375..5b050a8db 100644 --- a/applications/lfric_coupled/source/lfric_coupled.f90 +++ b/applications/lfric_coupled/source/lfric_coupled.f90 @@ -16,6 +16,7 @@ program lfric_coupled + use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use coupler_mod, only : set_cpl_name use driver_collections_mod, only : init_collections, final_collections @@ -43,7 +44,7 @@ program lfric_coupled 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 ) ! Create the depository, prognostics and diagnostics field collections @@ -67,8 +68,11 @@ program lfric_coupled 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 ) + call check_config_api( modeldb%configuration, modeldb%config ) call init_collections() call init_time( modeldb ) deallocate(filename) diff --git a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 index a0630d7bf..24bd883a6 100644 --- a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 +++ b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 @@ -5,6 +5,7 @@ ! *****************************COPYRIGHT******************************* module lfricinp_lfric_driver_mod +use check_config_api_mod, only: check_config_api use constants_mod, only: i_def, r_def, l_def, r_second, str_def use log_mod, only: log_event, log_scratch_space, & LOG_LEVEL_INFO, LOG_LEVEL_ERROR, & @@ -12,6 +13,7 @@ module lfricinp_lfric_driver_mod ! LFRic Modules use add_mesh_map_mod, only: assign_mesh_maps +use config_mod, only: config_type use create_mesh_mod, only: create_mesh use driver_collections_mod, only: init_collections, final_collections use driver_mesh_mod, only: init_mesh @@ -117,6 +119,7 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & type(namelist_collection_type), save :: configuration +type(config_type), save :: config type(namelist_type), pointer :: base_mesh_nml type(namelist_type), pointer :: planet_nml @@ -164,12 +167,17 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & call initialise_halo_comms( comm ) call configuration%initialise( program_name_arg, table_len=10 ) +call config%initialise( program_name_arg ) + call load_configuration( lfric_nl_fname, required_lfric_namelists, & - configuration ) + configuration=configuration, & + config=config ) ! Initialise logging system call init_logger( comm, program_name ) +call check_config_api( configuration, config ) + call init_collections() write(log_scratch_space, '(2(A,I0))') 'total ranks = ', total_ranks, & @@ -234,7 +242,8 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & !------------------------------------------------------------------------- stencil_depth = 2_i_def check_partitions = .false. -call init_mesh( configuration, & + +call init_mesh( config, & local_rank, total_ranks, & base_mesh_names, extrusion, & stencil_depth, check_partitions ) @@ -279,7 +288,7 @@ end subroutine lfricinp_initialise_lfric !------------------------------------------------------------------ subroutine load_configuration( lfric_nl, required_lfric_namelists, & - configuration ) + configuration, config ) ! Description: ! Reads lfric namelists and checks that all required namelists are present @@ -293,6 +302,7 @@ subroutine load_configuration( lfric_nl, required_lfric_namelists, & character(*), intent(in) :: required_lfric_namelists(:) type(namelist_collection_type), intent(INOUT) :: configuration +type(config_type), intent(INOUT) :: config logical :: okay logical, allocatable :: success_map(:) @@ -303,7 +313,9 @@ subroutine load_configuration( lfric_nl, required_lfric_namelists, & call log_event('Loading '//trim(program_name)//' configuration ...', & LOG_LEVEL_ALWAYS) -call read_configuration( lfric_nl, configuration ) +call read_configuration( lfric_nl, & + configuration=configuration, & + config=config ) okay = ensure_configuration(required_lfric_namelists, success_map) if (.not. okay) then diff --git a/applications/linear_model/source/linear_model.f90 b/applications/linear_model/source/linear_model.f90 index e58099d46..780c3715d 100644 --- a/applications/linear_model/source/linear_model.f90 +++ b/applications/linear_model/source/linear_model.f90 @@ -42,7 +42,7 @@ program linear_model 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) ! Create the depository, prognostics and diagnostics field collections @@ -63,8 +63,11 @@ program linear_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 ) + call init_timers( application_name ) call init_collections() call init_time( modeldb ) diff --git a/applications/name_transport/source/driver/name_transport_driver_mod.f90 b/applications/name_transport/source/driver/name_transport_driver_mod.f90 index 94e8365c0..061dbc5e3 100644 --- a/applications/name_transport/source/driver/name_transport_driver_mod.f90 +++ b/applications/name_transport/source/driver/name_transport_driver_mod.f90 @@ -239,11 +239,11 @@ subroutine initialise_name_transport( program_name, modeldb ) stencil_depth = get_required_stencil_depth() apply_partition_check = .false. - 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 ) call create_mesh( base_mesh_names, extrusion_2d, & diff --git a/applications/name_transport/source/name_transport.f90 b/applications/name_transport/source/name_transport.f90 index 7f8faab1d..4420440e7 100644 --- a/applications/name_transport/source/name_transport.f90 +++ b/applications/name_transport/source/name_transport.f90 @@ -9,6 +9,7 @@ program name_transport + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use constants_mod, only: i_def, r_def use driver_collections_mod, only: init_collections, final_collections @@ -40,12 +41,18 @@ program name_transport 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, name_transport_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), program_name ) + call check_config_api( modeldb%configuration, modeldb%config ) + call log_event( 'Miniapp will run with default precision set as:', & log_level_info ) write(log_scratch_space, '(" r_def kind = ", I0)') kind(1.0_r_def) diff --git a/applications/ngarch/source/ngarch.f90 b/applications/ngarch/source/ngarch.f90 index 919eec564..68076a9a7 100644 --- a/applications/ngarch/source/ngarch.f90 +++ b/applications/ngarch/source/ngarch.f90 @@ -8,6 +8,7 @@ !> @details Runs a GungHo model with a custom step method program ngarch + use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use driver_collections_mod, only : init_collections, final_collections use constants_mod, only : precision_real @@ -35,6 +36,8 @@ program ngarch call parse_command_line( filename ) call modeldb%configuration%initialise( application_name, table_len=10 ) + call modeldb%config%initialise( application_name ) + call modeldb%values%initialise( 'values', 5 ) ! Create the field collections in modeldb @@ -58,9 +61,12 @@ program ngarch modeldb%mpi => global_mpi call init_comm( application_name, modeldb ) - call init_config( filename, & - ngarch_required_namelists, & - modeldb%configuration ) + call init_config( filename, & + ngarch_required_namelists, & + configuration=modeldb%configuration, & + config=modeldb%config ) + call check_config_api( modeldb%configuration, modeldb%config ) + deallocate( filename ) call init_logger( modeldb%mpi%get_comm(), application_name ) diff --git a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 index f2706ce97..40ac6cf93 100644 --- a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 +++ b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 @@ -181,7 +181,8 @@ subroutine initialise_infrastructure( program_name, modeldb) ! --------------------------------------------------------- check_partitions = .false. stencil_depth = get_required_stencil_depth() - call init_mesh( modeldb%configuration, & + + call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, extrusion, & diff --git a/applications/shallow_water/source/shallow_water.f90 b/applications/shallow_water/source/shallow_water.f90 index c74a664b5..b164c1b48 100644 --- a/applications/shallow_water/source/shallow_water.f90 +++ b/applications/shallow_water/source/shallow_water.f90 @@ -14,6 +14,7 @@ program shallow_water + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm @@ -45,6 +46,7 @@ program shallow_water modeldb%mpi => global_mpi call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name ) ! Create the depository and prognostics field collections call modeldb%fields%add_empty_field_collection("depository", & @@ -59,8 +61,12 @@ program shallow_water call init_comm( program_name, modeldb ) call init_config( filename, shallow_water_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) call init_logger( global_mpi%get_comm(), program_name ) + + call check_config_api( modeldb%configuration, modeldb%config ) + call init_timers( program_name ) call init_counters( program_name ) call init_collections() diff --git a/applications/solver/source/solver.F90 b/applications/solver/source/solver.F90 index 9c06cb220..65d816094 100644 --- a/applications/solver/source/solver.F90 +++ b/applications/solver/source/solver.F90 @@ -12,6 +12,7 @@ program solver use add_mesh_map_mod, only: assign_mesh_maps + use config_mod, only: config_type use constants_mod, only: i_def, r_def, PRECISION_REAL, str_def use convert_to_upper_mod, only: convert_to_upper use cli_mod, only: parse_command_line @@ -47,7 +48,6 @@ program solver use namelist_mod, only: namelist_type use sci_checksum_alg_mod, only: checksum_alg - !------------------------------------ ! Configuration modules !------------------------------------ @@ -60,6 +60,7 @@ program solver character(:), allocatable :: filename type(namelist_collection_type), SAVE :: configuration + type(config_type), SAVE :: config integer(i_def) :: total_ranks, local_rank type(lfric_comm_type) :: comm @@ -117,9 +118,13 @@ program solver local_rank = global_mpi%get_comm_rank() call configuration%initialise( program_name, table_len=10 ) + call config%initialise( program_name ) + call init_config( filename, solver_required_namelists, & - configuration ) + configuration=configuration, & + config=config ) call init_logger( comm, program_name ) + call init_collections() deallocate( filename ) @@ -185,7 +190,7 @@ program solver !----------------------------------------------------------------------- stencil_depth = 1 check_partitions = .false. - call init_mesh( configuration, & + call init_mesh( config, & local_rank, total_ranks, & base_mesh_names, extrusion, & stencil_depth, check_partitions ) diff --git a/applications/transport/source/driver/transport_driver_mod.f90 b/applications/transport/source/driver/transport_driver_mod.f90 index 2f9d4361d..666c0f1c1 100644 --- a/applications/transport/source/driver/transport_driver_mod.f90 +++ b/applications/transport/source/driver/transport_driver_mod.f90 @@ -290,7 +290,7 @@ subroutine initialise_transport( program_name, modeldb ) apply_partition_check = .true. end if - call init_mesh( modeldb%configuration, & + call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & diff --git a/applications/transport/source/transport.f90 b/applications/transport/source/transport.f90 index a4ea8347a..b027424ee 100644 --- a/applications/transport/source/transport.f90 +++ b/applications/transport/source/transport.f90 @@ -8,6 +8,7 @@ !> run_transport() and finalise_transport(). program transport + use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use constants_mod, only: i_def, r_def use driver_collections_mod, only: init_collections, final_collections @@ -36,13 +37,20 @@ program transport call parse_command_line( filename ) - call modeldb%configuration%initialise( program_name, table_len=10 ) modeldb%mpi => global_mpi + call init_comm( program_name, modeldb ) + + call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name ) + call init_config( filename, transport_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) call init_logger( modeldb%mpi%get_comm(), program_name ) + call check_config_api( modeldb%configuration, modeldb%config ) + call log_event( 'Miniapp will run with default precision set as:', & log_level_trace ) write(log_scratch_space, '(" r_def kind = ", I0)') kind(1.0_r_def) diff --git a/dependencies.yaml b/dependencies.yaml index 473a2c6ee..e6df37946 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,8 +30,8 @@ lfric_apps: ref: lfric_core: - source: git@github.com:MetOffice/lfric_core.git - ref: 5d4d72f0e35f00e71b1757df6beadec21ece97f0 + source: cazld000020:/data/users/ricky.wong/GitHub/lfric_core + ref: IntermediateApiPurge moci: source: git@github.com:MetOffice/moci.git diff --git a/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 b/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 index 3f75a4c82..4e073568f 100644 --- a/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 +++ b/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 @@ -10,6 +10,8 @@ !! jedi_lfric_time_test.py. program jedi_lfric_time_test + use check_config_api_mod, only : check_config_api + use config_mod, only : config_type use configuration_mod, only : final_configuration, & read_configuration use constants_mod, only : i_def, r_def, l_def @@ -52,6 +54,7 @@ program jedi_lfric_time_test character(:), allocatable :: filename type(namelist_collection_type), save :: configuration + type(config_type), save :: config ! Variables used for parsing command line arguments integer(i_def) :: length, status, nargs @@ -172,7 +175,14 @@ program jedi_lfric_time_test ! Setup configuration, and initialise tests 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 check_config_api( configuration, config ) + call test_jedi_interface_init() if ( do_test_init_string_err ) then diff --git a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 index c7d2bb148..0c1192351 100644 --- a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 @@ -43,6 +43,7 @@ module jedi_lfric_linear_modeldb_driver_mod adjoint_step, & finalise_adjoint_model use atl_si_timestep_alg_mod, only : atl_si_timestep_type + use check_config_api_mod, only : check_config_api use constants_mod, only : r_def, l_def, str_def use driver_config_mod, only : init_config use driver_time_mod, only : init_time, final_time @@ -119,6 +120,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ ! 1. Initialise modeldb field collections, configuration and mpi. modeldb%mpi => mpi_obj call modeldb%configuration%initialise( modeldb_name, table_len=10 ) + call modeldb%config%initialise( modeldb_name ) call modeldb%values%initialise('values', 5) @@ -139,7 +141,8 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ call modeldb%io_contexts%initialise(modeldb_name, table_len=100) call init_config( filename, gungho_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) ! 2. Setup some model modeldb%values and initialise infrastructure call modeldb%values%add_key_value( 'temperature_correction_rate', 0.0_r_def ) @@ -149,6 +152,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ ! Initialise infrastructure call init_time( modeldb ) call initialise_infrastructure( io_context_name, modeldb ) + call check_config_api( modeldb%configuration, modeldb%config ) ! Add a place to store time axes in modeldb call modeldb%values%add_key_value('model_axes', model_axes) diff --git a/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 index 6d1405ba6..8272ed2dd 100644 --- a/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 @@ -22,6 +22,7 @@ !> module jedi_lfric_nl_modeldb_driver_mod + use check_config_api_mod, only : check_config_api use constants_mod, only : l_def use driver_config_mod, only : init_config use driver_time_mod, only : init_time, final_time @@ -67,6 +68,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb ) ! 1. Initialise modeldb field collections, configuration and mpi. modeldb%mpi => mpi_obj call modeldb%configuration%initialise( modeldb_name, table_len=10 ) + call modeldb%config%initialise( modeldb_name ) call modeldb%values%initialise('values', table_len = 5) @@ -89,7 +91,8 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb ) call modeldb%io_contexts%initialise(modeldb_name, table_len=100) call init_config( filename, gungho_required_namelists, & - modeldb%configuration ) + configuration=modeldb%configuration, & + config=modeldb%config ) ! 3. Initialise the clock and calendar call init_time( modeldb ) @@ -97,6 +100,8 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb ) ! 4. Call the gungho driver initialise call gh_initialise(modeldb_name, modeldb) + call check_config_api( modeldb%configuration, modeldb%config ) + end subroutine initialise_modeldb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 index 24665d5b9..6857363e6 100644 --- a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 +++ b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 @@ -10,6 +10,7 @@ module jedi_lfric_mesh_setup_mod use add_mesh_map_mod, only: assign_mesh_maps use base_mesh_config_mod, only: GEOMETRY_SPHERICAL, & GEOMETRY_PLANAR + use config_mod, only: config_type use constants_mod, only: str_def, i_def, l_def, r_def use create_mesh_mod, only: create_mesh use driver_mesh_mod, only: init_mesh @@ -36,14 +37,16 @@ module jedi_lfric_mesh_setup_mod !> !> @param [out] mesh_name The name of the mesh being setup !> @param [in] configuration The geometry configuration + !> @param [in] config The geometry configuration !> @param [inout] mpi_obj The mpi communicator !> @param [in] alt_mesh_name The name of an alternative mesh_name to setup - subroutine initialise_mesh( mesh_name, configuration, mpi_obj, alt_mesh_name ) + subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_name ) implicit none character(len=*), intent(out) :: mesh_name type(namelist_collection_type), intent(in) :: configuration + type(config_type), intent(in) :: config !> @todo: This should be intent in but when calling the method I get !> a compiler failure class(lfric_mpi_type), intent(inout) :: mpi_obj @@ -124,7 +127,7 @@ subroutine initialise_mesh( mesh_name, configuration, mpi_obj, alt_mesh_name ) !------------------------------------------------------------------------- stencil_depth = 2 apply_partition_check = .false. - call init_mesh( configuration, & + call init_mesh( config, & mpi_obj%get_comm_rank(), & mpi_obj%get_comm_size(), & base_mesh_names, & diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 2797865da..743fca508 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -29,6 +29,7 @@ program cma_test test_cma_add, & test_cma_apply_inv, & test_cma_diag_DhMDhT + use config_mod, only : config_type use constants_mod, only : i_def, r_def, i_def, l_def, & r_solver, pi, str_def use derived_config_mod, only : set_derived_config @@ -65,6 +66,8 @@ program cma_test use sci_chi_transform_mod, only : init_chi_transforms, & final_chi_transforms + use check_config_api_mod, only: check_config_api + implicit none ! MPI communicator @@ -125,6 +128,7 @@ program cma_test ! Namelist and configuration variables type(namelist_collection_type), save :: configuration + type(config_type), save :: config type(namelist_type), pointer :: extrusion_nml type(namelist_type), pointer :: base_mesh_nml @@ -232,6 +236,9 @@ program cma_test end select call configuration%initialise( program_name, table_len=10 ) + call config%initialise( program_name ) + + call check_config_api( configuration, config ) deallocate(program_name) deallocate(test_flag) @@ -243,7 +250,9 @@ program cma_test call log_event( log_scratch_space, LOG_LEVEL_INFO ) allocate( success_map(size(required_configuration)) ) - call read_configuration( filename, configuration ) + call read_configuration( filename, & + configuration=configuration, & + config=config ) okay = ensure_configuration( required_configuration, success_map ) if (.not. okay) then @@ -291,7 +300,8 @@ program cma_test stencil_depth = get_required_stencil_depth() check_partitions = .false. - call init_mesh( configuration, & + + call init_mesh( config, & local_rank, total_ranks, & base_mesh_names, extrusion, & stencil_depth, check_partitions ) diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index e91f0fbd6..ee30f64fd 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -673,7 +673,8 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) end if stencil_depth = get_required_stencil_depth() - call init_mesh( modeldb%configuration, & + + call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & diff --git a/science/linear/integration-test/runge_kutta/runge_kutta.f90 b/science/linear/integration-test/runge_kutta/runge_kutta.f90 index f460201ac..ac4fae76d 100644 --- a/science/linear/integration-test/runge_kutta/runge_kutta.f90 +++ b/science/linear/integration-test/runge_kutta/runge_kutta.f90 @@ -146,7 +146,12 @@ program runge_kutta end select call modeldb%configuration%initialise( program_name, table_len=10 ) - call read_configuration( filename, modeldb%configuration ) + call modeldb%config%initialise( program_name ) + + call read_configuration( filename, & + configuration=modeldb%configuration, & + config=modeldb%config ) + deallocate( filename ) call init_collections() diff --git a/science/linear/integration-test/semi_implicit/semi_implicit.f90 b/science/linear/integration-test/semi_implicit/semi_implicit.f90 index af625729c..572475e7f 100644 --- a/science/linear/integration-test/semi_implicit/semi_implicit.f90 +++ b/science/linear/integration-test/semi_implicit/semi_implicit.f90 @@ -133,7 +133,12 @@ program semi_implicit end select call modeldb%configuration%initialise( program_name, table_len=10 ) - call read_configuration( filename, modeldb%configuration ) + call modeldb%config%initialise( program_name) + + call read_configuration( filename, & + configuration=modeldb%configuration, & + config=modeldb%config ) + deallocate( filename ) call init_collections() diff --git a/science/shared/source/utils/check_config_api_mod.f90 b/science/shared/source/utils/check_config_api_mod.f90 new file mode 100644 index 000000000..ea0c61ce3 --- /dev/null +++ b/science/shared/source/utils/check_config_api_mod.f90 @@ -0,0 +1,393 @@ +! ADD Licence????? +!================================================================ +! Temporary code to check new and old confiuration objects return +! the same configuration values. This is to manage the transition +! of the codebase from using a namelist_collection_type to a +! config_type +!================================================================ +module check_config_api_mod + + use constants_mod, only: l_def, i_def, r_def, & + str_def, str_max_filename, & + r_second, i_medium + use config_mod, only: config_type + use log_mod, only: log_event, log_level_warning, & + log_level_info + use namelist_collection_mod, only: namelist_collection_type + use namelist_mod, only: namelist_type + + implicit none + + private + public :: check_config_api + +contains + +subroutine check_config_api( configuration, config ) + + implicit none + + type(namelist_collection_type), intent(in) :: configuration + type(config_type), intent(in) :: config + + type(namelist_type), pointer :: aerosol_nml + type(namelist_type), pointer :: base_mesh_nml + type(namelist_type), pointer :: extrusion_nml + type(namelist_type), pointer :: files_nml + + type(namelist_type), pointer :: planet_nml + type(namelist_type), pointer :: io_nml + type(namelist_type), pointer :: timestepping_nml + type(namelist_type), pointer :: time_nml + type(namelist_type), pointer :: mixed_solver_nml + type(namelist_type), pointer :: microphysics_nml + type(namelist_type), pointer :: multires_coupling_nml + type(namelist_type), pointer :: multigrid_nml + type(namelist_type), pointer :: formulation_nml + type(namelist_type), pointer :: initialization_nml + type(namelist_type), pointer :: boundaries_nml + type(namelist_type), pointer :: finite_element_nml + +! initial_temperature, bvf_square r_def +! gravity_wave_constants b_space i_def + character(str_max_filename) :: start_dump_filename + character(str_max_filename) :: checkpoint_stem_name +! lfric2lfric regrid_method i_def + character(str_def) :: prime_mesh_name + character(str_def) :: aerosol_mesh_name + character(str_def) :: orography_mesh_name + character(str_def) :: time_origin + character(str_def) :: time_start + character(str_max_filename) :: file_prefix + + logical(l_def) :: prepartitioned + integer(i_def) :: geometry + integer(i_def) :: moisture_formulation + integer(i_def) :: lbc_option + integer(i_def) :: ls_option + integer(i_def) :: init_option + integer(i_def) :: lbc_eos_height + integer(i_def) :: model_eos_height + + real(r_def) :: tau_r + real(r_def) :: atol + real(r_def) :: domain_height + real(r_def) :: planet_radius + real(r_def) :: scaled_radius + real(r_second) :: dt + integer(i_def) :: method + integer(i_def) :: nlayers + integer(i_def) :: element_order_h + integer(i_def) :: element_order_v + integer(i_medium) :: diag_freq + logical(l_def) :: nodal + logical(l_def) :: write_diag + logical(l_def) :: use_xios_io + logical(l_def) :: l_multigrid + logical(l_def) :: use_multires_coupling + logical(l_def) :: subroutine_timers + logical(l_def) :: ozone_ancil + logical(l_def) :: aero_ancil + logical(l_def) :: murk_lbc + logical(l_def) :: microphysics_casim + logical(l_def) :: read_w2h_wind + +! character(str_def), allocatable :: chain_mesh_tags(:) +! character(str_def), allocatable :: multires_coupling_mesh_tags(:) + + character(*), parameter :: message = 'Difference in config objects ' + + call log_event('Validating Config/Configuration object data.', & + log_level_info) + + if (configuration%namelist_exists('base_mesh')) then + base_mesh_nml => configuration%get_namelist('base_mesh') + + call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) + call base_mesh_nml%get_value( 'file_prefix', file_prefix ) + call base_mesh_nml%get_value( 'geometry', geometry ) + call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) + + if (prime_mesh_name /= config%base_mesh%prime_mesh_name()) then + call log_event(message//'prime_mesh_name', log_level_warning) + end if + + if (file_prefix /= config%base_mesh%file_prefix()) then + call log_event(message//'file_prefix', log_level_warning) + end if + + if (geometry /= config%base_mesh%geometry()) then + call log_event(message//'geometry', log_level_warning) + end if + + if (prepartitioned .neqv. config%base_mesh%prepartitioned()) then + call log_event(message//'prepartitioned', log_level_warning) + end if + end if + + if (configuration%namelist_exists('extrusion')) then + extrusion_nml => configuration%get_namelist('extrusion') + + call extrusion_nml%get_value( 'method', method ) + call extrusion_nml%get_value( 'planet_radius', planet_radius ) + call extrusion_nml%get_value( 'domain_height', domain_height ) + call extrusion_nml%get_value( 'number_of_layers', nlayers ) + + if (method /= config%extrusion%method()) then + call log_event(message//'method', log_level_warning) + end if + + if (planet_radius /= config%extrusion%planet_radius()) then + call log_event(message//'planet_radius', log_level_warning) + end if + + if (domain_height /= config%extrusion%domain_height()) then + call log_event(message//'domain_height', log_level_warning) + end if + + if (nlayers /= config%extrusion%number_of_layers()) then + call log_event(message//'number_of_layers', log_level_warning) + end if + end if + + if (configuration%namelist_exists('io')) then + io_nml => configuration%get_namelist('io') + + call io_nml%get_value( 'nodal_output_on_w3', nodal ) + call io_nml%get_value( 'write_diag', write_diag ) + call io_nml%get_value( 'use_xios_io', use_xios_io ) + call io_nml%get_value( 'subroutine_timers', subroutine_timers ) + call io_nml%get_value( 'diagnostic_frequency', diag_freq ) + + if (diag_freq /= config%io%diagnostic_frequency()) then + call log_event(message//'diagnostic_frequency', log_level_warning) + end if + + if (nodal .neqv. config%io%nodal_output_on_w3()) then + call log_event(message//'nodal_output_on_w3', log_level_warning) + end if + + if (write_diag .neqv. config%io%write_diag()) then + call log_event(message//'write_diag', log_level_warning) + end if + + if (use_xios_io .neqv. config%io%use_xios_io()) then + call log_event(message//'use_xios_io', log_level_warning) + end if + + if (subroutine_timers .neqv. config%io%subroutine_timers()) then + call log_event(message//'subroutine_timers', log_level_warning) + end if + end if + + if (configuration%namelist_exists('finite_element')) then + finite_element_nml => configuration%get_namelist('finite_element') + + call finite_element_nml%get_value('element_order_h', element_order_h) + call finite_element_nml%get_value('element_order_v', element_order_v) + + if (element_order_h /= config%finite_element%element_order_h()) then + call log_event( message//'element_order_h', log_level_warning ) + end if + + if (element_order_v /= config%finite_element%element_order_v()) then + call log_event( message//'element_order_v', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('formulation')) then + formulation_nml => configuration%get_namelist('formulation') + + call formulation_nml%get_value('l_multigrid', l_multigrid) + call formulation_nml%get_value('moisture_formulation', moisture_formulation) + call formulation_nml%get_value('use_multires_coupling', use_multires_coupling) + + if (moisture_formulation /= config%formulation%moisture_formulation()) then + call log_event( message//'moisture_formulation', log_level_warning ) + end if + + if (l_multigrid .neqv. config%formulation%l_multigrid()) then + call log_event( message//'l_multigrid', log_level_warning ) + end if + + if (use_multires_coupling .neqv. config%formulation%use_multires_coupling()) then + call log_event( message//'use_multires_coupling', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('planet')) then + planet_nml => configuration%get_namelist('planet') + + call planet_nml%get_value( 'scaled_radius', scaled_radius ) + + if (scaled_radius /= config%planet%scaled_radius()) then + call log_event( message//'scaled_radius', log_level_warning ) + end if + end if + + + if (configuration%namelist_exists('timestepping')) then + timestepping_nml => configuration%get_namelist('timestepping') + + call timestepping_nml%get_value( 'dt', dt ) + call timestepping_nml%get_value( 'tau_r', tau_r ) + + if (dt /= config%timestepping%dt()) then + call log_event( message//'dt', log_level_warning ) + end if + + if (tau_r /= config%timestepping%tau_r()) then + call log_event( message//'tau_r', log_level_warning ) + end if + + end if + + + if (configuration%namelist_exists('mixed_solver')) then + mixed_solver_nml => configuration%get_namelist('mixed_solver') + + call mixed_solver_nml%get_value('mixed_solver_a_tol', atol) + + if (atol /= config%mixed_solver%mixed_solver_a_tol()) then + call log_event( message//'mixed_solver_a_tol', log_level_warning ) + end if + end if + + + if (configuration%namelist_exists('initialization')) then + initialization_nml => configuration%get_namelist('initialization') + + call initialization_nml%get_value('ls_option', ls_option) + call initialization_nml%get_value('lbc_option', lbc_option) + call initialization_nml%get_value('coarse_aerosol_ancil', aero_ancil) + call initialization_nml%get_value('coarse_ozone_ancil', ozone_ancil) + call initialization_nml%get_value('init_option', init_option) + call initialization_nml%get_value('model_eos_height', model_eos_height) + call initialization_nml%get_value('read_w2h_wind', read_w2h_wind) + + if (ls_option /= config%initialization%ls_option()) then + call log_event( message//'ls_option', log_level_warning ) + end if + + if (lbc_option /= config%initialization%lbc_option()) then + call log_event( message//'lbc_option', log_level_warning ) + end if + + if (init_option /= config%initialization%init_option()) then + call log_event( message//'init_option', log_level_warning ) + end if + + if (aero_ancil .neqv. config%initialization%coarse_aerosol_ancil()) then + call log_event( message//'aerosol_ancil', log_level_warning ) + end if + + if (ozone_ancil .neqv. config%initialization%coarse_ozone_ancil()) then + call log_event( message//'ozone_ancil', log_level_warning ) + end if + + if (model_eos_height /= config%initialization%model_eos_height()) then + call log_event( message//'model_eos_height', log_level_warning ) + end if + + if (read_w2h_wind .neqv. config%initialization%read_w2h_wind()) then + call log_event( message//'read_w2h_wind', log_level_warning ) + end if + + end if + + + if (configuration%namelist_exists('boundaries')) then + boundaries_nml => configuration%get_namelist('boundaries') + + call boundaries_nml%get_value('lbc_eos_height', lbc_eos_height) + + if (lbc_eos_height /= config%boundaries%lbc_eos_height()) then + call log_event( message//'lbc_eos_height', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('multires_coupling')) then + multires_coupling_nml => configuration%get_namelist('multires_coupling') + + call multires_coupling_nml%get_value('aerosol_mesh_name', aerosol_mesh_name) + call multires_coupling_nml%get_value('orography_mesh_name', orography_mesh_name) +! call multires_coupling_nml%get_value('multires_coupling_mesh_tags', multires_coupling_mesh_tags) + + if (orography_mesh_name /= config%multires_coupling%orography_mesh_name()) then + call log_event( message//'orography_mesh_name', log_level_warning ) + end if + +!!$ if (multires_coupling_mesh_tags /= config%multires_coupling%multires_coupling_mesh_tags()) then +!!$ call log_event( message//'multires_coupling_mesh_tags', log_level_warning ) +!!$ end if + + if (aerosol_mesh_name /= config%multires_coupling%aerosol_mesh_name()) then + call log_event( message//'aerosol_mesh_name', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('aerosol')) then + aerosol_nml => configuration%get_namelist('aerosol') + + call aerosol_nml%get_value('murk_lbc', murk_lbc) + + if (murk_lbc .neqv. config%aerosol%murk_lbc()) then + call log_event( message//'murk_lbc', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('multigrid')) then + multigrid_nml => configuration%get_namelist('multigrid') + +!!$ call multigrid_nml%get_value('chain_mesh__tags', chain_mesh_tags) +!!$ chain_mesh_tags_2 = config%multigrid%chain_mesh_tags() +!!$ do i=1, size(chain_mesh_tags) +!!$ if (chain_mesh_tags /= config%multigrid%chain_mesh_tags()) then +!!$ call log_event( message//'chain_mesh_tags', log_level_warning ) +!!$ end if +!!$ end do + end if + + if (configuration%namelist_exists('microphysics')) then + microphysics_nml => configuration%get_namelist('microphysics') + + call microphysics_nml%get_value('microphysics_casim', microphysics_casim) + + if (microphysics_casim .neqv. config%microphysics%microphysics_casim()) then + call log_event( message//'microphysics_casim', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('time')) then + time_nml => configuration%get_namelist('time') + + call time_nml%get_value('calendar_origin', time_origin) + call time_nml%get_value('calendar_start', time_start) + + if (time_origin /= config%time%calendar_origin()) then + call log_event( message//'calendar_origin', log_level_warning ) + end if + + if (time_start /= config%time%calendar_start()) then + call log_event( message//'calendar_start', log_level_warning ) + end if + end if + + if (configuration%namelist_exists('files')) then + files_nml => configuration%get_namelist('files') + + call files_nml%get_value('start_dump_filename', start_dump_filename) + call files_nml%get_value('checkpoint_stem_name', checkpoint_stem_name) + + if (start_dump_filename /= config%files%start_dump_filename()) then + call log_event( message//'start_dump_filename', log_level_warning ) + end if + + if (checkpoint_stem_name /= config%files%checkpoint_stem_name()) then + call log_event( message//'checkpoint_stem_name', log_level_warning ) + end if + end if + +end subroutine check_config_api + +end module check_config_api_mod From f146829b2faa992560b769de9863c15c8fc3c516 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:22:23 +0000 Subject: [PATCH 06/17] Link this branch to the LFRic Core Branch --- dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yaml b/dependencies.yaml index 6bf41fd78..5b56a8aba 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -31,7 +31,7 @@ lfric_apps: lfric_core: source: git@github.com:MetOffice/lfric_core.git - ref: aa328242675491338ddb888d4d747b5e02d3754c + ref: FloatJacobian moci: source: git@github.com:MetOffice/moci.git From c763d41e56775cf7e4943914a93ecae0758ec6e8 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Mon, 26 Jan 2026 14:49:37 +0000 Subject: [PATCH 07/17] Add changes to argument lists --- .../initial_buoyancy_kernel_mod_test.pf | 2 +- .../kernel/set_name_field_kernel_mod.F90 | 8 ++++++- .../kernel/set_name_field_kernel_mod_test.pf | 2 +- .../initial_swe_streamfunc_kernel_mod.F90 | 15 ++++++++---- .../kernel/initial_swe_u_kernel_mod.F90 | 22 ++++++++++------- .../initial_vorticity_v2_kernel_mod.F90 | 14 +++++++---- .../kernel/initial_geopot_kernel_mod_test.pf | 2 +- .../initial_swe_buoyancy_kernel_mod_test.pf | 2 +- .../initial_swe_tracer_kernel_mod_test.pf | 2 +- .../kernel/initial_swe_u_kernel_mod_test.pf | 2 +- .../kernel/set_tracer_field_kernel_mod.F90 | 10 ++++++-- ...ial_tracer_field_sample_kernel_mod_test.pf | 2 +- .../set_tracer_field_kernel_mod_test.pf | 2 +- dependencies.yaml | 4 ++-- .../adj_sci_convert_hdiv_field_kernel_mod.F90 | 11 +++++++-- .../integration-test/cma_test/cma_test.f90 | 5 ++-- .../compute_coriolis_matrix_kernel_mod.F90 | 14 +++++++---- .../compute_dl_matrix_kernel_mod.F90 | 11 ++++++--- ...ompute_vert_coriolis_matrix_kernel_mod.F90 | 14 +++++++---- .../kinetic_energy_gradient_kernel_mod.F90 | 7 +++++- .../project_eos_pressure_kernel_mod.F90 | 7 +++++- .../project_eos_rho_kernel_mod.F90 | 10 ++++++-- .../rhs_project_eos_kernel_mod.F90 | 7 +++++- .../vorticity_rhs_kernel_mod.F90 | 7 +++++- .../compute_energetics_kernel_mod.f90 | 7 +++++- .../compute_entropy_kernel_mod.F90 | 7 +++++- .../compute_moist_mass_kernel_mod.F90 | 7 +++++- .../compute_total_aam_kernel_mod.F90 | 9 ++++++- .../compute_total_pv_kernel_mod.F90 | 11 +++++---- .../initial_streamfunc_kernel_mod.F90 | 15 ++++++++---- .../initialisation/initial_u_kernel_mod.F90 | 19 ++++++++++----- .../initialisation/set_exner_kernel_mod.F90 | 10 ++++++-- .../initialisation/set_rho_kernel_mod.F90 | 9 +++++-- .../eliminated_theta_q22_kernel_mod.F90 | 8 ++++++- .../project_eos_operators_kernel_mod.F90 | 8 ++++++- .../solver/w2_normalisation_kernel_mod.F90 | 24 ++++++++++++------- .../kernel/solver/weighted_m3_kernel_mod.F90 | 7 +++++- .../common/vorticity_advection_kernel_mod.F90 | 10 ++++++-- .../w2_vorticity_advection_kernel_mod.F90 | 7 +++++- ...compute_coriolis_matrix_kernel_mod_test.pf | 2 +- .../compute_dl_matrix_kernel_mod_test.pf | 4 ++-- ...te_vert_coriolis_matrix_kernel_mod_test.pf | 2 +- ...kinetic_energy_gradient_kernel_mod_test.pf | 4 ++-- .../project_eos_pressure_kernel_mod_test.pf | 2 +- .../project_eos_rho_kernel_mod_test.pf | 2 +- .../rhs_project_eos_kernel_mod_test.pf | 2 +- .../vorticity_rhs_kernel_mod_test.pf | 4 ++-- .../compute_energetics_kernel_mod_test.pf | 5 ++-- .../compute_entropy_kernel_mod_test.pf | 4 ++-- .../compute_moist_mass_kernel_mod_test.pf | 4 ++-- .../compute_total_aam_kernel_mod_test.pf | 2 +- .../compute_total_pv_kernel_mod_test.pf | 3 ++- .../momentum_viscosity_kernel_mod_test.pf | 4 ++-- ...tracer_smagorinsky_diff_kernel_mod_test.pf | 4 ++-- .../tracer_viscosity_kernel_mod_test.pf | 4 ++-- .../deep_hot_jupiter_kernel_mod_test.pf | 4 ++-- .../earth_like_kernel_mod_test.pf | 4 ++-- .../held_suarez_kernel_mod_test.pf | 6 ++--- .../shallow_hot_jupiter_kernel_mod_test.pf | 4 ++-- .../tidally_locked_earth_kernel_mod_test.pf | 14 ++++++----- .../hydrostatic_exner_kernel_mod_test.pf | 2 +- .../initial_rho_sample_kernel_mod_test.pf | 2 +- .../initial_u_kernel_mod_test.pf | 2 +- .../initialisation/set_rho_kernel_mod_test.pf | 2 +- .../eliminated_theta_q22_kernel_mod_test.pf | 4 ++-- .../project_eos_operators_kernel_mod_test.pf | 2 +- .../solver/weighted_m3_kernel_mod_test.pf | 4 ++-- .../panel_edge_coords_kernel_mod_test.pf | 2 +- .../panel_edge_weights_kernel_mod_test.pf | 2 +- .../vorticity_advection_kernel_mod_test.pf | 4 ++-- .../w2_vorticity_advection_kernel_mod_test.pf | 4 ++-- ...poly1d_advective_coeffs_kernel_mod_test.pf | 2 +- .../mol/poly1d_flux_coeffs_kernel_mod_test.pf | 2 +- ...poly2d_advective_coeffs_kernel_mod_test.pf | 2 +- .../mol/poly2d_flux_coeffs_kernel_mod_test.pf | 3 ++- ...ytic_orography_field_spherical_mod_test.pf | 2 +- .../tl_kinetic_energy_gradient_kernel_mod.F90 | 7 +++++- .../tl_project_eos_pressure_kernel_mod.F90 | 7 +++++- .../tl_rhs_project_eos_kernel_mod.F90 | 7 +++++- .../tl_vorticity_advection_kernel_mod.F90 | 10 ++++++-- .../initial_theta_ref_kernel_mod_test.pf | 2 +- ...kinetic_energy_gradient_kernel_mod_test.pf | 4 ++-- ...tl_project_eos_pressure_kernel_mod_test.pf | 2 +- .../tl_rhs_project_eos_kernel_mod_test.pf | 2 +- .../tl_sample_eos_pressure_kernel_mod_test.pf | 2 +- .../tl_vorticity_advection_kernel_mod_test.pf | 4 ++-- 86 files changed, 350 insertions(+), 162 deletions(-) diff --git a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf index 8a3ca705d..be9f43f92 100644 --- a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf +++ b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf @@ -77,7 +77,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 b/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 index b0a58ca5c..453a1cc18 100644 --- a/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 +++ b/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 @@ -21,6 +21,10 @@ module set_name_field_kernel_mod use kernel_mod, only : kernel_type use log_mod, only : log_event, LOG_LEVEL_ERROR + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -143,7 +147,9 @@ subroutine set_name_field_code(nlayers, tracer, & chi_2_e(df1) = chi_2( map_chi(df1) + k ) chi_3_e(df1) = chi_3( map_chi(df1) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj) diff --git a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf index 7ae24e5d4..554823758 100644 --- a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf +++ b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf @@ -91,7 +91,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 index 26df19f6e..b9221ca88 100644 --- a/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 @@ -18,8 +18,13 @@ module initial_swe_streamfunc_kernel_mod use constants_mod, only : r_def, i_def, PI use fs_continuity_mod, only : W1 use kernel_mod, only : kernel_type + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius use shallow_water_settings_config_mod, & - only : swe_test + only: swe_test implicit none @@ -86,8 +91,6 @@ subroutine initial_swe_streamfunc_code(nlayers, rhs, chi_1, chi_2, chi_3, panel_ use analytic_swe_streamfunction_profiles_mod, & only: analytic_swe_streamfunction - use base_mesh_config_mod, only: geometry, & - geometry_spherical use sci_coordinate_jacobian_mod, only: coordinate_jacobian, & coordinate_jacobian_inverse use coord_transform_mod, only: sphere2cart_vector @@ -135,7 +138,11 @@ subroutine initial_swe_streamfunc_code(nlayers, rhs, chi_1, chi_2, chi_3, panel_ chi_3_cell(df) = chi_3( map_chi(df) ) end do - call coordinate_jacobian( ndf_chi, & + call coordinate_jacobian( coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 index fbad6cef9..6d93ab3d9 100644 --- a/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 @@ -19,13 +19,17 @@ module initial_swe_u_kernel_mod ANY_DISCONTINUOUS_SPACE_3 use constants_mod, only : r_def, PI, i_def use fs_continuity_mod, only : W2 - use initial_wind_config_mod, only : profile_sin_uv, & - profile, sbr_angle_lat, sbr_angle_lon, & - u0, v0, shear, wavelength - use kernel_mod, only : kernel_type + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use initial_wind_config_mod, only: profile_sin_uv, & + profile, sbr_angle_lat, sbr_angle_lon, & + u0, v0, shear, wavelength + use planet_config_mod, only: scaled_radius use shallow_water_settings_config_mod, & - only : swe_test + only: swe_test implicit none @@ -94,8 +98,6 @@ subroutine initial_swe_u_code( nlayers, rhs, & nqp_h, nqp_v, wqp_h, wqp_v ) use analytic_swe_wind_profiles_mod, only : analytic_swe_wind - use base_mesh_config_mod, only : geometry, & - geometry_spherical use sci_coordinate_jacobian_mod, only : coordinate_jacobian use coord_transform_mod, only : sphere2cart_vector use sci_chi_transform_mod, only : chi2llr, chi2xyz @@ -142,7 +144,11 @@ subroutine initial_swe_u_code( nlayers, rhs, & chi_3_cell(df) = chi_3( map_chi(df) ) end do - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian( coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 index 4cb12608c..afb4b6f1c 100644 --- a/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 @@ -25,12 +25,12 @@ module initial_vorticity_v2_kernel_mod use kernel_mod, only: kernel_type use sci_coordinate_jacobian_mod, only: coordinate_jacobian, & coordinate_jacobian_inverse - use base_mesh_config_mod, only: geometry, & - geometry_spherical, & - f_lat use rotation_vector_mod, only: rotation_vector_fplane, & rotation_vector_sphere - use planet_config_mod, only: scaled_omega + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical, f_lat + use planet_config_mod, only: scaled_radius, scaled_omega implicit none @@ -165,7 +165,11 @@ subroutine initial_vorticity_v2_code(nlayers, r_q, curl_u, geopot, & rotation_vector) end if - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_e, & diff --git a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf index fe44262b4..75d5fe402 100644 --- a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf @@ -96,7 +96,7 @@ contains swe_test = swe_test_swe_geostr_balance, & thermal_swe = .false. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf index 3c69d79cb..02ca8474e 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf @@ -97,7 +97,7 @@ contains swe_test = swe_test_swe_gaussian_hill, & thermal_swe = .false.) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf index 29103cf75..2e69572db 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf @@ -96,7 +96,7 @@ contains swe_test = swe_test_swe_geostr_balance, & thermal_swe = .false. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf index 846105876..df091a7f8 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf @@ -96,7 +96,7 @@ contains swe_test = swe_test_swe_gaussian_hill, & ref_gp = 10000.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 b/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 index 7e06eaea4..e6cd86ab4 100644 --- a/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 +++ b/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 @@ -18,10 +18,14 @@ module set_tracer_field_kernel_mod GH_QUADRATURE_XYoZ use fs_continuity_mod, only : Wchi use constants_mod, only : r_def, i_def - use idealised_config_mod, only : test use kernel_mod, only : kernel_type use log_mod, only : log_event, LOG_LEVEL_ERROR + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use idealised_config_mod, only: test + use planet_config_mod, only: scaled_radius + implicit none private @@ -148,7 +152,9 @@ subroutine set_tracer_field_code(nlayers, tracer, & chi_2_e(df1) = chi_2( map_chi(df1) + k ) chi_3_e(df1) = chi_3( map_chi(df1) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj) diff --git a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf index 7fcd8dc18..851d10191 100644 --- a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf @@ -82,7 +82,7 @@ contains f_lon_deg=0.0_r_def, perturb_init=.false., & perturb_magnitude=0, perturb_seed=0 ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf index 04e00da19..12e83028f 100644 --- a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf @@ -103,7 +103,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/dependencies.yaml b/dependencies.yaml index 5b56a8aba..73e82a168 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,8 +30,8 @@ lfric_apps: ref: lfric_core: - source: git@github.com:MetOffice/lfric_core.git - ref: FloatJacobian + source: cazld000020:/data/users/ricky.wong/GitHub/lfric_core + ref: moci: source: git@github.com:MetOffice/moci.git diff --git a/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 b/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 index 86f1ffce1..190108550 100644 --- a/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 +++ b/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 @@ -17,6 +17,10 @@ module adj_sci_convert_hdiv_field_kernel_mod CELL_COLUMN, GH_EVALUATOR use constants_mod, only : i_def, r_def +use base_mesh_config_mod, only: geometry, topology +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + !> NOTE: Kernel requires PSyKAl lite code to invoke. Kernel metadata commented out. !> Please see PSyclone issue #2798 for further information. implicit none @@ -107,6 +111,7 @@ subroutine adj_convert_hdiv_field_code(nlayers, & map_pid) use sci_coordinate_jacobian_mod, only : coordinate_jacobian + implicit none ! Arguments @@ -154,8 +159,10 @@ subroutine adj_convert_hdiv_field_code(nlayers, & chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, ndf1, chi1_e(:), chi2_e(:), chi3_e(:), & - ipanel, basis_chi(:,:,:), diff_basis_chi(:,:,:), jacobian(:,:,:), dj(:)) + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf1, chi1_e(:), chi2_e(:), chi3_e(:), & + ipanel, basis_chi(:,:,:), diff_basis_chi(:,:,:), & + jacobian(:,:,:), dj(:)) do df = ndf1, 1, -1 vector_out(3) = vector_out(3) + physical_field3(map1(df) + k) diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 2797865da..e938bf99d 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -29,7 +29,7 @@ program cma_test test_cma_add, & test_cma_apply_inv, & test_cma_diag_DhMDhT - use constants_mod, only : i_def, r_def, i_def, l_def, & + use constants_mod, only : i_def, r_def, i_def, l_def, imdi, & r_solver, pi, str_def use derived_config_mod, only : set_derived_config use extrusion_mod, only : extrusion_type, & @@ -307,7 +307,8 @@ program cma_test alt_name=twod_names ) call assign_mesh_maps(twod_names) - call init_chi_transforms(mesh_collection) + call init_chi_transforms(geometry_spherical, imdi, & + mesh_collection=mesh_collection) ! Work out grid spacing, which should be of order 1 mesh => mesh_collection%get_mesh(prime_mesh_name) diff --git a/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 index 9ca14d532..408a5ac63 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 @@ -27,14 +27,16 @@ module compute_coriolis_matrix_kernel_mod GH_BASIS, GH_DIFF_BASIS, & CELL_COLUMN, GH_QUADRATURE_XYoZ use fs_continuity_mod, only: W2 - use sci_coordinate_jacobian_mod, only: coordinate_jacobian -use base_mesh_config_mod, only: geometry, & - geometry_spherical use rotation_vector_mod, only: rotation_vector_fplane, & rotation_vector_sphere use cross_product_mod, only: cross_product +use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + implicit none private @@ -167,8 +169,10 @@ subroutine compute_coriolis_matrix_code(cell, nlayers, ncell_3d, & end if ! Calculate the Jacobian and its determinant - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & - chi_1_e, chi_2_e, chi_3_e, ipanel, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & + chi_1_e, chi_2_e, chi_3_e, ipanel, & basis_chi, diff_basis_chi, jac, dj) diff --git a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 index 74064b04e..e67efa12e 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 @@ -20,15 +20,19 @@ module compute_dl_matrix_kernel_mod GH_BASIS, GH_DIFF_BASIS, & GH_SCALAR, GH_INTEGER, & CELL_COLUMN, GH_QUADRATURE_XYoZ - use base_mesh_config_mod, only: geometry, geometry_spherical use constants_mod, only: i_def, r_def, r_second, & PI, degrees_to_radians use sci_chi_transform_mod, only: chi2llr - use damping_layer_config_mod, only: dl_type, dl_type_latitude use fs_continuity_mod, only: W2 use kernel_mod, only: kernel_type use sci_coordinate_jacobian_mod, only: coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use damping_layer_config_mod, only: dl_type, dl_type_latitude + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -189,7 +193,8 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & chi2_e(df) = chi2(map_chi(df) + k - 1) chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) ! Only use dofs corresponding to vertical part of basis function diff --git a/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 index dff2de0b4..71785a9b0 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 @@ -28,15 +28,17 @@ module compute_vert_coriolis_matrix_kernel_mod GH_BASIS, GH_DIFF_BASIS, & CELL_COLUMN, GH_QUADRATURE_XYoZ use fs_continuity_mod, only: W2, Wtheta - use sci_coordinate_jacobian_mod, only: coordinate_jacobian -use base_mesh_config_mod, only: geometry, & - geometry_spherical use rotation_vector_mod, only: rotation_vector_fplane, & rotation_vector_sphere, & vert_vector_sphere use cross_product_mod, only: cross_product +use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + implicit none private @@ -180,8 +182,10 @@ subroutine compute_vert_coriolis_matrix_code(col_idx, nlayers, ncell_3d, & end if ! Calculate the Jacobian - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & - chi_1_e, chi_2_e, chi_3_e, ipanel, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & + chi_1_e, chi_2_e, chi_3_e, ipanel, & basis_chi, diff_basis_chi, jac, dj) ! To convert from reference space to physical space: diff --git a/science/gungho/source/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod.F90 index a692c28b5..8022dbe03 100644 --- a/science/gungho/source/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod.F90 @@ -32,6 +32,10 @@ module kinetic_energy_gradient_kernel_mod use fs_continuity_mod, only : W2 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -152,7 +156,8 @@ subroutine kinetic_energy_gradient_code(nlayers, & chi_2_e(df) = chi_2( loc ) chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_w2 diff --git a/science/gungho/source/kernel/core_dynamics/project_eos_pressure_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/project_eos_pressure_kernel_mod.F90 index af05571eb..ffe8eb68a 100644 --- a/science/gungho/source/kernel/core_dynamics/project_eos_pressure_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/project_eos_pressure_kernel_mod.F90 @@ -19,6 +19,10 @@ module project_eos_pressure_kernel_mod use fs_continuity_mod, only : W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -158,7 +162,8 @@ subroutine project_eos_pressure_code(cell, nlayers, chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_w3 diff --git a/science/gungho/source/kernel/core_dynamics/project_eos_rho_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/project_eos_rho_kernel_mod.F90 index 3c34582d0..b380f84fa 100644 --- a/science/gungho/source/kernel/core_dynamics/project_eos_rho_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/project_eos_rho_kernel_mod.F90 @@ -16,10 +16,14 @@ module project_eos_rho_kernel_mod GH_BASIS, GH_DIFF_BASIS, GH_SCALAR, & CELL_COLUMN, GH_QUADRATURE_XYoZ use constants_mod, only : r_def, i_def -use idealised_config_mod, only : test use fs_continuity_mod, only : WTHETA, W3 use kernel_mod, only : kernel_type +use base_mesh_config_mod, only: geometry, topology +use finite_element_config_mod, only: coord_system +use idealised_config_mod, only: test +use planet_config_mod, only: scaled_radius + implicit none !------------------------------------------------------------------------------- @@ -159,7 +163,9 @@ subroutine project_eos_rho_code(nlayers, & chi3_e(df) = chi3( map_chi(df) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj ) diff --git a/science/gungho/source/kernel/core_dynamics/rhs_project_eos_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/rhs_project_eos_kernel_mod.F90 index c0bcd137f..108a17051 100644 --- a/science/gungho/source/kernel/core_dynamics/rhs_project_eos_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/rhs_project_eos_kernel_mod.F90 @@ -22,6 +22,10 @@ module rhs_project_eos_kernel_mod use fs_continuity_mod, only : W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -168,7 +172,8 @@ subroutine rhs_project_eos_code(nlayers, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_wt theta_vd_e(df) = theta(map_wt(df) + k) * moist_dyn_gas(map_wt(df) + k) diff --git a/science/gungho/source/kernel/core_dynamics/vorticity_rhs_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/vorticity_rhs_kernel_mod.F90 index d70d25f2d..ab31b0f5e 100644 --- a/science/gungho/source/kernel/core_dynamics/vorticity_rhs_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/vorticity_rhs_kernel_mod.F90 @@ -21,6 +21,10 @@ module vorticity_rhs_kernel_mod use fs_continuity_mod, only : W1, W2 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -148,7 +152,8 @@ subroutine vorticity_rhs_code(nlayers, & chi_2_e(df) = chi_2( loc ) chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) do df = 1, ndf_u u_cell(df) = u( map_u(df) + k ) diff --git a/science/gungho/source/kernel/diagnostics/compute_energetics_kernel_mod.f90 b/science/gungho/source/kernel/diagnostics/compute_energetics_kernel_mod.f90 index 121490e96..a7d49fa39 100644 --- a/science/gungho/source/kernel/diagnostics/compute_energetics_kernel_mod.f90 +++ b/science/gungho/source/kernel/diagnostics/compute_energetics_kernel_mod.f90 @@ -30,6 +30,10 @@ module compute_energetics_kernel_mod use fs_continuity_mod, only : W2, W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -219,7 +223,8 @@ subroutine compute_energetics_code( & chi_2_e(df) = chi_2( loc ) chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_w3 diff --git a/science/gungho/source/kernel/diagnostics/compute_entropy_kernel_mod.F90 b/science/gungho/source/kernel/diagnostics/compute_entropy_kernel_mod.F90 index 478eb4676..89a92b82b 100644 --- a/science/gungho/source/kernel/diagnostics/compute_entropy_kernel_mod.F90 +++ b/science/gungho/source/kernel/diagnostics/compute_entropy_kernel_mod.F90 @@ -22,6 +22,10 @@ module compute_entropy_kernel_mod use fs_continuity_mod, only : W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -160,7 +164,8 @@ subroutine compute_entropy_code( nlayers, & chi_2_e(df) = chi_2( loc ) chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_wtheta diff --git a/science/gungho/source/kernel/diagnostics/compute_moist_mass_kernel_mod.F90 b/science/gungho/source/kernel/diagnostics/compute_moist_mass_kernel_mod.F90 index 57da7183a..5327c8ce1 100644 --- a/science/gungho/source/kernel/diagnostics/compute_moist_mass_kernel_mod.F90 +++ b/science/gungho/source/kernel/diagnostics/compute_moist_mass_kernel_mod.F90 @@ -21,6 +21,10 @@ module compute_moist_mass_kernel_mod use fs_continuity_mod, only : W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -153,7 +157,8 @@ subroutine compute_moist_mass_code( chi_3_e(df) = chi_3(l) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) ! Loop through dofs, grabbing the values for this cell for reference element diff --git a/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 b/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 index cca143aaa..eb37a2328 100644 --- a/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 +++ b/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 @@ -25,6 +25,11 @@ module compute_total_aam_kernel_mod use fs_continuity_mod, only : W2, W3 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + + implicit none private @@ -168,7 +173,9 @@ subroutine compute_total_aam_code( & chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, ipanel, & chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_w3 diff --git a/science/gungho/source/kernel/diagnostics/compute_total_pv_kernel_mod.F90 b/science/gungho/source/kernel/diagnostics/compute_total_pv_kernel_mod.F90 index 781ce8115..56b5c9cc8 100644 --- a/science/gungho/source/kernel/diagnostics/compute_total_pv_kernel_mod.F90 +++ b/science/gungho/source/kernel/diagnostics/compute_total_pv_kernel_mod.F90 @@ -19,13 +19,15 @@ module compute_total_pv_kernel_mod use constants_mod, only : r_def, i_def use fs_continuity_mod, only : W0, W1, W3 use kernel_mod, only : kernel_type - use base_mesh_config_mod, & - only: geometry, & - geometry_spherical use rotation_vector_mod, & only: rotation_vector_fplane, & rotation_vector_sphere + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -180,7 +182,8 @@ subroutine compute_total_pv_code( chi2_e(df) = chi2( map_chi(df) + k ) chi3_e(df) = chi3( map_chi(df) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) call coordinate_jacobian_inverse(nqp_h, nqp_v, jac, dj, jac_inv) diff --git a/science/gungho/source/kernel/initialisation/initial_streamfunc_kernel_mod.F90 b/science/gungho/source/kernel/initialisation/initial_streamfunc_kernel_mod.F90 index c44406bd0..e6f53573f 100644 --- a/science/gungho/source/kernel/initialisation/initial_streamfunc_kernel_mod.F90 +++ b/science/gungho/source/kernel/initialisation/initial_streamfunc_kernel_mod.F90 @@ -20,6 +20,12 @@ module initial_streamfunc_kernel_mod use kernel_mod, only : kernel_type use initial_wind_config_mod, only : profile +use base_mesh_config_mod, only: geometry, topology, & + geometry_planar, & + geometry_spherical +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + implicit none private @@ -108,9 +114,6 @@ subroutine initial_streamfunc_code(nlayers, & ) use analytic_streamfunction_profiles_mod, only: analytic_streamfunction - use base_mesh_config_mod, only: geometry, & - geometry_planar, & - geometry_spherical use sci_chi_transform_mod, only: chi2llr use sci_coordinate_jacobian_mod, only: coordinate_jacobian, & coordinate_jacobian_inverse @@ -169,7 +172,11 @@ subroutine initial_streamfunc_code(nlayers, & end do - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/science/gungho/source/kernel/initialisation/initial_u_kernel_mod.F90 b/science/gungho/source/kernel/initialisation/initial_u_kernel_mod.F90 index f154a0606..ca19b15bb 100644 --- a/science/gungho/source/kernel/initialisation/initial_u_kernel_mod.F90 +++ b/science/gungho/source/kernel/initialisation/initial_u_kernel_mod.F90 @@ -20,11 +20,16 @@ module initial_u_kernel_mod CELL_COLUMN, GH_QUADRATURE_XYoZ use constants_mod, only : r_def, i_def, PI use fs_continuity_mod, only : W2 - use initial_wind_config_mod, only : profile_sin_uv, & - profile, sbr_angle_lat, sbr_angle_lon, & - u0, v0, shear, wavelength use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use initial_wind_config_mod, only: profile_sin_uv, profile, & + sbr_angle_lat, sbr_angle_lon, & + u0, v0, shear, wavelength + use planet_config_mod, only: scaled_radius + implicit none private @@ -106,8 +111,6 @@ subroutine initial_u_code(nlayers, & ) use analytic_wind_profiles_mod, only : analytic_wind - use base_mesh_config_mod, only : geometry, & - geometry_spherical use sci_chi_transform_mod, only : chi2llr use sci_coordinate_jacobian_mod, only : coordinate_jacobian use coord_transform_mod, only : sphere2cart_vector @@ -175,7 +178,11 @@ subroutine initial_u_code(nlayers, & chi_3_cell(df) = chi_3( map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/science/gungho/source/kernel/initialisation/set_exner_kernel_mod.F90 b/science/gungho/source/kernel/initialisation/set_exner_kernel_mod.F90 index ebbde1980..692fda7c8 100644 --- a/science/gungho/source/kernel/initialisation/set_exner_kernel_mod.F90 +++ b/science/gungho/source/kernel/initialisation/set_exner_kernel_mod.F90 @@ -16,9 +16,13 @@ module set_exner_kernel_mod CELL_COLUMN, GH_QUADRATURE_XYoZ use constants_mod, only : r_def, i_def use fs_continuity_mod, only : W3 - use idealised_config_mod, only : test use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use idealised_config_mod, only: test + use planet_config_mod, only: scaled_radius + implicit none private @@ -142,7 +146,9 @@ subroutine set_exner_code(nlayers, & chi_2_e(df1) = chi_2(map_chi(df1) + k) chi_3_e(df1) = chi_3(map_chi(df1) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj) diff --git a/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 b/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 index bc6f1bf39..90ec2182b 100644 --- a/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 +++ b/science/gungho/source/kernel/initialisation/set_rho_kernel_mod.F90 @@ -17,9 +17,12 @@ module set_rho_kernel_mod CELL_COLUMN, GH_QUADRATURE_XYoZ use fs_continuity_mod, only : Wchi use constants_mod, only : r_def, i_def - use idealised_config_mod, only : test use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use idealised_config_mod, only: test + use planet_config_mod, only: scaled_radius implicit none private @@ -142,7 +145,9 @@ subroutine set_rho_code(nlayers, rho, & chi_2_e(df1) = chi_2( map_chi(df1) + k ) chi_3_e(df1) = chi_3( map_chi(df1) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj) diff --git a/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 b/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 index acabd2c24..442002ce4 100644 --- a/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/eliminated_theta_q22_kernel_mod.F90 @@ -30,6 +30,10 @@ module eliminated_theta_q22_kernel_mod use fs_continuity_mod, only: W2, Wtheta, Wchi use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -176,8 +180,10 @@ subroutine eliminated_theta_q22_code(cell, nlayers, ncell_3d, & chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) + q22_op(ik, :, :) = 0.0_r_solver do qp2 = 1, nqp_v do qp1 = 1, nqp_h diff --git a/science/gungho/source/kernel/solver/project_eos_operators_kernel_mod.F90 b/science/gungho/source/kernel/solver/project_eos_operators_kernel_mod.F90 index e9714db8c..474f6064b 100644 --- a/science/gungho/source/kernel/solver/project_eos_operators_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/project_eos_operators_kernel_mod.F90 @@ -28,6 +28,10 @@ module project_eos_operators_kernel_mod use fs_continuity_mod, only: W3, Wtheta use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -201,7 +205,9 @@ subroutine project_eos_operators_code(cell, nlayers, & p3theta(ik,:,:) = 0.0_r_solver do qp2 = 1, nqp_v do qp1 = 1, nqp_h - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, rsol_basis_chi(:,:,qp1,qp2), & rsol_diff_basis_chi(:,:,qp1,qp2), & jac, dj ) diff --git a/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 b/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 index 7116bbdb7..29ae1b64e 100644 --- a/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/w2_normalisation_kernel_mod.F90 @@ -25,6 +25,10 @@ module w2_normalisation_kernel_mod use fs_continuity_mod, only : W2, Wchi use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -136,15 +140,19 @@ subroutine w2_normalisation_code(nlayers, & chi_2_cell(df) = chi_2(map_chi(df) + k) chi_3_cell(df) = chi_3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, & - ndf, & - chi_1_cell, & - chi_2_cell, & - chi_3_cell, & - ipanel, & - chi_basis, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & + ndf, & + chi_1_cell, & + chi_2_cell, & + chi_3_cell, & + ipanel, & + chi_basis, & chi_diff_basis, & - jacobian, & + jacobian, & dj) do df = 1,ndf JTJ = matmul(transpose(jacobian(:,:,df)),jacobian(:,:,df)) diff --git a/science/gungho/source/kernel/solver/weighted_m3_kernel_mod.F90 b/science/gungho/source/kernel/solver/weighted_m3_kernel_mod.F90 index cb8728598..8242d80db 100644 --- a/science/gungho/source/kernel/solver/weighted_m3_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/weighted_m3_kernel_mod.F90 @@ -21,6 +21,10 @@ module weighted_m3_kernel_mod use fs_continuity_mod, only: W3 use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -139,7 +143,8 @@ subroutine weighted_m3_code(cell, nlayers, ncell_3d, & chi2_e(df) = chi2(loc) chi3_e(df) = chi3(loc) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) ik = 1 + k + (cell-1)*nlayers diff --git a/science/gungho/source/kernel/transport/common/vorticity_advection_kernel_mod.F90 b/science/gungho/source/kernel/transport/common/vorticity_advection_kernel_mod.F90 index cfb37ab12..6e882ff2b 100644 --- a/science/gungho/source/kernel/transport/common/vorticity_advection_kernel_mod.F90 +++ b/science/gungho/source/kernel/transport/common/vorticity_advection_kernel_mod.F90 @@ -34,6 +34,10 @@ module vorticity_advection_kernel_mod use fs_continuity_mod, only: W1, W2 use cross_product_mod, only: cross_product +use base_mesh_config_mod, only: geometry, topology +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + implicit none private @@ -177,8 +181,10 @@ subroutine vorticity_advection_code(nlayers, & vorticity_at_quad(:) = vorticity_at_quad(:) & + vorticity( map_w1(df) + k )*w1_basis(:,df,qp1,qp2) end do - call pointwise_coordinate_jacobian(ndf_chi, chi_1_e, chi_2_e, chi_3_e, & - ipanel, chi_basis(:,:,qp1,qp2), & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi_1_e, chi_2_e, chi_3_e, & + ipanel, chi_basis(:,:,qp1,qp2), & chi_diff_basis(:,:,qp1,qp2), jac, dj) jac_inv = pointwise_coordinate_jacobian_inverse(jac, dj) jac = matmul(jac_inv,transpose(jac_inv)) diff --git a/science/gungho/source/kernel/transport/common/w2_vorticity_advection_kernel_mod.F90 b/science/gungho/source/kernel/transport/common/w2_vorticity_advection_kernel_mod.F90 index f9bfb5db2..01d08c0d8 100644 --- a/science/gungho/source/kernel/transport/common/w2_vorticity_advection_kernel_mod.F90 +++ b/science/gungho/source/kernel/transport/common/w2_vorticity_advection_kernel_mod.F90 @@ -32,6 +32,10 @@ module w2_vorticity_advection_kernel_mod use fs_continuity_mod, only : W2 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -152,7 +156,8 @@ subroutine w2_vorticity_advection_code(nlayers, & chi_2_e(df) = chi_2( loc ) chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) do df = 1, ndf_w2 diff --git a/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf index 658e676fd..5f714217c 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod_test.pf @@ -95,7 +95,7 @@ contains horizontal_transport_predictor=.false., & vector_invariant=.true.) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf index 348fb1efa..2b28dfd31 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/compute_dl_matrix_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_dl_matrix_kernel_mod_test - use constants_mod, only : i_def, r_def, r_second + use constants_mod, only : i_def, r_def, r_second, imdi use damping_layer_config_mod, only : dl_base, dl_str, dl_type, dl_type_standard use get_unit_test_m3x3_dofmap_mod, & only : get_w0_m3x3_dofmap, get_w3_m3x3_dofmap @@ -67,7 +67,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf index dc3e55e0d..4077a2386 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod_test.pf @@ -121,7 +121,7 @@ contains scaling_factor=1.0_r_def & ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology_non_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf index aa9b4b51b..a99a9cae9 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/kinetic_energy_gradient_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module kinetic_energy_gradient_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & @@ -92,7 +92,7 @@ contains horizontal_transport_predictor=.false., & vector_invariant=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf index 7dbe255e1..2f78ebc87 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/project_eos_pressure_kernel_mod_test.pf @@ -89,7 +89,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic ) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf index f08a05fd7..2edd683f7 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/project_eos_rho_kernel_mod_test.pf @@ -92,7 +92,7 @@ contains profile_data=profile_data, & profile_heights=profile_heights ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf index 47193101b..6b83c0dc1 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/rhs_project_eos_kernel_mod_test.pf @@ -92,7 +92,7 @@ contains profile_data=profile_data, & profile_heights=profile_heights ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf index f5751b76d..3156c5223 100644 --- a/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/core_dynamics/vorticity_rhs_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module vorticity_rhs_kernel_mod_test - use constants_mod, only: i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit implicit none @@ -48,7 +48,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf index e9e92bf81..f8b18f065 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_energetics_kernel_mod_test.pf @@ -9,7 +9,8 @@ !> module compute_energetics_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only: i_def, r_def, imdi + use driver_water_constants_mod, only : Lv => latent_heat_h2o_condensation, & Lf => latent_heat_h2o_fusion use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & @@ -74,7 +75,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf index 6e4dd39b0..14fe4aaa5 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_entropy_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_entropy_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_wtheta_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -63,7 +63,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf index 63133246b..b19858479 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_moist_mass_kernel_mod_test.pf @@ -7,7 +7,7 @@ !> module compute_moist_mass_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size, & get_wtheta_m3x3_q3x3x3_size @@ -67,7 +67,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf index 851d06ebc..2ca6692f2 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_total_aam_kernel_mod_test.pf @@ -82,7 +82,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical,topology_fully_periodic) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf index 4eae5a9be..6c6c69042 100644 --- a/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diagnostics/compute_total_pv_kernel_mod_test.pf @@ -86,7 +86,8 @@ contains rd=300.0_r_def, cp=1000.0_r_def, & p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + + call init_chi_transforms(geometry_spherical, topology_fully_periodic) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf index 31f0bb9cf..8f326b335 100644 --- a/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/momentum_viscosity_kernel_mod_test.pf @@ -6,7 +6,7 @@ module momentum_viscosity_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w2_m3x3_q3x3x3_size use get_unit_test_m3x3_dofmap_mod, only : get_w2_m3x3_dofmap, & @@ -51,7 +51,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf index 604ca9319..776ae5fb7 100644 --- a/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf @@ -6,7 +6,7 @@ module tracer_smagorinsky_diff_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w2_m3x3_q3x3x3_size, & get_wtheta_m3x3_q3x3x3_size use get_unit_test_m3x3_dofmap_mod, only : get_w2_m3x3_dofmap, & @@ -64,7 +64,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf index 495c48dff..8e27edc62 100644 --- a/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/tracer_viscosity_kernel_mod_test.pf @@ -6,7 +6,7 @@ module tracer_viscosity_kernel_mod_test - use constants_mod, only: i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit implicit none @@ -47,7 +47,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf index 00640b1af..3f914a2a0 100644 --- a/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/deep_hot_jupiter_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module deep_hot_jupiter_kernel_mod_test - use constants_mod, only : i_def, r_def, r_second, PI + use constants_mod, only : i_def, r_def, r_second, PI, imdi use coord_transform_mod, only : llr2xyz use funit @@ -70,7 +70,7 @@ contains runge_kutta_method=runge_kutta_method_ssp3, & spinup_period=0.0_r_second, spinup_alpha=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf index 17e485b6b..d95f80afd 100644 --- a/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module earth_like_kernel_mod_test - use constants_mod, only : i_def, r_def, r_second, PI + use constants_mod, only : i_def, r_def, r_second, PI, imdi use coord_transform_mod, only : llr2xyz use funit @@ -76,7 +76,7 @@ contains runge_kutta_method=runge_kutta_method_ssp3, & spinup_period=0.0_r_second, spinup_alpha=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf index d1e1f11e9..18f0dc4a9 100644 --- a/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/held_suarez_kernel_mod_test.pf @@ -8,8 +8,8 @@ !> module held_suarez_kernel_mod_test - use constants_mod, only : i_def, r_def, r_second, PI - use coord_transform_mod, only : llr2xyz + use constants_mod, only: i_def, r_def, r_second, PI, imdi + use coord_transform_mod, only: llr2xyz use funit implicit none @@ -72,7 +72,7 @@ contains runge_kutta_method=runge_kutta_method_ssp3, & spinup_period=0.0_r_second, spinup_alpha=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf index 854255e9c..37975fbb5 100644 --- a/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/shallow_hot_jupiter_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module shallow_hot_jupiter_kernel_mod_test - use constants_mod, only : i_def, r_def, r_second, PI + use constants_mod, only : i_def, r_def, r_second, PI, imdi use coord_transform_mod, only : llr2xyz use funit @@ -71,7 +71,7 @@ contains runge_kutta_method=runge_kutta_method_ssp3, & spinup_period=0.0_r_second, spinup_alpha=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf index 5971150fe..e394ad44a 100644 --- a/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf @@ -17,11 +17,13 @@ module tidally_locked_earth_kernel_mod_test private public :: set_up, tear_down, test_all - real(kind=r_def), parameter :: rd = 287.05_r_def - real(kind=r_def), parameter :: cp = 1005.0_r_def - real(kind=r_def), parameter :: kappa = rd/cp - real(kind=r_def), parameter :: dlat = 1.0_r_def, dlon = 1.0_r_def, dz = 10000.0_r_def - real(kind=r_def), parameter :: dt = 1800.0_r_def + real(kind=r_def), parameter :: rd = 287.05_r_def + real(kind=r_def), parameter :: cp = 1005.0_r_def + real(kind=r_def), parameter :: kappa = rd/cp + real(kind=r_def), parameter :: dlat = 1.0_r_def + real(kind=r_def), parameter :: dlon = 1.0_r_def + real(kind=r_def), parameter :: dz = 10000.0_r_def + real(kind=r_def), parameter :: dt = 1800.0_r_def contains @@ -70,7 +72,7 @@ contains runge_kutta_method=runge_kutta_method_ssp3, & spinup_period=0.0_r_second, spinup_alpha=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf index e91b2770c..576816e6c 100644 --- a/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/hydrostatic_exner_kernel_mod_test.pf @@ -148,7 +148,7 @@ contains perturb_init=.false., perturb_magnitude=0, & perturb_seed=0 ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) nlayers=3 call get_w0_m3x3_q3x3x3_size( this%ndf_w0, this%undf_w0, ncells, & diff --git a/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf index 4c2b182e8..4dea345c7 100644 --- a/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/initial_rho_sample_kernel_mod_test.pf @@ -82,7 +82,7 @@ contains perturb_init=.false., perturb_magnitude=0, & perturb_seed=0 ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf index 4ff877458..6c55d4496 100644 --- a/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/initial_u_kernel_mod_test.pf @@ -114,7 +114,7 @@ contains wavelength=wavelength, & wind_time_period=wind_time_period ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf b/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf index dac91d1a6..83fdb7aff 100644 --- a/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/initialisation/set_rho_kernel_mod_test.pf @@ -132,7 +132,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf index 96a0b0d16..c9ab77fb0 100644 --- a/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/eliminated_theta_q22_kernel_mod_test.pf @@ -8,7 +8,7 @@ module eliminated_theta_q22_kernel_mod_test use, intrinsic :: iso_fortran_env, only : real64 - use constants_mod, only : i_def, r_def, r_solver + use constants_mod, only : i_def, r_def, r_solver, imdi use funit implicit none @@ -48,7 +48,7 @@ contains coord_system=coord_system_xyz, & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf index 4537740b9..38f8a35af 100644 --- a/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/project_eos_operators_kernel_mod_test.pf @@ -95,7 +95,7 @@ contains rd=rd, cp=cp, p_zero=p_zero, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf index e23ec3575..7c55ee6d3 100644 --- a/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/weighted_m3_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module weighted_m3_kernel_mod_test - use constants_mod, only: i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit implicit none @@ -48,7 +48,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf index e85a0bc8a..a2a9f90c0 100644 --- a/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/panel_edge_coords_kernel_mod_test.pf @@ -80,7 +80,7 @@ contains vorticity_in_w1=.false. & ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf index bd34c90e1..d6cbc6f16 100644 --- a/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/panel_edge_weights_kernel_mod_test.pf @@ -80,7 +80,7 @@ contains vorticity_in_w1=.false. & ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf index fd1051185..fd905afa2 100644 --- a/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/vorticity_advection_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module vorticity_advection_kernel_mod_test - use constants_mod, only: i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit implicit none @@ -48,7 +48,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf index 071d03792..bbc16acaa 100644 --- a/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/w2_vorticity_advection_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module w2_vorticity_advection_kernel_mod_test - use constants_mod, only: i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit implicit none @@ -48,7 +48,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi,imdi) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf index d2e8ae4ee..76abb7490 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly1d_advective_coeffs_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains rehabilitate = .true., & vorticity_in_w1 = .true. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf index 26c6a3be1..e347ae2f2 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly1d_flux_coeffs_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains rehabilitate = .true., & vorticity_in_w1 = .true. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf index eec36089b..d37ccb7c5 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly2d_advective_coeffs_kernel_mod_test.pf @@ -52,7 +52,7 @@ contains rehabilitate = .true., & vorticity_in_w1 = .true. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf index bc2105654..aad312e79 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly2d_flux_coeffs_kernel_mod_test.pf @@ -50,7 +50,8 @@ contains element_order_v = 0, & rehabilitate = .true., & vorticity_in_w1 = .true. ) - call init_chi_transforms() + + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine setUp diff --git a/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf b/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf index e45d1fd81..c56647382 100644 --- a/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf +++ b/science/gungho/unit-test/orography/analytic_orography_field_spherical_mod_test.pf @@ -134,7 +134,7 @@ contains lambda_focus, & phi_focus ) ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology_fully_periodic) end subroutine setUp diff --git a/science/linear/source/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod.F90 b/science/linear/source/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod.F90 index 87b4df84b..2763b7bd1 100644 --- a/science/linear/source/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod.F90 +++ b/science/linear/source/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod.F90 @@ -24,6 +24,10 @@ module tl_kinetic_energy_gradient_kernel_mod use fs_continuity_mod, only : W2 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -161,7 +165,8 @@ subroutine tl_kinetic_energy_gradient_code(nlayers, & chi_2_e(df) = chi_2( loc ) chi_3_e(df) = chi_3( loc ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) ! Linearisation state - values at dofs diff --git a/science/linear/source/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod.F90 b/science/linear/source/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod.F90 index d2c9c8193..fd814e936 100644 --- a/science/linear/source/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod.F90 +++ b/science/linear/source/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod.F90 @@ -19,6 +19,10 @@ module tl_project_eos_pressure_kernel_mod use fs_continuity_mod, only : W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -171,7 +175,8 @@ subroutine tl_project_eos_pressure_code(cell, nlayers, chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) ! Linearisation state diff --git a/science/linear/source/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod.F90 b/science/linear/source/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod.F90 index ad726c204..ddb5f7313 100644 --- a/science/linear/source/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod.F90 +++ b/science/linear/source/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod.F90 @@ -30,6 +30,10 @@ module tl_rhs_project_eos_kernel_mod use fs_continuity_mod, only : W3, Wtheta use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -194,7 +198,8 @@ subroutine tl_rhs_project_eos_code(nlayers, chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, jac, dj) ! Linearisation state diff --git a/science/linear/source/kernel/transport/common/tl_vorticity_advection_kernel_mod.F90 b/science/linear/source/kernel/transport/common/tl_vorticity_advection_kernel_mod.F90 index a2c4c1078..009dc5998 100644 --- a/science/linear/source/kernel/transport/common/tl_vorticity_advection_kernel_mod.F90 +++ b/science/linear/source/kernel/transport/common/tl_vorticity_advection_kernel_mod.F90 @@ -23,6 +23,10 @@ module tl_vorticity_advection_kernel_mod use fs_continuity_mod, only: W1, W2 use cross_product_mod, only: cross_product +use base_mesh_config_mod, only: geometry, topology +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + implicit none !------------------------------------------------------------------------------- @@ -183,8 +187,10 @@ subroutine tl_vorticity_advection_code(nlayers, & do qp1 = 1, nqp_h ! Constants - call pointwise_coordinate_jacobian(ndf_chi, chi_1_e, chi_2_e, chi_3_e, & - ipanel, chi_basis(:,:,qp1,qp2), & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi_1_e, chi_2_e, chi_3_e, & + ipanel, chi_basis(:,:,qp1,qp2), & chi_diff_basis(:,:,qp1,qp2), jac, dj) jac_inv = pointwise_coordinate_jacobian_inverse(jac, dj) jac = matmul(jac_inv,transpose(jac_inv)) diff --git a/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf index c3b98a7b0..45a8e1ae3 100644 --- a/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/initial_theta_ref_kernel_mod_test.pf @@ -112,7 +112,7 @@ contains profile_data=profile_data, & profile_heights=profile_heights ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf index 9a44a87ab..7fbc2b3a6 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_kinetic_energy_gradient_kernel_mod_test.pf @@ -7,7 +7,7 @@ !>@brief Test the tangent linear gradient of the kinetic energy computation module tl_kinetic_energy_gradient_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & @@ -91,7 +91,7 @@ contains horizontal_transport_predictor=.false., & vector_invariant=.false.) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf index e739d0615..a34f52bc8 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_project_eos_pressure_kernel_mod_test.pf @@ -86,7 +86,7 @@ contains profile_heights=profile_heights ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) call feign_planet_config( gravity=10.0_r_def, & omega=8.0E-5_r_def, & diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf index c80f072b3..f8cae079c 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_rhs_project_eos_kernel_mod_test.pf @@ -91,7 +91,7 @@ contains profile_data=profile_data, & profile_heights=profile_heights ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf b/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf index e1dc1c860..9617cb413 100644 --- a/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/core_dynamics/tl_sample_eos_pressure_kernel_mod_test.pf @@ -91,7 +91,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf b/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf index 9dea4bf34..32c184999 100644 --- a/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf +++ b/science/linear/unit-test/kernel/transport/common/tl_vorticity_advection_kernel_mod_test.pf @@ -7,7 +7,7 @@ !>@brief Test the tangent linear of the vorticity advection. module tl_vorticity_advection_kernel_mod_test - use constants_mod, only: i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit use finite_element_config_mod, & @@ -134,7 +134,7 @@ contains rehabilitate=.true., & vorticity_in_w1=.false. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) ! Get infrastructure support data !===================================== From 02f3f03231fd4260dd3f6e06f613aaacbecdccc5 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:25:19 +0000 Subject: [PATCH 08/17] Update patche to help adjoint build --- .../kernel/initial_vorticity_v2_kernel_mod.F90 | 7 ++++--- ...atl_kinetic_energy_gradient_kernel_mod.patch | 13 +++++++------ .../atl_project_eos_pressure_kernel_mod.patch | 17 +++++++++++------ .../kernel/atl_rhs_project_eos_kernel_mod.patch | 13 +++++++------ .../atl_vorticity_advection_kernel_mod.patch | 9 ++++++--- .../earth_like_kernel_mod_test.pf | 1 - .../tidally_locked_earth_kernel_mod_test.pf | 2 +- 7 files changed, 36 insertions(+), 26 deletions(-) diff --git a/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 index afb4b6f1c..f5a5b5c26 100644 --- a/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 @@ -28,9 +28,10 @@ module initial_vorticity_v2_kernel_mod use rotation_vector_mod, only: rotation_vector_fplane, & rotation_vector_sphere - use base_mesh_config_mod, only: geometry, topology, & - geometry_spherical, f_lat - use planet_config_mod, only: scaled_radius, scaled_omega + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical, f_lat + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius, scaled_omega implicit none diff --git a/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch b/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch index c82ba1b0d..78961208c 100644 --- a/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch @@ -1,18 +1,19 @@ -@@ -1,11 +1,11 @@ +@@ -1,4 +1,4 @@ -module adj_kinetic_energy_gradient_kernel_mod +module atl_kinetic_energy_gradient_kernel_mod use argument_mod, only : any_discontinuous_space_3, any_space_9, arg_type, cell_column, func_type, gh_basis, gh_diff_basis, & &gh_field, gh_inc, gh_quadrature_xyoz, gh_read, gh_real use constants_mod, only : i_def, r_def - use fs_continuity_mod, only : w2 - use kernel_mod, only : kernel_type +@@ -8,7 +8,7 @@ + use finite_element_config_mod, only : coord_system + use planet_config_mod, only : scaled_radius implicit none - type, public, extends(kernel_type) :: adj_kinetic_energy_gradient_kernel_type + type, public, extends(kernel_type) :: atl_kinetic_energy_gradient_kernel_type type(ARG_TYPE) :: META_ARGS(5) = (/ & arg_type(gh_field, gh_real, gh_read, w2), & arg_type(gh_field, gh_real, gh_inc, w2), & -@@ -18,15 +18,15 @@ +@@ -21,15 +21,15 @@ INTEGER :: GH_SHAPE = gh_quadrature_xyoz INTEGER :: OPERATES_ON = cell_column CONTAINS @@ -32,7 +33,7 @@ &w2_basis, w2_diff_basis, ndf_chi, undf_chi, map_chi, chi_basis, chi_diff_basis, ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, & &wqp_v) use sci_coordinate_jacobian_mod, only : coordinate_jacobian -@@ -75,7 +75,6 @@ +@@ -78,7 +78,6 @@ real(kind=r_def) :: dv real(kind=r_def), dimension(3) :: mul1 real(kind=r_def), dimension(3) :: mul2 @@ -40,7 +41,7 @@ real(kind=r_def) :: res_dot_product integer :: idx integer :: idx_1 -@@ -153,6 +152,6 @@ +@@ -156,6 +155,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch b/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch index b4564ee1a..2e491bbdd 100644 --- a/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch @@ -1,19 +1,24 @@ -@@ -1,11 +1,12 @@ +--- ./applications/adjoint_tests/working/build_adjoint_tests/kernel/core_dynamics/atl_project_eos_pressure_kernel_mod.F90.orig 2026-01-27 07:11:08.000000000 +0000 ++++ ./applications/adjoint_tests/working/build_adjoint_tests/kernel/core_dynamics/atl_project_eos_pressure_kernel_mod.F90 2026-01-27 07:30:11.000000000 +0000 +@@ -1,4 +1,4 @@ -module adj_project_eos_pressure_kernel_mod +module atl_project_eos_pressure_kernel_mod use argument_mod, only : any_discontinuous_space_3, any_space_2, arg_type, cell_column, func_type, gh_basis, gh_diff_basis, & &gh_field, gh_operator, gh_quadrature_xyoz, gh_read, gh_readwrite, gh_real, gh_write use constants_mod, only : i_def, r_def - use fs_continuity_mod, only : w3, wtheta +@@ -6,9 +6,9 @@ use kernel_mod, only : kernel_type -+ use planet_config_mod, only : kappa, rd, p_zero + use base_mesh_config_mod, only : geometry, topology + use finite_element_config_mod, only : coord_system +- use planet_config_mod, only : scaled_radius ++ use planet_config_mod, only : scaled_radius, kappa, rd, p_zero implicit none - type, public, extends(kernel_type) :: adj_project_eos_pressure_kernel_type + type, public, extends(kernel_type) :: atl_project_eos_pressure_kernel_type type(ARG_TYPE) :: META_ARGS(10) = (/ & arg_type(gh_field, gh_real, gh_readwrite, w3), & arg_type(gh_field, gh_real, gh_readwrite, w3), & -@@ -24,15 +25,15 @@ +@@ -27,15 +27,15 @@ INTEGER :: GH_SHAPE = gh_quadrature_xyoz INTEGER :: OPERATES_ON = cell_column CONTAINS @@ -33,7 +38,7 @@ &chi1, chi2, chi3, panel_id, ncell_3d, m3_inv, ndf_w3, undf_w3, map_w3, w3_basis, ndf_wt, undf_wt, map_wt, wt_basis, ndf_chi, & &undf_chi, map_chi, chi_basis, chi_diff_basis, ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, wqp_v) use sci_coordinate_jacobian_mod, only : coordinate_jacobian -@@ -96,9 +97,6 @@ +@@ -99,9 +99,6 @@ real(kind=r_def) :: ls_theta_vd_at_quad real(kind=r_def) :: tmp_ls_exner real(kind=r_def) :: tmp_exner @@ -43,7 +48,7 @@ exner_e = 0.0_r_def exner_at_quad = 0.0_r_def -@@ -176,6 +174,6 @@ +@@ -179,6 +176,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch b/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch index 9707453f6..a8d455937 100644 --- a/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch @@ -1,18 +1,19 @@ -@@ -1,11 +1,11 @@ +@@ -1,4 +1,4 @@ -module adj_rhs_project_eos_kernel_mod +module atl_rhs_project_eos_kernel_mod use argument_mod, only : any_discontinuous_space_3, any_space_9, arg_type, cell_column, func_type, gh_basis, gh_diff_basis, & &gh_field, gh_quadrature_xyoz, gh_read, gh_readwrite, gh_real, gh_scalar, gh_write use constants_mod, only : i_def, r_def - use fs_continuity_mod, only : w3, wtheta - use kernel_mod, only : kernel_type +@@ -8,7 +8,7 @@ + use finite_element_config_mod, only : coord_system + use planet_config_mod, only : scaled_radius implicit none - type, public, extends(kernel_type) :: adj_rhs_project_eos_kernel_type + type, public, extends(kernel_type) :: atl_rhs_project_eos_kernel_type type(ARG_TYPE) :: META_ARGS(14) = (/ & arg_type(gh_field, gh_real, gh_readwrite, w3), & arg_type(gh_field, gh_real, gh_readwrite, w3), & -@@ -28,15 +28,15 @@ +@@ -31,15 +31,15 @@ INTEGER :: GH_SHAPE = gh_quadrature_xyoz INTEGER :: OPERATES_ON = cell_column CONTAINS @@ -31,8 +32,8 @@ + subroutine atl_rhs_project_eos_code(nlayers, rhs_eos, exner, rho, theta, moist_dyn_gas, ls_exner, ls_rho, ls_theta, & &ls_moist_dyn_gas, chi1, chi2, chi3, panel_id, kappa, rd, p_zero, ndf_w3, undf_w3, map_w3, w3_basis, ndf_wt, undf_wt, map_wt, & &wt_basis, ndf_chi, undf_chi, map_chi, chi_basis, chi_diff_basis, ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, wqp_v) - use coordinate_jacobian_mod, only : coordinate_jacobian -@@ -176,6 +176,6 @@ + use sci_coordinate_jacobian_mod, only : coordinate_jacobian +@@ -179,6 +179,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch b/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch index 2e526c9d8..20441d4ed 100644 --- a/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch @@ -1,4 +1,4 @@ -@@ -1,34 +1,34 @@ +@@ -1,37 +1,37 @@ -module adj_vorticity_advection_kernel_mod +module atl_vorticity_advection_kernel_mod use kernel_mod, only : kernel_type @@ -8,6 +8,9 @@ - use fs_continuity_mod, only : w1, w2, wchi + use fs_continuity_mod, only : w1, w2 use cross_product_mod, only : cross_product + use base_mesh_config_mod, only : geometry, topology + use finite_element_config_mod, only : coord_system + use planet_config_mod, only : scaled_radius implicit none - type, public, extends(kernel_type) :: adj_vorticity_advection_kernel_type + type, public, extends(kernel_type) :: atl_vorticity_advection_kernel_type @@ -41,7 +44,7 @@ &ndf_w2, undf_w2, map_w2, w2_basis, ndf_w1, undf_w1, map_w1, w1_basis, ndf_chi, undf_chi, map_chi, chi_basis, chi_diff_basis, & &ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, wqp_v) use sci_coordinate_jacobian_mod, only : pointwise_coordinate_jacobian, pointwise_coordinate_jacobian_inverse -@@ -86,7 +86,6 @@ +@@ -89,7 +89,6 @@ real(kind=r_def), dimension(3) :: mul2 real(kind=r_def), dimension(3) :: cross_product1 real(kind=r_def), dimension(3) :: cross_product2 @@ -49,7 +52,7 @@ real(kind=r_def) :: res_dot_product integer :: idx integer :: idx_1 -@@ -207,6 +206,6 @@ +@@ -210,6 +209,6 @@ enddo enddo diff --git a/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf index d95f80afd..27f8410de 100644 --- a/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/earth_like_kernel_mod_test.pf @@ -99,7 +99,6 @@ contains @test subroutine test_all() -use planet_config_mod, only : scaled_radius use, intrinsic :: iso_fortran_env, only : real64 use earth_like_kernel_mod, only : earth_like_code diff --git a/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf b/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf index e394ad44a..0514ececc 100644 --- a/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/external_forcing/tidally_locked_earth_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module tidally_locked_earth_kernel_mod_test - use constants_mod, only : i_def, r_def, r_second, PI + use constants_mod, only : i_def, r_def, r_second, PI, imdi use coord_transform_mod, only : llr2xyz use funit From b3edcf1cb0f3b769b89d93b899b7a2d172dde687 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:58:43 +0000 Subject: [PATCH 09/17] Update file for linked PR --- CONTRIBUTORS.md | 1 + dependencies.yaml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d0daddc68..e156a79fe 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,6 +6,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-01-27 | | 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 | diff --git a/dependencies.yaml b/dependencies.yaml index 73e82a168..146c3dd51 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,8 +30,8 @@ lfric_apps: ref: lfric_core: - source: cazld000020:/data/users/ricky.wong/GitHub/lfric_core - ref: + source: git@github.com:mo-rickywong/lfric_core.git + ref: FloatJacobian moci: source: git@github.com:MetOffice/moci.git From 003f062f323eeaf86a4cd9d28444d9e0248d82f0 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:16:20 +0000 Subject: [PATCH 10/17] remove comments out of patch files --- .../patches/kernel/atl_project_eos_pressure_kernel_mod.patch | 2 -- .../source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 | 1 - 2 files changed, 3 deletions(-) diff --git a/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch b/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch index 2e491bbdd..85bcc5536 100644 --- a/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch @@ -1,5 +1,3 @@ ---- ./applications/adjoint_tests/working/build_adjoint_tests/kernel/core_dynamics/atl_project_eos_pressure_kernel_mod.F90.orig 2026-01-27 07:11:08.000000000 +0000 -+++ ./applications/adjoint_tests/working/build_adjoint_tests/kernel/core_dynamics/atl_project_eos_pressure_kernel_mod.F90 2026-01-27 07:30:11.000000000 +0000 @@ -1,4 +1,4 @@ -module adj_project_eos_pressure_kernel_mod +module atl_project_eos_pressure_kernel_mod diff --git a/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 b/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 index eb37a2328..786b4f2d8 100644 --- a/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 +++ b/science/gungho/source/kernel/diagnostics/compute_total_aam_kernel_mod.F90 @@ -29,7 +29,6 @@ module compute_total_aam_kernel_mod use finite_element_config_mod, only: coord_system use planet_config_mod, only: scaled_radius - implicit none private From d7a8d8502668edd9f6d1eb529d2baf89a59558bc Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Tue, 3 Feb 2026 09:33:18 +0000 Subject: [PATCH 11/17] Update dependencies files to point to linked core --- dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yaml b/dependencies.yaml index 90f5a82d0..3f68cf294 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,7 +30,7 @@ lfric_apps: ref: lfric_core: - source: cazld000020:/data/users/ricky.wong/GitHub/lfric_core + source: git@github.com:mo-rickywong/lfric_core.git ref: IntermediateApiPurge moci: From 9ad2fcdd55baeefcb164e2b49b09b37839264bff Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Tue, 3 Feb 2026 10:06:43 +0000 Subject: [PATCH 12/17] Tidy up the working repo --- .../adjoint_tests/source/adjoint_tests.f90 | 1 - .../gravity_wave/source/gravity_wave.f90 | 2 - .../gungho_model/source/gungho_model.f90 | 1 - .../algorithm/algorithm_test.f90 | 2 - .../source/jedi-interface/jedi_run_mod.f90 | 1 - .../source/jedi_lfric_tests.f90 | 1 - applications/jules/source/jules.f90 | 1 - .../lfric2lfric_infrastructure_mod.X90 | 3 +- .../lfric2lfric/source/lfric2lfric.F90 | 2 - applications/lfric_atm/source/lfric_atm.f90 | 1 - .../lfric_coupled/source/lfric_coupled.f90 | 1 - .../common/lfricinp_lfric_driver_mod.f90 | 3 - .../name_transport/source/name_transport.f90 | 3 - applications/ngarch/source/ngarch.f90 | 2 - .../shallow_water/source/shallow_water.f90 | 1 - applications/transport/source/transport.f90 | 3 - .../time/jedi_lfric_time_test.f90 | 3 - .../jedi_lfric_linear_modeldb_driver_mod.f90 | 2 - .../nl/jedi_lfric_nl_modeldb_driver_mod.f90 | 3 - .../integration-test/cma_test/cma_test.f90 | 4 - .../source/utils/check_config_api_mod.f90 | 393 ------------------ 21 files changed, 2 insertions(+), 431 deletions(-) delete mode 100644 science/shared/source/utils/check_config_api_mod.f90 diff --git a/applications/adjoint_tests/source/adjoint_tests.f90 b/applications/adjoint_tests/source/adjoint_tests.f90 index 7ab159ef3..5a2448a99 100644 --- a/applications/adjoint_tests/source/adjoint_tests.f90 +++ b/applications/adjoint_tests/source/adjoint_tests.f90 @@ -10,7 +10,6 @@ program adjoint_tests - use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use driver_collections_mod, only : init_collections, final_collections use driver_comm_mod, only : init_comm, final_comm diff --git a/applications/gravity_wave/source/gravity_wave.f90 b/applications/gravity_wave/source/gravity_wave.f90 index fa152f15a..596ef3579 100644 --- a/applications/gravity_wave/source/gravity_wave.f90 +++ b/applications/gravity_wave/source/gravity_wave.f90 @@ -11,7 +11,6 @@ program gravity_wave - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_modeldb_mod, only: modeldb_type use driver_collections_mod, only: init_collections, final_collections @@ -47,7 +46,6 @@ program gravity_wave call init_config( filename, gravity_wave_required_namelists, & configuration=modeldb%configuration, & config=modeldb%config ) - call check_config_api( modeldb%configuration, modeldb%config ) deallocate( filename ) diff --git a/applications/gungho_model/source/gungho_model.f90 b/applications/gungho_model/source/gungho_model.f90 index 6da690e67..37bf9a6eb 100644 --- a/applications/gungho_model/source/gungho_model.f90 +++ b/applications/gungho_model/source/gungho_model.f90 @@ -15,7 +15,6 @@ program gungho_model - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use derived_config_mod, only: l_esm_couple use driver_collections_mod, only: init_collections, final_collections diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 index 093539b9b..0be6d7cd1 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 @@ -13,7 +13,6 @@ program algorithm_test use add_mesh_map_mod, only: assign_mesh_maps - use check_config_api_mod, only: check_config_api use configuration_mod, only: final_configuration, & read_configuration use config_mod, only: config_type @@ -152,7 +151,6 @@ program algorithm_test call read_configuration( filename, & configuration=configuration, & config=config ) - call check_config_api( configuration, config ) call init_collections() diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 index c143f65c8..e5d8177d0 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_run_mod.f90 @@ -10,7 +10,6 @@ ! module jedi_run_mod - use check_config_api_mod, only : check_config_api use config_mod, only : config_type use constants_mod, only : i_def, l_def, str_def use namelist_collection_mod, only : namelist_collection_type diff --git a/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 b/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 index a3988cc8e..2da8faf95 100644 --- a/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_lfric_tests.f90 @@ -15,7 +15,6 @@ !> program jedi_lfric_tests - use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use driver_collections_mod, only : init_collections, final_collections use driver_comm_mod, only : init_comm, final_comm diff --git a/applications/jules/source/jules.f90 b/applications/jules/source/jules.f90 index 7997e23d2..339328f54 100644 --- a/applications/jules/source/jules.f90 +++ b/applications/jules/source/jules.f90 @@ -16,7 +16,6 @@ program jules - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index 70f23cb84..faf7d2240 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -316,7 +316,8 @@ contains ! Create the required meshes !----------------------------------------------------------------------- stencil_depth = get_required_stencil_depth() - call init_mesh( modeldb%config, modeldb%configuration, & + call init_mesh( modeldb%config, & + modeldb%configuration, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & mesh_names, extrusion, & diff --git a/applications/lfric2lfric/source/lfric2lfric.F90 b/applications/lfric2lfric/source/lfric2lfric.F90 index 8d119094c..6a877c0d3 100644 --- a/applications/lfric2lfric/source/lfric2lfric.F90 +++ b/applications/lfric2lfric/source/lfric2lfric.F90 @@ -15,7 +15,6 @@ program lfric2lfric use cli_mod, only: parse_command_line - use check_config_api_mod, only: check_config_api use constants_mod, only: precision_real use driver_collections_mod, only: init_collections, final_collections use driver_config_mod, only: init_config, final_config @@ -74,7 +73,6 @@ program lfric2lfric config=modeldb%config ) call init_logger( modeldb%mpi%get_comm(), program_name ) - call check_config_api( modeldb%configuration, modeldb%config ) call init_collections() call init_time( modeldb ) deallocate( filename ) diff --git a/applications/lfric_atm/source/lfric_atm.f90 b/applications/lfric_atm/source/lfric_atm.f90 index ab185238f..41c33aadb 100644 --- a/applications/lfric_atm/source/lfric_atm.f90 +++ b/applications/lfric_atm/source/lfric_atm.f90 @@ -16,7 +16,6 @@ program lfric_atm - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm diff --git a/applications/lfric_coupled/source/lfric_coupled.f90 b/applications/lfric_coupled/source/lfric_coupled.f90 index 5d377706a..8043826da 100644 --- a/applications/lfric_coupled/source/lfric_coupled.f90 +++ b/applications/lfric_coupled/source/lfric_coupled.f90 @@ -16,7 +16,6 @@ program lfric_coupled - use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use coupler_mod, only : set_cpl_name use driver_collections_mod, only : init_collections, final_collections diff --git a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 index 24bd883a6..51e577a87 100644 --- a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 +++ b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 @@ -5,7 +5,6 @@ ! *****************************COPYRIGHT******************************* module lfricinp_lfric_driver_mod -use check_config_api_mod, only: check_config_api use constants_mod, only: i_def, r_def, l_def, r_second, str_def use log_mod, only: log_event, log_scratch_space, & LOG_LEVEL_INFO, LOG_LEVEL_ERROR, & @@ -176,8 +175,6 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & ! Initialise logging system call init_logger( comm, program_name ) -call check_config_api( configuration, config ) - call init_collections() write(log_scratch_space, '(2(A,I0))') 'total ranks = ', total_ranks, & diff --git a/applications/name_transport/source/name_transport.f90 b/applications/name_transport/source/name_transport.f90 index e6ddab9ee..2f2f4f8b3 100644 --- a/applications/name_transport/source/name_transport.f90 +++ b/applications/name_transport/source/name_transport.f90 @@ -9,7 +9,6 @@ program name_transport - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use constants_mod, only: i_def, r_def use driver_collections_mod, only: init_collections, final_collections @@ -54,8 +53,6 @@ program name_transport call init_logger( modeldb%mpi%get_comm(), program_name ) - call check_config_api( modeldb%configuration, modeldb%config ) - call log_event( 'Miniapp will run with default precision set as:', & log_level_info ) write(log_scratch_space, '(" r_def kind = ", I0)') kind(1.0_r_def) diff --git a/applications/ngarch/source/ngarch.f90 b/applications/ngarch/source/ngarch.f90 index 1522b6fda..8e0c2fe46 100644 --- a/applications/ngarch/source/ngarch.f90 +++ b/applications/ngarch/source/ngarch.f90 @@ -8,7 +8,6 @@ !> @details Runs a GungHo model with a custom step method program ngarch - use check_config_api_mod, only : check_config_api use cli_mod, only : parse_command_line use driver_collections_mod, only : init_collections, final_collections use constants_mod, only : precision_real @@ -70,7 +69,6 @@ program ngarch ngarch_required_namelists, & configuration=modeldb%configuration, & config=modeldb%config ) - call check_config_api( modeldb%configuration, modeldb%config ) deallocate( filename ) diff --git a/applications/shallow_water/source/shallow_water.f90 b/applications/shallow_water/source/shallow_water.f90 index 61cc4bc30..a58581a5f 100644 --- a/applications/shallow_water/source/shallow_water.f90 +++ b/applications/shallow_water/source/shallow_water.f90 @@ -14,7 +14,6 @@ program shallow_water - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use driver_collections_mod, only: init_collections, final_collections use driver_comm_mod, only: init_comm, final_comm diff --git a/applications/transport/source/transport.f90 b/applications/transport/source/transport.f90 index 02a9e34e6..5e2bbd560 100644 --- a/applications/transport/source/transport.f90 +++ b/applications/transport/source/transport.f90 @@ -8,7 +8,6 @@ !> run_transport() and finalise_transport(). program transport - use check_config_api_mod, only: check_config_api use cli_mod, only: parse_command_line use constants_mod, only: i_def, r_def use driver_collections_mod, only: init_collections, final_collections @@ -52,8 +51,6 @@ program transport config=modeldb%config ) call init_logger( modeldb%mpi%get_comm(), program_name ) - call check_config_api( modeldb%configuration, modeldb%config ) - call log_event( 'Miniapp will run with default precision set as:', & log_level_trace ) write(log_scratch_space, '(" r_def kind = ", I0)') kind(1.0_r_def) diff --git a/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 b/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 index 4e073568f..75530e3f7 100644 --- a/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 +++ b/interfaces/jedi_lfric_interface/integration-test/time/jedi_lfric_time_test.f90 @@ -10,7 +10,6 @@ !! jedi_lfric_time_test.py. program jedi_lfric_time_test - use check_config_api_mod, only : check_config_api use config_mod, only : config_type use configuration_mod, only : final_configuration, & read_configuration @@ -181,8 +180,6 @@ program jedi_lfric_time_test configuration=configuration, & config=config ) - call check_config_api( configuration, config ) - call test_jedi_interface_init() if ( do_test_init_string_err ) then diff --git a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 index 0c1192351..4530bade2 100644 --- a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 @@ -43,7 +43,6 @@ module jedi_lfric_linear_modeldb_driver_mod adjoint_step, & finalise_adjoint_model use atl_si_timestep_alg_mod, only : atl_si_timestep_type - use check_config_api_mod, only : check_config_api use constants_mod, only : r_def, l_def, str_def use driver_config_mod, only : init_config use driver_time_mod, only : init_time, final_time @@ -152,7 +151,6 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ ! Initialise infrastructure call init_time( modeldb ) call initialise_infrastructure( io_context_name, modeldb ) - call check_config_api( modeldb%configuration, modeldb%config ) ! Add a place to store time axes in modeldb call modeldb%values%add_key_value('model_axes', model_axes) diff --git a/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 index 8272ed2dd..75152c9a4 100644 --- a/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/nl/jedi_lfric_nl_modeldb_driver_mod.f90 @@ -22,7 +22,6 @@ !> module jedi_lfric_nl_modeldb_driver_mod - use check_config_api_mod, only : check_config_api use constants_mod, only : l_def use driver_config_mod, only : init_config use driver_time_mod, only : init_time, final_time @@ -100,8 +99,6 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb ) ! 4. Call the gungho driver initialise call gh_initialise(modeldb_name, modeldb) - call check_config_api( modeldb%configuration, modeldb%config ) - end subroutine initialise_modeldb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 743fca508..6509e025e 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -66,8 +66,6 @@ program cma_test use sci_chi_transform_mod, only : init_chi_transforms, & final_chi_transforms - use check_config_api_mod, only: check_config_api - implicit none ! MPI communicator @@ -238,8 +236,6 @@ program cma_test call configuration%initialise( program_name, table_len=10 ) call config%initialise( program_name ) - call check_config_api( configuration, config ) - deallocate(program_name) deallocate(test_flag) diff --git a/science/shared/source/utils/check_config_api_mod.f90 b/science/shared/source/utils/check_config_api_mod.f90 deleted file mode 100644 index ea0c61ce3..000000000 --- a/science/shared/source/utils/check_config_api_mod.f90 +++ /dev/null @@ -1,393 +0,0 @@ -! ADD Licence????? -!================================================================ -! Temporary code to check new and old confiuration objects return -! the same configuration values. This is to manage the transition -! of the codebase from using a namelist_collection_type to a -! config_type -!================================================================ -module check_config_api_mod - - use constants_mod, only: l_def, i_def, r_def, & - str_def, str_max_filename, & - r_second, i_medium - use config_mod, only: config_type - use log_mod, only: log_event, log_level_warning, & - log_level_info - use namelist_collection_mod, only: namelist_collection_type - use namelist_mod, only: namelist_type - - implicit none - - private - public :: check_config_api - -contains - -subroutine check_config_api( configuration, config ) - - implicit none - - type(namelist_collection_type), intent(in) :: configuration - type(config_type), intent(in) :: config - - type(namelist_type), pointer :: aerosol_nml - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: extrusion_nml - type(namelist_type), pointer :: files_nml - - type(namelist_type), pointer :: planet_nml - type(namelist_type), pointer :: io_nml - type(namelist_type), pointer :: timestepping_nml - type(namelist_type), pointer :: time_nml - type(namelist_type), pointer :: mixed_solver_nml - type(namelist_type), pointer :: microphysics_nml - type(namelist_type), pointer :: multires_coupling_nml - type(namelist_type), pointer :: multigrid_nml - type(namelist_type), pointer :: formulation_nml - type(namelist_type), pointer :: initialization_nml - type(namelist_type), pointer :: boundaries_nml - type(namelist_type), pointer :: finite_element_nml - -! initial_temperature, bvf_square r_def -! gravity_wave_constants b_space i_def - character(str_max_filename) :: start_dump_filename - character(str_max_filename) :: checkpoint_stem_name -! lfric2lfric regrid_method i_def - character(str_def) :: prime_mesh_name - character(str_def) :: aerosol_mesh_name - character(str_def) :: orography_mesh_name - character(str_def) :: time_origin - character(str_def) :: time_start - character(str_max_filename) :: file_prefix - - logical(l_def) :: prepartitioned - integer(i_def) :: geometry - integer(i_def) :: moisture_formulation - integer(i_def) :: lbc_option - integer(i_def) :: ls_option - integer(i_def) :: init_option - integer(i_def) :: lbc_eos_height - integer(i_def) :: model_eos_height - - real(r_def) :: tau_r - real(r_def) :: atol - real(r_def) :: domain_height - real(r_def) :: planet_radius - real(r_def) :: scaled_radius - real(r_second) :: dt - integer(i_def) :: method - integer(i_def) :: nlayers - integer(i_def) :: element_order_h - integer(i_def) :: element_order_v - integer(i_medium) :: diag_freq - logical(l_def) :: nodal - logical(l_def) :: write_diag - logical(l_def) :: use_xios_io - logical(l_def) :: l_multigrid - logical(l_def) :: use_multires_coupling - logical(l_def) :: subroutine_timers - logical(l_def) :: ozone_ancil - logical(l_def) :: aero_ancil - logical(l_def) :: murk_lbc - logical(l_def) :: microphysics_casim - logical(l_def) :: read_w2h_wind - -! character(str_def), allocatable :: chain_mesh_tags(:) -! character(str_def), allocatable :: multires_coupling_mesh_tags(:) - - character(*), parameter :: message = 'Difference in config objects ' - - call log_event('Validating Config/Configuration object data.', & - log_level_info) - - if (configuration%namelist_exists('base_mesh')) then - base_mesh_nml => configuration%get_namelist('base_mesh') - - call base_mesh_nml%get_value( 'prime_mesh_name', prime_mesh_name ) - call base_mesh_nml%get_value( 'file_prefix', file_prefix ) - call base_mesh_nml%get_value( 'geometry', geometry ) - call base_mesh_nml%get_value( 'prepartitioned', prepartitioned ) - - if (prime_mesh_name /= config%base_mesh%prime_mesh_name()) then - call log_event(message//'prime_mesh_name', log_level_warning) - end if - - if (file_prefix /= config%base_mesh%file_prefix()) then - call log_event(message//'file_prefix', log_level_warning) - end if - - if (geometry /= config%base_mesh%geometry()) then - call log_event(message//'geometry', log_level_warning) - end if - - if (prepartitioned .neqv. config%base_mesh%prepartitioned()) then - call log_event(message//'prepartitioned', log_level_warning) - end if - end if - - if (configuration%namelist_exists('extrusion')) then - extrusion_nml => configuration%get_namelist('extrusion') - - call extrusion_nml%get_value( 'method', method ) - call extrusion_nml%get_value( 'planet_radius', planet_radius ) - call extrusion_nml%get_value( 'domain_height', domain_height ) - call extrusion_nml%get_value( 'number_of_layers', nlayers ) - - if (method /= config%extrusion%method()) then - call log_event(message//'method', log_level_warning) - end if - - if (planet_radius /= config%extrusion%planet_radius()) then - call log_event(message//'planet_radius', log_level_warning) - end if - - if (domain_height /= config%extrusion%domain_height()) then - call log_event(message//'domain_height', log_level_warning) - end if - - if (nlayers /= config%extrusion%number_of_layers()) then - call log_event(message//'number_of_layers', log_level_warning) - end if - end if - - if (configuration%namelist_exists('io')) then - io_nml => configuration%get_namelist('io') - - call io_nml%get_value( 'nodal_output_on_w3', nodal ) - call io_nml%get_value( 'write_diag', write_diag ) - call io_nml%get_value( 'use_xios_io', use_xios_io ) - call io_nml%get_value( 'subroutine_timers', subroutine_timers ) - call io_nml%get_value( 'diagnostic_frequency', diag_freq ) - - if (diag_freq /= config%io%diagnostic_frequency()) then - call log_event(message//'diagnostic_frequency', log_level_warning) - end if - - if (nodal .neqv. config%io%nodal_output_on_w3()) then - call log_event(message//'nodal_output_on_w3', log_level_warning) - end if - - if (write_diag .neqv. config%io%write_diag()) then - call log_event(message//'write_diag', log_level_warning) - end if - - if (use_xios_io .neqv. config%io%use_xios_io()) then - call log_event(message//'use_xios_io', log_level_warning) - end if - - if (subroutine_timers .neqv. config%io%subroutine_timers()) then - call log_event(message//'subroutine_timers', log_level_warning) - end if - end if - - if (configuration%namelist_exists('finite_element')) then - finite_element_nml => configuration%get_namelist('finite_element') - - call finite_element_nml%get_value('element_order_h', element_order_h) - call finite_element_nml%get_value('element_order_v', element_order_v) - - if (element_order_h /= config%finite_element%element_order_h()) then - call log_event( message//'element_order_h', log_level_warning ) - end if - - if (element_order_v /= config%finite_element%element_order_v()) then - call log_event( message//'element_order_v', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('formulation')) then - formulation_nml => configuration%get_namelist('formulation') - - call formulation_nml%get_value('l_multigrid', l_multigrid) - call formulation_nml%get_value('moisture_formulation', moisture_formulation) - call formulation_nml%get_value('use_multires_coupling', use_multires_coupling) - - if (moisture_formulation /= config%formulation%moisture_formulation()) then - call log_event( message//'moisture_formulation', log_level_warning ) - end if - - if (l_multigrid .neqv. config%formulation%l_multigrid()) then - call log_event( message//'l_multigrid', log_level_warning ) - end if - - if (use_multires_coupling .neqv. config%formulation%use_multires_coupling()) then - call log_event( message//'use_multires_coupling', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('planet')) then - planet_nml => configuration%get_namelist('planet') - - call planet_nml%get_value( 'scaled_radius', scaled_radius ) - - if (scaled_radius /= config%planet%scaled_radius()) then - call log_event( message//'scaled_radius', log_level_warning ) - end if - end if - - - if (configuration%namelist_exists('timestepping')) then - timestepping_nml => configuration%get_namelist('timestepping') - - call timestepping_nml%get_value( 'dt', dt ) - call timestepping_nml%get_value( 'tau_r', tau_r ) - - if (dt /= config%timestepping%dt()) then - call log_event( message//'dt', log_level_warning ) - end if - - if (tau_r /= config%timestepping%tau_r()) then - call log_event( message//'tau_r', log_level_warning ) - end if - - end if - - - if (configuration%namelist_exists('mixed_solver')) then - mixed_solver_nml => configuration%get_namelist('mixed_solver') - - call mixed_solver_nml%get_value('mixed_solver_a_tol', atol) - - if (atol /= config%mixed_solver%mixed_solver_a_tol()) then - call log_event( message//'mixed_solver_a_tol', log_level_warning ) - end if - end if - - - if (configuration%namelist_exists('initialization')) then - initialization_nml => configuration%get_namelist('initialization') - - call initialization_nml%get_value('ls_option', ls_option) - call initialization_nml%get_value('lbc_option', lbc_option) - call initialization_nml%get_value('coarse_aerosol_ancil', aero_ancil) - call initialization_nml%get_value('coarse_ozone_ancil', ozone_ancil) - call initialization_nml%get_value('init_option', init_option) - call initialization_nml%get_value('model_eos_height', model_eos_height) - call initialization_nml%get_value('read_w2h_wind', read_w2h_wind) - - if (ls_option /= config%initialization%ls_option()) then - call log_event( message//'ls_option', log_level_warning ) - end if - - if (lbc_option /= config%initialization%lbc_option()) then - call log_event( message//'lbc_option', log_level_warning ) - end if - - if (init_option /= config%initialization%init_option()) then - call log_event( message//'init_option', log_level_warning ) - end if - - if (aero_ancil .neqv. config%initialization%coarse_aerosol_ancil()) then - call log_event( message//'aerosol_ancil', log_level_warning ) - end if - - if (ozone_ancil .neqv. config%initialization%coarse_ozone_ancil()) then - call log_event( message//'ozone_ancil', log_level_warning ) - end if - - if (model_eos_height /= config%initialization%model_eos_height()) then - call log_event( message//'model_eos_height', log_level_warning ) - end if - - if (read_w2h_wind .neqv. config%initialization%read_w2h_wind()) then - call log_event( message//'read_w2h_wind', log_level_warning ) - end if - - end if - - - if (configuration%namelist_exists('boundaries')) then - boundaries_nml => configuration%get_namelist('boundaries') - - call boundaries_nml%get_value('lbc_eos_height', lbc_eos_height) - - if (lbc_eos_height /= config%boundaries%lbc_eos_height()) then - call log_event( message//'lbc_eos_height', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('multires_coupling')) then - multires_coupling_nml => configuration%get_namelist('multires_coupling') - - call multires_coupling_nml%get_value('aerosol_mesh_name', aerosol_mesh_name) - call multires_coupling_nml%get_value('orography_mesh_name', orography_mesh_name) -! call multires_coupling_nml%get_value('multires_coupling_mesh_tags', multires_coupling_mesh_tags) - - if (orography_mesh_name /= config%multires_coupling%orography_mesh_name()) then - call log_event( message//'orography_mesh_name', log_level_warning ) - end if - -!!$ if (multires_coupling_mesh_tags /= config%multires_coupling%multires_coupling_mesh_tags()) then -!!$ call log_event( message//'multires_coupling_mesh_tags', log_level_warning ) -!!$ end if - - if (aerosol_mesh_name /= config%multires_coupling%aerosol_mesh_name()) then - call log_event( message//'aerosol_mesh_name', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('aerosol')) then - aerosol_nml => configuration%get_namelist('aerosol') - - call aerosol_nml%get_value('murk_lbc', murk_lbc) - - if (murk_lbc .neqv. config%aerosol%murk_lbc()) then - call log_event( message//'murk_lbc', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('multigrid')) then - multigrid_nml => configuration%get_namelist('multigrid') - -!!$ call multigrid_nml%get_value('chain_mesh__tags', chain_mesh_tags) -!!$ chain_mesh_tags_2 = config%multigrid%chain_mesh_tags() -!!$ do i=1, size(chain_mesh_tags) -!!$ if (chain_mesh_tags /= config%multigrid%chain_mesh_tags()) then -!!$ call log_event( message//'chain_mesh_tags', log_level_warning ) -!!$ end if -!!$ end do - end if - - if (configuration%namelist_exists('microphysics')) then - microphysics_nml => configuration%get_namelist('microphysics') - - call microphysics_nml%get_value('microphysics_casim', microphysics_casim) - - if (microphysics_casim .neqv. config%microphysics%microphysics_casim()) then - call log_event( message//'microphysics_casim', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('time')) then - time_nml => configuration%get_namelist('time') - - call time_nml%get_value('calendar_origin', time_origin) - call time_nml%get_value('calendar_start', time_start) - - if (time_origin /= config%time%calendar_origin()) then - call log_event( message//'calendar_origin', log_level_warning ) - end if - - if (time_start /= config%time%calendar_start()) then - call log_event( message//'calendar_start', log_level_warning ) - end if - end if - - if (configuration%namelist_exists('files')) then - files_nml => configuration%get_namelist('files') - - call files_nml%get_value('start_dump_filename', start_dump_filename) - call files_nml%get_value('checkpoint_stem_name', checkpoint_stem_name) - - if (start_dump_filename /= config%files%start_dump_filename()) then - call log_event( message//'start_dump_filename', log_level_warning ) - end if - - if (checkpoint_stem_name /= config%files%checkpoint_stem_name()) then - call log_event( message//'checkpoint_stem_name', log_level_warning ) - end if - end if - -end subroutine check_config_api - -end module check_config_api_mod From 009b003631e96ca07ba4277a72f8b7a38ea29126 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:24:17 +0000 Subject: [PATCH 13/17] Add name to CONTRIBUTORS.md file --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ed1318623..337cde25b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 | From 2b19c6be199e4664fd9db72fe6aa3815151428cc Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:02:25 +0000 Subject: [PATCH 14/17] Point repo to corresponing lfric_core --- dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yaml b/dependencies.yaml index 0b903e639..e0fbfd8c5 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -30,7 +30,7 @@ lfric_apps: ref: lfric_core: - source: cazld000020:/data/users/ricky.wong/GitHub/lfric_core + source: git@github.com:mo-rickywong/lfric_core.git ref: IntermediateApiFullPurge moci: From af5ac1ecb863eaef8cdfb97e73f5258c4c8d17dc Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:45:17 +0000 Subject: [PATCH 15/17] Revert any change to CONTRIBUTORS file --- CONTRIBUTORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 9535a50b2..06d974b4f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -7,7 +7,6 @@ | 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-01-27 | | 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 | @@ -24,4 +23,5 @@ | mo-lottieturner | Lottie Turner | Met Office | 2026-01-27 | | andrewcoughtrie | Andrew Coughtrie | Met Office | 2026-01-28 | | tommbendall | Thomas Bendall | Met Office | 2026-01-13 | +| mo-jmanners | James Manners | Met Office | 2026-01-14 | | maggiehendry | Maggie Hendry | Met Office | 2026-01-29 | From 710ff9acf35eaab0af104231da3289b931a92166 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:33:04 +0000 Subject: [PATCH 16/17] Merge on main --- .github/CODEOWNERS | 80 +- .github/pull_request_template.md | 2 +- .../workflows/trigger-project-workflow.yaml | 2 +- CONTRIBUTORS.md | 58 +- CodeOwners.txt | 54 -- README.md | 2 + .../adjoint_tests/example/configuration.nml | 30 +- applications/adjoint_tests/example/iodef.xml | 10 + .../rose-meta/lfric-adjoint_tests/versions.py | 120 +++ .../linear_physics/atlt_bdy_lyr_alg_mod.x90 | 192 ++++ .../linear_physics/atlt_bl_inc_alg_mod.x90 | 187 ++++ .../mol/adjt_poly1d_recon_lookup_alg_mod.x90 | 9 +- .../mol/adjt_poly2d_recon_lookup_alg_mod.x90 | 7 +- .../mol/adjt_poly_adv_upd_lookup_alg_mod.x90 | 7 +- .../mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 | 9 +- .../solver/adjt_mixed_operator_alg_mod.x90 | 11 +- ...djt_mixed_schur_preconditioner_alg_mod.x90 | 31 +- .../solver/adjt_mixed_solver_alg_mod.x90 | 31 +- .../solver/adjt_pressure_precon_alg_mod.x90 | 27 +- .../adjt_scaled_matrix_vector_alg_mod.x90 | 5 +- ...adjt_semi_implicit_solver_step_alg_mod.x90 | 42 +- .../adjt_end_transport_step_alg_mod.x90 | 12 +- .../atlt_end_transport_step_alg_mod.x90 | 20 +- .../atlt_moist_mr_transport_alg_mod.x90 | 18 +- .../control/atlt_theta_transport_alg_mod.x90 | 16 +- .../atlt_transport_control_alg_mod.x90 | 23 +- .../control/atlt_transport_field_alg_mod.x90 | 50 +- .../control/atlt_wind_transport_alg_mod.x90 | 18 +- .../init_from_controller_alg_mod.x90 | 4 +- .../inner_from_controller_rdef_alg_mod.x90 | 32 +- .../inner_from_controller_rtran_alg_mod.x90 | 24 +- .../mol/adjt_reconstruct_w3_field_alg_mod.x90 | 24 +- .../mol/adjt_wt_advective_update_alg_mod.x90 | 22 +- .../mol/atlt_advective_and_flux_alg_mod.x90 | 29 +- .../mol/atlt_mol_advective_alg_mod.x90 | 22 +- .../mol/atlt_mol_conservative_alg_mod.x90 | 34 +- .../mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 | 9 +- .../mol/atlt_poly_adv_update_alg_mod.X90 | 7 +- .../mol/atlt_reconstruct_w3_field_alg_mod.x90 | 33 +- .../mol/atlt_w3h_advective_update_alg_mod.X90 | 7 +- .../mol/atlt_wt_advective_update_alg_mod.x90 | 41 +- .../source/driver/adjoint_test_driver_mod.f90 | 44 +- .../driver/adjoint_test_parameters_mod.F90 | 12 +- .../rose-meta/lfric-gravity_wave/versions.py | 45 + .../gravity_wave_infrastructure_mod.f90 | 9 +- .../gungho_model/example/configuration.nml | 1 + .../gungho_model/example/file_def_initial.xml | 2 + .../lam_example/baroclinic/config_driver.nml | 1 + .../lam_example/baroclinic/config_lam.nml | 1 + .../lam_example/straka/config_driver.nml | 1 + .../lam_example/straka/config_lam.nml | 1 + .../rose-meta/lfric-gungho_model/versions.py | 45 + .../example/configuration.nml | 145 ++- .../jedi_lfric_tests/example/iodef.xml | 10 + .../jedi_lfric_tests/example/mesh_C12.nc | Bin 85708 -> 0 bytes .../C224_create_traj_file.sh | 19 + .../example_forecast/configuration.nml | 1 + .../example_forecast/iodef.xml | 2 + .../example_id_tlm_tests/configuration.nml | 204 ++-- .../example_id_tlm_tests/iodef.xml | 18 +- .../example_id_tlm_tests/mesh_C12.nc | Bin 85708 -> 0 bytes .../example_tlm_forecast_tl/configuration.nml | 214 +++-- .../configuration_op.nml | 1 + .../example_tlm_forecast_tl/iodef.xml | 10 + .../example_tlm_forecast_tl/mesh_C12.nc | Bin 85708 -> 0 bytes .../example_tlm_tests/configuration.nml | 211 +++-- .../example_tlm_tests/configuration_dry.nml | 404 -------- .../example_tlm_tests/iodef.xml | 18 +- .../algorithm/algorithm_test.f90 | 2 +- .../rose-meta/jedi_common/HEAD/rose-meta.conf | 8 + .../rose-meta/jedi_common/versions.py | 138 ++- .../rose-meta/jedi_forecast/versions.py | 137 +++ .../jedi_forecast_pseudo/versions.py | 137 +++ .../rose-meta/jedi_id_tlm_tests/versions.py | 137 +++ .../rose-meta/jedi_lfric_tests/versions.py | 137 +++ .../jedi_tlm_forecast_tl/versions.py | 137 +++ .../jedi_tlm_tests/HEAD/rose-meta.conf | 3 - .../rose-meta/jedi_tlm_tests/versions.py | 137 +++ .../jedi_id_linear_model_mod.f90 | 5 +- .../jedi-interface/jedi_linear_model_mod.f90 | 5 +- .../jedi_setup_field_meta_data_mod.F90 | 3 + .../source/jedi_id_tlm_tests.f90 | 4 +- .../source/jedi_tlm_tests.f90 | 22 +- applications/jules/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 5 + applications/jules/example/configuration.nml | 1 + .../jules/rose-meta/lfric-jules/versions.py | 45 + .../lfric2lfric/example/configuration.nml | 1 + .../lfric-lfric2lfric/HEAD/rose-meta.conf | 48 +- .../rose-meta/lfric-lfric2lfric/versions.py | 69 +- .../lfric2lfric_oasis_regrid_mod.X90 | 11 +- .../source/driver/lfric2lfric_driver_mod.F90 | 193 ++-- .../source/driver/lfric2lfric_init_mod.f90 | 64 +- .../source/driver/lfric2lfric_regrid_mod.F90 | 112 +++ .../lfric2lfric_field_init_mod.f90 | 22 +- .../lfric2lfric_file_init_mod.f90 | 127 ++- .../lfric2lfric_infrastructure_mod.X90 | 101 +- .../initialisation/lfric2lfric_init_mesh.f90 | 38 +- .../lfric2lfric/source/lfric2lfric.F90 | 8 +- applications/lfric_atm/Makefile | 2 +- .../lfric_atm/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 28 +- .../lfric_atm/example/configuration.nml | 1 + .../lfric_atm/metadata/field_def_diags.xml | 2 + .../metadata/field_def_initial_diags.xml | 2 + .../transmute/boundary_layer/bl_diags_mod.py | 33 + .../boundary_layer/kmkhz_9c_wtrac.py | 80 ++ .../transmute/boundary_layer/local.py | 176 ++++ .../boundary_layer/script_options.py | 165 ++++ .../transmute/kernel/bm_tau_kernel_mod.py | 6 +- .../transmute/kernel/jules_exp_kernel_mod.py | 17 +- .../kernel/jules_extra_kernel_mod.py | 10 +- .../transmute/kernel/jules_imp_kernel_mod.py | 21 +- .../kernel/pc2_conv_coupling_kernel_mod.py | 6 +- .../kernel/pc2_initiation_kernel_mod.py | 6 +- .../kernel/sw_rad_tile_kernel_mod.py | 10 +- .../meto-ex1a/transmute/script_options.py | 1 + .../rose-meta/lfric-lfric_atm/versions.py | 45 + applications/lfric_coupled/Makefile | 2 +- .../lfric_coupled/build/compile_options.mk | 3 +- .../lfric_coupled/example/configuration.nml | 1 + .../rose-meta/lfric-lfric_coupled/versions.py | 45 + .../common/lfricinp_lfric_driver_mod.f90 | 2 +- .../linear_model/example/configuration.nml | 6 +- applications/linear_model/example/iodef.xml | 10 +- .../example_file/config_linear.nml | 1 + .../example_file/config_nonlinear.nml | 1 + .../plot_convergence/plot_convergence.sh | 83 -- .../rose-meta/lfric-linear_model/versions.py | 120 +++ .../name_transport/example/configuration.nml | 1 + .../lfric-name_transport/versions.py | 45 + .../driver/name_transport_driver_mod.f90 | 26 +- applications/ngarch/Makefile | 2 +- applications/ngarch/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 18 +- .../ngarch/example/configuration_bl.nml | 1 + .../ngarch/example/configuration_casim.nml | 1 + .../ngarch/rose-meta/lfric-ngarch/versions.py | 45 + .../algorithm/boundary_layer_timestep_mod.x90 | 6 +- .../shallow_water/example/configuration.nml | 1 + .../rose-meta/lfric-shallow_water/versions.py | 45 + .../source/driver/shallow_water_model_mod.F90 | 11 +- applications/solver/source/solver.F90 | 2 +- .../transport/example/configuration.nml | 1 + .../rose-meta/lfric-transport/versions.py | 45 + .../source/driver/transport_driver_mod.f90 | 27 +- build/extract/extract_physics.mk | 5 +- build/extract/extract_science.py | 130 +-- build/extract/get_git_sources.py | 402 ++++++++ build/local_build.py | 115 +-- .../source/developer_guide/local_builds.rst | 16 + .../checkpointing/lfric_atm_checkpoint.rst | 20 +- .../rose-meta/coupling/versions.py | 45 + .../jedi_lfric_interface/versions.py | 120 +++ .../jedi_lfric_linear_modeldb_driver_mod.f90 | 2 +- .../field/atlas_field_interface_mod.F90 | 8 +- .../field/jedi_lfric_linear_fields_mod.f90 | 61 +- .../source/mesh/jedi_lfric_mesh_setup_mod.F90 | 16 +- interfaces/jules_interface/build/import.mk | 3 +- .../source/algorithm/jules_exp_alg_mod.x90 | 7 +- .../algorithm/jules_timestep_alg_mod.x90 | 4 +- .../source/kernel/jules_exp_kernel_mod.F90 | 7 +- .../build/psyclone_transmute.mk | 10 +- .../build/psyclone_transmute_pass.mk | 8 +- .../build/transmute_psytrans/tools.py | 50 + .../transmute_psytrans/transmute_functions.py | 160 ++++ .../um-stochastic_physics/HEAD/rose-meta.conf | 31 +- .../source/algorithm/bl_exp_alg_mod.x90 | 7 +- .../algorithm/glomap_aerosol_alg_mod.x90 | 10 +- .../source/algorithm/skeb_main_alg_mod.x90 | 12 +- .../source/algorithm/spt_main_alg_mod.x90 | 12 +- .../source/algorithm/stph_fp_main_alg_mod.x90 | 23 +- .../source/kernel/bl_exp_kernel_mod.F90 | 15 +- .../kernel/glomap_aerosol_kernel_mod.F90 | 10 +- .../source/psy/psykal_lite_phys_mod.F90 | 10 +- .../source/support/um_physics_init_mod.f90 | 10 +- interfaces/socrates_interface/build/import.mk | 3 +- .../socrates-radiation/HEAD/rose-meta.conf | 13 +- .../rose-meta/socrates-radiation/versions.py | 17 +- .../source/algorithm/cosp_alg_mod.x90 | 6 +- .../source/algorithm/illuminate_alg_mod.x90 | 3 + .../source/kernel/illuminate_kernel_mod.F90 | 45 +- .../adjoint_tests/file/field_def_diags_ls.xml | 44 + .../app/adjoint_tests/file/file_def_ancil.xml | 9 + .../file/file_def_check_restart.xml | 15 + .../app/adjoint_tests/file/file_def_diags.xml | 17 + .../adjoint_tests/file/file_def_diags_ls.xml | 13 + .../adjoint_tests/file/file_def_initial.xml | 17 + .../app/adjoint_tests/file/file_def_ls.xml | 20 + .../app/adjoint_tests/file/file_def_read.xml | 19 + rose-stem/app/adjoint_tests/file/iodef.xml | 369 ++------ .../opt/rose-app-nwp_gal9_c12.conf | 4 +- .../opt/rose-app-varying_ls.conf | 1 + rose-stem/app/adjoint_tests/rose-app.conf | 39 +- .../bin/generate_weights_lfric2lfric.py | 2 +- rose-stem/app/gravity_wave/rose-app.conf | 16 +- .../gungho_model/file/file_def_initial.xml | 2 + .../opt/rose-app-suite_controlled.conf | 5 + rose-stem/app/gungho_model/rose-app.conf | 16 +- rose-stem/app/jedi_forecast/file/iodef.xml | 2 + .../opt/rose-app-gh-si-for-linear.conf | 1 + rose-stem/app/jedi_forecast/rose-app.conf | 30 +- .../app/jedi_forecast_pseudo/rose-app.conf | 30 +- .../app/jedi_id_tlm_tests/file/iodef.xml | 12 + .../opt/rose-app-C12_MG.conf | 8 + .../opt/rose-app-default.conf | 0 .../opt/rose-app-nwp_gal9_c12.conf | 26 + rose-stem/app/jedi_id_tlm_tests/rose-app.conf | 290 +++--- rose-stem/app/jedi_lfric_tests/file/iodef.xml | 12 +- .../jedi_lfric_tests/opt/rose-app-C12_MG.conf | 8 + .../opt/rose-app-nwp_gal9.conf | 3 - .../opt/rose-app-nwp_gal9_c12.conf | 20 + .../opt/rose-app-runge-kutta.conf | 32 +- rose-stem/app/jedi_lfric_tests/rose-app.conf | 227 +++-- .../app/jedi_tlm_forecast_tl/file/iodef.xml | 12 + .../opt/rose-app-C12_MG.conf | 8 + .../opt/rose-app-C12_MG_op.conf | 7 + .../opt/rose-app-default.conf | 0 .../opt/rose-app-nwp_gal9_c12.conf | 26 + .../opt/rose-app-rrt_equals_dt.conf | 2 + .../opt/rose-app-semi_strict_solver.conf | 9 + .../app/jedi_tlm_forecast_tl/rose-app.conf | 293 +++--- rose-stem/app/jedi_tlm_tests/file/iodef.xml | 12 + .../jedi_tlm_tests/opt/rose-app-C12_MG.conf | 8 + .../opt/rose-app-C12_MG_op.conf | 7 + .../jedi_tlm_tests/opt/rose-app-C224_MG.conf | 8 + .../jedi_tlm_tests/opt/rose-app-default.conf | 0 .../app/jedi_tlm_tests/opt/rose-app-dry.conf | 5 + .../opt/rose-app-nwp_gal9_c12.conf | 28 + .../opt/rose-app-nwp_gal9_c224.conf | 3 + .../opt/rose-app-real_increment.conf | 5 + .../opt/rose-app-relaxed_solver.conf | 15 - .../opt/rose-app-rrt_equals_dt.conf | 2 + .../opt/rose-app-semi_strict_solver.conf | 9 + .../opt/rose-app-strict_solver.conf | 15 + rose-stem/app/jedi_tlm_tests/rose-app.conf | 294 +++--- rose-stem/app/jules/rose-app.conf | 16 +- .../app/lfric2lfric/file/axis_def_main.xml | 1 + rose-stem/app/lfric2lfric/file/iodef_lbc.xml | 86 ++ .../app/lfric2lfric/opt/rose-app-lbc.conf | 21 + rose-stem/app/lfric2lfric/rose-app.conf | 19 +- .../file/file_def_diags_oper_nwp_gl.xml | 7 - .../lfric_atm/file/file_def_initial_diags.xml | 2 +- .../file/iodef_gal_nwp_oper_hres.xml | 1 + .../opt/rose-app-camembert_case3_gj1214b.conf | 1 + .../app/lfric_atm/opt/rose-app-climate.conf | 1 + rose-stem/app/lfric_atm/opt/rose-app-da.conf | 4 +- rose-stem/app/lfric_atm/opt/rose-app-eda.conf | 4 +- .../app/lfric_atm/opt/rose-app-eda_jada.conf | 4 +- .../app/lfric_atm/opt/rose-app-hd209458b.conf | 1 + .../opt/rose-app-physics_segmentation.conf | 2 - rose-stem/app/lfric_atm/rose-app.conf | 16 +- .../lfric_coupled_atmosphere/rose-app.conf | 16 +- .../linear_model/file/field_def_diags_ls.xml | 44 + .../app/linear_model/file/file_def_ancil.xml | 9 + .../file/file_def_check_restart.xml | 15 + .../app/linear_model/file/file_def_diags.xml | 17 + .../linear_model/file/file_def_diags_ls.xml | 13 + .../linear_model/file/file_def_initial.xml | 17 + .../app/linear_model/file/file_def_ls.xml | 20 + .../app/linear_model/file/file_def_read.xml | 19 + rose-stem/app/linear_model/file/iodef.xml | 378 ++------ .../linear_model/opt/rose-app-dcmip301.conf | 11 + .../opt/rose-app-nwp_gal9_c12.conf | 4 +- .../opt/rose-app-runge-kutta.conf | 13 + .../opt/rose-app-semi-implicit.conf | 13 + rose-stem/app/linear_model/rose-app.conf | 37 +- .../app/mesh/opt/rose-app-C12_MG_op.conf | 18 + .../app/mesh/opt/rose-app-C24_MG_op.conf | 1 + .../app/mesh/opt/rose-app-ral3_seuk.conf | 199 ---- rose-stem/app/mesh/opt/rose-app-ral3_uk.conf | 194 ---- rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf | 194 ---- rose-stem/app/mesh/opt/rose-app-seuk_MG.conf | 3 + rose-stem/app/name_transport/rose-app.conf | 16 +- rose-stem/app/ngarch/rose-app.conf | 16 +- rose-stem/app/shallow_water/rose-app.conf | 16 +- rose-stem/app/transport/rose-app.conf | 16 +- .../gungho_model/tasks_gungho_model.cylc | 41 + .../tasks_jedi_lfric_tests.cylc | 211 +++-- .../common/lfric2lfric/tasks_lfric2lfric.cylc | 16 +- .../common/lfric_atm/tasks_lfric_atm.cylc | 55 +- .../linear_model/tasks_linear_model.cylc | 9 +- .../site/meto/common/suite_config_ex1a.cylc | 32 +- .../meto/groups/groups_adjoint_tests.cylc | 6 +- .../site/meto/groups/groups_gungho_model.cylc | 3 + .../meto/groups/groups_jedi_lfric_tests.cylc | 74 +- .../site/meto/groups/groups_lfric2lfric.cylc | 2 + .../site/meto/groups/groups_lfric_atm.cylc | 12 +- .../site/meto/groups/groups_linear_model.cylc | 16 +- ...2000x2000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ic-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...MG-2panel_azspice_gnu_fast-debug-64bit.txt | 3 + ...MG-3panel_azspice_gnu_fast-debug-64bit.txt | 3 + ...ic-C48_MG_azspice_gnu_fast-debug-64bit.txt | 3 + ...1-C24s_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...C24_MG_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...G_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...rt-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0-100x100_azspice_gnu_fast-debug-64bit.txt | 6 +- ...00-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...og-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...01-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...er-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ke-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ez-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...in-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0x8-10x10_azspice_gnu_fast-debug-64bit.txt | 8 +- ...0x8-10x10_azspice_gnu_fast-debug-64bit.txt | 8 +- ...br-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...C24_MG_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...G_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...96_MG_lam_azspice_gnu_fast-debug-64bit.txt | 6 +- ...am_rotate_azspice_gnu_fast-debug-64bit.txt | 6 +- ...8-500x500_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1000x1000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...inear-C12_azspice_gnu_fast-debug-64bit.txt | 2 +- ...er-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1000x2000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...8-200x200_azspice_gnu_fast-debug-64bit.txt | 6 +- ...4-200x200_azspice_gnu_fast-debug-64bit.txt | 6 +- ...200x50_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...th-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...4s_rot_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...linic-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...linic-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 3 + ...alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...t2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...0x10-100x100_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...ip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...lorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...ip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...piter-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...uarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...omain-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...P100x8-10x10_ex1a_gnu_fast-debug-64bit.txt | 8 +- ...P100x8-10x10_ex1a_gnu_fast-debug-64bit.txt | 8 +- ...l_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...t2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...4_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...m-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...G_lam_rotate_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...00x8-500x500_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...r-linear-C12_ex1a_gnu_fast-debug-64bit.txt | 2 +- ...piter-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x8-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x4-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...16-200x50_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x8-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...inear-C12_azspice_gnu_fast-debug-64bit.txt | 2 +- ...inear-C12_azspice_gnu_full-debug-64bit.txt | 2 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 9 + ..._gal9-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...kutta-C12_azspice_gnu_fast-debug-64bit.txt | 6 +- ...kutta-C12_azspice_gnu_full-debug-64bit.txt | 6 +- ...fault-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...lt-C12_op_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 9 + ...C12_MG_op_azspice_gnu_fast-debug-64bit.txt | 9 + ...r-linear-C12_ex1a_cce_fast-debug-64bit.txt | 2 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 9 + ...nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ...ge-kutta-C12_ex1a_cce_fast-debug-64bit.txt | 6 +- ..._default-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ...fault-C12_op_ex1a_cce_fast-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 9 + ...l9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt | 9 + ...6_lam-lbc_azspice_gnu_fast-debug-64bit.txt | 6 + ...k_C16_lam_azspice_gnu_fast-debug-64bit.txt | 6 +- ..._C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt | 6 + ...seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt | 6 +- ...lanet-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...1214b-C12_azspice_gnu_fast-debug-32bit.txt | 4 +- ..._gal9-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._chem-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...9458b-C24_azspice_gnu_fast-debug-32bit.txt | 6 +- ...casim-C12_azspice_gnu_fast-debug-32bit.txt | 18 +- ...coma9-C12_azspice_gnu_fast-debug-32bit.txt | 16 +- ...h_dev-C12_azspice_gnu_fast-debug-32bit.txt | 9 - ..._gal9-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._gal9-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C48_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...-pert-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...ro-C48_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...l9_da-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...debug-C12_azspice_gnu_full-debug-32bit.txt | 14 +- ...ug-C48_MG_azspice_gnu_full-debug-32bit.txt | 12 +- ...9_eda-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._jada-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...9_mol-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...short-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...3-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 16 +- ...s-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 16 +- ...l-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...0x1500_MG_azspice_gnu_fast-debug-32bit.txt | 12 +- ...n1-C48_MG_azspice_gnu_fast-debug-32bit.txt | 6 +- ...uaplanet-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gj1214b-C12_ex1a_cce_fast-debug-32bit.txt | 4 +- ...lim_gal9-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...al9_chem-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._chem_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._chem_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...1500x1500_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ...d209458b-C24_ex1a_cce_fast-debug-32bit.txt | 4 +- ...wp_casim-C12_ex1a_cce_fast-debug-32bit.txt | 18 +- ...wp_coma9-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...orph_dev-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...morph_tb-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ..._gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...al9-pert-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt | 14 +- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._aero-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eaded-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt | 14 +- ..._gal9_da-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_debug-C12_ex1a_cce_full-debug-32bit.txt | 12 +- ...debug-C48_MG_ex1a_cce_full-debug-32bit.txt | 12 +- ...gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eda_jada-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...oukca_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...oukca_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ...ca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt | 15 +- ...ca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_short-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ..._ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ...xmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 10 +- ...1500x1500_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ..._ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt | 6 +- ...nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +- ...ip301-C24_azspice_gnu_fast-debug-64bit.txt | 6 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C12_MG_azspice_gnu_production-32bit.txt | 9 + ...om-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...licit-C12_azspice_gnu_fast-debug-64bit.txt | 6 +- ...dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt | 6 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt | 9 + ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 9 + ..._gal9-C12_MG_ex1a_cce_production-32bit.txt | 9 + ..._gal9-C12_MG_ex1a_cce_production-64bit.txt | 9 + ..._gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt | 9 + ..._gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt | 9 + ..._gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt | 9 + ..._gal9-C12_MG_ex1a_gnu_production-32bit.txt | 9 + ..._gal9-C12_MG_ex1a_gnu_production-64bit.txt | 9 + ...andom-C12_MG_ex1a_gnu_fast-debug-64bit.txt | 14 +- ...implicit-C12_ex1a_gnu_fast-debug-64bit.txt | 6 +- rose-stem/site/meto/macros/macros_ex1a.cylc | 10 +- rose-stem/site/meto/suite_config.cylc | 4 + rose-stem/site/meto/variables.cylc | 27 +- .../runtime/generate_runtime_control.cylc | 10 +- .../adj_dg_matrix_vector_kernel_mod.patch | 18 + .../adj_horizontal_mass_flux_kernel_mod.patch | 11 + ...i_combine_multidata_field_kernel_mod.patch | 73 +- .../adj_w3v_advective_update_kernel_mod.patch | 42 + .../atl_horizontal_mass_flux_kernel_mod.patch | 15 +- .../atl_w3v_advective_update_kernel_mod.patch | 19 +- .../rose-meta/lfric-adjoint/versions.py | 120 +++ .../linear_physics/atl_bdy_lyr_alg.x90 | 141 +++ .../linear_physics/atl_physics_alg.x90 | 148 +++ .../algorithm/lookup/adj_lookup_table_mod.x90 | 22 - .../solver/adj_solver_lookup_cache_mod.x90 | 46 +- .../transport/adj_trans_lookup_cache_mod.x90 | 86 +- .../solver/adj_pressure_operator_alg_mod.x90 | 30 +- .../adj_semi_implicit_solver_alg_mod.x90 | 27 +- .../timestepping/atl_si_timestep_alg_mod.x90 | 96 +- .../common/adj_end_transport_step_alg_mod.x90 | 9 + .../common/adj_flux_precomputations_mod.x90 | 2 +- .../common/atl_end_transport_step_alg_mod.x90 | 9 +- .../atl_moist_mr_transport_alg_mod.x90 | 29 +- .../control/atl_split_transport_mod.x90 | 338 +++++++ .../control/atl_theta_transport_alg_mod.x90 | 38 +- .../control/atl_transport_control_alg_mod.x90 | 64 +- .../control/atl_transport_field_mod.f90 | 34 +- .../control/atl_wind_transport_alg_mod.x90 | 34 +- .../mol/adj_reconstruct_w3_field_alg_mod.x90 | 54 +- .../mol/adj_wt_advective_update_alg_mod.x90 | 62 +- .../mol/atl_advective_and_flux_alg_mod.x90 | 84 +- .../mol/atl_mol_advective_alg_mod.x90 | 92 +- .../mol/atl_mol_conservative_alg_mod.x90 | 92 +- .../mol/atl_reconstruct_w3_field_alg_mod.x90 | 39 +- .../mol/atl_wt_advective_update_alg_mod.x90 | 56 +- .../linear_physics/atl_bl_inc_kernel_mod.F90 | 177 ++++ ...ly1d_vert_w3_reconstruction_kernel_mod.F90 | 7 +- .../mol/atl_poly_adv_update_kernel_mod.F90 | 19 +- .../atl_w3h_advective_update_kernel_mod.F90 | 8 +- .../integration-test/cma_test/cma_test.f90 | 5 +- .../lfric-gungho/HEAD/rose-meta.conf | 19 +- .../gungho/rose-meta/lfric-gungho/versions.py | 43 +- .../physics/map_fd_to_prognostics_alg_mod.x90 | 81 +- .../physics/slow_physics_alg_mod.X90 | 6 +- .../solver/mixed_operator_alg_mod.x90 | 58 +- .../mixed_schur_preconditioner_alg_mod.x90 | 5 +- .../common/end_of_transport_step_alg_mod.x90 | 1 + .../common/remap_on_extended_mesh_alg_mod.x90 | 3 +- .../common/transport_counter_mod.x90 | 74 +- .../common/transport_metadata_mod.F90 | 14 +- .../control/transport_controller_mod.x90 | 51 +- .../transport/ffsl/ffsl_hori_alg_mod.x90 | 9 +- .../mol/reconstruct_w3_field_alg_mod.x90 | 3 +- .../mol/wt_advective_update_alg_mod.x90 | 3 +- .../configuration/check_configuration_mod.F90 | 116 ++- .../source/diagnostics/diagnostics_io_mod.x90 | 57 +- .../driver/create_physics_prognostics_mod.F90 | 64 +- .../driver/gungho_diagnostics_driver_mod.F90 | 187 ++-- .../gungho/source/driver/gungho_model_mod.F90 | 9 +- .../gungho/source/driver/gungho_step_mod.x90 | 12 +- .../assemble_w2h_from_w2hb_kernel_mod.F90 | 95 ++ .../compute_dl_matrix_kernel_mod.F90 | 130 +-- .../apply_mixed_u_operator_kernel_mod.F90 | 157 ++++ .../apply_mixed_wp_operator_kernel_mod.F90 | 225 +++++ .../solver/schur_backsub_kernel_mod.F90 | 12 +- .../assemble_w2h_from_w2hb_kernel_mod_test.pf | 86 ++ .../apply_mixed_u_operator_kernel_mod_test.pf | 101 ++ ...apply_mixed_wp_operator_kernel_mod_test.pf | 160 ++++ .../solver/schur_backsub_kernel_mod_test.pf | 22 +- .../transport_metadata_collection_test.pf | 1 + .../poly1d_vert_adv_coeffs_kernel_mod_test.pf | 1 + .../mol/polyv_wtheta_koren_kernel_mod_test.pf | 1 + .../linear/integration-test/nwp_gal9/ReadMe | 1 + .../integration-test/nwp_gal9/iodef.xml | 124 +++ .../integration-test/nwp_gal9/nwp_gal9.f90 | 146 +++ .../integration-test/nwp_gal9/nwp_gal9.py | 105 +++ .../nwp_gal9/resources/mesh_C12_MG.nc | Bin 85708 -> 128056 bytes .../resources/nwp_gal9_configuration.nml | 222 +++-- .../resources/runge_kutta_configuration.nml | 8 +- .../runge_kutta/runge_kutta.f90 | 56 +- .../resources/semi_implicit_configuration.nml | 6 +- .../semi_implicit/semi_implicit.f90 | 96 +- .../semi_implicit/semi_implicit.py | 44 +- .../tl_test_advect_density_field_mod.x90 | 1 - .../tl_test_advect_theta_field_mod.x90 | 2 - .../tl_test_convergence_rate_check.f90 | 142 ++- .../tl_test/tl_test_driver_mod.f90 | 170 ++-- .../tl_test/tl_test_hydrostatic_mod.x90 | 2 - .../tl_test_kinetic_energy_gradient_mod.x90 | 1 - .../tl_test/tl_test_pressure_grad_bd_mod.x90 | 2 - .../tl_test_project_eos_pressure_mod.x90 | 1 - .../tl_test/tl_test_rhs_alg_mod.x90 | 107 ++- .../tl_test/tl_test_rhs_project_eos_mod.x90 | 1 - .../tl_test/tl_test_rhs_sample_eos_mod.x90 | 1 - .../tl_test/tl_test_rk_alg_mod.x90 | 2 +- .../tl_test_sample_eos_pressure_mod.x90 | 1 - .../tl_test/tl_test_semi_imp_alg_mod.x90 | 96 +- .../tl_test/tl_test_timesteps_alg_mod.x90 | 199 ++-- .../tl_test_timesteps_random_alg_mod.x90 | 597 ++++++++++++ .../tl_test/tl_test_transport_control_mod.x90 | 168 ++-- .../tl_test/tl_test_vorticity_mod.x90 | 2 - .../plot_convergence/plot_convergence.py | 74 +- .../plot_convergence/plot_convergence.sh | 118 +++ .../lfric-linear/HEAD/rose-meta.conf | 129 ++- .../linear/rose-meta/lfric-linear/versions.py | 118 ++- .../linear_physics/tl_bdy_lyr_alg.x90 | 144 +++ .../linear_physics/tl_physics_alg.x90 | 135 +++ .../timestepping/tl_si_timestep_alg_mod.x90 | 68 +- .../control/tl_split_transport_mod.x90 | 333 +++++++ .../control/tl_transport_field_mod.f90 | 7 +- .../mol/tl_mol_advective_alg_mod.x90 | 66 +- .../mol/tl_mol_conservative_alg_mod.x90 | 64 +- .../source/driver/linear_driver_mod.f90 | 2 +- .../source/driver/linear_model_data_mod.f90 | 24 +- .../linear_physics/tl_bl_inc_kernel_mod.F90 | 165 ++++ .../tl_compute_aubu_kernel_mod.F90 | 117 +++ .../tl_compute_qe_kernel_mod.F90 | 179 ++++ .../source/boundary_layer/bdy_expl2.F90 | 446 +++------ .../source/boundary_layer/bdy_impl3.F90 | 51 +- .../source/boundary_layer/bdy_impl4.F90 | 15 +- .../source/boundary_layer/bl_option_mod.F90 | 17 +- .../source/boundary_layer/ex_coef.F90 | 886 ++++++------------ .../source/boundary_layer/excf_nl_9c.F90 | 39 +- .../source/boundary_layer/imp_mix.F90 | 32 +- .../source/boundary_layer/kmkhz_9c.F90 | 11 +- 596 files changed, 15447 insertions(+), 7100 deletions(-) delete mode 100644 CodeOwners.txt create mode 100644 applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 create mode 100644 applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 delete mode 100644 applications/jedi_lfric_tests/example/mesh_C12.nc create mode 100755 applications/jedi_lfric_tests/example_create_traj/C224_create_traj_file.sh delete mode 100644 applications/jedi_lfric_tests/example_id_tlm_tests/mesh_C12.nc delete mode 100644 applications/jedi_lfric_tests/example_tlm_forecast_tl/mesh_C12.nc delete mode 100644 applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml create mode 100644 applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py delete mode 100755 applications/linear_model/plot_convergence/plot_convergence.sh create mode 100644 build/extract/get_git_sources.py create mode 100644 interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py create mode 100644 rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_ancil.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_check_restart.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_diags.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_initial.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_ls.xml create mode 100644 rose-stem/app/adjoint_tests/file/file_def_read.xml create mode 100644 rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf delete mode 100644 rose-stem/app/jedi_id_tlm_tests/opt/rose-app-default.conf create mode 100644 rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf create mode 100644 rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf delete mode 100644 rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf create mode 100644 rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf create mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf create mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf delete mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-default.conf create mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf create mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf create mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-default.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf create mode 100644 rose-stem/app/lfric2lfric/file/iodef_lbc.xml create mode 100644 rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf create mode 100644 rose-stem/app/linear_model/file/field_def_diags_ls.xml create mode 100644 rose-stem/app/linear_model/file/file_def_ancil.xml create mode 100644 rose-stem/app/linear_model/file/file_def_check_restart.xml create mode 100644 rose-stem/app/linear_model/file/file_def_diags.xml create mode 100644 rose-stem/app/linear_model/file/file_def_diags_ls.xml create mode 100644 rose-stem/app/linear_model/file/file_def_initial.xml create mode 100644 rose-stem/app/linear_model/file/file_def_ls.xml create mode 100644 rose-stem/app/linear_model/file/file_def_read.xml create mode 100644 rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf create mode 100644 rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt create mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt create mode 100644 science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch create mode 100644 science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch create mode 100644 science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 create mode 100644 science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 create mode 100644 science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 create mode 100644 science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 create mode 100644 science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 create mode 100644 science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 create mode 100644 science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 create mode 100644 science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf create mode 100644 science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf create mode 100644 science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf create mode 100644 science/linear/integration-test/nwp_gal9/ReadMe create mode 100644 science/linear/integration-test/nwp_gal9/iodef.xml create mode 100644 science/linear/integration-test/nwp_gal9/nwp_gal9.f90 create mode 100755 science/linear/integration-test/nwp_gal9/nwp_gal9.py rename applications/jedi_lfric_tests/example_tlm_tests/mesh_C12.nc => science/linear/integration-test/nwp_gal9/resources/mesh_C12_MG.nc (64%) rename applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml => science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml (68%) create mode 100644 science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 rename {applications/linear_model => science/linear}/plot_convergence/plot_convergence.py (54%) create mode 100755 science/linear/plot_convergence/plot_convergence.sh create mode 100644 science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 create mode 100644 science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 create mode 100644 science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 create mode 100644 science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 create mode 100644 science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 create mode 100644 science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dbadb762f..c005bbe44 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,78 @@ -**/jules_interface/rose-meta @maggiehendry -**/jedi_lfric* @ss421 @matthewrmshin -**/linear* @ss421 @matthewrmshin +# This CODEOWNERS file includes a primary codeowner and a deputy for each section. +# Codeowners who are not in a comment will be automatically notified of changes +# to the listed files. All codeowners listed are valid points of contact +# for discussing changes and seeking approval for work. +# Applications +**/adjoint_tests @DrTVockerodtMO # @mo-joshuacolclough +**/gravity_wave @thomasmelvin # @cjohnson-pi +**/gungho_model @thomasmelvin # @BShipway +**/jedi_lfric_tests @ss421 @matthewrmshin # @DavidSimonin +**/jules @iboutle # @MetOfficessdtesam +**/lfricinputs @mo-lottieturner # @mike-hobson +**/lfric_atm @iboutle # @BShipway +**/lfric_coupled @HengistPodd # @BShipway +**/lfricinputs @mo-lottieturner # @mike-hobson +**/linear_model @cjohnson-pi @ss421 @matthewrmshin # @tommbendall # Also notifiy jedi team about linear changes. +**/name_transport @jameskent-metoffice # @tommbendall +**/ngarch @christophermaynard # @jcsmeto +**/shallow_water @jameskent-metoffice # @atb1995 +**/solver @christophermaynard # @thomasmelvin +**/transport @tommbendall # @jameskent-metoffice + +# Science +**/adjoint @DrTVockerodtMO # @mo-joshuacolclough +**/linear @cjohnson-pi @ss421 @matthewrmshin # @tommbendall # Also notifiy jedi team about linear changes. +science/shared/source/constants/ @iboutle # @BShipway + +**/gungho @thomasmelvin # @iboutle +science/gungho/**/configuration/ @jameskent-metoffice # @thomasmelvin +science/gungho/**/core_dynamics/ @jameskent-metoffice # @thomasmelvin +science/gungho/**/diagnostics/ @atb1995 # @iboutle +science/gungho/**/diffusion/ @iboutle # @tommbendall +science/gungho/**/driver/ @MetOffice/core-capability-development +science/gungho/**/external_forcing/ @iboutle # @tommbendall +science/gungho/**/initialisation/ @mo-cjsmith # @thomasmelvin +science/gungho/**/limited_area/ @cjohnson-pi # @thomasmelvin +science/gungho/**/orography/ @atb1995 # @tommbendall +science/gungho/**/physics/ @iboutle # @tommbendall +science/gungho/**/psy/ @thomasmelvin # @tommbendall +science/gungho/**/runtime_constants/ @tommbendall # @atb1995 +science/gungho/**/solver/ @thomasmelvin # @tommbendall +science/gungho/**/timestepping/ @thomasmelvin # @jameskent-metoffice +science/gungho/**/transport/ @tommbendall # @jameskent-metoffice + +**/physics_schemes @iboutle # @MetOffice/ssdteam +science/physics_schemes/**/boundary_layer @Adrian-Lock # @P-Burns +science/physics_schemes/**/convection @MichaelWhitall +science/physics_schemes/**/convection/comorph @MichaelWhitall +science/physics_schemes/**/large_scale_cloud @paul-barrett # @CyrilMorcrette +science/physics_schemes/**/large_scale_precipitation @paulfield2024 # @paul-barrett +science/physics_schemes/**/radiation_control @mo-jmanners # @Petzi1 +science/physics_schemes/**/stochastic_physics @wjtmo # @annemccabe + +# Interfaces +**/coupled_interface @mike-hobson # @harry-shepherd +**/jedi_lfric_interface @ss421 @matthewrmshin # @DavidSimonin +**/jules_interface @iboutle # @MetOfficessdteam +**/jules_interface/rose-meta @maggiehendry +**/physics_schemes_interface @iboutle # @MetOfficessdteam +**/socrates_interface @mo-jmanners # @Petzi1 + +# System Components +rose-stem/templates/ @james-bruten-mo # @jennyhickson +rose-stem/lib/ @james-bruten-mo # @jennyhickson +rose-stem/bin/ @james-bruten-mo # @jennyhickson +rose-stem/site/meto/common/ @james-bruten-mo # @jennyhickson +rose-stem/site/meto/macros/ @james-bruten-mo # @jennyhickson +rose-stem/apps # Mostly updated by macros, no codeowner +**/versions.py @james-bruten-mo # @jennyhickson +build/ @MetOffice/ssdteam @hiker +**/*Makefile @MatthewHambley @hiker +**/*.mk @MatthewHambley @hiker + +# Other areas +documentation # @MetOffice/ssdteam +.github/ @MetOffice/ssdteam +LICENSE @yaswant +README.md @MetOffice/ssdteam diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bcfbc8fc0..240f53879 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -63,7 +63,7 @@ Code Reviewer: ## PSyclone Approval -- [ ] If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the [TCD Team](toolscollabdevteam@metoffice.gov.uk) +- [ ] If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the [TCD Team](mailto:ToolsCollabDevTeam@metoffice.gov.uk) # Sci/Tech Review diff --git a/.github/workflows/trigger-project-workflow.yaml b/.github/workflows/trigger-project-workflow.yaml index 4d0a8f6e6..ccb7a55b0 100644 --- a/.github/workflows/trigger-project-workflow.yaml +++ b/.github/workflows/trigger-project-workflow.yaml @@ -2,7 +2,7 @@ name: Trigger Review Project on: pull_request_target: - types: ["opened", "synchronize", "reopened", "edited", "review_requested", "review_request_removed"] + types: ["opened", "synchronize", "reopened", "edited", "review_requested", "review_request_removed", "closed"] pull_request_review: pull_request_review_comment: diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 337cde25b..507cd2799 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,27 +1,33 @@ # Contributors - -| GitHub user | Real Name | Affiliation | Date | -| --------------- | ------------------ | -------------------------------- | ---------- | -| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | -| jedbakerMO | Jed Baker | Met Office | 2025-12-29 | -| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | -| 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 | -| DrTVockerodtMO | Terence Vockerodt | Met Office | 2026-01-08 | -| ricky-lv426 | Ricky Olivier | University of Exeter | 2026-01-12 | -| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-15 | -| timgraham-Met | Tim Graham | Met Office | 2026-01-15 | -| mcdalvi | Mohit Dalvi | Met Office | 2026-01-15 | -| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 | -| jasonjunweilyu | Junwei (Jason) Lyu | Bureau of Meteorology, Australia | 2025-12-17 | -| EdHone | Ed Hone | Met Office | 2026-01-26 | -| tom-j-h | Tom Hill | Met Office | 2026-01-27 | -| alanjhewitt | Alan J Hewitt | Met Office | 2026-01-28 | -| mo-lottieturner | Lottie Turner | Met Office | 2026-01-27 | -| andrewcoughtrie | Andrew Coughtrie | Met Office | 2026-01-28 | -| tommbendall | Thomas Bendall | Met Office | 2026-01-13 | -| maggiehendry | Maggie Hendry | Met Office | 2026-01-29 | +| GitHub user | Real Name | Affiliation | Date | +| ------------------- | ------------------ | -------------------------------- | ---------- | +| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | +| jedbakerMO | Jed Baker | Met Office | 2025-12-29 | +| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | +| mike-hobson | Mike Hobson | Met Office | 2025-12-17 | +| mo-marqh | mark Hedley | Met Office | 2025-12-11 | +| 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 | +| DrTVockerodtMO | Terence Vockerodt | Met Office | 2026-01-08 | +| ricky-lv426 | Ricky Olivier | University of Exeter | 2026-01-12 | +| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-15 | +| timgraham-Met | Tim Graham | Met Office | 2026-01-15 | +| mcdalvi | Mohit Dalvi | Met Office | 2026-01-15 | +| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 | +| jasonjunweilyu | Junwei (Jason) Lyu | Bureau of Meteorology, Australia | 2025-12-17 | +| EdHone | Ed Hone | Met Office | 2026-01-26 | +| tom-j-h | Tom Hill | Met Office | 2026-01-27 | +| alanjhewitt | Alan J Hewitt | Met Office | 2026-01-28 | +| mo-lottieturner | Lottie Turner | Met Office | 2026-01-27 | +| andrewcoughtrie | Andrew Coughtrie | Met Office | 2026-01-28 | +| tommbendall | Thomas Bendall | Met Office | 2026-01-13 | +| mo-jmanners | James Manners | Met Office | 2026-01-14 | +| maggiehendry | Maggie Hendry | Met Office | 2026-01-29 | +| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-28 | +| jameskent-metoffice | James Kent | Met Office | 2026-01-21 | +| cjohnson-pi | Christine Johnson | Met Office | 2026-01-19 | +| t00sa | Sam Clarke-Green | Met Office | 2026-01-20 | +| ukmo-juan-castillo | Juan M. Castillo | Met Office | 2026-01-23 | +| Adrian-Lock | Adrian Lock | Met Office | 2026-01-09 | +| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 | diff --git a/CodeOwners.txt b/CodeOwners.txt deleted file mode 100644 index 36b0e9873..000000000 --- a/CodeOwners.txt +++ /dev/null @@ -1,54 +0,0 @@ -= Code Owners = - -This file lists ownership of the major components in the LFRic Apps codebase. - -* Ownership is not a commitment for the individual to undertake all work - requested or all reviewing for the owned section. -* Any planned changes to a section should be discussed with the code owner to - ensure all plans are appropriate. -* Code owners should be given the option to be a science/technical reviewer - for any code that alters their sections. - -Contact details for code owners: https://code.metoffice.gov.uk/trac/home/wiki/UserList - -# Start of script readable lines - -= System Components = -{{{ -Area First Contact Second Contact Team -rose-stem jamesbruten jenniferhickson simulation_systems_and_deployment -build umsysteam@metoffice.gov.uk -- simulation_systems_and_deployment -Makefiles matthewhambley -- core_capability_development -}}} - -= Applications = -{{{ -Area First Contact Second Contact Team -adjoint_tests terencevockerodt joshuacolclough data_assimilation -gravity_wave thomasmelvin christinejohnson dynamics_research -gungho_model thomasmelvin benshipway dynamics_research -jedi_lfric_tests stevensandbach davidsimonin data_assimilation -lfric_atm ianboutle benshipway dynamics_research -lfric_coupled richardhill benshipway global_coupled_model_development -lfricinputs charlotteturner mikehobson core_capability_development -linear_model christinejohnson thomasbendall dynamics_research -name_transport jameskent thomasbendall dynamics_research -ngarch christophermaynard jamescunningham-smith ng-arch -shallow_water jameskent alexbrown dynamics_research -solver christophermaynard thomasmelvin ng-opt -transport thomasbendall jameskent dynamics_research -}}} - -= Science = -{{{ -Area First Contact Second Contact Team -adjoint terencevockerodt joshuacolclough data_assimilation -constants ianboutle benshipway dynamics_research -coupled_interface mikehobson jeanrioual -- -gungho thomasmelvin benshipway dynamics_research -jedi_lfric_interface stevensandbach davidsimonin data_assimilation -jules_interface ianboutle richardgilham atmospheric_processes_and_parametrizations -linear christinejohnson thomasbendall dynamics_research -socrates_interface jamesmanners stephanhavemann radiation -physics_schemes_interface ianboutle https://code.metoffice.gov.uk/trac/um/browser/main/trunk/CodeOwners.txt simulation_systems_and_deployment -}}} diff --git a/README.md b/README.md index 8bddc4cae..1b0ff9fe1 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ Core](https://github.com/MetOffice/lfric_core) repository. In development documentation for LFRic Apps is available at: [https://metoffice.github.io/lfric_apps](https://metoffice.github.io/lfric_apps) +The LFRic Apps release schedule and deadlines can be viewed in the [milestones](https://github.com/metoffice/lfric_apps/milestones). + Example standalone scientific suites for use with Met Office systems are available at: diff --git a/applications/adjoint_tests/example/configuration.nml b/applications/adjoint_tests/example/configuration.nml index c3ff431f9..e19710cb8 100644 --- a/applications/adjoint_tests/example/configuration.nml +++ b/applications/adjoint_tests/example/configuration.nml @@ -68,8 +68,8 @@ stretching_method='smooth', ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='diagGungho', -ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', -ls_filename='final_ls', +ls_directory='/data/users/tim.payne/lfric_apps/files', +ls_filename='final_ls_with_land', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', start_dump_filename='final_pert', @@ -221,11 +221,23 @@ write_minmax_tseries=.false., / &linear fixed_ls=.true., -l_stabilise_bl=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging log_to_rank_zero_only=.false., @@ -274,11 +286,16 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -354,6 +371,7 @@ tau_u=0.55, / &transport adjust_theta=.false., +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., @@ -392,11 +410,11 @@ panel_edge_treatment='none', profile_size=5, reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', -scheme=5*1, +scheme=5*3, si_outer_transport='none', slice_order='parabola', special_edges_monotone=5*1, -splitting=5*1, +splitting=5*2, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', diff --git a/applications/adjoint_tests/example/iodef.xml b/applications/adjoint_tests/example/iodef.xml index 11c6939fa..4e14df122 100644 --- a/applications/adjoint_tests/example/iodef.xml +++ b/applications/adjoint_tests/example/iodef.xml @@ -50,6 +50,11 @@ + + + + + @@ -133,6 +138,8 @@ + + @@ -179,6 +186,8 @@ + + @@ -318,6 +327,7 @@ + diff --git a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py index 8418438c1..2d3f6a52e 100644 --- a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py @@ -126,3 +126,123 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 new file mode 100644 index 000000000..c1294aa55 --- /dev/null +++ b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 @@ -0,0 +1,192 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Module containing adjoint test for atl_bdy_lyr_alg +module atlt_bdy_lyr_alg_mod + + use sci_assign_field_random_range_alg_mod, & + only : assign_field_random_range + use field_mod, only : field_type + use function_space_mod, only : function_space_type + use constants_mod, only : r_def, i_def, l_def + use field_indices_mod, only : igh_u, igh_t, & + igh_d, igh_p + use log_mod, only : log_event, & + log_scratch_space, & + LOG_LEVEL_INFO, & + LOG_LEVEL_DEBUG, & + LOG_LEVEL_ERROR + use mesh_mod, only : mesh_type + use derived_config_mod, only : bundle_size + use driver_modeldb_mod, only : modeldb_type + use finite_element_config_mod, only : element_order_h, element_order_v + use fs_continuity_mod, only : W2, W3, Wtheta + use function_space_collection_mod, only : function_space_collection + use adjoint_test_parameters_mod, only : ls_u_range, ls_theta_range, & + ls_rho_range, ls_exner_range + use timing_mod, only : start_timing, stop_timing, tik, LPROF + + implicit none + + public + + contains + + !============================================================================= + !> @brief Adjoint test for atl_bdy_lyr_alg. + !> @details Passes if adjoint is transpose of tangent linear. + !> Determined by testing the equality of inner products and , + !> where M is the tangent linear and A is the adjoint. + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + subroutine atlt_bdy_lyr_alg( modeldb, mesh ) + + use tl_bdy_lyr_alg_mod, only : tl_bdy_lyr_alg + use atl_bdy_lyr_alg_mod, only : atl_bdy_lyr_alg + + implicit none + + ! Arguments + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + + ! Arguments for tl and atl calls + ! Form of state is [u,theta,rho,exner] + type(field_type) :: state(bundle_size) + type(field_type) :: u_bl_inc + type(field_type) :: ls_state(bundle_size) + + ! Copies of input fields used in inner products + type(field_type) :: state_input(bundle_size) + type(field_type) :: u_bl_inc_input + + ! Pointers for initialising fields + type(function_space_type), pointer :: vector_space_wtheta_ptr + type(function_space_type), pointer :: vector_space_w2_ptr + type(function_space_type), pointer :: vector_space_w3_ptr + + ! Inner products + real(kind=r_def) :: inner1 + real(kind=r_def) :: inner2 + real(kind=r_def) :: ip1(2),ip2(2) + real(kind=r_def) :: sf(2) + + ! Test parameters and variables + real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def + real(kind=r_def) :: machine_tol + real(kind=r_def) :: relative_diff + real(kind=r_def), parameter :: eps = 1e-30_r_def + + ! Misc + real(kind=r_def) :: dt + + integer(kind=tik) :: id + + if ( LPROF ) call start_timing( id, 'atlt_bdy_lyr_alg' ) + + ! Determining time constants + dt = real(modeldb%clock%get_seconds_per_step(), r_def) + if ( dt <= 0.0_r_def ) then + write( log_scratch_space, * ) "dt cannot be leq 0, found dt = ", dt + call log_event( log_scratch_space, log_level_error ) + end if + + ! Initialising fields + vector_space_wtheta_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, Wtheta ) + vector_space_w2_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W2 ) + vector_space_w3_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W3 ) + + call state(igh_u) % initialise( vector_space = vector_space_w2_ptr ) + call state(igh_t) % initialise( vector_space = vector_space_wtheta_ptr ) + call state(igh_d) % initialise( vector_space = vector_space_w3_ptr ) + call state(igh_p) % initialise( vector_space = vector_space_w3_ptr ) + call u_bl_inc % initialise( vector_space = vector_space_w2_ptr ) + + call state(igh_u) % copy_field_properties( state_input(igh_u) ) + call state(igh_t) % copy_field_properties( state_input(igh_t) ) + call state(igh_d) % copy_field_properties( state_input(igh_d) ) + call state(igh_p) % copy_field_properties( state_input(igh_p) ) + call state(igh_u) % copy_field_properties( u_bl_inc_input ) + + call state(igh_u) % copy_field_properties( ls_state(igh_u) ) + call state(igh_t) % copy_field_properties( ls_state(igh_t) ) + call state(igh_d) % copy_field_properties( ls_state(igh_d) ) + call state(igh_p) % copy_field_properties( ls_state(igh_p) ) + + ! Initialise values and call the tangent-linear alg. + call invoke( setval_random( u_bl_inc ), & + setval_x(u_bl_inc_input, u_bl_inc ), & + setval_random( state(igh_u) ), & + setval_x( state_input(igh_u), state(igh_u) ), & + setval_random( state(igh_t) ), & + setval_x( state_input(igh_t), state(igh_t) ), & + setval_random( state(igh_d) ), & + setval_x( state_input(igh_d), state(igh_d) ), & + setval_random( state(igh_p) ), & + setval_x( state_input(igh_p), state(igh_p) ) ) + + ! LS init + call assign_field_random_range( ls_state(igh_u), ls_u_range(1), ls_u_range(2) ) + call assign_field_random_range( ls_state(igh_t), ls_theta_range(1), ls_theta_range(2) ) + call invoke( setval_random( ls_state(igh_d) ), setval_random( ls_state(igh_p) ) ) + + ! Tangent linear + call tl_bdy_lyr_alg(modeldb, u_bl_inc, state(igh_u), ls_state, dt ) + + ! < Mx, Mx > + call invoke( x_innerproduct_x( ip1(1), state(igh_u) ), & + x_innerproduct_x( ip1(2), u_bl_inc ) ) + + sf(1) = 1.0_r_def / (ip1(1) + eps) + sf(2) = 1.0_r_def / (ip1(2) + eps) + + inner1 = 0.0_r_def + inner1 = inner1 + ip1(1) * sf(1) + inner1 = inner1 + ip1(2) * sf(2) + + ! Scaling fields + call invoke( inc_a_times_X( sf(1), state(igh_u) ), & + inc_a_times_X( sf(2), u_bl_inc ) ) + + ! Adjoint alg call and inner products + + ! Adjoint + call atl_bdy_lyr_alg(modeldb, u_bl_inc, state(igh_u), ls_state, dt ) + + ! < AMx, x > + call invoke( x_innerproduct_y( ip2(1), & + state(igh_u), & + state_input(igh_u) ), & + x_innerproduct_y( ip2(2), & + u_bl_inc, & + u_bl_inc_input ) ) + + inner2 = 0.0_r_def + inner2 = inner2 + ip2(1) + inner2 = inner2 + ip2(2) + + write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: ip1=', ip1(1) * sf(1), ip1(2) * sf(2) + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: ip2=', ip2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: s(ip1),s(ip2)=', inner1, inner2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + + ! Test the inner-product values for equality, allowing for the precision of the active variables + machine_tol = spacing( max( abs( inner1 ), abs( inner2 ) ) ) + relative_diff = abs( inner1 - inner2 ) / machine_tol + if ( relative_diff < overall_tolerance ) then + write( log_scratch_space, * ) "PASSED tl_bdy_lyr_alg:", inner1, inner2, relative_diff + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + else + write( log_scratch_space, * ) "FAILED tl_bdy_lyr_alg:", inner1, inner2, relative_diff + call log_event( log_scratch_space, LOG_LEVEL_ERROR ) + end if + + if ( LPROF ) call stop_timing( id, 'atlt_bdy_lyr_alg' ) + + end subroutine atlt_bdy_lyr_alg + +end module atlt_bdy_lyr_alg_mod diff --git a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 new file mode 100644 index 000000000..c617ba147 --- /dev/null +++ b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 @@ -0,0 +1,187 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Module containing adjoint test for atl_bl_inc_kernel +module atlt_bl_inc_alg_mod + + use sci_assign_field_random_range_alg_mod, & + only : assign_field_random_range + use sci_geometric_constants_mod, only: get_face_selector_ew, & + get_face_selector_ns + use integer_field_mod, only: integer_field_type + use field_mod, only : field_type + use function_space_mod, only : function_space_type + use log_mod, only : log_event, & + log_scratch_space, & + LOG_LEVEL_ERROR, & + LOG_LEVEL_DEBUG, & + LOG_LEVEL_INFO + use mesh_mod, only : mesh_type + use function_space_collection_mod, only : function_space_collection + use finite_element_config_mod, only : element_order_h, element_order_v + use fs_continuity_mod, only : W2, W3, Wtheta + use constants_mod, only : i_def, r_def + use quadrature_face_mod, only : quadrature_face_type + use quadrature_rule_gaussian_mod, only : quadrature_rule_gaussian_type + use reference_element_mod, only : reference_element_type + use planet_config_mod, only : cp + use adjoint_test_parameters_mod, only : ls_theta_range, & + ls_exner_range, & + ls_md1_range, & + ls_md2_range, & + ls_md3_range + use timing_mod, only : start_timing, stop_timing, tik, LPROF + + implicit none + + public + + contains + + !============================================================================= + !> @brief Adjoint test for atl_bl_inc. + !> @details Passes if adjoint is transpose of tangent linear. + !> Determined by testing the equality of inner products and , + !> where M is the tangent linear and A is the adjoint. + !> @param[in] mesh Mesh object + subroutine atlt_bl_inc_alg( mesh ) + + use tl_bl_inc_kernel_mod, only : tl_bl_inc_kernel_type + use atl_bl_inc_kernel_mod, only : atl_bl_inc_kernel_type + use linear_physics_config_mod, only : log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m + + implicit none + + ! Arguments + type(mesh_type), pointer, intent(in) :: mesh + + ! Arguments for tl and adj calls + type( field_type) :: u_inc + type( field_type) :: u + type( field_type) :: auv + type( field_type) :: buv_inv + type(integer_field_type), pointer :: face_selector_ew => null() + type(integer_field_type), pointer :: face_selector_ns => null() + + ! Copies of input fields used in inner products + type( field_type) :: u_inc_input + type( field_type) :: u_input + + ! Pointers for initialising fields + type(function_space_type), pointer :: vector_space_wtheta_ptr + type(function_space_type), pointer :: vector_space_w2_ptr + type(function_space_type), pointer :: vector_space_w3_ptr + + ! Inner products + real(kind=r_def) :: ip1(2) + real(kind=r_def) :: ip2(2) + real(kind=r_def) :: sf(2) + real(kind=r_def) :: inner1 + real(kind=r_def) :: inner2 + + ! Test parameters and variables + real(kind=r_def), parameter :: overall_tolerance = 3000.0_r_def + real(kind=r_def) :: machine_tol + real(kind=r_def) :: relative_diff + real(kind=r_def), parameter :: eps = 1e-30_r_def + + integer(kind=tik) :: id + + if ( LPROF ) call start_timing( id, 'atlt_bl_inc_alg' ) + + vector_space_wtheta_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, Wtheta ) + vector_space_w2_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W2 ) + vector_space_w3_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W3 ) + + call auv % initialise( vector_space = vector_space_w2_ptr, name = 'auv' ) + call buv_inv % initialise( vector_space = vector_space_w2_ptr, name = 'buv_inv' ) + + call u_inc % initialise( vector_space = vector_space_w2_ptr, name = 'u_inc' ) + call u % initialise( vector_space = vector_space_w2_ptr, name = 'u' ) + + face_selector_ew => get_face_selector_ew(mesh%get_id()) + face_selector_ns => get_face_selector_ns(mesh%get_id()) + + call u_inc % copy_field_properties( u_inc_input ) + call u % copy_field_properties( u_input ) + + ! Initialise arguments and call the tangent-linear kernel. + call invoke( setval_random( u ), & + setval_x( u_input, u ), & + setval_random( u_inc ), & + setval_x( u_inc_input, u_inc ) ) + + ! LS init + call assign_field_random_range( auv, -1.0_r_def, 1.0_r_def ) + call assign_field_random_range( buv_inv, 1.0_r_def, 2.0_r_def ) ! must avoid 0 + + ! < Mx, Mx > + call invoke ( tl_bl_inc_kernel_type( u_inc, & + u, & + auv,buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m ) ) + call invoke ( x_innerproduct_x( ip1(1), u_inc ), & + x_innerproduct_x( ip1(2), u ) ) + + sf(1) = 1.0_r_def / (ip1(1) + eps) + sf(2) = 1.0_r_def / (ip1(2) + eps) + + inner1 = 0.0_r_def + inner1 = inner1 + ip1(1) * sf(1) + inner1 = inner1 + ip1(2) * sf(2) + + ! Scaling fields + call invoke( inc_a_times_X( sf(1), u_inc ), & + inc_a_times_X( sf(2), u ) ) + + ! < AMx, x > + call invoke ( atl_bl_inc_kernel_type( u_inc, & + u, & + auv,buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m ) ) + + call invoke ( x_innerproduct_y( ip2(1), u_inc, u_inc_input ), & + x_innerproduct_y( ip2(2), u, u_input ) ) + + inner2 = 0.0_r_def + inner2 = inner2 + ip2(1) + inner2 = inner2 + ip2(2) + + write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: ip1=', & + ip1(1) * sf(1), ip1(2) * sf(2) + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: ip2=', ip2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: s(ip1),s(ip2)=', & + inner1, inner2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + + ! Test the inner-product values for equality, allowing for the precision of the active variables + machine_tol = spacing( max( abs(inner1), abs(inner2) ) ) + relative_diff = abs(inner1 - inner2) / machine_tol + if (relative_diff < overall_tolerance) then + write(log_scratch_space, *) "PASSED tl_bl_inc:", inner1, inner2, relative_diff + call log_event(log_scratch_space, LOG_LEVEL_INFO) + else + write(log_scratch_space, *) "FAILED tl_bl_inc:", inner1, inner2, relative_diff + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end if + + if ( LPROF ) call stop_timing( id, 'atlt_bl_inc_alg' ) + + end subroutine atlt_bl_inc_alg + +end module atlt_bl_inc_alg_mod diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 index 096545519..c8b3833f5 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 @@ -17,7 +17,7 @@ module adjt_poly1d_recon_lookup_alg_mod use r_tran_field_mod, only : r_tran_field_type use mesh_mod, only : mesh_type use fs_continuity_mod, only : Wtheta - use constants_mod, only : i_def, r_def, r_tran + use constants_mod, only : i_def, r_def, r_tran, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -79,10 +79,9 @@ module adjt_poly1d_recon_lookup_alg_mod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_tran) :: inner2 - real(kind=r_tran), parameter :: eps = 1.0e-30_r_def ! Test parameters and variables - real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran + real(kind=r_tran), parameter :: overall_tolerance = 2500.0_r_tran real(kind=r_tran) :: machine_tol real(kind=r_tran) :: relative_diff @@ -123,8 +122,8 @@ module adjt_poly1d_recon_lookup_alg_mod x_innerproduct_x( tracer_inner_prod, tracer ) ) ! Determining scale factors - reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + eps ) - tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + eps ) + reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + EPS ) + tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + EPS ) inner1 = 0.0_r_tran inner1 = inner1 + real( reconstruction_inner_prod, r_tran )*reconstruction_sf diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 index ed53392d1..8d9ff6466 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 @@ -16,7 +16,7 @@ module adjt_poly2d_recon_lookup_alg_mod use fs_continuity_mod, only : name_from_functionspace use finite_element_config_mod, only : element_order_h, & element_order_v - use constants_mod, only : i_def, r_def, r_tran + use constants_mod, only : i_def, r_def, r_tran, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -84,7 +84,6 @@ module adjt_poly2d_recon_lookup_alg_mod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_tran) :: inner2 - real(kind=r_tran), parameter :: eps = 1.0e-30_r_def ! Test parameters and variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -131,8 +130,8 @@ module adjt_poly2d_recon_lookup_alg_mod x_innerproduct_x( tracer_inner_prod, tracer ) ) ! Determining scale factors - reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + eps ) - tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + eps ) + reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + EPS ) + tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + EPS ) inner1 = 0.0_r_tran inner1 = inner1 + real( reconstruction_inner_prod, r_tran )*reconstruction_sf diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 index 501399468..311c89b38 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 @@ -18,7 +18,7 @@ module adjt_poly_adv_upd_lookup_alg_mod use integer_field_mod, only : integer_field_type, & integer_field_proxy_type use fs_continuity_mod, only : W2H, Wtheta - use constants_mod, only : i_def, r_def, r_tran, l_def + use constants_mod, only : i_def, r_def, r_tran, l_def, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -81,7 +81,6 @@ module adjt_poly_adv_upd_lookup_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_tran) :: inner2 - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran ! Test variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -125,8 +124,8 @@ module adjt_poly_adv_upd_lookup_alg_mod x_innerproduct_x( reconstruction_inner_prod, reconstruction) ) ! Determining scale factors - advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + eps ) - reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + eps ) + advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + EPS ) + reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + EPS ) inner1 = 0.0_r_tran inner1 = inner1 + real( advective_inner_prod, r_tran )*advective_sf diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 index 9a076295e..112891ecb 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 @@ -16,7 +16,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod use function_space_collection_mod, only : function_space_collection use finite_element_config_mod, only : element_order_h, element_order_V use operator_mod, only : operator_type - use constants_mod, only : i_def, r_def, r_tran + use constants_mod, only : i_def, r_def, r_tran, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -78,7 +78,6 @@ module adjt_w3h_adv_upd_lookup_alg_mod real(kind=r_def) :: adv_inc_adv_inc_inp_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_tran) :: inner2 - real(kind=r_tran), parameter :: eps = 1.0e-30_r_def ! Test parameters and variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -125,8 +124,8 @@ module adjt_w3h_adv_upd_lookup_alg_mod x_innerproduct_x(tracer_inner_prod, tracer) ) ! Determining scale factors - advective_increment_sf = 1.0_r_tran/( real( advective_increment_inner_prod, r_tran ) + eps ) - tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + eps ) + advective_increment_sf = 1.0_r_tran/( real( advective_increment_inner_prod, r_tran ) + EPS ) + tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + EPS ) inner1 = 0.0_r_tran inner1 = inner1 + real( advective_increment_inner_prod, r_tran )*advective_increment_sf @@ -146,7 +145,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod adv_inc_adv_inc_inp_inner_prod = 0.0_r_def tracer_tracer_input_inner_prod = 0.0_r_def - lookup_w3h_adv_upd => adj_lookup_table_cache%get_lookup_w3h_adv_upd() + lookup_w3h_adv_upd => adj_lookup_table_cache%get_lookup_w3h_adv_upd(wind%which_function_space()) lookup_w3h_adv_upd_field => lookup_w3h_adv_upd%get_lookup_field() set_count_w3h_adv_upd_field => lookup_w3h_adv_upd%get_set_count_field() nsets = lookup_w3h_adv_upd%get_nsets_max() diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 index 36906bb77..ae617be40 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 @@ -7,7 +7,7 @@ module adjt_mixed_operator_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver + use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_DEBUG, & @@ -82,8 +82,7 @@ contains real(kind=r_def) :: inner1, inner2 real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver - real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def - real(kind=r_def), parameter :: eps = 1e-30_r_def + real(kind=r_def), parameter :: overall_tolerance = 2000.0_r_def integer(kind=tik) :: id if ( LPROF ) call start_timing( id, 'adjt_mixed_operator_alg' ) @@ -167,9 +166,9 @@ contains write(log_scratch_space, *) "w inner product = ", w_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - p_sf = 1.0_r_def / (p_inner_prod + eps) - uv_sf = 1.0_r_def / (uv_inner_prod + eps) - w_sf = 1.0_r_def / (w_inner_prod + eps) + p_sf = 1.0_r_def / (p_inner_prod + EPS) + uv_sf = 1.0_r_def / (uv_inner_prod + EPS) + w_sf = 1.0_r_def / (w_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 index 5972ce407..d29d53c46 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 @@ -7,7 +7,8 @@ module adjt_mixed_schur_preconditioner_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -59,16 +60,18 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_mixed_schur_preconditioner_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_mixed_schur_preconditioner_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type), dimension(bundle_size) :: rhs @@ -104,10 +107,9 @@ contains real(kind=r_def) :: p_sf, uv_sf, w_sf real(kind=r_def) :: p_p_inp_inner_prod, uv_uv_inp_inner_prod, w_w_inp_inner_prod real(kind=r_def) :: inner1, inner2 - real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1100.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver - real(kind=r_def), parameter :: eps = 1e-30_r_def integer(kind=tik) :: id if ( LPROF ) call start_timing( id, 'adjt_mixed_schur_preconditioner_alg' ) @@ -166,7 +168,8 @@ contains call create_pressure_solver( pressure_operator, pressure_preconditioner, pressure_solver ) call create_mixed_preconditioner( rhs, pressure_solver, mixed_preconditioner ) - call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_lookup_table_cache, & + adj_pressure_operator, adj_pressure_preconditioner ) call create_adj_pressure_solver( adj_pressure_operator, adj_pressure_preconditioner, adj_pressure_solver ) call create_adj_mixed_preconditioner( rhs, adj_pressure_solver, adj_mixed_preconditioner ) @@ -200,9 +203,9 @@ contains write(log_scratch_space, *) "w inner product = ", w_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - p_sf = 1.0_r_def / (p_inner_prod + eps) - uv_sf = 1.0_r_def / (uv_inner_prod + eps) - w_sf = 1.0_r_def / (w_inner_prod + eps) + p_sf = 1.0_r_def / (p_inner_prod + EPS) + uv_sf = 1.0_r_def / (uv_inner_prod + EPS) + w_sf = 1.0_r_def / (w_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 index bf8b9658d..51b712148 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 @@ -7,7 +7,8 @@ module adjt_mixed_solver_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -70,16 +71,18 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_mixed_solver_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_mixed_solver_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type) :: rhs(bundle_size) @@ -121,10 +124,9 @@ contains real(kind=r_def) :: p_sf, uv_sf, w_sf real(kind=r_def) :: p_p_inp_inner_prod, uv_uv_inp_inner_prod, w_w_inp_inner_prod real(kind=r_def) :: inner1, inner2 - real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1300.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver - real(kind=r_def), parameter :: eps = 1e-30_r_def integer(tik) :: id if ( LPROF ) call start_timing( id, 'adjt_mixed_solver_alg' ) @@ -196,7 +198,8 @@ contains call create_mixed_preconditioner( rhs, pressure_solver, mixed_preconditioner ) call create_mixed_solver( mixed_preconditioner, mixed_operator, mixed_solver ) - call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_lookup_table_cache, & + adj_pressure_operator, adj_pressure_preconditioner ) call create_adj_pressure_solver( adj_pressure_operator, adj_pressure_preconditioner, adj_pressure_solver ) call create_adj_mixed_preconditioner( rhs, adj_pressure_solver, adj_mixed_preconditioner ) call create_adj_mixed_solver( adj_mixed_preconditioner, adj_mixed_operator, adj_mixed_solver ) @@ -232,9 +235,9 @@ contains call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) ! Scaling factors are scaled up a bit to avoid numerical issues - p_sf = 1.0E4_r_def / (p_inner_prod + eps) - uv_sf = 1.0E4_r_def / (uv_inner_prod + eps) - w_sf = 1.0E4_r_def / (w_inner_prod + eps) + p_sf = 1.0E4_r_def / (p_inner_prod + EPS) + uv_sf = 1.0E4_r_def / (uv_inner_prod + EPS) + w_sf = 1.0E4_r_def / (w_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 index 0e2ae0aa6..ea0c0eb80 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 @@ -7,7 +7,8 @@ module adjt_pressure_precon_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -53,16 +54,18 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_pressure_precon_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_pressure_precon_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type), dimension(bundle_size) :: rhs @@ -96,7 +99,6 @@ contains real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver - real(kind=r_def), parameter :: eps = 1e-30_r_def integer(tik) :: id if ( LPROF ) call start_timing( id, 'adjt_pressure_precon_alg' ) @@ -153,7 +155,10 @@ contains call create_pressure_preconditioner( rhs, pressure_operator, pressure_preconditioner ) - call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, & + adj_lookup_table_cache, & + adj_pressure_operator, & + adj_pressure_preconditioner ) ! Size = 1 as only P field needed vector_x = r_solver_field_vector_type(1_i_def) @@ -184,7 +189,7 @@ contains write(log_scratch_space, *) "p inner product = ", p_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - p_sf = 1.0_r_def / (p_inner_prod + eps) + p_sf = 1.0_r_def / (p_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 index 81c23dd57..33a2a9f96 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 @@ -9,7 +9,7 @@ !> @brief Module containing adjoint test for scaled_matrix_vector_kernel module adjt_scaled_matrix_vector_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver + use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use field_mod, only: field_type use finite_element_config_mod, only: element_order_h, element_order_v use fs_continuity_mod, only: W2, W3, Wtheta @@ -77,7 +77,6 @@ module adjt_scaled_matrix_vector_alg_mod real(kind=r_def) :: machine_tolerance real(kind=r_def) :: relative_diff real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Setup @@ -128,7 +127,7 @@ module adjt_scaled_matrix_vector_alg_mod write(log_scratch_space, *) "vector inner product = ", vector_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - vector_sf = 1.0_r_def / (vector_inner_prod + eps) + vector_sf = 1.0_r_def / (vector_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + vector_inner_prod * vector_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 index 2492720a6..3e61588ff 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 @@ -7,7 +7,8 @@ module adjt_semi_implicit_solver_step_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -47,16 +48,18 @@ contains !> @brief Adjoint test for semi_implicit_solver_alg_mod subroutine step !> @details Does some setup, then calls the actual test via a private subroutine !! twice with different flag values - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_semi_implicit_solver_step_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_semi_implicit_solver_step_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type), dimension(bundle_size) :: state @@ -153,7 +156,7 @@ contains call compute_si_operators( ls_theta, ls_rho, ls_exner, & model_clock, ls_moist_dyn ) - call adj_semi_implicit_solver%initialise(rhs) + call adj_semi_implicit_solver%initialise(rhs, adj_lookup_table_cache) ! Set up moist_dyn_gas_law & mr call moist_dyn_gas_law%initialise(vector_space=vector_space_wtheta_ptr) @@ -255,7 +258,6 @@ contains real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver - real(kind=r_def), parameter :: eps = 1e-30_r_def integer(kind=i_def) :: i @@ -311,17 +313,17 @@ contains end do ! Scaling factors are scaled up a bit to avoid numerical issues - state_sf(igh_u) = 1.0E4_r_def / (state_inner_prod(igh_u) + eps) - state_sf(igh_t) = 1.0E4_r_def / (state_inner_prod(igh_t) + eps) - state_sf(igh_d) = 1.0E4_r_def / (state_inner_prod(igh_d) + eps) - state_sf(igh_p) = 1.0E4_r_def / (state_inner_prod(igh_p) + eps) - rhs_sf(igh_u) = 1.0E4_r_def / (rhs_inner_prod(igh_u) + eps) - rhs_sf(igh_t) = 1.0E4_r_def / (rhs_inner_prod(igh_t) + eps) - rhs_sf(igh_d) = 1.0E4_r_def / (rhs_inner_prod(igh_d) + eps) - rhs_sf(igh_p) = 1.0E4_r_def / (rhs_inner_prod(igh_p) + eps) - moist_dyn_gas_law_sf = 1.0E4_r_def / (moist_dyn_gas_law_inner_prod + eps) + state_sf(igh_u) = 1.0E4_r_def / (state_inner_prod(igh_u) + EPS) + state_sf(igh_t) = 1.0E4_r_def / (state_inner_prod(igh_t) + EPS) + state_sf(igh_d) = 1.0E4_r_def / (state_inner_prod(igh_d) + EPS) + state_sf(igh_p) = 1.0E4_r_def / (state_inner_prod(igh_p) + EPS) + rhs_sf(igh_u) = 1.0E4_r_def / (rhs_inner_prod(igh_u) + EPS) + rhs_sf(igh_t) = 1.0E4_r_def / (rhs_inner_prod(igh_t) + EPS) + rhs_sf(igh_d) = 1.0E4_r_def / (rhs_inner_prod(igh_d) + EPS) + rhs_sf(igh_p) = 1.0E4_r_def / (rhs_inner_prod(igh_p) + EPS) + moist_dyn_gas_law_sf = 1.0E4_r_def / (moist_dyn_gas_law_inner_prod + EPS) do i = 1, nummr - mr_sf(i) = 1.0E4_r_def / (mr_inner_prod(i) + eps) + mr_sf(i) = 1.0E4_r_def / (mr_inner_prod(i) + EPS) end do inner1 = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 index 9342ce993..7fa6bf71e 100644 --- a/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 @@ -21,7 +21,7 @@ module adjt_end_transport_step_alg_mod use model_clock_mod, only : model_clock_type use finite_element_config_mod, only : element_order_h, & element_order_v - use fs_continuity_mod, only : W2 + use fs_continuity_mod, only : W2, W2V use function_space_collection_mod, only : function_space_collection use setup_test_alg_mod, only : setup_test_tl_transport_controller use init_from_controller_alg_mod, only : init_counter_fieldvals @@ -78,6 +78,7 @@ module adjt_end_transport_step_alg_mod ! Variables for initialising fields type(function_space_type), pointer :: vector_space_w2_ptr + type(function_space_type), pointer :: vector_space_w2v_ptr ! Inner products real(kind=r_tran) :: inner1 @@ -108,13 +109,16 @@ module adjt_end_transport_step_alg_mod vector_space_w2_ptr => function_space_collection%get_fs( & mesh, element_order_h, element_order_v, W2 & - ) + ) + vector_space_w2v_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W2V) + ! Assume that the last split step is in W2V (for VHV splitting) call sum_flux%initialise( vector_space = vector_space_w2_ptr ) - call flux_last_step%initialise( vector_space = vector_space_w2_ptr ) + call flux_last_step%initialise( vector_space = vector_space_w2v_ptr ) call sum_flux_input%initialise( vector_space = vector_space_w2_ptr ) - call flux_last_step_input%initialise( vector_space = vector_space_w2_ptr ) + call flux_last_step_input%initialise( vector_space = vector_space_w2v_ptr ) sum_flux_inner_prod = 0.0_r_def flux_last_step_inner_prod = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 index 08a3b7a2b..a4d64e064 100644 --- a/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 @@ -21,12 +21,14 @@ module atlt_end_transport_step_alg_mod use model_clock_mod, only : model_clock_type use finite_element_config_mod, only : element_order_h, & element_order_v - use fs_continuity_mod, only : W2, W3 + use fs_continuity_mod, only : W2, W3, W2V use function_space_collection_mod, only : function_space_collection use tl_transport_controller_mod, only : tl_transport_controller_type use transport_controller_mod, only : transport_controller_type use flux_precomputations_alg_mod, only : flux_precomputations_type use transport_counter_mod, only : transport_counter_type + use split_transport_utils_mod, only : get_num_split_steps, & + get_direction_w2_fs use setup_test_alg_mod, only : setup_test_tl_transport_controller use transport_metadata_collection_mod, only : transport_metadata_collection use transport_metadata_mod, only : transport_metadata_type @@ -233,6 +235,9 @@ module atlt_end_transport_step_alg_mod type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_2_inp ! Variables for initialising fields + integer(kind=i_def) :: splitting + integer(kind=i_def) :: num_split_steps + integer(kind=i_def) :: fs_id type(function_space_type), pointer :: vector_space_w2_ptr type(function_space_type), pointer :: vector_space_w3_ptr @@ -284,11 +289,16 @@ module atlt_end_transport_step_alg_mod dummy_ref_mass_2_inp, & pert_transport_controller ) - vector_space_w2_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W2 & + ! W2 function space appropriate for splitting (fs on the last step) + splitting = transport_metadata%get_splitting() + num_split_steps = get_num_split_steps(splitting) + fs_id = get_direction_w2_fs(splitting, num_split_steps) + vector_space_w2_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, fs_id & ) - vector_space_w3_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3 & + + vector_space_w3_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3 & ) call field_np1%initialise( vector_space = vector_space_w3_ptr ) diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 index fe4808112..0f706f161 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_moist_mr_transport_alg module atlt_moist_mr_transport_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -49,9 +50,10 @@ module atlt_moist_mr_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products < Mx, Mx > and < AMx, x >, !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_moist_mr_transport_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_moist_mr_transport_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_moist_mr_transport_alg_mod, only : tl_moist_mr_transport_alg use atl_moist_mr_transport_alg_mod, only : atl_moist_mr_transport_alg @@ -59,8 +61,9 @@ module atlt_moist_mr_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type), dimension(:), allocatable :: mr_out @@ -202,8 +205,9 @@ module atlt_moist_mr_transport_alg_mod call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_3d ) ! Adjoint - call atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, & - nummr_to_transport, tl_transport_controller, transport_metadata ) + call atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, nummr_to_transport, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > inner2 = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 index 711799f0b..1b027ea72 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_theta_transport_alg module atlt_theta_transport_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -48,9 +49,10 @@ module atlt_theta_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_theta_transport_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_theta_transport_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_theta_transport_alg_mod, only : tl_theta_transport_alg use atl_theta_transport_alg_mod, only : atl_theta_transport_alg @@ -58,8 +60,9 @@ module atlt_theta_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: theta_out @@ -212,7 +215,8 @@ module atlt_theta_transport_alg_mod ! Adjoint call atl_theta_transport_alg( theta_out, theta_inc, theta_in, ls_theta_in, & - tl_transport_controller, transport_metadata ) + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( thout_thout_inp_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 index 93f7e94aa..3ac396cab 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_transport_control_alg module atlt_transport_control_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use constants_mod, only : r_def, i_def, l_def @@ -34,16 +35,18 @@ module atlt_transport_control_alg_mod !============================================================================= !> @brief Adjoint test for atl_transport_control_alg - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache !> - subroutine atlt_transport_control_alg( mesh, model_clock ) + subroutine atlt_transport_control_alg( mesh, model_clock, adj_lookup_table_cache ) implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Passive arguments for tl and adj calls type(field_type) :: ls_advected_fields(bundle_size) @@ -102,7 +105,8 @@ module atlt_transport_control_alg_mod ls_wind_n, & ls_mr_in, & model_clock, & - outer ) + outer, & + adj_lookup_table_cache ) end do @@ -119,6 +123,7 @@ module atlt_transport_control_alg_mod !> @param[in] ls_mr_in Linearisation state mixing ratios !> @param[in] model_clock The model clock !> @param[in] outer The outer iteration variable + !> @param[in] adj_lookup_table_cache Lookup table cache !> subroutine run_atlt_transport_control_alg( vector_space_wtheta_ptr, & vector_space_w2_ptr, & @@ -128,7 +133,8 @@ module atlt_transport_control_alg_mod ls_wind_n, & ls_mr_in, & model_clock, & - outer ) + outer, & + adj_lookup_table_cache ) use tl_transport_control_alg_mod, only : tl_transport_control_alg use atl_transport_control_alg_mod, only : atl_transport_control_alg @@ -145,6 +151,7 @@ module atlt_transport_control_alg_mod type(field_type), dimension(:), intent(in) :: ls_mr_in type(model_clock_type), intent(in) :: model_clock integer(kind=i_def), intent(in) :: outer + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Active arguments for tl and adj calls type(field_type) :: advection_inc(bundle_size) @@ -367,7 +374,7 @@ module atlt_transport_control_alg_mod wind_np1, wind_n, mr_out, mr_in, & ls_advected_fields, & ls_wind_np1, ls_wind_n, ls_mr_in, & - model_clock, outer ) + model_clock, outer, adj_lookup_table_cache ) ! < AMx, x > ai_ai_inp_inner_prod = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 index d1120743d..182c70400 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_transport_field_alg module atlt_transport_field_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -27,13 +28,19 @@ module atlt_transport_field_alg_mod use setup_test_alg_mod, only : setup_test_tl_transport_controller use inner_from_controller_rdef_alg_mod, only : flux_pc_ref_flux_prod_rdef, & flux_pc_ref_flux_inp_prod_rdef, & + counter_flux_prod_rdef, & + counter_flux_inp_prod_rdef, & + counter_field_n_prod_rdef, & + counter_field_n_inp_prod_rdef, & wind_pc_dir_prod_rdef, & wind_pc_dir_inp_prod_rdef use init_from_controller_alg_mod, only : init_flux_pc_fieldvals, & - init_wind_pc_fieldvals + init_wind_pc_fieldvals, & + init_counter_fieldvals use transport_enumerated_types_mod, only : direction_3d, & direction_h, & direction_v + use fs_continuity_mod, only : W3 implicit none @@ -47,9 +54,10 @@ module atlt_transport_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_transport_field_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_transport_field_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_transport_field_mod, only : tl_transport_field use atl_transport_field_mod, only : atl_transport_field @@ -57,8 +65,9 @@ module atlt_transport_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -86,18 +95,25 @@ module atlt_transport_field_alg_mod ! Variables used to handle calculations for fields stored in tl_transport_controller integer(kind=i_def) :: mesh_id + type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: pert_transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_metadata_type), pointer :: transport_metadata type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp + type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp2 type(r_tran_field_type), dimension(:), allocatable :: fpc_pert_wind_ref_flux_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_2_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_2_inp + type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_3_inp + type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_3_inp type(r_tran_field_type) :: wind_pc_h_inp type(r_tran_field_type) :: wind_pc_v_inp type(r_tran_field_type) :: wind_pc_3d_inp + type(r_tran_field_type) :: tctr_field_n_inp + type(r_tran_field_type), dimension(:), allocatable :: tctr_flux_inp + type(function_space_type), pointer :: vector_space_w3_ptr ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -106,11 +122,16 @@ module atlt_transport_field_alg_mod mesh_id = mesh%get_id() call setup_test_tl_transport_controller( mesh, model_clock, tl_transport_controller, field_n, field_n_fs ) + transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() transport_metadata => pert_transport_controller%get_transport_metadata() ! Initialising fields + call init_counter_fieldvals( mesh, & + tctr_field_n_inp, & + tctr_flux_inp, & + pert_transport_controller ) call init_flux_pc_fieldvals( mesh, & 1_i_def, & fpc_ls_wind_ref_flux_inp, & @@ -123,6 +144,12 @@ module atlt_transport_field_alg_mod dummy_ref_field_2_inp, & dummy_ref_mass_2_inp, & pert_transport_controller ) + call init_flux_pc_fieldvals( mesh, & + 1_i_def, & + fpc_ls_wind_ref_flux_inp2, & + dummy_ref_field_3_inp, & + dummy_ref_mass_3_inp, & + transport_controller ) call init_wind_pc_fieldvals( mesh, & wind_pc_h_inp, & direction_h, & @@ -136,6 +163,11 @@ module atlt_transport_field_alg_mod direction_3d, & pert_transport_controller ) + vector_space_w3_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3 & + ) + call field_n%initialise(vector_space = vector_space_w3_ptr) + call field_n%copy_field_properties( field_np1 ) call field_n%copy_field_properties( ls_field_n ) @@ -147,6 +179,7 @@ module atlt_transport_field_alg_mod ! Initialise values and call the tangent-linear alg. call invoke( setval_random( field_np1 ), & + setval_random( field_n ), & setval_x( field_np1_input, field_np1 ), & setval_x( field_n_input, field_n ), & setval_random( ls_field_n ) ) @@ -179,6 +212,7 @@ module atlt_transport_field_alg_mod call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_h ) call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_v ) call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_3d ) + call counter_flux_prod_rdef( inner1, pert_transport_controller ) ! Scaling fields call invoke( inc_a_times_X( field_np1_sf, field_np1 ), & @@ -191,7 +225,8 @@ module atlt_transport_field_alg_mod ! Adjoint call atl_transport_field( & field_np1, field_n, ls_field_n, & - tl_transport_controller, transport_metadata & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache & ) ! < AMx, x > @@ -210,6 +245,7 @@ module atlt_transport_field_alg_mod call wind_pc_dir_inp_prod_rdef( inner2, pert_transport_controller, mesh_id, direction_h, wind_pc_h_inp ) call wind_pc_dir_inp_prod_rdef( inner2, pert_transport_controller, mesh_id, direction_v, wind_pc_v_inp ) call wind_pc_dir_inp_prod_rdef( inner2, pert_transport_controller, mesh_id, direction_3d, wind_pc_3d_inp ) + call counter_flux_inp_prod_rdef( inner2, pert_transport_controller, tctr_flux_inp ) call tl_transport_controller%finalise() if ( allocated(fpc_ls_wind_ref_flux_inp) ) deallocate( fpc_ls_wind_ref_flux_inp ) diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 index 8fd27ff48..480c73a96 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_wind_transport_alg module atlt_wind_transport_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -48,9 +49,10 @@ module atlt_wind_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_wind_transport_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_wind_transport_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_wind_transport_alg_mod, only : tl_wind_transport_alg use atl_wind_transport_alg_mod, only : atl_wind_transport_alg @@ -58,8 +60,9 @@ module atlt_wind_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: rhs_u @@ -194,8 +197,9 @@ module atlt_wind_transport_alg_mod wn_wn_inp_inner_prod = 0.0_r_def ! Adjoint - call atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & - tl_transport_controller, transport_metadata ) + call atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( ru_ru_inp_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 index 17e300fa3..d33548660 100644 --- a/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 @@ -222,7 +222,9 @@ module init_from_controller_alg_mod if ( flux_ptr%is_initialised() ) then call invoke( setval_X( counter_flux_inp(step), flux_ptr ) ) else - call invoke( setval_c( counter_flux_inp(step), 0.0_r_tran ) ) + call counter_flux_inp(step)%copy_field_properties(flux_ptr) + call invoke( setval_random( flux_ptr ), & + setval_X( counter_flux_inp(step), flux_ptr ) ) end if end do diff --git a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 index d98491647..bef3c3a70 100644 --- a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 @@ -8,7 +8,7 @@ module inner_from_controller_rdef_alg_mod - use constants_mod, only : i_def, l_def, r_def + use constants_mod, only : i_def, l_def, r_def, EPS use field_mod, only : field_type use r_tran_field_mod, only : r_tran_field_type use transport_controller_mod, only : transport_controller_type @@ -72,7 +72,6 @@ module inner_from_controller_rdef_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_flux_ptr real(kind=r_def) :: flux_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -88,7 +87,7 @@ module inner_from_controller_rdef_alg_mod flux_inner_prod = 0.0_r_def if ( ref_flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, ref_flux_ptr ) ) - flux_sf = 1.0_r_def/(flux_inner_prod + eps) + flux_sf = 1.0_r_def/(flux_inner_prod + EPS) inner = inner + flux_inner_prod*flux_sf write(log_scratch_space, *) "Flux precomputations ref_flux(step = ", step, ") inner prod = ", & flux_inner_prod @@ -164,7 +163,6 @@ module inner_from_controller_rdef_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_field_ptr real(kind=r_def) :: field_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -181,7 +179,7 @@ module inner_from_controller_rdef_alg_mod field_inner_prod = 0.0_r_def if ( ref_field_ptr%is_initialised() ) then call invoke( x_innerproduct_x( field_inner_prod, ref_field_ptr ) ) - field_sf = 1.0_r_def/(field_inner_prod + eps) + field_sf = 1.0_r_def/(field_inner_prod + EPS) inner = inner + field_inner_prod*field_sf write(log_scratch_space, *) "Flux precomputations ref_field(step = ", step, ") inner prod = ", & field_inner_prod @@ -256,7 +254,6 @@ module inner_from_controller_rdef_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_mass_ptr real(kind=r_def) :: mass_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -273,7 +270,7 @@ module inner_from_controller_rdef_alg_mod mass_inner_prod = 0.0_r_def if ( ref_mass_ptr%is_initialised() ) then call invoke( x_innerproduct_x( mass_inner_prod, ref_mass_ptr ) ) - mass_sf = 1.0_r_def/(mass_inner_prod + eps) + mass_sf = 1.0_r_def/(mass_inner_prod + EPS) inner = inner + mass_inner_prod*mass_sf write(log_scratch_space, *) "Flux precomputations ref_mass(step = ", step, ") inner prod = ", & mass_inner_prod @@ -345,7 +342,6 @@ module inner_from_controller_rdef_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: flux_ptr real(kind=r_def) :: flux_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps real(kind=r_def) :: flux_inner_prod @@ -358,7 +354,7 @@ module inner_from_controller_rdef_alg_mod flux_inner_prod = 0.0_r_def if ( flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, flux_ptr ) ) - flux_sf = 1.0_r_def/(flux_inner_prod + eps) + flux_sf = 1.0_r_def/(flux_inner_prod + EPS) inner = inner + flux_inner_prod*flux_sf write(log_scratch_space, *) "Transport counter flux(step = ", step, ") inner prod = ", & flux_inner_prod @@ -425,7 +421,6 @@ module inner_from_controller_rdef_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: field_n_ptr real(kind=r_def) :: field_n_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: field_n_inner_prod transport_counter => transport_controller%get_transport_counter() @@ -434,7 +429,7 @@ module inner_from_controller_rdef_alg_mod if ( field_n_ptr%is_initialised() ) then field_n_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( field_n_inner_prod, field_n_ptr ) ) - field_n_sf = 1.0_r_def/(field_n_inner_prod + eps) + field_n_sf = 1.0_r_def/(field_n_inner_prod + EPS) inner = inner + field_n_inner_prod*field_n_sf write(log_scratch_space, *) "Transport counter field_n inner prod = ", & field_n_inner_prod @@ -499,7 +494,6 @@ module inner_from_controller_rdef_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -508,7 +502,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Wind precomputations(delta_t = ", delta_t, ") inner prod = ", & wind_inner_prod @@ -579,7 +573,6 @@ module inner_from_controller_rdef_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -588,7 +581,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Wind precomputations(direction = ", direction, ") inner prod = ", & wind_inner_prod @@ -652,7 +645,6 @@ module inner_from_controller_rdef_alg_mod ! Internal variables type(r_tran_field_type), pointer :: ref_field_ptr real(kind=r_def) :: ref_field_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: ref_field_inner_prod ref_field_ptr => transport_controller%get_ref_field() @@ -660,7 +652,7 @@ module inner_from_controller_rdef_alg_mod if ( ref_field_ptr%is_initialised() ) then ref_field_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( ref_field_inner_prod, ref_field_ptr ) ) - ref_field_sf = 1.0_r_def/(ref_field_inner_prod + eps) + ref_field_sf = 1.0_r_def/(ref_field_inner_prod + EPS) inner = inner + ref_field_inner_prod*ref_field_sf write(log_scratch_space, *) "Transport controller ref_field inner prod = ", & ref_field_inner_prod @@ -719,7 +711,6 @@ module inner_from_controller_rdef_alg_mod ! Internal variables type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_ptr => transport_controller%get_wind_npdt( delta_t ) @@ -727,7 +718,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Transport controller wind(delta_t = ", delta_t, ") inner prod = ", & wind_inner_prod @@ -786,7 +777,6 @@ module inner_from_controller_rdef_alg_mod ! Internal variables type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf - real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_ptr => transport_controller%get_transporting_wind() @@ -794,7 +784,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Transport controller transporting_wind inner prod = ", & wind_inner_prod diff --git a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 index 4a56dd02e..2ee21745e 100644 --- a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 @@ -8,7 +8,8 @@ module inner_from_controller_rtran_alg_mod - use constants_mod, only : i_def, l_def, r_def, r_tran + use constants_mod, only : i_def, l_def, r_def, & + r_tran, EPS use r_tran_field_mod, only : r_tran_field_type use transport_controller_mod, only : transport_controller_type use flux_precomputations_alg_mod, only : flux_precomputations_type @@ -62,7 +63,6 @@ module inner_from_controller_rtran_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_flux_ptr real(kind=r_tran) :: flux_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -79,7 +79,7 @@ module inner_from_controller_rtran_alg_mod flux_inner_prod = 0.0_r_def if ( ref_flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, ref_flux_ptr ) ) - flux_sf = 1.0_r_tran/( real(flux_inner_prod, r_tran) + eps ) + flux_sf = 1.0_r_tran/( real(flux_inner_prod, r_tran) + EPS ) inner = inner + real( flux_inner_prod, r_tran )*flux_sf write(log_scratch_space, *) "Flux precomputations ref_flux(step = ", step, ") inner prod = ", & real( flux_inner_prod, r_tran ) @@ -154,7 +154,6 @@ module inner_from_controller_rtran_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_field_ptr real(kind=r_tran) :: field_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -171,7 +170,7 @@ module inner_from_controller_rtran_alg_mod field_inner_prod = 0.0_r_def if ( ref_field_ptr%is_initialised() ) then call invoke( x_innerproduct_x( field_inner_prod, ref_field_ptr ) ) - field_sf = 1.0_r_tran/( real( field_inner_prod, r_tran ) + eps ) + field_sf = 1.0_r_tran/( real( field_inner_prod, r_tran ) + EPS ) inner = inner + real( field_inner_prod, r_tran )*field_sf write(log_scratch_space, *) "Flux precomputations ref_field(step = ", step, ") inner prod = ", & real( field_inner_prod, r_tran ) @@ -246,7 +245,6 @@ module inner_from_controller_rtran_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_mass_ptr real(kind=r_tran) :: mass_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -263,7 +261,7 @@ module inner_from_controller_rtran_alg_mod mass_inner_prod = 0.0_r_def if ( ref_mass_ptr%is_initialised() ) then call invoke( x_innerproduct_x( mass_inner_prod, ref_mass_ptr ) ) - mass_sf = 1.0_r_tran/( real( mass_inner_prod, r_tran ) + eps ) + mass_sf = 1.0_r_tran/( real( mass_inner_prod, r_tran ) + EPS ) inner = inner + real( mass_inner_prod, r_tran )*mass_sf write(log_scratch_space, *) "Flux precomputations ref_mass(step = ", step, ") inner prod = ", & real( mass_inner_prod, r_tran ) @@ -335,7 +333,6 @@ module inner_from_controller_rtran_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: flux_ptr real(kind=r_tran) :: flux_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps real(kind=r_def) :: flux_inner_prod @@ -348,7 +345,7 @@ module inner_from_controller_rtran_alg_mod flux_inner_prod = 0.0_r_def if ( flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, flux_ptr ) ) - flux_sf = 1.0_r_tran/( real( flux_inner_prod, r_tran ) + eps ) + flux_sf = 1.0_r_tran/( real( flux_inner_prod, r_tran ) + EPS ) inner = inner + real( flux_inner_prod, r_tran )*flux_sf write(log_scratch_space, *) "Transport counter flux(step = ", step, ") inner prod = ", & real( flux_inner_prod, r_tran ) @@ -413,7 +410,6 @@ module inner_from_controller_rtran_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: field_n_ptr real(kind=r_tran) :: field_n_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran real(kind=r_def) :: field_n_inner_prod transport_counter => transport_controller%get_transport_counter() @@ -422,7 +418,7 @@ module inner_from_controller_rtran_alg_mod if ( field_n_ptr%is_initialised() ) then field_n_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( field_n_inner_prod, field_n_ptr ) ) - field_n_sf = 1.0_r_tran/( real( field_n_inner_prod, r_tran ) + eps ) + field_n_sf = 1.0_r_tran/( real( field_n_inner_prod, r_tran ) + EPS ) inner = inner + real( field_n_inner_prod, r_tran )*field_n_sf write(log_scratch_space, *) "Transport counter field_n inner prod = ", & real( field_n_inner_prod, r_tran ) @@ -487,7 +483,6 @@ module inner_from_controller_rtran_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_tran) :: wind_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -496,7 +491,7 @@ module inner_from_controller_rtran_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + eps ) + wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + EPS ) inner = inner + real( wind_inner_prod, r_tran )*wind_sf write(log_scratch_space, *) "Wind precomputations(delta_t = ", delta_t, ") inner prod = ", & real( wind_inner_prod, r_tran ) @@ -567,7 +562,6 @@ module inner_from_controller_rtran_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_tran) :: wind_sf - real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -576,7 +570,7 @@ module inner_from_controller_rtran_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + eps ) + wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + EPS ) inner = inner + real( wind_inner_prod, r_tran )*wind_sf write(log_scratch_space, *) "Wind precomputations(direction = ", direction, ") inner prod = ", & real( wind_inner_prod, r_tran ) diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 index 0ccda5295..164b3d534 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 @@ -6,9 +6,10 @@ !> @brief Module containing adjoint test for adj_reconstruct_w3_field_alg module adjt_reconstruct_w3_field_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def + use constants_mod, only : r_def, i_def, l_def, EPS use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -22,7 +23,6 @@ module adjt_reconstruct_w3_field_alg_mod use function_space_collection_mod, only : function_space_collection use transport_metadata_collection_mod, only : transport_metadata_collection use transport_metadata_mod, only : transport_metadata_type - use check_configuration_mod, only : get_required_stencil_depth implicit none @@ -36,9 +36,10 @@ module adjt_reconstruct_w3_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_hori_w3_reconstruct_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_hori_w3_reconstruct_alg( mesh, model_clock, adj_lookup_table_cache ) use adj_reconstruct_w3_field_alg_mod, only : adj_hori_w3_reconstruct_alg use reconstruct_w3_field_alg_mod, only : hori_w3_reconstruct_alg @@ -46,8 +47,9 @@ module adjt_reconstruct_w3_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_new @@ -72,7 +74,6 @@ module adjt_reconstruct_w3_field_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_new_field_new_input_inner_prod real(kind=r_def) :: field_old_field_old_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -112,8 +113,8 @@ module adjt_reconstruct_w3_field_alg_mod x_innerproduct_x( field_old_inner_prod, field_old ) ) ! Determining scale factors - field_new_sf = 1.0_r_def/(field_new_inner_prod + eps) - field_old_sf = 1.0_r_def/(field_old_inner_prod + eps) + field_new_sf = 1.0_r_def/(field_new_inner_prod + EPS) + field_old_sf = 1.0_r_def/(field_old_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + field_new_inner_prod*field_new_sf @@ -135,7 +136,8 @@ module adjt_reconstruct_w3_field_alg_mod ! Adjoint call adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata ) + transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_new_field_new_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 index 6c20ece3d..0eb5cc146 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for adj_wt_advective_update_alg module adjt_wt_advective_update_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use mesh_mod, only : mesh_type @@ -14,7 +15,7 @@ module adjt_wt_advective_update_alg_mod use finite_element_config_mod, only : element_order_h, & element_order_v use fs_continuity_mod, only : W2h, W2v, Wtheta - use constants_mod, only : i_def, r_def, l_def + use constants_mod, only : i_def, r_def, l_def, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -35,9 +36,10 @@ module adjt_wt_advective_update_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_hori_wt_update_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_hori_wt_update_alg( mesh, model_clock, adj_lookup_table_cache ) use wt_advective_update_alg_mod, only : hori_wt_update_alg use adj_wt_advective_update_alg_mod, only : adj_hori_wt_update_alg @@ -45,8 +47,9 @@ module adjt_wt_advective_update_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal arguments for forward and adjoint type(field_type) :: u_grad_f @@ -72,7 +75,6 @@ module adjt_wt_advective_update_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod real(kind=r_def) :: inner2 - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -107,8 +109,8 @@ module adjt_wt_advective_update_alg_mod x_innerproduct_x(field_inner_prod, field) ) ! Determining scale factors - advective_sf = 1.0_r_def/(advective_inner_prod + eps) - field_sf = 1.0_r_def/(field_inner_prod + eps) + advective_sf = 1.0_r_def/(advective_inner_prod + EPS) + field_sf = 1.0_r_def/(field_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + advective_inner_prod*advective_sf @@ -127,7 +129,7 @@ module adjt_wt_advective_update_alg_mod advective_advective_input_inner_prod = 0.0_r_def field_field_input_inner_prod = 0.0_r_def - call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, field, transport_metadata ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, field, transport_metadata, adj_lookup_table_cache ) call invoke( x_innerproduct_y(advective_advective_input_inner_prod, u_grad_f, advective_input), & x_innerproduct_y(field_field_input_inner_prod, field, field_input) ) diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 index e12aa59a9..6082fa336 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 @@ -6,10 +6,11 @@ !> @brief Module containing adjoint test for atl_advective_and_flux_alg module atlt_advective_and_flux_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def + use constants_mod, only : r_def, i_def, l_def, EPS use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -37,9 +38,10 @@ module atlt_advective_and_flux_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_advective_and_flux_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_advective_and_flux_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_advective_and_flux_alg_mod, only : atl_advective_and_flux_alg use tl_advective_and_flux_alg_mod, only : tl_advective_and_flux_alg @@ -47,8 +49,9 @@ module atlt_advective_and_flux_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: mass_flux_1 @@ -94,7 +97,6 @@ module atlt_advective_and_flux_alg_mod real(kind=r_def) :: adv_inc_adv_inc_input_inner_prod real(kind=r_def) :: density_density_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -173,11 +175,11 @@ module atlt_advective_and_flux_alg_mod x_innerproduct_x( wind_inner_prod, wind ) ) ! Determining scale factors - mass_flux_1_sf = 1.0_r_def/(mass_flux_1_inner_prod + eps) - mass_flux_2_sf = 1.0_r_def/(mass_flux_2_inner_prod + eps) - adv_inc_sf = 1.0_r_def/(adv_inc_inner_prod + eps) - density_sf = 1.0_r_def/(density_inner_prod + eps) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + mass_flux_1_sf = 1.0_r_def/(mass_flux_1_inner_prod + EPS) + mass_flux_2_sf = 1.0_r_def/(mass_flux_2_inner_prod + EPS) + adv_inc_sf = 1.0_r_def/(adv_inc_inner_prod + EPS) + density_sf = 1.0_r_def/(density_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + mass_flux_1_inner_prod*mass_flux_1_sf @@ -217,7 +219,8 @@ module atlt_advective_and_flux_alg_mod density, wind, ls_density, ls_wind, & direction, transport_metadata, & final_rk_stage, dt, & - do_flux, do_advective ) + do_flux, do_advective, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( mass_flux_1_mass_flux_1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 index 92fd13b5a..020220d98 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 @@ -6,10 +6,11 @@ !> @brief Module containing adjoint test for atl_mol_advective_alg module atlt_mol_advective_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def + use constants_mod, only : r_def, i_def, l_def, EPS use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -46,9 +47,10 @@ module atlt_mol_advective_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_mol_advective_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_mol_advective_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_mol_advective_alg_mod, only : atl_mol_advective_alg use tl_mol_advective_alg_mod, only : tl_mol_advective_alg @@ -56,8 +58,9 @@ module atlt_mol_advective_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -81,7 +84,6 @@ module atlt_mol_advective_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_np1_field_np1_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Variables used to handle calculations for fields stored in tl_transport_controller integer(kind=i_def) :: mesh_id @@ -144,8 +146,8 @@ module atlt_mol_advective_alg_mod x_innerproduct_x( field_inner_prod, field ) ) ! Determining scale factors - field_np1_sf = 1.0_r_def/(field_np1_inner_prod + eps) - field_sf = 1.0_r_def/(field_inner_prod + eps) + field_np1_sf = 1.0_r_def/(field_np1_inner_prod + EPS) + field_sf = 1.0_r_def/(field_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + field_np1_inner_prod*field_np1_sf @@ -169,7 +171,7 @@ module atlt_mol_advective_alg_mod field_field_input_inner_prod = 0.0_r_def ! Adjoint - call atl_mol_advective_alg( field_np1, field, ls_field, tl_transport_controller ) + call atl_mol_advective_alg( field_np1, field, ls_field, tl_transport_controller, adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_np1_field_np1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 index 6f2a2cabc..2b5d89620 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 @@ -6,10 +6,11 @@ !> @brief Module containing adjoint test for atl_mol_conservative_alg module atlt_mol_conservative_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def + use constants_mod, only : r_def, i_def, l_def, EPS use copy_field_alg_mod, only : copy_field use log_mod, only : log_event, & log_scratch_space, & @@ -56,9 +57,10 @@ module atlt_mol_conservative_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_mol_conservative_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_mol_conservative_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_mol_conservative_alg_mod, only : atl_mol_conservative_alg use tl_mol_conservative_alg_mod, only : tl_mol_conservative_alg @@ -66,8 +68,9 @@ module atlt_mol_conservative_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -91,22 +94,25 @@ module atlt_mol_conservative_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_np1_field_np1_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Variables used to handle calculations for fields stored in tl_transport_controller integer(kind=i_def) :: mesh_id type(transport_controller_type), pointer :: pert_transport_controller type(transport_controller_type), pointer :: ls_transport_controller + type(transport_controller_type), pointer :: transport_controller type(field_type) :: tctr_field_n type(function_space_type), pointer :: tctr_field_n_vs type(field_type) :: tctr_field_n_inp type(r_tran_field_type), dimension(:), allocatable :: tctr_flux_inp type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp type(r_tran_field_type), dimension(:), allocatable :: fpc_pert_wind_ref_flux_inp + type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp2 type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_2_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_2_inp + type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_3_inp + type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_3_inp type(r_tran_field_type) :: wind_pc_h_inp type(r_tran_field_type) :: wind_pc_v_inp type(r_tran_field_type) :: wind_pc_3d_inp @@ -118,6 +124,7 @@ module atlt_mol_conservative_alg_mod mesh_id = mesh%get_id() call setup_test_tl_transport_controller( mesh, model_clock, tl_transport_controller, tctr_field_n, tctr_field_n_vs ) + transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() @@ -126,6 +133,12 @@ module atlt_mol_conservative_alg_mod tctr_field_n_inp, & tctr_flux_inp, & pert_transport_controller ) + call init_flux_pc_fieldvals( mesh, & + 1_i_def, & + fpc_ls_wind_ref_flux_inp2, & + dummy_ref_field_3_inp, & + dummy_ref_mass_3_inp, & + transport_controller ) call init_flux_pc_fieldvals( mesh, & 1_i_def, & fpc_ls_wind_ref_flux_inp, & @@ -182,8 +195,8 @@ module atlt_mol_conservative_alg_mod x_innerproduct_x( field_inner_prod, field ) ) ! Determining scale factors - field_np1_sf = 1.0_r_def/(field_np1_inner_prod + eps) - field_sf = 1.0_r_def/(field_inner_prod + eps) + field_np1_sf = 1.0_r_def/(field_np1_inner_prod + EPS) + field_sf = 1.0_r_def/(field_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + field_np1_inner_prod*field_np1_sf @@ -212,7 +225,8 @@ module atlt_mol_conservative_alg_mod ! Adjoint call atl_mol_conservative_alg( field_np1, field, ls_field, & - tl_transport_controller ) + tl_transport_controller, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_np1_field_np1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 index 374325a37..23e244285 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 @@ -12,7 +12,7 @@ module atlt_poly1d_vert_w3_recon_alg_mod use function_space_collection_mod, only : function_space_collection use finite_element_config_mod, only : element_order_h, element_order_v use fs_continuity_mod, only : W3 - use constants_mod, only : i_def, l_def, r_def + use constants_mod, only : i_def, l_def, r_def, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_DEBUG, & @@ -78,10 +78,9 @@ module atlt_poly1d_vert_w3_recon_alg_mod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_def) :: inner2 - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 3100.0_r_def real(kind=r_def) :: machine_tol real(kind=r_def) :: relative_diff @@ -141,8 +140,8 @@ module atlt_poly1d_vert_w3_recon_alg_mod x_innerproduct_x( tracer_inner_prod, tracer ) ) ! Determining scale factors - reconstruction_sf = 1.0_r_def/(reconstruction_inner_prod + eps) - tracer_sf = 1.0_r_def/(tracer_inner_prod + eps) + reconstruction_sf = 1.0_r_def/(reconstruction_inner_prod + EPS) + tracer_sf = 1.0_r_def/(tracer_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + reconstruction_inner_prod*reconstruction_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 index c579342e5..cafc398f0 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 @@ -13,7 +13,7 @@ module atlt_poly_adv_update_alg_mod use function_space_collection_mod, only : function_space_collection use finite_element_config_mod, only : element_order_h, element_order_v use fs_continuity_mod, only : W2H, Wtheta - use constants_mod, only : i_def, r_def, r_tran + use constants_mod, only : i_def, r_def, r_tran, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -61,7 +61,6 @@ module atlt_poly_adv_update_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_tran) :: inner2 - real(kind=r_tran), parameter :: eps = 1e-30_r_tran ! Test variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -103,8 +102,8 @@ module atlt_poly_adv_update_alg_mod x_innerproduct_x( wind_inner_prod, wind ) ) ! Determining scale factors - advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + eps ) - wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + eps ) + advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + EPS ) + wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + EPS ) inner1 = 0.0_r_tran inner1 = inner1 + real( advective_inner_prod, r_tran )*advective_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 index dc8b4c2c0..b1599e315 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 @@ -6,9 +6,10 @@ !> @brief Module containing handwritten adjoint test for atl_reconstruct_w3_field_alg module atlt_reconstruct_w3_field_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def + use constants_mod, only : r_def, i_def, l_def, EPS use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -37,9 +38,10 @@ module atlt_reconstruct_w3_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_reconstruct_w3_field_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_reconstruct_w3_field_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_reconstruct_w3_field_alg_mod, only : atl_reconstruct_w3_field_alg use tl_reconstruct_w3_field_alg_mod, only : tl_reconstruct_w3_field_alg @@ -47,8 +49,10 @@ module atlt_reconstruct_w3_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + ! Arguments for tl and adj calls type(field_type) :: field_new @@ -76,10 +80,9 @@ module atlt_reconstruct_w3_field_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_new_field_new_input_inner_prod real(kind=r_def) :: field_old_field_old_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 3000.0_r_def real(kind=r_def) :: machine_tol real(kind=r_def) :: relative_diff @@ -122,8 +125,8 @@ module atlt_reconstruct_w3_field_alg_mod x_innerproduct_x( field_old_inner_prod, field_old ) ) ! Determining scale factors - field_new_sf = 1.0_r_def/(field_new_inner_prod + eps) - field_old_sf = 1.0_r_def/(field_old_inner_prod + eps) + field_new_sf = 1.0_r_def/(field_new_inner_prod + EPS) + field_old_sf = 1.0_r_def/(field_old_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + field_new_inner_prod*field_new_sf @@ -144,8 +147,9 @@ module atlt_reconstruct_w3_field_alg_mod field_old_field_old_input_inner_prod = 0.0_r_def ! Adjoint - call atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & - direction, transport_metadata, final_rk_stage ) + call atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & + direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_new_field_new_input_inner_prod, & @@ -215,7 +219,6 @@ module atlt_reconstruct_w3_field_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_new_field_new_input_inner_prod real(kind=r_def) :: field_old_field_old_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -260,8 +263,8 @@ module atlt_reconstruct_w3_field_alg_mod x_innerproduct_x( field_old_inner_prod, field_old ) ) ! Determining scale factors - field_new_sf = 1.0_r_def/(field_new_inner_prod + eps) - field_old_sf = 1.0_r_def/(field_old_inner_prod + eps) + field_new_sf = 1.0_r_def/(field_new_inner_prod + EPS) + field_old_sf = 1.0_r_def/(field_old_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + field_new_inner_prod*field_new_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 index a66ed877c..1f942264d 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 @@ -13,7 +13,7 @@ module atlt_w3h_advective_update_alg_mod use finite_element_config_mod, only : element_order_h, element_order_v use fs_continuity_mod, only : W2, W3 use operator_mod, only : operator_type - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -67,7 +67,6 @@ module atlt_w3h_advective_update_alg_mod real(kind=r_def) :: advective_increment_advective_increment_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_def) :: inner2 - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -115,8 +114,8 @@ module atlt_w3h_advective_update_alg_mod x_innerproduct_x(wind_inner_prod, wind) ) ! Determining scale factors - advective_increment_sf = 1.0_r_def/(advective_increment_inner_prod + eps) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + advective_increment_sf = 1.0_r_def/(advective_increment_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + advective_increment_inner_prod*advective_increment_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 index fc15d1db0..a00003edc 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing handwritten adjoint test for atl_wt_advective_update_alg_mod routines module atlt_wt_advective_update_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -15,7 +16,7 @@ module atlt_wt_advective_update_alg_mod use finite_element_config_mod, only : element_order_h, & element_order_v use fs_continuity_mod, only : W2h, W2v, Wtheta, W2 - use constants_mod, only : i_def, r_def, l_def + use constants_mod, only : i_def, r_def, l_def, EPS use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -43,7 +44,10 @@ module atlt_wt_advective_update_alg_mod !> Determined by testing the equality of inner products !> < Mx, Mx > and < AMx, x >, where M is the tangent linear !> and A is the adjoint. - subroutine atlt_wt_advective_update_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_wt_advective_update_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_wt_advective_update_alg_mod, only : atl_wt_advective_update_alg use tl_wt_advective_update_alg_mod, only : tl_wt_advective_update_alg @@ -51,8 +55,9 @@ module atlt_wt_advective_update_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: rhs @@ -87,7 +92,6 @@ module atlt_wt_advective_update_alg_mod real(kind=r_def) :: rhs_rhs_input_inner_prod real(kind=r_def) :: adv_field_adv_field_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -150,9 +154,9 @@ module atlt_wt_advective_update_alg_mod x_innerproduct_x( wind_inner_prod, wind ) ) ! Determining scale factors - rhs_sf = 1.0_r_def/(rhs_inner_prod + eps) - adv_field_sf = 1.0_r_def/(adv_field_inner_prod + eps) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + rhs_sf = 1.0_r_def/(rhs_inner_prod + EPS) + adv_field_sf = 1.0_r_def/(adv_field_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + rhs_inner_prod*rhs_sf @@ -178,10 +182,11 @@ module atlt_wt_advective_update_alg_mod wind_wind_input_inner_prod = 0.0_r_def ! Adjoint - call atl_wt_advective_update_alg( rhs, adv_field, wind, & - ls_adv_field, ls_wind, & - dt, direction, & - transport_metadata, final_rk_stage ) + call atl_wt_advective_update_alg( rhs, adv_field, wind, & + ls_adv_field, ls_wind, & + dt, direction, & + transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( rhs_rhs_input_inner_prod, & @@ -253,7 +258,6 @@ module atlt_wt_advective_update_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_def) :: inner2 - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -288,8 +292,8 @@ module atlt_wt_advective_update_alg_mod x_innerproduct_x(wind_inner_prod, wind) ) ! Determining scale factors - advective_sf = 1.0_r_def/(advective_inner_prod + eps) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) + advective_sf = 1.0_r_def/(advective_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + advective_inner_prod*advective_sf @@ -376,7 +380,6 @@ module atlt_wt_advective_update_alg_mod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod real(kind=r_def) :: inner2 - real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -417,9 +420,9 @@ module atlt_wt_advective_update_alg_mod x_innerproduct_x(field_inner_prod, field) ) ! Determining scale factors - advective_sf = 1.0_r_def/(advective_inner_prod + eps) - wind_sf = 1.0_r_def/(wind_inner_prod + eps) - field_sf = 1.0_r_def/(field_inner_prod + eps) + advective_sf = 1.0_r_def/(advective_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + field_sf = 1.0_r_def/(field_inner_prod + EPS) inner1 = 0.0_r_def inner1 = inner1 + advective_inner_prod*advective_sf diff --git a/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 b/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 index f9d458c4d..9f426f45d 100644 --- a/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 +++ b/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 @@ -56,6 +56,9 @@ subroutine run( modeldb ) use adjt_poly_adv_upd_lookup_alg_mod, only : adjt_poly_adv_upd_lookup_alg use adjt_w3h_adv_upd_lookup_alg_mod, only : adjt_w3h_adv_upd_lookup_alg + ! ./linear_physics + use atlt_bl_inc_alg_mod, only : atlt_bl_inc_alg + ! Handwritten algorithm tests ! ./interpolation use adjt_interpolation_alg_mod, only : adjt_interp_w3wth_to_w2_alg, & @@ -105,6 +108,9 @@ subroutine run( modeldb ) use adjt_mixed_solver_alg_mod, only : adjt_mixed_solver_alg use adjt_semi_implicit_solver_step_alg_mod, only : adjt_semi_implicit_solver_step_alg + ! ./linear_physics + use atlt_bdy_lyr_alg_mod, only : atlt_bdy_lyr_alg + ! ./timestepping use atlt_si_timestep_alg_mod, only : atlt_si_timestep_alg @@ -147,6 +153,9 @@ subroutine run( modeldb ) ! ./core_dynamics call atlt_pressure_gradient_bd_alg( mesh ) + ! ./linear_physics + call atlt_bl_inc_alg( mesh ) + ! ./inter_function_space call adjt_sci_convert_hdiv_field_alg( mesh, chi, panel_id ) @@ -168,26 +177,26 @@ subroutine run( modeldb ) call atlt_end_con_step_alg( mesh, modeldb%clock ) ! ./transport/mol - call adjt_hori_w3_reconstruct_alg( mesh, modeldb%clock ) + call adjt_hori_w3_reconstruct_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) call atlt_vert_w3_reconstruct_alg( mesh, modeldb%clock ) - call atlt_reconstruct_w3_field_alg( mesh, modeldb%clock ) + call atlt_reconstruct_w3_field_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) call atlt_hori_wt_update_alg( mesh, modeldb%clock ) call atlt_vert_wt_update_alg( mesh, modeldb%clock ) - call adjt_hori_wt_update_alg( mesh, modeldb%clock ) - call atlt_wt_advective_update_alg( mesh, modeldb%clock ) - call atlt_advective_and_flux_alg( mesh, modeldb%clock ) - call atlt_mol_conservative_alg( mesh, modeldb%clock ) - call atlt_mol_advective_alg( mesh, modeldb%clock ) + call adjt_hori_wt_update_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_wt_advective_update_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_advective_and_flux_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_mol_conservative_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_mol_advective_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) ! ./transport/control - call atlt_transport_field_alg( mesh, modeldb%clock ) - call atlt_wind_transport_alg( mesh, modeldb%clock ) - call atlt_moist_mr_transport_alg( mesh, modeldb%clock ) - call atlt_theta_transport_alg( mesh, modeldb%clock ) + call atlt_transport_field_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_wind_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_moist_mr_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_theta_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) call adjt_ls_wind_pert_rho_initialiser_alg( mesh, modeldb%clock ) call adjt_pert_wind_ls_rho_initialiser_alg( mesh, modeldb%clock ) call atlt_transport_controller_initialiser_alg( mesh, modeldb%clock ) - call atlt_transport_control_alg( mesh, modeldb%clock ) + call atlt_transport_control_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) ! ./core_dynamics call atlt_rhs_alg( mesh, modeldb%clock ) @@ -195,12 +204,15 @@ subroutine run( modeldb ) call atlt_derive_exner_from_eos_alg( mesh ) call atlt_moist_dyn_factors_alg( mesh ) + ! ./linear_physics + call atlt_bdy_lyr_alg( modeldb, mesh ) + ! ./solver - call adjt_pressure_precon_alg( modeldb, mesh, modeldb%clock ) + call adjt_pressure_precon_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) call adjt_mixed_operator_alg( mesh, modeldb%clock ) - call adjt_mixed_schur_preconditioner_alg( modeldb, mesh, modeldb%clock ) - call adjt_mixed_solver_alg( modeldb, mesh, modeldb%clock ) - call adjt_semi_implicit_solver_step_alg( modeldb, mesh, modeldb%clock ) + call adjt_mixed_schur_preconditioner_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) + call adjt_mixed_solver_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) + call adjt_semi_implicit_solver_step_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) ! ./timestepping call atlt_si_timestep_alg( modeldb, mesh, twod_mesh, 1 ) diff --git a/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 b/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 index 09f74b4c9..9db0ddb99 100644 --- a/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 +++ b/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 @@ -28,12 +28,12 @@ module adjoint_test_parameters_mod ! if the ls is not realistic. ls can still be ! randomly assigned, but in a sensible range ! to prevent these issues. - real(r_def), dimension(2), parameter :: ls_u_range = (/ 0.0_r_def, 10.0_r_def /) + real(r_def), dimension(2), parameter :: ls_u_range = (/ 1.e2_r_def, 1.e3_r_def /) real(r_def), dimension(2), parameter :: ls_theta_range = (/ 280.0_r_def, 340.0_r_def /) - real(r_def), dimension(2), parameter :: ls_rho_range = (/ 0.0_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_exner_range = (/ 0.0_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_md1_range = (/ 0.0_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_md2_range = (/ 0.0_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_md3_range = (/ 0.0_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_rho_range = (/ 0.1_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_exner_range = (/ 0.1_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_md1_range = (/ 0.1_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_md2_range = (/ 0.1_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_md3_range = (/ 0.1_r_def, 1.0_r_def /) end module adjoint_test_parameters_mod diff --git a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 index 5ecef8fd2..f5d8d9fe2 100644 --- a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 +++ b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 @@ -10,7 +10,6 @@ module gravity_wave_infrastructure_mod use add_mesh_map_mod, only : assign_mesh_maps use driver_modeldb_mod, only : modeldb_type - use check_configuration_mod, only : get_required_stencil_depth use constants_mod, only : i_def, & PRECISION_REAL, & r_def, r_second, & @@ -81,7 +80,8 @@ subroutine initialise_infrastructure( program_name, & logical(l_def) :: prepartitioned logical :: apply_partition_check - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) + integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers @@ -191,7 +191,7 @@ subroutine initialise_infrastructure( program_name, & !======================================================================= ! 1.3 Initialise mesh objects and assign InterGrid maps !======================================================================= - stencil_depth = get_required_stencil_depth() + stencil_depth = 2 apply_partition_check = .false. if ( .not. prepartitioned .and. l_multigrid ) then apply_partition_check = .true. @@ -237,6 +237,9 @@ subroutine initialise_infrastructure( program_name, & nullify(chi_inventory, panel_id_inventory) deallocate(base_mesh_names) + deallocate(twod_names) + deallocate(extrusion) + deallocate(extrusion_2d) end subroutine initialise_infrastructure diff --git a/applications/gungho_model/example/configuration.nml b/applications/gungho_model/example/configuration.nml index ea60b8aa1..aa74a254d 100644 --- a/applications/gungho_model/example/configuration.nml +++ b/applications/gungho_model/example/configuration.nml @@ -286,6 +286,7 @@ tau_u=0.55, / &transport adjust_theta=.false., +adjust_tracer_equation=.false. adjust_vhv_wind=.true., broken_w2_projection=.false., calculate_detj='upwind', diff --git a/applications/gungho_model/example/file_def_initial.xml b/applications/gungho_model/example/file_def_initial.xml index 2b1050253..42cf3bfec 100644 --- a/applications/gungho_model/example/file_def_initial.xml +++ b/applications/gungho_model/example/file_def_initial.xml @@ -13,6 +13,8 @@ + + diff --git a/applications/gungho_model/lam_example/baroclinic/config_driver.nml b/applications/gungho_model/lam_example/baroclinic/config_driver.nml index 43d72b197..0aea85072 100644 --- a/applications/gungho_model/lam_example/baroclinic/config_driver.nml +++ b/applications/gungho_model/lam_example/baroclinic/config_driver.nml @@ -210,6 +210,7 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/lam_example/baroclinic/config_lam.nml b/applications/gungho_model/lam_example/baroclinic/config_lam.nml index d63ada536..7187243e9 100644 --- a/applications/gungho_model/lam_example/baroclinic/config_lam.nml +++ b/applications/gungho_model/lam_example/baroclinic/config_lam.nml @@ -226,6 +226,7 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/lam_example/straka/config_driver.nml b/applications/gungho_model/lam_example/straka/config_driver.nml index 82fd2d418..094790169 100644 --- a/applications/gungho_model/lam_example/straka/config_driver.nml +++ b/applications/gungho_model/lam_example/straka/config_driver.nml @@ -211,6 +211,7 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/lam_example/straka/config_lam.nml b/applications/gungho_model/lam_example/straka/config_lam.nml index 636c9e6e0..30a4ea4b8 100644 --- a/applications/gungho_model/lam_example/straka/config_lam.nml +++ b/applications/gungho_model/lam_example/straka/config_lam.nml @@ -223,6 +223,7 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/example/configuration.nml b/applications/jedi_lfric_tests/example/configuration.nml index b2d3c1ff0..3e1f564da 100644 --- a/applications/jedi_lfric_tests/example/configuration.nml +++ b/applications/jedi_lfric_tests/example/configuration.nml @@ -1,13 +1,13 @@ &base_mesh -file_prefix='mesh_C12', +file_prefix='mesh_C12_MG', geometry='spherical', prepartitioned=.false., -prime_mesh_name='C12', +prime_mesh_name='dynamics', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final' +transport_overwrite_freq='final', / &checks limit_cfl=.false., @@ -29,16 +29,25 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / +&convection +dx_ref=50000.0, +l_cvdiag_ctop_qmax=.false., +qlmin=4.0e-4, +resdep_precipramp=.false., +/ +&cosp +l_cosp=.false., +/ &damping_layer dl_base=40000.0, dl_str=0.05, -dl_type='latitude', +dl_type='standard', / &departure_points horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true. +share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -56,13 +65,13 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/Quagga/C12/n96e_l70', +ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='restart', diag_stem_name='diagGungho', -ls_directory='/data/users/lfric/data/tangent-linear/Ticket46', -ls_filename='final_ls', -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid', -start_dump_directory='/data/users/lfric/data/tangent-linear/Ticket3590', +ls_directory='/data/users/tim.payne/lfric_apps/files', +ls_filename='final_ls_with_land', +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', +start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', start_dump_filename='final_pert', / &finite_element @@ -79,10 +88,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false. -horizontal_transport_predictor=.false. +horizontal_physics_predictor=.false., +horizontal_transport_predictor=.false., init_exner_bt=.true., -l_multigrid=.false., +l_multigrid=.true., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -90,7 +99,7 @@ p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false. +theta_moist_source=.false., use_multires_coupling=.false., use_physics=.true., use_wavedynamics=.true., @@ -101,15 +110,27 @@ gcrk=8, method='prec_only', monitor_convergence=.false., normalise=.true., -preconditioner='tridiagonal', +preconditioner='multigrid', si_pressure_a_tol=1.0e-8, si_pressure_maximum_iterations=400, si_pressure_tolerance=1.0e-4, / +&iau_addinf_io +/ +&iau_addinf_io +/ +&iau_ainc_io +/ +&iau_ainc_io +/ +&iau_bcorr_io +/ +&iau +/ &idealised f_lon_deg=0.0, -perturb_init=.false. -test='gravity_wave', +perturb_init=.false., +test='none', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -144,10 +165,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.0, -r2=0.0, -x1=0.0, -x2=0.0, +r1=0.4, +r2=0.4, +x1=0.4, +x2=-0.4, y1=0.0, y2=0.0, z1=0.0, @@ -159,7 +180,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=120.0, +pert_centre=60.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -168,22 +189,25 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='none', +profile='constant_uv', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.false., -u0=0.0, +smp_init_wind=.true., +u0=2.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., +checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, +end_of_run_checkpoint=.true., file_convention='UGRID', +multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -196,11 +220,27 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true. +fixed_ls=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., +max_bl_stabilisation=0.75, +n_bl_levels_to_stabilise=15, pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging +log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver @@ -211,7 +251,7 @@ guess_np1=.false., mixed_solver_a_tol=1.0e-3, monitor_convergence=.true., normalise=.true., -reference_reset_time=3600., +reference_reset_time=3600.0, si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', @@ -224,6 +264,14 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / +&multigrid +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', +multigrid_chain_nitems=3, +n_coarsesmooth=4, +n_postsmooth=2, +n_presmooth=2, +smooth_relaxation=0.8, +/ &esm_couple l_esm_couple_test=.false., / @@ -231,16 +279,23 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning +generate_inner_halos=.false., panel_decomposition='auto', -panel_xproc=6, +panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., -configure_segments=.false. +sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -252,10 +307,14 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_rad_opt='off', -cfc12_rad_opt='off', -ch4_rad_opt='off', -co2_rad_opt='off', +cfc11_mix_ratio=1.110e-09, +cfc11_rad_opt='constant', +cfc12_mix_ratio=2.187e-09, +cfc12_rad_opt='constant', +ch4_mix_ratio=1.006e-06, +ch4_rad_opt='constant', +co2_mix_ratio=6.002e-04, +co2_rad_opt='constant', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -268,11 +327,13 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_rad_opt='off', +n2o_mix_ratio=4.945e-07, +n2o_rad_opt='constant', na_rad_opt='off', nh3_rad_opt='off', -o2_rad_opt='off', -o3_rad_opt='off', +o2_mix_ratio=0.2314, +o2_rad_opt='constant', +o3_rad_opt='ancil', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', @@ -286,6 +347,8 @@ monitor_convergence=.false., preconditioner='diagonal', tolerance=1.0e-6, / +&specified_surface +/ &time calendar='timestep', calendar_origin='2016-01-01 15:00:00', @@ -297,7 +360,7 @@ timestep_start='1', ×tepping alpha=0.55, dt=1800, -inner_iterations=2, +inner_iterations=1, method='semi_implicit', outer_iterations=2, runge_kutta_method='forward_euler', @@ -308,6 +371,7 @@ tau_u=0.55, / &transport adjust_theta=.false., +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., @@ -341,8 +405,8 @@ min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.false., -panel_edge_treatment='none' +panel_edge_high_order=.true., +panel_edge_treatment='none', profile_size=5, reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', @@ -360,8 +424,7 @@ vertical_method=5*1, vertical_monotone=5*1, vertical_monotone_order=5*3, vertical_sl_order='cubic', -wind_mono_top=.false. -wind_mono_top_depth=5 +wind_mono_top=.false., / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example/iodef.xml b/applications/jedi_lfric_tests/example/iodef.xml index 92e9017c2..90edb87ac 100644 --- a/applications/jedi_lfric_tests/example/iodef.xml +++ b/applications/jedi_lfric_tests/example/iodef.xml @@ -50,6 +50,11 @@ + + + + + @@ -140,6 +145,8 @@ + + @@ -186,6 +193,8 @@ + + @@ -327,6 +336,7 @@ + diff --git a/applications/jedi_lfric_tests/example/mesh_C12.nc b/applications/jedi_lfric_tests/example/mesh_C12.nc deleted file mode 100644 index f7ea6988e22a06194aac0d17b6e3be62cd539773..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85708 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 Rwf*lmDjqBQ-|O@_{yzW$Qgi?S diff --git a/applications/jedi_lfric_tests/example_create_traj/C224_create_traj_file.sh b/applications/jedi_lfric_tests/example_create_traj/C224_create_traj_file.sh new file mode 100755 index 000000000..22ba50324 --- /dev/null +++ b/applications/jedi_lfric_tests/example_create_traj/C224_create_traj_file.sh @@ -0,0 +1,19 @@ +# This input file can be generated by running the lfric_atm nightly test suite +# It is generated by the nwp_gal9_ls_and_jedi-C224_MG test +INPUT=ls_and_jedi_trajectory_2021060200-2021060207.nc +OUTPUT=C224_jedi_trajectory.nc + +TIMESTEP=$(ncks -d time,0 -v time ${INPUT} | grep "time =" | sed -e "s/.*= //;s/ .*//" | tr -d -c 0-9) + +echo Altering variable names to match JEDI/MONIO +# Change the file so that the time starts at 0, not 3600 +ncrename -d time,time_counter ${INPUT} ${INPUT}_tmp +ncrename -O -v time,time_instant ${INPUT}_tmp ${INPUT}_tmp +ncrename -O -v time_bounds,time_instant_bounds ${INPUT}_tmp ${INPUT}_tmp + +echo Shifting time back by ${TIMESTEP} +# Change the file so that the time starts at 0 +ncap2 -O -s time_instant-=${TIMESTEP} ${INPUT}_tmp ${INPUT}_tmp +ncap2 -O -s time_instant_bounds-=${TIMESTEP} ${INPUT}_tmp ${OUTPUT} +rm *tmp* +echo Output ${OUTPUT} diff --git a/applications/jedi_lfric_tests/example_forecast/configuration.nml b/applications/jedi_lfric_tests/example_forecast/configuration.nml index 016e61fbc..17bb72453 100644 --- a/applications/jedi_lfric_tests/example_forecast/configuration.nml +++ b/applications/jedi_lfric_tests/example_forecast/configuration.nml @@ -309,6 +309,7 @@ tau_u=0.5, / &transport adjust_theta=.false., +adjust_tracer_equation=.false. adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jedi_lfric_tests/example_forecast/iodef.xml b/applications/jedi_lfric_tests/example_forecast/iodef.xml index fb4ab30d6..7a100a000 100644 --- a/applications/jedi_lfric_tests/example_forecast/iodef.xml +++ b/applications/jedi_lfric_tests/example_forecast/iodef.xml @@ -66,6 +66,8 @@ + + diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml index 53acee0fc..d44020c0f 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml @@ -1,13 +1,10 @@ &jedi_lfric_tests test_field='theta', / - -#### Configure JEDI-LFRIC - &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', @@ -15,8 +12,8 @@ io_time_step='P0DT1H0M0S', &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s','land_fraction', / &jedi_increment inc_time='2018-04-14 21:00:00', @@ -36,19 +33,16 @@ time_step='P0DT1H0M0S', &jedi_lfric_settings forecast_length='P0DT6H0M0S', / - -#### Configure LFRic - &base_mesh -file_prefix='mesh_C12', +file_prefix='mesh_C12_MG', geometry='spherical', prepartitioned=.false., -prime_mesh_name='C12', +prime_mesh_name='dynamics', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final' +transport_overwrite_freq='final', / &checks limit_cfl=.false., @@ -70,6 +64,15 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / +&convection +dx_ref=50000.0, +l_cvdiag_ctop_qmax=.false., +qlmin=4.0e-4, +resdep_precipramp=.false., +/ +&cosp +l_cosp=.false., +/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -79,6 +82,7 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, +share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -96,7 +100,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', @@ -117,10 +121,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false. -horizontal_transport_predictor=.false. +horizontal_physics_predictor=.false., +horizontal_transport_predictor=.false., init_exner_bt=.true., -l_multigrid=.false., +l_multigrid=.true., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -130,27 +134,36 @@ shallow=.true., si_momentum_equation=.false., theta_moist_source=.false., use_multires_coupling=.false., -use_physics=.false., +use_physics=.true., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -fail_on_non_converged=.false., -gcrk=18, -method='bicgstab', -monitor_convergence=.true., +gcrk=8, +method='prec_only', +monitor_convergence=.false., normalise=.true., -preconditioner='tridiagonal', -si_pressure_a_tol=0, -si_pressure_maximum_iterations=40, -si_pressure_tolerance=1.0e-15, +preconditioner='multigrid', +si_pressure_a_tol=1.0e-8, +si_pressure_maximum_iterations=400, +si_pressure_tolerance=1.0e-4, +/ +&iau_addinf_io +/ +&iau_addinf_io +/ +&iau_ainc_io +/ +&iau_ainc_io +/ +&iau_bcorr_io +/ +&iau / &idealised f_lon_deg=0.0, -perturb_init=.false. -perturb_magnitude=0 -perturb_seed=0 -test='gravity_wave', +perturb_init=.false., +test='none', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -174,7 +187,6 @@ coarse_ozone_ancil=.false., init_option='analytic', lbc_option='none', ls_option='analytic', -model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., sea_ice_source='ancillary', @@ -185,10 +197,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.0, -r2=0.0, -x1=0.0, -x2=0.0, +r1=0.4, +r2=0.4, +x1=0.4, +x2=-0.4, y1=0.0, y2=0.0, z1=0.0, @@ -200,7 +212,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=120.0, +pert_centre=60.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -209,22 +221,25 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='none', +profile='constant_uv', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.false., -u0=0.0, +smp_init_wind=.true., +u0=2.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., +checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, +end_of_run_checkpoint=.true., file_convention='UGRID', +multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -237,26 +252,42 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true. +fixed_ls=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., -pert_option='analytic', +max_bl_stabilisation=0.75, +n_bl_levels_to_stabilise=15, +pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging +log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.false., -gcrk=10, +fail_on_non_converged=.true., +gcrk=4, guess_np1=.false., -mixed_solver_a_tol=1.0e-21, +mixed_solver_a_tol=1.0e-3, monitor_convergence=.true., normalise=.true., reference_reset_time=3600.0, -si_maximum_iterations=7, +si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-21, +si_tolerance=1.0e-1, split_w=.true., / &mixing @@ -265,6 +296,14 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / +&multigrid +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', +multigrid_chain_nitems=3, +n_coarsesmooth=4, +n_postsmooth=2, +n_presmooth=2, +smooth_relaxation=0.8, +/ &esm_couple l_esm_couple_test=.false., / @@ -272,15 +311,23 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning +generate_inner_halos=.false., panel_decomposition='auto', panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., +sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -292,10 +339,14 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_rad_opt='off', -cfc12_rad_opt='off', -ch4_rad_opt='off', -co2_rad_opt='off', +cfc11_mix_ratio=1.110e-09, +cfc11_rad_opt='constant', +cfc12_mix_ratio=2.187e-09, +cfc12_rad_opt='constant', +ch4_mix_ratio=1.006e-06, +ch4_rad_opt='constant', +co2_mix_ratio=6.002e-04, +co2_rad_opt='constant', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -308,24 +359,27 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_rad_opt='off', +n2o_mix_ratio=4.945e-07, +n2o_rad_opt='constant', na_rad_opt='off', nh3_rad_opt='off', -o2_rad_opt='off', -o3_rad_opt='off', +o2_mix_ratio=0.2314, +o2_rad_opt='constant', +o3_rad_opt='ancil', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver -fail_on_non_converged=.false., gcrk=18, -maximum_iterations=50, +maximum_iterations=7, method='chebyshev', monitor_convergence=.false., preconditioner='diagonal', -tolerance=1.0e-18, +tolerance=1.0e-6, +/ +&specified_surface / &time calendar='timestep', @@ -337,8 +391,8 @@ timestep_start='1', / ×tepping alpha=0.55, -dt=3600, -inner_iterations=2, +dt=1800, +inner_iterations=1, method='semi_implicit', outer_iterations=2, runge_kutta_method='forward_euler', @@ -349,10 +403,12 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_vhv_wind=.false. +adjust_tracer_equation=.false., +adjust_vhv_wind=.false., +ageofair_reset_level=10, broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.01, +cap_density_predictor=0.5, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -362,43 +418,45 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=2, -ffsl_outer_order=2, +ffsl_inner_order=0, +ffsl_outer_order=1, ffsl_splitting=5*1, -ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud', +ffsl_unity_3d=.false., +ffsl_vertical_order=2,2,1,2,2, +field_names='density','potential_temperature','wind','moisture', +'con_tracer', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, -log_space=5*.false., -max_vert_cfl_calc='uniform', +log_space=.true.,.true.,.false.,.false.,.false., +max_vert_cfl_calc='dep_point', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.false. -panel_edge_treatment='none' +panel_edge_high_order=.true., +panel_edge_treatment='none', profile_size=5, -reversible=5*.false., +reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', slice_order='parabola', +special_edges_monotone=5*1, splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', +transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*1, +vertical_monotone_order=5*3, vertical_sl_order='cubic', -wind_mono_top=.false. -wind_mono_top_depth=5 +wind_mono_top=.false., / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml b/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml index fade05b82..eaf53286a 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml @@ -47,7 +47,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -144,6 +144,11 @@ + + + + + @@ -234,6 +239,8 @@ + + @@ -280,6 +287,8 @@ + + @@ -396,7 +405,7 @@ - + @@ -421,6 +430,7 @@ + diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/mesh_C12.nc b/applications/jedi_lfric_tests/example_id_tlm_tests/mesh_C12.nc deleted file mode 100644 index f7ea6988e22a06194aac0d17b6e3be62cd539773..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85708 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 Rwf*lmDjqBQ-|O@_{yzW$Qgi?S diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml index f61e5aab0..3ea39dd10 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml @@ -1,30 +1,28 @@ &jedi_lfric_tests test_field='theta', / - -#### Configure JEDI-LFRIC - &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', -io_setup_increment=.true., +io_setup_increment=.false., io_time_step='P0DT1H0M0S', / &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s','land_fraction', / &jedi_increment inc_time='2018-04-14 21:00:00', -initialise_via_read=.true., +initialise_via_read=.false., variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', 'm_cl','m_r','m_s', / &jedi_linear_model +incremental_wind_interpolation=.false., nl_time_step='P0DT1H0M0S', / &jedi_pseudo_model @@ -33,21 +31,19 @@ number_of_steps=9, time_step='P0DT1H0M0S', / &jedi_lfric_settings +adjoint_test_tolerance=1.0e-3, forecast_length='P0DT6H0M0S', / - -#### Configure LFRic - &base_mesh -file_prefix='mesh_C12', +file_prefix='mesh_C12_MG', geometry='spherical', prepartitioned=.false., -prime_mesh_name='C12', +prime_mesh_name='dynamics', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final' +transport_overwrite_freq='final', / &checks limit_cfl=.false., @@ -69,6 +65,15 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / +&convection +dx_ref=50000.0, +l_cvdiag_ctop_qmax=.false., +qlmin=4.0e-4, +resdep_precipramp=.false., +/ +&cosp +l_cosp=.false., +/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -78,7 +83,7 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true. +share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -96,7 +101,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', @@ -117,10 +122,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false. -horizontal_transport_predictor=.false. +horizontal_physics_predictor=.false., +horizontal_transport_predictor=.false., init_exner_bt=.true., -l_multigrid=.false., +l_multigrid=.true., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -128,29 +133,38 @@ p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false. +theta_moist_source=.false., use_multires_coupling=.false., -use_physics=.false., +use_physics=.true., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -fail_on_non_converged=.false., -gcrk=18, -method='bicgstab', -monitor_convergence=.true., +gcrk=8, +method='prec_only', +monitor_convergence=.false., normalise=.true., -preconditioner='tridiagonal', -si_pressure_a_tol=0, -si_pressure_maximum_iterations=40, -si_pressure_tolerance=1.0e-15, +preconditioner='multigrid', +si_pressure_a_tol=1.0e-8, +si_pressure_maximum_iterations=400, +si_pressure_tolerance=1.0e-4, +/ +&iau_addinf_io +/ +&iau_addinf_io +/ +&iau_ainc_io +/ +&iau_ainc_io +/ +&iau_bcorr_io +/ +&iau / &idealised f_lon_deg=0.0, -perturb_init=.false. -perturb_magnitude=0 -perturb_seed=0 -test='gravity_wave', +perturb_init=.false., +test='none', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -174,7 +188,6 @@ coarse_ozone_ancil=.false., init_option='analytic', lbc_option='none', ls_option='analytic', -model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., sea_ice_source='ancillary', @@ -185,10 +198,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.0, -r2=0.0, -x1=0.0, -x2=0.0, +r1=0.4, +r2=0.4, +x1=0.4, +x2=-0.4, y1=0.0, y2=0.0, z1=0.0, @@ -200,7 +213,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=120.0, +pert_centre=60.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -209,22 +222,25 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='none', +profile='constant_uv', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.false., -u0=0.0, +smp_init_wind=.true., +u0=2.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., +checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, +end_of_run_checkpoint=.true., file_convention='UGRID', +multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -237,26 +253,42 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true. +fixed_ls=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., -pert_option='analytic', +max_bl_stabilisation=0.75, +n_bl_levels_to_stabilise=15, +pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging +log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.false., -gcrk=10, +fail_on_non_converged=.true., +gcrk=4, guess_np1=.false., mixed_solver_a_tol=1.0e-21, monitor_convergence=.true., normalise=.true., -reference_reset_time=3600.0, -si_maximum_iterations=7, +reference_reset_time=1800, +si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-21, +si_tolerance=1.0e-3, split_w=.true., / &mixing @@ -265,6 +297,14 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / +&multigrid +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', +multigrid_chain_nitems=3, +n_coarsesmooth=4, +n_postsmooth=2, +n_presmooth=2, +smooth_relaxation=0.8, +/ &esm_couple l_esm_couple_test=.false., / @@ -272,15 +312,23 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning +generate_inner_halos=.false., panel_decomposition='auto', panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., +sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -292,10 +340,14 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_rad_opt='off', -cfc12_rad_opt='off', -ch4_rad_opt='off', -co2_rad_opt='off', +cfc11_mix_ratio=1.110e-09, +cfc11_rad_opt='constant', +cfc12_mix_ratio=2.187e-09, +cfc12_rad_opt='constant', +ch4_mix_ratio=1.006e-06, +ch4_rad_opt='constant', +co2_mix_ratio=6.002e-04, +co2_rad_opt='constant', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -308,24 +360,27 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_rad_opt='off', +n2o_mix_ratio=4.945e-07, +n2o_rad_opt='constant', na_rad_opt='off', nh3_rad_opt='off', -o2_rad_opt='off', -o3_rad_opt='off', +o2_mix_ratio=0.2314, +o2_rad_opt='constant', +o3_rad_opt='ancil', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver -fail_on_non_converged=.false., gcrk=18, -maximum_iterations=50, +maximum_iterations=7, method='chebyshev', monitor_convergence=.false., preconditioner='diagonal', -tolerance=1.0e-18, +tolerance=1.0e-6, +/ +&specified_surface / &time calendar='timestep', @@ -337,10 +392,10 @@ timestep_start='1', / ×tepping alpha=0.55, -dt=3600, -inner_iterations=2, +dt=1800, +inner_iterations=1, method='semi_implicit', -outer_iterations=2, +outer_iterations=1, runge_kutta_method='forward_euler', spinup_alpha=.false., tau_r=1.0, @@ -349,10 +404,12 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_vhv_wind=.false. +adjust_tracer_equation=.false., +adjust_vhv_wind=.false., +ageofair_reset_level=10, broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.01, +cap_density_predictor=0.5, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -362,28 +419,29 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=2, -ffsl_outer_order=2, +ffsl_inner_order=0, +ffsl_outer_order=1, ffsl_splitting=5*1, -ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud', +ffsl_unity_3d=.false., +ffsl_vertical_order=2,2,1,2,2, +field_names='density','potential_temperature','wind','moisture', +'con_tracer', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, -log_space=5*.false., -max_vert_cfl_calc='uniform', +log_space=.true.,.true.,.false.,.false.,.false., +max_vert_cfl_calc='dep_point', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.false., -panel_edge_treatment='none' +panel_edge_high_order=.true., +panel_edge_treatment='none', profile_size=5, -reversible=5*.false., +reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', @@ -393,13 +451,13 @@ splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', +transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*1, +vertical_monotone_order=5*3, vertical_sl_order='cubic', -wind_mono_top=.false. -wind_mono_top_depth=5 +wind_mono_top=.false., / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml index 7b9d54bf3..862b1278c 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml @@ -345,6 +345,7 @@ tau_u=0.55, / &transport adjust_theta=.false., +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false., calculate_detj='upwind', diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml index fade05b82..af380004b 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml @@ -144,6 +144,11 @@ + + + + + @@ -234,6 +239,8 @@ + + @@ -280,6 +287,8 @@ + + @@ -421,6 +430,7 @@ + diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/mesh_C12.nc b/applications/jedi_lfric_tests/example_tlm_forecast_tl/mesh_C12.nc deleted file mode 100644 index f7ea6988e22a06194aac0d17b6e3be62cd539773..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85708 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 Rwf*lmDjqBQ-|O@_{yzW$Qgi?S diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml index 283c5dafb..da9b864b8 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml @@ -1,13 +1,10 @@ &jedi_lfric_tests test_field='theta', / - -#### Configure JEDI-LFRIC - &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', @@ -15,8 +12,8 @@ io_time_step='P0DT1H0M0S', &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s','land_fraction', / &jedi_increment inc_time='2018-04-14 21:00:00', @@ -25,7 +22,7 @@ variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', 'm_cl','m_r','m_s', / &jedi_linear_model -incremental_wind_interpolation=.true., +incremental_wind_interpolation=.false., nl_time_step='P0DT1H0M0S', / &jedi_pseudo_model @@ -34,21 +31,19 @@ number_of_steps=9, time_step='P0DT1H0M0S', / &jedi_lfric_settings +adjoint_test_tolerance=1.0e-2, forecast_length='P0DT6H0M0S', / - -#### Configure LFRic - &base_mesh -file_prefix='mesh_C12', +file_prefix='mesh_C12_MG', geometry='spherical', prepartitioned=.false., -prime_mesh_name='C12', +prime_mesh_name='dynamics', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final' +transport_overwrite_freq='final', / &checks limit_cfl=.false., @@ -70,6 +65,15 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / +&convection +dx_ref=50000.0, +l_cvdiag_ctop_qmax=.false., +qlmin=4.0e-4, +resdep_precipramp=.false., +/ +&cosp +l_cosp=.false., +/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -79,7 +83,7 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true. +share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -97,7 +101,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', @@ -118,10 +122,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false. -horizontal_transport_predictor=.false. +horizontal_physics_predictor=.false., +horizontal_transport_predictor=.false., init_exner_bt=.true., -l_multigrid=.false., +l_multigrid=.true., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -129,29 +133,38 @@ p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false. +theta_moist_source=.false., use_multires_coupling=.false., -use_physics=.false., +use_physics=.true., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -fail_on_non_converged=.false., -gcrk=18, -method='bicgstab', -monitor_convergence=.true., +gcrk=8, +method='prec_only', +monitor_convergence=.false., normalise=.true., -preconditioner='tridiagonal', -si_pressure_a_tol=0, -si_pressure_maximum_iterations=40, -si_pressure_tolerance=1.0e-15, +preconditioner='multigrid', +si_pressure_a_tol=1.0e-8, +si_pressure_maximum_iterations=400, +si_pressure_tolerance=1.0e-4, +/ +&iau_addinf_io +/ +&iau_addinf_io +/ +&iau_ainc_io +/ +&iau_ainc_io +/ +&iau_bcorr_io +/ +&iau / &idealised f_lon_deg=0.0, -perturb_init=.false. -perturb_magnitude=0 -perturb_seed=0 -test='gravity_wave', +perturb_init=.false., +test='none', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -175,7 +188,6 @@ coarse_ozone_ancil=.false., init_option='analytic', lbc_option='none', ls_option='analytic', -model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., sea_ice_source='ancillary', @@ -186,10 +198,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.0, -r2=0.0, -x1=0.0, -x2=0.0, +r1=0.4, +r2=0.4, +x1=0.4, +x2=-0.4, y1=0.0, y2=0.0, z1=0.0, @@ -201,7 +213,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=120.0, +pert_centre=60.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -210,22 +222,25 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='none', +profile='constant_uv', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.false., -u0=0.0, +smp_init_wind=.true., +u0=2.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., +checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, +end_of_run_checkpoint=.true., file_convention='UGRID', +multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -238,26 +253,42 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true. +fixed_ls=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., -pert_option='analytic', +max_bl_stabilisation=0.75, +n_bl_levels_to_stabilise=15, +pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging +log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.false., -gcrk=10, +fail_on_non_converged=.true., +gcrk=4, guess_np1=.false., mixed_solver_a_tol=1.0e-21, monitor_convergence=.true., normalise=.true., -reference_reset_time=3600.0, -si_maximum_iterations=7, +reference_reset_time=1800, +si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-21, +si_tolerance=1.0e-3, split_w=.true., / &mixing @@ -266,6 +297,14 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / +&multigrid +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', +multigrid_chain_nitems=3, +n_coarsesmooth=4, +n_postsmooth=2, +n_presmooth=2, +smooth_relaxation=0.8, +/ &esm_couple l_esm_couple_test=.false., / @@ -273,15 +312,23 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning +generate_inner_halos=.false., panel_decomposition='auto', panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., +sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -293,10 +340,14 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_rad_opt='off', -cfc12_rad_opt='off', -ch4_rad_opt='off', -co2_rad_opt='off', +cfc11_mix_ratio=1.110e-09, +cfc11_rad_opt='constant', +cfc12_mix_ratio=2.187e-09, +cfc12_rad_opt='constant', +ch4_mix_ratio=1.006e-06, +ch4_rad_opt='constant', +co2_mix_ratio=6.002e-04, +co2_rad_opt='constant', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -309,24 +360,27 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_rad_opt='off', +n2o_mix_ratio=4.945e-07, +n2o_rad_opt='constant', na_rad_opt='off', nh3_rad_opt='off', -o2_rad_opt='off', -o3_rad_opt='off', +o2_mix_ratio=0.2314, +o2_rad_opt='constant', +o3_rad_opt='ancil', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver -fail_on_non_converged=.false., gcrk=18, -maximum_iterations=50, +maximum_iterations=7, method='chebyshev', monitor_convergence=.false., preconditioner='diagonal', -tolerance=1.0e-18, +tolerance=1.0e-6, +/ +&specified_surface / &time calendar='timestep', @@ -338,10 +392,10 @@ timestep_start='1', / ×tepping alpha=0.55, -dt=3600, -inner_iterations=2, +dt=1800, +inner_iterations=1, method='semi_implicit', -outer_iterations=2, +outer_iterations=1, runge_kutta_method='forward_euler', spinup_alpha=.false., tau_r=1.0, @@ -350,10 +404,12 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_vhv_wind=.false. +adjust_tracer_equation=.false., +adjust_vhv_wind=.false., +ageofair_reset_level=10, broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.01, +cap_density_predictor=0.5, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -363,28 +419,29 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=2, -ffsl_outer_order=2, +ffsl_inner_order=0, +ffsl_outer_order=1, ffsl_splitting=5*1, -ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud', +ffsl_unity_3d=.false., +ffsl_vertical_order=2,2,1,2,2, +field_names='density','potential_temperature','wind','moisture', +'con_tracer', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, -log_space=5*.false., -max_vert_cfl_calc='uniform', +log_space=.true.,.true.,.false.,.false.,.false., +max_vert_cfl_calc='dep_point', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.false., -panel_edge_treatment='none' +panel_edge_high_order=.true., +panel_edge_treatment='none', profile_size=5, -reversible=5*.false., +reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', @@ -394,13 +451,13 @@ splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', +transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*1, +vertical_monotone_order=5*3, vertical_sl_order='cubic', -wind_mono_top=.false. -wind_mono_top_depth=5 +wind_mono_top=.false., / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml deleted file mode 100644 index c9b945825..000000000 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml +++ /dev/null @@ -1,404 +0,0 @@ -&jedi_lfric_tests -test_field='theta', -/ - -#### Configure JEDI-LFRIC - -&jedi_geometry -io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', -io_path_state_write='write_file', -io_setup_increment=.false., -io_time_step='P0DT1H0M0S', -/ -&jedi_state -state_time='2018-04-14 21:00:00', -use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', -/ -&jedi_increment -inc_time='2018-04-14 21:00:00', -initialise_via_read=.false., -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', -'m_cl','m_r','m_s', -/ -&jedi_linear_model -incremental_wind_interpolation=.true., -nl_time_step='P0DT1H0M0S', -/ -&jedi_pseudo_model -initial_time='2018-04-14T21:00:00', -number_of_steps=9, -time_step='P0DT1H0M0S', -/ -&jedi_lfric_settings -forecast_length='P0DT6H0M0S', -/ - -#### Configure LFRic - -&base_mesh -file_prefix='mesh_C12', -geometry='spherical', -prepartitioned=.false., -prime_mesh_name='C12', -topology='fully_periodic', -/ -&boundaries -limited_area=.false., -transport_overwrite_freq='final' -/ -&checks -limit_cfl=.false., -/ -§ion_choice -aerosol='none', -boundary_layer='none', -chemistry='none', -cloud='none', -dynamics='gungho', -external_forcing=.false., -iau=.false., -iau_sst=.false., -iau_surf=.false., -methane_oxidation=.false., -orographic_drag='none', -radiation='none', -spectral_gwd='none', -stochastic_physics='none', -surface='none', -/ -&damping_layer -dl_base=40000.0, -dl_str=0.05, -dl_type='standard', -/ -&departure_points -horizontal_limit='cap', -horizontal_method='ffsl', -n_dep_pt_iterations=1, -vertical_limit='exponential', -vertical_method='timeaverage', -vertical_sorting=.false., -/ -&energy_correction -encorr_usage='none', -integral_method='fd', -/ -&extrusion -domain_height=80000.0, -method='um_L70_50t_20s_80km', -number_of_layers=70, -planet_radius=6371229.0, -stretching_height=17507.0, -stretching_method='smooth', -/ -&files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', -checkpoint_stem_name='', -diag_stem_name='', -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', -start_dump_directory='', -start_dump_filename='', -/ -&finite_element -cellshape='quadrilateral', -coord_order=1, -coord_system='native', -element_order_h=0, -element_order_v=0, -rehabilitate=.true., -vorticity_in_w1=.false., -/ -&formulation -dlayer_on=.true., -dry_static_adjust=.true., -eos_method='sampled', -exner_from_eos=.false., -horizontal_physics_predictor=.false. -horizontal_transport_predictor=.false. -init_exner_bt=.true., -l_multigrid=.false., -lagged_orog=.true., -moisture_formulation='dry', -moisture_in_solver=.false., -p2theta_vert=.true., -rotating=.true., -shallow=.true., -si_momentum_equation=.false., -use_multires_coupling=.false., -use_physics=.false., -use_wavedynamics=.true., -vector_invariant=.false., -/ -&helmholtz_solver -fail_on_non_converged=.false., -gcrk=18, -method='bicgstab', -monitor_convergence=.true., -normalise=.true., -preconditioner='tridiagonal', -si_pressure_a_tol=0, -si_pressure_maximum_iterations=40, -si_pressure_tolerance=1.0e-15, -/ -&idealised -f_lon_deg=0.0, -perturb_init=.false. -perturb_magnitude=0 -perturb_seed=0 -test='gravity_wave', -/ -&ideal_surface -canopy_height=19.01,16.38,0.79,1.26,1.0, -leaf_area_index=5.0,4.0,1.5,1.5,1.5, -n_snow_layers=11*0, -snow_depth=11*0.0, -snow_layer_ice_mass=27*0.0, -snow_layer_temp=27*273.0, -snow_layer_thickness=27*0.0, -soil_moisture=15.86,98.861,274.35,862.27, -soil_temperature=284.508,286.537,289.512,293.066, -surf_tile_fracs=9*0.0,1.0,0.0, -surf_tile_temps=9*295.0,300.0,265.0, -tile_snow_mass=11*0.0, -/ -&initialization -ancil_option='none', -coarse_aerosol_ancil=.false., -coarse_orography_ancil=.false., -coarse_ozone_ancil=.false., -init_option='analytic', -lbc_option='none', -ls_option='analytic', -model_eos_height=100, -n_orog_smooth=0, -read_w2h_wind=.true., -sea_ice_source='ancillary', -snow_source='start_dump', -w0_orography_mapping=.false., -zero_w2v_wind=.false., -/ -&initial_density -density_background=0.1, -density_max=2.0, -r1=0.0, -r2=0.0, -x1=0.0, -x2=0.0, -y1=0.0, -y2=0.0, -z1=0.0, -z2=0.0, -/ -&initial_pressure -method='balanced', -surface_pressure=1000.0e2, -/ -&initial_temperature -bvf_square=0.0001, -pert_centre=120.0, -pert_width_scaling=1.0, -perturb='none', -theta_surf=300.0, -/ -&initial_vapour -/ -&initial_wind -nl_constant=0.0, -profile='none', -sbr_angle_lat=0.0, -sbr_angle_lon=0.0, -smp_init_wind=.false., -u0=0.0, -v0=0.0, -wind_time_period=0.0, -/ -&io -checkpoint_read=.false., -checkpoint_write=.false., -counter_output_suffix='counter.txt', -diag_active_files='lfric_diag', -diag_always_on_sampling=.false., -diagnostic_frequency=8, -file_convention='UGRID', -nodal_output_on_w3=.false., -subroutine_counters=.false., -subroutine_timers=.true., -timer_output_path='timer.txt', -use_xios_io=.true., -write_conservation_diag=.false., -write_diag=.true., -write_dump=.false., -write_fluxes=.false., -write_minmax_tseries=.false., -/ -&linear -fixed_ls=.true. -ls_read_w2h=.false., -pert_option='analytic', -/ -&logging -run_log_level='info', -/ -&mixed_solver -eliminate_variables='discrete', -fail_on_non_converged=.false., -gcrk=10, -guess_np1=.false., -mixed_solver_a_tol=1.0e-21, -monitor_convergence=.true., -normalise=.true., -reference_reset_time=3600.0, -si_maximum_iterations=7, -si_method='block_gcr', -si_preconditioner='pressure', -si_tolerance=1.0e-21, -split_w=.true., -/ -&mixing -leonard_term=.false., -smagorinsky=.false., -viscosity=.false., -viscosity_mu=0.0, -/ -&esm_couple -l_esm_couple_test=.false., -/ -&orography -orog_init_option='ancil', -/ -&partitioning -panel_decomposition='auto', -panel_xproc=1, -panel_yproc=1, -partitioner='cubedsphere', -/ -&physics -limit_drag_incs=.false., -sample_physics_scalars=.true., -sample_physics_winds=.true., -/ -&planet -cp=1005.0, -gravity=9.80665, -omega=7.292116E-5, -p_zero=100000.0, -rd=287.05, -scaling_factor=1.0, -/ -&radiative_gases -cfc113_rad_opt='off', -cfc11_rad_opt='off', -cfc12_rad_opt='off', -ch4_rad_opt='off', -co2_rad_opt='off', -co_rad_opt='off', -cs_rad_opt='off', -h2_rad_opt='off', -h2o_rad_opt='prognostic', -hcfc22_rad_opt='off', -hcn_rad_opt='off', -he_rad_opt='off', -hfc134a_rad_opt='off', -k_rad_opt='off', -l_cts_fcg_rates=.false., -li_rad_opt='off', -n2_rad_opt='off', -n2o_rad_opt='off', -na_rad_opt='off', -nh3_rad_opt='off', -o2_rad_opt='off', -o3_rad_opt='off', -rb_rad_opt='off', -so2_rad_opt='off', -tio_rad_opt='off', -vo_rad_opt='off', -/ -&solver -fail_on_non_converged=.false., -gcrk=18, -maximum_iterations=50, -method='chebyshev', -monitor_convergence=.false., -preconditioner='diagonal', -tolerance=1.0e-18, -/ -&time -calendar='timestep', -calendar_origin='2018-04-14 21:00:00', -calendar_start='2018-04-14 21:00:00', -calendar_type='gregorian', -timestep_end='13', -timestep_start='1', -/ -×tepping -alpha=0.55, -dt=3600, -inner_iterations=2, -method='semi_implicit', -outer_iterations=2, -runge_kutta_method='forward_euler', -spinup_alpha=.false., -tau_r=1.0, -tau_t=1.0, -tau_u=0.55, -/ -&transport -adjust_theta=.false., -adjust_vhv_wind=.false. -broken_w2_projection=.false., -calculate_detj='upwind', -cap_density_predictor=0.01, -cfl_mol_1d_stab=1.0, -cfl_mol_2d_stab=1.0, -cfl_mol_3d_stab=1.0, -cheap_update=.false., -consistent_metric=.false., -dep_pt_stencil_extent=3, -dry_field_name='density', -enforce_min_value=5*.false., -equation_form=1,2,2,2,2, -extended_mesh=.false., -ffsl_inner_order=2, -ffsl_outer_order=2, -ffsl_splitting=5*1, -ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud', -fv_horizontal_order=2, -fv_vertical_order=2, -horizontal_method=5*1, -horizontal_monotone=5*1, -log_space=5*.false., -max_vert_cfl_calc='uniform', -min_val_abs_tol=-1.0e-12, -min_val_max_iterations=10, -min_val_method='iterative', -min_value=0.0,0.0,-99999999.0,0.0,0.0, -oned_reconstruction=.false., -operators='fv', -profile_size=5, -reversible=5*.false., -runge_kutta_method='ssp3', -scheme=5*1, -si_outer_transport='none', -slice_order='parabola', -splitting=5*1, -substep_transport='off', -theta_dispersion_correction=.false., -theta_variable='dry', -use_density_predictor=.false., -vertical_method=5*1, -vertical_monotone=5*1, -vertical_monotone_order=5*1, -vertical_sl_order='cubic', -wind_mono_top=.false. -wind_mono_top_depth=5 -/ -&validity_test -number_gamma_values=2, -update_ls_frequency=1, -/ diff --git a/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml b/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml index fade05b82..eaf53286a 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml +++ b/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml @@ -47,7 +47,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -144,6 +144,11 @@ + + + + + @@ -234,6 +239,8 @@ + + @@ -280,6 +287,8 @@ + + @@ -396,7 +405,7 @@ - + @@ -421,6 +430,7 @@ + diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 index 0be6d7cd1..b25e8123e 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 @@ -71,7 +71,7 @@ program algorithm_test logical(l_def) :: apply_partition_check integer(i_def) :: geometry - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) integer(i_def) :: method integer(i_def) :: number_of_layers real(r_def) :: domain_bottom diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf index 683dc9533..57cab669b 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf @@ -52,6 +52,14 @@ help=Configuration option for JEDI-LFRIC emulator. ns=namelist/JEDI-LFRIC-setup title=JEDI-LFRIC Setings +[namelist:jedi_lfric_settings=adjoint_test_tolerance] +compulsory=false +description=Tolerance for inner product adjoint tests in jedi_tlm_tests +help=Set as appropriate based on configuration +!kind=default +sort-key= +type=real + [namelist:jedi_lfric_settings=forecast_length] compulsory=true description=The forecast duration diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py index 8418438c1..f1f0c6481 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py @@ -21,13 +21,10 @@ def __repr__(self): """ Copy this template and complete to add your macro - class vnXX_txxx(MacroUpgrade): # Upgrade macro for by - BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" - def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -44,7 +41,6 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports @@ -124,5 +120,139 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py index 8418438c1..8c1c7b597 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py @@ -126,3 +126,140 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py index 8418438c1..8c1c7b597 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py @@ -126,3 +126,140 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py index 8418438c1..8c1c7b597 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py @@ -126,3 +126,140 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py index 8418438c1..8c1c7b597 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py @@ -126,3 +126,140 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py index 8418438c1..8c1c7b597 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py @@ -126,3 +126,140 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf index 57a38b5b9..7f4050279 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf @@ -1,8 +1,5 @@ import=jedi_common/HEAD -#============================================================================== -# Increment for the JEDI-LFRIC Emulator -#============================================================================== [namelist:jedi_increment] compulsory=true description=JEDI-LFRIC emulator increment configuration diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py index 8418438c1..8c1c7b597 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py @@ -126,3 +126,140 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 index 4cf75379e..2cc8af089 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 @@ -34,6 +34,7 @@ module jedi_id_linear_model_mod use jedi_base_linear_model_mod, only : jedi_base_linear_model_type use jedi_lfric_duration_mod, only : jedi_duration_type use jedi_lfric_linear_fields_mod, only : variable_names, & + ls_variable_names, & create_linear_fields use jedi_lfric_wind_fields_mod, only : create_scalar_winds, & setup_vector_wind @@ -184,10 +185,10 @@ subroutine set_trajectory( self, jedi_state ) ! Create field collection that contains the linear state fields ! without "ls_" prepended. - call create_linear_fields(jedi_state%geometry%get_mesh(), next_linear_state) + call create_linear_fields(jedi_state%geometry%get_mesh(), jedi_state%geometry%get_twod_mesh(), next_linear_state) ! Copy data from the input state into next_linear_state - call jedi_state%get_to_field_collection( variable_names, & + call jedi_state%get_to_field_collection( ls_variable_names, & next_linear_state ) ! Create W2 wind, interpolate from scaler winds (W3/Wtheta) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 index 6be770327..797201121 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 @@ -39,6 +39,7 @@ module jedi_linear_model_mod zero_moist_fields use jedi_lfric_duration_mod, only : jedi_duration_type use jedi_lfric_linear_fields_mod, only : variable_names, & + ls_variable_names, & create_linear_fields use jedi_lfric_wind_fields_mod, only : create_scalar_winds, & setup_vector_wind @@ -182,10 +183,10 @@ subroutine set_trajectory( self, jedi_state ) ! Create field collection that contains the linear state fields ! without "ls_" prepended. - call create_linear_fields(jedi_state%geometry%get_mesh(), next_linear_state) + call create_linear_fields(jedi_state%geometry%get_mesh(), jedi_state%geometry%get_twod_mesh(), next_linear_state) ! Copy data from the input state into next_linear_state - call jedi_state%get_to_field_collection( variable_names, & + call jedi_state%get_to_field_collection( ls_variable_names, & next_linear_state ) ! Create W2 wind, interpolate from scaler winds (W3/Wtheta) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 index c8d0c0f0a..34dd084dc 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 @@ -108,6 +108,9 @@ subroutine get_field_info(function_space, is_2d, variable_name) case ( "u10m" ) function_space = W3 is_2d = .true. + case ( "land_fraction" ) + function_space = W3 + is_2d = .true. case default write ( log_scratch_space, '(4A)' ) & "jedi_setup_field_meta_data_mod::get_field_info:: ", & diff --git a/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 index adfa8a2b3..b72380ea3 100644 --- a/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 @@ -198,10 +198,10 @@ program jedi_id_tlm_tests ! Apply the Adjoint dot product test: == ! Evaluate dot product of increments I11 and I21 - dot_product_1 = increment_11%dot_product_with(increment_21) + dot_product_1 = real(increment_11%dot_product_with(increment_21), r_def) ! Evaluate dot product of increments I12 and I22 - dot_product_2 = increment_12%dot_product_with(increment_22) + dot_product_2 = real(increment_12%dot_product_with(increment_22), r_def) ! == ! The two dot products should be nearly identical. The tolerance is diff --git a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 index bfff68a72..7a1580685 100644 --- a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 @@ -36,7 +36,8 @@ 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 constants_mod, only : PRECISION_REAL, i_def, str_def, & + r_def, l_def use field_collection_mod, only : field_collection_type use log_mod, only : log_event, log_scratch_space, & LOG_LEVEL_ALWAYS, LOG_LEVEL_ERROR, & @@ -73,10 +74,12 @@ program jedi_tlm_tests integer( kind=i_def ) :: model_communicator type( jedi_duration_type ) :: forecast_length type( namelist_type ), pointer :: jedi_lfric_settings_config + type( namelist_type ), pointer :: jedi_increment_config + logical( kind=l_def ) :: real_increment character( str_def ) :: forecast_length_str real( kind=r_def ) :: dot_product_1 real( kind=r_def ) :: dot_product_2 - real( kind=r_def ), parameter :: absolute_tolerance = 1.0E-4_r_def + real( kind=r_def ) :: absolute_tolerance real( kind=r_def ) :: machine_tolerance real( kind=r_def ) :: absolute_diff real( kind=r_def ) :: relative_diff @@ -113,6 +116,12 @@ program jedi_tlm_tests ! Create geometry call geometry%initialise( model_communicator, configuration, config ) + ! Create inc_initial, either from file or random + call inc_initial%initialise( geometry, configuration ) + jedi_increment_config => configuration%get_namelist('jedi_increment') + call jedi_increment_config%get_value( 'initialise_via_read', real_increment ) + if (.not. real_increment) call inc_initial%random() + ! Create state call state%initialise( geometry, configuration ) @@ -130,10 +139,6 @@ program jedi_tlm_tests ! ---- Perform the adjoint test - ! Create inc_initial and randomise - call inc_initial%initialise( geometry, configuration ) - call inc_initial%random() - ! Check the norm is not zero if (inc_initial%norm() <= 0.0_r_def) then call log_event("inc_initial norm not > 0.0", LOG_LEVEL_ERROR) @@ -151,7 +156,7 @@ program jedi_tlm_tests end if ! Compute - dot_product_1 = inc%scaled_dot_product_with_itself() + dot_product_1 = real(inc%scaled_dot_product_with_itself(), r_def) ! Propagate via AD model call linear_model%forecastAD( inc, forecast_length ) @@ -161,13 +166,14 @@ program jedi_tlm_tests end if ! Compute - dot_product_2 = inc%dot_product_with(inc_initial) + dot_product_2 = real(inc%dot_product_with(inc_initial), r_def) ! The two dot products should be nearly identical. The tolerance is included ! due to differences in order of operations and solver non-convergence. absolute_diff = abs( dot_product_1 - dot_product_2 ) machine_tolerance = spacing( max( abs( dot_product_1 ), abs( dot_product_2 ) ) ) relative_diff = absolute_diff / machine_tolerance + call jedi_lfric_settings_config%get_value( 'adjoint_test_tolerance', absolute_tolerance ) if (absolute_diff > absolute_tolerance ) then call run%finalise_timers() ! We still want timing info even if the test fails write( log_scratch_space, * ) "Adjoint test FAILED", & diff --git a/applications/jules/build/compile_options.mk b/applications/jules/build/compile_options.mk index bf4bad539..3ab2dcbf3 100644 --- a/applications/jules/build/compile_options.mk +++ b/applications/jules/build/compile_options.mk @@ -13,7 +13,8 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/jules/build/psyclone_transmute_file_list.mk b/applications/jules/build/psyclone_transmute_file_list.mk index dc6e63654..61fa12ff2 100644 --- a/applications/jules/build/psyclone_transmute_file_list.mk +++ b/applications/jules/build/psyclone_transmute_file_list.mk @@ -18,6 +18,11 @@ export PSYCLONE_PHYSICS_FILES = ##### TRANSMUTE_INCLUDE_METHOD specify_include ##### +# List to use PSyclone explicitly without any opt script +# This will remove hand written (OMP) directives in the source +# Used by both methods, specify_include and specify_exclude +export PSYCLONE_PASS_NO_SCRIPT = + ##### TRANSMUTE_INCLUDE_METHOD specify_exclude ##### # For GPU, we may want to use more generic local.py transformation scripts and psyclone by directory. # Advise which directories to pass to PSyclone. diff --git a/applications/jules/example/configuration.nml b/applications/jules/example/configuration.nml index 203e8892d..5000fe6ad 100644 --- a/applications/jules/example/configuration.nml +++ b/applications/jules/example/configuration.nml @@ -475,6 +475,7 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, +adjust_tracer_equation=.false. adjust_vhv_wind=.true., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jules/rose-meta/lfric-jules/versions.py b/applications/jules/rose-meta/lfric-jules/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/jules/rose-meta/lfric-jules/versions.py +++ b/applications/jules/rose-meta/lfric-jules/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/lfric2lfric/example/configuration.nml b/applications/lfric2lfric/example/configuration.nml index b70cd2d22..ea19ff585 100644 --- a/applications/lfric2lfric/example/configuration.nml +++ b/applications/lfric2lfric/example/configuration.nml @@ -5,6 +5,7 @@ destination_geometry = 'spherical', destination_mesh_name = 'dynamics', destination_meshfile_prefix = 'mesh_C24_MG', destination_topology = 'fully_periodic', +mode = 'ics', origin_domain = 'global', prepartitioned_meshes = .false., regrid_method = 'oasis', diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf index 9b114f748..dbe84fe41 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf @@ -32,6 +32,7 @@ fail-if=this == namelist:lfric2lfric=source_mesh_name ; help=Mesh topologies are held in UGRID conformant NetCDF files which =may contain more than one mesh topology. This tag-name identifies =the mesh topology to use from the mesh file namelist:lfric2lfric=destination_meshfile_prefix. +ns=namelist/lfric2lfric/configuration !string_length=default type=character @@ -41,6 +42,7 @@ description=Location of destination 2D mesh input file(s) (prefix). help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should =be conformant to UGRID convention. = +ns=namelist/lfric2lfric/configuration !string_length=filename type=character @@ -78,6 +80,20 @@ ns=namelist/lfric2lfric/configuration !string_length=filename type=character +[namelist:lfric2lfric=mode] +compulsory=true +description=Generate Initial Conditions (ics) or Lateral Boundary Conditions (lbc) +!enumeration=true +help=Indicates whether to generate data on the destination mesh from data + =on the source mesh (ics), or whether to generate lateral boundary + =conditions for a regional destination mesh from data on the source + =mesh (lbc). +ns=namelist/lfric2lfric/configuration +trigger=namelist:lfric2lfric=source_file_lbc: 'lbc' ; + =namelist:lfric2lfric=weight_file_lbc: 'lbc' ; +value-titles=Initial conditions,Boundary conditions +values='ics','lbc' + [namelist:lfric2lfric=origin_domain] compulsory=true description=The domain that will be the source of the values to be regridded. @@ -85,6 +101,7 @@ description=The domain that will be the source of the values to be regridded. help=The LAM domain can only be used as an origin domain when regridding =to another LAM mesh, lfric2lfric does not support LAM-to-global or =LAM-to-LBC regridding. +ns=namelist/lfric2lfric/configuration sort-key=1 value-titles=global, LAM values='global', 'LAM' @@ -106,6 +123,7 @@ help=Input mesh files may contain global meshes whose extents are intended to co =Note: With increasing mesh size, at some point prepartitioned meshes may become = necessary. = +ns=namelist/lfric2lfric/configuration trigger=namelist:partitioning: .false. ; type=logical @@ -132,13 +150,24 @@ help=Method used to regrid between the source and destination mesh, = 'Oasis' : The regridding between the source and destination = grids is make through the weigh files generated = by an external tool, applied by the OASIS - = library. + = library. The weight file is specified in the + = OASIS namcouple file = ns=namelist/lfric2lfric/configuration trigger=namelist:lfric2lfric=weight_file: 'lfric2lfric' ; + =namelist:lfric2lfric=weight_file_lbc: 'lfric2lfric' ; value-titles=Inter-grid maps, LFRic2LFRic, Oasis values='map','lfric2lfric','oasis' +[namelist:lfric2lfric=source_file_lbc] +compulsory=true +description=Location of the lbc source file +help=File from where lateral boundary conditions will be generated + = +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + [namelist:lfric2lfric=source_geometry] compulsory=true description=The geometry on which the source domain is embedded @@ -158,6 +187,7 @@ fail-if=this == namelist:lfric2lfric=destination_mesh_name ; help=Mesh topologies are held in UGRID conformant NetCDF files which =may contain more than one mesh topology. This tag-name identifies =the mesh topology to use from the mesh file namelist:lfric2lfric=source_meshfile_prefix. +ns=namelist/lfric2lfric/configuration !string_length=default type=character @@ -168,6 +198,7 @@ fail-if=namelist:lfric2lfric=regrid_method == "'map'" and this != namelist:lfric help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should =be conformant to UGRID convention. = +ns=namelist/lfric2lfric/configuration !string_length=filename type=character @@ -218,16 +249,29 @@ help=Target domains currently not supported include: = LAM => LBC = LAM => global = +ns=namelist/lfric2lfric/configuration sort-key=2 value-titles=global, LAM, LBC values='global', 'LAM', 'LBC' [namelist:lfric2lfric=weight_file] compulsory=true -description=Weight file for mesh regridding +description=Weight file for ics mesh regridding +fail-if=this == '' ; +help=Location of the weight file used to interpolate + =between the source and destination meshes + =when creating checkpoint files +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:lfric2lfric=weight_file_lbc] +compulsory=true +description=Weight file for lbc mesh regridding fail-if=this == '' ; help=Location of the weight file used to interpolate =between the source and destination meshes + =when creating lateral boundary files ns=namelist/lfric2lfric/configuration !string_length=filename type=character diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 8418438c1..85f9ad8cf 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -21,13 +21,10 @@ def __repr__(self): """ Copy this template and complete to add your macro - class vnXX_txxx(MacroUpgrade): # Upgrade macro for by - BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" - def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -44,7 +41,6 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports @@ -124,5 +120,70 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t48(MacroUpgrade): + """Upgrade macro for ticket #48 by Juan M Castillo.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t48" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric2lfric + self.add_setting(config, ["namelist:lfric2lfric", "mode"], "'ics'") + self.add_setting( + config, + ["namelist:lfric2lfric", "source_file_lbc"], + "'source_file_lbc'", + ) + self.add_setting( + config, + ["namelist:lfric2lfric", "weight_file_lbc"], + "'weight_file_lbc'", + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t48" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) return config, self.reports diff --git a/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 b/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 index 12fcaf4d6..18e87d041 100644 --- a/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 +++ b/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 @@ -32,6 +32,7 @@ module lfric2lfric_oasis_regrid_mod use constants_mod, only: i_def, r_def, l_def use fs_continuity_mod, only: W3, Wtheta use driver_modeldb_mod, only: modeldb_type + use model_clock_mod, only: model_clock_type #ifdef MCT use coupling_mod, only: coupling_type, & get_coupling_from_collection @@ -60,16 +61,18 @@ contains !> @brief Perform regridding of a field collection using weight files !> and OASIS !> @param[inout] modeldb The structure that holds model state + !> @param[inout] clock Clock for oasis time !> @param[out] field_dst Field in the destination mesh obtained !> after regridding the field in the !> source mesh !> @param[in] field_src Field in the source mesh - subroutine lfric2lfric_oasis_regrid(modeldb, field_dst, field_src) + subroutine lfric2lfric_oasis_regrid(modeldb, clock, field_dst, field_src) implicit none type(modeldb_type), intent(inout) :: modeldb + type(model_clock_type), intent(inout) :: clock type(field_type), pointer, intent(inout) :: field_dst type(field_type), pointer, intent(in) :: field_src @@ -124,7 +127,7 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(src_field, local_index) - call coupler_exchange_2d%set_time(modeldb%clock) + call coupler_exchange_2d%set_time(clock) call coupler_exchange_2d%copy_from_lfric(ierror) call coupler_exchange_2d%clear() @@ -133,7 +136,7 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling_dst" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(dst_field, local_index) - call coupler_exchange_2d%set_time(modeldb%clock) + call coupler_exchange_2d%set_time(clock) call coupler_exchange_2d%copy_to_lfric(ierror) call coupler_exchange_2d%clear() @@ -143,7 +146,7 @@ contains dst_field, l, k)) ! Update the coupling time - is_running = modeldb%clock%tick() + is_running = clock%tick() end do end do diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 b/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 index c38f37b34..e02dd5580 100644 --- a/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 +++ b/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 @@ -7,40 +7,35 @@ !> module lfric2lfric_driver_mod - use constants_mod, only: str_def, i_def, l_def, r_second - use driver_fem_mod, only: final_fem - use driver_io_mod, only: final_io - use driver_modeldb_mod, only: modeldb_type - use field_collection_iterator_mod, only: & - field_collection_iterator_type - use field_collection_mod, only: field_collection_type - use field_mod, only: field_type - use field_parent_mod, only: field_parent_type - use function_space_mod, only: function_space_type - use lfric_xios_context_mod, only: lfric_xios_context_type - use lfric_xios_read_mod, only: read_checkpoint - use lfric_xios_write_mod, only: write_checkpoint - use log_mod, only: log_event, & - log_level_info, & - log_scratch_space - use mesh_collection_mod, only: mesh_collection - use mesh_mod, only: mesh_type - use namelist_mod, only: namelist_type - use sci_checksum_alg_mod, only: checksum_alg + use constants_mod, only: str_def, i_def, l_def, r_second + use driver_fem_mod, only: final_fem + use driver_io_mod, only: final_io + use driver_modeldb_mod, only: modeldb_type + use field_collection_mod, only: field_collection_type + use lfric_xios_action_mod, only: advance + use lfric_xios_context_mod, only: lfric_xios_context_type + use lfric_xios_read_mod, only: read_checkpoint, & + read_state + use lfric_xios_write_mod, only: write_checkpoint, & + write_state + use log_mod, only: log_scratch_space, & + log_event, & + log_level_info + use model_clock_mod, only: model_clock_type + use namelist_mod, only: namelist_type + use sci_checksum_alg_mod, only: checksum_alg + use xios, only: xios_date, xios_get_current_date, & + xios_date_convert_to_string !------------------------------------ ! lfric2lfric modules !------------------------------------ - use lfric2lfric_config_mod, only: regrid_method_map, & - regrid_method_lfric2lfric, & - regrid_method_oasis + use lfric2lfric_config_mod, only: mode_ics, mode_lbc use lfric2lfric_infrastructure_mod, only: initialise_infrastructure, & context_dst, context_src, & source_collection_name, & target_collection_name - use lfric2lfric_map_regrid_mod, only: lfric2lfric_map_regrid - use lfric2lfric_no_regrid_mod, only: lfric2lfric_no_regrid - use lfric2lfric_oasis_regrid_mod, only: lfric2lfric_oasis_regrid + use lfric2lfric_regrid_mod, only: lfric2lfric_regrid implicit none @@ -56,13 +51,16 @@ module lfric2lfric_driver_mod !! extrusions, XIOS contexts and files, field collections !! and fields. !> @param [in,out] modeldb The structure holding model state - subroutine initialise( modeldb ) + !> @param [in,out] oasis_clock Clock for OASIS exchanges + subroutine initialise( modeldb, oasis_clock ) implicit none - type(modeldb_type), intent(inout) :: modeldb + type(modeldb_type), intent(inout) :: modeldb + type(model_clock_type), allocatable, & + intent(inout) :: oasis_clock - call initialise_infrastructure( modeldb ) + call initialise_infrastructure( modeldb, oasis_clock ) end subroutine initialise @@ -71,24 +69,16 @@ end subroutine initialise !> @details Populates fields in the source field collection with data !! read from the source XIOS context file, regrids the field !! collection to a destination mesh, switches to the destination - !! XIOS context and writes to a checkpoint file. - !! TODO: #262 Porting algorithms and kernels - !! Over one time step, all regridding is performed by algorithm - !! modules specific to the regrid method defined in the - !! configuration. - !! Fields to be regridded are extracted from the source field - !! collection and located in the source dump file using - !! `read_checkpoint`. Corresponding source and target field pairs - !! are passed to the regridding algorithm, written to fields - !! in the destination field collection and then written to - !! an outfile. - !> @param [in,out] modeldb The structure that holds model - !! state - subroutine run( modeldb ) + !! XIOS context and writes to an output file. + !> @param [in,out] modeldb The structure that holds model state + !> @param [in,out] oasis_clock Clock for OASIS exchanges + subroutine run( modeldb, oasis_clock ) implicit none - type(modeldb_type), intent(inout) :: modeldb + type(modeldb_type), intent(inout) :: modeldb + type(model_clock_type), allocatable, & + intent(inout) :: oasis_clock ! LFRic-XIOS constants integer(kind=i_def), parameter :: start_timestep = 1_i_def @@ -96,27 +86,24 @@ subroutine run( modeldb ) ! Namelist variables character(len=str_def) :: start_dump_filename character(len=str_def) :: checkpoint_stem_name + integer(kind=i_def) :: mode integer(kind=i_def) :: regrid_method ! Local parameters type(namelist_type), pointer :: files_nml type(namelist_type), pointer :: lfric2lfric_nml - type(field_collection_type), pointer :: source_fields - type(field_collection_type), pointer :: target_fields - - type(field_collection_iterator_type) :: iter + integer(kind=i_def) :: step, time_steps + logical(kind=l_def) :: is_running + type(xios_date) :: current_date + character(len=32) :: current_date_str + real(kind=r_second) :: checkpoint_times(1) - class(field_parent_type), pointer :: field => null() - type(field_type), pointer :: field_src => null() - type(field_type), pointer :: field_dst => null() + type(field_collection_type), pointer :: source_fields + type(field_collection_type), pointer :: target_fields type(lfric_xios_context_type), pointer :: io_context - character(len=str_def) :: field_name - - real(r_second) :: checkpoint_times(1) - ! Namelist pointers files_nml => modeldb%configuration%get_namelist('files') lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') @@ -124,61 +111,59 @@ subroutine run( modeldb ) ! Extract configuration variables call files_nml%get_value( 'start_dump_filename', start_dump_filename ) call files_nml%get_value( 'checkpoint_stem_name', checkpoint_stem_name ) + call lfric2lfric_nml%get_value( 'mode', mode ) call lfric2lfric_nml%get_value( 'regrid_method', regrid_method ) ! Point to source and target field collections source_fields => modeldb%fields%get_field_collection(source_collection_name) target_fields => modeldb%fields%get_field_collection(target_collection_name) - call read_checkpoint(source_fields, & - start_timestep, & - start_dump_filename ) - - ! Main loop over fields to be processed - call iter%initialise(source_fields) - do - ! Locate the field to be processed in the field collections - if ( .not.iter%has_next() ) exit - field => iter%next() - field_name = field%get_name() - - call source_fields%get_field(field_name, field_src) - call target_fields%get_field(field_name, field_dst) - - write(log_scratch_space, '(A,A)') "Processing lfric field ", & - trim(field_name) - call log_event(log_scratch_space, log_level_info) - - ! Regrid source field depending on regrid method - select case (regrid_method) - case (regrid_method_map) - call lfric2lfric_map_regrid(field_dst, field_src) - - case (regrid_method_lfric2lfric) - write(log_scratch_space, '(A)') & - 'Regrid method lfric2lfric not implemented yet' - call log_event(log_scratch_space, log_level_info) - - call lfric2lfric_no_regrid(field_dst) - - case (regrid_method_oasis) -#ifdef MCT - call lfric2lfric_oasis_regrid(modeldb, & - field_dst, field_src) -#endif - end select - - ! Free memory of the processed field - call field_src%field_final() - end do - - ! Write output - call modeldb%io_contexts%get_io_context(context_dst, io_context) - call io_context%set_current() - - checkpoint_times(1) = modeldb%clock%seconds_from_steps(modeldb%clock%get_step()) - call write_checkpoint( target_fields, modeldb%values, modeldb%clock, & - checkpoint_stem_name, checkpoint_times ) + ! Read fields and perform the regridding + if (mode == mode_ics) then + call read_checkpoint(source_fields, & + start_timestep, & + start_dump_filename ) + + call lfric2lfric_regrid(modeldb, oasis_clock, source_fields, & + target_fields, regrid_method) + + ! Write output + call modeldb%io_contexts%get_io_context(context_dst, io_context) + call io_context%set_current() + + checkpoint_times(1) = modeldb%clock%seconds_from_steps(modeldb%clock%get_step()) + call write_checkpoint(target_fields, modeldb%values, modeldb%clock, & + checkpoint_stem_name, checkpoint_times) + + else if (mode == mode_lbc) then + time_steps = modeldb%clock%get_last_step() - & + modeldb%clock%get_first_step() + 1 + + do step=1, time_steps + call xios_get_current_date(current_date) + call xios_date_convert_to_string(current_date, current_date_str) + write(log_scratch_space, '(A)') 'Regridding at xios date: ' // & + current_date_str + call log_event( log_scratch_space, log_level_info ) + + call read_state(source_fields) + + call lfric2lfric_regrid(modeldb, oasis_clock, source_fields, & + target_fields, regrid_method) + + is_running = modeldb%clock%tick() + + call modeldb%io_contexts%get_io_context(context_dst, io_context) + call io_context%set_current() + call advance(io_context, modeldb%clock) + + call write_state(target_fields, prefix='lbc_') + + call modeldb%io_contexts%get_io_context(context_src, io_context) + call io_context%set_current() + call advance(io_context, modeldb%clock) + end do + end if ! Write checksum call checksum_alg("lfric2lfric", field_collection=target_fields) diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 b/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 index 0258c78d9..ab2a73b09 100644 --- a/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 +++ b/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 @@ -11,15 +11,18 @@ module lfric2lfric_init_mod - use constants_mod, only : i_def, r_def, str_def - use driver_modeldb_mod, only : modeldb_type - use field_collection_mod, only : field_collection_type - use log_mod, only : log_event, & - log_level_info - use mesh_mod, only : mesh_type + use constants_mod, only: i_def, r_def, str_def + use driver_modeldb_mod, only: modeldb_type + use field_collection_mod, only: field_collection_type + use lfric_xios_context_mod, only: lfric_xios_context_type + use log_mod, only: log_event, & + log_level_info + use mesh_mod, only: mesh_type + use netcdf, only: nf90_max_name ! lfric2lfric mods - use lfric2lfric_field_init_mod, only : get_field_list, field_maker + use lfric2lfric_config_mod, only: mode_ics, mode_lbc + use lfric2lfric_field_init_mod, only: get_field_list, field_maker implicit none private @@ -31,23 +34,32 @@ module lfric2lfric_init_mod !> @details Calls out to field_maker to initialise fields on given field !! collection. !> @param [in,out] modeldb Holds model state + !> @param [in] context_src The name of the XIOS context that + !! will hold the source file + !> @param [in] context_dst The name of the XIOS context that + !! will hold the file to be written !> @param [in] start_dump_filename File to get field names from + !> @param [in] mode Process ics or lbcs !> @param [in] origin_collection_name Holds the origin fields !> @param [in] origin_mesh Mesh to initialise 3D fields !> @param [in] origin_twod_mesh Mesh to initialise 2D fields !> @param [in] target_collection_name Holds target fields !> @param [in] target_mesh Mesh for target 3D fields !> @param [in] target_twod_mesh Mesh for target 2D fields - subroutine init_lfric2lfric( modeldb, start_dump_filename, & - origin_collection_name, & - origin_mesh, origin_twod_mesh, & - target_collection_name, & + subroutine init_lfric2lfric( modeldb, context_src, context_dst, & + start_dump_filename, mode, & + origin_collection_name, & + origin_mesh, origin_twod_mesh, & + target_collection_name, & target_mesh, target_twod_mesh ) implicit none type(modeldb_type), intent(inout) :: modeldb + character(len=*), intent(in) :: context_src + character(len=*), intent(in) :: context_dst character(len=*), intent(in) :: start_dump_filename + integer(i_def), intent(in) :: mode character(len=*), intent(in) :: origin_collection_name type(mesh_type), intent(in), pointer :: origin_mesh type(mesh_type), intent(in), pointer :: origin_twod_mesh @@ -62,14 +74,24 @@ subroutine init_lfric2lfric( modeldb, start_dump_filename, & ! For get_field_list returns integer(kind=i_def) :: num_fields character(len=str_def), allocatable :: config_list(:) + character(len=nf90_max_name) :: prefix + + ! Source context pointer and temporary context for setup + type(lfric_xios_context_type), pointer :: io_context ! Looping variable integer(kind=i_def) :: i call log_event( 'lfric2lfric: Initialising miniapp ...', log_level_info ) + if (mode == mode_ics) then + prefix = 'restart_' + else if (mode == mode_lbc) then + prefix = '' + end if + ! Get field names from filename and validate presence in iodef.xml - call get_field_list( num_fields, config_list, start_dump_filename ) + call get_field_list( num_fields, config_list, start_dump_filename, prefix ) !-------------------------------------------------------------------------- ! Initialise Source Fields @@ -83,7 +105,8 @@ subroutine init_lfric2lfric( modeldb, start_dump_filename, & call field_maker( field_collection, & config_list(i), & origin_mesh, & - origin_twod_mesh ) + origin_twod_mesh, & + prefix ) end do !-------------------------------------------------------------------------- @@ -93,13 +116,26 @@ subroutine init_lfric2lfric( modeldb, start_dump_filename, & field_collection => & modeldb%fields%get_field_collection(target_collection_name) + call modeldb%io_contexts%get_io_context(context_dst, io_context) + call io_context%set_current() + + if (mode == mode_ics) then + prefix = 'checkpoint_' + else if (mode == mode_lbc) then + prefix = 'lbc_' + end if + do i = 1, num_fields call field_maker( field_collection, & config_list(i), & target_mesh, & - target_twod_mesh ) + target_twod_mesh, & + prefix ) end do + call modeldb%io_contexts%get_io_context(context_src, io_context) + call io_context%set_current() + ! Now finished with config_list, deallocate deallocate(config_list) diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 b/applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 new file mode 100644 index 000000000..fcab9323b --- /dev/null +++ b/applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 @@ -0,0 +1,112 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2025 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Performs regridding of a field collection +!> +module lfric2lfric_regrid_mod + + use constants_mod, only: str_def, i_def + use driver_modeldb_mod, only: modeldb_type + use field_parent_mod, only: field_parent_type + use field_mod, only: field_type + use field_collection_mod, only: field_collection_type + use field_collection_iterator_mod, only: & + field_collection_iterator_type + use log_mod, only: log_event, & + log_level_info, & + log_scratch_space + use model_clock_mod, only: model_clock_type + + !------------------------------------ + ! lfric2lfric modules + !------------------------------------ + use lfric2lfric_config_mod, only: regrid_method_map, & + regrid_method_lfric2lfric, & + regrid_method_oasis + use lfric2lfric_map_regrid_mod, only: lfric2lfric_map_regrid + use lfric2lfric_no_regrid_mod, only: lfric2lfric_no_regrid + use lfric2lfric_oasis_regrid_mod, only: lfric2lfric_oasis_regrid + + implicit none + + private + public lfric2lfric_regrid + +contains + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !> @brief Performs regridding of a field collection + !> @details Over one time step, all regridding is performed by algorithm + !! modules specific to the regrid method defined in the + !! configuration. + !! Fields to be regridded are extracted from the source field + !! collection. Corresponding source and target field pairs + !! are passed to the regridding algorithm, and written to fields + !! in the destination field collection. + !> @param [in,out] modeldb The structure that holds model + !! state + !> @param [in,out] oasis_clock Clock for OASIS exchanges + !> @param [in] source_fields Collection of fields to be regridded + !> @param [in] target_fields Collection of regridded fields + !> @param [in] regrid_method Method for regridding between the + !> source and destination meshes + subroutine lfric2lfric_regrid( modeldb, oasis_clock, & + source_fields, target_fields, regrid_method ) + + implicit none + + type(modeldb_type), intent(inout) :: modeldb + type(model_clock_type), allocatable, intent(inout) :: oasis_clock + type(field_collection_type), pointer, intent(in) :: source_fields + type(field_collection_type), pointer, intent(inout) :: target_fields + integer(kind=i_def), intent(in) :: regrid_method + + + type(field_collection_iterator_type) :: iter + + class(field_parent_type), pointer :: field => null() + type(field_type), pointer :: field_src => null() + type(field_type), pointer :: field_dst => null() + + character(len=str_def) :: field_name + + ! Main loop over fields to be processed + call iter%initialise(source_fields) + do + ! Locate the field to be processed in the field collections + if ( .not.iter%has_next() ) exit + field => iter%next() + field_name = field%get_name() + + call source_fields%get_field(field_name, field_src) + call target_fields%get_field(field_name, field_dst) + + write(log_scratch_space, '(A,A)') "Processing lfric field ", & + trim(field_name) + call log_event(log_scratch_space, log_level_info) + + ! Regrid source field depending on regrid method + select case (regrid_method) + case (regrid_method_map) + call lfric2lfric_map_regrid(field_dst, field_src) + + case (regrid_method_lfric2lfric) + write(log_scratch_space, '(A)') & + 'Regrid method lfric2lfric not implemented yet' + call log_event(log_scratch_space, log_level_info) + + call lfric2lfric_no_regrid(field_dst) + + case (regrid_method_oasis) +#ifdef MCT + call lfric2lfric_oasis_regrid(modeldb, oasis_clock, & + field_dst, field_src) +#endif + end select + end do + + end subroutine lfric2lfric_regrid + +end module lfric2lfric_regrid_mod diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 index 03fe1e587..d992e89b6 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 @@ -22,9 +22,9 @@ module lfric2lfric_field_init_mod use lfric_xios_diag_mod, only: field_is_valid use lfric_xios_read_mod, only: read_field_generic, & checkpoint_read_xios - use space_from_metadata_mod, only: space_from_metadata use lfric_xios_write_mod, only: write_field_generic, & checkpoint_write_xios + use lfric2lfric_config_mod, only: mode_ics, mode_lbc use log_mod, only: log_event, & log_scratch_space, & log_level_info, & @@ -34,6 +34,7 @@ module lfric2lfric_field_init_mod use netcdf, only: nf90_inquire_variable, & nf90_inquire, & nf90_max_name + use space_from_metadata_mod, only: space_from_metadata implicit none @@ -54,13 +55,15 @@ module lfric2lfric_field_init_mod !> @param [out] num_fields Number of valid fields in the input file !> @param [out] config_list Vector of valid field names in the input file !> @param [in] file_name Input file to be checked - subroutine get_field_list(num_fields, config_list, file_name) + !> @param [in] prefix Variable name prefix + subroutine get_field_list(num_fields, config_list, file_name, prefix) implicit none integer(kind=i_def), intent(out) :: num_fields character(len=str_def), allocatable, intent(out) :: config_list(:) character(len=str_def), intent(in) :: file_name + character(len=nf90_max_name), intent(in) :: prefix ! Local variables type(lfric_ncdf_file_type) :: input_file integer(kind=i_def), allocatable :: varid_list(:) @@ -91,7 +94,7 @@ subroutine get_field_list(num_fields, config_list, file_name) varid_list(i), & name=var_name ) - if (field_is_valid('restart_'//trim(var_name))) then + if (field_is_valid(trim(prefix)//trim(var_name))) then num_fields = num_fields + 1 ! Increment counter config_list(num_fields) = trim(var_name) ! Add field to the config_list @@ -102,7 +105,7 @@ subroutine get_field_list(num_fields, config_list, file_name) else write(log_scratch_space, '(A)') & "Field not found in iodef file, skipping: "//& - "restart_"//trim(var_name) + trim(prefix)//trim(var_name) call log_event(log_scratch_space, log_level_trace) endif end do @@ -132,12 +135,13 @@ end subroutine get_field_list !! initalised on !> @param [in] twod_mesh The 2D mesh the field could be !! intialised on - subroutine field_maker(field_collection, field_name, mesh, twod_mesh) + subroutine field_maker(field_collection, field_name, mesh, twod_mesh, prefix) type(field_collection_type), pointer, intent(inout) :: field_collection character(len=*), intent(in) :: field_name type(mesh_type), pointer, intent(in) :: mesh type(mesh_type), pointer, intent(in) :: twod_mesh + character(len=nf90_max_name), intent(in) :: prefix ! Field object to initialise type(field_type) :: field @@ -157,10 +161,10 @@ subroutine field_maker(field_collection, field_name, mesh, twod_mesh) if ( .NOT. field_collection%field_exists(field_name) ) then ! Get function space from metadata - vector_space => space_from_metadata(trim("restart_"//field_name), & - 'Regridding', & - mesh_3d=mesh, & - mesh_2d=twod_mesh ) + vector_space => space_from_metadata(trim(prefix)//trim(field_name), & + 'Regridding', & + mesh_3d=mesh, & + mesh_2d=twod_mesh ) ! Initialise the field call field%initialise(vector_space=vector_space, & diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 index c11ae829b..10adc1eb6 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 @@ -8,28 +8,27 @@ !! and formats it so that it can be passed to the infrastructure. module lfric2lfric_file_init_mod - use constants_mod, only : i_def, & - str_max_filename - use driver_modeldb_mod, only : modeldb_type - use file_mod, only : FILE_MODE_READ, & - FILE_MODE_WRITE - use files_config_mod, only : checkpoint_stem_name, & - diag_stem_name, & - start_dump_filename - use io_config_mod, only : diagnostic_frequency, & - checkpoint_write, & - checkpoint_read, & - write_diag, & - use_xios_io - use lfric_xios_file_mod, only : lfric_xios_file_type, & - OPERATION_TIMESERIES - use lfric2lfric_config_mod, only : dst_ancil_directory, & - dst_orography_mean_ancil_path, & - src_ancil_directory, & - src_orography_mean_ancil_path - use linked_list_mod, only : linked_list_type - use orography_config_mod, only : orog_init_option, & - orog_init_option_ancil + use constants_mod, only: i_def, & + str_max_filename + use driver_modeldb_mod, only: modeldb_type + use file_mod, only: FILE_MODE_READ, & + FILE_MODE_WRITE + use io_config_mod, only: diagnostic_frequency, & + checkpoint_write, & + checkpoint_read, & + write_diag, & + use_xios_io + use lfric_xios_file_mod, only: lfric_xios_file_type, & + OPERATION_TIMESERIES + use lfric2lfric_config_mod, only: dst_ancil_directory, & + dst_orography_mean_ancil_path, & + src_ancil_directory, & + src_orography_mean_ancil_path, & + mode_ics, mode_lbc + use linked_list_mod, only: linked_list_type + use namelist_mod, only: namelist_type + use orography_config_mod, only: orog_init_option, & + orog_init_option_ancil implicit none @@ -40,7 +39,8 @@ module lfric2lfric_file_init_mod !> @brief Sets up source I/O configuration. !> @details Initialises the file list for the source I/O context, using the - !! start_dump_filename extracted from the `files` namelist. + !! start_dump_filename extracted from the `files` namelist, or the + !! source_file_lbc extracted from the `lfric2lfric` namelist. !> @param [out] files_list The list of I/O files. !> @param [in,out] modeldb Required by init_io. subroutine init_lfric2lfric_src_files( files_list, modeldb ) @@ -50,26 +50,41 @@ subroutine init_lfric2lfric_src_files( files_list, modeldb ) type(linked_list_type), intent(out) :: files_list type(modeldb_type), optional, intent(inout) :: modeldb + type(namelist_type), pointer :: lfric2lfric_nml + type(namelist_type), pointer :: files_nml + + integer(kind=i_def) :: mode + character(len=str_max_filename) :: start_dump_filename + character(len=str_max_filename) :: source_file_lbc character(len=str_max_filename) :: src_ancil_fname if( use_xios_io ) then - ! Set up diagnostic writing info - if( write_diag ) then - ! Setup diagnostic output file - call files_list%insert_item( & - lfric_xios_file_type( trim( diag_stem_name ), & - xios_id="lfric_diag", & - io_mode=FILE_MODE_WRITE, & + lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') + call lfric2lfric_nml%get_value( 'mode', mode ) + + files_nml => modeldb%configuration%get_namelist('files') + if (mode == mode_ics) then + call files_nml%get_value( 'start_dump_filename', start_dump_filename ) + + ! Setup checkpoint reading context information + call files_list%insert_item( & + lfric_xios_file_type( trim(start_dump_filename), & + xios_id="lfric_checkpoint_read", & + io_mode=FILE_MODE_READ ) ) + + else if (mode == mode_lbc) then + call lfric2lfric_nml%get_value( 'source_file_lbc', source_file_lbc ) + + ! Setup lbc source reading context information + call files_list%insert_item( & + lfric_xios_file_type( trim(source_file_lbc), & + xios_id="lfric_lbc_read", & + io_mode=FILE_MODE_READ, & + operation=OPERATION_TIMESERIES, & freq=diagnostic_frequency) ) endif - ! Setup checkpoint reading context information - call files_list%insert_item( & - lfric_xios_file_type( trim(start_dump_filename), & - xios_id="lfric_checkpoint_read", & - io_mode=FILE_MODE_READ ) ) - ! Setup orography ancillary file if ( orog_init_option == orog_init_option_ancil ) then ! Set orography ancil filename from namelist @@ -98,20 +113,52 @@ subroutine init_lfric2lfric_dst_files( files_list, modeldb ) type(modeldb_type), optional, intent(inout) :: modeldb ! Local variables - integer(kind=i_def), parameter :: checkpoint_frequency = 1_i_def + type(namelist_type), pointer :: lfric2lfric_nml + type(namelist_type), pointer :: files_nml + integer(kind=i_def), parameter :: checkpoint_frequency = 1_i_def + integer(kind=i_def) :: mode character(len=str_max_filename) :: dst_ancil_fname + character(len=str_max_filename) :: checkpoint_stem_name + character(len=str_max_filename) :: diag_stem_name if( use_xios_io ) then - ! Setup checkpoint reading context information - if ( checkpoint_write ) then + lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') + call lfric2lfric_nml%get_value( 'mode', mode ) + + files_nml => modeldb%configuration%get_namelist('files') + ! Set up diagnostic writing info + if( write_diag ) then + call files_nml%get_value( 'diag_stem_name', diag_stem_name ) + + ! Setup diagnostic output file + call files_list%insert_item( & + lfric_xios_file_type( trim( diag_stem_name ), & + xios_id="lfric_diag", & + io_mode=FILE_MODE_WRITE, & + freq=diagnostic_frequency) ) + endif + + if (mode == mode_ics) then + ! Setup checkpoint writing context information + if ( checkpoint_write ) then + call files_nml%get_value( 'checkpoint_stem_name', checkpoint_stem_name ) + call files_list%insert_item( & lfric_xios_file_type( trim( checkpoint_stem_name ), & xios_id="lfric_checkpoint_write", & io_mode=FILE_MODE_WRITE, & - operation=OPERATION_TIMESERIES, & freq=checkpoint_frequency ) ) + end if + else if (mode == mode_lbc) then + ! Setup lbc writing context information + call files_list%insert_item( & + lfric_xios_file_type( "lfric2lfric_lbc", & + xios_id="lfric_lbc_write", & + io_mode=FILE_MODE_WRITE, & + operation=OPERATION_TIMESERIES, & + freq=diagnostic_frequency ) ) endif ! Setup orography ancillary file diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index faf7d2240..c295d528e 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -21,7 +21,6 @@ module lfric2lfric_infrastructure_mod use driver_fem_mod, only: init_fem use driver_io_mod, only: init_io, & filelist_populator - use check_configuration_mod, only: get_required_stencil_depth use extrusion_mod, only: extrusion_type, & uniform_extrusion_type, & prime_extrusion, & @@ -68,7 +67,7 @@ module lfric2lfric_infrastructure_mod use lfric2lfric_init_mesh_mod, only: init_mesh use lfric2lfric_check_conf_mod, only: lfric2lfric_check_configuration use lfric2lfric_file_init_mod, only: init_lfric2lfric_dst_files, & - init_lfric2lfric_src_files + init_lfric2lfric_src_files use lfric2lfric_init_mod, only: init_lfric2lfric use lfric2lfric_init_coupler_mod,only: lfric2lfric_init_coupler_src, & lfric2lfric_init_coupler_dst, & @@ -93,11 +92,13 @@ module lfric2lfric_infrastructure_mod method_um_L120_99t_21s_40km, & method_um_L140_122t_18s_40km, & method_um_L70_50t_20s_80km - use lfric2lfric_config_mod, only: regrid_method_oasis, & + use lfric2lfric_config_mod, only: mode_ics, mode_lbc, & regrid_method_lfric2lfric, & regrid_method_map, & - source_geometry_spherical, & - source_geometry_planar + regrid_method_oasis, & + source_geometry_planar, & + source_geometry_spherical + implicit none @@ -120,12 +121,15 @@ contains !! checks the configuration namelist, initialises meshes, !! extrusions, XIOS contexts and files, field collections and !! fields. - !> @param [in,out] modeldb The structure holding model state - subroutine initialise_infrastructure( modeldb ) + !> @param [in,out] modeldb The structure holding model state + !> @param [in,out] oasis_clock Clock for OASIS exchanges + subroutine initialise_infrastructure( modeldb, oasis_clock ) implicit none type(modeldb_type), intent(inout) :: modeldb + type(model_clock_type), allocatable, & + intent(inout) :: oasis_clock ! Coordinate field type(field_type), pointer :: chi(:) @@ -133,12 +137,12 @@ contains type(field_type) :: surface_altitude_dst type(field_type) :: surface_altitude_src type(field_type) :: surface_altitude_src_on_dst - type(field_type), pointer :: src_field - type(field_type), pointer :: dst_field + type(field_type), pointer :: src_field + type(field_type), pointer :: dst_field type(inventory_by_mesh_type), pointer :: chi_inventory type(inventory_by_mesh_type), pointer :: panel_id_inventory - type(function_space_type), pointer :: vector_space + type(function_space_type), pointer :: vector_space !----------------------- ! Mesh Pointers @@ -164,13 +168,12 @@ contains character(len=str_def) :: mesh_names(2) character(len=str_def), allocatable :: twod_names(:) character(len=str_def) :: start_dump_filename + character(len=str_def) :: source_file_lbc ! lfric2lfric namelist parameters - integer(kind=i_def) :: origin_domain - integer(kind=i_def) :: target_domain - - integer(kind=i_def) :: stencil_depth + integer(kind=i_def) :: stencil_depth(1) integer(kind=i_def) :: source_geometry + integer(i_def) :: mode integer(i_def) :: regrid_method real(kind=r_def) :: domain_bottom real(kind=r_def) :: scaled_radius @@ -187,21 +190,20 @@ contains integer(kind=i_def), parameter :: dst = 1 integer(kind=i_def), parameter :: src = 2 - type(coupling_type), pointer :: coupling_ptr - - type(field_collection_type), pointer :: cpl_snd_2d - type(field_collection_type), pointer :: cpl_rcv_2d - integer(i_def), pointer :: local_index(:) - type(coupler_exchange_2d_type) :: coupler_exchange_2d - integer(i_def) :: ierror - logical(l_def) :: is_running + type(coupling_type), pointer :: coupling_ptr + type(field_collection_type), pointer :: cpl_snd_2d + type(field_collection_type), pointer :: cpl_rcv_2d + integer(kind=i_def), pointer :: local_index(:) + type(coupler_exchange_2d_type) :: coupler_exchange_2d + integer(kind=i_def) :: ierror + logical(kind=l_def) :: is_running !------------------------ ! XIOS contexts !------------------------ ! Pointer for subroutines used in init_io - procedure(filelist_populator), pointer :: files_init_ptr - procedure(callback_clock_arg), pointer :: before_close => null() + procedure(filelist_populator), pointer :: files_init_ptr + procedure(callback_clock_arg), pointer :: before_close ! Source context pointer and temporary context for setup type(lfric_xios_context_type) :: tmp_io_context_src @@ -227,13 +229,12 @@ contains ! Check lfric2lfric configuration settings are allowed call lfric2lfric_check_configuration( lfric2lfric_nml ) - call lfric2lfric_nml%get_value( 'origin_domain', origin_domain ) + call lfric2lfric_nml%get_value( 'mode', mode ) call lfric2lfric_nml%get_value( 'regrid_method', regrid_method ) call lfric2lfric_nml%get_value( 'destination_mesh_name', & mesh_names(dst) ) call lfric2lfric_nml%get_value( 'source_mesh_name', & mesh_names(src) ) - call lfric2lfric_nml%get_value( 'target_domain', target_domain ) call lfric2lfric_nml%get_value( 'source_geometry', source_geometry ) call files_nml%get_value( 'start_dump_filename', start_dump_filename ) call finite_element_nml%get_value( 'element_order_h', element_order_h) @@ -315,7 +316,7 @@ contains !----------------------------------------------------------------------- ! Create the required meshes !----------------------------------------------------------------------- - stencil_depth = get_required_stencil_depth() + stencil_depth = 2 call init_mesh( modeldb%config, & modeldb%configuration, & modeldb%mpi%get_comm_rank(), & @@ -341,10 +342,9 @@ contains panel_id_inventory => get_panel_id_inventory() call init_fem( mesh_collection, chi_inventory, panel_id_inventory ) - !----------------------------------------------------------------------- - ! Create the coordinates fields !----------------------------------------------------------------------- ! Assign pointers to the correct meshes + !----------------------------------------------------------------------- mesh_src => mesh_collection%get_mesh(trim(mesh_names(src))) twod_mesh_src => mesh_collection%get_mesh(trim(twod_names(src))) mesh_dst => mesh_collection%get_mesh(trim(mesh_names(dst))) @@ -380,23 +380,16 @@ contains call modeldb%io_contexts%get_io_context(context_dst, io_context_dst) - ! Must call advance to align IO context clock with iodef and file - ! output frequency - call advance(io_context_dst, modeldb%clock) - !======================================================================= - ! Initialise the clock + ! Initialise the OASIS clock !======================================================================= - ! lfric2lfric doesn't use a typical model clock. To make it more flexible, - ! fields (which can be multi-level and multi data) are broken down into - ! simple 2d fields, which are then passed through regridding. If Oasis is - ! being used, it can only provide one coupling per clock tick - so we + ! If Oasis is used, it can only provide one coupling per clock tick - so we ! introduce a pseudo clock, that ticks every coupling, rather than every ! timestep. We don't know how many 2d fields will be passed through the - ! coupler, yet, so set the upper limit to "huge" to support everything - modeldb%clock = model_clock_type(1_i_def, huge(1_i_def), & + ! coupler yet, so set the upper limit to "huge" to support everything + oasis_clock = model_clock_type(1_i_def, huge(1_i_def), & 1.0_r_second, 0.0_r_second) - is_running = modeldb%clock%tick() + is_running = oasis_clock%tick() !======================================================================= ! Initialise destination orography @@ -438,6 +431,7 @@ contains call panel_id_inventory%get_field(mesh_src, panel_id) ! Using correct chi and panel_id, initialise xios context for source mesh + nullify( before_close ) call io_context_src%initialise_xios_context( modeldb%mpi%get_comm(), & chi, & panel_id, & @@ -445,10 +439,6 @@ contains modeldb%calendar, & before_close ) - ! Must call advance to align IO context clock with iodef and file - ! output frequency - call advance(io_context_src, modeldb%clock) - !======================================================================= ! Initialise source orography !======================================================================= @@ -471,9 +461,18 @@ contains !======================================================================= ! Create and initialise prognostic fields !======================================================================= - call init_lfric2lfric( modeldb, start_dump_filename, & - source_collection_name, mesh_src, twod_mesh_src, & - target_collection_name, mesh_dst, twod_mesh_dst ) + if (mode == mode_ics) then + call init_lfric2lfric( modeldb, context_src, context_dst, & + start_dump_filename, mode, & + source_collection_name, mesh_src, twod_mesh_src, & + target_collection_name, mesh_dst, twod_mesh_dst ) + else if (mode == mode_lbc) then + call lfric2lfric_nml%get_value( 'source_file_lbc', source_file_lbc ) + call init_lfric2lfric( modeldb, context_src, context_dst, & + source_file_lbc, mode, & + source_collection_name, mesh_src, twod_mesh_src, & + target_collection_name, mesh_dst, twod_mesh_dst ) + end if !======================================================================= ! Initialize variables for each regrid method @@ -539,7 +538,7 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(src_field, local_index) - call coupler_exchange_2d%set_time(modeldb%clock) + call coupler_exchange_2d%set_time(oasis_clock) call coupler_exchange_2d%copy_from_lfric(ierror) call coupler_exchange_2d%clear() @@ -547,12 +546,12 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling_dst" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(dst_field, local_index) - call coupler_exchange_2d%set_time(modeldb%clock) + call coupler_exchange_2d%set_time(oasis_clock) call coupler_exchange_2d%copy_to_lfric(ierror) call coupler_exchange_2d%clear() ! Done the first coupling - so advance the pseudo-clock - is_running = modeldb%clock%tick() + is_running = oasis_clock%tick() ! Copy the horizontally regridded src orography into dst orography mesh ! ----------------------------------------------------------- diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 index b2b544282..fd240af17 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 @@ -76,7 +76,8 @@ module lfric2lfric_init_mesh_mod !> @param[in] total_ranks Total number of MPI ranks in this job. !> @param[in] mesh_names Mesh names to load from the mesh input file(s). !> @param[in] extrusion Extrusion object to be applied to meshes. -!> @param[in] stencil_depth Required stencil depth for the application. +!> @param[in] stencil_depths_in Required stencil depth for the application +!! for each mesh. !> @param[in] regrid_method Apply check for even partitions with the !> configured partition strategy if the !> regridding method is 'map'. @@ -86,7 +87,7 @@ subroutine init_mesh( config, configuration, & local_rank, total_ranks, & mesh_names, & extrusion, & - stencil_depth, & + stencil_depths_in, & regrid_method ) use partitioning_nml_iterator_mod, only: partitioning_nml_iterator_type @@ -102,7 +103,7 @@ subroutine init_mesh( config, configuration, & integer(kind=i_def), intent(in) :: total_ranks character(len=*), intent(in) :: mesh_names(2) class(extrusion_type), intent(in) :: extrusion - integer(kind=i_def), intent(in) :: stencil_depth + integer(kind=i_def), intent(in) :: stencil_depths_in(:) integer(kind=i_def), intent(in) :: regrid_method ! Parameters @@ -130,7 +131,9 @@ subroutine init_mesh( config, configuration, & integer(kind=i_def) :: mesh_selection(2) ! Local variables + integer(kind=i_def) :: i character(len=str_max_filename) :: mesh_file(2) + integer(kind=i_def) :: stencil_depths(2) procedure(partitioner_interface), pointer :: partitioner_src => null() procedure(partitioner_interface), pointer :: partitioner_dst => null() @@ -185,6 +188,22 @@ subroutine init_mesh( config, configuration, & call log_event(log_scratch_space, log_level_error) end if + ! Set up stencil depths + if ( size(stencil_depths) == 1 ) then + ! Single stencil depth specified, apply to all meshes + do i = 1, size(mesh_names) + stencil_depths(i) = stencil_depths_in(1) + end do + else if ( size(stencil_depths) == size(mesh_names) ) then + ! Stencil depths specified per mesh + stencil_depths(:) = stencil_depths_in(:) + else + write(log_scratch_space, '(A)') & + 'Number of stencil depths specified does not '// & + 'match number of requested meshes.' + call log_event(log_scratch_space, log_level_error) + end if + !=========================================================================== ! Create local mesh objects: @@ -243,8 +262,8 @@ subroutine init_mesh( config, configuration, & ! meshes are suitable for the supplied application ! configuration. !=========================================================== - call check_local_mesh( config, & - stencil_depth, & + call check_local_mesh( config, & + stencil_depths, & mesh_names ) ! Load and assign mesh maps. @@ -301,7 +320,6 @@ subroutine init_mesh( config, configuration, & decomposition_dst, & partitioner_dst ) - ! Read in all global meshes from input file !=========================================================== if (mesh_file(dst) == mesh_file(src)) then @@ -316,15 +334,15 @@ subroutine init_mesh( config, configuration, & call create_local_mesh( mesh_names(dst:dst), & local_rank, total_ranks, & decomposition_dst, & - stencil_depth, & - generate_inner_halos(dst), & + stencil_depths, & + generate_inner_halos(dst), & partitioner_dst ) call create_local_mesh( mesh_names(src:src), & local_rank, total_ranks, & decomposition_src, & - stencil_depth, & - generate_inner_halos(src), & + stencil_depths, & + generate_inner_halos(src), & partitioner_src ) ! Read in the global intergrid mesh mappings, diff --git a/applications/lfric2lfric/source/lfric2lfric.F90 b/applications/lfric2lfric/source/lfric2lfric.F90 index 6a877c0d3..c00688655 100644 --- a/applications/lfric2lfric/source/lfric2lfric.F90 +++ b/applications/lfric2lfric/source/lfric2lfric.F90 @@ -29,9 +29,9 @@ program lfric2lfric log_level_trace, & log_scratch_space use lfric_mpi_mod, only: global_mpi - use lfric2lfric_mod, only: lfric2lfric_required_namelists use lfric2lfric_driver_mod, only: initialise, run, finalise + use model_clock_mod, only: model_clock_type implicit none @@ -45,6 +45,8 @@ program lfric2lfric ! Coupler objects type(coupling_type) :: coupler #endif + ! Clock for OASIS exchanges + type(model_clock_type), allocatable :: oasis_clock call parse_command_line( filename ) @@ -83,9 +85,9 @@ program lfric2lfric call modeldb%io_contexts%initialise(program_name, 100) call log_event( 'Initialising ' // program_name // ' ...', log_level_trace ) - call initialise( modeldb ) + call initialise( modeldb, oasis_clock ) - call run( modeldb ) + call run( modeldb, oasis_clock ) call log_event( 'Finalising ' // program_name // ' ...', log_level_trace ) call finalise( program_name, modeldb ) diff --git a/applications/lfric_atm/Makefile b/applications/lfric_atm/Makefile index e45cb2d89..7457acec7 100644 --- a/applications/lfric_atm/Makefile +++ b/applications/lfric_atm/Makefile @@ -75,7 +75,7 @@ build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = YES build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -exec egrep -l "^\s*program" {} \;))) build: export PROJECT = lfric_atm -build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/.. build: export WORKING_DIR := $(WORKING_DIR) build: export LDFLAGS_GROUPS = OPENMP diff --git a/applications/lfric_atm/build/compile_options.mk b/applications/lfric_atm/build/compile_options.mk index 143f09ae6..842a61d60 100644 --- a/applications/lfric_atm/build/compile_options.mk +++ b/applications/lfric_atm/build/compile_options.mk @@ -13,7 +13,8 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/lfric_atm/build/psyclone_transmute_file_list.mk b/applications/lfric_atm/build/psyclone_transmute_file_list.mk index 3de55a505..ae3bdf711 100644 --- a/applications/lfric_atm/build/psyclone_transmute_file_list.mk +++ b/applications/lfric_atm/build/psyclone_transmute_file_list.mk @@ -15,27 +15,41 @@ # Choose which files to Pre-proccess and PSyclone from physics_schemes / other source (e.g. UKCA) export PSYCLONE_PHYSICS_FILES = \ + bl_lsp \ + bl_diags_mod \ bm_tau_kernel_mod \ + btq_int \ + conv_gr_kernel_mod \ + ex_flux_tq \ + ex_flux_uv \ + fm_drag \ gw_ussp_mod \ + imp_mix \ + jules_exp_kernel_mod \ + jules_extra_kernel_mod \ + jules_imp_kernel_mod \ + kmkh \ + kmkhz_9c_wtrac \ lw_kernel_mod \ mphys_kernel_mod \ pc2_initiation_kernel_mod \ pc2_conv_coupling_kernel_mod \ sw_kernel_mod \ - ukca_aero_ctl \ - ukca_chemistry_ctl_full_mod \ - ukca_main1-ukca_main1 \ sw_rad_tile_kernel_mod \ - jules_imp_kernel_mod \ - jules_exp_kernel_mod \ - jules_extra_kernel_mod \ - conv_gr_kernel_mod + tr_mix \ + ukca_aero_ctl \ + ukca_chemistry_ctl_full_mod \ + ukca_main1-ukca_main1 + + +##### TRANSMUTE_INCLUDE_METHOD specify_include ##### # List to use PSyclone explicitly without any opt script # This will remove hand written (OMP) directives in the source # Used by both methods, specify_include and specify_exclude export PSYCLONE_PASS_NO_SCRIPT = ukca_abdulrazzak_ghan + ##### TRANSMUTE_INCLUDE_METHOD specify_exclude ##### # For GPU, we may want to use more generic local.py transformation scripts and psyclone by directory. # Advise which directories to pass to PSyclone. diff --git a/applications/lfric_atm/example/configuration.nml b/applications/lfric_atm/example/configuration.nml index 12631de24..d46ff98c4 100644 --- a/applications/lfric_atm/example/configuration.nml +++ b/applications/lfric_atm/example/configuration.nml @@ -624,6 +624,7 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/lfric_atm/metadata/field_def_diags.xml b/applications/lfric_atm/metadata/field_def_diags.xml index 007ee86df..a17d884f9 100644 --- a/applications/lfric_atm/metadata/field_def_diags.xml +++ b/applications/lfric_atm/metadata/field_def_diags.xml @@ -43,6 +43,8 @@ + + zoomed__orography diff --git a/applications/lfric_atm/metadata/field_def_initial_diags.xml b/applications/lfric_atm/metadata/field_def_initial_diags.xml index 707675af2..b91c8aed1 100644 --- a/applications/lfric_atm/metadata/field_def_initial_diags.xml +++ b/applications/lfric_atm/metadata/field_def_initial_diags.xml @@ -21,6 +21,8 @@ + + diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py new file mode 100644 index 000000000..2fa660bdc --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py @@ -0,0 +1,33 @@ +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +# ----------------------------------------------------------------------------- +''' +Bespoke Opt script for bl_diags_mod to add OpenMP to loops present in +the file. - To be replaced by a global in #900 +''' + +import logging +from psyclone.transformations import ( + TransformationError) +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + OMP_PARALLEL_LOOP_DO_TRANS_STATIC, +) + + +def trans(psyir): + ''' + Work through each loop in bl_diags_mod and add a parallel region + ''' + for loop in psyir.walk(Loop): + if not loop.ancestor(Loop): + options = { + "node-type-check": False} + try: + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop, options) + + except (TransformationError, IndexError) as err: + logging.warning( + "Could not transform because:\n %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py new file mode 100644 index 000000000..4f08b7b3c --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py @@ -0,0 +1,80 @@ +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +# ----------------------------------------------------------------------------- +''' +Bespoke script for kmkhz_9c_wtrac. +Remove any j loops. +Place a OMP parallel do inside the i_wt loop. +''' + +import logging +from psyclone.psyir.nodes import ( + Schedule, + Routine, + Loop, + OMPParallelDirective, +) +from psyclone.transformations import TransformationError +from transmute_psytrans.transmute_functions import ( + loop_replacement_of, + get_compiler, + first_priv_red_init, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC, +) + +Loop.set_loop_type_inference_rules({ + "i_wt": {"variable": "i_wt"}, + "j": {"variable": "j"}}) + + +def trans(psyir): + """ + Bespoke script for kmkhz_9c_wtrac + """ + + # For the PSyclone 3.1 bug with CCE. Certain files + # are causing a first private to be generated in the parallel section. + first_private_list = [ + "dz_disc", + "qw_lapse", + "k", + "fa_tend", + "inv_tend", + "ml_tend", + "totqf_efl" + ] + + # Remove any loops relating to j loop type + for node in psyir.walk(Routine): + loop_replacement_of(node, "j") + + # Span a parallel section across the whole routine, + # apart for a few exceptions provided + for loop in psyir.walk(Loop): + loop_ancestor_type = "" + try: + loop_ancestor_type = loop.ancestor(Loop).loop_type + # pylint: disable=bare-except + except: # noqa: E722 + pass + if loop_ancestor_type: + if loop_ancestor_type == "i_wt": + # Span the region + try: + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply( + loop) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) + + # CCE first private issue with 3.1, to be removed longer term + # pylint: disable=too-many-nested-blocks + if get_compiler() == "cce": + for routine in psyir.walk(Routine): + for node in routine.children: + for schedule in node.walk(Schedule): + for child in schedule.children: + if isinstance(child, OMPParallelDirective): + first_priv_red_init(child, first_private_list) + break diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py new file mode 100644 index 000000000..edbef2b99 --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py @@ -0,0 +1,176 @@ +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +# ----------------------------------------------------------------------------- +''' +Local script for Boundary layer. +This by default removes the j loop(s) and replaces it with a init, +spans a PARALLEL region across the whole file, +and then adds OMP DO to the top most loop in each group of loops. +There are some small bespoke needs for the 6x files that this currently +affects which are captured below as they are initialised. + +This is currently used by the following files: +* bl_lsp +* btq_int +* ex_flux_tq +* ex_flux_uv +* kmkh +* tr_mix +* imp_mix +* fm_drag +''' + +import logging +from psyclone.psyir.nodes import ( + Routine, + Loop, + OMPParallelDirective, +) +from psyclone.transformations import (TransformationError) +from transmute_psytrans.transmute_functions import ( + loop_replacement_of, + get_compiler, + first_priv_red_init, + remove_unspanable_nodes, + set_pure_subroutines, + replace_n_threads, + OMP_PARALLEL_REGION_TRANS, + OMP_DO_LOOP_TRANS_STATIC, +) +from boundary_layer.script_options import ( + SCRIPT_OPTIONS_DICT +) + + +Loop.set_loop_type_inference_rules({ + "i_wt": {"variable": "i_wt"}, # For ex_flux_tq.F90 + "ient": {"variable": "ient"}, # For tr_mix.F90 + "ii": {"variable": "ii"}, # For bdy_impl3.F90 + "k": {"variable": "k"}, # For all files which use script + "j": {"variable": "j"}, # For all files which use script + "i": {"variable": "i"}}) # For bdy_impl3.F90 + + +# Longer term we will raise some of these into a override import, see Apps#900 +# pylint: disable=too-many-locals +# pylint: disable=too-many-statements +# pylint: disable=too-many-branches +def trans(psyir): + """ + Local.py script for boundary layer. + This spans a PARALLEL section across the whole file, + and then adds OMP to either to top loop of a nest, or k + + This is currently used by the following files: + * bl_lsp + * btq_int + * ex_flux_tq + * ex_flux_uv + * kmkh + * tr_mix + * imp_mix + * fm_drag + """ + + # options list for Transformation. + options = {} + # First privates created by CCE redundant inits. + first_private_list = [] + # Designate calls in regions as safe to parallelise over. + safe_pure_calls = [] + # Do we update the max_threads variable with a library call? + max_threads_parse = False + # Assignment nodes that we do not wish to parallelise over at the start + loop_type_init = ["j"] + + # Lifted and extended from Global.py + # Given the file, update the above lists with extra options + + # Get the file name to use with the SCRIPT_OPTIONS_DICT + fortran_file_name = str(psyir.root.name) + # Check if file is in the script_options_dict + # Copy out anything that's needed + # Only the options list is currently + if fortran_file_name in SCRIPT_OPTIONS_DICT: + file_overrides = SCRIPT_OPTIONS_DICT[fortran_file_name] + # Update the respective lists if the filename override exists + if "options" in file_overrides.keys(): + options = file_overrides["options"] + if "first_private_list" in file_overrides.keys(): + first_private_list = file_overrides["first_private_list"] + if "safe_pure_calls" in file_overrides.keys(): + safe_pure_calls = file_overrides["safe_pure_calls"] + if "max_threads_parse" in file_overrides.keys(): + max_threads_parse = file_overrides["max_threads_parse"] + if "loop_type_init" in file_overrides.keys(): + for name in file_overrides["loop_type_init"]: + loop_type_init.append(name) + + # Set up some specifics to this local script + + # Remove any j loops and add an init for j + remove_loop_type = ["j"] + # Avoid any nodes related to the timers + timer_routine_names = ["lhook"] + + # Set the pure calls if needed + if safe_pure_calls: + set_pure_subroutines(psyir, safe_pure_calls) + + # Replace max_threads = 1 + if max_threads_parse: + replace_n_threads(psyir, "max_threads") + + # Remove any loops relating to specified loop type + for node in psyir.walk(Routine): + for removal_type in remove_loop_type: + loop_replacement_of(node, removal_type) + + # Span a parallel section across the whole routine, + # apart for a few exceptions provided + for routine in psyir.walk(Routine): + routine_children = remove_unspanable_nodes( + routine, + timer_routine_names, + loop_type_init + ) + # Span the region across filtered down node list + try: + OMP_PARALLEL_REGION_TRANS.apply( + routine_children) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelTrans failed: %s", err) + + # CCE first private issue with 3.1, to be removed longer term + if get_compiler() == "cce" and first_private_list: + for routine in psyir.walk(Routine): + for node in routine.children: + if isinstance(node, OMPParallelDirective): + first_priv_red_init(node, first_private_list) + break + + # Loop ancestor type that a loop cannot have. + avoid_loop_ancestor = ["ii", "k", "i"] + # A loop type which a loop cannot have an OMP do section + avoid_loop_type = ["i_wt", "ient"] + # Work through the loops now in the spanned section and try transformations + for loop in psyir.walk(Loop): + loop_ancestor_type = "" + try: + loop_ancestor_type = loop.ancestor(Loop).loop_type + # pylint: disable=bare-except + except: # noqa: E722 + pass + # Default is there is no Loop ancestor + if (((not loop.ancestor(Loop)) or + # Or the rest, the loop ancestor is not to be avoided + loop_ancestor_type not in avoid_loop_ancestor) and + # And the loop is not of certain loop types + str(loop.loop_type) not in avoid_loop_type): + try: + OMP_DO_LOOP_TRANS_STATIC.apply( + loop, options) + except (TransformationError, IndexError) as err: + logging.warning("OMPLoopTrans failed: %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py new file mode 100644 index 000000000..9b27403d1 --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py @@ -0,0 +1,165 @@ +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +# ----------------------------------------------------------------------------- +''' +Lift options list and similar from each individual script up into this file. +Aim is to allow the creation of a simple global.py which adds OMP over all +loops. The option which matches the file being worked on can be pulled in +and referenced. This helps reduce the number of files needed. + +The following files have overrides below: +* bl_lsp +* btq_int +* ex_flux_tq +* ex_flux_uv +* kmkh +* tr_mix +* imp_mix +* fm_drag +''' + +FILE_EXTEN = ".xu90" + +# Basic initialisation, will be used by the local script +SCRIPT_OPTIONS_DICT = {} + +# ## Local.py options for boundary layer ## + +SCRIPT_OPTIONS_DICT["bl_lsp"+str(FILE_EXTEN)] = { + "first_private_list": [ + "newqcf" + ] +} + +SCRIPT_OPTIONS_DICT["ex_flux_tq"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "bl_diag%grad_t_adj" + ] + }, + "first_private_list": [ + "f2_fqw", + "f2_ftl", + "fsc_fqw", + "fsc_ftl", + "non_grad_fqw", + "non_grad_ftl" + ] +} + +SCRIPT_OPTIONS_DICT["ex_flux_uv"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "tau_x_y" + ] + } +} + +SCRIPT_OPTIONS_DICT["tr_mix"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "f_field", + "rhok_dep", + "surf_dep_flux", + "gamma_rhokh_rdz" + ] + }, + "first_private_list": [ + "dfield_inv", + "dz_disc", + "dzlkp1", + "f_field_ent", + "km1" + ] +} + +SCRIPT_OPTIONS_DICT["bdy_impl3"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "dtl1_1", + "ct_prod", + "dqw1_1", + "dqw", + "dtl", + "ct_ctq", + "temp", + "dqw1", + "dtl1", + "ctctq1" + ] + }, + "safe_pure_calls": [ + "oneover_v" + ], + "max_threads_parse": True, + "loop_type_init": [ + "max_threads", + "blm1", + "tdims_omp_block", + "tdims_seg_block" + ] +} + +SCRIPT_OPTIONS_DICT["bdy_impl4"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "tl", + "qw", + "dtl", + "dqw" + ] + }, + "loop_type_init": [ + "tdims_omp_block", + "tdims_seg_block" + ] +} + +SCRIPT_OPTIONS_DICT["imp_mix"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "d_field", + "af", + "field", + "gamma_rhok_dep", + "f_field", + "surf_dep_flux" + ] + }, + "max_threads_parse": True, + "loop_type_init": [ + "max_threads", + "blm1", + "pdims_omp_block", + "pdims_seg_block" + ] +} + +SCRIPT_OPTIONS_DICT["fm_drag"+str(FILE_EXTEN)] = { + "options": { + "ignore_dependencies_for": [ + "k_for_buoy", + "u_hm", + "v_hm", + "tl_hm", + "qw_hm", + "tau_fd_x", + "tau_fd_y" + ] + }, + "first_private_list": [ + "fp_x_low", + "fp_x_steep", + "fp_y_low", + "fp_y_steep", + "rib_fn", + "tausx", + "tausy", + "wta", + "wtb" + ] +} + +# ## Other boundary layer options ## diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py index cc3235be5..cf4b240ce 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- """ Optimisation script that adds OpenMP worksharing-loop directives to speed up loops before and after a PC2 subroutine call. Some PSyclone dependency errors diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py index 7c28ef7f4..e63362014 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- ''' Bespoke PSyclone transformation script for jules_imp_kernel_mod. ''' @@ -21,10 +21,11 @@ SAFE_IMPURE_CALLS = ["qsat_mix"] + def trans(psyir): ''' PSyclone function call, run through psyir object, - each schedul e(or subroutine) and apply OMP paralleldo transformations + each schedule (or subroutine) and apply OMP paralleldo transformations to each loop in jules_imp_kernel_mod. ''' @@ -36,7 +37,6 @@ def trans(psyir): "sea_ice_pensolar", "rhostar_2d", "recip_l_mo_sea_2d", - "h_blend_orog_2d", "t1_sd_2d", "q1_sd_2d", "surf_interp", @@ -81,7 +81,6 @@ def trans(psyir): impure_calls = [c for c in loop.walk(Call) if not c.is_pure] for call in impure_calls: if call.routine.symbol.name in SAFE_IMPURE_CALLS: - print(call.routine.name) call.routine.symbol.is_pure = True omp_transform_par_do.apply(loop, options) @@ -89,5 +88,7 @@ def trans(psyir): logging.warning( "Could not transform because:\n %s", err) -#Ignore loops setting these as order dependent: land_field l ainfo%land_index sea_pts ainfo%sea_index ainfo%sice_pts_ncat ainfo%sice_index_ncat -#Ignore as calls subroutine: qsat_mix +# Ignore loops setting these as order dependent: +# land_field l ainfo%land_index sea_pts ainfo%sea_index +# ainfo%sice_pts_ncat ainfo%sice_index_ncat +# Ignore as calls subroutine: qsat_mix diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py index 783dbf800..87052696b 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- ''' Bespoke PSyclone transformation script for jules_extra_kernel_mod. ''' @@ -63,4 +63,6 @@ def trans(psyir): logging.warning( "Could not transform because:\n %s", err) -#Ignore loops setting these as order dependent: land_pts l ainfo%land_index soil_pts ainfo%soil_index lice_pts ainfo%lice_index +# Ignore loops setting these as order dependent: +# land_pts l ainfo%land_index soil_pts +# ainfo%soil_index lice_pts ainfo%lice_index diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py index dff5f1311..c1a880515 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- ''' Bespoke PSyclone transformation script for jules_imp_kernel_mod. ''' @@ -11,7 +11,7 @@ from psyclone.transformations import ( OMPLoopTrans, TransformationError) -from psyclone.psyir.nodes import Loop, IfBlock, Schedule +from psyclone.psyir.nodes import Loop, IfBlock omp_transform_par_do = OMPLoopTrans( @@ -88,9 +88,11 @@ def trans(psyir): if descendent is not loop] if loop_descendents[0].loop_type == 'l': # Now check if there are any if statements in this loop - if_statements = [descendent for descendent in - loop_descendents[0].walk(IfBlock, depth=None) - if descendent is not loop] + if_statements = [ + descendent for descendent in + loop_descendents[0].walk(IfBlock, depth=None) + if descendent is not loop + ] # There is only one loop like this so we can just skip the # transformation for it if len(if_statements) > 0: @@ -105,5 +107,6 @@ def trans(psyir): logging.warning( "Could not transform:\n %s", err) -#Ignore loops setting these as order dependent: land_field l ainfo%land_index sice_pts ainfo%sice_index sea_pts ainfo%sea_inde ainfo%sice_pts_ncat - +# Ignore loops setting these as order dependent: +# land_field l ainfo%land_index sice_pts ainfo%sice_index +# sea_pts ainfo%sea_inde ainfo%sice_pts_ncat diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py index d7748acfa..5ce26ee90 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- """ Optimisation script that adds OpenMP parallel do worksharing-loop directives. The main loop requires dynamic schedule to improve load balancing between diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py index ed4a0e90e..c1eddb8f2 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- """ Optimisation script that adds OpenMP worksharing-loop directives to speed up various loops. Some PSyclone dependency errors need to be overridden; these diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py index a8a2210a6..ceff34094 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py @@ -1,8 +1,8 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -############################################################################## +# ----------------------------------------------------------------------------- ''' Bespoke PSyclone transformation script for sw_rad_tile_kernel_mod. ''' @@ -44,4 +44,6 @@ def trans(psyir): logging.warning( "Could not transform because:\n %s", err) -#Ignore loops setting these as order dependent: land_field l ainfo%land_index sea_pts ainfo%sea_index ainfo%sice_pts_ncat ainfo%sice_index_ncat +# Ignore loops setting these as order dependent: +# land_field l ainfo%land_index sea_pts +# ainfo%sea_index ainfo%sice_pts_ncat ainfo%sice_index_ncat diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py index e4f2e8b6c..c2685d3e1 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py @@ -19,6 +19,7 @@ # Kernels SCRIPT_OPTIONS_DICT["mphys_kernel_mod"+str(FILE_EXTEN)] = { + "options": { "node-type-check": False, "ignore_dependencies_for": [ diff --git a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/lfric_coupled/Makefile b/applications/lfric_coupled/Makefile index 10b57aa7a..3954e7075 100644 --- a/applications/lfric_coupled/Makefile +++ b/applications/lfric_coupled/Makefile @@ -102,7 +102,7 @@ document-api: api-documentation build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = TRUE build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) -build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/.. build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR)/$(PROJECT_NAME) diff --git a/applications/lfric_coupled/build/compile_options.mk b/applications/lfric_coupled/build/compile_options.mk index 10ad895f2..9623d56e1 100644 --- a/applications/lfric_coupled/build/compile_options.mk +++ b/applications/lfric_coupled/build/compile_options.mk @@ -9,7 +9,8 @@ $(info UM physics specific compile options for $(FORTRAN_COMPILER) compiler) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) +casim/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) +ukca/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) jules/%.o jules/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) socrates/%.o socrates/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) legacy/%.o legacy/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/lfric_coupled/example/configuration.nml b/applications/lfric_coupled/example/configuration.nml index f54da4162..e160a8be8 100644 --- a/applications/lfric_coupled/example/configuration.nml +++ b/applications/lfric_coupled/example/configuration.nml @@ -408,6 +408,7 @@ tau_u=0.55, &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 index 51e577a87..8f961d706 100644 --- a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 +++ b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 @@ -134,7 +134,7 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & character(str_def) :: prime_mesh_name -integer(i_def) :: stencil_depth +integer(i_def) :: stencil_depth(1) integer(i_def) :: geometry real(r_def) :: domain_bottom real(r_def) :: scaled_radius diff --git a/applications/linear_model/example/configuration.nml b/applications/linear_model/example/configuration.nml index 5ed21fc6c..6c85616bc 100644 --- a/applications/linear_model/example/configuration.nml +++ b/applications/linear_model/example/configuration.nml @@ -154,6 +154,7 @@ write_minmax_tseries=.false., fixed_ls=.false. pert_option='analytic', l_stabilise_bl=.false., +transport_efficiency=.false., / &logging run_log_level='info', @@ -226,6 +227,7 @@ spinup_alpha=.false., &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj = 'upwind', @@ -262,11 +264,11 @@ panel_edge_high_order=.true., panel_edge_treatment='none' reversible=.false.,.false.,.false.,.false.,.false. runge_kutta_method='ssp3' -scheme=1,1,1,1,1 +scheme=5*3 si_outer_transport='none', slice_order='parabola' special_edges_monotone=5*1 -splitting=1,1,1,1,1 +splitting=5*2 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' diff --git a/applications/linear_model/example/iodef.xml b/applications/linear_model/example/iodef.xml index d685e7e88..e00c7e843 100644 --- a/applications/linear_model/example/iodef.xml +++ b/applications/linear_model/example/iodef.xml @@ -80,9 +80,9 @@ - - - + + + @@ -134,6 +134,8 @@ + + @@ -180,6 +182,8 @@ + + diff --git a/applications/linear_model/example_file/config_linear.nml b/applications/linear_model/example_file/config_linear.nml index 18df08580..301120422 100644 --- a/applications/linear_model/example_file/config_linear.nml +++ b/applications/linear_model/example_file/config_linear.nml @@ -222,6 +222,7 @@ spinup_alpha=.false., &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj = 'upwind', diff --git a/applications/linear_model/example_file/config_nonlinear.nml b/applications/linear_model/example_file/config_nonlinear.nml index b32d3f15b..e14b9d6bb 100644 --- a/applications/linear_model/example_file/config_nonlinear.nml +++ b/applications/linear_model/example_file/config_nonlinear.nml @@ -216,6 +216,7 @@ spinup_alpha=.false., &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj = 'upwind' diff --git a/applications/linear_model/plot_convergence/plot_convergence.sh b/applications/linear_model/plot_convergence/plot_convergence.sh deleted file mode 100755 index ab6e366a5..000000000 --- a/applications/linear_model/plot_convergence/plot_convergence.sh +++ /dev/null @@ -1,83 +0,0 @@ -############################################################################## -# (c) Crown copyright 2022 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## - -#---------------------------------------------------------------------- -# Plots the convergence rate of the tangent linear model. -#---------------------------------------------------------------------- - -# INSTRUCTIONS TO RUN -# 1. Specify CONFIG -# 2. Run using . plot_convergence.sh, from the plot_convergence directory - -# SCIENCE DETAILS -# The relative linearisation error is -# E = || N(x+ gamma x') - N(x) - L(x) gamma x' || / || L(x) gamma x' || -# where N=nonlinear model, L=linear model, x=linearisation state -# x'=perturbation, gamma=scalar. -# From the Taylor series expansion, E(gamma) = O(gamma) i.e. of the order gamma -# So the relative error should be a linear function of gamma - -# SCRIPT STEPS -# 1. Produce the data: The integration test tl_test_timesteps is extended by -# running over 10 values of gamma, rather than 2 values of gamma. -# 2. Plot the data: The data is plotted for each prognostic variable. - -# EXTENSION -# The plot_configuration.nml can also be extended to other configurations e.g -# * increase the number of timesteps (timesteps_end) -# * increase the number of timesteps between updating the linearisation state -# (update_ls_frequency) - -#-------------------------------------------------------------------------- - -# CONFIG can be specified as either runge_kutta or semi_implicit -CONFIG=semi_implicit - -# Define directories using the current working directory -Working_dir=$PWD -Linear_dir="$(dirname "$PWD")" - -# Integration tests executable name -exe=$Linear_dir/test/$CONFIG - -# Build the integration tests, unless that has already been completed -if [ -f $exe ] ; then - echo "Do not need to build the executable as $exe exists" -else - echo "$exe does not exist, so now building the executable" - cd $Linear_dir - make integration-tests - - if [$? -ne 0 ]; then - echo "Error building the executable" - return - fi -fi - -# Setup the configuration - to test with 10 values of gamma -cd $Linear_dir/test/test_files/$CONFIG -cp ${CONFIG}_configuration.nml plot_configuration.nml -sed -i 's/number_gamma_values=2/number_gamma_values=10/g' plot_configuration.nml -if [ $? -ne 0 ]; then - echo "Error in creating plot_configuration.nml" - return -fi - -# Run the tl_test_timesteps integration test -echo "Running the integration test" -../../$CONFIG plot_configuration.nml test_timesteps > outfile -if [ $? -ne 0 ]; then - echo "Error in creating outfile data" - return -else - echo "Data created successfully" -fi - -# Plot the data, together with the expected gradient -echo "Plotting the data" -python $Working_dir/plot_convergence.py - - diff --git a/applications/linear_model/rose-meta/lfric-linear_model/versions.py b/applications/linear_model/rose-meta/lfric-linear_model/versions.py index 8418438c1..2d3f6a52e 100644 --- a/applications/linear_model/rose-meta/lfric-linear_model/versions.py +++ b/applications/linear_model/rose-meta/lfric-linear_model/versions.py @@ -126,3 +126,123 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/applications/name_transport/example/configuration.nml b/applications/name_transport/example/configuration.nml index 3bcb4b2f4..daaa66420 100644 --- a/applications/name_transport/example/configuration.nml +++ b/applications/name_transport/example/configuration.nml @@ -129,6 +129,7 @@ runge_kutta_method='forward_euler', &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/applications/name_transport/rose-meta/lfric-name_transport/versions.py b/applications/name_transport/rose-meta/lfric-name_transport/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/name_transport/rose-meta/lfric-name_transport/versions.py +++ b/applications/name_transport/rose-meta/lfric-name_transport/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/name_transport/source/driver/name_transport_driver_mod.f90 b/applications/name_transport/source/driver/name_transport_driver_mod.f90 index c63fc8088..a5783624a 100644 --- a/applications/name_transport/source/driver/name_transport_driver_mod.f90 +++ b/applications/name_transport/source/driver/name_transport_driver_mod.f90 @@ -109,12 +109,12 @@ subroutine initialise_name_transport( program_name, modeldb ) character(len=str_def), allocatable :: shifted_names(:) character(len=str_def), allocatable :: double_names(:) character(len=str_def) :: prime_mesh_name + integer(kind=i_def), allocatable :: stencil_depths(:) logical(kind=l_def) :: prepartitioned logical(kind=l_def) :: apply_partition_check integer(kind=i_def) :: geometry - integer(kind=i_def) :: stencil_depth real(kind=r_def) :: domain_bottom real(kind=r_def) :: domain_height real(kind=r_def) :: scaled_radius @@ -237,14 +237,18 @@ subroutine initialise_name_transport( program_name, modeldb ) ! 1.3a Initialise prime/2d meshes ! --------------------------------------------------------- - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(num_base_meshes)) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, modeldb%configuration & + ) + apply_partition_check = .false. call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & - extrusion, stencil_depth, & + extrusion, stencil_depths, & apply_partition_check ) call create_mesh( base_mesh_names, extrusion_2d, & @@ -351,11 +355,19 @@ subroutine initialise_name_transport( program_name, modeldb ) end if - if (allocated(base_mesh_names)) deallocate(base_mesh_names) - if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) - if (allocated(meshes_to_double)) deallocate(meshes_to_double) - + if (allocated(base_mesh_names)) deallocate(base_mesh_names) + if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) + if (allocated(meshes_to_double)) deallocate(meshes_to_double) + if (allocated(twod_names)) deallocate(twod_names) + if (allocated(shifted_names)) deallocate(shifted_names) + if (allocated(double_names)) deallocate(double_names) + if (allocated(extrusion)) deallocate(extrusion) + if (allocated(extrusion_2d)) deallocate(extrusion_2d) + if (allocated(extrusion_shifted)) deallocate(extrusion_shifted) + if (allocated(extrusion_double)) deallocate(extrusion_double) + if (allocated(stencil_depths)) deallocate(stencil_depths) if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) + nullify(chi_inventory, panel_id_inventory, mesh) end subroutine initialise_name_transport diff --git a/applications/ngarch/Makefile b/applications/ngarch/Makefile index 4c3ca1f69..a645cd3d2 100644 --- a/applications/ngarch/Makefile +++ b/applications/ngarch/Makefile @@ -100,7 +100,7 @@ document-api: api-documentation build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = TRUE build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) -build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/.. build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR) diff --git a/applications/ngarch/build/compile_options.mk b/applications/ngarch/build/compile_options.mk index 810698d65..4ef9b69bd 100644 --- a/applications/ngarch/build/compile_options.mk +++ b/applications/ngarch/build/compile_options.mk @@ -13,7 +13,8 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +casim/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +ukca/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o jules/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o socrates/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o legacy/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/ngarch/build/psyclone_transmute_file_list.mk b/applications/ngarch/build/psyclone_transmute_file_list.mk index a2cf17195..da9997e42 100644 --- a/applications/ngarch/build/psyclone_transmute_file_list.mk +++ b/applications/ngarch/build/psyclone_transmute_file_list.mk @@ -15,17 +15,33 @@ # Choose which files to Pre-proccess and PSyclone from physics / FCM UM source. export PSYCLONE_PHYSICS_FILES = \ + bl_lsp \ + bl_diags_mod \ bm_tau_kernel_mod \ + btq_int \ + conv_gr_kernel_mod \ + ex_flux_tq \ + ex_flux_uv \ + fm_drag \ gw_ussp_mod \ + imp_mix \ + jules_exp_kernel_mod \ + jules_extra_kernel_mod \ + jules_imp_kernel_mod \ + kmkh \ + kmkhz_9c_wtrac \ lw_kernel_mod \ mphys_kernel_mod \ pc2_initiation_kernel_mod \ pc2_conv_coupling_kernel_mod \ sw_kernel_mod \ - ukca_aero_ctl \ + sw_rad_tile_kernel_mod \ + tr_mix \ + ukca_aero_ctl \ ukca_chemistry_ctl_full_mod \ ukca_main1-ukca_main1 + ##### TRANSMUTE_INCLUDE_METHOD specify_include ##### # List to use PSyclone explicitly without any opt script diff --git a/applications/ngarch/example/configuration_bl.nml b/applications/ngarch/example/configuration_bl.nml index 87c3e5318..22e22b87f 100644 --- a/applications/ngarch/example/configuration_bl.nml +++ b/applications/ngarch/example/configuration_bl.nml @@ -483,6 +483,7 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, +adjust_tracer_equation=.false. adjust_vhv_wind=.true., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/ngarch/example/configuration_casim.nml b/applications/ngarch/example/configuration_casim.nml index 4db857e52..fedbde276 100644 --- a/applications/ngarch/example/configuration_casim.nml +++ b/applications/ngarch/example/configuration_casim.nml @@ -543,6 +543,7 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, +adjust_tracer_equation=.false. adjust_vhv_wind=.true., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/ngarch/rose-meta/lfric-ngarch/versions.py b/applications/ngarch/rose-meta/lfric-ngarch/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/ngarch/rose-meta/lfric-ngarch/versions.py +++ b/applications/ngarch/rose-meta/lfric-ngarch/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 b/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 index 27cac265b..e2ba03076 100644 --- a/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 +++ b/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 @@ -57,7 +57,7 @@ contains water_extraction, lake_evap, & theta_star_surf, qv_star_surf, & recip_l_mo_sea, rhostar, & - h_blend_orog, t1_sd_2d, q1_sd_2d + t1_sd_2d, q1_sd_2d type( field_array_type ), pointer :: mr type(field_collection_type), pointer :: prognostic_fields, & @@ -121,7 +121,7 @@ contains turbulence_fields, convection_fields, cloud_fields, & surface_fields, soil_fields, snow_fields, & aerosol_fields, recip_l_mo_sea, rhostar, & - h_blend_orog, t1_sd_2d, q1_sd_2d ) + t1_sd_2d, q1_sd_2d ) ! Call the algorithm call log_event( "Running BOUNDARY LAYER EXP", LOG_LEVEL_INFO ) @@ -136,7 +136,7 @@ contains cloud_fields, & surface_fields, & recip_l_mo_sea, rhostar, & - h_blend_orog, t1_sd_2d, q1_sd_2d, & + t1_sd_2d, q1_sd_2d, & modeldb%clock ) call log_event( "Running BOUNDARY LAYER IMP", LOG_LEVEL_INFO ) diff --git a/applications/shallow_water/example/configuration.nml b/applications/shallow_water/example/configuration.nml index d4ab292f9..94bc7b36e 100644 --- a/applications/shallow_water/example/configuration.nml +++ b/applications/shallow_water/example/configuration.nml @@ -178,6 +178,7 @@ tau_u = 0.0 &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection = .true. calculate_detj = 'upwind' diff --git a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 index 40ac6cf93..df1fb2bd8 100644 --- a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 +++ b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 @@ -83,6 +83,7 @@ subroutine initialise_infrastructure( program_name, modeldb) character(str_def), allocatable :: base_mesh_names(:) character(str_def), allocatable :: twod_names(:) + integer(i_def), allocatable :: stencil_depths(:) class(extrusion_type), allocatable :: extrusion type(uniform_extrusion_type), allocatable :: extrusion_2d @@ -93,7 +94,6 @@ subroutine initialise_infrastructure( program_name, modeldb) character(str_def) :: prime_mesh_name - integer(i_def) :: stencil_depth integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers @@ -180,13 +180,14 @@ subroutine initialise_infrastructure( program_name, modeldb) ! Initialise prime/2d meshes ! --------------------------------------------------------- check_partitions = .false. - stencil_depth = get_required_stencil_depth() - + allocate(stencil_depths(size(base_mesh_names))) + call get_required_stencil_depth( stencil_depths, base_mesh_names, & + modeldb%configuration ) call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, extrusion, & - stencil_depth, check_partitions ) + stencil_depths, check_partitions ) allocate( twod_names, source=base_mesh_names ) @@ -223,6 +224,8 @@ subroutine initialise_infrastructure( program_name, modeldb) call create_runtime_constants() deallocate(base_mesh_names) + deallocate(twod_names) + deallocate(stencil_depths) nullify(chi_inventory, panel_id_inventory) end subroutine initialise_infrastructure diff --git a/applications/solver/source/solver.F90 b/applications/solver/source/solver.F90 index 65d816094..2aa4b8246 100644 --- a/applications/solver/source/solver.F90 +++ b/applications/solver/source/solver.F90 @@ -87,7 +87,7 @@ program solver character(str_def) :: prime_mesh_name - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers diff --git a/applications/transport/example/configuration.nml b/applications/transport/example/configuration.nml index e240dc3ad..297bf9328 100644 --- a/applications/transport/example/configuration.nml +++ b/applications/transport/example/configuration.nml @@ -98,6 +98,7 @@ y2=0.0, &transport adjust_theta=.false. adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/applications/transport/rose-meta/lfric-transport/versions.py b/applications/transport/rose-meta/lfric-transport/versions.py index 8418438c1..8bab40a9e 100644 --- a/applications/transport/rose-meta/lfric-transport/versions.py +++ b/applications/transport/rose-meta/lfric-transport/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/applications/transport/source/driver/transport_driver_mod.f90 b/applications/transport/source/driver/transport_driver_mod.f90 index 18a4a756b..5b23c6dbc 100644 --- a/applications/transport/source/driver/transport_driver_mod.f90 +++ b/applications/transport/source/driver/transport_driver_mod.f90 @@ -126,6 +126,7 @@ subroutine initialise_transport( program_name, modeldb ) character(len=str_def), allocatable :: chain_mesh_tags(:) character(len=str_def) :: aerosol_mesh_name character(len=str_def) :: prime_mesh_name + integer(kind=i_def), allocatable :: stencil_depths(:) logical(kind=l_def) :: use_multires_coupling logical(kind=l_def) :: l_multigrid @@ -133,7 +134,6 @@ subroutine initialise_transport( program_name, modeldb ) logical(kind=l_def) :: apply_partition_check integer(kind=i_def) :: geometry - integer(kind=i_def) :: stencil_depth real(kind=r_def) :: domain_bottom real(kind=r_def) :: domain_height real(kind=r_def) :: scaled_radius @@ -284,7 +284,11 @@ subroutine initialise_transport( program_name, modeldb ) ! 1.3a Initialise prime/2d meshes ! --------------------------------------------------------- - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(num_base_meshes)) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, modeldb%configuration & + ) + apply_partition_check = .false. if ( .not. prepartitioned .and. & ( l_multigrid .or. use_multires_coupling ) ) then @@ -295,7 +299,7 @@ subroutine initialise_transport( program_name, modeldb ) modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & - extrusion, stencil_depth, & + extrusion, stencil_depths, & apply_partition_check ) call create_mesh( base_mesh_names, extrusion_2d, & @@ -447,11 +451,20 @@ subroutine initialise_transport( program_name, modeldb ) end if - if (allocated(base_mesh_names)) deallocate(base_mesh_names) - if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) - if (allocated(meshes_to_double)) deallocate(meshes_to_double) - + if (allocated(base_mesh_names)) deallocate(base_mesh_names) + if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) + if (allocated(meshes_to_double)) deallocate(meshes_to_double) + if (allocated(twod_names)) deallocate(twod_names) + if (allocated(shifted_names)) deallocate(shifted_names) + if (allocated(double_names)) deallocate(double_names) + if (allocated(extrusion)) deallocate(extrusion) + if (allocated(extrusion_2d)) deallocate(extrusion_2d) + if (allocated(extrusion_shifted)) deallocate(extrusion_shifted) + if (allocated(extrusion_double)) deallocate(extrusion_double) + if (allocated(chain_mesh_tags)) deallocate(chain_mesh_tags) + if (allocated(stencil_depths)) deallocate(stencil_depths) if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) + nullify(chi_inventory, panel_id_inventory, mesh, aerosol_mesh) end subroutine initialise_transport diff --git a/build/extract/extract_physics.mk b/build/extract/extract_physics.mk index a4df2535b..7e43cd1b0 100644 --- a/build/extract/extract_physics.mk +++ b/build/extract/extract_physics.mk @@ -20,7 +20,4 @@ extract: # Retrieve and preprocess the UKCA and CASIM code - python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/build/extract/extract.yaml - $Qrsync -acvz $(SCRATCH_DIR)/ukca $(WORKING_DIR)/science/ - $Qrsync -acvz $(SCRATCH_DIR)/casim $(WORKING_DIR)/science/ - + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/build/extract/extract.yaml diff --git a/build/extract/extract_science.py b/build/extract/extract_science.py index 042fe6f32..845b87b01 100755 --- a/build/extract/extract_science.py +++ b/build/extract/extract_science.py @@ -1,35 +1,12 @@ import argparse -import subprocess import os -import tempfile import yaml -from shutil import rmtree from pathlib import Path -from typing import Dict, List +from get_git_sources import clone_and_merge, run_command +import logging -def run_command(command): - """ - Run a subprocess command and check output - Inputs: - - command, str with command to run - """ - command = command.split() - result = subprocess.run( - command, - capture_output=True, - text=True, - timeout=120, - shell=False, - check=False, - ) - if result.returncode: - raise RuntimeError( - f"The command '{command}' failed with error:\n\n{result.stderr}" - ) - - -def load_yaml(fpath: Path) -> Dict: +def load_yaml(fpath: Path) -> dict: """ Read in the dependencies.yaml file """ @@ -40,56 +17,45 @@ def load_yaml(fpath: Path) -> Dict: return sources -def clone_dependency(values: Dict, temp_dep: Path) -> None: - """ - Clone the physics dependencies into a temporary directory - """ - - source = values["source"] - ref = values["ref"] - - commands = ( - f"git -C {temp_dep} init", - f"git -C {temp_dep} remote add origin {source}", - f"git -C {temp_dep} fetch origin {ref}", - f"git -C {temp_dep} checkout FETCH_HEAD" - ) - for command in commands: - run_command(command) - - -def extract_files(dependency: str, values: Dict, files: List[str], working: Path): +def extract_files(dependencies: dict, extract_lists: dict, working: Path) -> None: """ Clone the dependency to a temporary location Then copy the desired files to the working directory Then delete the temporary directory """ - tempdir = Path(tempfile.mkdtemp()) - if ( - "PHYSICS_ROOT" not in os.environ - or not Path(os.environ["PHYSICS_ROOT"]).exists() - ): - temp_dep = tempdir / dependency - temp_dep.mkdir(parents=True) - clone_dependency(values, temp_dep) - else: - temp_dep = Path(os.environ["PHYSICS_ROOT"]) / dependency - - working_dep = working / dependency - - # make the working directory location - working_dep.mkdir(parents=True) - - for extract_file in files: - source_file = temp_dep / extract_file - dest_file = working_dep / extract_file - run_command(f"mkdir -p {dest_file.parents[0]}") - copy_command = f"cp -r {source_file} {dest_file}" + mirror_loc = os.getenv("MIRROR_LOC", "") + use_mirrors = bool(mirror_loc) + mirror_loc = Path(mirror_loc) + + for dependency, sources in dependencies.items(): + if dependency not in extract_lists: + continue + files = extract_lists[dependency] + + # If the PHYSICS_ROOT environment variable is provided, then use sources there + if "PHYSICS_ROOT" in os.environ and Path(os.environ["PHYSICS_ROOT"]).exists(): + clone_loc = Path(os.environ["PHYSICS_ROOT"]) / dependency + else: + clone_loc = working.parent / "scratch" / dependency + clone_and_merge(dependency, sources, clone_loc, use_mirrors, mirror_loc) + + # make the working directory location + working_dir = working / dependency + working_dir.mkdir(parents=True, exist_ok=True) + + # rsync extract files from clone loc to the working directory + copy_command = "rsync --include='**/' " + for extract_file in files: + if not extract_file: + continue + if Path(clone_loc / extract_file).is_dir(): + extract_file = extract_file.rstrip("/") + extract_file += "/**" + copy_command += f"--include='{extract_file}' " + copy_command += f"--exclude='*' -avmq {clone_loc}/ {working_dir}" run_command(copy_command) - rmtree(tempdir) - def parse_args() -> argparse.Namespace: """ @@ -101,34 +67,30 @@ def parse_args() -> argparse.Namespace: "-d", "--dependencies", default="./dependencies.yaml", - help="The dependencies file for the apps working copy.", - ) - parser.add_argument( - "-w", "--working", default=".", help="Location to perform extract steps in." + help="The dependencies file for the apps working copy", ) + parser.add_argument("-w", "--working", default=".", help="Build location") parser.add_argument( "-e", "--extract", default="./extract.yaml", help="Path to file containing extract lists", ) - return parser.parse_args() + + args = parser.parse_args() + args.working = Path(args.working) + return args def main(): args: argparse.Namespace = parse_args() - extract_lists: Dict = load_yaml(args.extract) - dependencies: Dict = load_yaml(args.dependencies) - - for dependency in dependencies: - if dependency in extract_lists: - extract_files( - dependency, - dependencies[dependency], - extract_lists[dependency], - Path(args.working), - ) + logging.basicConfig(level=logging.INFO) + + extract_lists: dict = load_yaml(args.extract) + dependencies: dict = load_yaml(args.dependencies) + + extract_files(dependencies, extract_lists, args.working) if __name__ == "__main__": diff --git a/build/extract/get_git_sources.py b/build/extract/get_git_sources.py new file mode 100644 index 000000000..4bf5fd632 --- /dev/null +++ b/build/extract/get_git_sources.py @@ -0,0 +1,402 @@ +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +# ----------------------------------------------------------------------------- +""" +Helper functions for cloning git sources in command line builds +""" + +import re +import subprocess +from datetime import datetime +from typing import Optional, Union +from pathlib import Path +from shutil import rmtree +import shlex +import logging + +logger = logging.getLogger(__name__) + + +def run_command( + command: str, check: bool = True, capture: bool = True, timeout: int = 600 +) -> Optional[subprocess.CompletedProcess]: + """ + Run a subprocess command and return the result object + Inputs: + - command, str with command to run + Outputs: + - result object from subprocess.run + """ + + args = shlex.split(command) + + try: + result = subprocess.run( + args, + capture_output=capture, + text=capture, + timeout=timeout, + shell=False, + check=False, + ) + if check and result.returncode != 0: + err_msg = (result.stderr or "").strip() + logger.error(f"[FAIL] Command failed: {command}\nError: {err_msg}") + raise subprocess.CalledProcessError( + result.returncode, args, output=result.stdout, stderr=result.stderr + ) + return result + + except (subprocess.TimeoutExpired, FileNotFoundError) as e: + logger.error(f"[FAIL] Execution error for '{args[0]}': {e}") + raise + + +def validate_dependencies(dependencies: dict) -> None: + """ + Check that the dependencies file dictionary matches format expectations. + Each dictionary value should be a list of dictionaries (or a single dictionary) + Those dictionaries should have a "source" and a "ref" key + """ + for item, values in dependencies.items(): + failed = False + if isinstance(values, dict): + values = [values] + if not isinstance(values, list): + failed = True + else: + for entry in values: + if not isinstance(entry, dict) or ( + "source" not in entry or "ref" not in entry + ): + failed = True + if failed: + raise ValueError( + f"The dependency {item} does not contain a list of dictionaries (or a " + "single dictionary) with keys of 'source' and 'ref'.\nPlease edit your " + "dependencies.yaml file to satisfy this." + ) + + +def datetime_str() -> str: + """ + Create and return a datetime string at the current time + """ + return datetime.now().strftime("%Y-%m-%d %H:%M:%S") + + +def clone_and_merge( + dependency: str, opts: Union[list, dict], loc: Path, use_mirrors: bool, mirror_loc: Path +) -> None: + """ + Wrapper script for calling get_source and merge_source for a single dependency + + dependency: name of the dependency + opts: dict or list of dicts for a dependency in the dependencies file + loc: path to location to clone to + use_mirrors: bool, use local git mirrors if true + mirror_loc: path to local git mirrors + """ + + if not isinstance(opts, list): + opts = [opts] + + for i, values in enumerate(opts): + if values["ref"] is None: + values["ref"] = "" + + # Clone the first provided source + if i == 0: + get_source( + values["source"], + values["ref"], + loc, + dependency, + use_mirrors, + mirror_loc, + ) + # For all other sources, attempt to merge into the first + else: + merge_source( + values["source"], + values["ref"], + loc, + dependency, + use_mirrors, + mirror_loc, + ) + + +def get_source( + source: str, + ref: str, + dest: Path, + repo: str, + use_mirrors: bool = False, + mirror_loc: Path = Path(""), +) -> None: + """ + Call functions to clone or rsync git source + """ + + if ".git" in source: + if use_mirrors: + logger.info( + f"[{datetime_str()}] Cloning {repo} from {mirror_loc} at ref {ref}" + ) + mirror_loc = Path(mirror_loc) / "MetOffice" / repo + clone_repo_mirror(source, ref, mirror_loc, dest) + else: + logger.info(f"[{datetime_str()}] Cloning {repo} from {source} at ref {ref}") + clone_repo(source, ref, dest) + else: + logger.info(f"[{datetime_str()}] Syncing {repo} at ref {ref}") + sync_repo(source, ref, dest) + + +def merge_source( + source: str, + ref: str, + dest: Path, + repo: str, + use_mirrors: bool = False, + mirror_loc: Path = Path(""), +) -> None: + """ + Merge git source into a local git clone. Assumes dest is a git clone that this + source can be merged into. + """ + + logger.info( + f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Merging " + f"{source} at ref {ref} into {repo}" + ) + + if use_mirrors: + remote_path = Path(mirror_loc) / "MetOffice" / repo + else: + remote_path = source + run_command(f"git -C {dest} remote add local {remote_path}") + + if use_mirrors: + fetch = determine_mirror_fetch(source, ref) + else: + fetch = ref + + run_command(f"git -C {dest} fetch local {fetch}") + command = f"git -C {dest} merge --no-gpg-sign FETCH_HEAD" + result = run_command(command, check=False) + if result.returncode: + unmerged_files = get_unmerged(dest) + if unmerged_files: + handle_merge_conflicts(source, ref, dest, repo) + else: + raise subprocess.CalledProcessError( + result.returncode, command, result.stdout, result.stderr + ) + + # Remove the added remote + run_command(f"git -C {dest} remote remove local") + + +def handle_merge_conflicts(source: str, ref: str, loc: Path, dependency: str) -> None: + """ + If merge conflicts are in `rose-stem/` or `dependencies.yaml` then accept the + current changes and mark as resolved. + If others remain then raise an error + """ + + # For suites, merge conflicts in these files/directories are unimportant so accept + # the current changes + for filepath in ("dependencies.yaml", "rose-stem"): + logger.warning(f"Ignoring merge conflicts in {filepath}") + run_command(f"git -C {loc} checkout --ours -- {filepath}") + run_command(f"git -C {loc} add {filepath}") + + # Check if there are any remaining merge conflicts + unmerged = get_unmerged(loc) + if unmerged: + files = "\n".join(f for f in unmerged) + raise RuntimeError( + "\nA merge conflict has been identified while merging the following branch " + f"into the {dependency} source:\n\nsource: {source}\nref: {ref}\n\n" + f"with conflicting files:{files}" + "\n\nThese will need changing in the source branches to be useable together" + ) + + +def get_unmerged(loc: Path) -> list[str]: + """ + Return list of unmerged files in a git clone + """ + + files = run_command(f"git -C {loc} --no-pager diff --name-only --diff-filter=U") + return files.stdout.split() + + +def clone_repo_mirror( + repo_source: str, + repo_ref: str, + mirror_loc: Path, + loc: Path, +) -> None: + """ + Clone a repo source using a local git mirror. + Assume the mirror is set up as per the Met Office + - repo_source: ssh url of the source repository + - repo_ref: git ref for the source. An empty string will get the default branch + - mirror_loc: path to the local git mirrors + - loc: path to clone the repository to + """ + + # If the repository exists and isn't a git repo, exit now as we don't want to + # overwrite it + if loc.exists(): + if not Path(loc / ".git").exists(): + raise RuntimeError( + f"The destination for the clone of {repo_source} already exists but " + "isn't a git directory. Exiting so as to not overwrite it." + ) + + # Clone if the repo doesn't exist + else: + command = f"git clone {mirror_loc} {loc}" + run_command(command) + + # If not provided a ref, pull the latest repository and return + if not repo_ref: + run_command(f"git -C {loc} pull") + return + + fetch = determine_mirror_fetch(repo_source, repo_ref) + commands = ( + f"git -C {loc} fetch origin {fetch}", + f"git -C {loc} checkout FETCH_HEAD", + ) + for command in commands: + run_command(command) + + +def determine_mirror_fetch(repo_source: str, repo_ref: str) -> str: + """ + Determine the fetch ref for the git mirrors + """ + + repo_source = repo_source.removeprefix("git@github.com:") + user = repo_source.split("/")[0] + # Check that the user is different to the Upstream User + if "MetOffice" in user: + user = None + + # If the ref is a hash then we don't need the fork user as part of the fetch. + # Equally, if the user is the Upstream User, it's not needed + if not user or re.match(r"^\s*([0-9a-f]{40})\s*$", repo_ref): + fetch = repo_ref + else: + fetch = f"{user}/{repo_ref}" + + return fetch + + +def clone_repo(repo_source: str, repo_ref: str, loc: Path) -> None: + """ + Clone the repo and checkout the provided ref + Only if a remote source + - repo_source: ssh url of the source repository + - repo_ref: git ref for the source. An empty string will get the default branch + - loc: path to clone the repository to + """ + + if not loc.exists(): + # Create a clean clone location + loc.mkdir(parents=True) + + # This process is equivalent to doing a git clone + # It saves a small amount of space by not fetching all refs + commands = ( + f"git -C {loc} init", + f"git -C {loc} remote add origin {repo_source}", + f"git -C {loc} fetch origin {repo_ref}", + f"git -C {loc} checkout FETCH_HEAD", + f"git -C {loc} fetch origin main:main", + ) + for command in commands: + run_command(command) + else: + commands = ( + f"git -C {loc} fetch origin {repo_ref}", + f"git -C {loc} checkout FETCH_HEAD", + ) + for command in commands: + run_command(command) + + +def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: + """ + Rsync a local git clone and checkout the provided ref + """ + + # Remove if this clone already exists + if loc.exists(): + rmtree(loc) + + # Create a clean clone location + loc.mkdir(parents=True) + + exclude_dirs = [] + try: + host, path = repo_source.split(":", 1) + result = run_command(f"ssh {host} git -C {path} status --ignored -s") + except ValueError: + # In case the path does not contain `host:` - see if it can be accessed locally + result = run_command(f"git -C {repo_source} status --ignored -s") + for ignore_file in result.stdout.split("\n"): + ignore_file = ignore_file.strip() + if not ignore_file.startswith("!!"): + continue + ignore_file = ignore_file.removeprefix("!!").strip() + exclude_dirs.append(ignore_file) + + # Trailing slash required for rsync + command = f"rsync -av {repo_source}/ {loc}" + for item in exclude_dirs: + command = f"{command} --exclude '{item}'" + run_command(command) + + # Fetch the main branch from origin + # Ignore errors - these are likely because the main branch already exists + # Instead write them as warnings + command = f"git -C {loc} fetch origin main:main" + result = run_command(command, check=False) + if result and result.returncode: + logger.warning( + "Fetching main from origin resulted in an error." + "This is likely due to the main branch already existing" + f"\nError message:\n\n{result.stderr}" + ) + + if repo_ref: + command = f"git -C {loc} checkout {repo_ref}" + run_command(command) + + +def set_https(dependencies: dict) -> dict: + """ + Change sources in a dependencies dictionary to use https instead of ssh + """ + + logger.info("Modifying Dependencies to use https") + for dependency, opts in dependencies.items(): + if not isinstance(opts, list): + opts = [opts] + for i, values in enumerate(opts): + if values["source"].startswith("git@github.com:"): + values["source"] = values["source"].replace( + "git@github.com:", "https://github.com/" + ) + opts[i] = values + dependencies[dependency] = opts + + return dependencies diff --git a/build/local_build.py b/build/local_build.py index 988efe3e6..7f66e614c 100755 --- a/build/local_build.py +++ b/build/local_build.py @@ -17,8 +17,9 @@ import subprocess import argparse import yaml +import logging from pathlib import Path -import shutil +from extract.get_git_sources import clone_and_merge def subprocess_run(command): @@ -47,7 +48,7 @@ def get_root_path(): Get the root path of the current working copy """ - return os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + return Path(__file__).absolute().parent.parent def determine_core_source(root_dir): @@ -58,7 +59,7 @@ def determine_core_source(root_dir): # Read through the dependencies file and populate revision and source # variables for requested repo - with open(os.path.join(root_dir, "dependencies.yaml"), "r") as stream: + with open(root_dir / "dependencies.yaml", "r") as stream: dependencies = yaml.safe_load(stream) return dependencies["lfric_core"] @@ -72,9 +73,9 @@ def determine_project_path(project, root_dir): # Find the project in either science/ interfaces/ or applications/ for drc in ["science/", "interfaces/", "applications/"]: - path = os.path.join(root_dir, drc) + path = root_dir / drc for item in os.listdir(path): - item_path = os.path.join(path, item) + item_path = path / item if item_path and item == project: return item_path @@ -84,45 +85,6 @@ def determine_project_path(project, root_dir): ) -def clone_dependency(source, ref, temp_dep): - """ - Clone the physics dependencies into a temporary directory - """ - - commands = ( - f"git -C {temp_dep} init", - f"git -C {temp_dep} remote add origin {source}", - f"git -C {temp_dep} fetch origin {ref}", - f"git -C {temp_dep} checkout FETCH_HEAD" - ) - for command in commands: - subprocess_run(command) - - -def get_lfric_core(core_source, working_dir): - """ - Clone the lfric_core source if the source is a git url - rsync this export into the working dir as the lfric_core source - done so - incremental builds can still be used. - If core_source is a local working copy just rsync from there. - """ - - if core_source["source"].endswith(".git"): - print("Cloning LFRic Core from Github") - lfric_core_loc = Path(working_dir) / "scratch" / "core" - if lfric_core_loc.exists(): - shutil.rmtree(lfric_core_loc) - lfric_core_loc.mkdir(parents=True) - clone_dependency(core_source["source"], core_source["ref"], lfric_core_loc) - print("rsyncing the exported lfric_core source") - else: - lfric_core_loc = core_source["source"] - print("rsyncing the local lfric_core source") - - rsync_command = f"rsync -acvzq {lfric_core_loc}/ {working_dir}/lfric_core" - subprocess_run(rsync_command) - - def build_makefile( root_dir, project_path, @@ -132,7 +94,6 @@ def build_makefile( target, optlevel, psyclone, - um_fcm_platform, verbose, ): """ @@ -142,21 +103,19 @@ def build_makefile( if target == "clean": working_path = working_dir else: - working_path = os.path.join(working_dir, f"{target}_{project}") + working_path = working_dir / f"{target}_{project}" print(f"Calling make command for makefile at {project_path}") make_command = ( f"make {target} -C {project_path} -j {ncores} " f"WORKING_DIR={working_path} " - f"CORE_ROOT_DIR={working_dir}/lfric_core " + f"CORE_ROOT_DIR={working_dir / 'scratch' / 'lfric_core'} " f"APPS_ROOT_DIR={root_dir} " ) if optlevel: make_command += f"PROFILE={optlevel} " if psyclone: make_command += f"PSYCLONE_TRANSFORMATION={psyclone} " - if um_fcm_platform: - make_command += f"UM_FCM_TARGET_PLATFORM={um_fcm_platform} " if verbose: make_command += "VERBOSE=1 " @@ -173,20 +132,31 @@ def main(): ) parser.add_argument( "project", - help="project to build. Will search in both " - "science and projects dirs.", + help="project to build. Will search in both science and projects dirs.", ) parser.add_argument( "-c", "--core_source", default=None, - help="Source for lfric_core. Defaults to looking in " "dependencies file.", + help="Source for lfric_core. Defaults to looking in dependencies file.", + ) + parser.add_argument( + "-m", + "--mirrors", + action="store_true", + help="If true, attempts to use local git mirrors", + ) + parser.add_argument( + "--mirror_loc", + default="/data/users/gitassist/git_mirrors", + help="Location of github mirrors", ) parser.add_argument( "-w", "--working_dir", default=None, - help="Working directory where builds occur. Default to the project " + type=Path, + help="Working directory where builds occur. Defaults to the project " "directory in the working copy.", ) parser.add_argument( @@ -199,7 +169,7 @@ def main(): "-t", "--target", default="build", - help="The makefile target, eg. unit-tests, clean, etc. Default " "of build.", + help="The makefile target, eg. unit-tests, clean, etc. Default of build.", ) parser.add_argument( "-o", @@ -215,14 +185,6 @@ def main(): help="Value passed to PSYCLONE_TRANSFORMATION variable in makefile. " "Defaults to the makefile default", ) - parser.add_argument( - "-u", - "--um_fcm_platform", - default=None, - help="Value passed to UM_FCM_TARGET_PLATFORM variable in makefile, " - "used for build settings for extracted UM physics. Defaults to the " - "makefile default.", - ) parser.add_argument( "-v", "--verbose", @@ -231,6 +193,12 @@ def main(): ) args = parser.parse_args() + logging.basicConfig(level=logging.INFO) + + # If using mirrors, set environment variable for science extract step + if args.mirrors: + os.environ["USE_MIRRORS"] = args.mirror_loc + # Find the root directory of the working copy root_dir = get_root_path() @@ -239,24 +207,26 @@ def main(): # Set the working dir default of the project directory if not args.working_dir: - args.working_dir = os.path.join(project_path, "working") + args.working_dir = Path(project_path) / "working" else: # If the working dir doesn't end in working, set that here - if not args.working_dir.strip("/").endswith("working"): - args.working_dir = os.path.join(args.working_dir, "working") - # Ensure that working_dir is an absolute path - args.working_dir = os.path.abspath(args.working_dir) - # Create the working_dir - subprocess_run(f"mkdir -p {args.working_dir}") + if not args.working_dir.name == "working": + args.working_dir = Path(args.working_dir) / "working" + # Ensure that working_dir is an absolute path and make the directory + args.working_dir = args.working_dir.resolve() + args.working_dir.mkdir(parents=True, exist_ok=True) # Determine the core source if not provided if args.core_source is None: core_source = determine_core_source(root_dir) else: - core_source = {"source": args.core_source} + core_source = {"source": args.core_source, "ref": ""} + + if not isinstance(core_source, list): + core_source = [core_source] - # Export and rsync the lfric_core source - get_lfric_core(core_source, args.working_dir) + core_loc = args.working_dir / "scratch" / "lfric_core" + clone_and_merge("lfric_core", core_source, core_loc, args.mirrors, args.mirror_loc) # Build the makefile build_makefile( @@ -268,7 +238,6 @@ def main(): args.target, args.optlevel, args.psyclone, - args.um_fcm_platform, args.verbose, ) diff --git a/documentation/source/developer_guide/local_builds.rst b/documentation/source/developer_guide/local_builds.rst index 9e5bd9310..c57f67e62 100644 --- a/documentation/source/developer_guide/local_builds.rst +++ b/documentation/source/developer_guide/local_builds.rst @@ -67,3 +67,19 @@ This table lists the command line arguments available: | | | will request verbose output | | | | from the makefile. | +----------------------+-----------------------------+-----------------------------+ +| ``-m --mirrors`` | False | If True, this will attempt | +| ``store_true`` | | to extract using local | +| | | github mirrors | ++----------------------+-----------------------------+-----------------------------+ +| ``--mirror-loc`` | MetOffice Mirror Location | The path to the github | +| | | mirror location | ++----------------------+-----------------------------+-----------------------------+ + +Incremental Builds +------------------ + +The local build script will attempt to build incrementally if a previous attempt +at the build exists. This should happen automatically if the working directory +is the same. If there are large changes then it may be sensible to start the +build afresh by cleaning the build ``-t clean`` (or deleting the working +directory). diff --git a/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst b/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst index 17be30420..2a664b051 100644 --- a/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst +++ b/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst @@ -9,18 +9,26 @@ LFRic atmosphere checkpoint/restart system ========================================== -The LFRic atmosphere ``lfric_atm`` application can be configured to generate a -checkpoint dump at the end of each model run. The checkpoint dump can be read in -by a new integration of the model allowing further timesteps to be run. The dump +The LFRic atmosphere ``lfric_atm`` application can be configured to generate +checkpoint dumps at multiple points within a model run. A checkpoint dump can be read in +by a new integration of the model allowing further timesteps to be run. Each dump is written using XIOS. Requesting checkpoint restart ----------------------------- Set ``checkpoint_write=.true.`` in the ``io`` namelist of the model -configuration to generate a checkpoint dump at the end of a model run. The -checkpoint dump will be named after the ``checkpoint_stem_name`` string in the -``files`` namelist appended with the number of the last timestep of the run. +configuration to turn on checkpoint writing. The times when checkpoint files +will be written are defined by the ``checkpoint_times`` list. The +``checkpoint_times`` must be real values in seconds corresponding to an integer +number of timesteps in the model run (e.g. if ``dt=0.5`` the +``checkpoint_times`` can include ``0.5`` and ``1.0`` etc. but **not** ``0.3``). +Setting ``end_of_run_checkpoint=.true.`` will write a checkpoint file at the end +of the run. Only one checkpoint file will be written at the end of a run even if +both the final timestep is included in the ``checkpoint_times`` list and the +``end_of_run_checkpoint`` flag is set to ``.true.``. The checkpoint dumps will +be named after the ``checkpoint_stem_name`` string in the ``files`` namelist +appended with timestep number of the checkpoint time. Set ``checkpoint_read=.true.`` in the ``io`` namelist to restart a run from an existing checkpoint dump. The expected start timestep will be defined by diff --git a/interfaces/coupled_interface/rose-meta/coupling/versions.py b/interfaces/coupled_interface/rose-meta/coupling/versions.py index 8418438c1..8bab40a9e 100644 --- a/interfaces/coupled_interface/rose-meta/coupling/versions.py +++ b/interfaces/coupled_interface/rose-meta/coupling/versions.py @@ -126,3 +126,48 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports diff --git a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py index 8418438c1..2d3f6a52e 100644 --- a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py @@ -126,3 +126,123 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 index 4530bade2..a4a287444 100644 --- a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 @@ -193,7 +193,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ aerosol_twod_mesh ) ! Instantiate the linearisation state - call linear_create_ls_analytic( modeldb, mesh ) + call linear_create_ls_analytic( modeldb, mesh, twod_mesh ) ! 4. Initialise the model 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 c630b998d..d1715d984 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 @@ -46,7 +46,7 @@ module atlas_field_interface_mod use field_mod, only : field_type, field_proxy_type use field_parent_mod, only : field_parent_type use fs_continuity_mod, only : W3, Wtheta, name_from_functionspace - use constants_mod, only : i_def, str_def, l_def + use constants_mod, only : i_def, str_def, l_def, r_def implicit none @@ -394,7 +394,7 @@ subroutine copy_to_lfric( self, return_code ) atlas_ij = self%map_horizontal(ij) lfric_ij = (ij-1)*n_vertical_lfric field_proxy%data(lfric_ij+lfric_kstart:lfric_ij+n_vertical_lfric) & - = self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij) + = real(self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij), r_def) end do ! Fill missing data if required @@ -410,7 +410,7 @@ subroutine copy_to_lfric( self, return_code ) atlas_ij = self%map_horizontal(ij) lfric_ij = (ij-1)*n_vertical_lfric field_proxy%data(lfric_ij+1) & - = self%atlas_data(atlas_kstart,atlas_ij) + = real(self%atlas_data(atlas_kstart,atlas_ij), r_def) end do end if @@ -466,7 +466,7 @@ subroutine copy_from_lfric_ad(self) lfric_ij = (ij-1)*n_vertical_lfric field_proxy%data(lfric_ij+lfric_kstart:lfric_ij+n_vertical_lfric) & = field_proxy%data(lfric_ij+lfric_kstart:lfric_ij+n_vertical_lfric) & - + self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij) + + real(self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij), r_def) end do ! Initialise out of scope variable to zero diff --git a/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 b/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 index b1ab23597..9f7185cd5 100644 --- a/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 @@ -21,7 +21,7 @@ !> ii) all three "moist_dyn" fields. !> module jedi_lfric_linear_fields_mod - use constants_mod, only : i_def, str_def, r_def + use constants_mod, only : i_def, str_def, r_def, l_def use field_mod, only : field_type use field_collection_mod, only : field_collection_type use fs_continuity_mod, only : W3, Wtheta, W2 @@ -35,6 +35,7 @@ module jedi_lfric_linear_fields_mod integer( kind=i_def ), parameter :: element_order_h = 0 integer( kind=i_def ), parameter :: element_order_v = 0 integer( kind=i_def ), parameter :: nvars = 10 + integer( kind=i_def ), parameter :: ls_nvars = 11 character( len=str_def ), parameter, public :: & variable_names(nvars) = (/'theta ', & 'exner ', & @@ -46,6 +47,18 @@ module jedi_lfric_linear_fields_mod 'm_cl ', & 'm_r ', & 'm_s '/) + character( len=str_def ), parameter, public :: & + ls_variable_names(ls_nvars) = (/'theta ', & + 'exner ', & + 'rho ', & + 'u_in_w3 ', & + 'v_in_w3 ', & + 'w_in_wth ', & + 'm_v ', & + 'm_cl ', & + 'm_r ', & + 'm_s ', & + 'land_fraction'/) integer( kind=i_def ), parameter, public :: & variable_function_spaces(nvars) = (/Wtheta, & @@ -58,6 +71,31 @@ module jedi_lfric_linear_fields_mod Wtheta, & Wtheta, & Wtheta/) + integer( kind=i_def ), parameter, public :: & + ls_variable_function_spaces(ls_nvars) = (/Wtheta, & + W3, & + W3, & + W3, & + W3, & + Wtheta, & + Wtheta, & + Wtheta, & + Wtheta, & + Wtheta, & + W3/) + + logical( kind=l_def ), parameter, public :: & + ls_variable_is_2d(ls_nvars) = (/.false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .true./) public :: create_linear_fields @@ -69,33 +107,42 @@ module jedi_lfric_linear_fields_mod !> @brief Create a field collection that includes the linear model variables !> !> @param [in] mesh Pointer to a mesh object +!> @param [in] twod_mesh Pointer to a 2D mesh object !> @param [out] linear_fields A field collection that includes the linear !> fields -subroutine create_linear_fields( mesh, linear_fields ) +subroutine create_linear_fields( mesh, twod_mesh, linear_fields ) implicit none type( mesh_type ), pointer, intent(in) :: mesh + type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), intent(out) :: linear_fields ! Local type( field_type ) :: field + type( mesh_type ), pointer :: mesh_for_field character( len=str_def ) :: variable_name integer :: i ! Setup the field_collection - call linear_fields%initialise(name = 'linear_state_trajectory', table_len = nvars) + call linear_fields%initialise(name = 'linear_state_trajectory', table_len = ls_nvars) ! Create and add the fields defined in the list of variable names - do i = 1, nvars + do i = 1, ls_nvars + + variable_name = trim(ls_variable_names(i)) - variable_name = trim(variable_names(i)) + if (ls_variable_is_2d(i)) then + mesh_for_field => twod_mesh + else + mesh_for_field => mesh + end if call field%initialise( & - vector_space = function_space_collection%get_fs(mesh, & + vector_space = function_space_collection%get_fs(mesh_for_field, & element_order_h, & element_order_v, & - variable_function_spaces(i)), & + ls_variable_function_spaces(i)), & name = variable_name ) call linear_fields%add_field( field ) diff --git a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 index 6857363e6..50fb9070b 100644 --- a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 +++ b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 @@ -10,6 +10,7 @@ module jedi_lfric_mesh_setup_mod use add_mesh_map_mod, only: assign_mesh_maps use base_mesh_config_mod, only: GEOMETRY_SPHERICAL, & GEOMETRY_PLANAR + use check_configuration_mod, only: get_required_stencil_depth use config_mod, only: config_type use constants_mod, only: str_def, i_def, l_def, r_def use create_mesh_mod, only: create_mesh @@ -65,7 +66,7 @@ subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_ integer(i_def), parameter :: one_layer = 1_i_def integer(i_def) :: geometry integer(i_def) :: extrusion_method - integer(i_def) :: stencil_depth + integer(i_def), allocatable :: stencil_depths(:) integer(i_def) :: number_of_layers integer(i_def) :: i real(r_def) :: domain_bottom @@ -125,14 +126,18 @@ subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_ !------------------------------------------------------------------------- ! 1.2 Create the required meshes !------------------------------------------------------------------------- - stencil_depth = 2 + + allocate(stencil_depths(size(base_mesh_names))) + call get_required_stencil_depth( stencil_depths, base_mesh_names, & + configuration ) + apply_partition_check = .false. call init_mesh( config, & mpi_obj%get_comm_rank(), & mpi_obj%get_comm_size(), & base_mesh_names, & extrusion, & - stencil_depth, & + stencil_depths, & apply_partition_check ) allocate( twod_names, source=base_mesh_names ) @@ -143,6 +148,11 @@ subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_ alt_name=twod_names ) call assign_mesh_maps(twod_names) + deallocate(twod_names) + deallocate(stencil_depths) + deallocate(extrusion) + if (allocated(extrusion_2d)) deallocate(extrusion_2d) + end subroutine initialise_mesh end module jedi_lfric_mesh_setup_mod diff --git a/interfaces/jules_interface/build/import.mk b/interfaces/jules_interface/build/import.mk index bb1c8870b..73b35d289 100644 --- a/interfaces/jules_interface/build/import.mk +++ b/interfaces/jules_interface/build/import.mk @@ -8,8 +8,7 @@ export PROJECT_SOURCE = $(APPS_ROOT_DIR)/interfaces/jules_interface/source .PHONY: import-jules_interface import-jules_interface: # Get a copy of the source code from the JULES repository - python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.yaml - $Qrsync -acvz $(SCRATCH_DIR)/jules $(WORKING_DIR)/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.yaml # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 index 555e5d24e..ee0bb5f8d 100644 --- a/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 @@ -64,7 +64,6 @@ contains !>@param[in] aerosol_fields Fields for aerosol scheme !>@param[in,out] recip_l_mo_sea Inverse Obukhov length over sea only !>@param[in,out] rhostar Surface density - !>@param[in,out] h_blend_orog Orographic blending height !>@param[in,out] t1_sd_2d StDev of level 1 temperature !>@param[in,out] q1_sd_2d StDev of level 1 humidity subroutine jules_exp_alg(modeldb, theta, mr_n, & @@ -73,7 +72,7 @@ contains turbulence_fields, convection_fields, & cloud_fields, surface_fields, soil_fields, & snow_fields, aerosol_fields, recip_l_mo_sea, & - rhostar, h_blend_orog, t1_sd_2d, q1_sd_2d) + rhostar, t1_sd_2d, q1_sd_2d) use psykal_lite_phys_mod, only: invoke_jules_exp_kernel_type use xios, only: xios_date, xios_get_current_date, & @@ -98,7 +97,6 @@ contains type( field_type ), intent( inout ) :: recip_l_mo_sea type( field_type ), intent( inout ) :: rhostar - type( field_type ), intent( inout ) :: h_blend_orog type( field_type ), intent( inout ) :: t1_sd_2d type( field_type ), intent( inout ) :: q1_sd_2d @@ -377,7 +375,6 @@ contains call zh%copy_field_properties(recip_l_mo_sea) call zh%copy_field_properties(rhostar) - call zh%copy_field_properties(h_blend_orog) call zh%copy_field_properties(t1_sd_2d) call zh%copy_field_properties(q1_sd_2d) @@ -449,7 +446,7 @@ contains flux_e, flux_h, urbwrr, & urbhwr, urbhgt, urbztm, urbdisp, & rhostar, recip_l_mo_sea, & - h_blend_orog, t1_sd_2d, q1_sd_2d, & + t1_sd_2d, q1_sd_2d, & gross_prim_prod, z0h_eff, ocn_cpl_point, & stencil_depth) diff --git a/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 index f529642ac..50a9db08c 100644 --- a/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 @@ -218,7 +218,7 @@ contains ! For jules_exp_alg ! not required for standalone, but required for boundary layer - type( field_type ) :: recip_l_mo_sea, rhostar, h_blend_orog + type( field_type ) :: recip_l_mo_sea, rhostar type( field_type ) :: t1_sd_2d, q1_sd_2d ! For jules_imp_alg @@ -288,7 +288,7 @@ contains turbulence_fields, convection_fields, cloud_fields, & surface_fields, soil_fields, snow_fields, & aerosol_fields, recip_l_mo_sea, rhostar, & - h_blend_orog, t1_sd_2d, q1_sd_2d) + t1_sd_2d, q1_sd_2d) ! Fields set up for jules_imp ! ncells is set to 1 after jules_exp so needs to be reset 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 27f10473f..24e2aceb5 100644 --- a/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 +++ b/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 @@ -46,7 +46,7 @@ module jules_exp_kernel_mod !> type, public, extends(kernel_type) :: jules_exp_kernel_type private - type(arg_type) :: meta_args(109) = (/ & + type(arg_type) :: meta_args(108) = (/ & arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! theta_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! exner_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, W3, STENCIL(REGION)), &! u_in_w3 @@ -150,7 +150,6 @@ module jules_exp_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), &! urbdisp arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! rhostar arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! recip_l_mo_sea - arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! h_blend_orog arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! t1_sd arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! q1_sd arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! diag__gross_prim_prod @@ -273,7 +272,6 @@ module jules_exp_kernel_mod !> @param[in] urbdisp Urban displacement height !> @param[in,out] rhostar_2d Surface density !> @param[in,out] recip_l_mo_sea_2d Inverse Obukhov length over sea only - !> @param[in,out] h_blend_orog_2d Orographic blending height !> @param[in,out] t1_sd_2d StDev of level 1 temperature !> @param[in,out] q1_sd_2d StDev of level 1 humidity !> @param[in,out] gross_prim_prod Diagnostic: Gross Primary Productivity @@ -424,7 +422,6 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & urbdisp, & rhostar_2d, & recip_l_mo_sea_2d, & - h_blend_orog_2d, & t1_sd_2d, & q1_sd_2d, & gross_prim_prod, & @@ -603,7 +600,6 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & z0m_eff, & ustar, & soil_moist_avail, & - h_blend_orog_2d, & recip_l_mo_sea_2d, & rhostar_2d, & t1_sd_2d, q1_sd_2d @@ -1678,7 +1674,6 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & ! variables passed to explicit BL rhostar_2d(map_2d(1,i)) = rhostar(i,1) recip_l_mo_sea_2d(map_2d(1,i)) = recip_l_mo_sea(i,1) - h_blend_orog_2d(map_2d(1,i)) = jules_vars%h_blend_orog_ij(i,1) t1_sd_2d(map_2d(1,i)) = t1_sd(i,1) q1_sd_2d(map_2d(1,i)) = q1_sd(i,1) diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk index aa704fa70..55dab07a2 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk @@ -13,6 +13,10 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute +# Set default PSyclone transmute command additional options +PSYCLONE_TRANSMUTE_EXTRAS ?= -l all +# + # Find the specific files we wish to pre-processed and PSyclone from physics source # Set our target dependency to the version of the file we are to generate after # the psycloning step. @@ -54,9 +58,9 @@ psyclone: $(SOURCE_F_FILES) $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py echo PSyclone with file override script $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -s $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< # Where a local optimisation script exists, use it. @@ -65,9 +69,9 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DSL)/$$*)local.py echo PSyclone with local script $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -s $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< # Where a global optimisation script exists, use it. @@ -75,7 +79,7 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DS $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/global.py echo PSyclone with global script $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -s $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk index 5c6370185..29ca28d04 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk @@ -13,6 +13,10 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute +# Set default PSyclone transmute command additional options +PSYCLONE_TRANSMUTE_EXTRAS ?= -l all +# + # Find the specific files we wish to pre-processed and PSyclone from physics source # Set our target dependency to the version of the file we are to generate after # the psycloning step. @@ -28,13 +32,13 @@ SOURCE_F_FILES_PASS := $(foreach THE_FILE, $(PSYCLONE_PASS_NO_SCRIPT), $(patsubs # psyclone_pass: $(SOURCE_F_FILES_PASS) -# PSyclone files back into f90 files. +# PSyclone files back into f90 files. # Where no optimisation script exists, don't use it. # $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 echo PSyclone pass with no optimisation applied, OMP and Clauses removed on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< diff --git a/interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py b/interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py new file mode 100644 index 000000000..35c1b1c32 --- /dev/null +++ b/interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py @@ -0,0 +1,50 @@ +# ----------------------------------------------------------------------------- +# (C) Crown copyright Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +# ----------------------------------------------------------------------------- +''' +Contains some functions which might assist in generating scripts, but otherwise +would not be used in the script actively. +''' + + +# Tool, not active part of script +def find_node_index(routine_children, find_lhs, find_rhs): + ''' + A tool to assist developers finding the index of a node to + use when spanning a parallel section. + You can use the variable name of the LHS and either the variable + name of the RHS (if it exists), or the name of the function used + on the RHS. + This is called with a list of routine_children inside a walk of the + routines in the PSyIR object. + ''' + for index, node in enumerate(routine_children): + list_of_attributes = [] + try: + list_of_attributes = node.walk(Assignment) + except AttributeError: + pass + + for assignment in list_of_attributes: + if str(assignment.lhs.name) == find_lhs: + found_rhs=False + print("#### New find ####") + print("found LHS") + print(index) + try: + print(assignment.rhs.ast) + if find_rhs in str(assignment.rhs.ast): + found_rhs = True + except: + pass + try: + if str(assignment.rhs.name) == find_rhs: + found_rhs = True + except: + pass + if found_rhs: + print("Found RHS - Y") + print(index) + break diff --git a/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py b/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py index 9833d8adf..a28728454 100644 --- a/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py +++ b/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py @@ -13,10 +13,12 @@ from typing import Sequence, Optional, Tuple, Set from psyclone.psyir.nodes import ( + Node, Loop, Call, Assignment, Reference, + Return, OMPParallelDirective, OMPDoDirective, OMPParallelDoDirective, @@ -31,6 +33,7 @@ RoutineSymbol, ImportInterface, UnsupportedFortranType, + INTEGER_TYPE, CHARACTER_TYPE, ) from psyclone.transformations import ( @@ -602,6 +605,58 @@ def match_lhs_assignments(node, names): return lhs_names +def loop_replacement_of(routine_itr, + target_name: str, + init_at_start=True): + ''' + This transformation checks that the loop iterator we are on is the one + we want, and then changes it to be of length 1 instead - The intent + is to primarily target the UM j loops with this call, but it is + generic. + + Parameters + ---------- + routine_itr : Routine iteration from a loop which walks the psyir routines + target_name : A loop of a given type + init_at_start : Do we want a initialisation at the start? Default True. + + Returns + ---------- + None : Note the tree has been modified + ''' + + do_once = False + # Get the loops from the provided routine and walk + for loop in routine_itr.walk(Loop): + # if the loop is of the target type + if str(loop.loop_type) == target_name: + + # Only init once in the routine at the start + if not do_once and init_at_start: + parent = routine_itr + assign = Assignment.create( + Reference(loop.variable), + Literal("1", INTEGER_TYPE)) + parent.children.insert(0, assign) + do_once = True + + # Get a parent table reference to move the loop body + try: + parent_table = loop.parent.scope.symbol_table + except AttributeError as err: + parent_table = False + + # if the loop parent table is a valid reference + if parent_table: + parent_table.merge(loop.loop_body.symbol_table) + # Move the body of the loop after the loop + for statement in reversed(loop.loop_body.children): + loop.parent.addchild( + statement.detach(), + loop.position + 1) + tmp = loop.detach() # noqa: F841 + + def add_omp_parallel_region( start_node, end_node, @@ -666,3 +721,108 @@ def add_omp_parallel_region( except TransformationError as e: logging.warning(e) + +def remove_unspanable_nodes( + routine_itr, + timer_routine_names, + remove_loop_type, +): + ''' + A method to help reduce the number of nodes found in a routine list. + This will remove some nodes that we do not ever wish to parallelise over. + This includes: + * The first and last timer calipers from the list: timer_routine_names. + * Ideally the final, but any return statement. + * Any variables which have had their loops removed, and are initialised. + + Parameters + ---------- + routine_itr : Routine iteration from a loop which walks the psyir routines. + timer_routine_names : Timer caliper list of names. + remove_loop_type : lhs only holds the variable name, keep this simple. + + Returns + ---------- + Copy of node list: A list of nodes from the given routine without + the above nodes. + ''' + + routine_children = routine_itr.children + return_copy_span = [] + delete_node_indexes = [] + + # Remove calipers + for index, routine_child in enumerate(routine_children): + + for routine in routine_child.walk(Reference): + try: + if str(routine.name) in timer_routine_names: + delete_node_indexes.append(index) + break + except: # noqa: E722 + continue + + # Remove the return statement + for index in range((len(routine_children)-1), 0, -1): + # If the instance is a return, add it to the list of indexes and exit + if isinstance(routine_children[index], Return): + delete_node_indexes.append(index) + break + + # Remove indexes at the start until we get to the first non assignment loop + for index, routine_child in enumerate(routine_children): + # Check if it is an assignment + # If so check whether the lhs name is in the remove_loop_type list + if isinstance(routine_child, Assignment): + if str(routine_child.lhs.name) in remove_loop_type: + delete_node_indexes.append(index) + # Otherwise exit + elif index not in delete_node_indexes: + break + + # A safer way is to build up a list of elements to remove + # Then remove the elements all at once. + delete_node_indexes.sort() + for index, routine_child in enumerate(routine_children): + if index not in delete_node_indexes: + return_copy_span.append(routine_child) + + return return_copy_span + + +def get_ancestors( + node, node_type=Loop, inclusive=False, exclude=(), depth=None +): + """ + Lifted from PSyTran. + Get all ancestors of a Node with a given type. + + :arg node: the Node to search for ancestors of. + :type node: :py:class:`Node` + :kwarg node_type: the type of node to search for. + :type node_type: :py:class:`type` + :kwarg inclusive: if ``True``, the current node is included. + :type inclusive: :py:class:`bool` + :kwarg exclude: type(s) of node to exclude. + :type exclude: :py:class:`bool` + :kwarg depth: specify a depth for the ancestors to have. + :type depth: :py:class:`int` + + :returns: list of ancestors according to specifications. + :rtype: :py:class:`list` + """ + assert isinstance(node, Node), f"Expected a Node, not '{type(node)}'." + assert isinstance( + inclusive, bool + ), f"Expected a bool, not '{type(inclusive)}'." + assert isinstance(node_type, tuple) or issubclass(node_type, Node) + if depth is not None: + assert isinstance(depth, int), f"Expected an int, not '{type(depth)}'." + ancestors = [] + node = node.ancestor(node_type, excluding=exclude, include_self=inclusive) + while node is not None: + ancestors.append(node) + node = node.ancestor(node_type, excluding=exclude) + if depth is not None: + ancestors = [a for a in ancestors if a.depth == depth] + return ancestors diff --git a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf index c01f31b69..957c94aad 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf @@ -827,7 +827,8 @@ values='fd','fe' [namelist:stochastic_physics=skeb_level_bottom] compulsory=true description=Bottom level of SKEB calculations -help=Bottom level of SKEB calculations - model level a little above surface +help=The bottom pressure-level at which SKEB is active. + =A value of 1 corresponds to the lowest level of the model. ns=namelist/Science/Stochastic Physics/SKEB range=2:60 sort-key=Panel-A3a @@ -845,7 +846,7 @@ type=integer [namelist:stochastic_physics=skeb_level_top] compulsory=true description=Top level of SKEB calculations -help=Top level of SKEB calculations - model level at or just above tropopause +help=If the model has N layers, a value of N would correspond to the top layer. ns=namelist/Science/Stochastic Physics/SKEB range=30:200 sort-key=Panel-A3b @@ -963,12 +964,14 @@ type=integer [namelist:stochastic_physics=spt_level_bottom] compulsory=true -description=Bottom level where SPT is active - =See Help panel for details -help=Bottom level wehre SPT perturbations are applied. - =Though, the tapering at this level is 0 so effectively - =SPT perturbations start one level above, see help-panel - = of spt_level_begin_tapering_bottom. +description=Bottom level at which SPT is active +help=The bottom theta-level at which SPT perturbations are applied. + =A value of 0 would correspond to the surface, so a value of 2 means that + =perturbations are applied from the third theta-level and above. + =Note that the perturbations are actually tapered, so that at the level + =specified here the perturbations will still be 0, and SPT perturbations + =effectively start at one level above this specified value. + =For more information, see help-panel of spt_level_begin_tapering_bottom. ns=namelist/Science/Stochastic Physics/SPT range=2:60 sort-key=Panel-A6a @@ -976,12 +979,14 @@ type=integer [namelist:stochastic_physics=spt_level_top] compulsory=true -description=Top level where SPT is active - =See Help panel for details -help=Top level where SPT perturbations are applied. +description=Top level at which SPT is active +help=The top theta-level at which SPT perturbations are applied. + =If the model has N layers, a value of N would correspond to the top + =boundary. Note that the perturbations are actually tapered, so that at the + =level specified here the perturbations will still be 0, and SPT + =perturbations effectively start at one level below this specified value. =Though, the tapering at this level is 0 so effectively - =SPT perturbations start one level below, see help-panel - = of spt_level_begin_tapering_top. + =For more information, see help-panel of spt_level_begin_tapering_top. ns=namelist/Science/Stochastic Physics/SPT range=30:200 sort-key=Panel-A6d diff --git a/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 index 80d03be2b..c1f05d8eb 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 @@ -66,7 +66,6 @@ contains !>@param[in,out] surface_fields Fields for surface scheme !>@param[in] recip_l_mo_sea Inverse Obukhov length over sea only !>@param[in] rhostar Surface density - !>@param[in h_blend_orog Orographic blending height !>@param[in] t1_sd_2d StDev of level 1 temperature !>@param[in] q1_sd_2d StDev of level 1 humidity !>@param[in] model_clock Time in the model @@ -75,8 +74,7 @@ contains microphysics_fields, dmr_mphys, orography_fields, & turbulence_fields, convection_fields, & cloud_fields, surface_fields, & - recip_l_mo_sea, & - rhostar, h_blend_orog, t1_sd_2d, q1_sd_2d, & + recip_l_mo_sea, rhostar, t1_sd_2d, q1_sd_2d, & model_clock) use bl_exp_kernel_mod, only: bl_exp_kernel_type @@ -100,7 +98,6 @@ contains type( field_type ), intent( in ) :: recip_l_mo_sea type( field_type ), intent( in ) :: rhostar - type( field_type ), intent( in ) :: h_blend_orog type( field_type ), intent( in ) :: t1_sd_2d type( field_type ), intent( in ) :: q1_sd_2d @@ -380,7 +377,7 @@ contains cumulus, tile_fraction, sd_orog, & peak_to_trough_orog, silhouette_area_orog, & tile_temperature, rhostar, recip_l_mo_sea, & - h_blend_orog, t1_sd_2d, q1_sd_2d, & + t1_sd_2d, q1_sd_2d, & dtl_mphys, dmt_mphys, sw_heating_rate, & lw_heating_rate, cf_bulk, cf_liquid, & rh_crit, tnuc, tnuc_nlcl, & diff --git a/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 index 0fd4a7582..48d245b30 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 @@ -70,7 +70,6 @@ contains type( field_type ), pointer :: cf_bulk => null() type( field_type ), pointer :: cf_liquid => null() - type( field_type ), pointer :: rh_crit => null() ! Temporary unpacked fields from collection aerosol_fields type( field_type ), pointer :: n_nuc_sol => null() @@ -139,9 +138,8 @@ contains type( field_type ), pointer :: cf_bulk_aero => null() type( field_type ), pointer :: cf_liquid_aero => null() - type( field_type ), pointer :: rh_crit_aero => null() type( field_type ), pointer :: cloud_drop_no_conc_aero => null() - type( field_type ), target :: cf_bulk_coarse, cf_liquid_coarse, rh_crit_coarse, cloud_drop_no_conc_coarse + type( field_type ), target :: cf_bulk_coarse, cf_liquid_coarse, cloud_drop_no_conc_coarse type( field_type ) :: mr_ice integer(tik) :: id_alg, id_diags @@ -210,28 +208,23 @@ contains ! Unpack fields from cloud_fields call cloud_fields%get_field('bulk_fraction', cf_bulk) call cloud_fields%get_field('liquid_fraction', cf_liquid) - call cloud_fields%get_field('rh_crit', rh_crit) call aerosol_fields%get_field('cloud_drop_no_conc', cloud_drop_no_conc) ! Initialise coarse aerosol fields aerosol_mesh => exner_in_wth%get_mesh() wth_aero => function_space_collection%get_fs( aerosol_mesh, 0, 0, WTHETA ) call cf_bulk_coarse%initialise(vector_space = wth_aero) call cf_liquid_coarse%initialise(vector_space = wth_aero) - call rh_crit_coarse%initialise(vector_space = wth_aero) call cloud_drop_no_conc_coarse%initialise(vector_space = wth_aero) call map_scalar_intermesh(cf_bulk_coarse, cf_bulk) call map_scalar_intermesh(cf_liquid_coarse, cf_liquid) - call map_scalar_intermesh(rh_crit_coarse, rh_crit) call map_scalar_intermesh(cloud_drop_no_conc_coarse, cloud_drop_no_conc) cf_bulk_aero => cf_bulk_coarse cf_liquid_aero => cf_liquid_coarse - rh_crit_aero => rh_crit_coarse cloud_drop_no_conc_aero => cloud_drop_no_conc_coarse else ! Unpack fields from cloud_fields call cloud_fields%get_field('bulk_fraction', cf_bulk_aero) call cloud_fields%get_field('liquid_fraction', cf_liquid_aero) - call cloud_fields%get_field('rh_crit', rh_crit_aero) call aerosol_fields%get_field('cloud_drop_no_conc', cloud_drop_no_conc_aero) end if @@ -257,7 +250,6 @@ contains exner_in_wth, & cf_bulk_aero, & cf_liquid_aero, & - rh_crit_aero, & mr_n(imr_v), & mr_ice, & n_nuc_sol, & diff --git a/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 index 6e2b68315..f9e8d6f3c 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 @@ -296,6 +296,10 @@ module skeb_main_alg_mod ! Iterators in for loops integer(i_def) :: m, n, n_row, stencil_extent + ! SKEB calculations are performed at cell centres (W3 points). To index the + ! "eta_theta_levels" array correctly at these points, set offset to 1 + integer(kind=i_def), parameter :: lev_offset = 1 + ! Timing handle integer(tik) :: id_skeb, id_diags @@ -381,10 +385,10 @@ module skeb_main_alg_mod end if !!!!!! 1.b call stph_fp_main to create forcing pattern for SKEB - call stph_fp_main_alg(skeb_level_bottom-1_i_def, skeb_level_top-1_i_def, & - stph_n_min, stph_n_max, stph_spectral_dim, & - skeb_alpha, skeb_power_law, & - skeb_spectral_coeffc, skeb_spectral_coeffs, & + call stph_fp_main_alg(skeb_level_bottom-1_i_def, skeb_level_top-1_i_def, & + lev_offset, stph_n_min, stph_n_max, stph_spectral_dim, & + skeb_alpha, skeb_power_law, & + skeb_spectral_coeffc, skeb_spectral_coeffs, & fp_skeb) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 index 1a28bec41..abacd9da7 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 @@ -229,6 +229,10 @@ module spt_main_alg_mod ! iterators in for loops integer(i_def) :: n,n_row, m + ! SPT calculations are performed at theta-levels (Wtheta points). To index the + ! "eta_theta_levels" array correctly at these points, set offset to 0 + integer(kind=i_def), parameter :: lev_offset = 0 + ! Timestepping_config_mod scalar (for PSyclone to know data type) real(kind=r_second) :: timestepping_config_mod_dt @@ -298,10 +302,10 @@ module spt_main_alg_mod call invoke( setval_c(fp_spt, 0.0_r_def)) ! Create forcing pattern for SPT - call stph_fp_main_alg(spt_level_bottom, spt_level_top, & - 1, stph_n_max, stph_spectral_dim, & - spt_alpha, spt_power_law, & - spt_spectral_coeffc, spt_spectral_coeffs, & + call stph_fp_main_alg(spt_level_bottom, spt_level_top, lev_offset, & + 1, stph_n_max, stph_spectral_dim, & + spt_alpha, spt_power_law, & + spt_spectral_coeffc, spt_spectral_coeffs, & fp_spt) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 index dc82fade1..a6abf14be 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 @@ -46,6 +46,12 @@ module stph_fp_main_alg_mod !>@param[in] level_bottom Bottom level of the stochastic scheme !>@param[in] level_top Top level of the stochastic scheme + !>@param[in] level_offset Level offset. This routine can be + !! applied at W3 and Wtheta points, + !! but both implementations index + !! from the same "eta_theta_levels" + !! array, so need an offset to index + !! correctly. Set 0 Wtheta, 1 for W3 !>@param[in] wavenumber_min Minimum wavenumber applied to build the FP !>@param[in] wavenumber_max Maximum wavenumber applied to build the FP !>@param[in] spectral_dim Dimension of spectral coeffients arrays @@ -55,10 +61,10 @@ module stph_fp_main_alg_mod !>@param[in,out] spectral_coeffs Imaginary Spectral coefficients !>@param[i,out] fp Forcing pattern - subroutine stph_fp_main_alg(level_bottom, level_top, & - wavenumber_min, wavenumber_max, & - spectral_dim, alpha, power_law, & - spectral_coeffc, spectral_coeffs, & + subroutine stph_fp_main_alg(level_bottom, level_top, level_offset, & + wavenumber_min, wavenumber_max, & + spectral_dim, alpha, power_law, & + spectral_coeffc, spectral_coeffs, & fp) ! TO DO after PSyclone ticket 1312 @@ -78,8 +84,8 @@ module stph_fp_main_alg_mod !!!! Arguments ! Scalars with scheme levels, wavenumbers and spectral dimensions - integer(kind=i_def), intent(in) :: level_bottom, level_top, & - wavenumber_min, wavenumber_max, & + integer(kind=i_def), intent(in) :: level_bottom, level_top, level_offset, & + wavenumber_min, wavenumber_max, & spectral_dim ! spectral coefficients power law and decorrelation @@ -153,12 +159,13 @@ module stph_fp_main_alg_mod my_phi_stph = ATAN2(spectral_coeffs(n_row+m), & spectral_coeffc(n_row+m)) ! Max shift ranges from 0 <-> pi for wavenos 1 <-> wavenumber_max - my_phishft_stph = (wavenumber_max - max(n,m)) * pi / (wavenumber_max-1) + my_phishft_stph = (wavenumber_max - max(n,m)) * pi & + / (wavenumber_max - wavenumber_min) do k = level_bottom, level_top ! Apply vertical scaling Level 1 = no change -> 12km Level = max change (=pi) - kr = (domain_height*eta_theta_levels(k))/12.0e3_r_def + kr = (domain_height*eta_theta_levels(k + level_offset))/12.0e3_r_def ! Create coeff with phase shift coeffc_phase(k, n_row+m) = my_coeff_rad * cos(my_phi_stph + & diff --git a/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 index f5ab6605d..c63bc632f 100644 --- a/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 @@ -40,7 +40,7 @@ module bl_exp_kernel_mod !> type, public, extends(kernel_type) :: bl_exp_kernel_type private - type(arg_type) :: meta_args(94) = (/ & + type(arg_type) :: meta_args(93) = (/ & arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! theta_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, W3), &! rho_in_w3 arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! rho_in_wth @@ -72,7 +72,6 @@ module bl_exp_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2),&! tile_temperature arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! rhostar arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! recip_l_mo_sea - arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! h_blend_orog arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! t1_sd arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! q1_sd arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! dtl_mphys @@ -181,7 +180,6 @@ module bl_exp_kernel_mod !> @param[in] tile_temperature Surface tile temperatures !> @param[in] rhostar_2d Surface density !> @param[in] recip_l_mo_sea_2d Inverse Obukhov length over sea only - !> @param[in] h_blend_orog_2d Orographic blending height !> @param[in] t1_sd_2d StDev of level 1 temperature !> @param[in] q1_sd_2d StDev of level 1 humidity !> @param[in] dtl_mphys Microphysics liq temperature increment @@ -297,7 +295,6 @@ subroutine bl_exp_code(nlayers, seg_len, & tile_temperature, & rhostar_2d, & recip_l_mo_sea_2d, & - h_blend_orog_2d, & t1_sd_2d, & q1_sd_2d, & dtl_mphys, & @@ -479,8 +476,7 @@ subroutine bl_exp_code(nlayers, seg_len, & cumulus_2d, & shallow_flag, & level_parcel_top - real(kind=r_def), dimension(undf_2d), intent(in) :: h_blend_orog_2d, & - recip_l_mo_sea_2d, & + real(kind=r_def), dimension(undf_2d), intent(in) :: recip_l_mo_sea_2d, & rhostar_2d, & t1_sd_2d, q1_sd_2d, & sea_u_current, & @@ -549,7 +545,7 @@ subroutine bl_exp_code(nlayers, seg_len, & zh, dzh, wstar, wthvs, u_0_p, v_0_p, zlcl_uv, qsat_lcl, delthvu, & bl_type_1, bl_type_2, bl_type_3, bl_type_4, bl_type_5, bl_type_6, & bl_type_7, uw0, vw0, zhnl, rhostar, & - h_blend_orog, recip_l_mo_sea, flandg, t1_sd, q1_sd, qcl_inv_top, & + recip_l_mo_sea, flandg, t1_sd, q1_sd, qcl_inv_top, & fb_surf, rib_gb, z0m_eff_gb, zhsc, ustargbm, cos_theta_latitude, & max_diff, delta_smag, tnuc_nlcl_um real(r_um), dimension(seg_len,1) :: surf_dep_flux, zeroes @@ -652,7 +648,6 @@ subroutine bl_exp_code(nlayers, seg_len, & ustargbm(i,1) = ustar(map_2d(1,i)) rhostar(i,1) = rhostar_2d(map_2d(1,i)) recip_l_mo_sea(i,1) = recip_l_mo_sea_2d(map_2d(1,i)) - h_blend_orog(i,1) = h_blend_orog_2d(map_2d(1,i)) rib_gb(i,1) = gradrinr(map_wth(1,i)) z0m_eff_gb(i,1) = z0m_eff(map_2d(1,i)) ftl(i,1,1) = heat_flux_bl(map_w3(1,i)) @@ -895,8 +890,8 @@ subroutine bl_exp_code(nlayers, seg_len, & ! IN cloud/moisture data : bulk_cloud_fraction,q,qcf,qcl,temperature,qw,tl, & ! IN everything not covered so far : - rad_hr,micro_tends,fb_surf,ustargbm,p_star,tstar,h_blend_orog, & - zh_prev, zhpar,zlcl,ho2r2_orog_gb,sd_orog,wtrac_as, & + rad_hr,micro_tends,fb_surf,ustargbm,p_star,tstar, & + zh_prev, zhpar,zlcl,ho2r2_orog_gb,sd_orog,wtrac_as, & ! 2 IN 3 INOUT for Smagorinsky delta_smag, max_diff, rneutml_sq, visc_m, visc_h, & ! SCM Diagnostics (dummy values in full UM) & stash diag diff --git a/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 index 65a42e3a9..350a8ec8e 100644 --- a/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 @@ -35,13 +35,12 @@ module glomap_aerosol_kernel_mod type, public, extends(kernel_type) :: glomap_aerosol_kernel_type private - type(arg_type) :: meta_args(66) = (/ & + type(arg_type) :: meta_args(65) = (/ & arg_type(GH_SCALAR, GH_LOGICAL, GH_READ), & ! rad_this_tstep arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! theta_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! exner_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! cf_bulk arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! cf_liquid - arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! rh_crit arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! m_v arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! m_cf arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! n_nuc_sol @@ -120,7 +119,6 @@ module glomap_aerosol_kernel_mod !! in potential temperature space !> @param[in] cf_bulk Bulk cloud fraction !> @param[in] cf_liquid Liquid cloud fraction -!> @param[in] rh_crit Critical rel humidity !> @param[in] m_v aka q !> @param[in] m_cf aka qcf !> @param[in] n_nuc_sol Climatology aerosol field @@ -195,7 +193,6 @@ subroutine glomap_aerosol_code( nlayers, & exner_in_wth, & cf_bulk, & cf_liquid, & - rh_crit, & m_v, & m_cf, & n_nuc_sol, & @@ -266,6 +263,8 @@ subroutine glomap_aerosol_code( nlayers, & ! UM modules !--------------------------------------- + use cloud_inputs_mod, only: rhcrit + use glomap_clim_interface_mod, only: glomap_clim_interface use planet_constants_mod, only: p_zero, kappa @@ -295,7 +294,6 @@ subroutine glomap_aerosol_code( nlayers, & real(kind=r_def), intent(in), dimension(undf_wth) :: exner_in_wth real(kind=r_def), intent(in), dimension(undf_wth) :: cf_bulk real(kind=r_def), intent(in), dimension(undf_wth) :: cf_liquid - real(kind=r_def), intent(in), dimension(undf_wth) :: rh_crit real(kind=r_def), intent(in), dimension(undf_wth) :: m_v real(kind=r_def), intent(in), dimension(undf_wth) :: m_cf real(kind=r_def), intent(in), dimension(undf_wth) :: n_nuc_sol @@ -487,7 +485,7 @@ subroutine glomap_aerosol_code( nlayers, & qcf_um(k) = m_cf(map_wth(1) + k) cloud_blk_frac_um(k) = cf_bulk(map_wth(1) + k) cloud_liq_frac_um(k) = cf_liquid(map_wth(1) + k) - rh_crit_um(k) = rh_crit(map_wth(1) + k) + rh_crit_um(k) = rhcrit(k) end do !----------------------------------------------------------------------- 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 71e723b3a..a064523c8 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 @@ -338,7 +338,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &soil_moist_avail, snow_unload_rate, albedo_obs_scaling, soil_clay, soil_sand, dust_mrel, dust_flux, day_of_year, second_of_day, & flux_e, flux_h, urbwrr, urbhwr, urbhgt, urbztm, urbdisp, & &rhostar, recip_l_mo_sea, & -&h_blend_orog, t1_sd_2d, q1_sd_2d, gross_prim_prod, z0h_eff, ocn_cpl_point, stencil_depth) +&t1_sd_2d, q1_sd_2d, gross_prim_prod, z0h_eff, ocn_cpl_point, stencil_depth) USE jules_exp_kernel_mod, ONLY: jules_exp_code USE mesh_mod, ONLY: mesh_type USE stencil_dofmap_mod, ONLY: STENCIL_REGION @@ -358,7 +358,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &chr1p5m_tile, resfs_tile, gc_tile, canhc_tile, tile_water_extract, z0m_eff, ustar, soil_moist_avail, snow_unload_rate, & &albedo_obs_scaling, soil_clay, soil_sand, dust_mrel, dust_flux, & urbwrr, urbhwr, urbhgt, urbztm, urbdisp, & -rhostar, recip_l_mo_sea, h_blend_orog, t1_sd_2d, q1_sd_2d, & +rhostar, recip_l_mo_sea, t1_sd_2d, q1_sd_2d, & &gross_prim_prod, z0h_eff 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 @@ -385,7 +385,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &tile_water_extract_proxy, z0m_eff_proxy, ustar_proxy, soil_moist_avail_proxy, snow_unload_rate_proxy, albedo_obs_scaling_proxy, & &soil_clay_proxy, soil_sand_proxy, dust_mrel_proxy, dust_flux_proxy, & urbwrr_proxy, urbhwr_proxy, urbhgt_proxy, urbztm_proxy, urbdisp_proxy, & -rhostar_proxy, recip_l_mo_sea_proxy, h_blend_orog_proxy, & +rhostar_proxy, recip_l_mo_sea_proxy, & &t1_sd_2d_proxy, q1_sd_2d_proxy, gross_prim_prod_proxy, z0h_eff_proxy INTEGER(KIND=i_def), pointer :: map_adspc10_dust_mrel(:,:) => null(), map_adspc1_zh(:,:) => null(), & &map_adspc2_tile_fraction(:,:) => null(), map_adspc3_leaf_area_index(:,:) => null(), & @@ -515,7 +515,6 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth urbdisp_proxy = urbdisp%get_proxy() rhostar_proxy = rhostar%get_proxy() recip_l_mo_sea_proxy = recip_l_mo_sea%get_proxy() - h_blend_orog_proxy = h_blend_orog%get_proxy() t1_sd_2d_proxy = t1_sd_2d%get_proxy() q1_sd_2d_proxy = q1_sd_2d%get_proxy() gross_prim_prod_proxy = gross_prim_prod%get_proxy() @@ -673,7 +672,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth urbwrr_proxy%data, urbhwr_proxy%data, urbhgt_proxy%data, urbztm_proxy%data, & urbdisp_proxy%data, & rhostar_proxy%data, recip_l_mo_sea_proxy%data, & -&h_blend_orog_proxy%data, t1_sd_2d_proxy%data, q1_sd_2d_proxy%data, gross_prim_prod_proxy%data, & +&t1_sd_2d_proxy%data, q1_sd_2d_proxy%data, gross_prim_prod_proxy%data, & z0h_eff_proxy%data, ocn_cpl_point_proxy%data, ndf_wtheta, & &undf_wtheta, map_wtheta, ndf_w3, undf_w3, map_w3, ndf_adspc1_zh, undf_adspc1_zh, map_adspc1_zh, & &ndf_adspc2_tile_fraction, undf_adspc2_tile_fraction, map_adspc2_tile_fraction, ndf_adspc3_leaf_area_index, & @@ -723,7 +722,6 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth CALL dust_flux_proxy%set_dirty() CALL rhostar_proxy%set_dirty() CALL recip_l_mo_sea_proxy%set_dirty() - CALL h_blend_orog_proxy%set_dirty() CALL t1_sd_2d_proxy%set_dirty() CALL q1_sd_2d_proxy%set_dirty() CALL gross_prim_prod_proxy%set_dirty() 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 191a42bce..b1ca9c1fe 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 @@ -338,9 +338,8 @@ subroutine um_physics_init() lem_adjust, interactive_fluxes, specified_fluxes_only, & except_disc_inv, ntml_level_corrn, free_trop_layers, sharpest, & lem_stability, sg_shear_enh_lambda, l_new_kcloudtop, buoy_integ, & - l_reset_dec_thres, DynDiag_ZL_CuOnly, var_diags_opt, & - i_interp_local, i_interp_local_gradients, & - split_tke_and_inv, l_noice_in_turb, l_use_var_fixes, & + l_reset_dec_thres, DynDiag_ZL_CuOnly, i_interp_local, & + i_interp_local_gradients, l_noice_in_turb, l_use_var_fixes, & i_interp_local_cf_dbdz, tke_diag_fac, a_ent_2, dec_thres_cloud, & dec_thres_cu, near_neut_z_on_l, blend_gridindep_fa, & specified_fluxes_tstar, buoy_integ_low, num_sweeps_bflux, & @@ -766,10 +765,9 @@ subroutine um_physics_init() sg_orog_mixing = sg_shear_enh_lambda end select - ! Switch for alternative TKE and variance diagnostics - var_diags_opt = split_tke_and_inv - tke_diag_fac = 1.0_r_bl + ! Switch for corrections to variance diagnostics l_use_var_fixes = .true. + tke_diag_fac = 1.0_r_bl zhloc_depth_fac = real(zhloc_depth_fac_in, r_bl) if (topography == topography_horizon) then diff --git a/interfaces/socrates_interface/build/import.mk b/interfaces/socrates_interface/build/import.mk index 35e5a09b3..a12f78739 100644 --- a/interfaces/socrates_interface/build/import.mk +++ b/interfaces/socrates_interface/build/import.mk @@ -8,8 +8,7 @@ export PROJECT_SOURCE = $(APPS_ROOT_DIR)/interfaces/socrates_interface/source .PHONY: import-socrates_interface import-socrates_interface: # Get a copy of the source code from the SCORATES repository - python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.yaml - $Qrsync -acvz $(SCRATCH_DIR)/socrates $(WORKING_DIR)/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.yaml # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf b/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf index 43f642ccb..4385576ff 100644 --- a/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf @@ -15,14 +15,23 @@ description=Run COSP if diagnostics are requested !kind=default ns=namelist/Science/SOCRATES COSP sort-key=Panel-A01 -trigger=namelist:cosp=n_subcol_gen: .true. ; +trigger=namelist:cosp=n_cosp_step: .true. ; + =namelist:cosp=n_subcol_gen: .true. ; type=logical +[namelist:cosp=n_cosp_step] +compulsory=true +description=Number of model timesteps per COSP diagnostic sampling +help=COSP will use a sunlit mask based on the length of the COSP timestep. +!kind=default +sort-key=Panel-A02 +type=integer + [namelist:cosp=n_subcol_gen] compulsory=true description=Number of sub-columns for the cloud generator !kind=default -sort-key=Panel-A02 +sort-key=Panel-A03 type=integer #============================================================================== diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py index 152c043d0..ce7195ecd 100644 --- a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py @@ -1,3 +1,4 @@ +import re import sys from metomi.rose.upgrade import MacroUpgrade @@ -20,14 +21,24 @@ def __repr__(self): """ Copy this template and complete to add your macro - class vnXX_txxx(MacroUpgrade): # Upgrade macro for by - BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" - def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports diff --git a/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 b/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 index 3db633e3d..adf6728a3 100644 --- a/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 +++ b/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 @@ -93,7 +93,7 @@ subroutine cosp_alg(pressure_in_wth, temperature_in_wth, exner, mr, & ! Unpacked fields from collections type( field_type ), pointer :: rho_in_wth => null() - type( field_type ), pointer :: lit_fraction => null() + type( field_type ), pointer :: lit_fraction_cosp => null() type( field_type ), pointer :: liquid_fraction => null() type( field_type ), pointer :: frozen_fraction => null() type( field_type ), pointer :: sigma_ml @@ -130,7 +130,7 @@ subroutine cosp_alg(pressure_in_wth, temperature_in_wth, exner, mr, & ! Unpack fields from collections call derived_fields%get_field('rho_in_wth', rho_in_wth) - call radiation_fields%get_field('lit_fraction', lit_fraction) + call radiation_fields%get_field('lit_fraction_cosp', lit_fraction_cosp) call cloud_fields%get_field('liquid_fraction', liquid_fraction) call cloud_fields%get_field('frozen_fraction', frozen_fraction) @@ -203,7 +203,7 @@ subroutine cosp_alg(pressure_in_wth, temperature_in_wth, exner, mr, & conv_liquid_mmr, conv_frozen_mmr, conv_frozen_number, & sigma_ml, sigma_mi, cloud_drop_no_conc, & ls_rain_3d, conv_rain_3d, conv_snow_3d, & - lit_fraction, rand_seed, n_cloud_layer, & + lit_fraction_cosp, rand_seed, n_cloud_layer, & n_subcol_gen, & cosp_x1r, cosp_x2r, cosp_x1g, cosp_x2g, cosp_x4g, & sunlit_mask, & diff --git a/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 b/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 index 8d46cb533..69c02b4d1 100644 --- a/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 +++ b/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 @@ -51,6 +51,7 @@ subroutine illuminate_alg(radiation_fields, timestep, dt) type( field_type ), pointer :: lit_fraction => null() type( field_type ), pointer :: cos_zenith_angle_rts => null() type( field_type ), pointer :: lit_fraction_rts => null() + type( field_type ), pointer :: lit_fraction_cosp => null() type( field_type ), pointer :: stellar_irradiance_rts => null() type( field_type ), pointer :: sin_stellar_declination_rts => null() type( field_type ), pointer :: stellar_eqn_of_time_rts => null() @@ -75,6 +76,7 @@ subroutine illuminate_alg(radiation_fields, timestep, dt) call radiation_fields%get_field('lit_fraction',lit_fraction) call radiation_fields%get_field('cos_zenith_angle_rts',cos_zenith_angle_rts) call radiation_fields%get_field('lit_fraction_rts',lit_fraction_rts) + call radiation_fields%get_field('lit_fraction_cosp',lit_fraction_cosp) call radiation_fields%get_field('stellar_irradiance_rts', & stellar_irradiance_rts) call radiation_fields%get_field('sin_stellar_declination_rts', & @@ -97,6 +99,7 @@ subroutine illuminate_alg(radiation_fields, timestep, dt) call invoke( illuminate_kernel_type( & cos_zenith_angle, lit_fraction, & cos_zenith_angle_rts, lit_fraction_rts, & + lit_fraction_cosp, & stellar_irradiance_rts, & sin_stellar_declination_rts, & stellar_eqn_of_time_rts, & diff --git a/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 b/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 index e4f1a23a4..0ac2f4566 100644 --- a/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 +++ b/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 @@ -29,11 +29,12 @@ module illuminate_kernel_mod ! Contains the metadata needed by the PSy layer. type, public, extends(kernel_type) :: illuminate_kernel_type private - type(arg_type) :: meta_args(19) = (/ & + type(arg_type) :: meta_args(20) = (/ & arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cos_zenith_angle arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! lit_fraction arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cos_zenith_angle_rts arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! lit_fraction_rts + arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! lit_fraction_cosp arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! stellar_irradiance_rts arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! sin_stellar_declination_rts arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! stellar_eqn_of_time_rts @@ -66,7 +67,8 @@ module illuminate_kernel_mod !> @param[in,out] cos_zenith_angle Cosine of the stellar zenith angle !> @param[in,out] lit_fraction Lit fraction of the timestep !> @param[in,out] cos_zenith_angle_rts Cosine of the stellar zenith angle -!> @param[in,out] lit_fraction_rts Lit fraction of the timestep +!> @param[in,out] lit_fraction_rts Lit fraction of the radiation timestep +!> @param[in,out] lit_fraction_cosp Lit fraction of the COSP timestep !> @param[in,out] stellar_irradiance_rts Stellar irradiance at the planet !> @param[in,out] sin_stellar_declination_rts Stellar declination !> @param[in,out] stellar_eqn_of_time_rts Stellar equation of time @@ -96,6 +98,7 @@ subroutine illuminate_code(nlayers, & lit_fraction, & cos_zenith_angle_rts, & lit_fraction_rts, & + lit_fraction_cosp, & stellar_irradiance_rts, & sin_stellar_declination_rts, & stellar_eqn_of_time_rts, & @@ -113,6 +116,7 @@ subroutine illuminate_code(nlayers, & use radiation_config_mod, only: n_radstep, n_horiz_ang, n_horiz_layer, & topography, & topography_slope, topography_horizon + use cosp_config_mod, only: l_cosp, n_cosp_step use star_config_mod, only: stellar_constant use orbit_config_mod, only: & elements, elements_user, elements_earth_fixed, & @@ -141,9 +145,10 @@ subroutine illuminate_code(nlayers, & integer(i_def), intent(in) :: map_h_asp(ndf_h_asp) real(r_def), dimension(undf_2d), intent(inout):: & - cos_zenith_angle, lit_fraction - real(r_def), dimension(undf_2d), intent(inout):: & - cos_zenith_angle_rts, lit_fraction_rts, stellar_irradiance_rts, & + cos_zenith_angle, lit_fraction, & + cos_zenith_angle_rts, lit_fraction_rts, & + lit_fraction_cosp, & + stellar_irradiance_rts, & sin_stellar_declination_rts, stellar_eqn_of_time_rts, & orographic_correction_rts real(r_def), dimension(undf_2d), intent(in) :: slope_angle, slope_aspect @@ -158,7 +163,7 @@ subroutine illuminate_code(nlayers, & integer :: h_ang_1, h_ang_last integer :: h_asp_1, h_asp_last logical :: l_slope, l_shading - + real(r_def), dimension(undf_2d) :: cos_zenith_angle_cosp ! Set orbital elements select case (elements) @@ -282,6 +287,34 @@ subroutine illuminate_code(nlayers, & lit_fraction = lit_fraction(map_2d(1):map_2d(1)) ) end if + if (l_cosp) then + if (n_cosp_step == 1) then + lit_fraction_cosp(map_2d(1):map_2d(1)) & + = lit_fraction(map_2d(1):map_2d(1)) + else if (n_cosp_step == n_radstep) then + lit_fraction_cosp(map_2d(1):map_2d(1)) & + = lit_fraction_rts(map_2d(1):map_2d(1)) + else if (mod(timestep-1_i_def, n_cosp_step) == 0) then + ! Calculate parameters for external illumination of the atmosphere + ! over the COSP timestep + call illuminate( & + l_stellar_angle = .true., & + n_profile = n_profile, & + i_spin = i_spin, & + second_of_day = second_of_day, & + length_of_timestep = dt*real(n_cosp_step, r_def), & + hour_angle_inc = hour_angle_inc, & + fixed_zenith_angle = fixed_zenith_angle, & + fixed_azimuth_angle = fixed_azimuth_angle, & + latitude = latitude(map_2d(1):map_2d(1)), & + longitude = longitude(map_2d(1):map_2d(1)), & + sin_stellar_declination = sin_stellar_declination_rts(map_2d(1)), & + stellar_eqn_of_time = stellar_eqn_of_time_rts(map_2d(1)), & + cos_zenith_angle = cos_zenith_angle_cosp(map_2d(1):map_2d(1)), & + lit_fraction = lit_fraction_cosp(map_2d(1):map_2d(1)) ) + end if + end if + end subroutine illuminate_code end module illuminate_kernel_mod diff --git a/rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml b/rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml new file mode 100644 index 000000000..8a2c34e54 --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_ancil.xml b/rose-stem/app/adjoint_tests/file/file_def_ancil.xml new file mode 100644 index 000000000..43c9e9e44 --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_ancil.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_check_restart.xml b/rose-stem/app/adjoint_tests/file/file_def_check_restart.xml new file mode 100644 index 000000000..05ba6dcbc --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_check_restart.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_diags.xml b/rose-stem/app/adjoint_tests/file/file_def_diags.xml new file mode 100644 index 000000000..c12613f00 --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_diags.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml b/rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml new file mode 100644 index 000000000..0cdd03798 --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_initial.xml b/rose-stem/app/adjoint_tests/file/file_def_initial.xml new file mode 100644 index 000000000..05a68968e --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_initial.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_ls.xml b/rose-stem/app/adjoint_tests/file/file_def_ls.xml new file mode 100644 index 000000000..a2766a236 --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_ls.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/file_def_read.xml b/rose-stem/app/adjoint_tests/file/file_def_read.xml new file mode 100644 index 000000000..61cc7f81e --- /dev/null +++ b/rose-stem/app/adjoint_tests/file/file_def_read.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/file/iodef.xml b/rose-stem/app/adjoint_tests/file/iodef.xml index 11c6939fa..fb000671f 100644 --- a/rose-stem/app/adjoint_tests/file/iodef.xml +++ b/rose-stem/app/adjoint_tests/file/iodef.xml @@ -5,322 +5,59 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - processed__tot_col_uv_kinetic_energy + processed__tot_col_w_kinetic_energy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf index 4b375741d..864c6a623 100644 --- a/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/linear_model/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -ls_filename='final_ls' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf b/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf index 6ff994e7f..dddbeae1e 100644 --- a/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf +++ b/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf @@ -1,2 +1,3 @@ [namelist:linear] fixed_ls=.false. +transport_efficiency=.false. diff --git a/rose-stem/app/adjoint_tests/rose-app.conf b/rose-stem/app/adjoint_tests/rose-app.conf index eb44451ad..4dafac183 100644 --- a/rose-stem/app/adjoint_tests/rose-app.conf +++ b/rose-stem/app/adjoint_tests/rose-app.conf @@ -1,7 +1,7 @@ -meta=lfric-adjoint_tests/vn3.0_t146 +meta=lfric-adjoint_tests/vn3.0_t108 [command] -default=$LAUNCH_SCRIPT/launch-exe +default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe [env] ENSEMBLE_MEMBER=0 @@ -62,6 +62,7 @@ source=(namelist:aerosol) = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -272,6 +273,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -377,7 +379,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -743,11 +745,23 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -928,17 +942,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -948,7 +962,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1362,6 +1376,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. @@ -1400,11 +1415,11 @@ panel_edge_treatment='none' profile_size=5 reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' -scheme=5*1 +scheme=5*3 si_outer_transport='none' slice_order='parabola' special_edges_monotone=5*1 -splitting=5*1 +splitting=5*2 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' diff --git a/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py b/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py index ec28ce2e0..f74ab7beb 100755 --- a/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py +++ b/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py @@ -145,8 +145,8 @@ def run_exe(arg, outfile, style): DST_GRID = GRID() DST_GRID = get_env_info(DST_GRID, 'DST') DST_GRID = get_data(DST_GRID) - # end processing destination grid validate_input(DST_GRID) + # end processing destination grid print('DESTINATION grid ') print('Save SRC -> DST grid info') diff --git a/rose-stem/app/gravity_wave/rose-app.conf b/rose-stem/app/gravity_wave/rose-app.conf index c26fef7c1..291204129 100644 --- a/rose-stem/app/gravity_wave/rose-app.conf +++ b/rose-stem/app/gravity_wave/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-gravity_wave/vn3.0_t146 +meta=lfric-gravity_wave/vn3.0_t214 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -242,6 +242,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -879,17 +880,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -899,7 +900,7 @@ configure_segments=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1313,6 +1314,7 @@ tau_u=0.0 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/app/gungho_model/file/file_def_initial.xml b/rose-stem/app/gungho_model/file/file_def_initial.xml index 2b1050253..42cf3bfec 100644 --- a/rose-stem/app/gungho_model/file/file_def_initial.xml +++ b/rose-stem/app/gungho_model/file/file_def_initial.xml @@ -13,6 +13,8 @@ + + diff --git a/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf b/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf index c3789d266..81be83085 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf @@ -24,6 +24,11 @@ use_xios_io=${USE_XIOS_IO} [namelist:logging] run_log_level='${LOG_LEVEL}' +[namelist:partitioning] +panel_decomposition='${PANEL_DECOMP}' +panel_xproc=${XPROC} +panel_yproc=${YPROC} + [namelist:time] timestep_end='${RESTART_STOP}' timestep_start='${RESTART_START}' diff --git a/rose-stem/app/gungho_model/rose-app.conf b/rose-stem/app/gungho_model/rose-app.conf index 8e0e78c4b..999ed6092 100644 --- a/rose-stem/app/gungho_model/rose-app.conf +++ b/rose-stem/app/gungho_model/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-gungho_model/vn3.0_t146 +meta=lfric-gungho_model/vn3.0_t214 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ @@ -262,6 +262,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -904,17 +905,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -924,7 +925,7 @@ configure_segments=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1338,6 +1339,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.true. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/app/jedi_forecast/file/iodef.xml b/rose-stem/app/jedi_forecast/file/iodef.xml index fb4ab30d6..7a100a000 100644 --- a/rose-stem/app/jedi_forecast/file/iodef.xml +++ b/rose-stem/app/jedi_forecast/file/iodef.xml @@ -66,6 +66,8 @@ + + diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf b/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf index c2178fe4b..c25ab8db7 100644 --- a/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf +++ b/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf @@ -31,6 +31,7 @@ pert_centre=120.0 [namelist:linear] fixed_ls=.false. +transport_efficiency=.false. [namelist:mixed_solver] gcrk=6 diff --git a/rose-stem/app/jedi_forecast/rose-app.conf b/rose-stem/app/jedi_forecast/rose-app.conf index b1d6ba36e..42c17cee6 100644 --- a/rose-stem/app/jedi_forecast/rose-app.conf +++ b/rose-stem/app/jedi_forecast/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_forecast/vn3.0_t146 +meta=jedi_forecast/vn3.0_t108 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ @@ -62,6 +62,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = namelist:mixed_solver = (namelist:mixing) @@ -267,6 +268,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -600,6 +602,7 @@ io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] @@ -770,6 +773,18 @@ fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. pert_option='analytic' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -942,17 +957,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -962,7 +977,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1376,6 +1391,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf index 0fa8d12d9..5734e167c 100644 --- a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf +++ b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_forecast_pseudo/vn3.0_t146 +meta=jedi_forecast_pseudo/vn3.0_t108 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -60,6 +60,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = namelist:mixed_solver = (namelist:mixing) @@ -265,6 +266,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -596,6 +598,7 @@ io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] @@ -764,6 +767,18 @@ fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. pert_option='analytic' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -936,17 +951,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -956,7 +971,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1370,6 +1385,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml b/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml index 808f8ef91..4a65814b5 100644 --- a/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml +++ b/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -234,6 +241,8 @@ + + @@ -280,6 +289,8 @@ + + @@ -421,6 +432,7 @@ + diff --git a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf new file mode 100644 index 000000000..125a4758d --- /dev/null +++ b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf @@ -0,0 +1,8 @@ +[file:mesh_C12_MG.nc] +mode=auto +source=$MESH_DIR/mesh_C12_MG.nc + +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='mesh_C12_MG' +!!fplane= diff --git a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-default.conf b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-default.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf new file mode 100644 index 000000000..379986682 --- /dev/null +++ b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf @@ -0,0 +1,26 @@ +[file:iodef_temp.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_id_tlm_tests/file/iodef.xml + +[namelist:io] +diagnostic_frequency=8 + +[namelist:jedi_geometry] +io_calender_start='2018-04-14T21:00:00' + +[namelist:jedi_increment] +inc_time='2018-04-14 21:00:00' + +[namelist:jedi_pseudo_model] +initial_time='2018-04-14T21:00:00' + +[namelist:jedi_state] +state_time='2018-04-14 21:00:00' + +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' +multigrid_chain_nitems=3 + +[namelist:time] +calendar_origin='2018-04-14 21:00:00' +calendar_start='2018-04-14 21:00:00' diff --git a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf index 3cebf5804..dc2a904a2 100644 --- a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_id_tlm_tests/vn3.0_t146 +meta=jedi_id_tlm_tests/vn3.0_t108 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -23,13 +23,19 @@ source=namelist:jedi_lfric_tests = namelist:jedi_linear_model = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings + = (namelist:aerosol) = namelist:base_mesh + = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice + = (namelist:cloud) + = (namelist:chemistry) + = (namelist:convection) + = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = namelist:energy_correction + = (namelist:energy_correction) = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -40,6 +46,7 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) + = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -62,30 +69,35 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging + = (namelist:microphysics) = namelist:mixed_solver - = (namelist:mixing) + = namelist:mixing = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple + = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) - = (namelist:orography_bell_cartesian) - = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet + = (namelist:radiation) = namelist:radiative_gases + = (namelist:spectral_gwd) + = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) + = (namelist:star) = (namelist:stochastic_physics) + = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) - = (namelist:theta_relax) = namelist:time = namelist:timestepping = namelist:transport @@ -106,24 +118,24 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='off' +glomap_mode='dust_and_clim' !!horiz_d=2.25 -!!l_radaer=.false. +!!l_radaer=.true. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='' -sulphuric_strat_climatology=.false. +!!prec_file='precalc/RADAER_pcalc.ukca' +sulphuric_strat_climatology=.true. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 [namelist:base_mesh] !!f_lat_deg=45.0 -file_prefix='mesh.nc' +file_prefix='mesh' !!fplane=.false. geometry='spherical' prepartitioned=.false. @@ -186,7 +198,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='split_step' +transport_overwrite_freq='final' [namelist:checks] limit_cfl=.false. @@ -206,14 +218,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=0 +!!i_ukca_chem_version=111 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling=.false. -!!l_ukca_quasinewton=.false. +!!l_ukca_linox_scaling= +!!l_ukca_quasinewton= !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac=0 +!!lightnox_scale_fac= !!photol_scheme='off' -!!top_bdy_opt='no_overwrt' +!!top_bdy_opt='' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -268,6 +280,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -318,7 +331,7 @@ stretching_method='smooth' !!aerosols_ancil_path='' !!albedo_nir_ancil_path='' !!albedo_vis_ancil_path='' -ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${ancil_resolution}' +ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${RESOLUTION}' checkpoint_stem_name='' !!cloud_drop_no_conc_ancil_path='' !!coarse_ancil_directory='' @@ -379,7 +392,7 @@ diag_stem_name='' !!o3_ancil_path='' !!oh_ancil_path='' orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +!!orography_subgrid_ancil_path='' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -411,7 +424,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.false. +l_multigrid=.true. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -421,7 +434,7 @@ shallow=.true. si_momentum_equation=.false. theta_moist_source=.false. use_multires_coupling=.false. -use_physics=.false. +use_physics=.true. use_wavedynamics=.true. vector_invariant=.false. @@ -435,16 +448,16 @@ profile_data_v=0.0 times=0.0 [namelist:helmholtz_solver] -fail_on_non_converged=.false. -gcrk=18 +!!fail_on_non_converged=.false. +gcrk=8 !!jacobi_relaxation=0.5 -method='bicgstab' -monitor_convergence=.true. +method='prec_only' +monitor_convergence=.false. normalise=.true. -preconditioner='tridiagonal' -si_pressure_a_tol=0 -si_pressure_maximum_iterations=40 -si_pressure_tolerance=1.0e-15 +preconditioner='multigrid' +si_pressure_a_tol=1.0e-8 +si_pressure_maximum_iterations=400 +si_pressure_tolerance=1.0e-4 [namelist:iau] !!iau_ainc_multifile=.false. @@ -454,7 +467,7 @@ si_pressure_tolerance=1.0e-15 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=0 +!!iau_ts_start=1 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -501,15 +514,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='gravity_wave' +test='none' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.0 -r2=0.0 -x1=0.0 -x2=0.0 +r1=0.4 +r2=0.4 +x1=0.4 +x2=-0.4 y1=0.0 y2=0.0 z1=0.0 @@ -521,22 +534,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=120.0 +pert_centre=60.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=300.0,300.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=0.0,0.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 [namelist:initial_wind] nl_constant=0.0 -profile='none' +profile='constant_uv' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -546,8 +559,8 @@ profile='none' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.false. -u0=0.0 +smp_init_wind=.true. +u0=2.0 v0=0.0 wind_time_period=0.0 @@ -575,7 +588,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=8 +diagnostic_frequency=12 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -591,7 +604,7 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' +io_calender_start='2021-06-02T00:00:00' io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' @@ -599,12 +612,13 @@ io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' +inc_time='2021-06-02 00:00:00' initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] @@ -615,15 +629,15 @@ incremental_wind_interpolation=.true. nl_time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' +initial_time='2021-06-02 00:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2018-04-14 21:00:00' +state_time='2021-06-02 00:00:00' use_pseudo_model=.true. -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', + ='m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -657,7 +671,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 +z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -696,8 +710,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.01 -!!z0m_specified=0.1 +!!z0h_specified=0.0 +!!z0m_specified=0.0 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -776,7 +790,21 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -pert_option='analytic' +max_bl_stabilisation=0.75 +n_bl_levels_to_stabilise=15 +pert_option='file' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -804,40 +832,40 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.false. +!!prog_tnuc=.true. !!qcl_rime=1.0e-4 -!!shape_rime=.false. +!!shape_rime=.true. turb_gen_mixph=.true. !!z_surf=50.0 [namelist:mixed_solver] eliminate_variables='discrete' -fail_on_non_converged=.false. -gcrk=10 +fail_on_non_converged=.true. +gcrk=4 guess_np1=.false. !!jacobi_relaxation=0.5 -mixed_solver_a_tol=1.0e-21 +mixed_solver_a_tol=1.0e-3 monitor_convergence=.true. normalise=.true. reference_reset_time=3600.0 -si_maximum_iterations=7 +si_maximum_iterations=10 si_method='block_gcr' si_preconditioner='pressure' -si_tolerance=1.0e-21 +si_tolerance=1.0e-1 split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blending' +!!method='blend_1dbl_fa' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[!!namelist:multigrid] -chain_mesh_tags='','','','' +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -845,9 +873,17 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='dynamics' +aerosol_mesh_name='aerosol' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. +dynamics_mesh_name='dynamics' +!!lowest_order_aero_flag=.false. +multires_coupling_mesh_tags='dynamics' +multires_coupling_mode='test' +negative_correction='none' +physics_mesh_name='aerosol' +reconstruction='simple' +recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -942,34 +978,34 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.true. +generate_inner_halos=.false. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 -!!limit_drag_incs=.false. +gw_segment=0 +limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' -!!sample_physics_scalars=.true. -!!sample_physics_winds=.true. -!!sample_physics_winds_correction=.false. +sample_physics_scalars=.true. +sample_physics_winds=.true. +sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1008,12 +1044,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='full' -!!scatter_method_lwinc='full' +scatter_method_lw='hybrid' +!!scatter_method_lwinc='approx' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud7' +!!spectral_file_lwinc='spec/sp_lw_cloud9' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud7' +!!spectral_file_swinc='spec/sp_sw_cloud9' topography='slope' [namelist:radiative_gases] @@ -1027,26 +1063,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -!!cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='off' +cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='constant' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -!!cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='off' +cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='constant' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -!!ch4_mix_ratio=1.006e-06 -ch4_rad_opt='off' +ch4_mix_ratio=1.006e-06 +ch4_rad_opt='constant' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -!!co2_mix_ratio=6.002e-04 -co2_rad_opt='off' +co2_mix_ratio=6.002e-04 +co2_rad_opt='constant' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1118,8 +1154,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -!!n2o_mix_ratio=4.945e-07 -n2o_rad_opt='off' +n2o_mix_ratio=4.945e-07 +n2o_rad_opt='constant' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1136,8 +1172,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -!!o2_mix_ratio=0.2314 -o2_rad_opt='off' +o2_mix_ratio=0.2314 +o2_rad_opt='constant' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1146,7 +1182,7 @@ o2_rad_opt='off' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='off' +o3_rad_opt='ancil' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1173,10 +1209,10 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -!!aerosol='none' -!!boundary_layer='none' -!!chemistry='none' -!!cloud='none' +aerosol='none' +boundary_layer='none' +chemistry='none' +cloud='none' !!convection='none' dynamics='gungho' !!electric='none' @@ -1184,23 +1220,23 @@ external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -!!methane_oxidation=.false. +methane_oxidation=.false. !!microphysics='none' -!!orographic_drag='none' -!!radiation='none' -!!spectral_gwd='none' -!!stochastic_physics='none' -!!surface='none' +orographic_drag='none' +radiation='none' +spectral_gwd='none' +stochastic_physics='none' +surface='none' [namelist:solver] -fail_on_non_converged=.false. +!!fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 -maximum_iterations=50 +maximum_iterations=7 method='chebyshev' -monitor_convergence=.true. +monitor_convergence=.false. preconditioner='diagonal' -tolerance=1.0e-18 +tolerance=1.0e-6 [namelist:specified_surface] !!function_amplitude_e=200 @@ -1227,10 +1263,10 @@ tolerance=1.0e-18 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.false. -!!cgw_scale_factor=1.0 +add_cgw=.true. +!!cgw_scale_factor=0.86 ussp_heating=.true. -ussp_launch_factor=1.3 +ussp_launch_factor=1.2 wavelstar=4300.0 [!!namelist:star] @@ -1283,9 +1319,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1330,7 +1366,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=22 +stph_n_max=60 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1361,8 +1397,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2018-04-14 21:00:00' -calendar_start='2018-04-14 21:00:00' +calendar_origin='2021-06-02 00:00:00' +calendar_start='2021-06-02 00:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1370,7 +1406,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=2 +inner_iterations=1 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1383,7 +1419,9 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. +ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' cap_density_predictor=0.5 @@ -1400,14 +1438,15 @@ ffsl_inner_order=0 ffsl_outer_order=1 ffsl_splitting=5*1 ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud' +ffsl_vertical_order=2,2,1,2,2 +field_names='density','potential_temperature','wind','moisture', + ='con_tracer' fv_horizontal_order=2 fv_vertical_order=2 horizontal_method=5*1 horizontal_monotone=5*1 -log_space=5*.false. -max_vert_cfl_calc='uniform' +log_space=.true.,.true.,.false.,.false.,.false. +max_vert_cfl_calc='dep_point' min_val_abs_tol=-1.0e-12 min_val_max_iterations=10 min_val_method='iterative' @@ -1417,7 +1456,7 @@ operators='fv' panel_edge_high_order=.true. panel_edge_treatment='none' profile_size=5 -reversible=5*.false. +reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' scheme=5*1 si_outer_transport='none' @@ -1427,10 +1466,11 @@ splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' +transport_ageofair=.false. use_density_predictor=.false. vertical_method=5*1 vertical_monotone=5*1 -vertical_monotone_order=5*1 +vertical_monotone_order=5*3 vertical_sl_order='cubic' wind_mono_top=.false. !!wind_mono_top_depth=5 diff --git a/rose-stem/app/jedi_lfric_tests/file/iodef.xml b/rose-stem/app/jedi_lfric_tests/file/iodef.xml index be8ae0240..dfb5b1345 100644 --- a/rose-stem/app/jedi_lfric_tests/file/iodef.xml +++ b/rose-stem/app/jedi_lfric_tests/file/iodef.xml @@ -50,6 +50,11 @@ + + + + + @@ -140,6 +145,8 @@ + + @@ -186,6 +193,8 @@ + + @@ -302,7 +311,7 @@ - + @@ -327,6 +336,7 @@ + diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf new file mode 100644 index 000000000..125a4758d --- /dev/null +++ b/rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf @@ -0,0 +1,8 @@ +[file:mesh_C12_MG.nc] +mode=auto +source=$MESH_DIR/mesh_C12_MG.nc + +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='mesh_C12_MG' +!!fplane= diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf deleted file mode 100644 index 90d207a80..000000000 --- a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf +++ /dev/null @@ -1,3 +0,0 @@ -[file:iodef_temp.xml] -mode=auto -source=$ROSE_SUITE_DIR/app/jedi_lfric_tests/file/iodef.xml diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf new file mode 100644 index 000000000..0e183de1c --- /dev/null +++ b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf @@ -0,0 +1,20 @@ +[file:iodef_temp.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_lfric_tests/file/iodef.xml + +[namelist:files] +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land' +start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' +start_dump_filename='final_pert' + +[namelist:io] +diagnostic_frequency=8 + +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' +multigrid_chain_nitems=3 + +[namelist:time] +calendar_origin='2016-01-01 15:00:00' +calendar_start='2016-01-01 15:00:00' diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf index 6c3a2714d..645167002 100644 --- a/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf +++ b/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf @@ -20,7 +20,6 @@ start_dump_directory='' start_dump_filename='' [namelist:finite_element] -coord_system='xyz' vorticity_in_w1=.true. [namelist:formulation] @@ -28,12 +27,28 @@ dlayer_on=.false. dry_static_adjust=.false. eos_method='projected' exner_from_eos=.true. +l_multigrid=.false. moisture_formulation='dry' !!theta_moist_source=.false. [namelist:helmholtz_solver] -gcrk=18 -si_pressure_tolerance=1.0e-6 +preconditioner='tridiagonal' + +[namelist:idealised] +test='gravity_wave' + +[namelist:initial_density] +r1=0.0 +r2=0.0 +x1=0.0 +x2=0.0 + +[namelist:initial_temperature] +pert_centre=-60.0 + +[namelist:initial_wind] +smp_init_wind=.false. +u0=0.0 [namelist:initialization] init_option='analytic' @@ -45,16 +60,24 @@ diagnostic_frequency=20 [namelist:linear] fixed_ls=.false. +l_stabilise_bl=.false. pert_option='analytic' +transport_efficiency=.false. [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 si_tolerance=1.0e-3 +[!!namelist:multigrid] +chain_mesh_tags='','','','' + [namelist:orography] orog_init_option='none' +[namelist:partitioning] +generate_inner_halos=.true. + [namelist:planet] scaling_factor=125.0 @@ -74,9 +97,6 @@ method='rk' cfl_mol_1d_stab=2.0 cfl_mol_2d_stab=2.0 cfl_mol_3d_stab=2.0 -log_space=5*.false. max_vert_cfl_calc='uniform' -reversible=.false. runge_kutta_method='ssp4' -slice_order='cubic' !!wind_mono_top_depth=0 diff --git a/rose-stem/app/jedi_lfric_tests/rose-app.conf b/rose-stem/app/jedi_lfric_tests/rose-app.conf index 79eddf549..07157baf5 100644 --- a/rose-stem/app/jedi_lfric_tests/rose-app.conf +++ b/rose-stem/app/jedi_lfric_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_lfric_tests/vn3.0_t146 +meta=jedi_lfric_tests/vn3.0_t108 [command] default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe @@ -20,17 +20,22 @@ source=namelist:jedi_lfric_tests = namelist:jedi_geometry = namelist:jedi_state = namelist:jedi_increment - = namelist:jedi_pseudo_model = namelist:jedi_linear_model - = namelist:jedi_model + = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings + = (namelist:aerosol) = namelist:base_mesh + = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice + = (namelist:cloud) + = (namelist:chemistry) + = (namelist:convection) + = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = namelist:energy_correction + = (namelist:energy_correction) = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -41,6 +46,7 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) + = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -63,27 +69,33 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging + = (namelist:microphysics) = namelist:mixed_solver - = (namelist:mixing) + = namelist:mixing = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple + = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) - = (namelist:orography_bell_cartesian) - = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet + = (namelist:radiation) = namelist:radiative_gases + = (namelist:spectral_gwd) + = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) + = (namelist:star) = (namelist:stochastic_physics) + = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) = namelist:time @@ -106,17 +118,17 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='off' +glomap_mode='dust_and_clim' !!horiz_d=2.25 -!!l_radaer=.false. +!!l_radaer=.true. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='' -sulphuric_strat_climatology=.false. +!!prec_file='precalc/RADAER_pcalc.ukca' +sulphuric_strat_climatology=.true. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 @@ -186,7 +198,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='split_step' +transport_overwrite_freq='final' [namelist:checks] limit_cfl=.false. @@ -206,14 +218,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=0 +!!i_ukca_chem_version=111 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling=.false. -!!l_ukca_quasinewton=.false. +!!l_ukca_linox_scaling= +!!l_ukca_quasinewton= !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac=0 +!!lightnox_scale_fac= !!photol_scheme='off' -!!top_bdy_opt='no_overwrt' +!!top_bdy_opt='' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -268,12 +280,13 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] dl_base=40000.0 dl_str=0.05 -dl_type='latitude' +dl_type='standard' [namelist:departure_points] horizontal_limit='cap' @@ -318,7 +331,7 @@ stretching_method='smooth' !!aerosols_ancil_path='' !!albedo_nir_ancil_path='' !!albedo_vis_ancil_path='' -ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/Quagga/${ancil_resolution}/n96e_l70' +ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${RESOLUTION}' checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartGungho_$ROSE_TASK_NAME' !!cloud_drop_no_conc_ancil_path='' !!coarse_ancil_directory='' @@ -373,13 +386,13 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -ls_filename='final_ls' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' !!oh_ancil_path='' -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' -!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' +!!orography_subgrid_ancil_path='' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -389,8 +402,8 @@ orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' !!soil_dust_ancil_path='' !!soil_rough_ancil_path='' !!sst_ancil_path='' -start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -start_dump_filename='final_pert' +start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' +start_dump_filename='final_2021060200-2021060207.pert' !!surface_frac_ancil_path='' !!urban_ancil_path='' @@ -411,7 +424,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.false. +l_multigrid=.true. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -441,7 +454,7 @@ gcrk=8 method='prec_only' monitor_convergence=.false. normalise=.true. -preconditioner='tridiagonal' +preconditioner='multigrid' si_pressure_a_tol=1.0e-8 si_pressure_maximum_iterations=400 si_pressure_tolerance=1.0e-4 @@ -454,7 +467,7 @@ si_pressure_tolerance=1.0e-4 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=0 +!!iau_ts_start=1 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -501,15 +514,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='gravity_wave' +test='none' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.0 -r2=0.0 -x1=0.0 -x2=0.0 +r1=0.4 +r2=0.4 +x1=0.4 +x2=-0.4 y1=0.0 y2=0.0 z1=0.0 @@ -521,22 +534,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=120.0 +pert_centre=60.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=300.0,300.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=0.0,0.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 [namelist:initial_wind] nl_constant=0.0 -profile='none' +profile='constant_uv' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -546,8 +559,8 @@ profile='none' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.false. -u0=0.0 +smp_init_wind=.true. +u0=2.0 v0=0.0 wind_time_period=0.0 @@ -575,7 +588,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=8 +diagnostic_frequency=12 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -591,42 +604,43 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' -io_path_inc_read='' +io_calender_start='2021-06-02T00:00:00' +io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' +inc_time='2021-06-02 00:00:00' initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] test_field='theta' [namelist:jedi_linear_model] -incremental_wind_interpolation=.true. +incremental_wind_interpolation=.false. nl_time_step='P0DT1H0M0S' [namelist:jedi_model] time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' +initial_time='2021-06-02 00:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2018-04-14 21:00:00' +state_time='2021-06-02 00:00:00' use_pseudo_model=.true. variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' + ='m_v','m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -660,7 +674,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 +z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -699,8 +713,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.01 -!!z0m_specified=0.1 +!!z0h_specified=0.0 +!!z0m_specified=0.0 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -779,7 +793,21 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. +max_bl_stabilisation=0.75 +n_bl_levels_to_stabilise=15 pert_option='file' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -807,9 +835,9 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.false. +!!prog_tnuc=.true. !!qcl_rime=1.0e-4 -!!shape_rime=.false. +!!shape_rime=.true. turb_gen_mixph=.true. !!z_surf=50.0 @@ -822,7 +850,7 @@ guess_np1=.false. mixed_solver_a_tol=1.0e-3 monitor_convergence=.true. normalise=.true. -reference_reset_time=3600. +reference_reset_time=3600.0 si_maximum_iterations=10 si_method='block_gcr' si_preconditioner='pressure' @@ -832,15 +860,15 @@ split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blending' +!!method='blend_1dbl_fa' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[!!namelist:multigrid] -chain_mesh_tags='','','','' +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -848,9 +876,17 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='dynamics' +aerosol_mesh_name='aerosol' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. +dynamics_mesh_name='dynamics' +!!lowest_order_aero_flag=.false. +multires_coupling_mesh_tags='dynamics' +multires_coupling_mode='test' +negative_correction='none' +physics_mesh_name='aerosol' +reconstruction='simple' +recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -945,24 +981,24 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.true. +generate_inner_halos=.false. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -972,7 +1008,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1011,12 +1047,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='full' -!!scatter_method_lwinc='full' +scatter_method_lw='hybrid' +!!scatter_method_lwinc='approx' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud7' +!!spectral_file_lwinc='spec/sp_lw_cloud9' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud7' +!!spectral_file_swinc='spec/sp_sw_cloud9' topography='slope' [namelist:radiative_gases] @@ -1030,26 +1066,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -!!cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='off' +cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='constant' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -!!cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='off' +cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='constant' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -!!ch4_mix_ratio=1.006e-06 -ch4_rad_opt='off' +ch4_mix_ratio=1.006e-06 +ch4_rad_opt='constant' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -!!co2_mix_ratio=6.002e-04 -co2_rad_opt='off' +co2_mix_ratio=6.002e-04 +co2_rad_opt='constant' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1121,8 +1157,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -!!n2o_mix_ratio=4.945e-07 -n2o_rad_opt='off' +n2o_mix_ratio=4.945e-07 +n2o_rad_opt='constant' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1139,8 +1175,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -!!o2_mix_ratio=0.2314 -o2_rad_opt='off' +o2_mix_ratio=0.2314 +o2_rad_opt='constant' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1149,7 +1185,7 @@ o2_rad_opt='off' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='off' +o3_rad_opt='ancil' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1230,10 +1266,10 @@ tolerance=1.0e-6 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.false. -!!cgw_scale_factor=1.0 +add_cgw=.true. +!!cgw_scale_factor=0.86 ussp_heating=.true. -ussp_launch_factor=1.3 +ussp_launch_factor=1.2 wavelstar=4300.0 [!!namelist:star] @@ -1286,9 +1322,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1333,7 +1369,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=22 +stph_n_max=60 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1364,8 +1400,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2016-01-01 15:00:00' -calendar_start='2016-01-01 15:00:00' +calendar_origin='2021-06-02 00:00:00' +calendar_start='2021-06-02 00:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1373,7 +1409,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=2 +inner_iterations=1 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1386,6 +1422,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml b/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml index 808f8ef91..4a65814b5 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml +++ b/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -234,6 +241,8 @@ + + @@ -280,6 +289,8 @@ + + @@ -421,6 +432,7 @@ + diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf new file mode 100644 index 000000000..125a4758d --- /dev/null +++ b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf @@ -0,0 +1,8 @@ +[file:mesh_C12_MG.nc] +mode=auto +source=$MESH_DIR/mesh_C12_MG.nc + +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='mesh_C12_MG' +!!fplane= diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf new file mode 100644 index 000000000..8e18ae5fd --- /dev/null +++ b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf @@ -0,0 +1,7 @@ +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='${MESH_DIR}/mesh_C12_MG_op' +!!fplane= +prepartitioned=.true. + +[!!namelist:partitioning] diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-default.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-default.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf new file mode 100644 index 000000000..065a444b6 --- /dev/null +++ b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf @@ -0,0 +1,26 @@ +[file:iodef_temp.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_tlm_forecast_tl/file/iodef.xml + +[namelist:io] +diagnostic_frequency=8 + +[namelist:jedi_geometry] +io_calender_start='2018-04-14T21:00:00' + +[namelist:jedi_increment] +inc_time='2018-04-14 21:00:00' + +[namelist:jedi_pseudo_model] +initial_time='2018-04-14T21:00:00' + +[namelist:jedi_state] +state_time='2018-04-14 21:00:00' + +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' +multigrid_chain_nitems=3 + +[namelist:time] +calendar_origin='2018-04-14 21:00:00' +calendar_start='2018-04-14 21:00:00' diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf new file mode 100644 index 000000000..3d9745645 --- /dev/null +++ b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf @@ -0,0 +1,2 @@ +[namelist:mixed_solver] +reference_reset_time=$DT diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf new file mode 100644 index 000000000..d9c5499fd --- /dev/null +++ b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf @@ -0,0 +1,9 @@ +[namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-3 + +[namelist:mixed_solver] +mixed_solver_a_tol=1.0e-21 +si_tolerance=1.0e-3 + +[namelist:timestepping] +outer_iterations=1 diff --git a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf index f1e513244..b446f4c69 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf +++ b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_tlm_forecast_tl/vn3.0_t146 +meta=jedi_tlm_forecast_tl/vn3.0_t108 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -23,13 +23,19 @@ source=namelist:jedi_lfric_tests = namelist:jedi_linear_model = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings + = (namelist:aerosol) = namelist:base_mesh + = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice + = (namelist:cloud) + = (namelist:chemistry) + = (namelist:convection) + = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = namelist:energy_correction + = (namelist:energy_correction) = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -40,6 +46,7 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) + = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -62,26 +69,33 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging + = (namelist:microphysics) = namelist:mixed_solver - = (namelist:mixing) + = namelist:mixing = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple + = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) - = (namelist:orography_bell_cartesian) - = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet + = (namelist:radiation) = namelist:radiative_gases + = (namelist:spectral_gwd) + = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) + = (namelist:star) + = (namelist:stochastic_physics) + = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) = namelist:time @@ -104,24 +118,24 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='off' +glomap_mode='dust_and_clim' !!horiz_d=2.25 -!!l_radaer=.false. +!!l_radaer=.true. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='' -sulphuric_strat_climatology=.false. +!!prec_file='precalc/RADAER_pcalc.ukca' +sulphuric_strat_climatology=.true. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 [namelist:base_mesh] !!f_lat_deg=45.0 -file_prefix='mesh.nc' +file_prefix='mesh' !!fplane=.false. geometry='spherical' prepartitioned=.false. @@ -184,7 +198,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='split_step' +transport_overwrite_freq='final' [namelist:checks] limit_cfl=.false. @@ -204,14 +218,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=0 +!!i_ukca_chem_version=111 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling=.false. -!!l_ukca_quasinewton=.false. +!!l_ukca_linox_scaling= +!!l_ukca_quasinewton= !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac=0 +!!lightnox_scale_fac= !!photol_scheme='off' -!!top_bdy_opt='no_overwrt' +!!top_bdy_opt='' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -266,6 +280,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -377,7 +392,7 @@ diag_stem_name='' !!o3_ancil_path='' !!oh_ancil_path='' orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +!!orography_subgrid_ancil_path='' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -409,7 +424,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.false. +l_multigrid=.true. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -419,7 +434,7 @@ shallow=.true. si_momentum_equation=.false. theta_moist_source=.false. use_multires_coupling=.false. -use_physics=.false. +use_physics=.true. use_wavedynamics=.true. vector_invariant=.false. @@ -433,16 +448,16 @@ profile_data_v=0.0 times=0.0 [namelist:helmholtz_solver] -fail_on_non_converged=.false. -gcrk=18 +!!fail_on_non_converged=.false. +gcrk=8 !!jacobi_relaxation=0.5 -method='bicgstab' -monitor_convergence=.true. +method='prec_only' +monitor_convergence=.false. normalise=.true. -preconditioner='tridiagonal' -si_pressure_a_tol=0 -si_pressure_maximum_iterations=40 -si_pressure_tolerance=1.0e-15 +preconditioner='multigrid' +si_pressure_a_tol=1.0e-8 +si_pressure_maximum_iterations=400 +si_pressure_tolerance=1.0e-4 [namelist:iau] !!iau_ainc_multifile=.false. @@ -452,7 +467,7 @@ si_pressure_tolerance=1.0e-15 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=0 +!!iau_ts_start=1 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -499,15 +514,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='gravity_wave' +test='none' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.0 -r2=0.0 -x1=0.0 -x2=0.0 +r1=0.4 +r2=0.4 +x1=0.4 +x2=-0.4 y1=0.0 y2=0.0 z1=0.0 @@ -519,22 +534,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=120.0 +pert_centre=60.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=300.0,300.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=0.0,0.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 [namelist:initial_wind] nl_constant=0.0 -profile='none' +profile='constant_uv' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -544,8 +559,8 @@ profile='none' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.false. -u0=0.0 +smp_init_wind=.true. +u0=2.0 v0=0.0 wind_time_period=0.0 @@ -573,7 +588,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=8 +diagnostic_frequency=12 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -589,38 +604,40 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' +io_calender_start='2021-06-02T00:00:00' io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' -io_setup_increment=.true. +io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' -initialise_via_read=.true. +inc_time='2021-06-02 00:00:00' +initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] test_field='theta' [namelist:jedi_linear_model] +incremental_wind_interpolation=.false. nl_time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' +initial_time='2021-06-02 00:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2018-04-14 21:00:00' +state_time='2021-06-02 00:00:00' use_pseudo_model=.true. -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', + ='m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -654,7 +671,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 +z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -693,8 +710,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.01 -!!z0m_specified=0.1 +!!z0h_specified=0.0 +!!z0m_specified=0.0 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -773,7 +790,21 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -pert_option='analytic' +max_bl_stabilisation=0.75 +n_bl_levels_to_stabilise=15 +pert_option='file' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -801,40 +832,40 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.false. +!!prog_tnuc=.true. !!qcl_rime=1.0e-4 -!!shape_rime=.false. +!!shape_rime=.true. turb_gen_mixph=.true. !!z_surf=50.0 [namelist:mixed_solver] eliminate_variables='discrete' -fail_on_non_converged=.false. -gcrk=10 +fail_on_non_converged=.true. +gcrk=4 guess_np1=.false. !!jacobi_relaxation=0.5 -mixed_solver_a_tol=1.0e-21 +mixed_solver_a_tol=1.0e-3 monitor_convergence=.true. normalise=.true. reference_reset_time=3600.0 -si_maximum_iterations=7 +si_maximum_iterations=10 si_method='block_gcr' si_preconditioner='pressure' -si_tolerance=1.0e-21 +si_tolerance=1.0e-1 split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blending' +!!method='blend_1dbl_fa' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[!!namelist:multigrid] -chain_mesh_tags='','','','' +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -842,9 +873,17 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='dynamics' +aerosol_mesh_name='aerosol' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. +dynamics_mesh_name='dynamics' +!!lowest_order_aero_flag=.false. +multires_coupling_mesh_tags='dynamics' +multires_coupling_mode='test' +negative_correction='none' +physics_mesh_name='aerosol' +reconstruction='simple' +recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -939,34 +978,34 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.true. +generate_inner_halos=.false. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 -!!limit_drag_incs=.false. +gw_segment=0 +limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' -!!sample_physics_scalars=.true. -!!sample_physics_winds=.true. -!!sample_physics_winds_correction=.false. +sample_physics_scalars=.true. +sample_physics_winds=.true. +sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1005,12 +1044,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='full' -!!scatter_method_lwinc='full' +scatter_method_lw='hybrid' +!!scatter_method_lwinc='approx' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud7' +!!spectral_file_lwinc='spec/sp_lw_cloud9' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud7' +!!spectral_file_swinc='spec/sp_sw_cloud9' topography='slope' [namelist:radiative_gases] @@ -1024,26 +1063,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -!!cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='off' +cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='constant' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -!!cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='off' +cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='constant' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -!!ch4_mix_ratio=1.006e-06 -ch4_rad_opt='off' +ch4_mix_ratio=1.006e-06 +ch4_rad_opt='constant' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -!!co2_mix_ratio=6.002e-04 -co2_rad_opt='off' +co2_mix_ratio=6.002e-04 +co2_rad_opt='constant' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1115,8 +1154,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -!!n2o_mix_ratio=4.945e-07 -n2o_rad_opt='off' +n2o_mix_ratio=4.945e-07 +n2o_rad_opt='constant' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1133,8 +1172,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -!!o2_mix_ratio=0.2314 -o2_rad_opt='off' +o2_mix_ratio=0.2314 +o2_rad_opt='constant' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1143,7 +1182,7 @@ o2_rad_opt='off' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='off' +o3_rad_opt='ancil' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1170,10 +1209,10 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -!!aerosol='none' -!!boundary_layer='none' -!!chemistry='none' -!!cloud='none' +aerosol='none' +boundary_layer='none' +chemistry='none' +cloud='none' !!convection='none' dynamics='gungho' !!electric='none' @@ -1181,23 +1220,23 @@ external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -!!methane_oxidation=.false. +methane_oxidation=.false. !!microphysics='none' -!!orographic_drag='none' -!!radiation='none' -!!spectral_gwd='none' -!!stochastic_physics='none' -!!surface='none' +orographic_drag='none' +radiation='none' +spectral_gwd='none' +stochastic_physics='none' +surface='none' [namelist:solver] -fail_on_non_converged=.false. +!!fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 -maximum_iterations=50 +maximum_iterations=7 method='chebyshev' -monitor_convergence=.true. +monitor_convergence=.false. preconditioner='diagonal' -tolerance=1.0e-18 +tolerance=1.0e-6 [namelist:specified_surface] !!function_amplitude_e=200 @@ -1224,10 +1263,10 @@ tolerance=1.0e-18 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.false. -!!cgw_scale_factor=1.0 +add_cgw=.true. +!!cgw_scale_factor=0.86 ussp_heating=.true. -ussp_launch_factor=1.3 +ussp_launch_factor=1.2 wavelstar=4300.0 [!!namelist:star] @@ -1280,9 +1319,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1327,7 +1366,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=22 +stph_n_max=60 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1358,8 +1397,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2018-04-14 21:00:00' -calendar_start='2018-04-14 21:00:00' +calendar_origin='2021-06-02 00:00:00' +calendar_start='2021-06-02 00:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1367,7 +1406,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=2 +inner_iterations=1 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1380,7 +1419,9 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. +ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' cap_density_predictor=0.5 @@ -1397,14 +1438,15 @@ ffsl_inner_order=0 ffsl_outer_order=1 ffsl_splitting=5*1 ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud' +ffsl_vertical_order=2,2,1,2,2 +field_names='density','potential_temperature','wind','moisture', + ='con_tracer' fv_horizontal_order=2 fv_vertical_order=2 horizontal_method=5*1 horizontal_monotone=5*1 -log_space=5*.false. -max_vert_cfl_calc='uniform' +log_space=.true.,.true.,.false.,.false.,.false. +max_vert_cfl_calc='dep_point' min_val_abs_tol=-1.0e-12 min_val_max_iterations=10 min_val_method='iterative' @@ -1414,7 +1456,7 @@ operators='fv' panel_edge_high_order=.true. panel_edge_treatment='none' profile_size=5 -reversible=5*.false. +reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' scheme=5*1 si_outer_transport='none' @@ -1424,10 +1466,11 @@ splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' +transport_ageofair=.false. use_density_predictor=.false. vertical_method=5*1 vertical_monotone=5*1 -vertical_monotone_order=5*1 +vertical_monotone_order=5*3 vertical_sl_order='cubic' wind_mono_top=.false. !!wind_mono_top_depth=5 diff --git a/rose-stem/app/jedi_tlm_tests/file/iodef.xml b/rose-stem/app/jedi_tlm_tests/file/iodef.xml index 808f8ef91..4a65814b5 100644 --- a/rose-stem/app/jedi_tlm_tests/file/iodef.xml +++ b/rose-stem/app/jedi_tlm_tests/file/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -234,6 +241,8 @@ + + @@ -280,6 +289,8 @@ + + @@ -421,6 +432,7 @@ + diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf new file mode 100644 index 000000000..125a4758d --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf @@ -0,0 +1,8 @@ +[file:mesh_C12_MG.nc] +mode=auto +source=$MESH_DIR/mesh_C12_MG.nc + +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='mesh_C12_MG' +!!fplane= diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf new file mode 100644 index 000000000..8e18ae5fd --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf @@ -0,0 +1,7 @@ +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='${MESH_DIR}/mesh_C12_MG_op' +!!fplane= +prepartitioned=.true. + +[!!namelist:partitioning] diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf new file mode 100644 index 000000000..1814a4708 --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf @@ -0,0 +1,8 @@ +[file:mesh_C224_MG.nc] +mode=auto +source=$MESH_DIR/mesh_C224_MG.nc + +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='mesh_C224_MG' +!!fplane= diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-default.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-default.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf index 3f2af7e5b..ffd315be0 100644 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf @@ -2,3 +2,8 @@ moisture_formulation='dry' moisture_in_solver=.false. !!theta_moist_source=.false. + +[namelist:section_choice] +!!aerosol='none' +!!cloud='none' +!!methane_oxidation=.false. diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf new file mode 100644 index 000000000..ccd55de3b --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf @@ -0,0 +1,28 @@ +[file:iodef_temp.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_tlm_tests/file/iodef.xml + +[namelist:io] +diagnostic_frequency=8 + +[namelist:jedi_geometry] +io_calender_start='2018-04-14T21:00:00' +io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' +io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' + +[namelist:jedi_increment] +inc_time='2018-04-14 21:00:00' + +[namelist:jedi_pseudo_model] +initial_time='2018-04-14T21:00:00' + +[namelist:jedi_state] +state_time='2018-04-14 21:00:00' + +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' +multigrid_chain_nitems=3 + +[namelist:time] +calendar_origin='2018-04-14 21:00:00' +calendar_start='2018-04-14 21:00:00' diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf new file mode 100644 index 000000000..dfe2b916d --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf @@ -0,0 +1,3 @@ +[file:iodef_temp.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_tlm_tests/file/iodef.xml diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf new file mode 100644 index 000000000..aea74c8fa --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf @@ -0,0 +1,5 @@ +[namelist:jedi_geometry] +io_setup_increment=.true. + +[namelist:jedi_increment] +initialise_via_read=.true. diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf deleted file mode 100644 index b435c2bc3..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf +++ /dev/null @@ -1,15 +0,0 @@ -[namelist:helmholtz_solver] -gcrk=8 -si_pressure_a_tol=1.0e-8 -si_pressure_maximum_iterations=400 -si_pressure_tolerance=1.0e-4 - -[namelist:mixed_solver] -gcrk=6 -mixed_solver_a_tol=0.0 -si_maximum_iterations=10 -si_tolerance=1.0e-5 - -[namelist:solver] -maximum_iterations=7 -tolerance=1.0e-6 diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf new file mode 100644 index 000000000..3d9745645 --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf @@ -0,0 +1,2 @@ +[namelist:mixed_solver] +reference_reset_time=$DT diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf new file mode 100644 index 000000000..4af6d3cf1 --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf @@ -0,0 +1,9 @@ +[namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-2 + +[namelist:mixed_solver] +mixed_solver_a_tol=1.0e-21 +si_tolerance=1.0e-3 + +[namelist:timestepping] +outer_iterations=1 diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf new file mode 100644 index 000000000..77270e0f5 --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf @@ -0,0 +1,15 @@ +[namelist:helmholtz_solver] +gcrk=18 +si_pressure_a_tol=0 +si_pressure_tolerance=1.0e-15 + +[namelist:mixed_solver] +fail_on_non_converged=.false. +gcrk=10 +mixed_solver_a_tol=1.0e-21 +si_maximum_iterations=100 +si_tolerance=1.0e-21 + +[namelist:solver] +maximum_iterations=50 +tolerance=1.0e-18 diff --git a/rose-stem/app/jedi_tlm_tests/rose-app.conf b/rose-stem/app/jedi_tlm_tests/rose-app.conf index 78c06f6a3..6e8c2a776 100644 --- a/rose-stem/app/jedi_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_tlm_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_tlm_tests/vn3.0_t146 +meta=jedi_tlm_tests/vn3.0_t108 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -23,13 +23,19 @@ source=namelist:jedi_lfric_tests = namelist:jedi_linear_model = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings + = (namelist:aerosol) = namelist:base_mesh + = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice + = (namelist:cloud) + = (namelist:chemistry) + = (namelist:convection) + = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = namelist:energy_correction + = (namelist:energy_correction) = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -40,6 +46,7 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) + = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -62,30 +69,35 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging + = (namelist:microphysics) = namelist:mixed_solver - = (namelist:mixing) + = namelist:mixing = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple + = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) - = (namelist:orography_bell_cartesian) - = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet + = (namelist:radiation) = namelist:radiative_gases + = (namelist:spectral_gwd) + = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) + = (namelist:star) = (namelist:stochastic_physics) + = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) - = (namelist:theta_relax) = namelist:time = namelist:timestepping = namelist:transport @@ -106,24 +118,24 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='off' +glomap_mode='dust_and_clim' !!horiz_d=2.25 -!!l_radaer=.false. +!!l_radaer=.true. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='' -sulphuric_strat_climatology=.false. +!!prec_file='precalc/RADAER_pcalc.ukca' +sulphuric_strat_climatology=.true. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 [namelist:base_mesh] !!f_lat_deg=45.0 -file_prefix='mesh.nc' +file_prefix='mesh' !!fplane=.false. geometry='spherical' prepartitioned=.false. @@ -186,7 +198,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='split_step' +transport_overwrite_freq='final' [namelist:checks] limit_cfl=.false. @@ -206,14 +218,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=0 +!!i_ukca_chem_version=111 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling=.false. -!!l_ukca_quasinewton=.false. +!!l_ukca_linox_scaling= +!!l_ukca_quasinewton= !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac=0 +!!lightnox_scale_fac= !!photol_scheme='off' -!!top_bdy_opt='no_overwrt' +!!top_bdy_opt='' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -268,6 +280,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -379,7 +392,7 @@ diag_stem_name='' !!o3_ancil_path='' !!oh_ancil_path='' orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +!!orography_subgrid_ancil_path='' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -411,7 +424,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.false. +l_multigrid=.true. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -421,7 +434,7 @@ shallow=.true. si_momentum_equation=.false. theta_moist_source=.false. use_multires_coupling=.false. -use_physics=.false. +use_physics=.true. use_wavedynamics=.true. vector_invariant=.false. @@ -435,16 +448,16 @@ profile_data_v=0.0 times=0.0 [namelist:helmholtz_solver] -fail_on_non_converged=.false. -gcrk=18 +!!fail_on_non_converged=.false. +gcrk=8 !!jacobi_relaxation=0.5 -method='bicgstab' -monitor_convergence=.true. +method='prec_only' +monitor_convergence=.false. normalise=.true. -preconditioner='tridiagonal' -si_pressure_a_tol=0 -si_pressure_maximum_iterations=40 -si_pressure_tolerance=1.0e-15 +preconditioner='multigrid' +si_pressure_a_tol=1.0e-8 +si_pressure_maximum_iterations=400 +si_pressure_tolerance=1.0e-4 [namelist:iau] !!iau_ainc_multifile=.false. @@ -454,7 +467,7 @@ si_pressure_tolerance=1.0e-15 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=0 +!!iau_ts_start=1 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -501,15 +514,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='gravity_wave' +test='none' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.0 -r2=0.0 -x1=0.0 -x2=0.0 +r1=0.4 +r2=0.4 +x1=0.4 +x2=-0.4 y1=0.0 y2=0.0 z1=0.0 @@ -521,22 +534,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=120.0 +pert_centre=60.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=300.0,300.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0 -!!profile_heights=0.0 -!!profile_size=1 +!!profile_data=0.0,0.0 +!!profile_heights=0.0,10.0e3 +!!profile_size=2 [namelist:initial_wind] nl_constant=0.0 -profile='none' +profile='constant_uv' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -546,8 +559,8 @@ profile='none' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.false. -u0=0.0 +smp_init_wind=.true. +u0=2.0 v0=0.0 wind_time_period=0.0 @@ -575,7 +588,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=8 +diagnostic_frequency=12 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -591,39 +604,40 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' -io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' -io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' +io_calender_start='2021-06-02T00:00:00' +io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Issue126/C224_lfric_diag' +io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Issue126/C224_jedi_trajectory' io_path_state_write='write_file' io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' +inc_time='2021-06-02 00:00:00' initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] +adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] test_field='theta' [namelist:jedi_linear_model] -incremental_wind_interpolation=.true. +incremental_wind_interpolation=.false. nl_time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' +initial_time='2021-06-02 00:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2018-04-14 21:00:00' +state_time='2021-06-02 00:00:00' use_pseudo_model=.true. -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', + ='m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -657,7 +671,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 +z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -696,8 +710,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.01 -!!z0m_specified=0.1 +!!z0h_specified=0.0 +!!z0m_specified=0.0 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -776,7 +790,21 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -pert_option='analytic' +max_bl_stabilisation=0.75 +n_bl_levels_to_stabilise=15 +pert_option='file' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -804,40 +832,40 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.false. +!!prog_tnuc=.true. !!qcl_rime=1.0e-4 -!!shape_rime=.false. +!!shape_rime=.true. turb_gen_mixph=.true. !!z_surf=50.0 [namelist:mixed_solver] eliminate_variables='discrete' -fail_on_non_converged=.false. -gcrk=10 +fail_on_non_converged=.true. +gcrk=4 guess_np1=.false. !!jacobi_relaxation=0.5 -mixed_solver_a_tol=1.0e-21 +mixed_solver_a_tol=1.0e-3 monitor_convergence=.true. normalise=.true. reference_reset_time=3600.0 -si_maximum_iterations=7 +si_maximum_iterations=10 si_method='block_gcr' si_preconditioner='pressure' -si_tolerance=1.0e-21 +si_tolerance=1.0e-1 split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blending' +!!method='blend_1dbl_fa' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[!!namelist:multigrid] -chain_mesh_tags='','','','' +[namelist:multigrid] +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -845,9 +873,17 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='dynamics' +aerosol_mesh_name='aerosol' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. +dynamics_mesh_name='dynamics' +!!lowest_order_aero_flag=.false. +multires_coupling_mesh_tags='dynamics' +multires_coupling_mode='test' +negative_correction='none' +physics_mesh_name='aerosol' +reconstruction='simple' +recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -942,34 +978,34 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.true. +generate_inner_halos=.false. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 -!!limit_drag_incs=.false. +gw_segment=0 +limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' -!!sample_physics_scalars=.true. -!!sample_physics_winds=.true. -!!sample_physics_winds_correction=.false. +sample_physics_scalars=.true. +sample_physics_winds=.true. +sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1008,12 +1044,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='full' -!!scatter_method_lwinc='full' +scatter_method_lw='hybrid' +!!scatter_method_lwinc='approx' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud7' +!!spectral_file_lwinc='spec/sp_lw_cloud9' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud7' +!!spectral_file_swinc='spec/sp_sw_cloud9' topography='slope' [namelist:radiative_gases] @@ -1027,26 +1063,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -!!cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='off' +cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='constant' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -!!cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='off' +cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='constant' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -!!ch4_mix_ratio=1.006e-06 -ch4_rad_opt='off' +ch4_mix_ratio=1.006e-06 +ch4_rad_opt='constant' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -!!co2_mix_ratio=6.002e-04 -co2_rad_opt='off' +co2_mix_ratio=6.002e-04 +co2_rad_opt='constant' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1118,8 +1154,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -!!n2o_mix_ratio=4.945e-07 -n2o_rad_opt='off' +n2o_mix_ratio=4.945e-07 +n2o_rad_opt='constant' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1136,8 +1172,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -!!o2_mix_ratio=0.2314 -o2_rad_opt='off' +o2_mix_ratio=0.2314 +o2_rad_opt='constant' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1146,7 +1182,7 @@ o2_rad_opt='off' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='off' +o3_rad_opt='ancil' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1173,10 +1209,10 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -!!aerosol='none' -!!boundary_layer='none' -!!chemistry='none' -!!cloud='none' +aerosol='none' +boundary_layer='none' +chemistry='none' +cloud='none' !!convection='none' dynamics='gungho' !!electric='none' @@ -1184,23 +1220,23 @@ external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -!!methane_oxidation=.false. +methane_oxidation=.false. !!microphysics='none' -!!orographic_drag='none' -!!radiation='none' -!!spectral_gwd='none' -!!stochastic_physics='none' -!!surface='none' +orographic_drag='none' +radiation='none' +spectral_gwd='none' +stochastic_physics='none' +surface='none' [namelist:solver] -fail_on_non_converged=.false. +!!fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 -maximum_iterations=50 +maximum_iterations=7 method='chebyshev' -monitor_convergence=.true. +monitor_convergence=.false. preconditioner='diagonal' -tolerance=1.0e-18 +tolerance=1.0e-6 [namelist:specified_surface] !!function_amplitude_e=200 @@ -1227,10 +1263,10 @@ tolerance=1.0e-18 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.false. -!!cgw_scale_factor=1.0 +add_cgw=.true. +!!cgw_scale_factor=0.86 ussp_heating=.true. -ussp_launch_factor=1.3 +ussp_launch_factor=1.2 wavelstar=4300.0 [!!namelist:star] @@ -1283,9 +1319,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 -!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1330,7 +1366,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=22 +stph_n_max=60 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1361,8 +1397,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2018-04-14 21:00:00' -calendar_start='2018-04-14 21:00:00' +calendar_origin='2021-06-02 00:00:00' +calendar_start='2021-06-02 00:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1370,7 +1406,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=2 +inner_iterations=1 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1383,7 +1419,9 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. +ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' cap_density_predictor=0.5 @@ -1400,14 +1438,15 @@ ffsl_inner_order=0 ffsl_outer_order=1 ffsl_splitting=5*1 ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud' +ffsl_vertical_order=2,2,1,2,2 +field_names='density','potential_temperature','wind','moisture', + ='con_tracer' fv_horizontal_order=2 fv_vertical_order=2 horizontal_method=5*1 horizontal_monotone=5*1 -log_space=5*.false. -max_vert_cfl_calc='uniform' +log_space=.true.,.true.,.false.,.false.,.false. +max_vert_cfl_calc='dep_point' min_val_abs_tol=-1.0e-12 min_val_max_iterations=10 min_val_method='iterative' @@ -1417,7 +1456,7 @@ operators='fv' panel_edge_high_order=.true. panel_edge_treatment='none' profile_size=5 -reversible=5*.false. +reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' scheme=5*1 si_outer_transport='none' @@ -1427,10 +1466,11 @@ splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' +transport_ageofair=.false. use_density_predictor=.false. vertical_method=5*1 vertical_monotone=5*1 -vertical_monotone_order=5*1 +vertical_monotone_order=5*3 vertical_sl_order='cubic' wind_mono_top=.false. !!wind_mono_top_depth=5 diff --git a/rose-stem/app/jules/rose-app.conf b/rose-stem/app/jules/rose-app.conf index 73185cb90..019126505 100644 --- a/rose-stem/app/jules/rose-app.conf +++ b/rose-stem/app/jules/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-jules/vn3.0_t146 +meta=lfric-jules/vn3.0_t214 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ @@ -287,6 +287,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -981,17 +982,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -!!bl_segment=0 +bl_segment=0 blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -1001,7 +1002,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1415,6 +1416,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.true. adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.true. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/lfric2lfric/file/axis_def_main.xml b/rose-stem/app/lfric2lfric/file/axis_def_main.xml index 83637bd76..ce91cb353 100644 --- a/rose-stem/app/lfric2lfric/file/axis_def_main.xml +++ b/rose-stem/app/lfric2lfric/file/axis_def_main.xml @@ -19,4 +19,5 @@ + diff --git a/rose-stem/app/lfric2lfric/file/iodef_lbc.xml b/rose-stem/app/lfric2lfric/file/iodef_lbc.xml new file mode 100644 index 000000000..3d2e14bd0 --- /dev/null +++ b/rose-stem/app/lfric2lfric/file/iodef_lbc.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + performance + 1.0 + + + + false + false + 50 + true + lfric2lfric lfric2lfric + + + + + diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf b/rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf new file mode 100644 index 000000000..629b93487 --- /dev/null +++ b/rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf @@ -0,0 +1,21 @@ +[env] +RESTART_STOP=2 + +[file:iodef.xml] +source=$ROSE_SUITE_DIR/app/lfric2lfric/file/iodef_lbc.xml + +[file:source_file_lbc.nc] +mode=auto +source=$BIG_DATA_DIR/lfric2lfric/lfric_gal_diagnostics.nc + +[namelist:lfric2lfric] +destination_mesh_name='dynamics' +mode='lbc' +source_file_lbc='source_file_lbc' +source_mesh_name='C12' + +[namelist:time] +timestep_end='2' + +[namelist:timestepping] +dt=64800.0 diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index c241d4e99..ea7ab4128 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric2lfric/vn3.0_t146 +meta=lfric-lfric2lfric/vn3.0_t214 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -201,6 +201,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=0 [!!namelist:damping_layer] @@ -664,9 +665,11 @@ destination_meshfile_prefix='input_mesh_faces' destination_topology='fully_periodic' dst_ancil_directory='' dst_orography_mean_ancil_path='' +mode='ics' origin_domain='global' prepartitioned_meshes=.false. regrid_method='map' +!!source_file_lbc='source_file_lbc' source_geometry='spherical' source_mesh_name='dynamics' source_meshfile_prefix='input_mesh_faces' @@ -675,6 +678,7 @@ src_ancil_directory='' src_orography_mean_ancil_path='' target_domain='global' !!weight_file='weight_file' +!!weight_file_lbc='weight_file_lbc' [namelist:logging] log_to_rank_zero_only=.true. @@ -846,17 +850,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='constant' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -865,7 +869,7 @@ configure_segments=.false. !!smagorinsky_placement='fast' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1278,6 +1282,7 @@ tau_u=0 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='averaged' diff --git a/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml b/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml index cfbe24d38..fb5ee2571 100644 --- a/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml +++ b/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml @@ -1,12 +1,5 @@ - - - - - - - diff --git a/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml b/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml index c6ea03cdf..c1bca4231 100644 --- a/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml +++ b/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml @@ -1,7 +1,7 @@ - + diff --git a/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml b/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml index 881c26f5d..b7e6d6824 100644 --- a/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml +++ b/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml @@ -36,6 +36,7 @@ + diff --git a/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf b/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf index 98ba7349e..3b55fae60 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf @@ -214,6 +214,7 @@ orog_init_option='none' !!lowest_level='gradient' !!microphysics_placement='slow' !!orographic_drag_placement='slow' +sample_physics_winds_correction=.true. !!spectral_gwd_placement='slow' [namelist:planet] diff --git a/rose-stem/app/lfric_atm/opt/rose-app-climate.conf b/rose-stem/app/lfric_atm/opt/rose-app-climate.conf index 09ba98a0c..06d90179a 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-climate.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-climate.conf @@ -18,6 +18,7 @@ l_ukca_asad_full=.false. [namelist:cosp] l_cosp=.true. +n_cosp_step=1 n_subcol_gen=64 [namelist:energy_correction] diff --git a/rose-stem/app/lfric_atm/opt/rose-app-da.conf b/rose-stem/app/lfric_atm/opt/rose-app-da.conf index cc0635967..bdd892382 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-da.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-da.conf @@ -6,8 +6,8 @@ iau_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_um2lfric_iau_00 sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/seaice_ugrid_postqa_fixed' snow_analysis_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_glu_snow_um2lfric_fixed' sst_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/sst_ugrid_postqa_fixed' -start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/Ticket354' -start_dump_filename='20210324T0000Z_lfric_ice_t+3' +start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/PR202' +start_dump_filename='20210324T0000Z_lfric_ice_dust_t+3' [namelist:iau] iau_ainc_multifile=.false. diff --git a/rose-stem/app/lfric_atm/opt/rose-app-eda.conf b/rose-stem/app/lfric_atm/opt/rose-app-eda.conf index 0921925c3..ea7f076b4 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-eda.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-eda.conf @@ -11,8 +11,8 @@ iau_surf_path='$BIG_DATA_DIR/IAU/Global/um2lfric_landda' sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/seaice_ugrid_postqa_fixed' snow_analysis_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_glu_snow_um2lfric_fixed' sst_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/sst_ugrid_postqa_fixed' -start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/Ticket354' -start_dump_filename='20210324T0000Z_lfric_ice_t+3' +start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/PR202' +start_dump_filename='20210324T0000Z_lfric_ice_dust_t+3' [namelist:iau] iau_ainc_multifile=.true. diff --git a/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf b/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf index 3c33f1817..b0162aeba 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf @@ -7,8 +7,8 @@ iau_pert_path='$BIG_DATA_DIR/IAU/Global/iau_pertinc_start' sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/seaice_ugrid_postqa_fixed' snow_analysis_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_glu_snow_um2lfric_fixed' sst_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/sst_ugrid_postqa_fixed' -start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/Ticket354' -start_dump_filename='20210324T0000Z_lfric_ice_t+3' +start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/PR202' +start_dump_filename='20210324T0000Z_lfric_ice_dust_t+3' [namelist:iau] iau_ainc_multifile=.false. diff --git a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf index a4a01343d..570d397b6 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf @@ -226,6 +226,7 @@ orog_init_option='none' !!lowest_level='gradient' !!microphysics_placement='slow' !!orographic_drag_placement='slow' +sample_physics_winds_correction=.true. !!spectral_gwd_placement='slow' [namelist:planet] diff --git a/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf b/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf index ae2cf521c..854cf77af 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf @@ -1,7 +1,5 @@ [namelist:physics] bl_segment=16 -configure_segments=.true. -conv_gr_segment=16 gw_segment=32 ls_ppn_segment=32 ussp_segment=4 diff --git a/rose-stem/app/lfric_atm/rose-app.conf b/rose-stem/app/lfric_atm/rose-app.conf index 1f3d8d5dd..f2837c5ad 100644 --- a/rose-stem/app/lfric_atm/rose-app.conf +++ b/rose-stem/app/lfric_atm/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric_atm/vn3.0_t146 +meta=lfric-lfric_atm/vn3.0_t214 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ @@ -287,6 +287,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -935,17 +936,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 microphysics_placement='slow' orographic_drag_placement='slow' radiation_placement='slow' @@ -955,7 +956,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1369,6 +1370,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.true. adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.true. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf index b42304e2b..cb64ade9d 100644 --- a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf +++ b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric_atm/vn3.0_t146 +meta=lfric-lfric_atm/vn3.0_t214 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -282,6 +282,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=0 [namelist:damping_layer] @@ -925,17 +926,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 microphysics_placement='slow' orographic_drag_placement='slow' radiation_placement='slow' @@ -945,7 +946,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1359,6 +1360,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.true. calculate_detj='upwind' diff --git a/rose-stem/app/linear_model/file/field_def_diags_ls.xml b/rose-stem/app/linear_model/file/field_def_diags_ls.xml new file mode 100644 index 000000000..8a2c34e54 --- /dev/null +++ b/rose-stem/app/linear_model/file/field_def_diags_ls.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_ancil.xml b/rose-stem/app/linear_model/file/file_def_ancil.xml new file mode 100644 index 000000000..43c9e9e44 --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_ancil.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_check_restart.xml b/rose-stem/app/linear_model/file/file_def_check_restart.xml new file mode 100644 index 000000000..05ba6dcbc --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_check_restart.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_diags.xml b/rose-stem/app/linear_model/file/file_def_diags.xml new file mode 100644 index 000000000..c12613f00 --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_diags.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_diags_ls.xml b/rose-stem/app/linear_model/file/file_def_diags_ls.xml new file mode 100644 index 000000000..0cdd03798 --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_diags_ls.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_initial.xml b/rose-stem/app/linear_model/file/file_def_initial.xml new file mode 100644 index 000000000..05a68968e --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_initial.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_ls.xml b/rose-stem/app/linear_model/file/file_def_ls.xml new file mode 100644 index 000000000..a2766a236 --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_ls.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/file_def_read.xml b/rose-stem/app/linear_model/file/file_def_read.xml new file mode 100644 index 000000000..61cc7f81e --- /dev/null +++ b/rose-stem/app/linear_model/file/file_def_read.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/file/iodef.xml b/rose-stem/app/linear_model/file/iodef.xml index d9d6303af..fb000671f 100644 --- a/rose-stem/app/linear_model/file/iodef.xml +++ b/rose-stem/app/linear_model/file/iodef.xml @@ -5,331 +5,59 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - processed__tot_col_uv_kinetic_energy + processed__tot_col_w_kinetic_energy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf b/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf index 01576bf19..8bf78b63c 100644 --- a/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf +++ b/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf @@ -62,6 +62,17 @@ fixed_ls=.false. l_stabilise_bl=.false. pert_option='analytic' +[namelist:linear_physics] +!!blevs_m=15 +!!e_folding_levs_m=10 +!!l_0_m=80.0 +l_boundary_layer=.false. +!!log_layer=2 +!!u_land_m=0.4 +!!u_sea_m=0.4 +!!z_land_m=0.05 +!!z_sea_m=0.0005 + [!!namelist:multigrid] chain_mesh_tags='','','','' diff --git a/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf index 4b375741d..864c6a623 100644 --- a/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/linear_model/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -ls_filename='final_ls' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf b/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf index 1047582b2..6daa69cf5 100644 --- a/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf +++ b/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf @@ -63,6 +63,17 @@ fixed_ls=.false. l_stabilise_bl=.false. pert_option='analytic' +[namelist:linear_physics] +!!blevs_m=15 +!!e_folding_levs_m=10 +!!l_0_m=80.0 +l_boundary_layer=.false. +!!log_layer=2 +!!u_land_m=0.4 +!!u_sea_m=0.4 +!!z_land_m=0.05 +!!z_sea_m=0.0005 + [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 @@ -98,4 +109,6 @@ cfl_mol_2d_stab=2.0 cfl_mol_3d_stab=2.0 max_vert_cfl_calc='uniform' runge_kutta_method='ssp4' +scheme=5*1 +splitting=5*1 !!wind_mono_top_depth=0 diff --git a/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf b/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf index be23c9c84..14de51a9a 100644 --- a/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf +++ b/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf @@ -61,6 +61,17 @@ diagnostic_frequency=20 l_stabilise_bl=.false. pert_option='analytic' +[namelist:linear_physics] +!!blevs_m=15 +!!e_folding_levs_m=10 +!!l_0_m=80.0 +l_boundary_layer=.false. +!!log_layer=2 +!!u_land_m=0.4 +!!u_sea_m=0.4 +!!z_land_m=0.05 +!!z_sea_m=0.0005 + [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 @@ -86,4 +97,6 @@ inner_iterations=2 tau_u=0.5 [namelist:transport] +scheme=5*1 +splitting=5*1 !!wind_mono_top_depth=0 diff --git a/rose-stem/app/linear_model/rose-app.conf b/rose-stem/app/linear_model/rose-app.conf index 25669733b..47f8bacb6 100644 --- a/rose-stem/app/linear_model/rose-app.conf +++ b/rose-stem/app/linear_model/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-linear_model/vn3.0_t146 +meta=lfric-linear_model/vn3.0_t108 [command] default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe @@ -62,6 +62,7 @@ source=(namelist:aerosol) = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -272,6 +273,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -377,7 +379,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -743,11 +745,23 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' +transport_efficiency=.true. + +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -928,17 +942,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -948,7 +962,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1362,6 +1376,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. @@ -1400,11 +1415,11 @@ panel_edge_treatment='none' profile_size=5 reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' -scheme=5*1 +scheme=5*3 si_outer_transport='none' slice_order='parabola' special_edges_monotone=5*1 -splitting=5*1 +splitting=5*2 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' diff --git a/rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf b/rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf new file mode 100644 index 000000000..cf587eab3 --- /dev/null +++ b/rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf @@ -0,0 +1,18 @@ +[command] +default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml +srun=mkdir -p $MESH_DIR ; srun --ntasks=1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml + +[namelist:cubedsphere_mesh] +edge_cells=12,6,3 + +[namelist:mesh] +mesh_maps='dynamics:multigrid_l1','multigrid_l1:multigrid_l2' +mesh_names='dynamics','multigrid_l1','multigrid_l2' +n_meshes=3 +partition_mesh=.true. + +[namelist:partitions] +generate_inner_halos=.true. +max_stencil_depth=2 +n_partitions=6 +partition_range=0,5 diff --git a/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf b/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf index 8637bea24..01e28da75 100644 --- a/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf +++ b/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf @@ -1,5 +1,6 @@ [command] default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml +srun=mkdir -p $MESH_DIR ; srun --ntasks=1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml [namelist:cubedsphere_mesh] edge_cells=24,12,6,3 diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf index c246b5d54..fcb7c2c22 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf @@ -4,215 +4,16 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar -[namelist:aerosol] -aclw_file='lut/nml_ac_lw' -acsw_file='lut/nml_ac_sw' -activation_scheme='off' -anlw_file='lut/nml_an_lw' -answ_file='lut/nml_an_sw' -crlw_file='lut/nml_cr_lw' -crsw_file='lut/nml_cr_sw' -l_radaer=.true. -n_radaer_step=1 -prec_file='precalc/RADAER_pcalc.ukca' -sulphuric_strat_column=1.86604e-6 - -[namelist:blayer] -bl_levels=69 -bl_mix_w=.true. -free_atm_mix='free_trop_layer' -interp_local='gradients' -noice_in_turb=.true. -p_unstable=0.5 -relax_sc_over_cu=.true. -sbl_opt='sharpest' -sg_orog_mixing='shear_plus_lambda' - -[namelist:boundaries] -blend_frequency='inner' -blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 -lbc_eos_height=38 -lbc_method='onion_layer' -limited_area=.true. -normal_only=.true. -output_lbcs=.true. -solver_boundary_depth=4 -transport_boundary_depth=4 - -[namelist:chemistry] - -[namelist:cloud] -cld_fsd_hill=.false. -cloud_horizontal_fsd=0.65 -ez_subcrit=.false. -ice_width=0.02 -rh_crit=0.960,0.940,0.920,0.900,0.890,0.880,0.870,0.860,0.850,0.840, - =0.840,0.830,0.820,0.810,56*0.800 -rh_crit_opt='namelist' -scheme='bimodal' -subgrid_qv=.false. -use_fsd_eff_res=.false. - -[namelist:convection] -cape_timescale=1800.0 -cv_scheme='gregory_rowntree' -number_of_convection_substeps=2 - [!!namelist:cubedsphere_mesh] -[namelist:damping_layer] -dl_base=30000.0 - -[namelist:extrusion] -domain_top=40000.0 -method='um_L70_61t_9s_40km' -stretching_height=16641.984 - -[namelist:files] -ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket3510/seuk' -hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop.ugrid' -land_area_ancil_path='land_sea_mask/qrparm.mask.ugrid.fixed' -lbc_directory='$BIG_DATA_DIR/lbcs/proto-ral/Ticket3510/seuk' -lbc_filename='checkpoint_um2lfric_000001_fixedtime_date' -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' -orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' -ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70.ugrid' -plant_func_ancil_path='qrparm.veg.func.ugrid' -sea_ancil_path='general_sea/GlobColour/qrclim.sea.ugrid' -sea_ice_ancil_path='seaice/hadisst_6190/v4/qrclim.seaice.ugrid' -soil_ancil_path='qrparm.soil_cci.ugrid' -soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' -sst_ancil_path='sst/hadisst_6190/v1/qrclim.sst.ugrid' -start_dump_directory='$BIG_DATA_DIR/start_dumps/proto-ral/Ticket3510/seuk' -start_dump_filename='checkpoint_um2lfric_000001' -surface_frac_ancil_path='qrparm.veg.frac.ugrid' - -[namelist:finite_element] -coord_order=2 -coord_system='xyz' - -[namelist:formulation] -shallow=.false. - -[namelist:initialization] -lbc_option='um2lfric_file' -model_eos_height=38 -read_w2h_wind=.true. -sst_source='start_dump' - -[namelist:jules_nvegparm] -albsnc_nvg_io=0.4,0.06,0.8,0.8 -albsnf_nvg_io=0.18,0.06,-1.0,0.75 -ch_nvg_io=2.8e5,4.18e6,0.0,0.0 - -[namelist:jules_snow] -rho_snow_fresh=170.0 - -[namelist:jules_surface] -l_vary_z0m_soil=.false. - [namelist:mesh] mesh_maps='dynamics:multigrid_l1' mesh_names='dynamics','multigrid_l1' n_meshes=2 topology='non_periodic' -[namelist:microphysics] -droplet_tpr=.true. -fcrit=1.0 -graupel_scheme='modified' -microphysics_casim=.true. -ndrop_surf=10.0e6 -nscalesf=1.0 -nsigmasf=2.82843 -orog_block=.false. -orog_rain=.false. -orog_rime=.false. -prog_tnuc=.false. -shape_rime=.true. -turb_gen_mixph=.false. -z_surf=50.0 - -[namelist:mixed_solver] -fail_on_non_converged=.false. -monitor_convergence=.false. -si_method='prec_only' - -[namelist:mixing] -leonard_kl=2.0 -leonard_term=.true. -method='blend_1dbl_fa' -mix_factor=0.2 -smagorinsky=.true. - -[namelist:multigrid] -n_postsmooth=6 - -[namelist:orographic_drag] - -[namelist:orography] -orog_init_option='start_dump' - -[namelist:partitioning] -partitioner='planar' - -[namelist:physics] -convection_placement='fast' -electric_placement='slow' -orographic_drag_placement='slow' -smagorinsky_placement='fast' -spectral_gwd_placement='slow' - [namelist:planar_mesh] edge_cells_x=32,64 edge_cells_y=32,64 periodic_x=.false. periodic_y=.false. - -[namelist:radiation] -cloud_inhomogeneity='scaling' -cloud_overlap='maximum_random' -cloud_representation='liquid_and_ice' -cloud_vertical_decorr=10000.0 -i_cloud_ice_type_lwinc=11 -i_cloud_ice_type_swinc=11 -i_cloud_liq_type_lwinc=5 -i_cloud_liq_type_swinc=5 -l_inc_radstep=.true. -liu_aparam=0.07 -liu_bparam=-0.14 -n_horiz_ang=16 -n_horiz_layer=1 -n_inc_radstep=5 -n_radstep=15 -scatter_method_lwinc='approx' -spectral_file_lw='spec/sp_lw_ga7' -spectral_file_lwinc='spec/sp_lw_cloud7' -spectral_file_sw='spec/sp_sw_ga7' -spectral_file_swinc='spec/sp_sw_cloud7' -topography='horizon' - -[namelist:section_choice] -aerosol='none' -chemistry='none' -convection='none' -electric='um' -methane_oxidation=.false. -orographic_drag='none' -spectral_gwd='none' - -[namelist:spectral_gwd] -cgw_scale_factor=1.05 - -[namelist:surface] -alb_snocov_max=1.5e-1,1.5e-1,6.0e-1,6.0e-1,4.0e-1 -buddy_sea='Off' -z0hm_ratio_pft=1.00,1.00,0.022,0.022,0.025 -z0v=1.1,1.1,0.1,0.1,0.4 - -[namelist:time] -calendar_origin='2021-07-29 00:00:00' -calendar_start='2021-07-29 00:00:00' - -[namelist:transport] -extended_mesh=.false. diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf index daf0db140..fcb7c2c22 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf @@ -4,210 +4,16 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar -[namelist:aerosol] -activation_scheme='off' -glomap_mode='climatology' -n_radaer_step=4 - -[namelist:blayer] -bl_levels=69 -bl_mix_w=.true. -free_atm_mix='free_trop_layer' -interp_local='gradients' -noice_in_turb=.true. -p_unstable=0.5 -relax_sc_over_cu=.true. -sbl_opt='sharpest' -sg_orog_mixing='shear_plus_lambda' - -[namelist:boundaries] -blend_frequency='inner' -blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 -lbc_eos_height=10 -lbc_method='onion_layer' -limited_area=.true. -normal_only=.true. -output_lbcs=.true. -solver_boundary_depth=4 -transport_boundary_depth=4 - -[namelist:chemistry] - -[namelist:cloud] -cld_fsd_hill=.false. -cloud_horizontal_fsd=0.65 -ez_subcrit=.false. -ice_width=0.02 -rh_crit=0.960,0.940,0.920,0.900,0.890,0.880,0.870,0.860,0.850,0.840, - =0.840,0.830,0.820,0.810,56*0.800 -rh_crit_opt='namelist' -scheme='bimodal' -subgrid_qv=.false. -use_fsd_eff_res=.false. - -[namelist:convection] -cape_timescale=1800.0 -cv_scheme='gregory_rowntree' -number_of_convection_substeps=2 - [!!namelist:cubedsphere_mesh] -[namelist:damping_layer] -dl_base=30000.0 - -[namelist:extrusion] -domain_top=40000.0 -method='um_L70_61t_9s_40km' -stretching_height=16641.984 - -[namelist:files] -aerosols_ancil_path='aerosol_clims/glomap/glomap_clim_n48_v2.ugrid' -ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket3510/uk' -hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop.ugrid' -land_area_ancil_path='land_sea_mask/qrparm.mask.ugrid.fixed' -lbc_directory='$BIG_DATA_DIR/lbcs/proto-ral/Ticket3510/uk_new' -lbc_filename='lbc_fixedtime_000' -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' -orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' -ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70.ugrid' -plant_func_ancil_path='qrparm.veg.func.ugrid' -sea_ancil_path='general_sea/GlobColour/qrclim.sea.ugrid' -sea_ice_ancil_path='seaice/hadisst_6190/v4/qrclim.seaice.ugrid' -soil_ancil_path='qrparm.soil_cci.ugrid' -soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' -sst_ancil_path='sst/hadisst_6190/v1/qrclim.sst.ugrid' -start_dump_directory='$BIG_DATA_DIR/start_dumps/proto-ral/Ticket3510/uk_new' -start_dump_filename='checkpoint_um2lfric_000001' -surface_frac_ancil_path='qrparm.veg.frac.ugrid' - -[namelist:finite_element] -coord_order=2 -coord_system='xyz' - -[namelist:formulation] -shallow=.false. - -[namelist:initialization] -lbc_option='um2lfric_file' -model_eos_height=38 -read_w2h_wind=.true. -sst_source='start_dump' - -[namelist:jules_nvegparm] -albsnc_nvg_io=0.4,0.06,0.8,0.8 -albsnf_nvg_io=0.18,0.06,-1.0,0.75 -ch_nvg_io=2.8e5,4.18e6,0.0,0.0 - -[namelist:jules_snow] -rho_snow_fresh=170.0 - -[namelist:jules_surface] -l_vary_z0m_soil=.false. - [namelist:mesh] mesh_maps='dynamics:multigrid_l1' mesh_names='dynamics','multigrid_l1' n_meshes=2 topology='non_periodic' -[namelist:microphysics] -droplet_tpr=.true. -fcrit=1.0 -graupel_scheme='modified' -microphysics_casim=.true. -ndrop_surf=10.0e6 -nscalesf=1.0 -nsigmasf=2.82843 -orog_block=.false. -orog_rain=.false. -orog_rime=.false. -prog_tnuc=.false. -shape_rime=.true. -turb_gen_mixph=.false. -z_surf=50.0 - -[namelist:mixed_solver] -fail_on_non_converged=.false. -monitor_convergence=.false. -si_method='prec_only' - -[namelist:mixing] -leonard_kl=2.0 -leonard_term=.true. -method='blend_1dbl_fa' -mix_factor=0.2 -smagorinsky=.true. - -[namelist:multigrid] -n_postsmooth=6 - -[namelist:orographic_drag] - -[namelist:orography] -orog_init_option='start_dump' - -[namelist:partitioning] -partitioner='planar' - -[namelist:physics] -convection_placement='fast' -electric_placement='slow' -orographic_drag_placement='slow' -smagorinsky_placement='fast' -spectral_gwd_placement='slow' - [namelist:planar_mesh] edge_cells_x=32,64 edge_cells_y=32,64 periodic_x=.false. periodic_y=.false. - -[namelist:radiation] -cloud_inhomogeneity='scaling' -cloud_overlap='maximum_random' -cloud_representation='liquid_and_ice' -cloud_vertical_decorr=10000.0 -i_cloud_ice_type_lwinc=11 -i_cloud_ice_type_swinc=11 -i_cloud_liq_type_lwinc=5 -i_cloud_liq_type_swinc=5 -l_inc_radstep=.true. -liu_aparam=0.07 -liu_bparam=-0.14 -n_horiz_ang=16 -n_horiz_layer=1 -n_inc_radstep=5 -n_radstep=15 -scatter_method_lwinc='approx' -spectral_file_lw='spec/sp_lw_ga7' -spectral_file_lwinc='spec/sp_lw_cloud7' -spectral_file_sw='spec/sp_sw_ga7' -spectral_file_swinc='spec/sp_sw_cloud7' -topography='horizon' - -[namelist:section_choice] -chemistry='none' -convection='none' -electric='um' -methane_oxidation=.false. -orographic_drag='none' -spectral_gwd='none' - -[namelist:spectral_gwd] -cgw_scale_factor=1.05 - -[namelist:subgrid] -dep_pt_stencil_extent=5 - -[namelist:surface] -alb_snocov_max=1.5e-1,1.5e-1,6.0e-1,6.0e-1,4.0e-1 -buddy_sea='Off' -z0hm_ratio_pft=1.00,1.00,0.022,0.022,0.025 -z0v=1.1,1.1,0.1,0.1,0.4 - -[namelist:time] -calendar_origin='2021-07-29 00:00:00' -calendar_start='2021-07-29 00:00:00' - -[namelist:transport] -extended_mesh=.false. diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf index 557ac431f..fcb7c2c22 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf @@ -4,210 +4,16 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar -[namelist:aerosol] -activation_scheme='off' -glomap_mode='climatology' -n_radaer_step=4 - -[namelist:blayer] -bl_levels=69 -bl_mix_w=.true. -free_atm_mix='free_trop_layer' -interp_local='gradients' -noice_in_turb=.true. -p_unstable=0.5 -relax_sc_over_cu=.true. -sbl_opt='sharpest' -sg_orog_mixing='shear_plus_lambda' - -[namelist:boundaries] -blend_frequency='inner' -blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 -lbc_eos_height=10 -lbc_method='onion_layer' -limited_area=.true. -normal_only=.true. -output_lbcs=.true. -solver_boundary_depth=4 -transport_boundary_depth=4 - -[namelist:chemistry] - -[namelist:cloud] -cld_fsd_hill=.false. -cloud_horizontal_fsd=0.65 -ez_subcrit=.false. -ice_width=0.02 -rh_crit=0.960,0.940,0.920,0.900,0.890,0.880,0.870,0.860,0.850,0.840, - =0.840,0.830,0.820,0.810,56*0.800 -rh_crit_opt='namelist' -scheme='bimodal' -subgrid_qv=.false. -use_fsd_eff_res=.false. - -[namelist:convection] -cape_timescale=1800.0 -cv_scheme='gregory_rowntree' -number_of_convection_substeps=2 - [!!namelist:cubedsphere_mesh] -[namelist:damping_layer] -dl_base=30000.0 - -[namelist:extrusion] -domain_top=40000.0 -method='um_L70_61t_9s_40km' -stretching_height=16641.984 - -[namelist:files] -aerosols_ancil_path='aerosol_clims/glomap/glomap_clim_n48_v2.ugrid' -ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket4248/var_uk' -hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop.ugrid' -land_area_ancil_path='land_sea_mask/qrparm.mask.ugrid.fixed' -lbc_directory='$BIG_DATA_DIR/lbcs/proto-ral/Ticket4248/var_uk' -lbc_filename='lbc_fixedtime_000' -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog_horizon.ugrid' -orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog_horizon.ugrid' -ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70.ugrid' -plant_func_ancil_path='qrparm.veg.func.ugrid' -sea_ancil_path='general_sea/GlobColour/qrclim.sea.ugrid' -sea_ice_ancil_path='seaice/hadisst_6190/v4/qrclim.seaice.ugrid' -soil_ancil_path='qrparm.soil_cci.ugrid' -soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' -sst_ancil_path='sst/hadisst_6190/v1/qrclim.sst.ugrid' -start_dump_directory='$BIG_DATA_DIR/start_dumps/proto-ral/Ticket4248/var_uk' -start_dump_filename='checkpoint_um2lfric_000001' -surface_frac_ancil_path='qrparm.veg.frac.ugrid' - -[namelist:finite_element] -coord_order=2 -coord_system='xyz' - -[namelist:formulation] -shallow=.false. - -[namelist:initialization] -lbc_option='um2lfric_file' -model_eos_height=38 -read_w2h_wind=.true. -sst_source='start_dump' - -[namelist:jules_nvegparm] -albsnc_nvg_io=0.4,0.06,0.8,0.8 -albsnf_nvg_io=0.18,0.06,-1.0,0.75 -ch_nvg_io=2.8e5,4.18e6,0.0,0.0 - -[namelist:jules_snow] -rho_snow_fresh=170.0 - -[namelist:jules_surface] -l_vary_z0m_soil=.false. - [namelist:mesh] mesh_maps='dynamics:multigrid_l1' mesh_names='dynamics','multigrid_l1' n_meshes=2 topology='non_periodic' -[namelist:microphysics] -droplet_tpr=.true. -fcrit=1.0 -graupel_scheme='modified' -microphysics_casim=.true. -ndrop_surf=10.0e6 -nscalesf=1.0 -nsigmasf=2.82843 -orog_block=.false. -orog_rain=.false. -orog_rime=.false. -prog_tnuc=.false. -shape_rime=.true. -turb_gen_mixph=.false. -z_surf=50.0 - -[namelist:mixed_solver] -fail_on_non_converged=.false. -monitor_convergence=.false. -si_method='prec_only' - -[namelist:mixing] -leonard_kl=2.0 -leonard_term=.true. -method='blend_1dbl_fa' -mix_factor=0.2 -smagorinsky=.true. - -[namelist:multigrid] -n_postsmooth=6 - -[namelist:orographic_drag] - -[namelist:orography] -orog_init_option='start_dump' - -[namelist:partitioning] -partitioner='planar' - -[namelist:physics] -convection_placement='fast' -electric_placement='slow' -orographic_drag_placement='slow' -smagorinsky_placement='fast' -spectral_gwd_placement='slow' - [namelist:planar_mesh] edge_cells_x=32,64 edge_cells_y=32,64 periodic_x=.false. periodic_y=.false. - -[namelist:radiation] -cloud_inhomogeneity='scaling' -cloud_overlap='maximum_random' -cloud_representation='liquid_and_ice' -cloud_vertical_decorr=10000.0 -i_cloud_ice_type_lwinc=11 -i_cloud_ice_type_swinc=11 -i_cloud_liq_type_lwinc=5 -i_cloud_liq_type_swinc=5 -l_inc_radstep=.true. -liu_aparam=0.07 -liu_bparam=-0.14 -n_horiz_ang=16 -n_horiz_layer=1 -n_inc_radstep=5 -n_radstep=15 -scatter_method_lwinc='approx' -spectral_file_lw='spec/sp_lw_ga7' -spectral_file_lwinc='spec/sp_lw_cloud7' -spectral_file_sw='spec/sp_sw_ga7' -spectral_file_swinc='spec/sp_sw_cloud7' -topography='horizon' - -[namelist:section_choice] -chemistry='none' -convection='none' -electric='um' -methane_oxidation=.false. -orographic_drag='none' -spectral_gwd='none' - -[namelist:spectral_gwd] -cgw_scale_factor=1.05 - -[namelist:subgrid] -dep_pt_stencil_extent=5 - -[namelist:surface] -alb_snocov_max=1.5e-1,1.5e-1,6.0e-1,6.0e-1,4.0e-1 -buddy_sea='Off' -z0hm_ratio_pft=1.00,1.00,0.022,0.022,0.025 -z0v=1.1,1.1,0.1,0.1,0.4 - -[namelist:time] -calendar_origin='2021-07-29 00:00:00' -calendar_start='2021-07-29 00:00:00' - -[namelist:transport] -extended_mesh=.false. diff --git a/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf b/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf index 3ac0ca473..311c21616 100644 --- a/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf +++ b/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf @@ -15,10 +15,13 @@ rotate_mesh=.true. topology='non_periodic' [namelist:planar_mesh] +create_lbc_mesh=.true. domain_centre=1.69,-0.97 domain_size=1.28,0.96 edge_cells_x=64,32,16,8 edge_cells_y=64,32,16,8 +lbc_parent_mesh='dynamics' +lbc_rim_depth=4 periodic_x=.false. periodic_y=.false. diff --git a/rose-stem/app/name_transport/rose-app.conf b/rose-stem/app/name_transport/rose-app.conf index c6059d791..e1d674d67 100644 --- a/rose-stem/app/name_transport/rose-app.conf +++ b/rose-stem/app/name_transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-name_transport/vn3.0_t146 +meta=lfric-name_transport/vn3.0_t214 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -241,6 +241,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -898,17 +899,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -918,7 +919,7 @@ configure_segments=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1332,6 +1333,7 @@ tau_u=0.5 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/app/ngarch/rose-app.conf b/rose-stem/app/ngarch/rose-app.conf index 3d09e49e6..bf6105f54 100644 --- a/rose-stem/app/ngarch/rose-app.conf +++ b/rose-stem/app/ngarch/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-ngarch/vn3.0_t146 +meta=lfric-ngarch/vn3.0_t214 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ @@ -270,6 +270,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -960,17 +961,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -980,7 +981,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1412,6 +1413,7 @@ tau_u=0.5 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/shallow_water/rose-app.conf b/rose-stem/app/shallow_water/rose-app.conf index 6fe8c8944..f649c3271 100644 --- a/rose-stem/app/shallow_water/rose-app.conf +++ b/rose-stem/app/shallow_water/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-shallow_water/vn3.0_t146 +meta=lfric-shallow_water/vn3.0_t214 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -236,6 +236,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -871,17 +872,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -891,7 +892,7 @@ configure_segments=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1321,6 +1322,7 @@ tau_u=0.0 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.true. calculate_detj='upwind' diff --git a/rose-stem/app/transport/rose-app.conf b/rose-stem/app/transport/rose-app.conf index 577cab0f2..fa61064ae 100644 --- a/rose-stem/app/transport/rose-app.conf +++ b/rose-stem/app/transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-transport/vn3.0_t146 +meta=lfric-transport/vn3.0_t214 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -240,6 +240,7 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. +!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -894,17 +895,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -!!bl_segment=0 +bl_segment=0 !!blayer_placement='fast' -configure_segments=.false. -!!conv_gr_segment=16 +configure_segments=.true. +conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -!!gw_segment=0 +gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -!!ls_ppn_segment=0 +ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -914,7 +915,7 @@ configure_segments=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -!!ussp_segment=0 +ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1328,6 +1329,7 @@ tau_u=0.5 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 +adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc index 17c6843c5..b446910a0 100644 --- a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc +++ b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc @@ -34,6 +34,47 @@ "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", }) %} +{% elif task_ns.conf_name == "baroclinic-C48_MG" %} + + {% do task_dict.update({ + "opt_confs": ["baroclinic"], + "resolution": "C48_MG", + "DT": 3600, + "threads": 4, + "mpi_parts": 6, + "tsteps": 240, + "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", + }) %} +{% elif task_ns.conf_name == "baroclinic-C48_MG-3panel" %} + + {% do task_dict.update({ + "opt_confs": ["baroclinic"], + "resolution": "C48_MG", + "DT": 3600, + "threads": 2, + "mpi_parts": 12, + "panel_decomp": "custom", + "xproc": 2, + "yproc": 3, + "tsteps": 240, + "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", + }) %} + +{% elif task_ns.conf_name == "baroclinic-C48_MG-2panel" %} + + {% do task_dict.update({ + "opt_confs": ["baroclinic"], + "resolution": "C48_MG", + "DT": 3600, + "threads": 1, + "mpi_parts": 27, + "panel_decomp": "custom", + "xproc": 3, + "yproc": 3, + "tsteps": 240, + "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", + }) %} + {% elif task_ns.conf_name == "baroclinic-pert-C24_MG" %} {% do task_dict.update({ diff --git a/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc b/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc index 22c3c0742..25cf5232d 100644 --- a/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc +++ b/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc @@ -5,12 +5,11 @@ {# ########################################################################### #} {% do LOG.debug("Entered site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc") %} -{% if task_ns.conf_name == "nwp_gal9-C12" %} +{% if task_ns.conf_name == "nwp_gal9-C12_MG" %} {% do task_dict.update({ - "opt_confs": ["nwp_gal9"], - "resolution": "C12", - "ancil_resolution": "C12", + "opt_confs": ["nwp_gal9_c12"], + "resolution": "C12_MG", "DT": 1800, "tsteps": 12, "mpi_parts": 6, @@ -21,7 +20,7 @@ {% do task_dict.update({ "opt_confs": ["runge-kutta"], "resolution": "C12", - "ancil_resolution": "C12", + "DT": 1, "tsteps": 20, }) %} @@ -61,181 +60,226 @@ "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_forecast_tl_default-C12" %} +{% elif task_ns.conf_name == "tlm_forecast_tl_nwp_gal9-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_forecast_tl", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG", "ancil_resolution": "C12", "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "id_tlm_tests_default-C12" %} +{% elif task_ns.conf_name == "id_tlm_tests_nwp_gal9-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_id_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "id_tlm_tests_default-1PE-C12" %} +{% elif task_ns.conf_name == "id_tlm_tests_nwp_gal9-1PE-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_id_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 1, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-1PE-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-1PE-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 1, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-4OMP-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-4OMP-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-1PE-4OMP-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "real_increment"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, + "tsteps": 13, + "mpi_parts": 6, + "threads": 4, + }) %} + +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-1PE-4OMP-C12_MG" %} + + {% do task_dict.update({ + "app_name": "jedi_tlm_tests", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG", + "ancil_resolution": "C12", + "DT": 1800, "tsteps": 13, "mpi_parts": 1, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-dry-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default", "dry"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-dry-1PE-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-1PE-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default", "dry"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 1, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-dry-4OMP-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-4OMP-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default", "dry"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-dry-1PE-4OMP-C12" %} +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default", "dry"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], + "resolution": "C12_MG", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 1, "threads": 4, }) %} - -{% elif task_ns.conf_name == "tlm_tests_default-relaxed_solver-C12" %} +{% elif task_ns.conf_name == "tlm_forecast_tl_nwp_gal9-C12_MG_op" %} {% do task_dict.update({ - "app_name": "jedi_tlm_tests", - "opt_confs": ["default", "relaxed_solver"], - "resolution": "C12", + "app_name": "jedi_tlm_forecast_tl", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG_op", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-relaxed_solver-1PE-C12" %} + +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-C12_MG_op" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default", "relaxed_solver"], - "resolution": "C12", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C12_MG_op", "ancil_resolution": "C12", - "DT": 3600, + "DT": 1800, "tsteps": 13, - "mpi_parts": 1, + "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_forecast_tl_default-C12_op" %} + +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG" %} + {% do task_dict.update({ - "app_name": "jedi_tlm_forecast_tl", - "opt_confs": ["default"], - "resolution": "C12_op", + "app_name": "jedi_tlm_tests", + "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "strict_solver"], + "resolution": "C12_MG", "ancil_resolution": "C12", "DT": 1800, "tsteps": 13, "mpi_parts": 6, + "threads": 4, + }) %} + +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-4OMP-C224_MG" %} + + {% do task_dict.update({ + "app_name": "jedi_tlm_tests", + "opt_confs": ["nwp_gal9_c224", "rrt_equals_dt", "semi_strict_solver"], + "resolution": "C224_MG", + "ancil_resolution": "C224", + "DT": 1800, + "tsteps": 13, + "mpi_parts": 1176, + "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_default-C12_op" %} + +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-real_increment-4OMP-C224_MG" %} + {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["default"], - "resolution": "C12_op", - "ancil_resolution": "C12", - "DT": 3600, + "opt_confs": ["nwp_gal9_c224", "rrt_equals_dt", "real_increment", "semi_strict_solver"], + "resolution": "C224_MG", + "ancil_resolution": "C224", + "DT": 1800, "tsteps": 13, - "mpi_parts": 6, + "mpi_parts": 1176, + "threads": 4, + }) %} + +{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-strict_solver-4OMP-C224_MG" %} + + {% do task_dict.update({ + "app_name": "jedi_tlm_tests", + "opt_confs": ["nwp_gal9_c224", "rrt_equals_dt", "strict_solver"], + "resolution": "C224_MG", + "ancil_resolution": "C224", + "DT": 1800, + "tsteps": 13, + "mpi_parts": 1176, + "threads": 4, }) %} {% elif task_ns.conf_name == "integration_tests" %} @@ -262,19 +306,22 @@ {# List of configuration names that have no kgo #} {% set no_kgo = [ - "id_tlm_tests_default-C12", - "id_tlm_tests_default-1PE-C12", - "tlm_tests_default-C12", - "tlm_tests_default-C12_op", - "tlm_tests_default-1PE-C12", - "tlm_tests_default-4OMP-C12", - "tlm_tests_default-1PE-4OMP-C12", - "tlm_tests_default-dry-C12", - "tlm_tests_default-dry-4OMP-C12", - "tlm_tests_default-dry-1PE-C12", - "tlm_tests_default-dry-1PE-4OMP-C12", - "tlm_tests_default-relaxed_solver-C12", - "tlm_tests_default-relaxed_solver-1PE-C12" + "id_tlm_tests_nwp_gal9-C12_MG", + "id_tlm_tests_nwp_gal9-1PE-C12_MG", + "tlm_tests_nwp_gal9-C12_MG", + "tlm_tests_nwp_gal9-C12_MG_op", + "tlm_tests_nwp_gal9-1PE-C12_MG", + "tlm_tests_nwp_gal9-4OMP-C12_MG", + "tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG", + "tlm_tests_nwp_gal9-1PE-4OMP-C12_MG", + "tlm_tests_nwp_gal9-dry-C12_MG", + "tlm_tests_nwp_gal9-dry-4OMP-C12_MG", + "tlm_tests_nwp_gal9-dry-1PE-C12_MG", + "tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG", + "tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG", + "tlm_tests_nwp_gal9-4OMP-C224_MG", + "tlm_tests_nwp_gal9-real_increment-4OMP-C224_MG", + "tlm_tests_nwp_gal9-strict_solver-4OMP-C224_MG" ] %} {% if task_ns.conf_name not in no_kgo %} diff --git a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc index 26e8a9af8..b68dc1efc 100644 --- a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc +++ b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc @@ -102,7 +102,21 @@ "opt_confs": ["clim_gal9_ral_seuk","oasis"], "resolution": "C12_C16_lam", "dst_mesh": "seuk_MG", - "dst_name": "multigrid_l1", + "dst_name": "dynamics", + "dst_type": "regional", + "src_mesh": "C24_C12", + "src_name": "C12", + "src_type": "global", + }) %} + +{% elif task_ns.conf_name == "oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc" %} + + {# dst_name will need to change to "dynamics-lbc" when lbc meshes can be read #} + {% do task_dict.update({ + "opt_confs": ["clim_gal9_ral_seuk","oasis","lbc"], + "resolution": "C12_C16_lam", + "dst_mesh": "seuk_MG", + "dst_name": "dynamics-lbc", "dst_type": "regional", "src_mesh": "C24_C12", "src_name": "C12", diff --git a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc index d24f3d962..a49293d58 100644 --- a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc +++ b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc @@ -245,6 +245,19 @@ "log_level": "error", }) %} +{% elif task_ns.conf_name == "nwp_gal9_ls_and_jedi-C224_MG" %} + + {% do task_dict.update({ + "opt_confs": ["um_dump","ls_and_jedi","june_case"], + "resolution": "C224_MG", + "DT": 720, + "tsteps": 35, + "mpi_parts": 1176, + "wallclock": 10, + "xios_nodes": 4, + "mpi_parts_xios" : 16, + }) %} + {% elif task_ns.conf_name == "nwp_gal9-C896_MG" %} {% do task_dict.update({ @@ -435,12 +448,31 @@ "opt_confs": ["um_dump","no_diags"], "resolution": "C12", "DT": 1800, - "tsteps": 2, + "tsteps": 6, "crun": 2, "mpi_parts": 6, "kgo_checks": ["checksum"], }) %} +{# Share Global Configurations - extended by Performance setups#} +{% elif task_ns.conf_name.startswith("nwp_gal9-C896_MG") %} + + {% do task_dict.update({ + "CXI_MATCH_hybrid": true, + "opt_confs": ["um_dump"], + "resolution": "C896_MG", + "DT": 240, + "tsteps": 120, + "wallclock": 15, + "mpi_parts": 4704, + "xios_nodes": 4, + "mpi_parts_xios" : 128, + "log_level": "info", + "log_to_rank_zero_only": ".true.", + "memory_plot_ex": true, + "plot_str": "plot_map.py $NODAL_DATA_DIR/lfric_diagnostics.nc $PLOT_DIR", + }) %} + {# ###################################################################### #} {# Global Climate jobs #} {# ###################################################################### #} @@ -1159,4 +1191,25 @@ {% endif %} {% endif %} +{# Extensions to the Shared Global Configurations - Performance setups#} +{% if task_ns.conf_name.startswith("nwp_gal9-C896_MG_720t") %} + + {% do task_dict.update({ + "opt_confs": ["um_dump"], + "tsteps": 720, + "wallclock": 60, + "plot_str": "", + "restart_write": false, + }) %} +{% endif %} + +{% if task_ns.conf_name.startswith("nwp_gal9-C896_MG_720t_opDiag") %} + + {% do task_dict.update({ + "opt_confs": ["um_dump","oper_diags_hres"], + }) %} + +{% endif %} + + {% do LOG.debug("Finished in site/common/lfric_atm/tasks_lfric_atm.cylc") %} diff --git a/rose-stem/site/common/linear_model/tasks_linear_model.cylc b/rose-stem/site/common/linear_model/tasks_linear_model.cylc index 23b91946c..fb054999f 100644 --- a/rose-stem/site/common/linear_model/tasks_linear_model.cylc +++ b/rose-stem/site/common/linear_model/tasks_linear_model.cylc @@ -13,7 +13,7 @@ "DT": 1800, "tsteps": 12, "mpi_parts": 6, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C12 theta:exner:rho:u_in_w2h:v_in_w2h:w_in_wth:m_v:m_cl:m_r:m_s 120:0:5", + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C12 theta:exner:rho:u_in_w3:v_in_w3:m_v:m_cl:m_r:m_cf 120:0:5", }) %} {% elif task_ns.conf_name == "nwp_gal9-C224_MG" %} @@ -27,8 +27,8 @@ "xios_nodes": 4, "mpi_parts_xios" : 16, "log_level": "debug", + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C224 theta:exner:rho:u_in_w3 120:0:5", "tech-tests_wallclock": 30, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C224 theta:exner:rho:u_in_w2h 120:0:5", }) %} {% elif task_ns.conf_name == "nwp_gal9_random-C12_MG" %} @@ -39,7 +39,7 @@ "DT": 1800, "tsteps": 12, "mpi_parts": 6, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_random theta:exner:rho:u_in_w2h:v_in_w2h:w_in_wth:m_v:m_cl:m_r:m_s 120:0:5", + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_random theta:exner:rho:u_in_w3:v_in_w3:m_v:m_cl:m_r:m_cf 120:0:5", }) %} {% elif task_ns.conf_name == "nwp_gal9_zero-C12_MG" %} @@ -50,6 +50,7 @@ "DT": 1800, "tsteps": 12, "mpi_parts": 6, + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_random theta:exner:rho:m_v:m_cl:m_r:m_cf 120:0:5", }) %} {% elif task_ns.conf_name == "runge-kutta-C12" %} @@ -81,7 +82,7 @@ "DT": 10, "tsteps": 180, "mpi_parts": 12, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 10 linear_model-dcmip theta:exner:rho:u_in_w2h:v_in_w2h:w_in_wth 120:0:5" + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 10 linear_model-dcmip theta:exner:rho:u_in_w3:v_in_w3 120:0:5" }) %} {% elif task_ns.conf_name == "canned" %} diff --git a/rose-stem/site/meto/common/suite_config_ex1a.cylc b/rose-stem/site/meto/common/suite_config_ex1a.cylc index 82cdcf837..c2ed92455 100644 --- a/rose-stem/site/meto/common/suite_config_ex1a.cylc +++ b/rose-stem/site/meto/common/suite_config_ex1a.cylc @@ -5,7 +5,11 @@ {# ########################################################################### #} {% do LOG.debug("Entered site/meto/common/suite_config_ex1a.cylc") %} +{% if site_vars.ex_trustzone == "collab" %} +{% set ex1a_base = 'module use /projects/metoff/spackadmin.mon/releases/2025.12.18/ngms' %} +{% else %} {% set ex1a_base = 'module use /common/internal/spack/releases/2025.10.1/ngms' %} +{% endif %} {% set ex1a_compiler_gnu = 'module switch cpe/22.11 cpe/23.05 ; ' ~ 'module load PrgEnv-gnu ; '~ @@ -19,11 +23,11 @@ 'module load cray-mpich/8.1.27 ; '~ 'module load lfric-cray/15.0.0/3.0+ || true ' %} -{% set ex1a_coupled_cce = 'module unload xios/2701-h57fm7d || true ; ' ~ +{% set ex1a_coupled_cce = 'module unload xios/2701 || true ; ' ~ 'module load cray-hdf5-parallel ; ' ~ 'module load cray-netcdf-hdf5parallel ; ' ~ 'module use /data/users/moci/modules_ngms/modules ; '~ - 'module load GC4-PrgEnv/2024-01-lfric_apps_coupled_port-cpe23.05/5548.lua ; ' + 'module load GC6-PrgEnv/2026-01-lfric_apps_coupled_port-cpe23.05-mpich8.1.27/5889.lua ; ' 'module load scitools' %} {% set ex1a_coupled_run = '. $BIG_DATA_DIR/ancils/lfric_coupled/ocean/ocean_ancil_GO8p0_CORE_forcing_eORCA025 ; ' ~ @@ -48,6 +52,9 @@ ROSE_LAUNCHER = 'mpiexec' OMP_STACKSIZE=1g + [[EX1A_WEIGHTS]] + inherit = EX1A_BASE + [[EX1A_BUILD]] [[[environment]]] TRANSMUTE_INCLUDE_METHOD = specify_include @@ -60,7 +67,9 @@ [[EX1A_RUN]] [[[environment]]] {# BIG_DATA_DIR holds ancils and dump files #} -{% if site_vars["host_ex"] == "exz" %} +{% if site_vars["ex_trustzone"] == "collab" %} + BIG_DATA_DIR = '/data/users/lfricadmin.mon/data' +{% elif site_vars["host_ex"] == "exz" %} BIG_DATA_DIR = '/common/internal/lfricdir/data' {% else %} BIG_DATA_DIR = '/data/users/lfricadmin/data' @@ -176,11 +185,28 @@ module list 2>&1 """ + [[EX1A_SCRIPTS]] + inherit = EX1A_TECH + [[EX1A_EXPORT-SOURCE]] inherit=METO_ORIG [[[environment]]] +{% if site_vars["ex_trustzone"] == "collab" %} + PLATFORM_SYNC = false +{% else %} hostname = $(rose host-select {{site_vars.host_ex}}) PLATFORM_SYNC = true +{% endif %} + + [[EX1A_REMOTE_INIT]] + inherit = EX1A_BASE + [[[directives]]] +{% if site_vars["ex_trustzone"] == "collab" %} + -q = collabshared +{% else %} + -q = shared +{% endif %} + -l ncpus=1 [[EX1A_HOUSEKEEPING]] inherit=EX1A_TECH_BASE diff --git a/rose-stem/site/meto/groups/groups_adjoint_tests.cylc b/rose-stem/site/meto/groups/groups_adjoint_tests.cylc index 35ba5c497..7cbcc9a12 100644 --- a/rose-stem/site/meto/groups/groups_adjoint_tests.cylc +++ b/rose-stem/site/meto/groups/groups_adjoint_tests.cylc @@ -8,6 +8,7 @@ {# Azspice Groups #} {% do site_groups.update({ "adjoint_tests_azspice_developer": [ + "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_production-32bit", "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_full-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG-varying_LS_azspice_gnu_fast-debug-64bit-rsolver64", @@ -20,7 +21,7 @@ "adjoint_tests_canned_azspice_gnu_fast-debug-64bit-rsolver64", ], "adjoint_tests_azspice_build": [ - "build_adjoint_tests_azspice_gnu_fast-debug-64bit", + "build_adjoint_tests_azspice_gnu_production-32bit", "build_adjoint_tests_azspice_gnu_full-debug-64bit", ], }) %} @@ -30,6 +31,7 @@ "adjoint_tests_ex1a_developer": [ "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit-rsolver64", + "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_production-32bit", "adjoint_tests_ex1a_canned", ], "adjoint_tests_ex1a": [ @@ -39,7 +41,7 @@ "adjoint_tests_canned_ex1a_gnu_fast-debug-64bit-rsolver64", ], "adjoint_tests_ex1a_build": [ - "build_adjoint_tests_ex1a_gnu_fast-debug-64bit", + "build_adjoint_tests_ex1a_gnu_production-32bit", "build_adjoint_tests_ex1a_gnu_full-debug-64bit", ], }) %} diff --git a/rose-stem/site/meto/groups/groups_gungho_model.cylc b/rose-stem/site/meto/groups/groups_gungho_model.cylc index 0605786b9..0704f11ad 100644 --- a/rose-stem/site/meto/groups/groups_gungho_model.cylc +++ b/rose-stem/site/meto/groups/groups_gungho_model.cylc @@ -10,6 +10,9 @@ "gungho_model_azspice_developer": [ "gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit", + "gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit", + "gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit", + "gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit", diff --git a/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc b/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc index c5dbac60d..1fbfc565b 100644 --- a/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc +++ b/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc @@ -8,7 +8,7 @@ {# Azspice Groups #} {% do site_groups.update({ "jedi_lfric_tests_azspice_developer": [ - "jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit", "jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit", @@ -16,24 +16,24 @@ "jedi_lfric_tests_forecast_pseudo_default-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_azspice_gnu_full-debug-64bit", - "jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_default-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_default-1PE-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-1PE-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-4OMP-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-1PE-4OMP-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-1PE-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-4OMP-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-1PE-4OMP-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-relaxed_solver-C12_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-relaxed_solver-1PE-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_nwp_gal9-1PE-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG_azspice_gnu_fast-debug-64bit-rsolver64", "jedi_lfric_tests_azspice_integration_tests", ], "jedi_lfric_tests_op_azspice_developer": [ - "jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-C12_op_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit", ], "jedi_lfric_tests_azspice": [ "jedi_lfric_tests_azspice_developer", @@ -44,6 +44,7 @@ ], "jedi_lfric_tests_azspice_build": [ "build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit", + "build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit-rsolver64", "build_jedi_lfric_tests_azspice_gnu_full-debug-64bit", ], }) %} @@ -52,29 +53,34 @@ {# EX1A Groups #} {% do site_groups.update({ "jedi_lfric_tests_ex1a_developer": [ - "jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_default-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_default-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_default-1PE-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-1PE-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-4OMP-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-1PE-4OMP-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-1PE-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-4OMP-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-dry-1PE-4OMP-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-relaxed_solver-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-relaxed_solver-1PE-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_nwp_gal9-1PE-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG_ex1a_cce_fast-debug-64bit-rsolver64", "jedi_lfric_tests_ex1a_integration_tests", ], "jedi_lfric_tests_op_ex1a_developer": [ - "jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_default-C12_op_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit", + ], + "jedi_lfric_tests_ex1a_weekly": [ + "jedi_lfric_tests_tlm_tests_nwp_gal9-4OMP-C224_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-real_increment-4OMP-C224_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C224_MG_ex1a_cce_fast-debug-64bit-rsolver64", ], "jedi_lfric_tests_ex1a": [ "jedi_lfric_tests_ex1a_developer", @@ -85,6 +91,7 @@ ], "jedi_lfric_tests_ex1a_build": [ "build_jedi_lfric_tests_ex1a_cce_fast-debug-64bit", + "build_jedi_lfric_tests_ex1a_cce_fast-debug-64bit-rsolver64", ], }) %} @@ -96,6 +103,9 @@ "jedi_lfric_tests_ex1a_developer", "jedi_lfric_tests_integration_tests", ], + "jedi_lfric_tests_weekly": [ + "jedi_lfric_tests_ex1a_weekly", + ], "jedi_lfric_tests": [ "jedi_lfric_tests_developer", "jedi_lfric_tests_azspice", diff --git a/rose-stem/site/meto/groups/groups_lfric2lfric.cylc b/rose-stem/site/meto/groups/groups_lfric2lfric.cylc index 1fb7bbcd6..eca0b1d27 100644 --- a/rose-stem/site/meto/groups/groups_lfric2lfric.cylc +++ b/rose-stem/site/meto/groups/groups_lfric2lfric.cylc @@ -14,6 +14,7 @@ "lfric2lfric_clim_gal9-C24_C12_azspice_gnu_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9-C24_C12_azspice_gnu_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit", + "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit", "lfric2lfric_azspice_canned", ], "lfric2lfric_azspice_extra": [ @@ -41,6 +42,7 @@ "lfric2lfric_clim_gal9-C24_C12_ex1a_cce_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9-C24_C12_ex1a_cce_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit", + "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit", "lfric2lfric_ex1a_canned", ], "lfric2lfric_ex1a_extra": [ diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index 174b5698f..ea319d080 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -27,7 +27,6 @@ "lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit", - "lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit", ], "lfric_atm_nwp_azspice": [ @@ -194,12 +193,23 @@ "lfric_atm_nwp_gal9-C224_MG_ex1a_cce_production-32bit", "lfric_atm_nwp_gal9_oper-C224_MG_ex1a_cce_production-32bit", "lfric_atm_nwp_gal9_debug-C224_MG_ex1a_cce_full-debug-32bit", + "lfric_atm_nwp_gal9_ls_and_jedi-C224_MG_ex1a_cce_production-32bit", "lfric_atm_nwp_gal9-C896_MG_ex1a_cce_production-32bit", "lfric_atm_clim_gal9-C48_MG_ex1a_cce_production-32bit", "lfric_atm_ral_ex1a_weekly", "ex1a_omp_C192_cce", "ex1a_omp_gnu", ], + "lfric_atm_ex1a_performance_check": [ + "lfric_atm_ex1a_weekly", + "lfric_atm_nwp_gal9-C896_MG_720t_perfRun0_ex1a_cce_production-32bit", + ], + "lfric_atm_ex1a_performance_runstats": [ + "lfric_atm_nwp_gal9-C896_MG_720t_perfRun1_ex1a_cce_production-32bit", + "lfric_atm_nwp_gal9-C896_MG_720t_perfRun2_ex1a_cce_production-32bit", + "lfric_atm_nwp_gal9-C896_MG_720t_perfRun3_ex1a_cce_production-32bit", + "lfric_atm_nwp_gal9-C896_MG_720t_perfRun4_ex1a_cce_production-32bit", + ], "lfric_atm_ex1a_threaded": [ "lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit", "lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_production-32bit", diff --git a/rose-stem/site/meto/groups/groups_linear_model.cylc b/rose-stem/site/meto/groups/groups_linear_model.cylc index b584e591e..062689d42 100644 --- a/rose-stem/site/meto/groups/groups_linear_model.cylc +++ b/rose-stem/site/meto/groups/groups_linear_model.cylc @@ -8,6 +8,7 @@ {# Azspice Groups #} {% do site_groups.update({ "linear_model_azspice_developer": [ + "linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit", "linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", "linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit", "linear_model_nwp_gal9_zero-C12_MG_azspice_gnu_fast-debug-64bit", @@ -31,12 +32,21 @@ {# EX1A Groups #} {% do site_groups.update({ "linear_model_ex1a_developer": [ - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit", - "linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit", - "linear_model_nwp_gal9_zero-C12_MG_ex1a_gnu_fast-debug-64bit", "linear_model_runge-kutta-C12_ex1a_gnu_fast-debug-64bit", "linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit", "linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit", + "linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit", + "linear_model_nwp_gal9_zero-C12_MG_ex1a_gnu_fast-debug-64bit", + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit", + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit", + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit", + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit", + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit", + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit", + "linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", + "linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit", + "linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit", + "linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit", "linear_model_ex1a_canned", ], "linear_model_ex1a": [ diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt index 02a626e51..5b6183ebe 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DAA271B80432F1 -Inner product checksum theta = 42418E8249EA97ED -Inner product checksum u = 43F0A73C14A3943D +Inner product checksum rho = 40DAA271B80432EF +Inner product checksum theta = 42418E8249EA97F2 +Inner product checksum u = 43F0A73C14A39446 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt index ca1a79dc2..52e45dc2f 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F2B2244799D0 -Inner product checksum theta = 4210411A3418E006 -Inner product checksum u = 4501AC432146D718 +Inner product checksum rho = 40E2F2B224670998 +Inner product checksum theta = 4210411A3415238B +Inner product checksum u = 4501AC43237805FE diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..a85080f2f --- /dev/null +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,3 @@ +Inner product checksum rho = 4102EEF5FABDC767 +Inner product checksum theta = 423041DD8252C278 +Inner product checksum u = 45017CE3BF147F0A diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..3c2888420 --- /dev/null +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,3 @@ +Inner product checksum rho = 4102EEF5FABDC764 +Inner product checksum theta = 423041DD8252C279 +Inner product checksum u = 45017CE3BF147F14 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..28e631548 --- /dev/null +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,3 @@ +Inner product checksum rho = 4102EEF5FABDC763 +Inner product checksum theta = 423041DD8252C279 +Inner product checksum u = 45017CE3BF147F13 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt index 1839f3574..849858d0b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E31B5B7CB337D5 -Inner product checksum theta = 4210461DE3B34870 -Inner product checksum u = 4500F56A544F1F86 +Inner product checksum rho = 40E31B5BE7BD919A +Inner product checksum theta = 4210461DFF525960 +Inner product checksum u = 4500F52EDECFC16C diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt index 061be97ca..3b2b948c9 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2EB31AEAB0690 -Inner product checksum theta = 42104262EDCF9F78 -Inner product checksum u = 4501DA5CB5DBC24B +Inner product checksum rho = 40E2EB31AEB4C603 +Inner product checksum theta = 42104262EDCEE39B +Inner product checksum u = 4501DA5CB5DBF453 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt index 58c743fce..3ed29f993 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F34133893AE6 -Inner product checksum theta = 421041C1BC787C3E -Inner product checksum u = 4501D87B2966270E +Inner product checksum rho = 40E2F342C08629AD +Inner product checksum theta = 421041C191162823 +Inner product checksum u = 4501D8905F18DD52 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt index 6ccaf3715..9f18c821b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2E61079810D0E -Inner product checksum theta = 4210435EB2DDC0F1 -Inner product checksum u = 4501348CFD77EA40 +Inner product checksum rho = 40E2E610798110FE +Inner product checksum theta = 4210435EB2DDB675 +Inner product checksum u = 4501348CFD7333AA diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt index 019d1c4bd..fd3c666a1 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FE89845A997E06 -Inner product checksum theta = 4210F00A9EEFEDF3 -Inner product checksum u = 42EF4B7C9D6C01D8 +Inner product checksum rho = 40FE89845A99A701 +Inner product checksum theta = 4210F00A9EEFEDA9 +Inner product checksum u = 42EF4B7C9D609EB3 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt index 64287df9b..0b0b0c4bd 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E8E802280ABCF8 -Inner product checksum theta = 4204E59A63CB78B4 -Inner product checksum u = 4391E522B368BE24 +Inner product checksum rho = 40E8E802280ABD04 +Inner product checksum theta = 4204E59A63CB78B5 +Inner product checksum u = 4391E522B345D96A diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt index 0872d11c8..2a87de992 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41094B0D90339E0A -Inner product checksum theta = 4224DF77B2266354 -Inner product checksum u = 438852006BE9E2CD +Inner product checksum rho = 41094B0D90339E11 +Inner product checksum theta = 4224DF77B226634E +Inner product checksum u = 438852006BBF0069 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt index 81c9f6506..90f688cf0 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3FF37BCAE739E -Inner product checksum theta = 41EC4ACBE79A8587 -Inner product checksum u = 44176CD1D18E18FC +Inner product checksum rho = 40D3FF37BCAE7397 +Inner product checksum theta = 41EC4ACBE79A8479 +Inner product checksum u = 44176CD1D18E2AF5 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt index 862dd9a4e..2f2341411 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EEEF2D423E478C -Inner product checksum theta = 42E4D05A8BCEE836 -Inner product checksum u = 475B46A9C47FB04E +Inner product checksum rho = 40EEEF2D423E47A3 +Inner product checksum theta = 42E4D05A8BCEE1DB +Inner product checksum u = 475B46A9C47FB787 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt index b151550e6..41856d806 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D56C9EE61BBD77 -Inner product checksum theta = 42198C1850B2D34C -Inner product checksum u = 44E3B95E1E2FF310 +Inner product checksum rho = 40D56C9EE61BC3C6 +Inner product checksum theta = 42198C1850B2D755 +Inner product checksum u = 44E3B95E1E224412 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt index 703cb92c7..a4e540f2a 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E34359B7C75475 -Inner product checksum theta = 421168C83D5BA43A -Inner product checksum u = 45082CCFC2F9E7D0 +Inner product checksum rho = 40E34359B8C1F51B +Inner product checksum theta = 421168C83D475CC1 +Inner product checksum u = 45082CCFCF94E9A7 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt index ef2d843f4..8ef5f2873 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4122BD52DCC8006A -Inner product checksum theta = 4240B2570BC700C9 -Inner product checksum u = 44F9DB80026D577A +Inner product checksum rho = 4122BD52DCC8C879 +Inner product checksum theta = 4240B2570BC6116F +Inner product checksum u = 44F9DB80028C7ED8 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt index 3a9e384d6..02c3f9431 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 41002AB9840956BE -Inner product checksum theta = 4204AB102F77F16E -Inner product checksum u = 42156E231FAF40B2 -Inner product checksum mr1 = 4047451938CF964E +Inner product checksum rho = 41002AB8C8C39016 +Inner product checksum theta = 4204AB102FFEA088 +Inner product checksum u = 42156E16EC9E94D3 +Inner product checksum mr1 = 40474517C0369F04 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt index 072ad5f3b..fd6edf7b7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 410029843CDCD5BA -Inner product checksum theta = 4204AB0A9C94010A -Inner product checksum u = 4218421EDC590CAE -Inner product checksum mr1 = 4047C516C5BD62B3 +Inner product checksum rho = 410029831ECEAE7E +Inner product checksum theta = 4204AB0A9B9CB929 +Inner product checksum u = 421842DE12830D66 +Inner product checksum mr1 = 4047C514B4591394 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt index f1aede880..2151738ed 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D58C35909BB -Inner product checksum theta = 42475B42A25CA186 -Inner product checksum u = 456062CEF51C1324 +Inner product checksum rho = 41030D58C3582FBC +Inner product checksum theta = 42475B42A261EF2F +Inner product checksum u = 456062CEF51C79C2 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt index 231eb15fe..cbe07ff1d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D6C13692114 -Inner product checksum theta = 42476BF6F9CB0DCA -Inner product checksum u = 4560B547977FC8C4 +Inner product checksum rho = 41030D6C13704D59 +Inner product checksum theta = 42476BF6F9CA5B22 +Inner product checksum u = 4560B5479772DE2C diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt index b1ccd280c..b8bba792e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030F18BC7F8C28 -Inner product checksum theta = 42476C6988C931C5 -Inner product checksum u = 4560A0F426171C4B +Inner product checksum rho = 41030F18BA3F41D1 +Inner product checksum theta = 42476C698981F562 +Inner product checksum u = 4560A0F40D52D12B diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt index ee57adc90..6e530e5ee 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E316DD570F220F -Inner product checksum theta = 420BC551F61B38E2 -Inner product checksum u = 44FD3CA2A85DEBBE +Inner product checksum rho = 40E316DD570E3D6C +Inner product checksum theta = 420BC551F61B3002 +Inner product checksum u = 44FD3CA2A860113C diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt index e429b368a..daabcd1f5 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E3144534D19E42 -Inner product checksum theta = 420BC6A55E4A9D00 -Inner product checksum u = 44FDCE146C2777B3 +Inner product checksum rho = 40E3144534D1406C +Inner product checksum theta = 420BC6A55E4A92B9 +Inner product checksum u = 44FDCE146C254141 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt index 5697a8812..ba4c4efc4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E1E481066A1517 -Inner product checksum theta = 421139232C3CEFAD -Inner product checksum u = 4393A3C2C7771420 +Inner product checksum rho = 40E1E481066A12D9 +Inner product checksum theta = 421139232C3CED92 +Inner product checksum u = 4393A3C2C776B521 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt index ffb0744c1..b81805f52 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40C1E430BB50B842 -Inner product checksum theta = 41F13953C0455668 -Inner product checksum u = 4393B8DB189F0BA8 +Inner product checksum rho = 40C1E430BB50B00C +Inner product checksum theta = 41F13953C045587E +Inner product checksum u = 4393B8DB189E7930 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt index c420fe8e4..3678d4bbe 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 40A3EC6A14AC655B Inner product checksum theta = 41BEDEE1880FB475 -Inner product checksum u = 4316BFB1C72C3612 +Inner product checksum u = 4316BFB1C87E4CB4 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt index a4b7337bc..804176505 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 400CE3D8ABA81BA3 -Inner product checksum theta = 426EFB4062696458 -Inner product checksum u = 46E90B314646D0A4 +Inner product checksum rho = 400CE3D8AB9EE6EF +Inner product checksum theta = 426EFB40626338A1 +Inner product checksum u = 46E90B31492B9E29 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt index ffe89fd94..8f9469a3e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40CBD086E89B5CBC -Inner product checksum theta = 41E3A4D10A00A1F3 -Inner product checksum u = 4400A7C1E614149E +Inner product checksum rho = 40CBD086E89B5CB8 +Inner product checksum theta = 41E3A4D10A00A1E5 +Inner product checksum u = 4400A7C1E6141466 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt index a9509981a..f9a3053f9 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1721E2B197EA -Inner product checksum theta = 41F69B200F92D0F4 -Inner product checksum u = 432D54F6E8799F07 +Inner product checksum rho = 40EA1721E2B1BCD4 +Inner product checksum theta = 41F69B200F927E56 +Inner product checksum u = 432D54F6E82B741E diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt index bc0ca5515..b3ad8201a 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DA171CE530F4BE -Inner product checksum theta = 41E69B0DAB767A1C -Inner product checksum u = 431CEA8125082548 +Inner product checksum rho = 40DA171CE3E1C133 +Inner product checksum theta = 41E69B0DAEB5A2EC +Inner product checksum u = 431CEA80FFBD7029 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt index 1b24646b6..e2553efc3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FA16E969D70AC8 -Inner product checksum theta = 42069BF1BB714707 -Inner product checksum u = 42FFC30F4E941145 +Inner product checksum rho = 40FA16E969D9ADBC +Inner product checksum theta = 42069BF1BB6B3AAE +Inner product checksum u = 42FFC30F50D36E92 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt index 00c69e3b5..741150fb7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1719B7A85796 -Inner product checksum theta = 41F69B1F274ACBE8 -Inner product checksum u = 432E6914CA3F2AB7 +Inner product checksum rho = 40EA1719B3F807A5 +Inner product checksum theta = 41F69B1F286ED724 +Inner product checksum u = 432E691969346DF4 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt index 34c6e5650..6385358bd 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D4230A146F2CC0 -Inner product checksum theta = 421AE83CAB39A57E -Inner product checksum u = 44D53ECE9B74C51B +Inner product checksum rho = 40D4230A14790BDD +Inner product checksum theta = 421AE83CAB1DBD5A +Inner product checksum u = 44D53ED2C725DCD9 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt index 8513b3305..35e317f21 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3B0E5F5D41340 -Inner product checksum theta = 421AFAE9E4BE5D88 -Inner product checksum u = 44D4479F148C12A2 +Inner product checksum rho = 40D3B0E4F2F3F788 +Inner product checksum theta = 421AFAEA72C368FC +Inner product checksum u = 44D4523A63DCEC15 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt index e527b8dfb..8e80d1ea5 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DAA271B80432F0 -Inner product checksum theta = 42418E8249EA97ED -Inner product checksum u = 43F0A73C14A3943C +Inner product checksum rho = 40DAA271B80432EF +Inner product checksum theta = 42418E8249EA97F2 +Inner product checksum u = 43F0A73C14A39445 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 1b949d925..8c67e23f6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F2B22483EA3D -Inner product checksum theta = 4210411A3410C3C7 -Inner product checksum u = 4501AC432284CD82 +Inner product checksum rho = 40E2F2B2246A07FD +Inner product checksum theta = 4210411A34141D34 +Inner product checksum u = 4501AC432220ABA1 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..8310a51cf --- /dev/null +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -0,0 +1,3 @@ +Inner product checksum rho = 4102EEF5FAB1F22F +Inner product checksum theta = 423041DD82543A06 +Inner product checksum u = 45017CE3BDB23B34 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt index 09869fdd8..9926f5622 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E31B4D10BF0DA0 -Inner product checksum theta = 4210461F9BB0AAAE -Inner product checksum u = 4500F4E3AE6CD8D8 +Inner product checksum rho = 40E31B57FB56C28B +Inner product checksum theta = 4210461EBD1C09DD +Inner product checksum u = 4500F50E9B2378D6 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt index 6ffb81194..2cadd1d66 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2EB31AEB7AC54 -Inner product checksum theta = 42104262EDCE8094 -Inner product checksum u = 4501DA5CB6E76460 +Inner product checksum rho = 40E2EB31AE95DD26 +Inner product checksum theta = 42104262EDD1A3D6 +Inner product checksum u = 4501DA5CB56AC4C4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt index dcdf764c4..70e360c33 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F3443865F0C8 -Inner product checksum theta = 421041C0A40F716F -Inner product checksum u = 4501D87BC37CB1BA +Inner product checksum rho = 40E2F344387CD754 +Inner product checksum theta = 421041C0A40ECB7E +Inner product checksum u = 4501D87BC56E88BD diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4ddcb7e18..52c76bceb 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2E61079810B7E -Inner product checksum theta = 4210435EB2DDAEFC -Inner product checksum u = 4501348CFD711AFA +Inner product checksum rho = 40E2E6107980FD66 +Inner product checksum theta = 4210435EB2DDA492 +Inner product checksum u = 4501348CFD745E06 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt index a33fd4a1b..cf12c4bbc 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FE89845A997E06 -Inner product checksum theta = 4210F00A9EEFEDF3 -Inner product checksum u = 42EF4B7C9D6C01D9 +Inner product checksum rho = 40FE89845A99A702 +Inner product checksum theta = 4210F00A9EEFEDA9 +Inner product checksum u = 42EF4B7C9D609EB4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt index a449fc5d3..4a3c842e3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E8E802280ABCFA -Inner product checksum theta = 4204E59A63CB78B2 -Inner product checksum u = 4391E522B31489D4 +Inner product checksum rho = 40E8E802280ABCFD +Inner product checksum theta = 4204E59A63CB78BA +Inner product checksum u = 4391E522B3045453 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt index a4fa9f025..1bc5bbada 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41094B0D90339E14 -Inner product checksum theta = 4224DF77B226634F -Inner product checksum u = 438852006BFEBBA6 +Inner product checksum rho = 41094B0D90339E0A +Inner product checksum theta = 4224DF77B226635A +Inner product checksum u = 438852006C521A1B diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 317fe4b7b..ca4b35a8d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3FF37BCAE7576 -Inner product checksum theta = 41EC4ACBE79A8562 -Inner product checksum u = 44176CD1D18E1C00 +Inner product checksum rho = 40D3FF37BCAE768E +Inner product checksum theta = 41EC4ACBE79A813C +Inner product checksum u = 44176CD1D18E1F8D diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt index abd067848..5eb77db6e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EEEF2D423E47A9 -Inner product checksum theta = 42E4D05A8BCEE302 -Inner product checksum u = 475B46A9C47FC6D6 +Inner product checksum rho = 40EEEF2D423E47A6 +Inner product checksum theta = 42E4D05A8BCEDE80 +Inner product checksum u = 475B46A9C47FDD23 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4ef335a94..23e2af56b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D56C9EE61BC02A -Inner product checksum theta = 42198C1850B2D284 -Inner product checksum u = 44E3B95E1E476DC8 +Inner product checksum rho = 40D56C9EE61BC316 +Inner product checksum theta = 42198C1850B2D534 +Inner product checksum u = 44E3B95E1E3659CE diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 75bfdf0cf..4c22bf942 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E34359B80C5804 -Inner product checksum theta = 421168C83D4A79F3 -Inner product checksum u = 45082CCFCECDD575 +Inner product checksum rho = 40E34359BE60DD69 +Inner product checksum theta = 421168C83C59A6DF +Inner product checksum u = 45082CD01E2731A4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt index 9a03afb2d..56de6557b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4122BD52DCC6D87A -Inner product checksum theta = 4240B2570BC5F2DA -Inner product checksum u = 44F9DB8002644CBC +Inner product checksum rho = 4122BD52DCC9E6EB +Inner product checksum theta = 4240B2570BC5E580 +Inner product checksum u = 44F9DB8002ADEC3D diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt index 3a9e384d6..02c3f9431 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 41002AB9840956BE -Inner product checksum theta = 4204AB102F77F16E -Inner product checksum u = 42156E231FAF40B2 -Inner product checksum mr1 = 4047451938CF964E +Inner product checksum rho = 41002AB8C8C39016 +Inner product checksum theta = 4204AB102FFEA088 +Inner product checksum u = 42156E16EC9E94D3 +Inner product checksum mr1 = 40474517C0369F04 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt index 072ad5f3b..fd6edf7b7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 410029843CDCD5BA -Inner product checksum theta = 4204AB0A9C94010A -Inner product checksum u = 4218421EDC590CAE -Inner product checksum mr1 = 4047C516C5BD62B3 +Inner product checksum rho = 410029831ECEAE7E +Inner product checksum theta = 4204AB0A9B9CB929 +Inner product checksum u = 421842DE12830D66 +Inner product checksum mr1 = 4047C514B4591394 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 7e1dfb2bf..fa464e671 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D58C358841C -Inner product checksum theta = 42475B42A25BD24C -Inner product checksum u = 456062CEF51ADA01 +Inner product checksum rho = 41030D58C3590812 +Inner product checksum theta = 42475B42A25E97B8 +Inner product checksum u = 456062CEF51D4871 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt index 087fd2fad..75ce9ee29 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D6C136C4726 -Inner product checksum theta = 42476BF6F9C9E065 -Inner product checksum u = 4560B547977B120F +Inner product checksum rho = 41030D6C1370FF70 +Inner product checksum theta = 42476BF6F9CAD9BF +Inner product checksum u = 4560B54797698F24 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt index e42f32057..d3d96a110 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030F18B9FB67A0 -Inner product checksum theta = 42476C698DF698DD -Inner product checksum u = 4560A0F3DA7365AC +Inner product checksum rho = 41030F18BA556EED +Inner product checksum theta = 42476C6985EDD5A2 +Inner product checksum u = 4560A0F4FB952ACD diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt index 2d5e3b173..23aaf00d6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E316DD570F67E7 -Inner product checksum theta = 420BC551F61B2ADE -Inner product checksum u = 44FD3CA2A85A5D90 +Inner product checksum rho = 40E316DD570E5057 +Inner product checksum theta = 420BC551F61B391B +Inner product checksum u = 44FD3CA2A85EC12A diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt index 30022c661..75ecd5a6e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E3144534D22EC1 -Inner product checksum theta = 420BC6A55E4A8238 -Inner product checksum u = 44FDCE146C25FF50 +Inner product checksum rho = 40E3144534D209FF +Inner product checksum theta = 420BC6A55E4A954D +Inner product checksum u = 44FDCE146C249D82 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt index 5697a8812..ba4c4efc4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E1E481066A1517 -Inner product checksum theta = 421139232C3CEFAD -Inner product checksum u = 4393A3C2C7771420 +Inner product checksum rho = 40E1E481066A12D9 +Inner product checksum theta = 421139232C3CED92 +Inner product checksum u = 4393A3C2C776B521 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt index 41bb50bf2..adf57f0b7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40C1E430BB50BA06 -Inner product checksum theta = 41F13953C045589C -Inner product checksum u = 4393B8DB189D9133 +Inner product checksum rho = 40C1E430BB50B1BB +Inner product checksum theta = 41F13953C0455941 +Inner product checksum u = 4393B8DB189EAE30 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt index 9ca596629..92e047db7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 40A3EC6A14AC655D Inner product checksum theta = 41BEDEE1880FB475 -Inner product checksum u = 4316BFB1C7362BEB +Inner product checksum u = 4316BFB1C87E4218 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 415129215..1251a6b1d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 400CE3D8ABB2DD00 -Inner product checksum theta = 426EFB40626F1444 -Inner product checksum u = 46E90B314334D653 +Inner product checksum rho = 400CE3D8ABA24B4C +Inner product checksum theta = 426EFB406264FDD6 +Inner product checksum u = 46E90B3147CFEAB5 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt index ffe89fd94..8f9469a3e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40CBD086E89B5CBC -Inner product checksum theta = 41E3A4D10A00A1F3 -Inner product checksum u = 4400A7C1E614149E +Inner product checksum rho = 40CBD086E89B5CB8 +Inner product checksum theta = 41E3A4D10A00A1E5 +Inner product checksum u = 4400A7C1E6141466 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt index dd7d16fd9..4c68af9dc 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1721E2B197EB -Inner product checksum theta = 41F69B200F92D0F4 -Inner product checksum u = 432D54F6E8799F07 +Inner product checksum rho = 40EA1721E2B1BCD4 +Inner product checksum theta = 41F69B200F927E57 +Inner product checksum u = 432D54F6E82B741E diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt index fa2891bb7..7c43065c3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DA171CE5311E97 -Inner product checksum theta = 41E69B0DAB753A8E -Inner product checksum u = 431CEA812598E8B0 +Inner product checksum rho = 40DA171CE319AA16 +Inner product checksum theta = 41E69B0DB0A24402 +Inner product checksum u = 431CEA80F2E391C8 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt index 22f2c4445..64502ae9f 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FA16E969D797DC -Inner product checksum theta = 42069BF1BB703F6A -Inner product checksum u = 42FFC30F4ED2B428 +Inner product checksum rho = 40FA16E969D78B0B +Inner product checksum theta = 42069BF1BB70B7A9 +Inner product checksum u = 42FFC30F4F0FCDA2 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt index 075d391fc..bc0f86a1b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA171A18309116 -Inner product checksum theta = 41F69B1D66F906CB -Inner product checksum u = 432E68AADCDE17B3 +Inner product checksum rho = 40EA171A18307190 +Inner product checksum theta = 41F69B1D66F943A0 +Inner product checksum u = 432E68AADC8D5EF8 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 0692e4368..cfaab8a14 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D4230A14F81BCE -Inner product checksum theta = 421AE83CAB4D6A4B -Inner product checksum u = 44D53ED7F85D2DAF +Inner product checksum rho = 40D4230A14ACFCE9 +Inner product checksum theta = 421AE83CAB3C5322 +Inner product checksum u = 44D53ED6B3D6E0DA diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt index d7a2154e7..45924fc3e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3B0E614A00984 -Inner product checksum theta = 421AFAEA39674732 -Inner product checksum u = 44D455410D2E2D22 +Inner product checksum rho = 40D3B0E5979CA91C +Inner product checksum theta = 421AFAEA87B084F6 +Inner product checksum u = 44D456945F0A4E4A diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt index 9fef2e092..76a23cf15 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123019100F3 +Inner product checksum theta = 41F6D12301909313 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt index 9fef2e092..76a23cf15 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123019100F3 +Inner product checksum theta = 41F6D12301909313 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..6dbf85b1b --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3FA4FD2C7690DC24 +Inner product checksum theta = 415FF4F8712C6491 +Inner product checksum u = 45673B7E0559C62C +Inner product checksum mr1 = 3F35B15D7C0E86A8 +Inner product checksum mr2 = 3EEAD6BF4FDA7F92 +Inner product checksum mr3 = 3EDFF2E76CAF5FF5 +Inner product checksum mr4 = 3EED395DF2372B29 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt index b17a42b79..007c1751c 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA7A1197E0CB9A0 -Inner product checksum theta = 4161FFC69BF205C3 -Inner product checksum u = 4569B9484E575B5E -Inner product checksum mr1 = 3F36C0A882D88E66 -Inner product checksum mr2 = 3EEADFD85794EA13 -Inner product checksum mr3 = 3EDFEC0C984D5704 -Inner product checksum mr4 = 3EED3A950512EB1A +Inner product checksum rho = 3FA79A9D0614EEEE +Inner product checksum theta = 4162215D8ED8A125 +Inner product checksum u = 456A083CF999EC55 +Inner product checksum mr1 = 3F36D11B3C65CF3F +Inner product checksum mr2 = 3EEAE32B46C09D7B +Inner product checksum mr3 = 3EDFEC26C0DD3244 +Inner product checksum mr4 = 3EED3B0E06CBD627 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt index df5359de9..f718f88ba 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EECEB00E275F684 -Inner product checksum theta = 40130622675CC417 -Inner product checksum u = 42EF956998B205D3 +Inner product checksum rho = 3EED6D12BBFEDECC +Inner product checksum theta = 4012F2F8A6298AC5 +Inner product checksum u = 42F12DF2D0BF0EFC diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt index df5359de9..f718f88ba 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EECEB00E275F684 -Inner product checksum theta = 40130622675CC417 -Inner product checksum u = 42EF956998B205D3 +Inner product checksum rho = 3EED6D12BBFEDECC +Inner product checksum theta = 4012F2F8A6298AC5 +Inner product checksum u = 42F12DF2D0BF0EFC diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt index 36256062e..7d6d62d97 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95A1DDD2EC7839 -Inner product checksum theta = 414000E886CBFB32 -Inner product checksum u = 452CCCFAA0BBF41E -Inner product checksum mr1 = 3F2D2183BE8E5C80 -Inner product checksum mr2 = 3EDF53A45356ADEA -Inner product checksum mr3 = 3ED26AEF2D8453B5 -Inner product checksum mr4 = 3EE009842E269AF6 +Inner product checksum rho = 3F95ACC94441A964 +Inner product checksum theta = 413FD47788AE2B0E +Inner product checksum u = 452CBAADFF659374 +Inner product checksum mr1 = 3F2D499F1DCEDE0B +Inner product checksum mr2 = 3EDF578E9B65451B +Inner product checksum mr3 = 3ED26AFC441BB781 +Inner product checksum mr4 = 3EE00986BD98837B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt index 5ae16e5aa..fc254a564 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95A1DF1E431E10 -Inner product checksum theta = 41400115CD2072D9 -Inner product checksum u = 452CCC1C9C56D3B6 -Inner product checksum mr1 = 3F2D21B9057A6428 -Inner product checksum mr2 = 3EDF53C45279F22E -Inner product checksum mr3 = 3ED26AEE8FE0B97C -Inner product checksum mr4 = 3EE009839EC7E10F +Inner product checksum rho = 3F95ACCAC59D64D9 +Inner product checksum theta = 413FD499BD5603B7 +Inner product checksum u = 452CB9ABAE30ABAF +Inner product checksum mr1 = 3F2D49D33C196D4C +Inner product checksum mr2 = 3EDF57AEC293C509 +Inner product checksum mr3 = 3ED26AFB9145F0F5 +Inner product checksum mr4 = 3EE009862BB0DCF3 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..abea1a38d --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 0 +Inner product checksum theta = 0 +Inner product checksum u = 0 +Inner product checksum mr1 = 0 +Inner product checksum mr2 = 0 +Inner product checksum mr3 = 0 +Inner product checksum mr4 = 0 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..abea1a38d --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 0 +Inner product checksum theta = 0 +Inner product checksum u = 0 +Inner product checksum mr1 = 0 +Inner product checksum mr2 = 0 +Inner product checksum mr3 = 0 +Inner product checksum mr4 = 0 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt index d3457f776..223d31dbd 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123018FAA92 +Inner product checksum theta = 41F6D123019048BD diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..3134a07c3 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3FA4FD2A13297D96 +Inner product checksum theta = 415FF4F7791418F7 +Inner product checksum u = 45673B7DB19E7072 +Inner product checksum mr1 = 3F35B160CCE25E2C +Inner product checksum mr2 = 3EEAD6BF59DB2878 +Inner product checksum mr3 = 3EDFF2E76569C104 +Inner product checksum mr4 = 3EED395DCB2F649B +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt index db90ee0d3..9ba16ef2b 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA7A119D15694EA -Inner product checksum theta = 4161FFC6B41D6C18 -Inner product checksum u = 4569B9484F679FDB -Inner product checksum mr1 = 3F36C0A85083444F -Inner product checksum mr2 = 3EEADFD859B930EE -Inner product checksum mr3 = 3EDFEC0C98392EF7 -Inner product checksum mr4 = 3EED3A95035B479C +Inner product checksum rho = 3FA79A9D24D80B84 +Inner product checksum theta = 4162215D998A790E +Inner product checksum u = 456A083CF563E471 +Inner product checksum mr1 = 3F36D11B19E12F6E +Inner product checksum mr2 = 3EEAE32B48FCBD56 +Inner product checksum mr3 = 3EDFEC26C094A93A +Inner product checksum mr4 = 3EED3B0E07D01F92 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt index 444cc9574..fb9462c5a 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EECEB00E275EB48 -Inner product checksum theta = 40130622675CC45A -Inner product checksum u = 42EF956998B2045E +Inner product checksum rho = 3EED6D12BBFEDD01 +Inner product checksum theta = 4012F2F8A6298ACF +Inner product checksum u = 42F12DF2D0BF12C9 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt index 7dfc5de39..50ce4226d 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95A1C504B6A918 -Inner product checksum theta = 413FF942C2E563C0 -Inner product checksum u = 452CCCF6ABE0865F -Inner product checksum mr1 = 3F2D21C8E6687010 -Inner product checksum mr2 = 3EDF53AD2309BABA -Inner product checksum mr3 = 3ED26AEFEBB2B535 -Inner product checksum mr4 = 3EE00982584FBC51 +Inner product checksum rho = 3F95ACB014DA78D0 +Inner product checksum theta = 413FCBF88C4910CE +Inner product checksum u = 452CBA65B40AFAB8 +Inner product checksum mr1 = 3F2D49E974B2F080 +Inner product checksum mr2 = 3EDF5792D6D2D34E +Inner product checksum mr3 = 3ED26AFD01439F84 +Inner product checksum mr4 = 3EE00984EA466A8E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt index f6ca49a10..a8eadce8d 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95A1E1F17F7A09 -Inner product checksum theta = 413FF80D6A5F4BE8 -Inner product checksum u = 452CCB73BB6342D4 -Inner product checksum mr1 = 3F2D21C0C423794A -Inner product checksum mr2 = 3EDF53B78E4C3283 -Inner product checksum mr3 = 3ED26AEF7B3222E8 -Inner product checksum mr4 = 3EE00982FE30ACFA +Inner product checksum rho = 3F95ACCD3EEAC2B8 +Inner product checksum theta = 413FCAAF700BA76A +Inner product checksum u = 452CB8D93BF67253 +Inner product checksum mr1 = 3F2D49E4C797F50E +Inner product checksum mr2 = 3EDF579D1DD1B948 +Inner product checksum mr3 = 3ED26AFC92438788 +Inner product checksum mr4 = 3EE00985A17972EA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..abea1a38d --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 0 +Inner product checksum theta = 0 +Inner product checksum u = 0 +Inner product checksum mr1 = 0 +Inner product checksum mr2 = 0 +Inner product checksum mr3 = 0 +Inner product checksum mr4 = 0 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..abea1a38d --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 0 +Inner product checksum theta = 0 +Inner product checksum u = 0 +Inner product checksum mr1 = 0 +Inner product checksum mr2 = 0 +Inner product checksum mr3 = 0 +Inner product checksum mr4 = 0 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..9d6d34d3e --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1,6 @@ +Inner product checksum tile_temperature = 41CA233EF9871AE7 +Inner product checksum u10m = 40A6A7AFFBE6DBC3 +Inner product checksum v10m = 40763D213F2E5A8F +Inner product checksum zh = 418925AC5A968D05 +Inner product checksum theta = 423287E5F56B493F +Inner product checksum u_in_w3 = 4141E4EFDFC04911 diff --git a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt index 66d133e45..b5cf95aa6 100644 --- a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum zh = 41CA60A03DABA9FF -Inner product checksum rho = 40DFDD7E6A34BDAC -Inner product checksum theta = 4235803F52CE127A +Inner product checksum zh = 41EA73B073DF7A64 +Inner product checksum rho = 40FFDD7EF4FB2C54 +Inner product checksum theta = 4255803F59E9AFDB diff --git a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..12fd87ef2 --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1,6 @@ +Inner product checksum tile_temperature = 41CA233EF98718CA +Inner product checksum u10m = 40A6A7AFFBE6DBCE +Inner product checksum v10m = 40763D213F2E5A72 +Inner product checksum zh = 418925AC5A968D44 +Inner product checksum theta = 423287E5F56B4B74 +Inner product checksum u_in_w3 = 4141E4EFDFC04AEB diff --git a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt index ca344c562..2e94dcd1b 100644 --- a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum zh = 41CA60A03DABAA19 -Inner product checksum rho = 40DFDD7E6A34BE8C -Inner product checksum theta = 4235803F52CE13AE +Inner product checksum zh = 41EA73B073DF7BA9 +Inner product checksum rho = 40FFDD7EF4FB1ED0 +Inner product checksum theta = 4255803F59E9B152 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt index 9b9895e08..baad1f3c6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 468AD8F2 -Inner product checksum theta = 4FD6898F -Inner product checksum u = 6A4E3AC8 -Inner product checksum mr1 = 3F07FDF4 -Inner product checksum mr2 = 369B4D1C -Inner product checksum mr3 = 3413652A -Inner product checksum mr4 = 368E9398 +Inner product checksum rho = 468AD911 +Inner product checksum theta = 4FD68987 +Inner product checksum u = 6A4E39D0 +Inner product checksum mr1 = 3F080026 +Inner product checksum mr2 = 369843BE +Inner product checksum mr3 = 3416CDCB +Inner product checksum mr4 = 36905047 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt index dac455d15..a8808603d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 44D95711 +Inner product checksum rho = 44D95710 Inner product checksum theta = 5504FC40 -Inner product checksum u = 74276DEB +Inner product checksum u = 74276E1C diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt index ebbf5d1b7..4b640fd26 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66411 -Inner product checksum theta = 518E95C2 -Inner product checksum u = 6AF4A509 -Inner product checksum mr1 = 3FD1977C -Inner product checksum mr2 = 375C8794 -Inner product checksum mr3 = 3534A85C -Inner product checksum mr4 = 36B9C166 +Inner product checksum rho = 46D6671E +Inner product checksum theta = 518E9CC1 +Inner product checksum u = 6AF4B3E5 +Inner product checksum mr1 = 3FD1DD2C +Inner product checksum mr2 = 3744637E +Inner product checksum mr3 = 3533FB34 +Inner product checksum mr4 = 36C1322A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt index 208bf5b67..0920e465c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66282 -Inner product checksum theta = 518E9697 -Inner product checksum u = 6AF4EDB0 -Inner product checksum mr1 = 3FD1A816 -Inner product checksum mr2 = 372DA48E -Inner product checksum mr3 = 355FEEE4 -Inner product checksum mr4 = 36BADA78 +Inner product checksum rho = 46D66653 +Inner product checksum theta = 518E9990 +Inner product checksum u = 6AF43E1A +Inner product checksum mr1 = 3FD1D04B +Inner product checksum mr2 = 3745B69A +Inner product checksum mr3 = 353019A0 +Inner product checksum mr4 = 36BDF494 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt index 28b77bf56..53e80d265 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4798D8B7 -Inner product checksum theta = 5840648A -Inner product checksum u = 79BA7DF0 +Inner product checksum rho = 4798D8B6 +Inner product checksum theta = 5840648C +Inner product checksum u = 79BA7D9D diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt index e8298690a..77784af5b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D853A2 -Inner product checksum theta = 518BD97F -Inner product checksum u = 6A8B5D0D -Inner product checksum mr1 = 3FCCB5F5 -Inner product checksum mr2 = 383329FE -Inner product checksum mr3 = 354A12DC -Inner product checksum mr4 = 36D48CC3 -Inner product checksum mr5 = 2C0EBB00 -Inner product checksum mr6 = 354FB8FB +Inner product checksum rho = 46D8578E +Inner product checksum theta = 518BD702 +Inner product checksum u = 6A8A9FF5 +Inner product checksum mr1 = 3FCD79BE +Inner product checksum mr2 = 38309A00 +Inner product checksum mr3 = 353B5ACC +Inner product checksum mr4 = 36D670E9 +Inner product checksum mr5 = 2E296A8A +Inner product checksum mr6 = 3534119C diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt index 575d12f26..fba375852 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D84776 -Inner product checksum theta = 518BD5CA -Inner product checksum u = 6A876EA4 -Inner product checksum mr1 = 3FCFC573 -Inner product checksum mr2 = 37F982D2 -Inner product checksum mr3 = 378F0686 -Inner product checksum mr4 = 37941390 -Inner product checksum mr5 = 36AD80BB +Inner product checksum rho = 46D8451F +Inner product checksum theta = 518BD5CF +Inner product checksum u = 6A871C80 +Inner product checksum mr1 = 3FCF8CE1 +Inner product checksum mr2 = 37E92CD1 +Inner product checksum mr3 = 378E0B27 +Inner product checksum mr4 = 378C60AF +Inner product checksum mr5 = 369846E2 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt deleted file mode 100644 index 689a0c93c..000000000 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 46D833DD -Inner product checksum theta = 518BE345 -Inner product checksum u = 6A861A7A -Inner product checksum mr1 = 3FD12CFE -Inner product checksum mr2 = 37EF6FF7 -Inner product checksum mr3 = 377034CF -Inner product checksum mr4 = 37BA8E17 -Inner product checksum mr5 = 3694BA7A -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt index 066b82f4f..acf51eab2 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8395D -Inner product checksum theta = 518BD538 -Inner product checksum u = 6A896534 -Inner product checksum mr1 = 3FD027A8 -Inner product checksum mr2 = 37C25DEC -Inner product checksum mr3 = 35A25CC0 -Inner product checksum mr4 = 371736E2 +Inner product checksum rho = 46D83C03 +Inner product checksum theta = 518BD66C +Inner product checksum u = 6A893E10 +Inner product checksum mr1 = 3FD01810 +Inner product checksum mr2 = 37C7F30E +Inner product checksum mr3 = 35A35CEC +Inner product checksum mr4 = 370161BA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt index b2ad06d13..b6e13d25a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40DB07687B63446A -Inner product checksum theta = 42317A99CF4E0BC0 -Inner product checksum u = 45512AE8772F7D84 -Inner product checksum mr1 = 3FFA019FB76BA7A3 -Inner product checksum mr2 = 3EF9206AB8DD06F5 -Inner product checksum mr3 = 3EB3C8E43B077FC8 -Inner product checksum mr4 = 3EE4C554CE5D456C +Inner product checksum rho = 40DB07AB9AFC01EF +Inner product checksum theta = 42317ADC8422F866 +Inner product checksum u = 45511E317DB149A5 +Inner product checksum mr1 = 3FF9FFC388F4C713 +Inner product checksum mr2 = 3EFB93018FC96529 +Inner product checksum mr3 = 3EB5CEE201A20BA4 +Inner product checksum mr4 = 3EE600C8EA2D0F0B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt index 4c7eed6cc..10d9b44ca 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FD32 -Inner product checksum theta = 5392A6D2 -Inner product checksum u = 6A97B8BA -Inner product checksum mr1 = 41CD0576 -Inner product checksum mr2 = 39CBA1DC -Inner product checksum mr3 = 37B5C87C -Inner product checksum mr4 = 39631544 +Inner product checksum rho = 48D7FCF3 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97B62D +Inner product checksum mr1 = 41CD09D2 +Inner product checksum mr2 = 39C5EB06 +Inner product checksum mr3 = 37B3A951 +Inner product checksum mr4 = 395FCEA4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt index f8dff9082..64760e2f3 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81310 -Inner product checksum theta = 51944596 -Inner product checksum u = 6B4636E2 -Inner product checksum mr1 = 3FC88E16 -Inner product checksum mr2 = 37A99D46 -Inner product checksum mr3 = 35A2C5C6 -Inner product checksum mr4 = 3788B82C +Inner product checksum rho = 46D812FE +Inner product checksum theta = 51944595 +Inner product checksum u = 6B463661 +Inner product checksum mr1 = 3FC88DAE +Inner product checksum mr2 = 37ABA450 +Inner product checksum mr3 = 35A4CCD4 +Inner product checksum mr4 = 37897CFA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt index 35fdec60e..fe9f49f4c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FDBE -Inner product checksum theta = 5392A6F9 -Inner product checksum u = 6A97B9FA -Inner product checksum mr1 = 41CD0CB2 -Inner product checksum mr2 = 39D05B98 -Inner product checksum mr3 = 37AD4C2E -Inner product checksum mr4 = 395E937D +Inner product checksum rho = 48D7FDA1 +Inner product checksum theta = 5392A6E1 +Inner product checksum u = 6A97B426 +Inner product checksum mr1 = 41CD1068 +Inner product checksum mr2 = 39CDCF8E +Inner product checksum mr3 = 37B22A3E +Inner product checksum mr4 = 3960D144 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt index cd579c1cb..ff1dc8e42 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81241 -Inner product checksum theta = 518BD644 -Inner product checksum u = 6A870A8B -Inner product checksum mr1 = 3FD3D730 -Inner product checksum mr2 = 37E1345C -Inner product checksum mr3 = 35A0FF9C -Inner product checksum mr4 = 36DC35A2 +Inner product checksum rho = 46D812FA +Inner product checksum theta = 518BD71C +Inner product checksum u = 6A87CBC7 +Inner product checksum mr1 = 3FD3E175 +Inner product checksum mr2 = 37DDA610 +Inner product checksum mr3 = 35AD9804 +Inner product checksum mr4 = 36E4050E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt index e07f68014..d4dc86bb5 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D80460 -Inner product checksum theta = 519522B0 -Inner product checksum u = 6AE6775E -Inner product checksum mr1 = 3FC86149 -Inner product checksum mr2 = 37CD2A44 -Inner product checksum mr3 = 351EE925 -Inner product checksum mr4 = 36F072B8 +Inner product checksum rho = 46D8045A +Inner product checksum theta = 519522AF +Inner product checksum u = 6AE677C8 +Inner product checksum mr1 = 3FC86195 +Inner product checksum mr2 = 37CC5EDC +Inner product checksum mr3 = 35200AA4 +Inner product checksum mr4 = 36F06583 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt index c1993e0b9..95689700c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D81496 +Inner product checksum rho = 48D81494 Inner product checksum theta = 53952668 -Inner product checksum u = 6AA4D6EE -Inner product checksum mr1 = 41C831AC -Inner product checksum mr2 = 399A2744 -Inner product checksum mr3 = 37789C51 -Inner product checksum mr4 = 39300921 +Inner product checksum u = 6AA4D6DC +Inner product checksum mr1 = 41C8318B +Inner product checksum mr2 = 3999AAE7 +Inner product checksum mr3 = 3778FB0C +Inner product checksum mr4 = 39305110 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt index 8f87801d6..0d92b82da 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81952 -Inner product checksum theta = 518BAFFF -Inner product checksum u = 6A8C8B79 -Inner product checksum mr1 = 3FD11C39 -Inner product checksum mr2 = 37E724C0 -Inner product checksum mr3 = 359FEF4C -Inner product checksum mr4 = 37074045 +Inner product checksum rho = 46D8193D +Inner product checksum theta = 518BAFDA +Inner product checksum u = 6A8CB83F +Inner product checksum mr1 = 3FD1216C +Inner product checksum mr2 = 37EA1582 +Inner product checksum mr3 = 35979016 +Inner product checksum mr4 = 36F53919 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt index a5745eb7b..c009453d0 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8137D -Inner product checksum theta = 518BD14C -Inner product checksum u = 6A8868AB -Inner product checksum mr1 = 3FD3A9A6 -Inner product checksum mr2 = 37D9892A -Inner product checksum mr3 = 35B50D72 -Inner product checksum mr4 = 37104F46 +Inner product checksum rho = 46D81432 +Inner product checksum theta = 518BD0DB +Inner product checksum u = 6A88AA11 +Inner product checksum mr1 = 3FD40165 +Inner product checksum mr2 = 37D52121 +Inner product checksum mr3 = 35A5B57C +Inner product checksum mr4 = 36D99E7A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt index 60686d791..2a9756a9d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D85CA4 -Inner product checksum theta = 5193AF09 -Inner product checksum u = 6A862FDC -Inner product checksum mr1 = 3FD02F73 -Inner product checksum mr2 = 37B8193F -Inner product checksum mr3 = 355AA397 -Inner product checksum mr4 = 36FA519C +Inner product checksum rho = 46D85CAB +Inner product checksum theta = 5193AFF8 +Inner product checksum u = 6A85DAD0 +Inner product checksum mr1 = 3FD03DEE +Inner product checksum mr2 = 37ABF442 +Inner product checksum mr3 = 3538567A +Inner product checksum mr4 = 36E34FE8 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt index 12acd49ab..b71654b5e 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7FBF0 -Inner product checksum theta = 5195577F -Inner product checksum u = 6B246B78 -Inner product checksum mr1 = 3FC85292 -Inner product checksum mr2 = 38201B0A -Inner product checksum mr3 = 356269E7 -Inner product checksum mr4 = 36F6669E +Inner product checksum rho = 46D80C8A +Inner product checksum theta = 5194ED92 +Inner product checksum u = 6B085AD5 +Inner product checksum mr1 = 3FC88023 +Inner product checksum mr2 = 37C1A81E +Inner product checksum mr3 = 356CD412 +Inner product checksum mr4 = 372B87CE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt index f22aad7e4..406a369aa 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997CA -Inner product checksum theta = 513548FD -Inner product checksum u = 612F5B34 -Inner product checksum mr1 = 4090F669 -Inner product checksum mr2 = 3589856C -Inner product checksum mr3 = 2FA53E3D -Inner product checksum mr4 = 33F4FD6A -Inner product checksum mr5 = BE7D04E +Inner product checksum rho = 483997C9 +Inner product checksum theta = 513548FE +Inner product checksum u = 612F5B38 +Inner product checksum mr1 = 4090F631 +Inner product checksum mr2 = 3591CCEA +Inner product checksum mr3 = 2FA57746 +Inner product checksum mr4 = 33F4FD79 +Inner product checksum mr5 = BE7D083 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt index 42525bc73..5ff558d35 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483999D4 -Inner product checksum theta = 51354858 -Inner product checksum u = 612F6179 -Inner product checksum mr1 = 40916617 -Inner product checksum mr2 = 364FE1DF -Inner product checksum mr3 = 2FABFD16 -Inner product checksum mr4 = 33F4FDB5 -Inner product checksum mr5 = BF2197F +Inner product checksum rho = 483999C8 +Inner product checksum theta = 5135485A +Inner product checksum u = 612F6174 +Inner product checksum mr1 = 40916665 +Inner product checksum mr2 = 364416DC +Inner product checksum mr3 = 2FAC1A90 +Inner product checksum mr4 = 33F4FD6C +Inner product checksum mr5 = BF21909 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt index cb46157c6..2d266dd37 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48398C72 +Inner product checksum rho = 48398C6E Inner product checksum theta = 513542FA -Inner product checksum u = 612EE1BF -Inner product checksum mr1 = 409102F8 -Inner product checksum mr2 = 358C6492 -Inner product checksum mr3 = 300104A8 -Inner product checksum mr4 = 3404ABE7 -Inner product checksum mr5 = C14576D +Inner product checksum u = 612EE1CA +Inner product checksum mr1 = 409102F1 +Inner product checksum mr2 = 3592AEA4 +Inner product checksum mr3 = 30010913 +Inner product checksum mr4 = 3404ABD5 +Inner product checksum mr5 = C145771 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt index c8d190573..da0cb3435 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 4830B5EE -Inner product checksum theta = 513FD8B1 -Inner product checksum u = 5F74A875 -Inner product checksum mr1 = 4155D3E1 -Inner product checksum mr2 = 3A38BFC2 -Inner product checksum mr3 = 309DE635 +Inner product checksum rho = 4830B5EB +Inner product checksum theta = 513FD8CE +Inner product checksum u = 5F74A78A +Inner product checksum mr1 = 4155BE3F +Inner product checksum mr2 = 3A3E0C78 +Inner product checksum mr3 = 30A03718 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt index ee291b91a..b97fba172 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 486B4A34 -Inner product checksum theta = 51CABF2E -Inner product checksum u = 63C9D90E +Inner product checksum rho = 486B4A32 +Inner product checksum theta = 51CABF2D +Inner product checksum u = 63C9DB14 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt index 9841b6eb9..1f49bfe68 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 468AD911 -Inner product checksum theta = 4FD68975 -Inner product checksum u = 6A4E3DFF -Inner product checksum mr1 = 3F07F74C -Inner product checksum mr2 = 36946DE4 -Inner product checksum mr3 = 34123713 -Inner product checksum mr4 = 368F7E5D +Inner product checksum rho = 468AD927 +Inner product checksum theta = 4FD68974 +Inner product checksum u = 6A4E3F58 +Inner product checksum mr1 = 3F07FDC4 +Inner product checksum mr2 = 3695CB0F +Inner product checksum mr3 = 3416AF74 +Inner product checksum mr4 = 3688F856 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt index 8e17322f7..5edec3d07 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 44D9577E -Inner product checksum theta = 5504FC06 -Inner product checksum u = 74276D62 +Inner product checksum theta = 5504FC04 +Inner product checksum u = 74276D87 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt index 25d91e816..6b2aee26c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66645 -Inner product checksum theta = 518E9258 -Inner product checksum u = 6AF5B934 -Inner product checksum mr1 = 3FD1882C -Inner product checksum mr2 = 372DB77C -Inner product checksum mr3 = 3550CFFF -Inner product checksum mr4 = 36CE2190 +Inner product checksum rho = 46D6659E +Inner product checksum theta = 518E92B2 +Inner product checksum u = 6AF645B2 +Inner product checksum mr1 = 3FD17BD6 +Inner product checksum mr2 = 374872C0 +Inner product checksum mr3 = 35460093 +Inner product checksum mr4 = 36D513C0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index dad9cc2fe..a8247bf83 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D65050 -Inner product checksum theta = 519252CF -Inner product checksum u = 6B21E348 -Inner product checksum mr1 = 3FCF42D1 -Inner product checksum mr2 = 37381DAF -Inner product checksum mr3 = 3540D096 -Inner product checksum mr4 = 368F0E56 +Inner product checksum rho = 46D64EB7 +Inner product checksum theta = 51925204 +Inner product checksum u = 6B220318 +Inner product checksum mr1 = 3FCF4E45 +Inner product checksum mr2 = 37351348 +Inner product checksum mr3 = 353C1842 +Inner product checksum mr4 = 369D1690 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index f9432b922..935dab390 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65CA2 +Inner product checksum rho = 48D65C71 Inner product checksum theta = 5399FF3C -Inner product checksum u = 6B12FA97 -Inner product checksum mr1 = 41CC37A2 -Inner product checksum mr2 = 39653132 -Inner product checksum mr3 = 37D05F64 -Inner product checksum mr4 = 393DABFB +Inner product checksum u = 6B12FB2B +Inner product checksum mr1 = 41CC3802 +Inner product checksum mr2 = 3967ECD4 +Inner product checksum mr3 = 37C2B69E +Inner product checksum mr4 = 3941B53E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 72bfd583c..5fff179dc 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D65168 -Inner product checksum theta = 5192527C -Inner product checksum u = 6B222314 -Inner product checksum mr1 = 3FCF2D3A -Inner product checksum mr2 = 37213889 -Inner product checksum mr3 = 35332238 -Inner product checksum mr4 = 369777BC +Inner product checksum rho = 46D64EEF +Inner product checksum theta = 5192521E +Inner product checksum u = 6B22308E +Inner product checksum mr1 = 3FCF4F09 +Inner product checksum mr2 = 3759E9CC +Inner product checksum mr3 = 354E368D +Inner product checksum mr4 = 36A1E498 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index e9c196850..5f9dc4d3a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C88 -Inner product checksum theta = 5399FF36 -Inner product checksum u = 6B12FAA8 -Inner product checksum mr1 = 41CC3316 -Inner product checksum mr2 = 3964F6F4 -Inner product checksum mr3 = 37D7B383 -Inner product checksum mr4 = 393DDB1C +Inner product checksum rho = 48D65C63 +Inner product checksum theta = 5399FF3D +Inner product checksum u = 6B12FB74 +Inner product checksum mr1 = 41CC353D +Inner product checksum mr2 = 3961D6B7 +Inner product checksum mr3 = 37C2B434 +Inner product checksum mr4 = 39414ED7 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index dc726253f..86e53b19c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C9A -Inner product checksum theta = 5399FF32 -Inner product checksum u = 6B12FB2D -Inner product checksum mr1 = 41CC3064 -Inner product checksum mr2 = 3965037F -Inner product checksum mr3 = 37CA7B1F -Inner product checksum mr4 = 393E5CEB +Inner product checksum rho = 48D65C66 +Inner product checksum theta = 5399FF39 +Inner product checksum u = 6B12FCF8 +Inner product checksum mr1 = 41CC350C +Inner product checksum mr2 = 39652046 +Inner product checksum mr3 = 37C39FEA +Inner product checksum mr4 = 394124EC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt index 33a61afa5..1803e212b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66721 -Inner product checksum theta = 518E9952 -Inner product checksum u = 6AF570FF -Inner product checksum mr1 = 3FD149C8 -Inner product checksum mr2 = 373B0B70 -Inner product checksum mr3 = 3542F26A -Inner product checksum mr4 = 36D60834 +Inner product checksum rho = 46D665F0 +Inner product checksum theta = 518E903E +Inner product checksum u = 6AF66607 +Inner product checksum mr1 = 3FD1CEB7 +Inner product checksum mr2 = 3750C0F4 +Inner product checksum mr3 = 35308456 +Inner product checksum mr4 = 36C50D71 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt index 897bb2a8a..cd932b385 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D65158 -Inner product checksum theta = 51925088 -Inner product checksum u = 6B22E36C -Inner product checksum mr1 = 3FCF38CE -Inner product checksum mr2 = 373B43CF -Inner product checksum mr3 = 3538FC26 -Inner product checksum mr4 = 369D3958 +Inner product checksum rho = 46D64E7A +Inner product checksum theta = 51925011 +Inner product checksum u = 6B22BF73 +Inner product checksum mr1 = 3FCF5905 +Inner product checksum mr2 = 37435010 +Inner product checksum mr3 = 3542184C +Inner product checksum mr4 = 36AEB332 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt index e16714575..1d9be2526 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D650A6 -Inner product checksum theta = 519250BE -Inner product checksum u = 6B229F64 -Inner product checksum mr1 = 3FCF2FBF -Inner product checksum mr2 = 373591AE -Inner product checksum mr3 = 3535C603 -Inner product checksum mr4 = 36A3BD88 +Inner product checksum rho = 46D64DFC +Inner product checksum theta = 51924FF0 +Inner product checksum u = 6B227D3C +Inner product checksum mr1 = 3FCF3F5B +Inner product checksum mr2 = 373A7C56 +Inner product checksum mr3 = 353EAD7B +Inner product checksum mr4 = 36A63314 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt index 91bb01bc5..8bd71eba7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 489A8317 -Inner product checksum theta = 51BA5074 -Inner product checksum u = 5F1192E8 -Inner product checksum mr1 = 4187BC72 -Inner product checksum mr2 = 3AF9734F -Inner product checksum mr3 = 34BC1253 +Inner product checksum rho = 489A8379 +Inner product checksum theta = 51BA505B +Inner product checksum u = 5F118CC2 +Inner product checksum mr1 = 4187C6A4 +Inner product checksum mr2 = 3AF39B2F +Inner product checksum mr3 = 34D56FED Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt index 9c29598f8..0c8494eec 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 4798D952 -Inner product checksum theta = 58406A9E -Inner product checksum u = 79BA728C +Inner product checksum theta = 58406A9C +Inner product checksum u = 79BA72A4 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt index 7a10b693d..b2f8542fb 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8579C -Inner product checksum theta = 518BD66C -Inner product checksum u = 6A8B331F -Inner product checksum mr1 = 3FCCAF7B -Inner product checksum mr2 = 3833B901 -Inner product checksum mr3 = 3538B539 -Inner product checksum mr4 = 36CB1792 -Inner product checksum mr5 = 2E91F418 -Inner product checksum mr6 = 3580229C +Inner product checksum rho = 46D85C1E +Inner product checksum theta = 518BD68E +Inner product checksum u = 6A8AB4A2 +Inner product checksum mr1 = 3FCD6B98 +Inner product checksum mr2 = 3834A23C +Inner product checksum mr3 = 35462D21 +Inner product checksum mr4 = 36C2FB8E +Inner product checksum mr5 = 2E9A3459 +Inner product checksum mr6 = 355C98F6 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt index 26acfbf09..8d6f364b6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8458C -Inner product checksum theta = 518BD62A -Inner product checksum u = 6A87FCF8 -Inner product checksum mr1 = 3FCF951F -Inner product checksum mr2 = 37E6BD02 -Inner product checksum mr3 = 378A7D17 -Inner product checksum mr4 = 3797816D -Inner product checksum mr5 = 36A1EFBC +Inner product checksum rho = 46D8450A +Inner product checksum theta = 518BD8F0 +Inner product checksum u = 6A87D5CF +Inner product checksum mr1 = 3FCF848A +Inner product checksum mr2 = 37EF578A +Inner product checksum mr3 = 37A268D4 +Inner product checksum mr4 = 37A12861 +Inner product checksum mr5 = 36AF6891 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt index 86f1a8990..528c8a616 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D832FB -Inner product checksum theta = 518BE422 -Inner product checksum u = 6A85F6E0 -Inner product checksum mr1 = 3FD14346 -Inner product checksum mr2 = 37F2F57E -Inner product checksum mr3 = 3782C0C7 -Inner product checksum mr4 = 37BAC82C -Inner product checksum mr5 = 368F067F +Inner product checksum rho = 46D832D6 +Inner product checksum theta = 518BE1F6 +Inner product checksum u = 6A86BC76 +Inner product checksum mr1 = 3FD120E6 +Inner product checksum mr2 = 37FAD7AC +Inner product checksum mr3 = 376811C0 +Inner product checksum mr4 = 37BFF8BC +Inner product checksum mr5 = 3697AF6E Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt index f94eb38a4..c17987500 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D85410 -Inner product checksum theta = 518BE004 -Inner product checksum u = 6A85218C -Inner product checksum mr1 = 3FCE9E1F -Inner product checksum mr2 = 37E4C939 -Inner product checksum mr3 = 3788C888 -Inner product checksum mr4 = 3742DF88 -Inner product checksum mr5 = 35FA4066 +Inner product checksum rho = 46D8528E +Inner product checksum theta = 518BDFC0 +Inner product checksum u = 6A84BE51 +Inner product checksum mr1 = 3FCE1718 +Inner product checksum mr2 = 37F0E036 +Inner product checksum mr3 = 37746CB5 +Inner product checksum mr4 = 375B7784 +Inner product checksum mr5 = 35F5451D Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt index 0173068fd..3defd3bad 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D83A4C -Inner product checksum theta = 518BD444 -Inner product checksum u = 6A88FD52 -Inner product checksum mr1 = 3FD053A6 -Inner product checksum mr2 = 37C1F342 -Inner product checksum mr3 = 35B0A3F5 -Inner product checksum mr4 = 371EEFC4 +Inner product checksum rho = 46D83942 +Inner product checksum theta = 518BD198 +Inner product checksum u = 6A8858C5 +Inner product checksum mr1 = 3FD03D69 +Inner product checksum mr2 = 37C68732 +Inner product checksum mr3 = 35A338B2 +Inner product checksum mr4 = 372B63E6 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt index 34b7b82b3..1e17cfead 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40DB0757B4BE3749 -Inner product checksum theta = 42317AE8FF170FEB -Inner product checksum u = 45511C298292738C -Inner product checksum mr1 = 3FFA072396A05146 -Inner product checksum mr2 = 3EF7CFE7BA88E481 -Inner product checksum mr3 = 3EB62B4610C1BC12 -Inner product checksum mr4 = 3EE6F10435082B52 +Inner product checksum rho = 40DB0770E3192095 +Inner product checksum theta = 42317AE3AD158CC4 +Inner product checksum u = 455118036F27A992 +Inner product checksum mr1 = 3FF9FB92A4B6D4E0 +Inner product checksum mr2 = 3EFA9528278A8038 +Inner product checksum mr3 = 3EB5BDCF89E24FCD +Inner product checksum mr4 = 3EE810E99B341094 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt index b890162cf..5caec27d7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE18 -Inner product checksum theta = 5392A6A2 -Inner product checksum u = 6A97C089 -Inner product checksum mr1 = 41CD056D -Inner product checksum mr2 = 39CBD9F4 -Inner product checksum mr3 = 37B13018 -Inner product checksum mr4 = 3961993C +Inner product checksum rho = 48D7FDC2 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97C06C +Inner product checksum mr1 = 41CCFFD6 +Inner product checksum mr2 = 39CB289D +Inner product checksum mr3 = 37B0138E +Inner product checksum mr4 = 3962555F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt index d7770fd37..e3aa91e3c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8133C -Inner product checksum theta = 51944574 -Inner product checksum u = 6B464490 -Inner product checksum mr1 = 3FC8853A -Inner product checksum mr2 = 379E8516 -Inner product checksum mr3 = 35A323FA -Inner product checksum mr4 = 3787E04A +Inner product checksum rho = 46D81338 +Inner product checksum theta = 51944576 +Inner product checksum u = 6B463F06 +Inner product checksum mr1 = 3FC88651 +Inner product checksum mr2 = 37A36829 +Inner product checksum mr3 = 35A6D95D +Inner product checksum mr4 = 37887FC4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index 8342a28b3..c3a2a6d16 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F7B0 -Inner product checksum theta = 518E7E70 -Inner product checksum u = 6B17F06C -Inner product checksum mr1 = 3FCBD2DC -Inner product checksum mr2 = 37AA5968 -Inner product checksum mr3 = 34B52578 -Inner product checksum mr4 = 36D010CE +Inner product checksum rho = 46D7F858 +Inner product checksum theta = 518E7E7A +Inner product checksum u = 6B17CC75 +Inner product checksum mr1 = 3FCBD462 +Inner product checksum mr2 = 37AD8A40 +Inner product checksum mr3 = 34B9932D +Inner product checksum mr4 = 36C12B34 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index b890162cf..5caec27d7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE18 -Inner product checksum theta = 5392A6A2 -Inner product checksum u = 6A97C089 -Inner product checksum mr1 = 41CD056D -Inner product checksum mr2 = 39CBD9F4 -Inner product checksum mr3 = 37B13018 -Inner product checksum mr4 = 3961993C +Inner product checksum rho = 48D7FDC2 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97C06C +Inner product checksum mr1 = 41CCFFD6 +Inner product checksum mr2 = 39CB289D +Inner product checksum mr3 = 37B0138E +Inner product checksum mr4 = 3962555F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 0d4f3ce57..b3a490ffd 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F7AC -Inner product checksum theta = 518E7EA3 -Inner product checksum u = 6B17BE26 -Inner product checksum mr1 = 3FCBE680 -Inner product checksum mr2 = 37AE7092 -Inner product checksum mr3 = 34A9B6C4 -Inner product checksum mr4 = 36BDA705 +Inner product checksum rho = 46D7F7C0 +Inner product checksum theta = 518E7EA0 +Inner product checksum u = 6B17D322 +Inner product checksum mr1 = 3FCBE140 +Inner product checksum mr2 = 37A8EADE +Inner product checksum mr3 = 349D5EB2 +Inner product checksum mr4 = 36BD9099 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 29bd868de..64f8b7725 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE2C -Inner product checksum theta = 5392A6D4 -Inner product checksum u = 6A97BEC1 -Inner product checksum mr1 = 41CD0CC7 -Inner product checksum mr2 = 39CB66B4 -Inner product checksum mr3 = 37B1817F -Inner product checksum mr4 = 395EDCEA +Inner product checksum rho = 48D7FE02 +Inner product checksum theta = 5392A6B8 +Inner product checksum u = 6A97C654 +Inner product checksum mr1 = 41CD029C +Inner product checksum mr2 = 39CE5000 +Inner product checksum mr3 = 37ACA3FB +Inner product checksum mr4 = 396055DE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt index a0f66c0a6..f9df60826 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FD0C -Inner product checksum theta = 5392A6D8 -Inner product checksum u = 6A97B91D -Inner product checksum mr1 = 41CD0EA5 -Inner product checksum mr2 = 39CD893A -Inner product checksum mr3 = 37B79510 -Inner product checksum mr4 = 395E278D +Inner product checksum rho = 48D7FCFF +Inner product checksum theta = 5392A6F0 +Inner product checksum u = 6A97B7D3 +Inner product checksum mr1 = 41CD0DDA +Inner product checksum mr2 = 39CD2EE0 +Inner product checksum mr3 = 37B6DDF3 +Inner product checksum mr4 = 3963190E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 2cc719d5b..f05ae48b9 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE10 -Inner product checksum theta = 5392A6B8 -Inner product checksum u = 6A97BB45 -Inner product checksum mr1 = 41CD0AE6 -Inner product checksum mr2 = 39CCBBC2 -Inner product checksum mr3 = 37B00A0F -Inner product checksum mr4 = 3960ED49 +Inner product checksum rho = 48D7FDF2 +Inner product checksum theta = 5392A6C1 +Inner product checksum u = 6A97C07E +Inner product checksum mr1 = 41CD05C2 +Inner product checksum mr2 = 39C9FA29 +Inner product checksum mr3 = 37B66B12 +Inner product checksum mr4 = 39605796 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt index d2c7ffcdf..7d15a5c26 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE74 -Inner product checksum theta = 5392A6D4 -Inner product checksum u = 6A97C89A -Inner product checksum mr1 = 41CD0762 -Inner product checksum mr2 = 39CD5F24 -Inner product checksum mr3 = 37BE39B8 -Inner product checksum mr4 = 395CDF2E +Inner product checksum rho = 48D7FE88 +Inner product checksum theta = 5392A6C2 +Inner product checksum u = 6A97BFB9 +Inner product checksum mr1 = 41CD0697 +Inner product checksum mr2 = 39C8DC60 +Inner product checksum mr3 = 37B00779 +Inner product checksum mr4 = 395B6E15 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt index 4b343c147..bbc606f94 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC27 -Inner product checksum theta = 5392A690 -Inner product checksum u = 6A97C7C1 -Inner product checksum mr1 = 41CCE6BC -Inner product checksum mr2 = 39CCAB4E -Inner product checksum mr3 = 37AC310A -Inner product checksum mr4 = 397240F4 +Inner product checksum rho = 48D7FC63 +Inner product checksum theta = 5392A688 +Inner product checksum u = 6A97C7E2 +Inner product checksum mr1 = 41CCE1BA +Inner product checksum mr2 = 39CC1EA5 +Inner product checksum mr3 = 37B52B9E +Inner product checksum mr4 = 3971E51F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt index 3c702f837..6fbce5e9f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FB4D -Inner product checksum theta = 5392A6BF -Inner product checksum u = 6A97B4CF -Inner product checksum mr1 = 41CCE4CA -Inner product checksum mr2 = 39D1AFCE -Inner product checksum mr3 = 37B349DC -Inner product checksum mr4 = 3976F722 +Inner product checksum rho = 48D7FB44 +Inner product checksum theta = 5392A6B6 +Inner product checksum u = 6A97B404 +Inner product checksum mr1 = 41CCE89F +Inner product checksum mr2 = 39CC1B52 +Inner product checksum mr3 = 37AE1DF8 +Inner product checksum mr4 = 397813E2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt index 478d4fcb5..4b98b2ae7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8134A -Inner product checksum theta = 518BD7B8 -Inner product checksum u = 6A871854 -Inner product checksum mr1 = 3FD3D860 -Inner product checksum mr2 = 37DAB787 -Inner product checksum mr3 = 35B5427A -Inner product checksum mr4 = 36C7CCC3 +Inner product checksum rho = 46D81300 +Inner product checksum theta = 518BD591 +Inner product checksum u = 6A86E3C2 +Inner product checksum mr1 = 3FD3C193 +Inner product checksum mr2 = 37E8C1CE +Inner product checksum mr3 = 35B99320 +Inner product checksum mr4 = 36D70E14 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt index 72d0bfd81..6b296c277 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8046E +Inner product checksum rho = 46D8046D Inner product checksum theta = 519522B0 -Inner product checksum u = 6AE676F3 -Inner product checksum mr1 = 3FC861D0 -Inner product checksum mr2 = 37CF9691 -Inner product checksum mr3 = 351F51C6 -Inner product checksum mr4 = 36EFCBFC +Inner product checksum u = 6AE67712 +Inner product checksum mr1 = 3FC861DE +Inner product checksum mr2 = 37CDBC97 +Inner product checksum mr3 = 352223A1 +Inner product checksum mr4 = 36EFD230 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt index 52e4cd78a..4b358888f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48D81494 -Inner product checksum theta = 53952666 -Inner product checksum u = 6AA4D6C3 -Inner product checksum mr1 = 41C830E0 -Inner product checksum mr2 = 399AC878 -Inner product checksum mr3 = 3778FE37 -Inner product checksum mr4 = 39300070 +Inner product checksum theta = 53952667 +Inner product checksum u = 6AA4D6DD +Inner product checksum mr1 = 41C83143 +Inner product checksum mr2 = 399A84AB +Inner product checksum mr3 = 377973DB +Inner product checksum mr4 = 3930117B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt index d7dd1131b..7a5e3cff4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D815B7 -Inner product checksum theta = 518BB015 -Inner product checksum u = 6A8D3286 -Inner product checksum mr1 = 3FD11C03 -Inner product checksum mr2 = 37EF08A9 -Inner product checksum mr3 = 35947BBC -Inner product checksum mr4 = 3728DBFF +Inner product checksum rho = 46D818B8 +Inner product checksum theta = 518BB117 +Inner product checksum u = 6A8D23A8 +Inner product checksum mr1 = 3FD1137A +Inner product checksum mr2 = 37DB360D +Inner product checksum mr3 = 35A031F6 +Inner product checksum mr4 = 370B3EBC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt index 129ca8373..aa2bed702 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81532 -Inner product checksum theta = 518BCDE7 -Inner product checksum u = 6A87EBC8 -Inner product checksum mr1 = 3FD3CB55 -Inner product checksum mr2 = 37DAAA72 -Inner product checksum mr3 = 35A92463 -Inner product checksum mr4 = 36DE32C6 +Inner product checksum rho = 46D813AE +Inner product checksum theta = 518BD182 +Inner product checksum u = 6A884A33 +Inner product checksum mr1 = 3FD3B2DE +Inner product checksum mr2 = 37DA9C3A +Inner product checksum mr3 = 35940F5E +Inner product checksum mr4 = 3712DD31 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt index f7a76a6ba..440c859d0 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D85DCF -Inner product checksum theta = 5193AFAC -Inner product checksum u = 6A859D08 -Inner product checksum mr1 = 3FD01F04 -Inner product checksum mr2 = 37A9C60E -Inner product checksum mr3 = 353B3722 -Inner product checksum mr4 = 36F41E2E +Inner product checksum rho = 46D85DEA +Inner product checksum theta = 5193AF22 +Inner product checksum u = 6A865782 +Inner product checksum mr1 = 3FD05C10 +Inner product checksum mr2 = 37AECC7C +Inner product checksum mr3 = 35555AD4 +Inner product checksum mr4 = 36CEE5C2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt index cc50d603f..a9cda3d60 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F5C5 -Inner product checksum theta = 518E7EDA -Inner product checksum u = 6B17A12D -Inner product checksum mr1 = 3FCBC892 -Inner product checksum mr2 = 37A48130 -Inner product checksum mr3 = 34D116D4 -Inner product checksum mr4 = 36EAFBEF +Inner product checksum rho = 46D7F53F +Inner product checksum theta = 518E7EF8 +Inner product checksum u = 6B17A164 +Inner product checksum mr1 = 3FCBDDC0 +Inner product checksum mr2 = 37B65076 +Inner product checksum mr3 = 34AF8D37 +Inner product checksum mr4 = 36FD8E6A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 5dece7c6a..2d055cced 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC1C -Inner product checksum theta = 5392A660 -Inner product checksum u = 6A97BEDD -Inner product checksum mr1 = 41CCE8AE -Inner product checksum mr2 = 39CD6F70 -Inner product checksum mr3 = 37AE4ED3 -Inner product checksum mr4 = 39701857 +Inner product checksum rho = 48D7FC49 +Inner product checksum theta = 5392A69F +Inner product checksum u = 6A97BDE8 +Inner product checksum mr1 = 41CCE85E +Inner product checksum mr2 = 39CAFA12 +Inner product checksum mr3 = 37ABD166 +Inner product checksum mr4 = 3973E9E8 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt index 1d8d04cdd..973d78bb8 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F51F -Inner product checksum theta = 518E7EDD -Inner product checksum u = 6B17AA10 -Inner product checksum mr1 = 3FCBD631 -Inner product checksum mr2 = 37B619D8 -Inner product checksum mr3 = 34B1FB3A -Inner product checksum mr4 = 36F479A2 +Inner product checksum rho = 46D7F57C +Inner product checksum theta = 518E7EDE +Inner product checksum u = 6B17A83B +Inner product checksum mr1 = 3FCBE8E8 +Inner product checksum mr2 = 37AA5510 +Inner product checksum mr3 = 34A43776 +Inner product checksum mr4 = 36EB4854 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index bb1053b50..a3af9fcda 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,11 @@ -Inner product checksum rho = 48D7FC8E -Inner product checksum theta = 5392A65E -Inner product checksum u = 6A97BDC4 -Inner product checksum mr1 = 41CCF31E -Inner product checksum mr2 = 39CB81EA -Inner product checksum mr3 = 37B6099F -Inner product checksum mr4 = 3976DD09 + +Inner product checksum rho = 48D7FC5D +Inner product checksum theta = 5392A66D +Inner product checksum u = 6A97C28C +Inner product checksum mr1 = 41CCEB8E +Inner product checksum mr2 = 39CA5305 +Inner product checksum mr3 = 37AD7626 +Inner product checksum mr4 = 39706818 +>>>>>>> upstream/main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt index 77e5ba5ff..e5354a8b9 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,10 @@ -Inner product checksum rho = 48D7FB4E -Inner product checksum theta = 5392A6ED -Inner product checksum u = 6A97B55D -Inner product checksum mr1 = 41CCF369 -Inner product checksum mr2 = 39CDEEBC -Inner product checksum mr3 = 37AF72F2 -Inner product checksum mr4 = 3971EA0E +Inner product checksum rho = 48D7FB5E +Inner product checksum theta = 5392A6DE +Inner product checksum u = 6A97B4CC +Inner product checksum mr1 = 41CCEE7C +Inner product checksum mr2 = 39CC8EE4 +Inner product checksum mr3 = 37AE7CC2 +Inner product checksum mr4 = 39706A08 +>>>>>>> upstream/main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 619893f28..a9ffceead 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC0D -Inner product checksum theta = 5392A68F -Inner product checksum u = 6A97B9E4 -Inner product checksum mr1 = 41CCE358 -Inner product checksum mr2 = 39C99F2A -Inner product checksum mr3 = 37AF50B0 -Inner product checksum mr4 = 397189F7 +Inner product checksum rho = 48D7FC4A +Inner product checksum theta = 5392A66A +Inner product checksum u = 6A97BE23 +Inner product checksum mr1 = 41CCE6A6 +Inner product checksum mr2 = 39CB60DC +Inner product checksum mr3 = 37AF065D +Inner product checksum mr4 = 3973921C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt index fc875d1dd..453cf594b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7FC00 -Inner product checksum theta = 5195576C -Inner product checksum u = 6B246EA5 -Inner product checksum mr1 = 3FC852FF -Inner product checksum mr2 = 381E302C -Inner product checksum mr3 = 35639D20 -Inner product checksum mr4 = 36F6E186 +Inner product checksum rho = 46D80CA6 +Inner product checksum theta = 5194ED76 +Inner product checksum u = 6B08591A +Inner product checksum mr1 = 3FC88034 +Inner product checksum mr2 = 37C26C0C +Inner product checksum mr3 = 35767D74 +Inner product checksum mr4 = 372A0F68 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 1e9885931..317acc6a4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997DA -Inner product checksum theta = 5135490A -Inner product checksum u = 612F5E0C -Inner product checksum mr1 = 4090F5EC -Inner product checksum mr2 = 3599E934 -Inner product checksum mr3 = 2FA5315A -Inner product checksum mr4 = 33F4FD4E -Inner product checksum mr5 = BE85FCC +Inner product checksum rho = 483997DE +Inner product checksum theta = 51354909 +Inner product checksum u = 612F5E11 +Inner product checksum mr1 = 4090F5E4 +Inner product checksum mr2 = 358EB0BA +Inner product checksum mr3 = 2FA519F0 +Inner product checksum mr4 = 33F4FD57 +Inner product checksum mr5 = BE85FEC Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 9f0b2b052..7b6d5479c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997EC -Inner product checksum theta = 513548FD -Inner product checksum u = 612F5EB9 -Inner product checksum mr1 = 40910DEE -Inner product checksum mr2 = 35DE4A2C -Inner product checksum mr3 = 2FA75F15 -Inner product checksum mr4 = 33F4FFD3 -Inner product checksum mr5 = BE04B38 +Inner product checksum rho = 483997E3 +Inner product checksum theta = 51354900 +Inner product checksum u = 612F5EB6 +Inner product checksum mr1 = 40910DBB +Inner product checksum mr2 = 3600A9CC +Inner product checksum mr3 = 2FA77A9F +Inner product checksum mr4 = 33F4FFEC +Inner product checksum mr5 = BE04B21 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt index b3bf80080..24e480b50 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48398C6A Inner product checksum theta = 51354302 -Inner product checksum u = 612EDCBA -Inner product checksum mr1 = 4091034B -Inner product checksum mr2 = 3592F0C2 -Inner product checksum mr3 = 300105E3 -Inner product checksum mr4 = 3404AC1D +Inner product checksum u = 612EDCAC +Inner product checksum mr1 = 40910338 +Inner product checksum mr2 = 35876274 +Inner product checksum mr3 = 30010BB7 +Inner product checksum mr4 = 3404AC2D Inner product checksum mr5 = C14A22D Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt index 9006b2022..d6c9e6e85 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 4830B646 -Inner product checksum theta = 513FD832 -Inner product checksum u = 5F74BAEC -Inner product checksum mr1 = 4155B86C -Inner product checksum mr2 = 3A48BCB8 -Inner product checksum mr3 = 30A6CEC1 +Inner product checksum rho = 4830B653 +Inner product checksum theta = 513FD830 +Inner product checksum u = 5F74B058 +Inner product checksum mr1 = 4155BC4A +Inner product checksum mr2 = 3A3F75A2 +Inner product checksum mr3 = 3088CA46 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt index 490974e84..e78d4e606 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 486B4A17 -Inner product checksum theta = 51CABEF0 -Inner product checksum u = 63C9A5FD +Inner product checksum rho = 486B4A14 +Inner product checksum theta = 51CABEF1 +Inner product checksum u = 63C9A16C diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index 4503347e9..c3d509995 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B540CBDAAF1E6 -Inner product checksum theta = 42735B1CEA783DEF -Inner product checksum u = 456F419B54DF718C -Inner product checksum mr1 = 403684B192F9B7C8 -Inner product checksum mr2 = 3F3FB9B37223D660 -Inner product checksum mr3 = 3F01A34A33053A49 -Inner product checksum mr4 = 3F3682A9C70300EA +Inner product checksum rho = 411B5407F4CE40FD +Inner product checksum theta = 42735B1EDCE5682D +Inner product checksum u = 456F41EDCEE58D54 +Inner product checksum mr1 = 4036855990B99604 +Inner product checksum mr2 = 3F4021291625C39B +Inner product checksum mr3 = 3F00980BB1AF46A0 +Inner product checksum mr4 = 3F368688EE9DBAD2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt index 4148368a6..6b4b2fab9 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3F20250B4FE9B9EF -Inner product checksum theta = 403305E848D6E311 -Inner product checksum u = 433053B3FA026478 +Inner product checksum rho = 3F20225948327449 +Inner product checksum theta = 4033068A55E5336A +Inner product checksum u = 433056118E515C60 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt index 6a7be832b..48d058c8b 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958F0C1D55513 -Inner product checksum theta = 4161FFBE6B89106C -Inner product checksum u = 456A4D0AF00B4480 -Inner product checksum mr1 = 3F3B888F79EB2E18 -Inner product checksum mr2 = 3EEB3109C670AF3C -Inner product checksum mr3 = 3EDFF31B816930A0 -Inner product checksum mr4 = 3EED42827F73DFDC +Inner product checksum rho = 3FA509A05A373B23 +Inner product checksum theta = 41610F1B6ABD09B0 +Inner product checksum u = 45688F5F19933A2F +Inner product checksum mr1 = 3F35BCF4D7DD3124 +Inner product checksum mr2 = 3EEAFF88125CD2E4 +Inner product checksum mr3 = 3EE049CB61EE38FC +Inner product checksum mr4 = 3EED5E034DF58BB4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt new file mode 100644 index 000000000..49730ad8f --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3D284CEE +Inner product checksum theta = 4B087745 +Inner product checksum u = 6B447884 +Inner product checksum mr1 = 39ADE81D +Inner product checksum mr2 = 37580586 +Inner product checksum mr3 = 37024B58 +Inner product checksum mr4 = 376AFC3F +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt index c19cd8f5f..b1f6fd6ff 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40C2C1694FA30DD0 -Inner product checksum theta = 43076DE653AEC2FE -Inner product checksum u = 4697E3FAA368DE1C -Inner product checksum mr1 = 40A1D167F8ADA142 -Inner product checksum mr2 = 40699AF5BDBC4864 -Inner product checksum mr3 = 4069A3412D88D047 -Inner product checksum mr4 = 40697EB0A557078A +Inner product checksum rho = 40AFD0F64A85F322 +Inner product checksum theta = 43076FC46F15B98E +Inner product checksum u = 4697A257F5DA33B8 +Inner product checksum mr1 = 4087B978652013B5 +Inner product checksum mr2 = 406997D34AFE58E4 +Inner product checksum mr3 = 4069A875F066DF80 +Inner product checksum mr4 = 406986D990E6CEA9 Inner product checksum mr5 = 406997D0C9B8EEFB Inner product checksum mr6 = 40699547929283AC diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt index f7e9ed399..26185b0b3 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED280BC778BD3B -Inner product checksum theta = 4012F415A1A3F24B -Inner product checksum u = 43A4936A5FD755CE +Inner product checksum rho = 3EED280BC77910C4 +Inner product checksum theta = 4012F415A1A3DFEB +Inner product checksum u = 43A4936A5FD74DF4 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt index a5449d77a..9ea9f30ef 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3F20250B300C3D30 -Inner product checksum theta = 403305E8470B6A22 -Inner product checksum u = 433053B3A41C6049 +Inner product checksum rho = 3F20225948390658 +Inner product checksum theta = 4033068A55BC3748 +Inner product checksum u = 433056118E328CBC diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt new file mode 100644 index 000000000..5dfff90ae --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3D284C78 +Inner product checksum theta = 4B087863 +Inner product checksum u = 6B447A8E +Inner product checksum mr1 = 39ADE62A +Inner product checksum mr2 = 37581360 +Inner product checksum mr3 = 37025739 +Inner product checksum mr4 = 376B0645 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..06fa02a65 --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3FA5099F6003533A +Inner product checksum theta = 41610F1B43DFDDB2 +Inner product checksum u = 45688F5EC2FBF69A +Inner product checksum mr1 = 3F35BCF98E9C5B10 +Inner product checksum mr2 = 3EEAFF88D33E0CFE +Inner product checksum mr3 = 3EE049CB63E270F4 +Inner product checksum mr4 = 3EED5E03840E2812 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt new file mode 100644 index 000000000..d1df98ac3 --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3D284AE2 +Inner product checksum theta = 4B0877EC +Inner product checksum u = 6B4479D3 +Inner product checksum mr1 = 39ADE43E +Inner product checksum mr2 = 37581886 +Inner product checksum mr3 = 37024D8F +Inner product checksum mr4 = 376ADB79 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt new file mode 100644 index 000000000..bcfb6e282 --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3FA509A35A558386 +Inner product checksum theta = 41610F1C92657C34 +Inner product checksum u = 45688F61E0CB5BE5 +Inner product checksum mr1 = 3F35BCE5306E6416 +Inner product checksum mr2 = 3EEAFF88AFF1C5F2 +Inner product checksum mr3 = 3EE049CB62F1062E +Inner product checksum mr4 = 3EED5E036CB1379F +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt new file mode 100644 index 000000000..9331aab13 --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3D284C91 +Inner product checksum theta = 4B087777 +Inner product checksum u = 6B4478FE +Inner product checksum mr1 = 39ADE81E +Inner product checksum mr2 = 375811AE +Inner product checksum mr3 = 37025154 +Inner product checksum mr4 = 376AFFAE +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt index 8839d63b9..5a152f61a 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958F09D97D52D -Inner product checksum theta = 4161FFBE7B6B7DE1 -Inner product checksum u = 456A4D0ACAB467CA -Inner product checksum mr1 = 3F3B888D5EA6A45C -Inner product checksum mr2 = 3EEB310977D9678E -Inner product checksum mr3 = 3EDFF31B705B97D8 -Inner product checksum mr4 = 3EED42824B13222B +Inner product checksum rho = 3FA509A19CBF114C +Inner product checksum theta = 41610F1BFEB0E6B6 +Inner product checksum u = 45688F5FDBD474EE +Inner product checksum mr1 = 3F35BCF304716E6C +Inner product checksum mr2 = 3EEAFF885F22B408 +Inner product checksum mr3 = 3EE049CB62D7CD5C +Inner product checksum mr4 = 3EED5E036E5CC8B3 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt new file mode 100644 index 000000000..9331aab13 --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3D284C91 +Inner product checksum theta = 4B087777 +Inner product checksum u = 6B4478FE +Inner product checksum mr1 = 39ADE81E +Inner product checksum mr2 = 375811AE +Inner product checksum mr3 = 37025154 +Inner product checksum mr4 = 376AFFAE +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt new file mode 100644 index 000000000..5a152f61a --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3FA509A19CBF114C +Inner product checksum theta = 41610F1BFEB0E6B6 +Inner product checksum u = 45688F5FDBD474EE +Inner product checksum mr1 = 3F35BCF304716E6C +Inner product checksum mr2 = 3EEAFF885F22B408 +Inner product checksum mr3 = 3EE049CB62D7CD5C +Inner product checksum mr4 = 3EED5E036E5CC8B3 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt new file mode 100644 index 000000000..b0bf5b685 --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3D284D10 +Inner product checksum theta = 4B08771E +Inner product checksum u = 6B447876 +Inner product checksum mr1 = 39ADE4E0 +Inner product checksum mr2 = 3757FB62 +Inner product checksum mr3 = 37024C1A +Inner product checksum mr4 = 376B018E +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt new file mode 100644 index 000000000..7423a529e --- /dev/null +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 3FA5099CDBEA12B4 +Inner product checksum theta = 41610F1BEE6C742F +Inner product checksum u = 45688F5FC27D3983 +Inner product checksum mr1 = 3F35BCF575283D30 +Inner product checksum mr2 = 3EEAFF88D19CC1C6 +Inner product checksum mr3 = 3EE049CB6313FA43 +Inner product checksum mr4 = 3EED5E03BABE1564 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt index 1fba69899..dc566e6c9 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40C2C1668AA536C6 -Inner product checksum theta = 43076DE652800BE2 -Inner product checksum u = 4697E3FAA2E5E0C6 -Inner product checksum mr1 = 40A1D167F834C0E0 -Inner product checksum mr2 = 40699AF5BDC7A01E -Inner product checksum mr3 = 4069A3412D91ECF2 -Inner product checksum mr4 = 40697EB0A55E4C2B +Inner product checksum rho = 40AFD0F3325D1D83 +Inner product checksum theta = 43076FC470DF7DDF +Inner product checksum u = 4697A257F73F2A4A +Inner product checksum mr1 = 4087B978405AA662 +Inner product checksum mr2 = 406997D34B3FE4CE +Inner product checksum mr3 = 4069A875F075892B +Inner product checksum mr4 = 406986D990BEDA55 Inner product checksum mr5 = 406997D0C9B8EEFC Inner product checksum mr6 = 40699547929283AD diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt index 3906107bd..f3118f740 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED280BC779365A -Inner product checksum theta = 4012F415A1A375AE -Inner product checksum u = 43A4936A5FD4C67B +Inner product checksum rho = 3EED280BC7788E7C +Inner product checksum theta = 4012F415A1A479C3 +Inner product checksum u = 43A4936A5FDBA963 diff --git a/rose-stem/site/meto/macros/macros_ex1a.cylc b/rose-stem/site/meto/macros/macros_ex1a.cylc index d7c8dc02d..be64728da 100644 --- a/rose-stem/site/meto/macros/macros_ex1a.cylc +++ b/rose-stem/site/meto/macros/macros_ex1a.cylc @@ -74,16 +74,24 @@ {% set lfric_nodes = possible_nodes %} {% endif %} + {% if site_vars["ex_trustzone"] == "collab" %} + -q=collab + {% else %} -q=normal + {% endif %} -l select={{ lfric_nodes + ocean_nodes|int + river_nodes|int + - xios_nodes|int }}:coretype={{site_vars.node_type}}:mem={{site_vars.node_mem}}GB + xios_nodes|int }}:coretype={{site_vars.node_type}}:mem={{site_vars.node_mem}}GB{{site_vars.crayhost}} {% endmacro %} {% macro shared_queue(cores) %} + {% if site_vars["ex_trustzone"] == "collab" %} + -q=collabshared + {% else %} -q=shared + {% endif %} -l ncpus={{ cores }} {% endmacro %} diff --git a/rose-stem/site/meto/suite_config.cylc b/rose-stem/site/meto/suite_config.cylc index a4a5b03d5..e909471e0 100644 --- a/rose-stem/site/meto/suite_config.cylc +++ b/rose-stem/site/meto/suite_config.cylc @@ -6,8 +6,12 @@ {% do LOG.debug("Entered site/meto/suite_config.cylc") %} [[METO_ORIG]] +{% if site_vars["ex_trustzone"] == "collab" %} + inherit = EX1A_SCRIPTS +{% else %} pre-script = "module load scitools" platform = {{ROSE_ORIG_HOST}} +{% endif %} {# Family for lfric_coupled rivers/ocean 1st step builds #} [[METO_FCM_MAKE]] diff --git a/rose-stem/site/meto/variables.cylc b/rose-stem/site/meto/variables.cylc index a9cf189f1..b3a417fd2 100644 --- a/rose-stem/site/meto/variables.cylc +++ b/rose-stem/site/meto/variables.cylc @@ -32,9 +32,24 @@ {% do site_vars.update({"site_platforms": ["ex1a", "azspice"]}) %} +{# Settings for EX Collab Zone #} +{% from "socket" import getfqdn %} +{% set hostname = getfqdn() %} +{% if "collab.sc" in hostname %} + {% do site_vars.update({"ex_trustzone": "collab"}) %} + {% do site_vars.update({"USE_TOKENS": true}) %} +{% else %} + {% do site_vars.update({"ex_trustzone": "research"}) %} +{% endif %} + +{% if site_vars["ex_trustzone"] == "collab" %} + {% do site_vars.update({"launch_platform": "ex1a"}) %} + {% do site_vars.update({"scripts_platform": "ex1a"}) %} +{% else %} + {% do site_vars.update({"launch_platform": "azspice"}) %} + {% do site_vars.update({"scripts_platform": "azspice"}) %} +{% endif %} -{% do site_vars.update({"launch_platform": "azspice"}) %} -{% do site_vars.update({"scripts_platform": "azspice"}) %} {% do site_vars.update({"coupled_fcm_make_platform": "azspice"}) %} {% do site_vars.update({"git_mirror_loc": "/data/users/gitassist/git_mirrors"}) %} @@ -42,8 +57,12 @@ {% do site_vars.update({"mesh_build": {"ex1a": "gnu_fast-debug-64bit", "azspice": "gnu_fast-debug-64bit"} }) %} +{% do site_vars.update({"remote_init_family": {"ex1a": "EX1A_REMOTE_INIT"} }) %} + {# Choose EX Host - default to random ab or cd #} -{% if USE_EXZ is defined and USE_EXZ %} +{% if site_vars["ex_trustzone"] == "collab" %} + {% do site_vars.update({"host_ex" : "ex"}) %} +{% elif USE_EXZ is defined and USE_EXZ %} {% do site_vars.update({"host_ex" : "exz"}) %} {% elif USE_EXAB is defined and USE_EXAB %} {% do site_vars.update({"host_ex": "exab"}) %} @@ -65,10 +84,12 @@ {% do site_vars.update({"node_type": "genoa"}) %} {% do site_vars.update({"node_cores": 192 }) %} {% do site_vars.update({"node_mem": 720}) %} + {% do site_vars.update({"crayhost": ":crayhost=exb"}) %} {% else %} {% do site_vars.update({"node_type": "milan"}) %} {% do site_vars.update({"node_cores": 128 }) %} {% do site_vars.update({"node_mem": 238}) %} + {% do site_vars.update({"crayhost": ""}) %} {% endif %} {% do site_vars.update({"lfricinputs_kgo_base": "$UMDIR/standard_jobs/lfricinputs/kgo"}) %} diff --git a/rose-stem/templates/runtime/generate_runtime_control.cylc b/rose-stem/templates/runtime/generate_runtime_control.cylc index e900d6d8e..00a04b699 100644 --- a/rose-stem/templates/runtime/generate_runtime_control.cylc +++ b/rose-stem/templates/runtime/generate_runtime_control.cylc @@ -24,7 +24,7 @@ ROSE_TASK_APP = extract_source DEPENDENCIES = {{dependencies}} USE_MIRRORS = {{USE_MIRRORS}} - USE_TOKENS = {{USE_TOKENS}} + USE_TOKENS = {{site_vars.get("USE_TOKENS", "false")}} {% if USE_MIRRORS %} {% if "git_mirror_loc" in site_vars %} GIT_MIRROR_LOC = {{site_vars.git_mirror_loc}} @@ -100,8 +100,14 @@ {% set platform = task.split('_')[1] %} + {% if "remote_init_family" in site_vars and platform in site_vars["remote_init_family"] %} + {% set remote_inherit = "EXPORT-SOURCE, "~site_vars["remote_init_family"][platform]~", CONTROL_TASK_RETRIES" %} + {% else %} + {% set remote_inherit = "EXPORT-SOURCE, "~platform|upper~"_BASE, CONTROL_TASK_RETRIES" %} + {% endif %} + [[{{task}}]] - inherit = EXPORT-SOURCE, {{platform|upper}}_BASE, CONTROL_TASK_RETRIES + inherit = {{remote_inherit}} script = true execution time limit = PT1M diff --git a/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch b/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch index a2dd2540b..ad1aa671a 100644 --- a/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch +++ b/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch @@ -27,3 +27,21 @@ contains subroutine adj_dg_matrix_vector_code_r_single(cell, nlayers, lhs, x, ncell_3d, matrix, ndf1, undf1, map1, ndf2, undf2, map2) +@@ -56,7 +56,7 @@ + do df1 = ndf1, 1, -1 + i1 = map1(df1) + do idx = i1 + nl, i1, -1 +- lhs(idx) = 0.0 ++ lhs(idx) = 0.0_r_single + enddo + enddo + +@@ -97,7 +97,7 @@ + do df1 = ndf1, 1, -1 + i1 = map1(df1) + do idx = i1 + nl, i1, -1 +- lhs(idx) = 0.0 ++ lhs(idx) = 0.0_r_double + enddo + enddo + diff --git a/science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch b/science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch new file mode 100644 index 000000000..413969025 --- /dev/null +++ b/science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch @@ -0,0 +1,11 @@ +@@ -38,9 +38,7 @@ + real(kind=r_tran) :: direction + real(kind=r_tran), dimension(nfaces) :: v_dot_n + +- v_dot_n(:) = 1.0_r_tran +- v_dot_n(1) = -1.00000000000000 +- v_dot_n(nfaces) = -1.00000000000000 ++ v_dot_n = (/ -1.0_r_tran, 1.0_r_tran, 1.0_r_tran, -1.0_r_tran /) + do df = nfaces, 1, -1 + do k = nlayers - 1, 0, -1 + direction = v_dot_n(df) * wind(k + map_w2(df)) diff --git a/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch b/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch index 8a7e31915..766fa6892 100644 --- a/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch +++ b/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch @@ -34,7 +34,78 @@ contains subroutine adj_combine_multidata_field_code_r_single(nlayers, field_out, n, field1_in, n1, field2_in, n2, ndata_first, ndf, & -@@ -133,4 +133,4 @@ +@@ -49,15 +49,15 @@ + + if (ndata_first) then + do k = nlayers - 1, 0, -1 +- ij = k * n + map(1) + ij = k * n + n1 + map(1) + do df = n2 - 1, 0, -1 + field2_in(map_2(1) + k * n2 + df) = field2_in(map_2(1) + k * n2 + df) + field_out(ij + df) +- field_out(ij + df) = 0.0 ++ field_out(ij + df) = 0.0_r_single + enddo ++ ij = k * n + map(1) + do df = n1 - 1, 0, -1 + field1_in(map_1(1) + k * n1 + df) = field1_in(map_1(1) + k * n1 + df) + field_out(ij + df) +- field_out(ij + df) = 0.0 ++ field_out(ij + df) = 0.0_r_single + enddo + enddo + else +@@ -65,14 +65,14 @@ + ij = df * nlayers + n1 * nlayers - nlayers + map(1) + do k = nlayers - 1, 0, -1 + field2_in(map_2(1) + (df - 1) * nlayers + k) = field2_in(map_2(1) + (df - 1) * nlayers + k) + field_out(ij + k) +- field_out(ij + k) = 0.0 ++ field_out(ij + k) = 0.0_r_single + enddo + enddo + do df = n1, 1, -1 + ij = df * nlayers - nlayers + map(1) + do k = nlayers - 1, 0, -1 + field1_in(map_1(1) + (df - 1) * nlayers + k) = field1_in(map_1(1) + (df - 1) * nlayers + k) + field_out(ij + k) +- field_out(ij + k) = 0.0 ++ field_out(ij + k) = 0.0_r_single + enddo + enddo + end if +@@ -103,15 +103,15 @@ + + if (ndata_first) then + do k = nlayers - 1, 0, -1 +- ij = k * n + map(1) + ij = k * n + n1 + map(1) + do df = n2 - 1, 0, -1 + field2_in(map_2(1) + k * n2 + df) = field2_in(map_2(1) + k * n2 + df) + field_out(ij + df) +- field_out(ij + df) = 0.0 ++ field_out(ij + df) = 0.0_r_double + enddo ++ ij = k * n + map(1) + do df = n1 - 1, 0, -1 + field1_in(map_1(1) + k * n1 + df) = field1_in(map_1(1) + k * n1 + df) + field_out(ij + df) +- field_out(ij + df) = 0.0 ++ field_out(ij + df) = 0.0_r_double + enddo + enddo + else +@@ -119,18 +119,18 @@ + ij = df * nlayers + n1 * nlayers - nlayers + map(1) + do k = nlayers - 1, 0, -1 + field2_in(map_2(1) + (df - 1) * nlayers + k) = field2_in(map_2(1) + (df - 1) * nlayers + k) + field_out(ij + k) +- field_out(ij + k) = 0.0 ++ field_out(ij + k) = 0.0_r_double + enddo + enddo + do df = n1, 1, -1 + ij = df * nlayers - nlayers + map(1) + do k = nlayers - 1, 0, -1 + field1_in(map_1(1) + (df - 1) * nlayers + k) = field1_in(map_1(1) + (df - 1) * nlayers + k) + field_out(ij + k) +- field_out(ij + k) = 0.0 ++ field_out(ij + k) = 0.0_r_double + enddo + enddo + end if end subroutine adj_combine_multidata_field_code_r_double diff --git a/science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch b/science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch new file mode 100644 index 000000000..350fd6032 --- /dev/null +++ b/science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch @@ -0,0 +1,42 @@ +@@ -45,12 +45,7 @@ + integer(kind=i_def) :: offset + real(kind=r_tran) :: w + real(kind=r_tran) :: dtdz +- real(kind=r_tran) :: t_u +- real(kind=r_tran) :: t_d + +- dtdz = 0.0_r_tran +- t_u = 0.0_r_tran +- t_d = 0.0_r_tran + if (ndf_w2 == 2) then + df = 1 + offset = 0 +@@ -61,23 +56,16 @@ + do k = nlayers - 1, 0, -1 + w = 0.5 * wind(k + map_w2(df)) + 0.5 * wind(k + map_w2(df) + 1) + ik = cell * nlayers + k - nlayers + 1 +- dtdz = dtdz + advective_increment(map_w3(1) + k) * w * REAL(m3_inv(ik,1,1), r_tran) +- t_d = t_d + (-dtdz) +- t_u = t_u + dtdz +- dtdz = 0.0 ++ dtdz = advective_increment(map_w3(1) + k) * w * REAL(m3_inv(ik,1,1), r_tran) + if (w <= 0.0_r_tran .AND. k < nlayers - 1) then +- tracer(map_md(1) + offset + k + 1) = tracer(map_md(1) + offset + k + 1) + t_u +- t_u = 0.0 ++ tracer(map_md(1) + offset + k + 1) = tracer(map_md(1) + offset + k + 1) + dtdz + else +- tracer(map_md(1) + offset + nlayers + k) = tracer(map_md(1) + offset + nlayers + k) + t_u +- t_u = 0.0 ++ tracer(map_md(1) + offset + nlayers + k) = tracer(map_md(1) + offset + nlayers + k) + dtdz + end if + if (w > 0.0_r_tran .AND. k > 0) then +- tracer(map_md(1) + offset + nlayers + k - 1) = tracer(map_md(1) + offset + nlayers + k - 1) + t_d +- t_d = 0.0 ++ tracer(map_md(1) + offset + nlayers + k - 1) = tracer(map_md(1) + offset + nlayers + k - 1) - dtdz + else +- tracer(map_md(1) + offset + k) = tracer(map_md(1) + offset + k) + t_d +- t_d = 0.0 ++ tracer(map_md(1) + offset + k) = tracer(map_md(1) + offset + k) - dtdz + end if + enddo + diff --git a/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch b/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch index 9e6a07c05..aa04ceb40 100644 --- a/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch @@ -8,7 +8,7 @@ - type, public, extends(kernel_type) :: adj_horizontal_mass_flux_kernel_type + type, public, extends(kernel_type) :: atl_horizontal_mass_flux_kernel_type type(ARG_TYPE) :: META_ARGS(4) = (/ & - arg_type(gh_field, gh_real, gh_inc, any_w2), & + arg_type(gh_field, gh_real, gh_read, any_w2), & arg_type(gh_field, gh_real, gh_read, any_w2), & @@ -11,15 +11,15 @@ arg_type(gh_field, gh_real, gh_read, any_discontinuous_space_1)/) @@ -30,7 +30,18 @@ &undf_md, map_md) integer(kind=i_def), parameter :: nfaces = 4 integer(kind=i_def), intent(in) :: nlayers -@@ -53,6 +53,6 @@ +@@ -39,9 +39,7 @@ + real(kind=r_def) :: direction + real(kind=r_def), dimension(nfaces) :: v_dot_n + +- v_dot_n(:) = 1.0_r_def +- v_dot_n(1) = -1.00000000000000 +- v_dot_n(nfaces) = -1.00000000000000 ++ v_dot_n = (/ -1.0_r_def, 1.0_r_def, 1.0_r_def, -1.0_r_def /) + do df = nfaces, 1, -1 + do k = nlayers - 1, 0, -1 + direction = ls_wind(k + map_w2(df)) * v_dot_n(df) +@@ -52,6 +50,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch b/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch index 5f4d873e9..7cd2087cd 100644 --- a/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch @@ -32,8 +32,23 @@ &undf_w3, map_w3, ndf_md, undf_md, map_md, ndf_w2, undf_w2, map_w2) integer(kind=i_def), intent(in) :: nlayers integer(kind=i_def), intent(in) :: cell -@@ -79,6 +79,6 @@ - w = 0.0 +@@ -51,7 +51,6 @@ + real(kind=r_def) :: t_u + real(kind=r_def) :: t_d + +- w = 0.0_r_def + if (ndf_w2 == 2) then + df = 1 + offset = 0 +@@ -73,12 +72,11 @@ + end if + dtdz = -t_d + t_u + ik = cell * nlayers + k - nlayers + 1 +- w = w + dtdz * advective_increment(map_w3(1) + k) * m3_inv(ik,1,1) ++ w = dtdz * advective_increment(map_w3(1) + k) * m3_inv(ik,1,1) + wind(k + map_w2(df)) = wind(k + map_w2(df)) + 0.5 * w + wind(k + map_w2(df) + 1) = wind(k + map_w2(df) + 1) + 0.5 * w +- w = 0.0 enddo - end subroutine adj_w3v_advective_update_code diff --git a/science/adjoint/rose-meta/lfric-adjoint/versions.py b/science/adjoint/rose-meta/lfric-adjoint/versions.py index 8418438c1..2d3f6a52e 100644 --- a/science/adjoint/rose-meta/lfric-adjoint/versions.py +++ b/science/adjoint/rose-meta/lfric-adjoint/versions.py @@ -126,3 +126,123 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + + return config, self.reports diff --git a/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 b/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 new file mode 100644 index 000000000..148ce790f --- /dev/null +++ b/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 @@ -0,0 +1,141 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief (Adjoint of) given TL state(igh_u) compute TLM boundary layer increment u_bl_inc +module atl_bdy_lyr_alg_mod + + use constants_mod, only: r_def + use field_collection_mod, only: field_collection_type + use integer_field_mod, only: integer_field_type + use driver_modeldb_mod, only: modeldb_type + use sci_geometric_constants_mod, only: get_height_fe, & + get_face_selector_ew, & + get_face_selector_ns + use sci_fem_constants_mod, only: get_rmultiplicity_fe + use field_mod, only: field_type + use linear_physics_config_mod, only: log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m + use derived_config_mod, only: bundle_size + use field_indices_mod, only: igh_d + use timing_mod, only: start_timing, stop_timing, tik, LPROF + use mesh_mod, only: mesh_type + use fs_continuity_mod, only: W2, W3, Wtheta + use tl_compute_qe_kernel_mod, only: tl_compute_qe_kernel_type + use tl_compute_aubu_kernel_mod, only: tl_compute_aubu_kernel_type + use atl_bl_inc_kernel_mod, only: atl_bl_inc_kernel_type + + implicit none + + private + public :: atl_bdy_lyr_alg + +contains + +!> @brief (Adjoint of) given TL state(igh_u) compute TLM boundary layer increment u_bl_inc +!> @details The stages are: +!> 1. Call tl_compute_qe_kernel_type: from LS, compute coefficients Q, E +!> 2. Call tl_compute_aubu_kernel_type: from Q,E, compute coefficients Auv, Buv_inv +!> 3. Call atl_bl_inc_kernel_type: (adjoint of) from state(igh_u) use coefficients Auv, Buv_inv to compute u_bl_inc +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!> The original code is at https://wwwspice/~frva/VAR/view/var-2022.12.2/doc/PF_bdy_lyr.html +!> @param[in,out] modeldb Structure containing the model state +!> @param[in,out] u_bl_inc TLM boundary layer increment +!> @param[in,out] u The current TL model prognostic u field, state(igh_u) +!> @param[in] ls_state Lin state for Prognostic model state +!> @param[in] dt The TL model timestep length +subroutine atl_bdy_lyr_alg(modeldb, u_bl_inc, u, ls_state, dt) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(field_type), intent(inout) :: u_bl_inc + type(field_type), intent(inout) :: u + type(field_type), target, intent(in) :: ls_state(bundle_size) + real(kind=r_def), intent(in) :: dt + + type(mesh_type), pointer :: mesh + type(field_type), pointer :: height_w2 + type(field_type), pointer :: height_w3 + type(field_type), pointer :: height_wth + type(field_type), pointer :: w2_rmultiplicity + type(integer_field_type), pointer :: face_selector_ew + type(integer_field_type), pointer :: face_selector_ns + + type(field_collection_type), pointer :: ls_fields + type(field_type), pointer :: ls_land_fraction + + ! Coefficients computed from linearisation state + type(field_type) :: Q + type(field_type) :: E + type(field_type) :: auv + type(field_type) :: buv_inv + + integer(kind=tik) :: id + + if (LPROF) call start_timing(id, 'atl_bdy_lyr_alg') + + ls_fields => modeldb%fields%get_field_collection('ls_fields') + call ls_fields%get_field('ls_land_fraction', ls_land_fraction) + + mesh => u%get_mesh() + height_w2 => get_height_fe(W2, mesh%get_id()) + height_w3 => get_height_fe(W3, mesh%get_id()) + height_wth => get_height_fe(Wtheta, mesh%get_id()) + + w2_rmultiplicity => get_rmultiplicity_fe(W2, mesh%get_id()) + + face_selector_ew => get_face_selector_ew(mesh%get_id()) + face_selector_ns => get_face_selector_ns(mesh%get_id()) + + call ls_state(igh_d)%copy_field_properties(Q) + call ls_state(igh_d)%copy_field_properties(E) + + call u%copy_field_properties(auv) + call u%copy_field_properties(buv_inv) + + call invoke(tl_compute_qe_kernel_type(Q, & + E, & + ls_state(igh_d), & + height_w3, & + height_wth, & + ls_land_fraction, & + log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m)) + + call invoke(tl_compute_aubu_kernel_type(auv, & + buv_inv, & + Q, & + E, & + height_w2, & + w2_rmultiplicity, & + dt, & + Blevs_m)) + + call invoke(atl_bl_inc_kernel_type(u_bl_inc, & + u, & + auv, & + buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m)) + + if (LPROF) call stop_timing(id, 'atl_bdy_lyr_alg') + +end subroutine atl_bdy_lyr_alg + +end module atl_bdy_lyr_alg_mod diff --git a/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 b/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 new file mode 100644 index 000000000..5f93c8940 --- /dev/null +++ b/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 @@ -0,0 +1,148 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Wrapper for adjoint physics code +module atl_physics_alg_mod + + use constants_mod, only: r_def + use driver_modeldb_mod, only: modeldb_type + use field_mod, only: field_type + use derived_config_mod, only: bundle_size + use field_indices_mod, only: igh_u + use timing_mod, only: start_timing, stop_timing, tik, LPROF + use mesh_mod, only: mesh_type + use fs_continuity_mod, only: W2 + use sci_geometric_constants_mod, only: get_da_at_w2 + use sci_fem_constants_mod, only: get_mass_matrix_fe + use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type + use adj_matrix_vector_kernel_mod, only: adj_matrix_vector_kernel_type + use atl_bdy_lyr_alg_mod, only: atl_bdy_lyr_alg + use sci_mass_matrix_solver_alg_mod, only: mass_matrix_solver_alg + use sci_field_bundle_builtins_mod, only: clone_bundle, copy_bundle, set_bundle_scalar + use operator_mod, only: operator_type + + implicit none + + private + public :: atl_physics_alg + +contains + +!> @brief Wrapper for adjoint physics code, currently just atl_bdy_lyr_alg +!> @param[in,out] modeldb Structure containing the model state +!> @param[in,out] u The TL model u field to be incremented +!> @param[in,out] state_star TL model prognostic fields for physics calculations +!> @param[in,out] rhs_phys Residuals +!> @param[in] state The current TL model prognostic fields +!> @param[in] rhs_n Residuals +!> @param[in] rhs_np1 Residuals +!> @param[in] rhs_adv Advective terms +!> @param[in] ls_state Lin state for Prognostic model state +!> @param[in] mesh The current mesh +!> @param[in] dt The TL model timestep length +subroutine atl_physics_alg(modeldb, & + u, & + state_star, & + rhs_phys, & + rhs_np1, & + rhs_n, & + state, & + rhs_adv, & + ls_state, & + mesh, & + dt) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(field_type), intent(inout) :: u + type(field_type), intent(inout) :: state_star(bundle_size) + type(field_type), intent(inout) :: rhs_phys(bundle_size) + type(field_type), intent(in) :: state(bundle_size) + type(field_type), intent(in) :: rhs_n(bundle_size) + type(field_type), intent(in) :: rhs_np1(bundle_size) + type(field_type), intent(in) :: rhs_adv(bundle_size) + type(field_type), intent(in) :: ls_state(bundle_size) + type(mesh_type), pointer, intent(in) :: mesh + real(kind=r_def), intent(in) :: dt + + type(field_type) :: u_bl_inc + type(field_type) :: u_bl_inc_flux + type(field_type) :: du + type(field_type) :: u_star + type(field_type) :: u_star_physical + type(field_type) :: rhsu_np1 + + type(operator_type), pointer :: mm_vel + type(field_type), pointer :: dA + + integer(kind=tik) :: id + + if (LPROF) call start_timing(id, 'atl_physics_alg') + + mm_vel => get_mass_matrix_fe(W2, mesh%get_id()) + + call u%copy_field_properties( u_bl_inc ) + call u%copy_field_properties( u_bl_inc_flux ) + call u%copy_field_properties( du ) + call u%copy_field_properties( u_star ) + call u%copy_field_properties( u_star_physical ) + call rhs_adv(igh_u)%copy_field_properties( rhsu_np1 ) + + call du%initialise( rhs_adv(igh_u)%get_function_space() ) + call rhsu_np1%initialise( rhs_adv(igh_u)%get_function_space() ) + + call clone_bundle( state, state_star, bundle_size ) + call copy_bundle( state, state_star, bundle_size ) ! Only state_star(igh_u) is used + call set_bundle_scalar( 0.0_r_def, state_star, bundle_size ) + + dA => get_da_at_w2(mesh%get_id()) + + call invoke( setval_c( u_bl_inc_flux, 0.0_r_def ), & + setval_c( u_bl_inc, 0.0_r_def ), & + setval_c( u_star, 0.0_r_def ), & + setval_c( u_star_physical, 0.0_r_def ), & + setval_c( du, 0.0_r_def ), & + setval_c( rhsu_np1, 0.0_r_def ) ) + + call invoke( enforce_bc_kernel_type( rhs_phys(igh_u) ), & + adj_matrix_vector_kernel_type( rhs_phys(igh_u), u_bl_inc_flux, mm_vel ) ) + + call set_bundle_scalar( 0.0_r_def, rhs_phys, bundle_size ) + + ! Adj of u_bl_inc_flux = u_bl_inc * dA + call invoke( inc_x_times_y( u_bl_inc_flux, dA ), & + inc_x_plus_y( u_bl_inc, u_bl_inc_flux ) ) + + call atl_bdy_lyr_alg( modeldb, u_bl_inc, state_star(igh_u), & + ls_state, dt ) + + ! Adj of state_star(igh_u) <- u_star_physical + call invoke( inc_x_plus_y( u_star_physical, state_star(igh_u) ), & + setval_c( state_star(igh_u), 0.0_r_def ) ) + + ! Adj of u_star_physical = u_star / dA + call invoke( inc_x_divideby_y( u_star_physical, dA ), & + inc_x_plus_y( u_star, u_star_physical ) ) + + ! Adj of u_star = du + state(igh_u) + call invoke( inc_X_plus_Y( du, u_star ), & + inc_X_plus_Y( state(igh_u), u_star ) ) + + ! Adj of call mass_matrix_solver_alg(du, rhsu_np1) + call mass_matrix_solver_alg( rhsu_np1, du ) + + ! Adj of inc_X_plus_Y(rhsu_np1, rhs_adv(igh_u)) + call invoke( inc_X_plus_Y( rhs_adv(igh_u), rhsu_np1 ) ) + + ! Adj of rhsu_np1 <- -rhs_np1(igh_u) + rhs_n(igh_u) + call invoke( inc_X_plus_bY( rhs_np1(igh_u), -1.0_r_def, rhsu_np1 ), & + inc_X_plus_Y( rhs_n(igh_u), rhsu_np1 ) ) + + if (LPROF) call stop_timing(id, 'atl_physics_alg') + +end subroutine atl_physics_alg + +end module atl_physics_alg_mod diff --git a/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 b/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 index db401b908..81a16804c 100644 --- a/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 @@ -47,9 +47,7 @@ module adj_lookup_table_mod procedure, public :: get_nsets_max procedure, public :: get_nindices procedure, public :: get_ndata - procedure, public :: adj_lookup_table_assign procedure, public :: finalise => adj_lookup_table_finaliser - generic, public :: assignment(=) => adj_lookup_table_assign end type adj_lookup_table_type contains @@ -233,26 +231,6 @@ module adj_lookup_table_mod end function get_ndata - !============================================================================= - !> @brief Assignment operator. - !> @details Implemented to avoid pointer aliasing preventing compiler optimisations. - subroutine adj_lookup_table_assign(dest, source) - - implicit none - - class(adj_lookup_table_type), intent(in) :: source - class(adj_lookup_table_type), intent(out) :: dest - - call source%lookup_field%copy_field_properties(dest%lookup_field) - call source%set_count_field%copy_field_properties(dest%set_count_field) - call invoke( int_setval_X(dest%lookup_field, source%lookup_field), & - int_setval_X(dest%set_count_field, source%set_count_field) ) - dest%nsets_max = source%nsets_max - dest%nindices = source%nindices - dest%ndata = source%ndata - - end subroutine adj_lookup_table_assign - !============================================================================= !> @brief Destructor. !> @param [in,out] self Lookup table diff --git a/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 b/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 index dc52a9740..e0aa2d9fa 100644 --- a/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 @@ -34,9 +34,7 @@ module adj_solver_lookup_cache_mod procedure, public :: initialise => adj_solver_lookup_cache_init procedure, public :: get_lookup_apply_hho - procedure, public :: adj_solver_lookup_cache_assign procedure, public :: finalise => adj_solver_lookup_cache_final - generic, public :: assignment(=) => adj_solver_lookup_cache_assign end type adj_solver_lookup_cache_type @@ -66,7 +64,7 @@ module adj_solver_lookup_cache_mod ! Arguments class(adj_solver_lookup_cache_type), intent(inout) :: self - type(mesh_type), pointer, intent(in) :: mesh + type(mesh_type), pointer, intent(in) :: mesh ! Internal variables type(function_space_type), pointer :: vector_space_w3_ptr @@ -87,18 +85,19 @@ module adj_solver_lookup_cache_mod else self%multigrid_levels=1 end if - allocate(self%lookup_apply_hho(self%multigrid_levels)) + ! Extra level needed for coarse operator + allocate(self%lookup_apply_hho(self%multigrid_levels + 1)) if (l_multigrid) then call multigrid_function_space_chain%set_current(vector_space_w3_ptr%get_id()) end if - do level = 1, self%multigrid_levels + do level = 1, self%multigrid_levels + 1 call vector_x%initialise(vector_space_w3_ptr) call invoke(setval_c(vector_x, 0.0_r_solver)) call create_lookup_apply_helmholtz_op(self%lookup_apply_hho(level), & vector_x) - if(l_multigrid) then + if((l_multigrid) .and. (level < self%multigrid_levels)) then vector_space_w3_ptr => multigrid_function_space_chain%get_next() end if end do @@ -122,41 +121,22 @@ module adj_solver_lookup_cache_mod ! Arguments class(adj_solver_lookup_cache_type), target, intent(in) :: self - integer(kind=i_def), intent(in) :: level + integer(kind=i_def), intent(in) :: level ! Returns - type(adj_lookup_table_type), pointer :: lookup_ptr + type(adj_lookup_table_type), pointer :: lookup_ptr if (.not. self%is_initialised) call log_event("Cannot get lookup: cache is not initialised", LOG_LEVEL_ERROR) + if ((level < 1) .and. (level > self%multigrid_levels + 1)) then + write(log_scratch_space,*) "get_lookup_apply_hho: Requested level must be between 1 and ", & + self%multigrid_levels + 1, "but level = ", level + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end if nullify(lookup_ptr) lookup_ptr => self%lookup_apply_hho(level) end function get_lookup_apply_hho - !============================================================================= - !> @brief Assignment operator. - !> @details Implemented to avoid pointer aliasing preventing compiler optimisations. - subroutine adj_solver_lookup_cache_assign(dest, source) - - implicit none - - class(adj_solver_lookup_cache_type), intent(in) :: source - class(adj_solver_lookup_cache_type), intent(out) :: dest - - ! Internal variables - integer(kind=i_def) :: level - - if (.not. source%is_initialised) call log_event("Source cache in copy assignment is not initialised", LOG_LEVEL_ERROR) - - dest%multigrid_levels = source%multigrid_levels - allocate(dest%lookup_apply_hho(dest%multigrid_levels)) - do level = 1_i_def, source%multigrid_levels - dest%lookup_apply_hho(level) = source%lookup_apply_hho(level) - end do - dest%is_initialised = .true._l_def - - end subroutine adj_solver_lookup_cache_assign - !============================================================================= !> @brief Destructor. !> @param [in,out] self Lookup table cache @@ -171,7 +151,7 @@ module adj_solver_lookup_cache_mod integer(kind=i_def) :: level if (self%is_initialised) then - do level = 1, self%multigrid_levels + do level = 1, self%multigrid_levels + 1 call self%lookup_apply_hho(level)%finalise() end do if (allocated(self%lookup_apply_hho)) deallocate(self%lookup_apply_hho) diff --git a/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 b/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 index 4b5687b78..292671ca9 100644 --- a/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 @@ -9,7 +9,8 @@ module adj_trans_lookup_cache_mod use adj_lookup_table_mod, only: adj_lookup_table_type use constants_mod, only: i_def, l_def - use fs_continuity_mod, only: W3, Wtheta + use fs_continuity_mod, only: W3, Wtheta, & + W2, W2H use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_ERROR @@ -33,11 +34,15 @@ module adj_trans_lookup_cache_mod type(adj_lookup_table_type) :: lookup_poly_adv_upd !> Lookup table for adj_w3h_advective_update_kernel. - type(adj_lookup_table_type) :: lookup_w3h_adv_upd + !> First index is on W2, second on W2H. + type(adj_lookup_table_type), allocatable, dimension(:) :: lookup_w3h_adv_upd !> Number of function spaces for lookup_poly2d. integer(kind=i_def) :: n_fs_poly2d + !> Number of function spaces for lookup_w3h_adv_upd. + integer(kind=i_def) :: n_fs_w3h_adv_upd + !> Flag to state whether or not cache is initialised logical(kind=l_def) :: is_initialised = .false._l_def @@ -67,7 +72,6 @@ module adj_trans_lookup_cache_mod use constants_mod, only: r_tran use finite_element_config_mod, only: element_order_h, & element_order_v - use fs_continuity_mod, only: W2, W2H use function_space_mod, only: function_space_type use function_space_collection_mod, only: function_space_collection use mesh_mod, only: mesh_type @@ -225,32 +229,42 @@ module adj_trans_lookup_cache_mod ! ========================================================================= ! Creating lookup_w3h_adv_upd ! ========================================================================= + self%n_fs_w3h_adv_upd = 2_i_def + allocate(self%lookup_w3h_adv_upd(self%n_fs_w3h_adv_upd)) m3_inv => get_inverse_mass_matrix_fe(W3, mesh_id) ndata = 6_i_def - vector_space_w3_md_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. & - ) - vector_space_w3_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3 & - ) - vector_space_w2_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W2 & - ) + do fspace_iterator = 1_i_def, self%n_fs_w3h_adv_upd + if (fspace_iterator == 1_i_def) then + fspace_enum = W2 + else + fspace_enum = W2H + end if - call advective%initialise(vector_space=vector_space_w3_ptr, name='advective') - call tracer%initialise(vector_space=vector_space_w3_md_ptr, name='tracer') - call wind%initialise(vector_space=vector_space_w2_ptr, name='wind') + vector_space_w3_md_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. & + ) + vector_space_w3_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3 & + ) + vector_space_fs_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, fspace_enum & + ) - call invoke(setval_c(advective, 0.0_r_tran), & - setval_c(tracer, 0.0_r_tran), & - setval_c(wind, 0.0_r_tran)) - call create_lookup_w3h_adv_upd(self%lookup_w3h_adv_upd, & - advective, & - tracer, & - wind, & - m3_inv, & - stencil_extent) + call advective%initialise(vector_space=vector_space_w3_ptr, name='advective') + call tracer%initialise(vector_space=vector_space_w3_md_ptr, name='tracer') + call wind%initialise(vector_space=vector_space_fs_ptr, name='wind') + + call invoke(setval_c(advective, 0.0_r_tran), & + setval_c(tracer, 0.0_r_tran), & + setval_c(wind, 0.0_r_tran)) + call create_lookup_w3h_adv_upd(self%lookup_w3h_adv_upd(fspace_iterator), & + advective, & + tracer, & + wind, & + m3_inv, & + stencil_extent) + end do self%is_initialised = .true._l_def @@ -338,20 +352,35 @@ module adj_trans_lookup_cache_mod !============================================================================= !> @brief Return a pointer to the w3h_adv_upd lookup table. !> @param [in] self Lookup table cache + !> @param [in] fspace_enum Function space enumerator !> @return lookup_ptr The lookup table - function get_lookup_w3h_adv_upd(self) result(lookup_ptr) + function get_lookup_w3h_adv_upd(self, fspace_enum) result(lookup_ptr) implicit none ! Arguments class(adj_trans_lookup_cache_type), target, intent(in) :: self + integer(kind=i_def), intent(in) :: fspace_enum + + ! Internal variables + integer(kind=i_def) :: fspace_index ! Returns type(adj_lookup_table_type), pointer :: lookup_ptr if (.not. self%is_initialised) call log_event("Cannot get lookup: cache is not initialised", LOG_LEVEL_ERROR) nullify(lookup_ptr) - lookup_ptr => self%lookup_w3h_adv_upd + fspace_index = 0_i_def + select case(fspace_enum) + case (W2) + fspace_index = 1_i_def + case (W2H) + fspace_index = 2_i_def + case default + write(log_scratch_space, *) "Invalid functionspace chosen for get_lookup_w3h_adv_upd, must be W2 or W2H" + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end select + lookup_ptr => self%lookup_w3h_adv_upd(fspace_index) end function get_lookup_w3h_adv_upd @@ -374,8 +403,11 @@ module adj_trans_lookup_cache_mod call self%lookup_poly2d(fspace_index)%finalise() end do call self%lookup_poly_adv_upd%finalise() - call self%lookup_w3h_adv_upd%finalise() + do fspace_index = 1_i_def, self%n_fs_w3h_adv_upd + call self%lookup_w3h_adv_upd(fspace_index)%finalise() + end do if (allocated(self%lookup_poly2d)) deallocate(self%lookup_poly2d) + if (allocated(self%lookup_w3h_adv_upd)) deallocate(self%lookup_w3h_adv_upd) end if end subroutine adj_trans_lookup_cache_final diff --git a/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 b/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 index 77d04efbf..6fae39423 100644 --- a/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 +++ b/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 @@ -19,7 +19,7 @@ module adj_pressure_operator_alg_mod use base_mesh_config_mod, only: topology, topology_non_periodic use invoke_adj_a_h_o_lookup_kernel_mod, only: invoke_adj_a_h_o_lookup_kernel - use adj_lookup_table_generators_alg_mod, only: create_lookup_apply_helmholtz_op + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type @@ -35,7 +35,8 @@ module adj_pressure_operator_alg_mod type, public, extends(abstract_hierarchical_linear_operator_type) :: adj_pressure_operator_type private - integer(kind=i_def) :: level + integer(kind=i_def) :: level + type(adj_solver_lookup_cache_type), pointer :: adj_lookup_table_cache_ptr contains procedure, public :: apply => apply_adj_pressure_operator procedure, private :: apply_adj_pressure_operator @@ -53,18 +54,21 @@ module adj_pressure_operator_alg_mod contains !> @brief Construct new instance of type. - !> @param[in] level The mesh level the space is on - function adj_pressure_operator_constructor(level) result(self) + !> @param[in] level The mesh level the space is on + !> @param[in] adj_lookup_table_cache The lookup table cache + function adj_pressure_operator_constructor(level, adj_lookup_table_cache) result(self) implicit none - integer(kind=i_def), intent(in) :: level - type(adj_pressure_operator_type) :: self + integer(kind=i_def), intent(in) :: level + type(adj_solver_lookup_cache_type), target, intent(in) :: adj_lookup_table_cache + type(adj_pressure_operator_type) :: self call log_event( 'Constructing adjoint pressure_operator...', LOG_LEVEL_DEBUG ) ! Temporaries required in operator application self%level = level + self%adj_lookup_table_cache_ptr => adj_lookup_table_cache call log_event( 'done', LOG_LEVEL_DEBUG ) @@ -82,6 +86,7 @@ contains ! Deep copy of the contents of the adj_pressure_operator_type dest%level = source%level + dest%adj_lookup_table_cache_ptr => source%adj_lookup_table_cache_ptr end subroutine adj_pressure_operator_assign @@ -105,10 +110,10 @@ contains logical(kind=l_def) :: lam_mesh ! Lookup table - type(adj_lookup_table_type) :: lookup - type(integer_field_type), pointer :: lookup_field - type(integer_field_type), pointer :: set_counts_field - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup + type(integer_field_type), pointer :: lookup_field + type(integer_field_type), pointer :: set_counts_field + integer(kind=i_def) :: nindices integer(tik) :: id @@ -140,8 +145,7 @@ contains setval_c( y_vec, 0.0_r_solver ) ) ! Run adj_apply_helmholtz_operator kernel. - ! Generate adjoint lookup table for stencil operation. Dry run of the TL code, horizontal only. - call create_lookup_apply_helmholtz_op( lookup, x_vec ) + lookup => self%adj_lookup_table_cache_ptr%get_lookup_apply_hho(self%level) lookup_field => lookup%get_lookup_field() set_counts_field => lookup%get_set_count_field() nindices = lookup%get_nindices() @@ -182,7 +186,7 @@ contains class(abstract_hierarchical_linear_operator_type), allocatable, intent(inout) :: coarse_operator allocate( coarse_operator, & - source = adj_pressure_operator_type(self%level + 1) ) + source = adj_pressure_operator_type(self%level + 1, self%adj_lookup_table_cache_ptr) ) end subroutine coarsen_adj_pressure_operator diff --git a/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 b/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 index 93c56ed77..3a1f0ee48 100644 --- a/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 +++ b/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 @@ -25,6 +25,7 @@ module adj_semi_implicit_solver_alg_mod use adj_pressure_precon_alg_mod, only: adj_pressure_preconditioner_type use multigrid_preconditioner_alg_mod, only: multigrid_preconditioner_type use pressure_operator_alg_mod, only: pressure_operator_type + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use adj_pressure_operator_alg_mod, only: adj_pressure_operator_type use sci_null_preconditioner_alg_mod, only: null_preconditioner_type use sci_preconditioner_mod, only: abstract_preconditioner_type @@ -89,9 +90,11 @@ contains !> @details Called by init method of this module, but also by !! adjt_mixed_schur_preconditioner_alg_mod and adjt_mixed_solver_alg_mod !> @param[in] state Prognostic state for the adjoint pressure preconditioner + !> @param[in] adj_lookup_table_cache The lookup table cache !> @param[out] adj_pressure_operator_out Output adjoint (Helmholtz) pressure operator !> @param[out] adj_pressure_preconditioner_out Output adjoint (Helmholtz) pressure preconditioner - subroutine create_adj_pressure_preconditioner( state, adj_pressure_operator_out, adj_pressure_preconditioner_out ) + subroutine create_adj_pressure_preconditioner( state, adj_lookup_table_cache, & + adj_pressure_operator_out, adj_pressure_preconditioner_out ) use helmholtz_solver_config_mod, only: helmholtz_preconditioner => preconditioner, & preconditioner_none, & @@ -102,6 +105,7 @@ contains ! Prognostic fields type(field_type), dimension(bundle_size), intent(in) :: state + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Output adjoint operator and preconditioner for (Helmholtz) pressure problem type(adj_pressure_operator_type), intent(out) :: adj_pressure_operator_out @@ -110,7 +114,11 @@ contains ! Vertical pressure preconditioner type(adj_pressure_preconditioner_type) :: adj_helmholtz_preconditioner - adj_pressure_operator_out = adj_pressure_operator_type(level=1_i_def) + integer(kind=i_def) :: level + + level = 1_i_def + + adj_pressure_operator_out = adj_pressure_operator_type(level, adj_lookup_table_cache) call log_event( "adj_semi_implicit_solver_type%create_adj_pressure_preconditioner: starting", LOG_LEVEL_INFO ) @@ -256,16 +264,19 @@ contains !> @brief Initialisation procedure for the adjoint semi-implicit solver !> @param[in] state Prognostic state for the solver - subroutine initialise( self, state ) + subroutine initialise( self, state, adj_lookup_table_cache ) implicit none ! Arguments - class(adj_semi_implicit_solver_type), intent(inout) :: self - type(field_type), dimension(bundle_size), intent(in) :: state - - self%adj_pressure_operator = adj_pressure_operator_type(level=1_i_def) - call create_adj_pressure_preconditioner( state, self%adj_pressure_operator, self%adj_pressure_preconditioner ) + class(adj_semi_implicit_solver_type), intent(inout) :: self + type(field_type), dimension(bundle_size), intent(in) :: state + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache + + call create_adj_pressure_preconditioner( state, & + adj_lookup_table_cache, & + self%adj_pressure_operator, & + self%adj_pressure_preconditioner ) call create_adj_pressure_solver( self%adj_pressure_operator, self%adj_pressure_preconditioner, self%adj_pressure_solver ) call create_adj_mixed_preconditioner( state, self%adj_pressure_solver, self%adj_mixed_preconditioner ) call create_adj_mixed_solver( self%adj_mixed_preconditioner, self%adj_mixed_operator, self%adj_mixed_solver ) diff --git a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 index 66f9894d6..679e30c38 100644 --- a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 +++ b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 @@ -24,6 +24,7 @@ module atl_si_timestep_alg_mod l_stabilise_bl, & n_bl_levels_to_stabilise, & max_bl_stabilisation + use linear_physics_config_mod, only: l_boundary_layer use derived_config_mod, only: bundle_size use boundaries_config_mod, only: limited_area use sci_fem_constants_mod, only: get_mass_matrix_fe, get_qr_fe @@ -44,6 +45,8 @@ module atl_si_timestep_alg_mod use rhs_alg_mod, only: rhs_alg use atl_rhs_alg_mod, only: atl_rhs_alg use gungho_transport_control_alg_mod, only: gungho_transport_control_alg + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_transport_control_alg_mod, only: atl_transport_control_alg use si_operators_alg_mod, only: compute_si_operators use semi_implicit_solver_alg_mod, only: semi_implicit_solver_alg_step @@ -51,6 +54,7 @@ module atl_si_timestep_alg_mod use derive_exner_from_eos_alg_mod, only: derive_exner_from_eos use atl_derive_exner_from_eos_alg_mod, only: atl_derive_exner_from_eos use update_prognostic_scalars_alg_mod, only: update_prognostic_scalars_alg + use atl_physics_alg_mod, only: atl_physics_alg use mr_indices_mod, only: nummr use moist_dyn_mod, only: num_moist_factors, gas_law use field_indices_mod, only: igh_u, igh_t, igh_d, igh_p @@ -75,6 +79,7 @@ module atl_si_timestep_alg_mod type(field_type), allocatable :: state2(:) type(field_type), allocatable :: state_copy(:) type(field_type), allocatable :: state_n(:) + type(field_type), allocatable :: state_star(:) type(field_type), allocatable :: state_after_slow(:) type(field_type), allocatable :: advected_state(:) type(field_type), allocatable :: mr_n(:) @@ -86,6 +91,7 @@ module atl_si_timestep_alg_mod type(field_type), allocatable :: state_test(:) type(field_type), allocatable :: rhs_np1_test(:) type(field_type), allocatable :: rhs_np1_in(:) + type(field_type), allocatable :: rhs_phys(:) ! Linearisation state type(field_type), allocatable :: ls_state(:) @@ -113,6 +119,10 @@ module atl_si_timestep_alg_mod ! Moisture flag logical(l_def) :: use_moisture + ! Adjoint lookup tables + type(adj_solver_lookup_cache_type) :: adj_solver_lookup_cache + type(adj_trans_lookup_cache_type) :: adj_trans_lookup_cache + contains procedure, public :: initialise @@ -173,6 +183,7 @@ contains allocate(self%state_copy(bundle_size)) allocate(self%state_n(bundle_size)) allocate(self%state_after_slow(bundle_size)) + allocate(self%state_star(bundle_size)) allocate(self%advected_state(bundle_size)) allocate(self%rhs_n(bundle_size)) allocate(self%rhs_np1(bundle_size)) @@ -183,6 +194,7 @@ contains allocate(self%state_test(bundle_size)) allocate(self%rhs_np1_test(bundle_size)) allocate(self%rhs_np1_in(bundle_size)) + allocate(self%rhs_phys(bundle_size)) allocate(self%ls_state(bundle_size)) allocate(self%ls_state_n(bundle_size)) @@ -225,6 +237,7 @@ contains call clone_bundle( self%state, self%state_test, bundle_size ) call clone_bundle( self%state, self%rhs_np1_test, bundle_size ) call clone_bundle( self%state, self%rhs_np1_in, bundle_size ) + call clone_bundle( self%state, self%rhs_phys, bundle_size ) call clone_bundle( self%state, self%ls_state, bundle_size ) call clone_bundle( self%state, self%ls_state_n, bundle_size ) @@ -270,7 +283,10 @@ contains call set_bundle_scalar( 0.0_r_def, self%ls_mr_after_slow, nummr ) end if - call self%adj_semi_implicit_solver%initialise(self%state) + call self%adj_solver_lookup_cache%initialise(u%get_mesh()) + call self%adj_trans_lookup_cache%initialise(u%get_mesh()) + + call self%adj_semi_implicit_solver%initialise(self%state, self%adj_solver_lookup_cache) call log_event( "atl_si_timestep_type%init: initialised timestepping algorithm", LOG_LEVEL_INFO ) @@ -555,6 +571,7 @@ contains call set_bundle_scalar( 0.0_r_def, self%state_initial, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%rhs_n, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%rhs_np1, bundle_size ) + call set_bundle_scalar( 0.0_r_def, self%rhs_phys, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%mr_after_slow, nummr ) call set_bundle_scalar( 0.0_r_def, self%mr_n, nummr ) @@ -644,32 +661,73 @@ contains setval_c( self%rhs_np1(igh_t), 0.0_r_def ) ) end if + if (l_boundary_layer) call add_bundle(self%rhs_phys,self%rhs_np1,self%rhs_phys, bundle_size) call add_bundle( self%rhs_adv, self%rhs_np1, self%rhs_adv, bundle_size ) call add_bundle( self%rhs_n, self%rhs_np1, self%rhs_n, bundle_size ) call bundle_ax( -1.0_r_def, self%rhs_np1, self%rhs_np1, bundle_size ) - call set_bundle_scalar( 0.0_r_def,self%state1,bundle_size ) - call set_bundle_scalar( 0.0_r_def,self%state2,bundle_size ) + if (inner > 1) then + + if (use_wavedynamics) then + + call set_bundle_scalar( 0.0_r_def, self%state1, bundle_size ) + call set_bundle_scalar( 0.0_r_def, self%state2, bundle_size ) - call atl_rhs_alg( self%rhs_np1, & - -varalpha*cast_dt, & - self%state1, & - self%state2, & - moist_dyn, & - self%ls_state_itns(:,ls_outer,ls_inner), & - self%ls_moist_dyn_itns(:,ls_outer,ls_inner), & - .true., & - dlayer_on, & - modeldb%clock ) + call atl_rhs_alg( self%rhs_np1, & + -varalpha*cast_dt, & + self%state1, & + self%state2, & + moist_dyn, & + self%ls_state_itns(:,ls_outer,ls_inner), & + self%ls_moist_dyn_itns(:,ls_outer,ls_inner), & + .true., & + dlayer_on, & + modeldb%clock ) - call add_bundle( self%state,self%state2 ,self%state, bundle_size ) - call add_bundle( self%state,self%state1 ,self%state, bundle_size ) + call add_bundle( self%state, self%state2, self%state, bundle_size ) + call add_bundle( self%state, self%state1, self%state, bundle_size ) + + end if + + end if end do inner_dynamics_loop !------------------------------------------------------------------------- ! End of inner (nonlinear, Coriolis) loop !------------------------------------------------------------------------- + if (l_boundary_layer) then + ! Linear boundary layer scheme is currently the only linear physics scheme + call atl_physics_alg( modeldb, & + u, & + self%state_star, & + self%rhs_phys, & + self%rhs_np1, & + self%rhs_n, & + self%state, & + self%rhs_adv, & + self%ls_state_itns(:,ls_outer,1), & + mesh, & + cast_dt ) + end if ! l_boundary_layer + + call set_bundle_scalar( 0.0_r_def, self%state1, bundle_size ) + call set_bundle_scalar( 0.0_r_def, self%state2, bundle_size ) + + call atl_rhs_alg( self%rhs_np1, & + -varalpha*cast_dt, & + self%state1, & + self%state2, & + moist_dyn, & + self%ls_state_itns(:,ls_outer,1), & + self%ls_moist_dyn_itns(:,ls_outer,1), & + .true., & + dlayer_on, & + modeldb%clock ) + + call add_bundle( self%state, self%state2, self%state, bundle_size ) + call add_bundle( self%state, self%state1, self%state, bundle_size ) + call invoke( setval_c( self%theta_fv_inc, 0.0_r_def ), & adj_dg_inc_matrix_vector_kernel_type( self%rhs_adv(igh_t), & self%theta_fv_inc, mm_wt ), & @@ -686,7 +744,8 @@ contains self%ls_state_n(igh_u), & self%ls_mr_after_slow, & modeldb%clock, & - outer ) ! advected_state finished with + outer, & + self%adj_trans_lookup_cache ) ! advected_state finished with end do outer_dynamics_loop !--------------------------------------------------------------------------- @@ -759,6 +818,7 @@ contains if (allocated(self%state_n)) deallocate(self%state_n) if (allocated(self%state_initial)) deallocate(self%state_initial) if (allocated(self%state_after_slow)) deallocate(self%state_after_slow) + if (allocated(self%state_star)) deallocate(self%state_star) if (allocated(self%advected_state)) deallocate(self%advected_state) if (allocated(self%rhs_n)) deallocate(self%rhs_n) if (allocated(self%rhs_np1)) deallocate(self%rhs_np1) @@ -769,6 +829,7 @@ contains if (allocated(self%state_test)) deallocate(self%state_test) if (allocated(self%rhs_np1_test)) deallocate(self%rhs_np1_test) if (allocated(self%rhs_np1_in)) deallocate(self%rhs_np1_in) + if (allocated(self%rhs_phys)) deallocate(self%rhs_phys) if (allocated(self%ls_state)) deallocate(self%ls_state) if (allocated(self%ls_state_itns)) deallocate(self%ls_state_itns) @@ -785,6 +846,9 @@ contains if (allocated(self%ls_mr_itns)) deallocate(self%ls_mr_itns) if (allocated(self%ls_moist_dyn_itns)) deallocate(self%ls_moist_dyn_itns) + call self%adj_solver_lookup_cache%finalise() + call self%adj_trans_lookup_cache%finalise() + return end subroutine finalise diff --git a/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 b/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 index 59d196f93..c12a86c82 100644 --- a/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 @@ -98,6 +98,14 @@ contains hori_flux => transport_counter%get_flux(2) call sum_vert_flux%initialise(w2v_fs) + if (.not. hori_flux%is_initialised() ) then + call hori_flux%initialise(w2h_fs) + call invoke( setval_c( hori_flux, 0.0_r_tran ) ) + end if + if (.not. old_flux%is_initialised() ) then + call old_flux%initialise(w2v_fs) + call invoke( setval_c( old_flux, 0.0_r_tran ) ) + end if call invoke( setval_c( sum_vert_flux, 0.0_r_tran ), & adj_combine_w2_field_kernel_type( sum_flux, hori_flux, & sum_vert_flux, & @@ -105,6 +113,7 @@ contains face_selector_ns ), & inc_X_plus_Y( old_flux, sum_vert_flux ), & inc_X_plus_Y( flux_last_step, sum_vert_flux ), & + setval_c( sum_flux, 0.0_r_tran ), & setval_c( sum_vert_flux, 0.0_r_tran ) ) ! General case for any splitting diff --git a/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 b/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 index f5c0dcb86..a742942de 100644 --- a/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 +++ b/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 @@ -141,7 +141,7 @@ module adj_flux_precomputations_mod class(flux_precomputations_type), intent(inout) :: flux_pc integer(kind=i_def), intent(in) :: step - type(r_tran_field_type), intent(in) :: ref_flux + type(r_tran_field_type), intent(inout) :: ref_flux ! Local variables integer(kind=i_def) :: splitting diff --git a/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 b/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 index 38ceb3f2c..7f135041b 100644 --- a/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 @@ -36,7 +36,6 @@ module atl_end_transport_step_alg_mod use transport_metadata_mod, only: transport_metadata_type use adj_flux_precomputations_mod, only: adj_initialise_step - implicit none private @@ -221,14 +220,18 @@ contains if (.not. final_split_step) then flux_ptr => transport_counter%get_flux( step ) - call invoke( inc_X_plus_Y( flux, flux_ptr ), & - setval_c( flux_ptr, 0.0_r_tran ) ) + call invoke( inc_X_plus_Y( flux, flux_ptr ) ) end if ! Combine fluxes from each part of the calculation call invoke( inc_X_plus_Y( flux_pert_wind, flux ), & inc_X_plus_Y( flux_ls_wind, flux ) ) + if (.not. final_split_step) then + flux_ptr => transport_counter%get_flux( step ) + call invoke( setval_c( flux_ptr, 0.0_r_tran ) ) + end if + end subroutine atl_end_conservative_step_alg end module atl_end_transport_step_alg_mod diff --git a/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 index 1f13aa011..464147193 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 @@ -15,6 +15,7 @@ module atl_moist_mr_transport_alg_mod use timing_mod, only: start_timing, stop_timing, & tik, LPROF use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: equation_form_advective, & equation_form_conservative use atl_transport_field_mod, only: atl_transport_field @@ -30,29 +31,30 @@ contains !============================================================================= !> @brief Central routine for adjoint transport of moisture fields. - !> @param[in,out] mr_out ACTIVE Perturbation to moisture mixing ratios - !> @param[in,out] mr_in ACTIVE Input perturbation state for moisture - !> @param[in] ls_mr_in PASSIVE Lin. state for moisture mixing ratios - !> @param[in] nummr_to_transport Number of moisture species to transport - !> @param[in,out] tl_transport_controller - !! Object controlling transport - !> @param[in,out] transport_metadata - !! Contains the configuration options for - !! transporting these fields + !> @param[in,out] mr_out ACTIVE Perturbation to moisture mixing ratios + !> @param[in,out] mr_in ACTIVE Input perturbation state for moisture + !> @param[in] ls_mr_in PASSIVE Lin. state for moisture mixing ratios + !> @param[in] nummr_to_transport Number of moisture species to transport + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting these fields + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, & nummr_to_transport, & tl_transport_controller, & - transport_metadata ) + transport_metadata, & + adj_lookup_table_cache ) implicit none ! Arguments type(field_type), intent(inout) :: mr_out(nummr) type(field_type), intent(inout) :: mr_in(nummr) - type(field_type), intent(in) :: ls_mr_in(nummr) - integer(kind=i_def), intent(in) :: nummr_to_transport + type(field_type), intent(in) :: ls_mr_in(nummr) + integer(kind=i_def), intent(in) :: nummr_to_transport type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: imr @@ -80,7 +82,8 @@ contains ! Simply transport all the mixing ratio fields as they are in Wtheta do imr = nummr_to_transport, 1, -1 call atl_transport_field( mr_out(imr), mr_in(imr), ls_mr_in(imr), & - tl_transport_controller, transport_metadata ) + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) end do ! ------------------------------------------------------------------------ ! diff --git a/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 new file mode 100644 index 000000000..1019d840a --- /dev/null +++ b/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 @@ -0,0 +1,338 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Adjoint of the tangent linear version of split_transport + +module atl_split_transport_mod + + use constants_mod, only: i_def, r_tran + use r_tran_field_mod, only: r_tran_field_type + use log_mod, only: log_event, LOG_LEVEL_ERROR + use split_transport_utils_mod, only: get_splitting_direction, & + get_splitting_fraction, & + get_num_split_steps + use split_transport_mod, only: split_transport_field + + ! Transport control infrastructure + use transport_controller_mod, only: transport_controller_type + use tl_transport_controller_mod, only: tl_transport_controller_type + use transport_counter_mod, only: transport_counter_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type + use transport_enumerated_types_mod, only: direction_h, & + direction_v, & + split_method_null, & + split_method_mol, & + split_method_ffsl, & + split_method_sl, & + equation_form_conservative, & + equation_form_advective, & + equation_form_consistent + use transport_metadata_mod, only: transport_metadata_type + + ! Algorithms + use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg, & + end_of_consistent_step_alg, & + end_of_advective_step_alg + use linear_config_mod, only: transport_efficiency + + implicit none + + private + + public :: atl_split_transport_control + public :: atl_split_transport_field + +contains + + !============================================================================= + !> @brief Controls vertical/horizontal split transport. + !> @details Manages the vertical/horizontal splitting of the split transport + !! scheme by choosing the splitting type and calling the individual + !! vertical and horizontal split components. + !> @param[in,out] field_np1 ACTIVE Field to return at end + !> @param[in,out] field_n ACTIVE Field at the start + !> @param[in] ls_field_n PASSIVE LS Field at the start + !> @param[in,out] tl_transport_controller Encapsulating object containing the + !! transport counter and precomputations + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_split_transport_control(field_np1, field_n, ls_field_n, & + tl_transport_controller, adj_lookup_table_cache) + + implicit none + + ! Arguments + type(r_tran_field_type), intent(inout) :: field_np1 + type(r_tran_field_type), target, intent(inout) :: field_n + type(r_tran_field_type), target, intent(in) :: ls_field_n + type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + + ! Internal variables + integer(kind=i_def) :: num_split_steps + integer(kind=i_def) :: split_step_count + type(r_tran_field_type), allocatable :: ls_field_np1(:) + type(r_tran_field_type), target :: field_tmp + type(r_tran_field_type), pointer :: field_ptr + type(transport_counter_type), pointer :: transport_counter + type(transport_counter_type), pointer :: ls_transport_counter + type(transport_metadata_type), pointer :: transport_metadata + type(transport_controller_type), pointer :: pert_transport_controller + type(transport_controller_type), pointer :: ls_transport_controller + real(kind=r_tran) :: dt_substep + integer(kind=i_def) :: num_substeps + + ! ------------------------------------------------------------------------ ! + ! NONLINEAR (LS) + ! ------------------------------------------------------------------------ ! + + ls_transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() + transport_metadata => ls_transport_controller%get_transport_metadata() + ls_transport_counter => ls_transport_controller%get_transport_counter() + + ! Initialise fields + num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) + allocate(ls_field_np1(num_split_steps + 1)) + do split_step_count = 1, num_split_steps + 1 + call field_n%copy_field_properties(ls_field_np1(split_step_count)) + end do + + if ( .not. transport_efficiency ) then + + ! When we have multiple split steps, we need an intermediate field for the + ! field at the start of each substep + ! field_ptr points to the field at the start of each split step + call invoke( setval_X(ls_field_np1(1), ls_field_n) ) + + if (num_split_steps > 1) then + call field_n%copy_field_properties(field_tmp) + call invoke( setval_X(field_tmp, ls_field_n) ) + field_ptr => field_tmp + else + field_ptr => ls_field_n + end if + + do split_step_count = 1, num_split_steps + call split_transport_field( ls_field_np1(split_step_count+1), & + field_ptr, & + ls_transport_controller & + ) + + if (split_step_count < num_split_steps) then + call invoke( setval_X(field_tmp, ls_field_np1(split_step_count+1) ) ) + + ! Increment split step counter + call ls_transport_counter%inc_split_step_counter() + end if + end do + else + do split_step_count = 1, num_split_steps + 1 + call invoke( setval_X(ls_field_np1(split_step_count), ls_field_n) ) + end do + end if + + ! ------------------------------------------------------------------------ ! + ! LINEAR + ! ------------------------------------------------------------------------ ! + pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_metadata => pert_transport_controller%get_transport_metadata() + transport_counter => pert_transport_controller%get_transport_counter() + + dt_substep = transport_counter%get_dt_substep() + num_substeps = transport_counter%get_num_substeps() + call transport_counter%adj_initialise(transport_metadata, dt_substep, num_substeps ) + call ls_transport_counter%adj_initialise(transport_metadata, dt_substep, num_substeps ) + + ! Initialise fields + num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) + + call field_n%copy_field_properties(field_tmp) + + ! Set fields to zero + call invoke( setval_C(field_tmp, 0.0_r_def ) ) + + ! Loop backwards + do split_step_count = num_split_steps, 1, -1 + + if (split_step_count < num_split_steps) then + + ! Increment split step counter + call transport_counter%dec_split_step_counter() + call ls_transport_counter%dec_split_step_counter() + + call invoke( inc_X_plus_Y(field_np1, field_tmp ), & + setval_C(field_tmp, 0.0_r_def ) ) + + end if + + call atl_split_transport_field( & + field_np1, field_tmp, ls_field_np1(split_step_count), & + tl_transport_controller, adj_lookup_table_cache & + ) + call invoke( setval_C(field_np1, 0.0_r_def ) ) + + end do + if (num_split_steps <= 1) then + call invoke( setval_C(field_np1, 0.0_r_def ) ) + end if + call invoke( inc_X_plus_Y(field_n, field_tmp) ) + + deallocate( ls_field_np1 ) + + end subroutine atl_split_transport_control + + !============================================================================= + !> @brief Does either vertical or horizontal transport of a field. + !> @details Performs a vertical or horizontal transport step, solving the + !! transport equation for a (multidata) field. + !> @param[in,out] field_np1 ACTIVE Field to return at end + !> @param[in,out] field_n ACTIVE Field at the start + !> @param[in] ls_field_n PASSIVE Field at the start + !> @param[in,out] tl_transport_controller Encapsulating object containing the + !! transport counter and precomputations + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_split_transport_field(field_np1, field_n, ls_field_n, & + tl_transport_controller, adj_lookup_table_cache) + + use atl_mol_conservative_alg_mod, only: atl_mol_conservative_alg + use atl_mol_advective_alg_mod, only: atl_mol_advective_alg + + implicit none + + ! Arguments + type(r_tran_field_type), intent(inout) :: field_np1 + type(r_tran_field_type), intent(inout) :: field_n + type(r_tran_field_type), intent(in) :: ls_field_n + type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + + ! Internal variables + integer(kind=i_def) :: method, direction + type(transport_counter_type), pointer :: transport_counter + type(transport_metadata_type), pointer :: transport_metadata + type(transport_controller_type), pointer :: pert_transport_controller + + pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_counter => pert_transport_controller%get_transport_counter() + transport_metadata => pert_transport_controller%get_transport_metadata() + + ! -------------------------------------------------------------------------! + ! Set up method based on direction + ! -------------------------------------------------------------------------! + direction = get_splitting_direction( & + transport_metadata%get_splitting(), & + transport_counter%get_split_step_of_substep_counter() & + ) + + select case ( direction ) + case ( direction_h ) + method = transport_metadata%get_horizontal_method() + case ( direction_v ) + method = transport_metadata%get_vertical_method() + case default + call log_event('Split transport direction not recognised', LOG_LEVEL_ERROR) + end select + + ! -------------------------------------------------------------------------! + ! Choose method, and then choose equation + ! -------------------------------------------------------------------------! + select case ( method ) + + ! -------------------------------------------------------------------------! + ! Null step + ! -------------------------------------------------------------------------! + case ( split_method_null ) + call log_event( & + 'ADJ: Split method null not coded', & + LOG_LEVEL_ERROR & + ) + + ! -------------------------------------------------------------------------! + ! Method of Lines step + ! -------------------------------------------------------------------------! + case ( split_method_mol ) + ! Choose form of transport equation + select case ( transport_metadata%get_equation_form() ) + case ( equation_form_conservative ) + call atl_mol_conservative_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & + ) + case ( equation_form_advective ) + call atl_mol_advective_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & + ) + case ( equation_form_consistent ) + call log_event( & + 'ADJ: MoL Consistent not coded yet', & + LOG_LEVEL_ERROR & + ) + case default + call log_event( & + 'Trying to solve unrecognised form of transport equation', & + LOG_LEVEL_ERROR & + ) + + end select + + ! -------------------------------------------------------------------------! + ! Flux-Form Semi-Lagrangian step + ! -------------------------------------------------------------------------! + case ( split_method_ffsl ) + ! All equation forms have the same control method + call log_event( & + 'ADJ: FFSL not coded yet', & + LOG_LEVEL_ERROR & + ) + ! -------------------------------------------------------------------------! + ! Semi-Lagrangian step + ! -------------------------------------------------------------------------! + case ( split_method_sl ) + ! Choose direction + select case ( direction ) + + case ( direction_h ) + ! Horizontal SL only for advective form + if ( transport_metadata%get_equation_form() /= equation_form_advective ) then + call log_event( & + 'Horizontal semi-Lagrangian is only for advective form', & + LOG_LEVEL_ERROR & + ) + end if + call log_event( & + 'ADJ: Horizontal SL not coded yet', & + LOG_LEVEL_ERROR & + ) + + case ( direction_v ) + ! Choose form of transport equation for vertical + select case ( transport_metadata%get_equation_form() ) + + case ( equation_form_conservative ) + call log_event( & + 'TL: Vertical SL conservative not coded yet', & + LOG_LEVEL_ERROR & + ) + case ( equation_form_advective ) + call log_event( & + 'ADJ: Vertical SL advective not coded yet', & + LOG_LEVEL_ERROR & + ) + case default + call log_event( & + 'Trying to solve unrecognised form of transport equation', & + LOG_LEVEL_ERROR & + ) + end select + end select + + case default + call log_event( & + 'Trying to transport with unrecognised scheme', & + LOG_LEVEL_ERROR & + ) + end select + + end subroutine atl_split_transport_field + +end module atl_split_transport_mod diff --git a/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 index d4e2c7337..510a17d82 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 @@ -16,6 +16,7 @@ module atl_theta_transport_alg_mod theta_variable_dry, & adjust_theta use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: equation_form_advective, & equation_form_consistent use transport_metadata_mod, only: transport_metadata_type @@ -30,21 +31,22 @@ contains !============================================================================= !> @brief Adjoint routine for transporting potential temperature field. - !> @param[in,out] theta_out Perturbation: Dry potential temperature - !! after transport - !> @param[in,out] theta_inc Perturbation: Dry potential temperature - !! increment - !> @param[in,out] theta_in Perturbation: Dry potential temperature - !! before transport - !> @param[in] ls_theta_in Linear state: Dry potential temperature - !! before transport - !> @param[in,out] tl_transport_controller - !! Controls transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting the potential temperature - subroutine atl_theta_transport_alg( theta_out, theta_inc, & - theta_in, ls_theta_in, & - tl_transport_controller, transport_metadata ) + !> @param[in,out] theta_out Perturbation: Dry potential temperature + !! after transport + !> @param[in,out] theta_inc Perturbation: Dry potential temperature + !! increment + !> @param[in,out] theta_in Perturbation: Dry potential temperature + !! before transport + !> @param[in] ls_theta_in Linear state: Dry potential temperature + !! before transport + !> @param[in,out] tl_transport_controller Controls transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting the potential temperature + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_theta_transport_alg( theta_out, theta_inc, & + theta_in, ls_theta_in, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) implicit none @@ -52,9 +54,10 @@ contains type(field_type), target, intent(inout) :: theta_out type(field_type), intent(inout) :: theta_inc type(field_type), target, intent(inout) :: theta_in - type(field_type), target, intent(in) :: ls_theta_in + type(field_type), target, intent(in) :: ls_theta_in type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables real(kind=r_def) :: one @@ -124,7 +127,8 @@ contains ! Consistent: Transformation to densities and evaluation of fluxes is in ! lowest level algorithms, so just call transport_field call atl_transport_field( theta_out_ptr, theta_in_ptr, ls_theta_in_ptr, & - tl_transport_controller, transport_metadata ) + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! ------------------------------------------------------------------------ ! ! Default form of transport equation diff --git a/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 index 2ed3d82dc..73689427d 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 @@ -19,6 +19,7 @@ module atl_transport_control_alg_mod use model_clock_mod, only: model_clock_type use transport_config_mod, only: cheap_update use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_controller_mod, only: transport_controller_type use flux_precomputations_alg_mod, only: flux_precomputations_type use wind_precomputations_alg_mod, only: wind_precomputations_type @@ -41,25 +42,26 @@ contains !============================================================================= !> @brief Adjoint of advection of prognostic variables for the tangent linear model. - !> @param[in,out] advection_inc ACTIVE Advection increment of the dynamics - !! prognostics [u, rho, theta, exner] - !> @param[in,out] advected_fields ACTIVE Fields to advect: [u, rho, theta, exner] - !> @param[in,out] wind_np1 ACTIVE End of timestep wind field - !> @param[in,out] wind_n ACTIVE Start of timestep wind field - !> @param[in,out] mr_out ACTIVE Moisture fields after transport - !> @param[in,out] mr_in ACTIVE Moisture fields before transport - !> @param[in] ls_advected_fields PASSIVE Fields to advect: [u, rho, theta, exner] - !> @param[in] ls_wind_np1 PASSIVE End of timestep wind field - !> @param[in] ls_wind_n PASSIVE Start of timestep wind field - !> @param[in] ls_mr_in PASSIVE Moisture fields before transport - !> @param[in] model_clock Time within the model - !> @param[in] outer Outer (advection) iteration number + !> @param[in,out] advection_inc ACTIVE Advection increment of the dynamics + !! prognostics [u, rho, theta, exner] + !> @param[in,out] advected_fields ACTIVE Fields to advect: [u, rho, theta, exner] + !> @param[in,out] wind_np1 ACTIVE End of timestep wind field + !> @param[in,out] wind_n ACTIVE Start of timestep wind field + !> @param[in,out] mr_out ACTIVE Moisture fields after transport + !> @param[in,out] mr_in ACTIVE Moisture fields before transport + !> @param[in] ls_advected_fields PASSIVE Fields to advect: [u, rho, theta, exner] + !> @param[in] ls_wind_np1 PASSIVE End of timestep wind field + !> @param[in] ls_wind_n PASSIVE Start of timestep wind field + !> @param[in] ls_mr_in PASSIVE Moisture fields before transport + !> @param[in] model_clock Time within the model + !> @param[in] outer Outer (advection) iteration number + !> @param[in] adj_lookup_table_cache Lookup table cache !> subroutine atl_transport_control_alg(advection_inc, advected_fields, & wind_np1, wind_n, mr_out, mr_in, & ls_advected_fields, & ls_wind_np1, ls_wind_n, ls_mr_in, & - model_clock, outer ) + model_clock, outer, adj_lookup_table_cache ) use derived_config_mod, only: bundle_size use sci_field_bundle_builtins_mod, only: clone_bundle, set_bundle_scalar @@ -80,18 +82,19 @@ contains implicit none ! Arguments - type(field_type), intent(inout) :: advection_inc(bundle_size) - type(field_type), intent(inout) :: advected_fields(bundle_size) - type(field_type), intent(inout) :: wind_np1 - type(field_type), intent(inout) :: wind_n - type(field_type), intent(in) :: ls_wind_np1 - type(field_type), intent(in) :: ls_wind_n - type(field_type), intent(inout) :: mr_out(nummr) - type(field_type), intent(inout) :: mr_in(nummr) - type(field_type), intent(in) :: ls_advected_fields(bundle_size) - type(field_type), intent(in) :: ls_mr_in(nummr) - class(model_clock_type), intent(in) :: model_clock - integer(kind=i_def), intent(in) :: outer + type(field_type), intent(inout) :: advection_inc(bundle_size) + type(field_type), intent(inout) :: advected_fields(bundle_size) + type(field_type), intent(inout) :: wind_np1 + type(field_type), intent(inout) :: wind_n + type(field_type), intent(in) :: ls_wind_np1 + type(field_type), intent(in) :: ls_wind_n + type(field_type), intent(inout) :: mr_out(nummr) + type(field_type), intent(inout) :: mr_in(nummr) + type(field_type), intent(in) :: ls_advected_fields(bundle_size) + type(field_type), intent(in) :: ls_mr_in(nummr) + class(model_clock_type), intent(in) :: model_clock + integer(kind=i_def), intent(in) :: outer + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(field_type) :: fields_np1(bundle_size) @@ -170,7 +173,7 @@ contains call atl_theta_transport_alg( & fields_np1(igh_t), advection_inc(igh_t), advected_fields(igh_t), & ls_advected_fields(igh_t), tl_transport_controller, & - transport_metadata & + transport_metadata, adj_lookup_table_cache & ) ! ------------------------------------------------------------------------- ! @@ -191,7 +194,8 @@ contains call atl_moist_mr_transport_alg( & mr_out, mr_in, ls_mr_in, nummr_to_transport, & - tl_transport_controller, transport_metadata & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache & ) end if @@ -215,7 +219,7 @@ contains call atl_wind_transport_alg( & advection_inc(igh_u), advected_fields(igh_u), & ls_advected_fields(igh_u), tl_transport_controller, & - transport_metadata & + transport_metadata, adj_lookup_table_cache & ) ! We don't change advection_inc(igh_u) as tl_wind_transport_alg ! already returns weak increment @@ -240,7 +244,7 @@ contains call atl_transport_field( & fields_np1(igh_d), advected_fields(igh_d), & ls_advected_fields(igh_d), tl_transport_controller, & - transport_metadata & + transport_metadata, adj_lookup_table_cache & ) ! The precomputation initialisation routines are initially called on diff --git a/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 b/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 index a00c2ee0b..a755b961c 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 +++ b/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 @@ -18,8 +18,10 @@ module atl_transport_field_mod direction_3d, & equation_form_conservative, & equation_form_advective + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_mol_conservative_alg_mod, only: atl_mol_conservative_alg use atl_mol_advective_alg_mod, only: atl_mol_advective_alg + use atl_split_transport_mod, only: atl_split_transport_control use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -34,15 +36,16 @@ module atl_transport_field_mod !============================================================================= !> @brief Adjoint of central routine for transporting fields in tangent-linear field. - !> @param[in,out] field_np1 ACTIVE Field to return at end of transport step - !> @param[in,out] field_n ACTIVE Field at the start of the transport step - !> @param[in] ls_field_n PASSIVE Linear field at the start of step - !> @param[in,out] tl_transport_controller - !! Object controlling transport by perturbed wind - !> @param[in] transport_metadata Contains the configuration options for - !! transporting these fields - subroutine atl_transport_field(field_np1, field_n, ls_field_n, & - tl_transport_controller, transport_metadata) + !> @param[in,out] field_np1 ACTIVE Field to return at end of transport step + !> @param[in,out] field_n ACTIVE Field at the start of the transport step + !> @param[in] ls_field_n PASSIVE Linear field at the start of step + !> @param[in,out] tl_transport_controller Object controlling transport by perturbed wind + !> @param[in] transport_metadata Contains the configuration options for + !! transporting these fields + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_transport_field(field_np1, field_n, ls_field_n, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache) implicit none @@ -52,6 +55,7 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & type(field_type), intent(in) :: ls_field_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(transport_counter_type), pointer :: transport_counter @@ -86,13 +90,13 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & ! Choose form of transport equation select case ( transport_metadata%get_equation_form() ) case ( equation_form_conservative ) - call atl_mol_conservative_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & + call atl_mol_conservative_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & ) case ( equation_form_advective ) - call atl_mol_advective_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & + call atl_mol_advective_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & ) case default @@ -112,8 +116,8 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & ! Some split horizontal/vertical transport scheme ! -------------------------------------------------------------------------! case ( scheme_split ) - call log_event('Split transport not implemented for tangent-linear app', & - LOG_LEVEL_ERROR) + call atl_split_transport_control(field_np1, field_n, ls_field_n, & + tl_transport_controller, adj_lookup_table_cache) case default call log_event('Trying to transport with unrecognised scheme', & diff --git a/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 index 5eb9f58c6..6f151b626 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 @@ -33,6 +33,7 @@ module atl_wind_transport_alg_mod use transport_enumerated_types_mod, only: equation_form_advective use transport_config_mod, only: broken_w2_projection use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_transport_field_mod, only: atl_transport_field use transport_metadata_mod, only: transport_metadata_type use sci_field_minmax_alg_mod, only: log_field_minmax @@ -47,18 +48,19 @@ contains !============================================================================= !> @brief Central routine for adjoint transport of the wind field. - !> @param[in,out] rhs_u ACTIVE Right-hand-side for weak wind transport - !! equation. In other words, the advective - !! increment to the wind multiplied by the - !! W2 mass matrix. - !> @param[in,out] wind_n ACTIVE Wind field at start of transport step - !> @param[in] ls_wind_n PASSIVE Wind field at start of transport step - !> @param[in,out] tl_transport_controller - !! Object controlling transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting these fields - subroutine atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & - tl_transport_controller, transport_metadata ) + !> @param[in,out] rhs_u ACTIVE Right-hand-side for weak wind transport + !! equation. In other words, the advective + !! increment to the wind multiplied by the + !! W2 mass matrix. + !> @param[in,out] wind_n ACTIVE Wind field at start of transport step + !> @param[in] ls_wind_n PASSIVE Wind field at start of transport step + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting these fields + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) use sci_dg_convert_hdiv_field_kernel_mod, only: dg_convert_hdiv_field_kernel_type use invoke_adj_cvt_hdiv_field_kernel_mod, only: invoke_adj_convert_hdiv_field_kernel @@ -72,9 +74,10 @@ contains ! Arguments type(field_type), intent(inout) :: rhs_u type(field_type), intent(inout) :: wind_n - type(field_type), intent(in) :: ls_wind_n + type(field_type), intent(in) :: ls_wind_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: dir @@ -197,8 +200,9 @@ contains ! Transport wind components in W3 ! -------------------------------------------------------------------- ! do dir = 3, 1, -1 - call atl_transport_field( u_w3_np1(dir), u_w3_n(dir), ls_u_w3_n(dir), & - tl_transport_controller, transport_metadata ) + call atl_transport_field( u_w3_np1(dir), u_w3_n(dir), ls_u_w3_n(dir), & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) end do ! Perturbation part diff --git a/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 index b0bac45cf..f81998a06 100644 --- a/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 @@ -7,14 +7,12 @@ !> @brief Adjoint reconstruction of a W3 field at W2 points for use in the transport scheme. module adj_reconstruct_w3_field_alg_mod - use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: r_tran, i_def, l_def use r_tran_field_mod, only: r_tran_field_type use invoke_adj_poly1d_recon_lookup_mod, only: invoke_adj_poly1d_recon_lookup use invoke_adj_poly2d_recon_lookup_mod, only: invoke_adj_poly2d_recon_lookup - use adj_lookup_table_generators_alg_mod, only: create_lookup_poly1d, & - create_lookup_poly2d + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type use function_space_mod, only: function_space_type @@ -40,23 +38,25 @@ contains !============================================================================= !> @brief Adjoint of reconstruction of a W3 field in the horizontal component of W2 - !> @param[in,out] field_new The resulting horizontal W2 field - !> @param[in,out] field_old The input W3 field - !> @param[in] transport_metadata Contains transport configuration options + !> @param[in,out] field_new The resulting horizontal W2 field + !> @param[in,out] field_old The input W3 field + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata ) + transport_metadata, adj_lookup_table_cache ) implicit none - type(r_tran_field_type), intent(inout) :: field_new - type(r_tran_field_type), intent(inout) :: field_old - type(transport_metadata_type), intent(in) :: transport_metadata + type(r_tran_field_type), intent(inout) :: field_new + type(r_tran_field_type), intent(inout) :: field_old + type(transport_metadata_type), intent(in) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache - type(mesh_type), pointer :: mesh - integer(kind=i_def) :: mesh_id - integer(kind=i_def) :: stencil_extent - integer(kind=i_def) :: stencil_size - type(r_tran_field_type), pointer :: flux_coeffs + type(mesh_type), pointer :: mesh + integer(kind=i_def) :: mesh_id + integer(kind=i_def) :: stencil_extent + integer(kind=i_def) :: stencil_size + type(r_tran_field_type), pointer :: flux_coeffs type(r_tran_field_type), target :: remap_field, field_old_big_halo type(r_tran_field_type), pointer :: field_ptr @@ -64,14 +64,14 @@ contains logical(kind=l_def) :: monotone integer(kind=i_def) :: remap_depth - type(adj_lookup_table_type) :: lookup_poly - type(integer_field_type), pointer :: lookup_poly_field - type(integer_field_type), pointer :: num_sets_poly_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup_poly + type(integer_field_type), pointer :: lookup_poly_field + type(integer_field_type), pointer :: num_sets_poly_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices nullify(mesh, flux_coeffs, field_ptr, & - lookup_poly_field, num_sets_poly_field) + lookup_poly, lookup_poly_field, num_sets_poly_field) mesh => field_new%get_mesh() mesh_id = mesh%get_id() @@ -90,7 +90,7 @@ contains ! Copy field to a large halo version call field_old_big_halo%initialise( field_old%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_c( field_old_big_halo, 0.0_r_tran ) ) monotone = (transport_metadata%get_horizontal_monotone() == monotone_koren) @@ -112,10 +112,7 @@ contains else if ( oned_reconstruction ) then ! Use 1d flux reconstruction - ! Create lookup table for stencil application. Essentially a dry run - ! of the TL kernel. - call create_lookup_poly1d( lookup_poly, field_new, field_ptr, & - flux_coeffs, stencil_extent, fv_horizontal_order ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly1d() lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() @@ -129,10 +126,7 @@ contains else ! Use 2d flux reconstruction stencil_extent = fv_horizontal_order / 2_i_def - ! Create lookup table for stencil application. Essentially a dry run - ! of the TL kernel. - call create_lookup_poly2d( lookup_poly, field_new, field_old_big_halo, flux_coeffs, & - stencil_size, stencil_extent ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly2d(field_new%which_function_space()) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() diff --git a/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 index 83fa0a54f..58617ce09 100644 --- a/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 @@ -7,7 +7,6 @@ module adj_wt_advective_update_alg_mod - use check_configuration_mod, only : get_required_stencil_depth use constants_mod, only : r_tran, i_def, l_def use r_tran_field_mod, only : r_tran_field_type use finite_element_config_mod, only : element_order_h, & @@ -18,9 +17,7 @@ module adj_wt_advective_update_alg_mod use mesh_mod, only : mesh_type use invoke_adj_poly1d_recon_lookup_mod, only : invoke_adj_poly1d_recon_lookup - use adj_lookup_table_generators_alg_mod, only : create_lookup_poly1d, & - create_lookup_poly2d, & - create_lookup_poly_adv_upd + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use adj_lookup_table_mod, only : adj_lookup_table_type use integer_field_mod, only : integer_field_type @@ -49,20 +46,23 @@ contains !============================================================================= !> @brief Compute the adjoint of horizontal advective update of a Wtheta field. - !> @param[in,out] u_grad_f Horizontal part of u.grad(f) - !> @param[in] ls_wind Linearisation state wind field - !> @param[in] wind_dir Wind field used to determine direction in kernel - !> @param[in,out] field Wtheta field to advect - !> @param[in] transport_metadata Contains transport configuration options - subroutine adj_hori_wt_update_alg( u_grad_f, ls_wind, wind_dir, field, transport_metadata ) + !> @param[in,out] u_grad_f Horizontal part of u.grad(f) + !> @param[in] ls_wind Linearisation state wind field + !> @param[in] wind_dir Wind field used to determine direction in kernel + !> @param[in,out] field Wtheta field to advect + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adj_hori_wt_update_alg( u_grad_f, ls_wind, wind_dir, field, & + transport_metadata, adj_lookup_table_cache ) implicit none - type(r_tran_field_type), intent(inout) :: u_grad_f - type(r_tran_field_type), intent(in) :: ls_wind - type(r_tran_field_type), intent(in) :: wind_dir - type(r_tran_field_type), intent(inout) :: field - type(transport_metadata_type), intent(in) :: transport_metadata + type(r_tran_field_type), intent(inout) :: u_grad_f + type(r_tran_field_type), intent(in) :: ls_wind + type(r_tran_field_type), intent(in) :: wind_dir + type(r_tran_field_type), intent(inout) :: field + type(transport_metadata_type), intent(in) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache type(r_tran_field_type) :: h_reconstruction type(r_tran_field_type), pointer :: adv_coeffs @@ -80,15 +80,16 @@ contains logical(kind=l_def) :: monotone integer(kind=i_def) :: remap_depth - type(adj_lookup_table_type) :: lookup_poly - type(adj_lookup_table_type) :: lookup_poly_adv - type(integer_field_type), pointer :: lookup_poly_field - type(integer_field_type), pointer :: num_sets_poly_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup_poly + type(adj_lookup_table_type), pointer :: lookup_poly_adv + type(integer_field_type), pointer :: lookup_poly_field + type(integer_field_type), pointer :: num_sets_poly_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices - nullify(lookup_poly_field, num_sets_poly_field, mesh, & - field_ptr, multidata_fs, adv_coeffs) + nullify(lookup_poly, lookup_poly_adv, & + lookup_poly_field, num_sets_poly_field, & + mesh, field_ptr, multidata_fs, adv_coeffs) mesh => ls_wind%get_mesh() mesh_id = mesh%get_id() @@ -104,7 +105,7 @@ contains ! Copy field to a large halo version call field_big_halo%initialise( field%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) ! Compute reconstruction on a Wtheta multidata field ! each Wt point contains 4 values assigned to each edge, @@ -133,8 +134,7 @@ contains stencil_extent = 1_i_def ! Invoke lookup table kernel for adj_poly_adv_update. - call create_lookup_poly_adv_upd( lookup_poly_adv, u_grad_f, h_reconstruction, & - ls_wind, stencil_extent ) + lookup_poly_adv => adj_lookup_table_cache%get_lookup_poly_adv_upd() lookup_poly_field => lookup_poly_adv%get_lookup_field() num_sets_poly_field => lookup_poly_adv%get_set_count_field() nindices = lookup_poly_adv%get_nindices() @@ -151,10 +151,7 @@ contains else if ( oned_reconstruction ) then ! Use 1d reconstruction - ! create lookup table for stencil application. essentially a dry run - ! of the tl kernel. - call create_lookup_poly1d( lookup_poly, h_reconstruction, field_ptr, & - adv_coeffs, stencil_extent, fv_horizontal_order ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly1d() lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() @@ -165,10 +162,7 @@ contains stencil_extent) else ! Use 2d reconstruction - ! Create lookup table for stencil application. Essentially a dry run - ! of the TL kernel. - call create_lookup_poly2d( lookup_poly, h_reconstruction, field_big_halo, & - adv_coeffs, stencil_size, stencil_extent ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly2d(h_reconstruction%which_function_space()) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() diff --git a/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 index 942e1d603..dcf90b453 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 @@ -26,7 +26,7 @@ module atl_advective_and_flux_alg_mod use vertical_mass_flux_kernel_mod, only: vertical_mass_flux_kernel_type use atl_w3h_advective_update_kernel_mod, only: atl_w3h_advective_update_kernel_type use invoke_adj_w3h_adv_upd_lookup_mod, only: invoke_adj_w3h_adv_upd_lookup_kernel_type - use adj_lookup_table_generators_alg_mod, only: create_lookup_w3h_adv_upd + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type use atl_w3v_advective_update_kernel_mod, only: atl_w3v_advective_update_kernel_type @@ -53,39 +53,42 @@ contains !============================================================================! !> @brief Computes the tangent linear flux F and advective increment !> @details Compute the tangent linear mass flux and advective increment - !> @param[in,out] mass_flux_1 ACTIVE: mass flux to compute from - !! linear wind and perturbation field - !> @param[in,out] mass_flux_2 ACTIVE: mass flux to compute from - !! perturbation wind and linear field - !> @param[in,out] adv_inc ACTIVE: advective increment to compute - !> @param[in,out] density ACTIVE: W3 field to transport - !> @param[in,out] wind ACTIVE: transporting wind field - !> @param[in] ls_density PASSIVE: linearisation transported field - !> @param[in] ls_wind PASSIVE: linearisation transporting wind - !> @param[in] direction Direction of the transport - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - !> @param[in] dt Advection time step - !> @param[in] do_flux Flag to compute mass_flux = wind*density - !> @param[in] do_advective Flag to compute adv_inc = wind.grad(density) + !> @param[in,out] mass_flux_1 ACTIVE: mass flux to compute from + !! linear wind and perturbation field + !> @param[in,out] mass_flux_2 ACTIVE: mass flux to compute from + !! perturbation wind and linear field + !> @param[in,out] adv_inc ACTIVE: advective increment to compute + !> @param[in,out] density ACTIVE: W3 field to transport + !> @param[in,out] wind ACTIVE: transporting wind field + !> @param[in] ls_density PASSIVE: linearisation transported field + !> @param[in] ls_wind PASSIVE: linearisation transporting wind + !> @param[in] direction Direction of the transport + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] dt Advection time step + !> @param[in] do_flux Flag to compute mass_flux = wind*density + !> @param[in] do_advective Flag to compute adv_inc = wind.grad(density) + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_advective_and_flux_alg( mass_flux_1, mass_flux_2, adv_inc, & density, wind, ls_density, ls_wind, & direction, transport_metadata, & final_rk_stage, dt, & - do_flux, do_advective ) + do_flux, do_advective, & + adj_lookup_table_cache ) implicit none - type(field_type), intent(inout) :: mass_flux_1, mass_flux_2 - type(field_type), intent(inout) :: density, wind - type(field_type), intent(in) :: ls_density, ls_wind - type(field_type), intent(inout) :: adv_inc - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage - real(kind=r_def), intent(in) :: dt - logical(kind=l_def), intent(in) :: do_flux - logical(kind=l_def), intent(in) :: do_advective + type(field_type), intent(inout) :: mass_flux_1, mass_flux_2 + type(field_type), intent(inout) :: density, wind + type(field_type), intent(in) :: ls_density, ls_wind + type(field_type), intent(inout) :: adv_inc + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + real(kind=r_def), intent(in) :: dt + logical(kind=l_def), intent(in) :: do_flux + logical(kind=l_def), intent(in) :: do_advective + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(field_type) :: adv_inc_1, adv_inc_2 @@ -102,13 +105,13 @@ contains type(operator_type), pointer :: m3_inv integer(kind=i_def), parameter :: stencil_depth = 1 - type(adj_lookup_table_type) :: lookup_w3h - type(integer_field_type), pointer :: lookup_w3h_field - type(integer_field_type), pointer :: set_count_w3h_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup_w3h + type(integer_field_type), pointer :: lookup_w3h_field + type(integer_field_type), pointer :: set_count_w3h_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices - nullify(mesh, recon_fs, m3_inv, lookup_w3h_field, set_count_w3h_field) + nullify(mesh, recon_fs, m3_inv, lookup_w3h, lookup_w3h_field, set_count_w3h_field) mesh => density%get_mesh() @@ -204,10 +207,7 @@ contains wind, & m3_inv ) ) - ! Lookup table adjoint solution. Creation of lookup table is essentially - ! a dry-run of the TL code. - call create_lookup_w3h_adv_upd( lookup_w3h, adv_inc_1, reconstruction_field, & - wind, m3_inv, stencil_depth ) + lookup_w3h => adj_lookup_table_cache%get_lookup_w3h_adv_upd(ls_wind%which_function_space()) lookup_w3h_field => lookup_w3h%get_lookup_field() set_count_w3h_field => lookup_w3h%get_set_count_field() nindices = lookup_w3h%get_nindices() @@ -246,8 +246,9 @@ contains end if - call atl_reconstruct_w3_field_alg( reconstruction_field, density, ls_density, & - direction, transport_metadata, final_rk_stage ) + call atl_reconstruct_w3_field_alg( reconstruction_field, density, ls_density, & + direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) case ( Wtheta ) if ( do_flux ) then @@ -255,8 +256,9 @@ contains end if if ( do_advective ) then - call atl_wt_advective_update_alg( adv_inc, density, wind, ls_density, ls_wind, & - dt, direction, transport_metadata, final_rk_stage ) + call atl_wt_advective_update_alg( adv_inc, density, wind, ls_density, ls_wind, & + dt, direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) end if case default diff --git a/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 index cec84c386..802aa9d5e 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 @@ -13,6 +13,7 @@ module atl_mol_advective_alg_mod use mesh_mod, only: mesh_type ! Algorithms and transport code + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use advective_and_flux_alg_mod, only: advective_and_flux_alg use atl_advective_and_flux_alg_mod, only: atl_advective_and_flux_alg use end_of_transport_step_alg_mod, only: end_of_advective_step_alg @@ -27,7 +28,8 @@ module atl_mol_advective_alg_mod use wind_precomputations_alg_mod, only: wind_precomputations_type ! Configuration - use transport_config_mod, only: runge_kutta_method + use transport_config_mod, only: runge_kutta_method + use linear_config_mod, only: transport_efficiency implicit none @@ -37,14 +39,14 @@ contains !============================================================================= !> @brief Adjoint of tangent linear advection of a field with the MOL scheme. - !> @param[in,out] field_np1 ACTIVE Field at the end of the time step - !> @param[in] field ACTIVE Field at the start of the transport step - !> @param[in] ls_field PASSIVE Field at the start of the transport step - !> @param[in] direction Direction of advection (vertical, horizontal, or 3d) - !> @param[in,out] tl_transport_controller - !! Object controlling transport + !> @param[in,out] field_np1 ACTIVE Field at the end of the time step + !> @param[in] field ACTIVE Field at the start of the transport step + !> @param[in] ls_field PASSIVE Field at the start of the transport step + !> @param[in] direction Direction of advection (vertical, horizontal, or 3d) + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_mol_advective_alg( field_np1, field, ls_field, & - tl_transport_controller ) + tl_transport_controller, adj_lookup_table_cache ) implicit none @@ -52,11 +54,14 @@ contains type(field_type), intent(inout) :: field type(field_type), intent(in) :: ls_field type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep + integer(kind=i_def) :: ls_stage, ls_nstage integer(kind=i_def) :: number_substeps + integer(kind=i_def) :: ls_number_substeps, ls_substep integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -71,7 +76,10 @@ contains type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata + type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter + type(transport_counter_type), pointer :: ls_transport_counter + type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller type(wind_precomputations_type), pointer :: ls_wind_precomputations @@ -81,10 +89,16 @@ contains ! Extract transport objects and initialise temporary fields ! ------------------------------------------------------------------------ ! mesh => field%get_mesh() + transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_metadata => pert_transport_controller%get_transport_metadata() + ls_transport_metadata => transport_controller%get_transport_metadata() + transport_counter => pert_transport_controller%get_transport_counter() + ls_transport_counter => transport_controller%get_transport_counter() + ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -102,13 +116,24 @@ contains ) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) + + if (transport_efficiency) then + ls_number_substeps = 1 + ls_nstage =1 + else + ls_number_substeps = number_substeps + ls_nstage = nstage + end if + allocate( rk_field(nstage) ) - allocate( stored_ls_field(number_substeps, nstage) ) + allocate( stored_ls_field(ls_number_substeps, ls_nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - do substep = 1, number_substeps - call stored_ls_field(substep, stage)%initialise(field%get_function_space()) + end do + do ls_stage = 1, ls_nstage + do ls_substep = 1, ls_number_substeps + call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -135,19 +160,23 @@ contains ! array for each substep and each RK stage to use in the perturbation !--------------------------------------------------------------------------! + if (transport_efficiency) then + call invoke( setval_X(stored_ls_field(1,1), ls_field_np1 )) + else + ! Perform the number of rk-stages and substeps required - do substep = 1, number_substeps + do substep = 1, ls_number_substeps ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - do stage = 1, nstage + do stage = 1, ls_nstage ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state call invoke( setval_X(stored_ls_field(substep, stage), ls_field_np1) ) - final_rk_stage = ( stage == nstage ) + final_rk_stage = ( stage == ls_nstage ) ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) @@ -158,9 +187,9 @@ contains end do ! Compute update: rhs = u.grad(rhs_field) - call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & - ls_advecting_wind, direction, & - transport_metadata, final_rk_stage, & + call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & + ls_advecting_wind, direction, & + ls_transport_metadata, final_rk_stage, & dt_mol_substep, .false., .true. ) ! Update field: f = f^n - dt*rhs @@ -170,10 +199,12 @@ contains end do ! End of step: if necessary enforce min val and overwrite in blending zone - call end_of_advective_step_alg( & - ls_field_np1, ls_field_n, transport_counter, transport_metadata & + call end_of_advective_step_alg( & + ls_field_np1, ls_field_n, ls_transport_counter, ls_transport_metadata & ) + end if + ! -------------------------------------------------------------------------- ! Perturbation ! @@ -199,21 +230,32 @@ contains ! Perform the number of rk-stages and substeps required do substep = number_substeps, 1, -1 + if (transport_efficiency) then + ls_substep = 1 + else + ls_substep = substep + end if + do stage = nstage, 1, -1 + if (transport_efficiency) then + ls_stage = 1 + else + ls_stage = stage + end if + final_rk_stage = ( stage == nstage ) ! Update field: f = f^n - dt_substep*rhs call invoke( inc_X_minus_bY( rhs, dt_mol_substep, field_np1 ), & - inc_X_plus_Y( field_n, field_np1 ), & - setval_c( field_np1, 0.0_r_def ) ) + inc_X_plus_Y( field_n, field_np1 ) ) ! Compute update: rhs = u.grad(rhs_field) call atl_advective_and_flux_alg( & dummy, dummy, rhs, rhs_field, advecting_wind, & - stored_ls_field(substep, stage), ls_advecting_wind, & + stored_ls_field(ls_substep, ls_stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, dt_mol_substep, & - .false., .true. & + .false., .true., adj_lookup_table_cache & ) do s = stage, 1, -1 @@ -222,8 +264,8 @@ contains ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) - call invoke( setval_c( rhs_field, 0.0_r_def ), & - inc_X_plus_Y( field_np1, rk_field(stage) ), & + call invoke( setval_c( rhs_field, 0.0_r_def ), & + setval_x( field_np1, rk_field(stage) ), & setval_c( rk_field(stage), 0.0_r_def ) ) end do ! stage diff --git a/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 index 2e3c9f65d..fc9502e2d 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 @@ -19,6 +19,7 @@ module atl_mol_conservative_alg_mod tik, LPROF ! Algorithms and transport code + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use advective_and_flux_alg_mod, only: advective_and_flux_alg use atl_advective_and_flux_alg_mod, only: atl_advective_and_flux_alg use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg @@ -27,7 +28,7 @@ module atl_mol_conservative_alg_mod use runge_kutta_init_mod, only: get_rk_transport_weights use split_transport_utils_mod, only: get_num_split_steps, & get_splitting_direction - use transport_constants_mod, only: get_directional_im3_div + use transport_constants_mod, only: get_directional_im3_div_r_tran use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -41,6 +42,7 @@ module atl_mol_conservative_alg_mod ! Configuration use boundaries_config_mod, only: limited_area use base_mesh_config_mod, only: topology, topology_non_periodic + use linear_config_mod, only: transport_efficiency use transport_config_mod, only: runge_kutta_method, & dry_field_name, & operators, & @@ -54,27 +56,30 @@ module atl_mol_conservative_alg_mod !============================================================================= !> @brief Adjoint of tangent linear transport (conservative-form) with the MOL scheme. - !> @param[in,out] field_np1 ACTIVE Field at the end of the time step - !> @param[in,out] field ACTIVE Field at the start of the transport step - !> @param[in] ls_field PASSIVE Field at the start of the transport step - !> @param[in,out] tl_transport_controller - !! Object controlling transport + !> @param[in,out] field_np1 ACTIVE Field at the end of the time step + !> @param[in,out] field ACTIVE Field at the start of the transport step + !> @param[in] ls_field PASSIVE Field at the start of the transport step + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_mol_conservative_alg( field_np1, field, ls_field, & - tl_transport_controller ) + tl_transport_controller, adj_lookup_table_cache ) implicit none ! Arguments type(field_type), intent(inout) :: field_np1 type(field_type), intent(inout) :: field - type(field_type), intent(in) :: ls_field + type(field_type), intent(in) :: ls_field type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: mesh_id integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep - integer(kind=i_def) :: number_substeps + integer(kind=i_def) :: ls_nstage, ls_substep + integer(kind=i_def) :: ls_stage, number_substeps + integer(kind=i_def) :: ls_number_substeps integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -102,7 +107,9 @@ module atl_mol_conservative_alg_mod type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata + type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter + type(transport_counter_type), pointer :: ls_transport_counter type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller @@ -123,11 +130,18 @@ module atl_mol_conservative_alg_mod transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_metadata => pert_transport_controller%get_transport_metadata() + ls_transport_metadata => transport_controller%get_transport_metadata() + transport_counter => pert_transport_controller%get_transport_counter() + ls_transport_counter => transport_controller%get_transport_counter() + flux_precomputations => transport_controller%get_flux_precomputations() + ls_wind_flux_precomp => ls_transport_controller%get_flux_precomputations() pert_wind_flux_precomp => pert_transport_controller%get_flux_precomputations() + ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -143,16 +157,27 @@ module atl_mol_conservative_alg_mod dt_mol_substep = ls_wind_precomputations%get_dt_mol_substep( & mesh%get_id(), direction, splitting, step & ) - div => get_directional_im3_div(mesh_id, direction) + div => get_directional_im3_div_r_tran(mesh_id, direction) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) + + if (transport_efficiency) then + ls_nstage = 1 + ls_number_substeps = 1 + else + ls_nstage = nstage + ls_number_substeps = number_substeps + end if + allocate( rk_field(nstage) ) - allocate( stored_ls_field(number_substeps,nstage) ) + allocate( stored_ls_field(ls_number_substeps,ls_nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - do substep = 1, number_substeps - call stored_ls_field(substep, stage)%initialise(field%get_function_space()) + end do + do ls_stage = 1, ls_nstage + do ls_substep = 1, ls_number_substeps + call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -187,20 +212,24 @@ module atl_mol_conservative_alg_mod ! This calculates the values of ls_field. These are stored as an ! array for each substep and each RK stage to use in the perturbation ! ======================================================================== ! + + if ( transport_efficiency ) then + call invoke( setval_X( stored_ls_field(1,1), ls_field_np1 ) ) + else ! ------------------------------------------------------------------------ ! ! Start of substepping loop ! ------------------------------------------------------------------------ ! - ls_substep_loop: do substep = 1, number_substeps + ls_substep_loop: do substep = 1, ls_number_substeps - final_substep = ( substep == number_substeps ) + final_substep = ( substep == ls_number_substeps ) ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - ls_stage_loop: do stage = 1, nstage + ls_stage_loop: do stage = 1, ls_nstage - final_rk_stage = ( stage == nstage ) + final_rk_stage = ( stage == ls_nstage ) ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state @@ -241,7 +270,7 @@ module atl_mol_conservative_alg_mod call advective_and_flux_alg(flux_step, adv_inc, rhs_field, ls_field_n, & ls_advecting_wind, direction, & - transport_metadata, final_rk_stage, & + ls_transport_metadata, final_rk_stage, & dt_mol_substep, do_flux, do_advective) if ( do_flux ) then @@ -284,9 +313,11 @@ module atl_mol_conservative_alg_mod ! increment, and may be adjusted to enforce min value or in blending zone call end_of_conservative_step_alg( & ls_field_np1, ls_field, ls_sum_flux, flux_precomputations, & - transport_counter, transport_metadata & + ls_transport_counter, ls_transport_metadata & ) + end if + ! ======================================================================== ! ! Perturbation ! @@ -324,6 +355,12 @@ module atl_mol_conservative_alg_mod ! ------------------------------------------------------------------------ ! substep_loop: do substep = number_substeps, 1, -1 + if (transport_efficiency) then + ls_substep = 1 + else + ls_substep = substep + end if + final_substep = ( substep == number_substeps ) ! ---------------------------------------------------------------------- ! @@ -340,6 +377,12 @@ module atl_mol_conservative_alg_mod stage_loop: do stage = nstage, 1, -1 + if (transport_efficiency) then + ls_stage = 1 + else + ls_stage = stage + end if + final_rk_stage = ( stage == nstage ) ! -------------------------------------------------------------------- ! @@ -381,16 +424,15 @@ module atl_mol_conservative_alg_mod end if if ( do_advective ) then call invoke( inc_X_minus_bY( adv_inc, dt_mol_substep, field_np1 ), & - inc_X_plus_Y( field_n, field_np1 ), & - setval_c( field_np1, 0.0_r_def ) ) + inc_X_plus_Y( field_n, field_np1 ) ) end if call atl_advective_and_flux_alg( & flux_step_ls_wind, flux_step_pert_wind, adv_inc, & rhs_field, advecting_wind, & - stored_ls_field(substep,stage), ls_advecting_wind, & + stored_ls_field(ls_substep,ls_stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, & - dt_mol_substep, do_flux, do_advective & + dt_mol_substep, do_flux, do_advective, adj_lookup_table_cache & ) do s = stage, 1, -1 @@ -399,8 +441,8 @@ module atl_mol_conservative_alg_mod ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) - call invoke( setval_c( rhs_field, 0.0_r_def ), & - inc_X_plus_Y( field_np1, rk_field(stage) ), & + call invoke( setval_c( rhs_field, 0.0_r_def ), & + setval_x( field_np1, rk_field(stage) ), & setval_c( rk_field(stage), 0.0_r_def ) ) end do stage_loop diff --git a/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 index 7aff24650..a4bf5ff64 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 @@ -52,24 +52,29 @@ contains !============================================================================= !> @brief Reconstruct a W3 field at W2 points for adjoint app. - !> @param[in,out] field_new ACTIVE Reconstructed field at W2 points - !> @param[in,out] field_old ACTIVE Initial W3 field - !> @param[in] ls_field_old PASSIVE Initial W3 field - !> @param[in] direction Splitting direction (h, v, or 3d) to - !! compute reconstruction - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - subroutine atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & - direction, transport_metadata, final_rk_stage ) + !> @param[in,out] field_new ACTIVE Reconstructed field at W2 points + !> @param[in,out] field_old ACTIVE Initial W3 field + !> @param[in] ls_field_old PASSIVE Initial W3 field + !> @param[in] direction Splitting direction (h, v, or 3d) to + !! compute reconstruction + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & + direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) + + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type implicit none - type(field_type), intent(inout) :: field_old - type(field_type), intent(in) :: ls_field_old - type(field_type), intent(inout) :: field_new - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage + type(field_type), intent(inout) :: field_old + type(field_type), intent(in) :: ls_field_old + type(field_type), intent(inout) :: field_new + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache type(mesh_type), pointer :: mesh type(field_type) :: field_new_h, field_new_v @@ -119,11 +124,11 @@ contains ls_field_old, transport_metadata, & final_rk_stage ) call adj_hori_w3_reconstruct_alg( field_new_h, field_old, & - transport_metadata ) + transport_metadata, adj_lookup_table_cache ) case ( direction_h ) call adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata ) + transport_metadata, adj_lookup_table_cache ) case ( direction_v ) call atl_vert_w3_reconstruct_alg( field_new, field_old, & ls_field_old, transport_metadata, & diff --git a/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 index 09093efb6..f059c160c 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 @@ -48,21 +48,23 @@ contains !============================================================================= !> @brief Compute advective update of a Wtheta field for adjoint app. - !> @param[in,out] rhs ACTIVE Change in Advective increment - !> @param[in] adv_field ACTIVE Change in Field to advect - !> @param[in] wind ACTIVE Change in Advecting wind field - !> @param[in] ls_adv_field Lin state for Field to advect - !> @param[in] ls_wind Lin state for Advecting wind field - !> @param[in] dt Timestep - !> @param[in] direction Direction of the transport - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - subroutine atl_wt_advective_update_alg( rhs, adv_field, wind, & - ls_adv_field, ls_wind, & - dt, direction, & - transport_metadata, final_rk_stage ) - - + !> @param[in,out] rhs ACTIVE Change in Advective increment + !> @param[in] adv_field ACTIVE Change in Field to advect + !> @param[in] wind ACTIVE Change in Advecting wind field + !> @param[in] ls_adv_field Lin state for Field to advect + !> @param[in] ls_wind Lin state for Advecting wind field + !> @param[in] dt Timestep + !> @param[in] direction Direction of the transport + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_wt_advective_update_alg( rhs, adv_field, wind, & + ls_adv_field, ls_wind, & + dt, direction, & + transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) + + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use reference_element_mod, only : reference_element_type use mesh_mod, only : mesh_type use adj_wt_advective_update_alg_mod, only : adj_hori_wt_update_alg @@ -70,13 +72,14 @@ contains implicit none - type(field_type), intent(inout) :: adv_field, wind - type(field_type), intent(in) :: ls_adv_field, ls_wind - type(field_type), intent(inout) :: rhs - real(kind=r_def), intent(in) :: dt - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage + type(field_type), intent(inout) :: adv_field, wind + type(field_type), intent(in) :: ls_adv_field, ls_wind + type(field_type), intent(inout) :: rhs + real(kind=r_def), intent(in) :: dt + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache type(field_type) :: u_grad_f type(field_type) :: wind_v @@ -134,7 +137,8 @@ contains ! Horizontal update call atl_hori_wt_update_alg( u_grad_f, wind_h, ls_wind_h, ls_adv_field, transport_metadata ) - call adj_hori_wt_update_alg( u_grad_f, ls_wind_h, ls_wind_h, adv_field, transport_metadata ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind_h, ls_wind_h, adv_field, transport_metadata, & + adj_lookup_table_cache ) call invoke( adj_split_w2_field_kernel_type(wind_h, wind_v, wind, & face_selector_ew, & @@ -143,7 +147,8 @@ contains case ( direction_h ) call atl_hori_wt_update_alg( u_grad_f, wind, ls_wind, ls_adv_field, transport_metadata ) - call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, adv_field, transport_metadata ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, adv_field, transport_metadata, & + adj_lookup_table_cache ) case ( direction_v ) @@ -170,7 +175,6 @@ contains !> @param[in] transport_metadata Contains transport configuration options subroutine atl_hori_wt_update_alg(u_grad_f, wind, wind_dir, ls_field, transport_metadata) - use check_configuration_mod, only : get_required_stencil_depth use poly1d_reconstruction_kernel_mod, only : poly1d_reconstruction_kernel_type use poly2d_reconstruction_kernel_mod, only : poly2d_reconstruction_kernel_type use polyh_wtheta_koren_kernel_mod, only : polyh_wtheta_koren_kernel_type @@ -223,7 +227,7 @@ contains ! Copy field to a large halo version call ls_field_big_halo%initialise( ls_field%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_X( ls_field_big_halo, ls_field ) ) ! Compute reconstruction on a Wtheta multidata field diff --git a/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 b/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 new file mode 100644 index 000000000..797685522 --- /dev/null +++ b/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 @@ -0,0 +1,177 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief (Adjoint of) computes u_inc, the change in TLM velocity due to TLM boundary layer processes. +module atl_bl_inc_kernel_mod + + use argument_mod, only : arg_type, & + GH_FIELD, GH_OPERATOR, & + GH_SCALAR, GH_INTEGER, & + GH_READ, GH_INC, & + GH_REAL, CELL_COLUMN, & + ANY_DISCONTINUOUS_SPACE_1 + use constants_mod, only : r_def, i_def, r_um + use fs_continuity_mod, only : W1, W2, W3 + use kernel_mod, only : kernel_type + use reference_element_mod, only : N + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + + type, public, extends(kernel_type) :: atl_bl_inc_kernel_type + private + type(arg_type) :: meta_args(7) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! u_inc + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! u + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Auv + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Buv_inv + arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew + arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew + arg_type(GH_SCALAR, GH_INTEGER, GH_READ) & ! Blevs_m + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: atl_bl_inc_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: atl_bl_inc_code + +contains + +!> @brief (Adjoint of) computes u_inc, the change in TLM velocity due to TLM boundary layer processes. +!> @details The algorithm uses coefficients Auv and Buv_inv computed in tl_compute_aubu_kernel_mod. +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!! @param[in] nlayers Number of layers +!! @param[in,out] u_inc Change in TLM velocity due to TLM boundary layer processes +!! @param[in] u TLM velocity +!! @param[in] nlayers Number of layers +!! @param[in] Auv Coefficient for TLM boundary layer +!! @param[in] Buv_inv Inverse of coefficient for TLM boundary layer +!! @param[in] face_selector_ew 2D field indicating which W/E faces to loop over in this column +!! @param[in] face_selector_ns 2D field indicating which N/S faces to loop over in this column +!! @param[in] Blevs_m Number of levels in momentum boundary layer +!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space +!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space +!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 +!! @param[in] ndf_w3_2d Number of DoFs for 2D W3 per cell +!! @param[in] undf_w3_2d Number of DoFs for this partition for 2D W3 +!! @param[in] map_w3_2d Map for 2D W3 +subroutine atl_bl_inc_code( nlayers, & + u_inc, & + u, & + Auv, & + Buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m, & + ndf_w2, undf_w2, map_w2, & + ndf_w3_2d, undf_w3_2d, map_w3_2d ) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: undf_w2 + real(kind=r_def), dimension(undf_w2), intent(inout) :: u_inc + real(kind=r_def), dimension(undf_w2), intent(inout) :: u + integer(kind=i_def), intent(in) :: ndf_w2 + integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 + real(kind=r_def), dimension(undf_w2), intent(in) :: auv + real(kind=r_def), dimension(undf_w2), intent(in) :: buv_inv + integer(kind=i_def), intent(in) :: ndf_w3_2d + integer(kind=i_def), intent(in) :: undf_w3_2d + integer(kind=i_def), dimension(ndf_w3_2d), intent(in) :: map_w3_2d + integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ew + integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ns + integer(kind=i_def), intent(in) :: blevs_m + + ! Internal variables + integer(kind=i_def) :: df + integer(kind=i_def) :: k + integer(kind=i_def) :: j + real(kind=r_def), dimension(blevs_m) :: a0 ! Coefficient + real(kind=r_def), dimension(blevs_m) :: a1 ! Coefficient + real(kind=r_def), dimension(blevs_m) :: a2 ! Coefficient + real(kind=r_def), dimension(blevs_m) :: u_rhs ! Local perturbation velocity variable + real(kind=r_def), dimension(blevs_m) :: u_out ! Local perturbation velocity variable + real(kind=r_def), dimension(blevs_m) :: factor_u + + do j = face_selector_ew(map_w3_2d(1)) + face_selector_ns(map_w3_2d(1)), 1, -1 + + df = j + if (j == 3 .and. face_selector_ns(map_w3_2d(1)) == 2 .and. face_selector_ew(map_w3_2d(1)) == 1) df = n + + u_out = 0.0_r_def + + ! Set up coeffs a0, a1, a2, u_rhs + a0(1) = 1.0_r_def + (Auv(map_w2(df) + 1) + Auv(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) + a1(1) = -Auv(map_w2(df) + 1) / Buv_inv(map_w2(df) + 1) + a2(1) = 0.0_r_def + + do k = 2, BLevs_m - 1 + a0(k) = 1.0_r_def + (Auv(map_w2(df) + k) + Auv(map_w2(df) + k - 1)) / Buv_inv(map_w2(df) + k) + a1(k) = -Auv(map_w2(df) + k) / Buv_inv(map_w2(df) + k) + a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) + end do + + a0(BLevs_m) = 1.0_r_def + Auv(map_w2(df) + BLevs_m - 1) / Buv_inv(map_w2(df) + BLevs_m) + a1(BLevs_m) = 0.0_r_def + a2(BLevs_m) = -Auv(map_w2(df) + BLevs_m - 1) / Buv_inv(map_w2(df) + BLevs_m) + + a0(1) = 1.0_r_def / a0(1) + + do k = 2, BLevs_m + factor_u(k) = a2(k) * a0(k - 1) + a0(k) = 1.0_r_def / (a0(k) - factor_u(k) * a1(k - 1)) + end do + + ! (Adjoint of) solve for u_inc and transform to upper triangular form + do k = 1, blevs_m - 1 + u_out(k) = u_out(k) + u_inc(map_w2(df) + k - 1) + u_inc(map_w2(df) + k - 1) = 0.0_r_def + + u_out(k + 1) = u_out(k + 1) + (-a0(k) * a1(k) * u_out(k)) + u_rhs(k) = a0(k) * u_out(k) + end do + + u_out(blevs_m) = u_out(blevs_m) + u_inc(map_w2(df) + blevs_m - 1) + u_inc(map_w2(df) + blevs_m - 1) = 0.0_r_def + + u_rhs(blevs_m) = a0(blevs_m) * u_out(blevs_m) + + do k = blevs_m, 2, -1 + u_rhs(k - 1) = u_rhs(k - 1) + (-factor_u(k) * u_rhs(k)) + end do + + u(blevs_m + map_w2(df) - 2) = u(blevs_m + map_w2(df) - 2) + & + auv(blevs_m + map_w2(df) - 1) * u_rhs(blevs_m) / buv_inv(blevs_m + map_w2(df)) + u(blevs_m + map_w2(df) - 1) = u(blevs_m + map_w2(df) - 1) - & + auv(blevs_m + map_w2(df) - 1) * u_rhs(blevs_m) / buv_inv(blevs_m + map_w2(df)) + + do k = blevs_m - 1, 2, -1 + u(k + map_w2(df)) = u(k + map_w2(df)) + auv(k + map_w2(df)) * u_rhs(k) / buv_inv(k + map_w2(df)) + u(k + map_w2(df) - 1) = u(k + map_w2(df) - 1) - auv(k + map_w2(df)) * u_rhs(k) / buv_inv(k + map_w2(df)) + u(k + map_w2(df) - 2) = u(k + map_w2(df) - 2) + auv(k + map_w2(df) - 1) * u_rhs(k) / buv_inv(k + map_w2(df)) + u(k + map_w2(df) - 1) = u(k + map_w2(df) - 1) - auv(k + map_w2(df) - 1) * u_rhs(k) / buv_inv(k + map_w2(df)) + end do + + u(map_w2(df) + 1) = u(map_w2(df) + 1) + auv(map_w2(df) + 1) * u_rhs(1) / buv_inv(map_w2(df) + 1) + u(map_w2(df)) = u(map_w2(df)) - auv(map_w2(df) + 1) * u_rhs(1) / buv_inv(map_w2(df) + 1) + u(map_w2(df)) = u(map_w2(df)) - auv(map_w2(df)) * u_rhs(1) / buv_inv(map_w2(df) + 1) + + end do + +end subroutine atl_bl_inc_code + +end module atl_bl_inc_kernel_mod diff --git a/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 b/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 index d28895016..e330c4bad 100644 --- a/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 +++ b/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 @@ -129,7 +129,6 @@ subroutine atl_poly1d_vert_w3_reconstruction_code( nlayers, & real(kind=r_def) :: new_tracer real(kind=r_def) :: ls_new_tracer - new_tracer = 0.0_r_def vertical_order = MIN(global_order, nlayers - 1) ij = map_w3(1) if (logspace) then @@ -140,26 +139,24 @@ subroutine atl_poly1d_vert_w3_reconstruction_code( nlayers, & ik = f * global_order + f + k * ndata + p + map_c(1) - 1 ls_new_tracer = ls_new_tracer * MAX(eps, ABS(ls_tracer(ij + stencil(p,k,f)))) ** coeff(ik) end do - new_tracer = new_tracer + ls_new_tracer * reconstruction(map_md(1) + f * nlayers + k) + new_tracer = ls_new_tracer * reconstruction(map_md(1) + f * nlayers + k) reconstruction(map_md(1) + f * nlayers + k) = 0.0_r_def do p = vertical_order + 1, 1, -1 ik = f * global_order + f + k * ndata + p + map_c(1) - 1 tracer(ij + stencil(p,k,f)) = tracer(ij + stencil(p,k,f)) + coeff(ik) * new_tracer / SIGN(MAX(eps, ls_tracer(ij + & &stencil(p,k,f))), ls_tracer(ij + stencil(p,k,f))) enddo - new_tracer = 0.0_r_def enddo enddo else do f = 1, 0, -1 do k = nlayers - 1, 0, -1 - new_tracer = new_tracer + reconstruction(map_md(1) + f * nlayers + k) + new_tracer = reconstruction(map_md(1) + f * nlayers + k) reconstruction(map_md(1) + f * nlayers + k) = 0.0_r_def do p = vertical_order + 1, 1, -1 ik = f * global_order + f + k * ndata + p + map_c(1) - 1 tracer(ij + stencil(p,k,f)) = tracer(ij + stencil(p,k,f)) + coeff(ik) * new_tracer enddo - new_tracer = 0.0_r_def enddo enddo end if diff --git a/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 b/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 index 972aa52d6..e1a89201b 100644 --- a/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 +++ b/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 @@ -152,10 +152,7 @@ subroutine atl_poly_adv_update_code( nlayers, & real(kind=r_tran) :: ls_dtdy - uv = 0.0_r_tran - v_dot_n(:) = 1.0_r_tran - v_dot_n(1) = -1.0_r_tran - v_dot_n(nfaces) = -1.0_r_tran + v_dot_n = (/ -1.0_r_tran, 1.0_r_tran, 1.0_r_tran, -1.0_r_tran /) opposite(:) = -1 missing_neighbour(:) = .false. @@ -186,9 +183,7 @@ subroutine atl_poly_adv_update_code( nlayers, & uv_dir(1,k) = 0.25_r_tran * wind_dir(k + map_w2(1) - 1) + 0.25_r_tran * wind_dir(k + map_w2(3) - 1) uv_dir(2,k) = 0.25_r_tran * wind_dir(k + map_w2(2) - 1) + 0.25_r_tran * wind_dir(k + map_w2(4) - 1) - direction_dofs(:) = 1 - direction_dofs(2) = 2 - direction_dofs(4) = 2 + direction_dofs(:) = (/ 1, 2, 1, 2 /) do df = 1, nfaces, 1 do k = 0, nlayers, 1 @@ -206,39 +201,33 @@ subroutine atl_poly_adv_update_code( nlayers, & do k = nlayers, 0, -1 ls_dtdx = ls_tracer(e,k) - ls_tracer(w,k) ls_dtdy = ls_tracer(n,k) - ls_tracer(s,k) - uv(1,k) = uv(1,k) + ls_dtdx * advective(map_wt(1) + k) - uv(2,k) = uv(2,k) - ls_dtdy * advective(map_wt(1) + k) + uv(1,k) = ls_dtdx * advective(map_wt(1) + k) + uv(2,k) = -ls_dtdy * advective(map_wt(1) + k) advective(map_wt(1) + k) = 0.0_r_tran enddo k = nlayers wind(k + map_w2(2) - 1) = wind(k + map_w2(2) - 1) + 0.25_r_tran * uv(2,k) wind(k + map_w2(4) - 1) = wind(k + map_w2(4) - 1) + 0.25_r_tran * uv(2,k) - uv(2,k) = 0.0_r_tran wind(k + map_w2(1) - 1) = wind(k + map_w2(1) - 1) + 0.25_r_tran * uv(1,k) wind(k + map_w2(3) - 1) = wind(k + map_w2(3) - 1) + 0.25_r_tran * uv(1,k) - uv(1,k) = 0.0_r_tran do k = nlayers - 1, 1, -1 wind(k + map_w2(2)) = wind(k + map_w2(2)) + 0.25_r_tran * uv(2,k) wind(k + map_w2(4)) = wind(k + map_w2(4)) + 0.25_r_tran * uv(2,k) wind(k + map_w2(2) - 1) = wind(k + map_w2(2) - 1) + 0.25_r_tran * uv(2,k) wind(k + map_w2(4) - 1) = wind(k + map_w2(4) - 1) + 0.25_r_tran * uv(2,k) - uv(2,k) = 0.0_r_tran wind(k + map_w2(1)) = wind(k + map_w2(1)) + 0.25_r_tran * uv(1,k) wind(k + map_w2(3)) = wind(k + map_w2(3)) + 0.25_r_tran * uv(1,k) wind(k + map_w2(1) - 1) = wind(k + map_w2(1) - 1) + 0.25_r_tran * uv(1,k) wind(k + map_w2(3) - 1) = wind(k + map_w2(3) - 1) + 0.25_r_tran * uv(1,k) - uv(1,k) = 0.0_r_tran enddo k = 0 wind(map_w2(2)) = wind(map_w2(2)) + 0.25_r_tran * uv(2,k) wind(map_w2(4)) = wind(map_w2(4)) + 0.25_r_tran * uv(2,k) - uv(2,k) = 0.0_r_tran wind(map_w2(1)) = wind(map_w2(1)) + 0.25_r_tran * uv(1,k) wind(map_w2(3)) = wind(map_w2(3)) + 0.25_r_tran * uv(1,k) - uv(1,k) = 0.0_r_tran end subroutine atl_poly_adv_update_code diff --git a/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 b/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 index fca1ec80a..021af5e9d 100644 --- a/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 +++ b/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 @@ -165,8 +165,6 @@ subroutine atl_w3h_advective_update_code( cell, & ! so if u.n > 0 then we set the field to be the value on this edge from this cell ! and if u.n < 0 then we set the field to be the value on this edge from a ! neighbouring cell - u = 0.0_r_def - v = 0.0_r_def do k = nlayers - 1, 0, -1 ! u * dt/dx @@ -218,16 +216,14 @@ subroutine atl_w3h_advective_update_code( cell, & dtdy = t_N - t_S ik = 1 + k + (cell-1)*nlayers - u = u + m3_inv(ik,1,1) * dtdx * advective_increment(map_w3(1)+k) - v = v + m3_inv(ik,1,1) * dtdy * advective_increment(map_w3(1)+k) + u = m3_inv(ik,1,1) * dtdx * advective_increment(map_w3(1)+k) + v = m3_inv(ik,1,1) * dtdy * advective_increment(map_w3(1)+k) wind(map_w2(2) + k) = wind(map_w2(2) + k) - 0.5_r_def * v wind(map_w2(4) + k) = wind(map_w2(4) + k) - 0.5_r_def * v - v = 0.0_r_def wind(map_w2(1) + k) = wind(map_w2(1) + k) + 0.5_r_def * u wind(map_w2(3) + k) = wind(map_w2(3) + k) + 0.5_r_def * u - u = 0.0_r_def end do end subroutine atl_w3h_advective_update_code diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 6509e025e..097ef7552 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -19,7 +19,6 @@ program cma_test use, intrinsic :: iso_fortran_env, only : real64 - use check_configuration_mod, only : get_required_stencil_depth use cma_test_algorithm_mod, only : cma_test_init, & test_cma_apply_mass_p, & test_cma_apply_mass_v, & @@ -132,7 +131,7 @@ program cma_test type(namelist_type), pointer :: base_mesh_nml type(namelist_type), pointer :: planet_nml - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) character(str_def) :: file_prefix character(str_def) :: prime_mesh_name real(r_def) :: radius @@ -294,7 +293,7 @@ program cma_test domain_height, & scaled_radius ) ) - stencil_depth = get_required_stencil_depth() + stencil_depth = 2 check_partitions = .false. call init_mesh( config, & diff --git a/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf b/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf index 23e80bd51..4380951b7 100644 --- a/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf +++ b/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf @@ -4705,7 +4705,7 @@ ns=namelist/Science [namelist:physics=bl_segment] compulsory=true description=Over-rides bl_segment_size in physics -fail-if=this <= 0 ; +fail-if=this < 0 ; help=Boundary layer segment size. = =Setting bl_segment=0 will trigger the default behaviour @@ -4783,7 +4783,7 @@ values='fast','slow' [namelist:physics=gw_segment] compulsory=true description=Over-rides gw_seg_size in um physics -fail-if=this <= 0 ; +fail-if=this < 0 ; help=Break segments gravity wave. = =Setting gw_segment=0 will trigger the default behaviour @@ -5810,9 +5810,22 @@ sort-key=Panel-A25 trigger= type=real +[namelist:transport=adjust_tracer_equation] +compulsory=true +description=Adjusts the equation form of conservative tracer groups to + =advective form if Watkins algorithm is unable to fix large + =Lipschitz numbers for consistent transport. This will break + =tracer convservation for any time steps this is needed. +fail-if= +help=Must be used with FFSL and SWIFT splittings +!kind=default +sort-key=Panel-A31 +trigger= +type=logical + [namelist:transport=adjust_vhv_wind] compulsory=true -description=Adujsts the first and final vertical winds in a Strang VHV splitting +description=Adjusts the first and final vertical winds in a Strang VHV splitting =to avoid breaking any Lipschitz condition. fail-if= help=Must be used with 3D FFSL and SWIFT splittings diff --git a/science/gungho/rose-meta/lfric-gungho/versions.py b/science/gungho/rose-meta/lfric-gungho/versions.py index 49f208fd0..50d1223d6 100644 --- a/science/gungho/rose-meta/lfric-gungho/versions.py +++ b/science/gungho/rose-meta/lfric-gungho/versions.py @@ -29,7 +29,6 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports @@ -109,5 +108,47 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) return config, self.reports diff --git a/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 b/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 index 172fd6652..8f81cc672 100644 --- a/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 +++ b/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 @@ -225,7 +225,6 @@ contains use matrix_vector_kernel_mod, only: matrix_vector_kernel_type use sci_average_w2b_to_w2_kernel_mod, & only: average_w2b_to_w2_kernel_type - use sci_w3_to_w2_average_kernel_mod, only: w3_to_w2_average_kernel_type use sci_w3_to_w2_correction_kernel_mod, & only: w3_to_w2_correction_kernel_type use timing_mod, only: start_timing, stop_timing, & @@ -239,6 +238,8 @@ contains type( field_type ) :: r_u type( field_type ) :: u_broken type( field_type ) :: u_lat_w2, u_lon_w2, u_up_w2 + type( field_type ) :: u_lat_large, u_lon_large + type( field_type ) :: u_correction type( field_type ), pointer :: rmultiplicity_w2 type( field_type ), pointer :: displacement type( field_type ), pointer :: chi(:) @@ -246,6 +247,7 @@ contains type( operator_type ), pointer :: u_lon_map type( operator_type ), pointer :: u_lat_map type( operator_type ), pointer :: u_up_map + type( function_space_type ), pointer :: w2_fs type( function_space_type ), pointer :: w2b_fs type( mesh_type ), pointer :: mesh @@ -255,44 +257,7 @@ contains mesh => u%get_mesh() - if (sample_physics_winds .and. sample_physics_winds_correction) then - - chi => get_coordinates(mesh%get_id()) - rmultiplicity_w2 => get_rmultiplicity_fv(W2, mesh%get_id()) - panel_id => get_panel_id(mesh%get_id()) - call u_lon_w2%initialise( u%get_function_space() ) - call u_lat_w2%initialise( u%get_function_space() ) - call u_up_w2%initialise( u%get_function_space() ) - - call invoke( setval_c(u_lon_w2, 0.0_r_def), & - setval_c(u_lat_w2, 0.0_r_def), & - setval_c(u_up_w2, 0.0_r_def), & - w3_to_w2_average_kernel_type(u_lon_w2, u_lon, & - rmultiplicity_w2), & - w3_to_w2_average_kernel_type(u_lat_w2, u_lat, & - rmultiplicity_w2), & - w3_to_w2_average_kernel_type(u_up_w2, u_up, & - rmultiplicity_w2) ) - - ! Apply correction - if (geometry == geometry_spherical .and. topology == topology_fully_periodic) then - displacement => get_w3_to_w2_displacement(mesh%get_id()) - ! Correct horizontal winds - ! Vertical wind not needed for horizontal W2 DoFs, so don't correct - call invoke( w3_to_w2_correction_kernel_type(u_lon_w2, u_lon, 1, & - displacement, & - panel_id, 1), & - w3_to_w2_correction_kernel_type(u_lat_w2, u_lat, 1, & - displacement, & - panel_id, 1) ) - end if - - ! Convert from physical wind components into computational wind - call invoke( convert_phys_to_hdiv_kernel_type(u, u_lon_w2, u_lat_w2, & - u_up_w2, chi, panel_id, & - geometry) ) - - else if (sample_physics_winds) then + if (sample_physics_winds) then w2b_fs => function_space_collection%get_fs(mesh, 0, 0, W2broken) rmultiplicity_w2 => get_rmultiplicity_fv(W2, mesh%get_id()) @@ -309,6 +274,44 @@ contains dg_inc_matrix_vector_kernel_type(u_broken, u_up, u_up_map), & average_w2b_to_w2_kernel_type(u, u_broken, rmultiplicity_w2) ) + if (sample_physics_winds_correction & + .and. geometry == geometry_spherical & + .and. topology == topology_fully_periodic) then + + w2_fs => u%get_function_space() + call u_lon_w2%initialise( w2_fs ) + call u_lat_w2%initialise( w2_fs ) + call u_up_w2%initialise( w2_fs ) + call u_correction%initialise( w2_fs ) + call u_lon_large%initialise( u_lon%get_function_space(), halo_depth=2 ) + call u_lat_large%initialise( u_lat%get_function_space(), halo_depth=2 ) + + displacement => get_w3_to_w2_displacement(mesh%get_id()) + chi => get_coordinates(mesh%get_id()) + panel_id => get_panel_id(mesh%get_id()) + + call invoke( setval_c(u_lon_w2, 0.0_r_def), & + setval_c(u_lat_w2, 0.0_r_def), & + setval_c(u_up_w2, 0.0_r_def), & + ! Copy u_lon and u_lat to fields with appropriate depth + setval_X(u_lon_large, u_lon), & + setval_X(u_lat_large, u_lat), & + ! Correct horizontal wind components (but not vertical) + w3_to_w2_correction_kernel_type(u_lon_w2, u_lon_large, 1, & + displacement, & + panel_id, 1), & + w3_to_w2_correction_kernel_type(u_lat_w2, u_lat_large, 1, & + displacement, & + panel_id, 1), & + ! Convert components to HDiv field + convert_phys_to_hdiv_kernel_type(u_correction, & + u_lon_w2, u_lat_w2, & + u_up_w2, chi, panel_id, & + geometry), & + ! Increment wind with correction field + inc_X_plus_Y(u, u_correction) ) + end if + else call u%copy_field_properties(r_u) diff --git a/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 b/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 index 52a55e1be..f6523d797 100644 --- a/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 +++ b/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 @@ -273,7 +273,7 @@ contains type( field_type ) :: conv_liquid_fraction, conv_frozen_fraction type( field_type ) :: conv_liquid_mmr, conv_frozen_mmr, conv_frozen_number ! ...for JULES & Boundary Layer - type( field_type ) :: recip_l_mo_sea, rhostar, h_blend_orog + type( field_type ) :: recip_l_mo_sea, rhostar type( field_type ) :: t1_sd_2d, q1_sd_2d ! ...for spectral GWD type( field_type ) :: du_spectral_gwd, dv_spectral_gwd @@ -847,14 +847,14 @@ contains turbulence_fields, convection_fields, cloud_fields, & surface_fields, soil_fields, snow_fields, & aerosol_fields, recip_l_mo_sea, rhostar, & - h_blend_orog, t1_sd_2d, q1_sd_2d) + t1_sd_2d, q1_sd_2d) call bl_exp_alg(theta, rho, exner, mr_n, & derived_fields, radiation_fields, & microphysics_fields, dmr_mphys, orography_fields, & turbulence_fields, convection_fields, cloud_fields, & surface_fields, & recip_l_mo_sea, rhostar, & - h_blend_orog, t1_sd_2d, q1_sd_2d, clock) + t1_sd_2d, q1_sd_2d, clock) end if !-------------------------------------------------------------------- diff --git a/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 b/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 index 2c3dd341b..63faab91c 100644 --- a/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 +++ b/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 @@ -116,21 +116,17 @@ contains use limited_area_constants_mod, only: get_mask_r_solver use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type use function_space_mod, only: function_space_type - use fs_continuity_mod, only: W2, W2h, W2v, W3, Wtheta + use fs_continuity_mod, only: W2, W2h, W2v, W3, Wtheta, W2Hbroken use function_space_collection_mod, only: function_space_collection - use apply_mixed_lu_operator_kernel_mod, & - only: apply_mixed_lu_operator_kernel_type - use apply_mixed_operator_kernel_mod, & - only: apply_mixed_operator_kernel_type + use apply_mixed_lu_operator_kernel_mod, only: apply_mixed_lu_operator_kernel_type use apply_elim_mixed_lp_operator_kernel_mod, & - only: apply_elim_mixed_lp_operator_kernel_type - use matrix_vector_kernel_mod, & - only: matrix_vector_kernel_type - use dg_inc_matrix_vector_kernel_mod, & - only: dg_inc_matrix_vector_kernel_type - use apply_mixed_operator_kernel_mod, & - only: apply_mixed_operator_kernel_type + only: apply_elim_mixed_lp_operator_kernel_type + use matrix_vector_kernel_mod, only: matrix_vector_kernel_type + use dg_inc_matrix_vector_kernel_mod, only: dg_inc_matrix_vector_kernel_type + use apply_mixed_u_operator_kernel_mod, only: apply_mixed_u_operator_kernel_type + use apply_mixed_wp_operator_kernel_mod, only: apply_mixed_wp_operator_kernel_type + use assemble_w2h_from_w2hb_kernel_mod, only: assemble_w2h_from_w2hb_kernel_type implicit none @@ -148,7 +144,8 @@ contains m2_diag type(r_solver_field_type) :: x_uvw, y_uvw type(function_space_type), pointer :: u_fs, & - t_fs + t_fs, & + w2hb_fs integer(i_def) :: p_h, p_v type(r_solver_field_type), pointer :: w2_mask, & w3_mask @@ -174,6 +171,8 @@ contains type(integer_field_type), pointer :: face_selector_ns integer(tik) :: id + type(r_solver_field_type) :: y_uv_broken + if ( LPROF ) call start_timing( id, 'mixed_solver.operator' ) ! Extract mesh ID @@ -225,6 +224,8 @@ contains xvec_w => x%get_field_from_position(isol_w) yvec_w => y%get_field_from_position(isol_w) end if + p_h = y%vector(isol_u)%get_element_order_h() + p_v = y%vector(isol_u)%get_element_order_v() ! Check if we can use the optimised operator setup optimised_operator = ( p2theta_vert .and. & @@ -236,8 +237,6 @@ contains if ( .not. optimised_operator ) then ! Create fields in 3D W2 space - p_h = y%vector(isol_u)%get_element_order_h() - p_v = y%vector(isol_u)%get_element_order_v() u_fs => function_space_collection%get_fs( mesh, p_h, p_v, W2 ) call x_uvw%initialise( vector_space = u_fs ) @@ -257,13 +256,28 @@ contains case ( eliminate_variables_discrete ) q32_op => get_eliminated_q32() if ( optimised_operator ) then - call invoke( name="apply_mixed_operator_new", & - setval_c( yvec_uv, 0.0_r_solver ), & - apply_mixed_operator_kernel_type( yvec_uv, yvec_w, yvec_p, & - xvec_uv, xvec_w, xvec_p, & - ptheta2, mt_lumped_inv, & - mm_vel, p2theta, div_star, m2_diag, & - m3_exner_star, q32_op, p3theta ) ) + ! Compute the lhs of mixed operator in two steps: + ! 1) Compute the horizontal wind lhs (yvec_uv), this is done in the broken W2 + ! space to avoid having to halo exchange the input fields. After computation of + ! the broken W2 lhs the continuous W2 lhs is computed which only requires a single + ! halo exchange. + ! 2) Compute the vertical wind (yvec_w) & pressure (yvec_p) lhs, since these + ! are horizontally discontinuous fields then there are no further halo exchanges required. + + ! Create broken y_uv + w2hb_fs => function_space_collection%get_fs(mesh, p_h, p_v, W2Hbroken) + call y_uv_broken%initialise( w2hb_fs ) + call invoke( name="apply_split_mixed_operator", & + apply_mixed_u_operator_kernel_type( y_uv_broken, & + xvec_uv, xvec_w, xvec_p, & + mm_vel, div_star, m2_diag ), & + setval_c( yvec_uv, 0.0_r_solver ), & + assemble_w2h_from_w2hb_kernel_type(yvec_uv, y_uv_broken), & + apply_mixed_wp_operator_kernel_type( yvec_w, yvec_p, & + xvec_uv, xvec_w, xvec_p, & + ptheta2, mt_lumped_inv, & + mm_vel, p2theta, div_star, m2_diag, & + m3_exner_star, q32_op, p3theta ) ) else ! Create theta' field t_fs => function_space_collection%get_fs( mesh, p_h, p_v, Wtheta ) diff --git a/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 b/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 index 7bb9237a3..70072ae47 100644 --- a/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 +++ b/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 @@ -455,6 +455,7 @@ contains exner_inc type(r_solver_field_type), target :: dummy_field + type(r_solver_field_type), target :: uvw_norm integer(tik) :: id if ( LPROF ) call start_timing( id, 'schur_precon.back_sub' ) @@ -479,11 +480,13 @@ contains call dummy_field%initialise( vector_space = self%rhs_u%get_function_space() ) w2_mask => dummy_field end if + call uvw_norm%initialise( vector_space = self%rhs_u%get_function_space() ) call invoke( name = "compute_split_increments", & + X_times_Y(uvw_norm, u_normalisation, Hb_lumped_inv), & setval_c(state_uv, 0.0_r_solver), & schur_backsub_kernel_type( state_uv, state_w, self%rhs_u, & exner_inc, div_star, & - u_normalisation, Hb_lumped_inv, & + uvw_norm, & limited_area, w2_mask ) ) else call u_inc%initialise( vector_space = self%rhs_u%get_function_space() ) diff --git a/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 b/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 index 040758fdd..dc382d042 100644 --- a/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 @@ -822,6 +822,7 @@ contains ! General case for any splitting else + call sum_hori_flux%initialise(w2h_fs) call sum_vert_flux%initialise(w2v_fs) diff --git a/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 b/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 index 528d5b2fd..ea01e52fe 100644 --- a/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 @@ -16,7 +16,6 @@ module remap_on_extended_mesh_alg_mod use psykal_lite_transport_mod, only: invoke_remap_on_extended_mesh_kernel_type use timing_mod, only: start_timing, stop_timing, tik, LPROF use function_space_mod, only: function_space_type - use check_configuration_mod, only: get_required_stencil_depth use transport_constants_mod, only: get_extended_mesh_weights, & get_extended_mesh_indices, & ext_mesh_stencil_depth @@ -76,7 +75,7 @@ contains ndata = fs%get_ndata() ! Ensure remapping depth is not larger than the halo depth - depth = min( depth_in, get_required_stencil_depth() ) + depth = min( depth_in, mesh%get_halo_depth() ) ! Both the field to be remapped and the remapped field need to be ! created with the full size halo. For the field to be remapped ! this is due to the interpolation parallel to a panel boundary diff --git a/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 b/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 index 6e7dbe6a6..b40c2cc84 100644 --- a/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 @@ -40,6 +40,7 @@ module transport_counter_mod contains procedure, public :: initialise + procedure, public :: adj_initialise procedure, public :: get_field_n procedure, public :: set_field_n procedure, public :: get_flux @@ -51,6 +52,7 @@ module transport_counter_mod procedure, public :: get_num_split_steps_per_substep procedure, public :: get_dt_substep procedure, public :: get_outer_iteration + procedure, public :: dec_split_step_counter procedure, public :: inc_split_step_counter procedure, public :: inc_substep_counter procedure, public :: apply_cheap_update @@ -98,18 +100,70 @@ contains self%split_step_of_substep_counter = 1 self%substep_counter = 1 - if (allocated(self%flux)) deallocate(self%flux) - equation_form = transport_metadata%get_equation_form() ! Allocate arrays for dry fields if (equation_form == equation_form_conservative & - .or. equation_form == equation_form_consistent) then - allocate(self%flux(self%num_split_steps_per_substep-1)) + .or. equation_form == equation_form_consistent) then + if ( .not. allocated(self%flux)) then + allocate(self%flux(self%num_split_steps_per_substep-1)) + end if end if end subroutine initialise + !> @brief Initialises the transport_counter object, allocating flux fields + !! if necessary, ready for the adjoint model simulation + !> @details This is the same as initialise, but it prepares the code to be + !! run in reverse order, with the counter decreasing instead of + !! increasing. + !> @param[in] transport_metadata Object containing metadata describing + !! the options for transporting a variable + !> @param[in] dt_substep The time interval for a single substep + !> @param[in] num_substeps The number of total transport substeps to be + !! performed + !> @param[in] outer Optional, current iteration of the outer + !! loop of the semi-implicit time step + subroutine adj_initialise(self, transport_metadata, dt_substep, num_substeps, outer) + + implicit none + + class(transport_counter_type), intent(inout) :: self + type(transport_metadata_type), intent(in) :: transport_metadata + real(kind=r_tran), intent(in) :: dt_substep + integer(kind=i_def), intent(in) :: num_substeps + integer(kind=i_def), optional, intent(in) :: outer + + integer(kind=i_def) :: equation_form + + self%dt_substep = dt_substep + self%num_substeps = num_substeps + self%num_split_steps_per_substep = get_num_split_steps(transport_metadata%get_splitting()) + self%num_split_steps_per_whole_step = self%num_substeps * self%num_split_steps_per_substep + + if (present(outer)) then + self%outer = outer + else + self%outer = 0 + end if + + ! Initialise step counters to the last values (NOT 1) + self%split_step_of_whole_step_counter = self%num_split_steps_per_whole_step + self%split_step_of_substep_counter = self%num_split_steps_per_substep + self%substep_counter = num_substeps + + equation_form = transport_metadata%get_equation_form() + + ! Allocate arrays for dry fields + if (equation_form == equation_form_conservative & + .or. equation_form == equation_form_consistent) then + if ( .not. allocated(self%flux)) then + allocate(self%flux(self%num_split_steps_per_substep-1)) + end if + end if + + end subroutine adj_initialise + !> Public finalise method for the transport_counter subroutine finalise(self) @@ -314,6 +368,18 @@ contains ! ============================================================================ ! ! UTILITIES ! ============================================================================ ! + !> @brief Decreases the counter of transport split steps (for adjoint model) + subroutine dec_split_step_counter(self) + + implicit none + + class(transport_counter_type), target, intent(inout) :: self + + self%split_step_of_substep_counter = self%split_step_of_substep_counter - 1 + self%split_step_of_whole_step_counter = self%split_step_of_whole_step_counter - 1 + + end subroutine dec_split_step_counter + !> @brief Increments the counter of transport split steps subroutine inc_split_step_counter(self) diff --git a/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 b/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 index 6b0e596f2..03026c745 100644 --- a/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 +++ b/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 @@ -408,7 +408,11 @@ end function get_ffsl_vertical_order !> @param[in] adaptive_splitting Whether to use adaptive splitting. If !! true, sets the splitting to the splitting argument. !> @param[in] splitting The splitting to use if adaptive_splitting is true - subroutine update_metadata(self, outer, adaptive_splitting, splitting) + !> @param[in] make_tracers_advective Whether to set the equation form to be + !! advective when unable to compute departure points + !! for consistent tracers + subroutine update_metadata(self, outer, adaptive_splitting, splitting, & + make_tracers_advective) use timestepping_config_mod, only: outer_iterations use transport_config_mod, only: si_outer_transport, & @@ -419,6 +423,7 @@ subroutine update_metadata(self, outer, adaptive_splitting, splitting) dry_field_name use transport_enumerated_types_mod, & only: equation_form_advective, & + equation_form_consistent, & split_method_ffsl, & split_method_sl, & monotone_qm_pos, & @@ -431,6 +436,7 @@ subroutine update_metadata(self, outer, adaptive_splitting, splitting) integer(kind=i_def), intent(in) :: outer logical(kind=l_def), intent(in) :: adaptive_splitting integer(kind=i_def), intent(in) :: splitting + logical(kind=l_def), intent(in) :: make_tracers_advective if (si_outer_transport /= si_outer_transport_none & .and. outer < outer_iterations & @@ -470,6 +476,12 @@ subroutine update_metadata(self, outer, adaptive_splitting, splitting) self%splitting = splitting end if + if ( make_tracers_advective .and. & + self%equation_form == equation_form_consistent ) then + ! Set equation form to be advective + self%equation_form = equation_form_advective + end if + end subroutine update_metadata !> @brief Reset the metadata to its original values diff --git a/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 b/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 index 6fe09d586..f5a29f696 100644 --- a/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 +++ b/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 @@ -79,6 +79,7 @@ module transport_controller_mod integer(kind=i_def) :: outer logical(kind=l_def) :: cheap_update_step = .false. logical(kind=l_def) :: adaptive_splitting = .false. + logical(kind=l_def) :: make_tracers_advective = .false. integer(kind=i_def) :: reference_splitting = IMDI integer(kind=i_def) :: max_courant_num = 0 logical(kind=l_def) :: dep_stencil_extent_computed = .false. @@ -505,6 +506,7 @@ contains self%outer_set = .false. self%cheap_update_step = .false. self%adaptive_splitting = .false. + self%make_tracers_advective = .false. self%reference_splitting = IMDI self%dep_stencil_extent_computed = .false. call self%counter%finalise() @@ -534,6 +536,7 @@ contains use transport_config_mod, only: ffsl_unity_3d, & adjust_vhv_wind, & + adjust_tracer_equation, & substep_transport, & substep_transport_two, & substep_transport_four, & @@ -660,23 +663,34 @@ contains LOG_LEVEL_WARNING & ) - call log_event( & - 'The Watkins algorithm failed to keep all reference fields ' // & - 'positive for the transport of tracers. This makes it ' // & - 'impossible to find sensible departure distances for (Flux ' // & - 'Form) Semi-Lagrangian transport. Stopping now to fail ' // & - 'gracefully.' // NEW_LINE('A') // NEW_LINE('A') // & - 'This is a common way for the model to fail. Most likely the ' // & - 'transporting wind passed to the transport scheme has some ' // & - 'unphysical values, and the corresponding maximum Lipschitz ' // & - 'number exceeds 1 somewhere, so check these values in the log ' // & - 'above, which may also indicate the geographical location of ' // & - 'the issue.' // & - NEW_LINE('A') // NEW_LINE('A') // & - 'If this failure has occurred in the first timestep, it can ' // & - 'signify issues with the initial conditions or ancillaries.', & - LOG_LEVEL_ERROR & - ) + if (adjust_tracer_equation) then + ! Use advective form for tracer transport instead of consistent form + call log_event( & + 'Reference field for tracer transport is negative, so ' // & + 'making all tracers advective for this step. This will ' // & + 'make tracer transport non-conservative. ', LOG_LEVEL_INFO & + ) + self%make_tracers_advective = .true. + else + ! Fail gracefully + call log_event( & + 'The Watkins algorithm failed to keep all reference fields ' // & + 'positive for the transport of tracers. This makes it ' // & + 'impossible to find sensible departure distances for (Flux ' // & + 'Form) Semi-Lagrangian transport. Stopping now to fail ' // & + 'gracefully.' // NEW_LINE('A') // NEW_LINE('A') // & + 'This is a common way for the model to fail. Most likely ' // & + 'the transporting wind passed to the transport scheme has ' // & + 'some unphysical values, and the corresponding maximum ' // & + 'Lipschitz number exceeds 1 somewhere, so check these ' // & + 'values in the log above, which may also indicate the ' // & + 'geographical location of the issue.' // & + NEW_LINE('A') // NEW_LINE('A') // & + 'If this failure has occurred in the first timestep, it can ' // & + 'signify issues with the initial conditions or ancillaries.', & + LOG_LEVEL_ERROR & + ) + end if end if else @@ -710,7 +724,8 @@ contains ! Initialise counter if (self%outer_set) then call self%metadata%update_metadata( & - self%outer, self%adaptive_splitting, self%reference_splitting & + self%outer, self%adaptive_splitting, self%reference_splitting, & + self%make_tracers_Advective & ) call self%counter%initialise( & self%metadata, self%dt_substep, self%num_substeps, self%outer & diff --git a/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 b/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 index 7fc12fc08..52b693976 100644 --- a/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 @@ -75,6 +75,7 @@ module ffsl_hori_alg_mod transport_overwrite_freq_all use check_configuration_mod, only: check_any_eqn_consistent, & get_required_stencil_depth + use io_config_mod, only: subroutine_timers use transport_config_mod, only: & panel_edge_treatment, & panel_edge_treatment_extended_mesh, & @@ -430,7 +431,7 @@ contains remap_depth) else call field_big_halo%initialise( field_n%get_function_space(), & - halo_depth=get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_x(field_big_halo, field_n) ) end if ! Copy required as PSyclone doesn't allow the same field to be @@ -715,7 +716,7 @@ contains remap_depth) else call field_big_halo%initialise( field_n%get_function_space(), & - halo_depth=get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_x(field_big_halo, field_n) ) end if @@ -1074,8 +1075,8 @@ contains transport_metadata%get_min_value(), & remap_depth) else - call field_x_big_halo%initialise(field_fs, halo_depth=get_required_stencil_depth()) - call field_y_big_halo%initialise(field_fs, halo_depth=get_required_stencil_depth()) + call field_x_big_halo%initialise(field_fs, halo_depth=mesh%get_halo_depth()) + call field_y_big_halo%initialise(field_fs, halo_depth=mesh%get_halo_depth()) call invoke( setval_x(field_x_big_halo, field_x), & setval_x(field_y_big_halo, field_y) ) end if diff --git a/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 b/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 index 4134b714c..6b9b9e537 100644 --- a/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 @@ -18,7 +18,6 @@ !! size as an integer argument. module reconstruct_w3_field_alg_mod - use check_configuration_mod, only: get_required_stencil_depth use sci_combine_multidata_field_kernel_mod, & only: combine_multidata_field_kernel_type use constants_mod, only: r_def, i_def, l_def, str_def @@ -197,7 +196,7 @@ contains ! Copy field to a large halo version call field_old_big_halo%initialise( field_old%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_X( field_old_big_halo, field_old ) ) monotone = (transport_metadata%get_horizontal_monotone() == monotone_koren) diff --git a/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 b/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 index fb258b55b..46b6b5fbc 100644 --- a/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 @@ -18,7 +18,6 @@ !! size as an integer argument. module wt_advective_update_alg_mod - use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: r_def, i_def, l_def, str_def, & r_tran use sci_geometric_constants_mod, only: get_coordinates, & @@ -133,7 +132,7 @@ contains ! Copy field to a large halo version call field_big_halo%initialise( field%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_X( field_big_halo, field ) ) ! Compute reconstruction on a Wtheta multidata field diff --git a/science/gungho/source/configuration/check_configuration_mod.F90 b/science/gungho/source/configuration/check_configuration_mod.F90 index 86252a85a..e2a1e8e6e 100644 --- a/science/gungho/source/configuration/check_configuration_mod.F90 +++ b/science/gungho/source/configuration/check_configuration_mod.F90 @@ -6,7 +6,7 @@ module check_configuration_mod - use constants_mod, only: i_def, l_def + use constants_mod, only: i_def, l_def, str_def use mixing_config_mod, only: viscosity, & viscosity_mu use transport_config_mod, only: operators, & @@ -48,7 +48,7 @@ module check_configuration_mod substep_transport, & substep_transport_off, & adjust_vhv_wind, & - ffsl_unity_3d, & + ffsl_unity_3d, & wind_mono_top use transport_enumerated_types_mod, & only: scheme_mol_3d, & @@ -71,6 +71,9 @@ module check_configuration_mod monotone_qm_pos, & ffsl_splitting_swift, & ffsl_splitting_cosmic + use namelist_collection_mod, & + only : namelist_collection_type + use namelist_mod, only : namelist_type implicit none @@ -612,31 +615,87 @@ subroutine check_configuration(modeldb) end subroutine check_configuration - !> @brief Determine required stencil depth for the current configuration. + !> @brief Determine required stencil depth for the current configuration, + !! for each mesh. !> @details Depending on the choice of science schemes the required local !> mesh needs to support the anticipated stencils. This function !> returns required stencil depth that needs to be supported. - !> @return stencil_depth - !> + !> @param[in,out] stencil_depths Array of stencil depths for each base mesh + !> @param[in] base_mesh_names Array of base mesh names + !> @param[in] configuration The configuration object !=========================================================================== - function get_required_stencil_depth() result(stencil_depth) + subroutine get_required_stencil_depth(stencil_depths, base_mesh_names, configuration) implicit none - integer(kind=i_def) :: stencil_depth - integer(kind=i_def) :: sl_depth, special_edge_pts + integer(kind=i_def), intent(inout) :: stencil_depths(:) + character(len=str_def), intent(in) :: base_mesh_names(:) + type(namelist_collection_type), intent(in) :: configuration + + + integer(kind=i_def) :: i + integer(kind=i_def) :: transport_depth, sl_depth + integer(kind=i_def) :: special_edge_pts logical(kind=l_def) :: any_horz_dep_pts - stencil_depth = 2 + ! Configuration variables + type(namelist_type), pointer :: base_mesh_nml + type(namelist_type), pointer :: formulation_nml + type(namelist_type), pointer :: multires_coupling_nml + type(namelist_type), pointer :: transport_nml + character(len=str_def) :: prime_mesh_name + character(len=str_def) :: aerosol_mesh_name + logical(kind=l_def) :: use_multires_coupling + logical(kind=l_def) :: coarse_aerosol_transport + integer(kind=i_def) :: operators + integer(kind=i_def) :: fv_horizontal_order + integer(kind=i_def) :: panel_edge_treatment + logical(kind=l_def) :: panel_edge_high_order + integer(kind=i_def) :: dep_pt_stencil_extent + integer(kind=i_def) :: ffsl_inner_order + integer(kind=i_def) :: ffsl_outer_order + + ! ------------------------------------------------------------------------ ! + ! Get configuration variables + ! ------------------------------------------------------------------------ ! + + base_mesh_nml => configuration%get_namelist('base_mesh') + formulation_nml => configuration%get_namelist('formulation') + transport_nml => configuration%get_namelist('transport') + + call base_mesh_nml%get_value('prime_mesh_name', prime_mesh_name) + call formulation_nml%get_value('use_multires_coupling', use_multires_coupling) + call transport_nml%get_value('operators', operators) + call transport_nml%get_value('fv_horizontal_order', fv_horizontal_order) + call transport_nml%get_value('panel_edge_treatment', panel_edge_treatment) + call transport_nml%get_value('panel_edge_high_order', panel_edge_high_order) + call transport_nml%get_value('dep_pt_stencil_extent', dep_pt_stencil_extent) + call transport_nml%get_value('ffsl_inner_order', ffsl_inner_order) + call transport_nml%get_value('ffsl_outer_order', ffsl_outer_order) + if (use_multires_coupling) then + multires_coupling_nml => configuration%get_namelist('multires_coupling') + call multires_coupling_nml%get_value('aerosol_mesh_name', aerosol_mesh_name) + call multires_coupling_nml%get_value('coarse_aerosol_transport', coarse_aerosol_transport) + end if + + ! ------------------------------------------------------------------------ ! + ! Set default depth + ! ------------------------------------------------------------------------ ! + + transport_depth = 2 if (operators == operators_fv) then ! Need larger halos for fv operators - stencil_depth = max( stencil_depth, fv_horizontal_order/2 ) + transport_depth = max( transport_depth, fv_horizontal_order/2 ) end if + ! ------------------------------------------------------------------------ ! + ! Determine depth when using a semi-Lagrangian scheme + ! ------------------------------------------------------------------------ ! + any_horz_dep_pts = check_horz_dep_pts() - if ( any_horz_dep_pts ) then + if (any_horz_dep_pts) then ! When an SL scheme is used, the halo depth should be large enough to ! encompass the largest anticipated Courant number (effectively the ! departure distance in the SL scheme), plus any extra cells required for @@ -646,8 +705,8 @@ function get_required_stencil_depth() result(stencil_depth) ! - the order of reconstruction ! - whether special edge treatment is used (this shifts the stencil by 1) - if ( panel_edge_treatment == panel_edge_treatment_special_edges & - .AND. panel_edge_high_order ) then + if (panel_edge_treatment == panel_edge_treatment_special_edges & + .AND. panel_edge_high_order) then special_edge_pts = 1 else special_edge_pts = 0 @@ -659,18 +718,39 @@ function get_required_stencil_depth() result(stencil_depth) + special_edge_pts & ! special edge treatment ) - if ( panel_edge_treatment == panel_edge_treatment_remapping ) then - if ( panel_edge_high_order ) then - sl_depth = max( sl_depth, 3 ) + if (panel_edge_treatment == panel_edge_treatment_remapping) then + if (panel_edge_high_order) then + transport_depth = max( sl_depth, 3 ) else sl_depth = max( sl_depth, 2 ) end if end if - stencil_depth = max( stencil_depth, sl_depth ) + transport_depth = max( transport_depth, sl_depth ) end if - end function get_required_stencil_depth + ! ------------------------------------------------------------------------ ! + ! Set depth for each mesh + ! ------------------------------------------------------------------------ ! + + ! Loop through meshes to determine whether transport takes place on it + do i = 1, size(base_mesh_names) + if (trim(base_mesh_names(i)) == trim(prime_mesh_name)) then + ! Assume transport always occurs on prime mesh + stencil_depths(i) = transport_depth + + else if (use_multires_coupling .and. coarse_aerosol_transport .and. & + trim(base_mesh_names(i)) == trim(aerosol_mesh_name)) then + ! Coarse mesh transport for aerosols + stencil_depths(i) = transport_depth + + else + ! No transport on this mesh, so set stencil depth to 2 + stencil_depths(i) = 2 + end if + end do + + end subroutine get_required_stencil_depth !> @brief Determine whether any of the transport schemes are MoL !> @details Loops through the transport schemes specified for different diff --git a/science/gungho/source/diagnostics/diagnostics_io_mod.x90 b/science/gungho/source/diagnostics/diagnostics_io_mod.x90 index ad2f7737a..2b3c5dcec 100755 --- a/science/gungho/source/diagnostics/diagnostics_io_mod.x90 +++ b/science/gungho/source/diagnostics/diagnostics_io_mod.x90 @@ -17,6 +17,7 @@ module diagnostics_io_mod scalar_nodal_diagnostic_alg, & scalar_ugrid_diagnostic_alg, & vector_nodal_diagnostic_alg + use initialise_diagnostics_mod, only: diagnostic_to_be_sampled use io_config_mod, only: use_xios_io, write_fluxes use files_config_mod, only: diag_stem_name use function_space_collection_mod, only: function_space_collection @@ -139,9 +140,13 @@ subroutine write_scalar_diagnostic( field_name, field, & ! Check if we need to write an initial field if (clock%is_initialisation()) then - call output_field(1)%write_field(trim('init_'//field_name)) + if (diagnostic_to_be_sampled(trim('init_'//field_name))) then + call output_field(1)%write_field(trim('init_'//field_name)) + end if else - call output_field(1)%write_field(trim(field_name)) + if (diagnostic_to_be_sampled(trim(field_name))) then + call output_field(1)%write_field(trim(field_name)) + end if end if nullify(tmp_write_ptr) @@ -308,23 +313,47 @@ subroutine write_vector_diagnostic( field_name, field, & if (clock%is_initialisation()) then if (field_name == 'u') then - call u1_wind%write_field("init_u_in_w2h") - call u2_wind%write_field("init_v_in_w2h") - call u3_wind%write_field("init_w_in_wth") + if (diagnostic_to_be_sampled("init_u_in_w2h")) then + call u1_wind%write_field("init_u_in_w2h") + end if + if (diagnostic_to_be_sampled("init_v_in_w2h")) then + call u2_wind%write_field("init_v_in_w2h") + end if + if (diagnostic_to_be_sampled("init_w_in_wth")) then + call u3_wind%write_field("init_w_in_wth") + end if else - call u1_wind%write_field("init_"//trim(field_name)//"1") - call u2_wind%write_field("init_"//trim(field_name)//"2") - call u3_wind%write_field("init_"//trim(field_name)//"3") + if (diagnostic_to_be_sampled(trim(field_name)//"1")) then + call u1_wind%write_field("init_"//trim(field_name)//"1") + end if + if (diagnostic_to_be_sampled(trim(field_name)//"2")) then + call u2_wind%write_field("init_"//trim(field_name)//"2") + end if + if (diagnostic_to_be_sampled(trim(field_name)//"3")) then + call u3_wind%write_field("init_"//trim(field_name)//"3") + end if end if else if (field_name == 'u') then - call u1_wind%write_field("u_in_w2h") - call u2_wind%write_field("v_in_w2h") - call u3_wind%write_field("w_in_wth") + if (diagnostic_to_be_sampled("u_in_w2h")) then + call u1_wind%write_field("u_in_w2h") + end if + if (diagnostic_to_be_sampled("v_in_w2h")) then + call u2_wind%write_field("v_in_w2h") + end if + if (diagnostic_to_be_sampled("w_in_wth")) then + call u3_wind%write_field("w_in_wth") + end if else - call u1_wind%write_field(trim(field_name)//"1") - call u2_wind%write_field(trim(field_name)//"2") - call u3_wind%write_field(trim(field_name)//"3") + if (diagnostic_to_be_sampled(trim(field_name)//"1")) then + call u1_wind%write_field(trim(field_name)//"1") + end if + if (diagnostic_to_be_sampled(trim(field_name)//"2")) then + call u2_wind%write_field(trim(field_name)//"2") + end if + if (diagnostic_to_be_sampled(trim(field_name)//"3")) then + call u3_wind%write_field(trim(field_name)//"3") + end if end if end if diff --git a/science/gungho/source/driver/create_physics_prognostics_mod.F90 b/science/gungho/source/driver/create_physics_prognostics_mod.F90 index 649d501bd..a7f803c43 100644 --- a/science/gungho/source/driver/create_physics_prognostics_mod.F90 +++ b/science/gungho/source/driver/create_physics_prognostics_mod.F90 @@ -42,6 +42,7 @@ module create_physics_prognostics_mod topography_horizon, & n_horiz_layer, n_horiz_ang, & l_inc_radstep + use cosp_config_mod, only : l_cosp, n_cosp_step use aerosol_config_mod, only : glomap_mode, & glomap_mode_climatology, & glomap_mode_dust_and_clim, & @@ -471,6 +472,38 @@ subroutine process_physics_prognostics(processor) call processor%apply(make_spec('aer_lw_asymmetry', main%radiation, & ckp=checkpoint_flag)) + ! Fields which need checkpointing for time sampling of COSP diagnostics. + ! Checkpoint unless both the first timestep of this run and the + ! first timestep of the next run are COSP timesteps + if (l_cosp) then + checkpoint_flag = & + mod(clock%get_first_step()-1, n_cosp_step) /= 0 .or. & + mod(clock%get_last_step(), n_cosp_step) /= 0 + + if (checkpoint_read .or. init_option == init_option_checkpoint_dump) then + ! If the first timestep of this run IS a COSP timestep, but the + ! first timestep of the next run IS NOT, then checkpoint_flag + ! must be false to allow model to start running, as the COSP + ! prognostics will not be in the initial dump + if (mod(clock%get_first_step()-1, n_cosp_step) == 0 .and. & + mod(clock%get_last_step(), n_cosp_step) /= 0) then + checkpoint_flag = .false. + if (checkpoint_write) then + call log_event('Danger: start of this run is a COSP ' // & + 'timestep, but start of next run is not. ' // & + 'Written dump will be incomplete. Next run ' // & + 'must start with a COSP timestep', & + LOG_LEVEL_WARNING) + end if + endif + end if + else + checkpoint_flag = .false. + end if + + call processor%apply(make_spec('lit_fraction_cosp', main%radiation, & + W3, twod=.true., ckp=checkpoint_flag)) + !======================================================================== ! Fields owned by the microphysics scheme !======================================================================== @@ -1489,7 +1522,7 @@ subroutine process_physics_prognostics(processor) ! Fields owned by the aerosol scheme !======================================================================== - ! 2D fields, might need checkpointing + ! Flags for some 2D and 3D fields if ( aerosol == aerosol_um .and. glomap_mode == glomap_mode_ukca ) then checkpoint_flag = .true. checkpoint_GC3 = (emissions == emissions_GC3) @@ -1501,6 +1534,7 @@ subroutine process_physics_prognostics(processor) checkpoint_GC5 = .false. is_empty = .true. end if + ! 2D fields, might need checkpointing if ( aerosol == aerosol_um .and. & ( glomap_mode == glomap_mode_ukca .or. & glomap_mode == glomap_mode_dust_and_clim ) ) then @@ -1533,15 +1567,11 @@ subroutine process_physics_prognostics(processor) call processor%apply(make_spec('surf_wetness', main%aerosol, & empty=is_empty, ckp=checkpoint_flag)) end if - call processor%apply(make_spec('soil_clay', main%aerosol, & - ckp=checkpoint_flag)) - call processor%apply(make_spec('soil_sand', main%aerosol, & - ckp=checkpoint_flag)) + ! 3D fields, might need checkpointing - flags set above if ( aerosol == aerosol_um .and. & ( glomap_mode == glomap_mode_ukca .or. & glomap_mode == glomap_mode_dust_and_clim ) ) then - ! 3D fields, might need checkpointing call processor%apply(make_spec('emiss_bc_biomass', main%aerosol, & empty=is_empty, ckp=checkpoint_GC3)) call processor%apply(make_spec('emiss_om_biomass', main%aerosol, & @@ -1550,6 +1580,19 @@ subroutine process_physics_prognostics(processor) empty=is_empty, ckp=checkpoint_flag)) end if + ! Flags for more 2D fields + if (aerosol == aerosol_um .and. (glomap_mode == glomap_mode_ukca .or. & + glomap_mode == glomap_mode_dust_and_clim )) then + checkpoint_flag = .true. + else + checkpoint_flag = .false. + end if + + call processor%apply(make_spec('soil_clay', main%aerosol, & + ckp=checkpoint_flag)) + call processor%apply(make_spec('soil_sand', main%aerosol, & + ckp=checkpoint_flag)) + ! 3D fields, might need checkpointing and/or advecting ! Nucleation mode is only used with UKCA if ( aerosol == aerosol_um .and. glomap_mode == glomap_mode_ukca ) then @@ -1776,8 +1819,13 @@ subroutine process_physics_prognostics(processor) end if ! Fields on dust space, might need checkpointing - ! vector_space => function_space_collection%get_fs(twod_mesh, 0, 0, W3, - ! get_ndata_val('dust_divisions')) + if (aerosol == aerosol_um .and. (glomap_mode == glomap_mode_ukca .or. & + glomap_mode == glomap_mode_dust_and_clim )) then + checkpoint_flag = .true. + else + checkpoint_flag = .false. + end if + call processor%apply(make_spec('dust_mrel', main%aerosol, & ckp=checkpoint_flag)) diff --git a/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 b/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 index aff34838f..1bfca57a2 100644 --- a/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 +++ b/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 @@ -14,14 +14,14 @@ module gungho_diagnostics_driver_mod use constants_mod, only : i_def, r_def, str_def use boundaries_config_mod, only : limited_area, output_lbcs - use diagnostic_alg_mod, only : column_total_diagnostics_alg, & - calc_wbig_diagnostic_alg, & + use diagnostic_alg_mod, only : column_total_diagnostics_alg, & + calc_wbig_diagnostic_alg, & pressure_diag_alg - use diagnostics_io_mod, only : write_scalar_diagnostic, & + use diagnostics_io_mod, only : write_scalar_diagnostic, & write_vector_diagnostic - use diagnostics_calc_mod, only : write_divergence_diagnostic, & - write_hydbal_diagnostic, & - write_vorticity_diagnostic, & + use diagnostics_calc_mod, only : write_divergence_diagnostic, & + write_hydbal_diagnostic, & + write_vorticity_diagnostic, & write_pv_diagnostic use initialise_diagnostics_mod, only : diagnostic_to_be_sampled use field_array_mod, only : field_array_type @@ -32,22 +32,22 @@ module gungho_diagnostics_driver_mod use field_parent_mod, only : field_parent_type, write_interface use io_value_mod, only : io_value_type, get_io_value use lfric_xios_write_mod, only : write_field_generic - use formulation_config_mod, only : use_physics, & - moisture_formulation, & + use formulation_config_mod, only : use_physics, & + moisture_formulation, & moisture_formulation_dry - use fs_continuity_mod, only : W3, Wtheta + use fs_continuity_mod, only : W3, Wtheta, W2H, W0 use integer_field_mod, only : integer_field_type - use initialization_config_mod, only : ls_option, & - ls_option_analytic, & + use initialization_config_mod, only : ls_option, & + ls_option_analytic, & ls_option_file use mesh_mod, only : mesh_type use moist_dyn_mod, only : num_moist_factors use mr_indices_mod, only : nummr, mr_names - use log_mod, only : log_event, & + use log_mod, only : log_event, & LOG_LEVEL_DEBUG - use sci_geometric_constants_mod, & - only : get_panel_id, get_height_fe, & - get_height_fv, get_da_msl_proj + use sci_geometric_constants_mod, & + only : get_panel_id, & + get_height_fe, get_da_msl_proj use io_config_mod, only : use_xios_io, write_fluxes use timer_mod, only : timer use timing_mod, only : start_timing, stop_timing, tik, LPROF @@ -87,58 +87,56 @@ subroutine gungho_diagnostics_driver( modeldb, & type(mesh_type), intent(in), pointer :: twod_mesh logical, intent(in) :: nodal_output_on_w3 - type( field_collection_type ), pointer :: prognostic_fields => null() - type( field_collection_type ), pointer :: con_tracer_last_outer - type( field_collection_type ), pointer :: lbc_fields - type( field_collection_type ), pointer :: moisture_fields => null() - type( field_type ), pointer :: mr(:) => null() - type( field_type ), pointer :: moist_dyn(:) => null() - type( field_collection_type ), pointer :: derived_fields - - type( field_type), pointer :: theta => null() - type( field_type), pointer :: u => null() - type( field_type), pointer :: h_u => null() - type( field_type), pointer :: v_u => null() - type( field_type), pointer :: rho => null() - type( field_type), pointer :: exner => null() - type( field_type), pointer :: panel_id => null() - type( field_type), pointer :: height_w3 => null() - type( field_type), pointer :: height_wth => null() - type( field_type), pointer :: lbc_u => null() - type( field_type), pointer :: lbc_theta => null() - type( field_type), pointer :: lbc_rho => null() - type( field_type), pointer :: lbc_exner => null() - type( field_type), pointer :: lbc_m_v=> null() - type( field_type), pointer :: lbc_q=> null() - type( field_type), pointer :: u_in_w2h => null() - type( field_type), pointer :: v_in_w2h => null() - type( field_type), pointer :: w_in_wth => null() - type( field_type), pointer :: ageofair => null() - type( field_type), pointer :: exner_in_wth => null() - type( field_type), pointer :: dA => null() - - type(field_array_type), pointer :: mr_array => null() - type(field_array_type), pointer :: moist_dyn_array => null() + type(field_collection_type), pointer :: prognostic_fields + type(field_collection_type), pointer :: con_tracer_last_outer + type(field_collection_type), pointer :: lbc_fields + type(field_collection_type), pointer :: moisture_fields + type(field_type), pointer :: mr(:) + type(field_type), pointer :: moist_dyn(:) + type(field_collection_type), pointer :: derived_fields + + type(field_type), pointer :: theta + type(field_type), pointer :: u + type(field_type), pointer :: h_u + type(field_type), pointer :: v_u + type(field_type), pointer :: rho + type(field_type), pointer :: exner + type(field_type), pointer :: panel_id + type(field_type), pointer :: height + type(field_type), pointer :: lbc_u + type(field_type), pointer :: lbc_theta + type(field_type), pointer :: lbc_rho + type(field_type), pointer :: lbc_exner + type(field_type), pointer :: lbc_m_v + type(field_type), pointer :: lbc_q + type(field_type), pointer :: u_in_w2h + type(field_type), pointer :: v_in_w2h + type(field_type), pointer :: w_in_wth + type(field_type), pointer :: ageofair + type(field_type), pointer :: exner_in_wth + type(field_type), pointer :: dA + + type(field_array_type), pointer :: mr_array + type(field_array_type), pointer :: moist_dyn_array ! Iterator for field collection type(field_collection_iterator_type) :: iterator ! A pointer used for retrieving fields from collections ! when iterating over them - class( field_parent_type ), pointer :: field_ptr => null() + class(field_parent_type), pointer :: field_ptr + procedure(write_interface), pointer :: tmp_write_ptr + type(io_value_type), pointer :: temp_corr_io_value - type(io_value_type), pointer :: temp_corr_io_value + integer(kind=i_def) :: i, fs + integer(kind=tik) :: id + character(len=str_def) :: name, prefix, field_name - character(str_def) :: name + integer(kind=i_def), allocatable :: fs_ids(:) + character(len=str_def), allocatable :: fs_names(:) - integer :: fs - integer :: element_order_h, element_order_v - - procedure(write_interface), pointer :: tmp_write_ptr => null() - - integer :: i - integer(tik) :: id if ( LPROF ) call start_timing( id, 'gungho_diagnostics_driver' ) + call log_event("Gungho: writing diagnostic output", LOG_LEVEL_DEBUG) ! Get pointers to field collections for use downstream @@ -161,20 +159,6 @@ subroutine gungho_diagnostics_driver( modeldb, & call prognostic_fields%get_field('rho', rho) call prognostic_fields%get_field('exner', exner) - ! Get element orders and get the finite element or finite volume height - element_order_h = theta%get_element_order_h() - element_order_v = theta%get_element_order_v() - - if (element_order_h > 0 .or. element_order_v > 0) then - ! Get the finite element height - height_w3 => get_height_fe(W3, mesh%get_id()) - height_wth => get_height_fe(Wtheta, mesh%get_id()) - else - ! Get the finite volume height - height_w3 => get_height_fv(W3, mesh%get_id()) - height_wth => get_height_fv(Wtheta, mesh%get_id()) - end if - ! Scalar fields call write_scalar_diagnostic('rho', rho, & modeldb%clock, mesh, nodal_output_on_w3) @@ -182,10 +166,31 @@ subroutine gungho_diagnostics_driver( modeldb, & modeldb%clock, mesh, nodal_output_on_w3) call write_scalar_diagnostic('exner', exner, & modeldb%clock, mesh, nodal_output_on_w3) - call write_scalar_diagnostic('height_w3', height_w3, & - modeldb%clock, mesh, nodal_output_on_w3) - call write_scalar_diagnostic('height_wth', height_wth, & - modeldb%clock, mesh, nodal_output_on_w3) + + ! Write out heights of function space DoFs, if requested + allocate(fs_names(4)) + allocate(fs_ids(4)) + fs_names = (/ "w0 ", "w2h", "w3 ", "wth" /) ! Spaces to align lengths + fs_ids = (/ W0, W2H, W3, Wtheta /) + if (use_xios_io) then + if (modeldb%clock%is_initialisation()) then + prefix = "init_" + else + prefix = "" + end if + tmp_write_ptr => write_field_generic + do i = 1, SIZE(fs_names) + field_name = trim(prefix)//"height_"//trim(fs_names(i)) + fs = fs_ids(i) + if (diagnostic_to_be_sampled(trim(field_name))) then + height => get_height_fe(fs, mesh%get_id()) + call height%set_write_behaviour(tmp_write_ptr) + call height%write_field(trim(field_name)) + end if + end do + end if + deallocate(fs_names) + deallocate(fs_ids) if (transport_ageofair) then call con_tracer_last_outer%get_field('ageofair',ageofair) @@ -212,13 +217,25 @@ subroutine gungho_diagnostics_driver( modeldb, & call u_in_w2h%set_write_behaviour(tmp_write_ptr) call v_in_w2h%set_write_behaviour(tmp_write_ptr) if (modeldb%clock%is_initialisation()) then - call u_in_w2h%write_field("init_u_in_w2h") - call v_in_w2h%write_field("init_v_in_w2h") - call w_in_wth%write_field("init_w_in_wth") + if (diagnostic_to_be_sampled("init_u_in_w2h")) then + call u_in_w2h%write_field("init_u_in_w2h") + end if + if (diagnostic_to_be_sampled("init_v_in_w2h")) then + call v_in_w2h%write_field("init_v_in_w2h") + end if + if (diagnostic_to_be_sampled("init_w_in_wth")) then + call w_in_wth%write_field("init_w_in_wth") + end if else - call u_in_w2h%write_field("u_in_w2h") - call v_in_w2h%write_field("v_in_w2h") - call w_in_wth%write_field("w_in_wth") + if (diagnostic_to_be_sampled("u_in_w2h")) then + call u_in_w2h%write_field("u_in_w2h") + end if + if (diagnostic_to_be_sampled("v_in_w2h")) then + call v_in_w2h%write_field("v_in_w2h") + end if + if (diagnostic_to_be_sampled("w_in_wth")) then + call w_in_wth%write_field("w_in_wth") + end if end if else call write_vector_diagnostic('u', u, & @@ -233,7 +250,7 @@ subroutine gungho_diagnostics_driver( modeldb, & ! Moisture fields if ( moisture_formulation /= moisture_formulation_dry ) then - do i=1,nummr + do i = 1, nummr call write_scalar_diagnostic( trim(mr_names(i)), mr(i), & modeldb%clock, mesh, nodal_output_on_w3 ) end do @@ -276,12 +293,12 @@ subroutine gungho_diagnostics_driver( modeldb, & modeldb%clock, mesh, nodal_output_on_w3) call write_vector_diagnostic('readlbc_h_u', h_u, & modeldb%clock, mesh, nodal_output_on_w3) - endif - endif + end if + end if ! Derived physics fields (only those on W3 or Wtheta) if (use_physics .and. use_xios_io .and. .not. modeldb%clock%is_initialisation()) then - + field_ptr => null() call iterator%initialise(derived_fields) do if ( .not.iterator%has_next() ) exit diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index ee30f64fd..403547fc9 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -417,6 +417,7 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) logical(l_def) :: mesh_already_exists integer(i_def) :: i, j, mesh_ctr + integer(i_def), allocatable :: stencil_depths(:) character(str_def), allocatable :: base_mesh_names(:) character(str_def), allocatable :: meshes_to_shift(:) character(str_def), allocatable :: meshes_to_double(:) @@ -445,7 +446,6 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) integer(i_def) :: geometry integer(i_def) :: extrusion_method - integer(i_def) :: stencil_depth real(r_def) :: domain_bottom real(r_def) :: domain_height real(r_def) :: scaled_radius @@ -672,14 +672,16 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) apply_partition_check = .true. end if - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(size(base_mesh_names))) + call get_required_stencil_depth( stencil_depths, base_mesh_names, & + modeldb%configuration ) call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & extrusion, & - get_required_stencil_depth(), & + stencil_depths, & apply_partition_check ) @@ -923,6 +925,7 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) chi_inventory, panel_id_inventory, files_init_ptr, & orography_mesh, orography_twod_mesh) deallocate(base_mesh_names) + deallocate(stencil_depths) if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) if (allocated(meshes_to_double)) deallocate(meshes_to_double) diff --git a/science/gungho/source/driver/gungho_step_mod.x90 b/science/gungho/source/driver/gungho_step_mod.x90 index cd5169780..82b475792 100644 --- a/science/gungho/source/driver/gungho_step_mod.x90 +++ b/science/gungho/source/driver/gungho_step_mod.x90 @@ -122,11 +122,13 @@ module gungho_step_mod '(A,I0)' ) 'Start of timestep ', model_clock%get_step() call log_event( log_scratch_space, LOG_LEVEL_INFO ) - temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') - call modeldb%values%get_value( 'total_dry_mass', total_dry_mass ) - call modeldb%values%get_value( 'total_energy', total_energy ) - call modeldb%values%get_value( 'total_energy_previous', & - total_energy_previous ) + if ( encorr_usage /= encorr_usage_none .or. write_conservation_diag ) then + temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') + call modeldb%values%get_value( 'total_dry_mass', total_dry_mass ) + call modeldb%values%get_value( 'total_energy', total_energy ) + call modeldb%values%get_value( 'total_energy_previous', & + total_energy_previous ) + end if use_moisture = ( moisture_formulation /= moisture_formulation_dry ) diff --git a/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 new file mode 100644 index 000000000..7c4a6ffe4 --- /dev/null +++ b/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 @@ -0,0 +1,95 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Maps a field from W2h broken to W2h. +!> @details Forms a continuous W2h field by adding the components from a +!! broken W2h field on either side of the mesh facets. +module assemble_w2h_from_w2hb_kernel_mod + + use argument_mod, only : arg_type, & + GH_FIELD, GH_REAL, & + GH_READ, GH_INC, & + CELL_COLUMN + use constants_mod, only : r_solver, i_def + use fs_continuity_mod, only : W2h, W2broken + use kernel_mod, only : kernel_type + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + !> The type declaration for the kernel. Contains the metadata needed by the + !> Psy layer. + !> + type, public, extends(kernel_type) :: assemble_w2h_from_w2hb_kernel_type + private + type(arg_type) :: meta_args(2) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_INC, W2h), & ! field_w2h + arg_type(GH_FIELD, GH_REAL, GH_READ, W2broken) & ! field_w2h_broken + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: assemble_w2h_from_w2hb_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: assemble_w2h_from_w2hb_code + +contains + +!> @brief Converts a broken W2h field into a continuous W2h field +!> +!> @param[in] nlayers Number of layers in the mesh +!> @param[in,out] field_w2h Field in the W2h space to be returned. +!> @param[in] field_w2h_broken Original field in W2h broken to be used. +!> @param[in] ndf_w2h Number of degrees of freedom per cell for W2h +!> @param[in] undf_w2h Number of (local) unique degrees of freedom for W2h +!> @param[in] map_w2h Dofmap for the cell at the base of the column for W2h +!> @param[in] ndf_w2h_broken Number of degrees of freedom per cell for W2h broken +!> @param[in] undf_w2h_broken Number of (local) unique degrees of freedom for W2h broken +!> @param[in] map_w2h_broken Dofmap for the cell at the base of the column for W2h broken +subroutine assemble_w2h_from_w2hb_code( nlayers, & + field_w2h, & + field_w2h_broken, & + ndf_w2h, & + undf_w2h, & + map_w2h, & + ndf_w2h_broken, & + undf_w2h_broken, & + map_w2h_broken & + ) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: ndf_w2h_broken, ndf_w2h + integer(kind=i_def), intent(in) :: undf_w2h_broken, undf_w2h + integer(kind=i_def), dimension(ndf_w2h_broken), intent(in) :: map_w2h_broken + integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h + + real(kind=r_solver), dimension(undf_w2h), intent(inout) :: field_w2h + real(kind=r_solver), dimension(undf_w2h_broken), intent(in) :: field_w2h_broken + + ! Internal variables + integer(kind=i_def) :: df, k + + ! Loop over horizontal W2h DoFs + do df = 1, ndf_w2h + ! Loop over layers of mesh + do k = 0, nlayers - 1 + field_w2h(map_w2h(df)+k) = field_w2h(map_w2h(df)+k) & + + field_w2h_broken(map_w2h_broken(df)+k) + end do + end do + +end subroutine assemble_w2h_from_w2hb_code + +end module assemble_w2h_from_w2hb_kernel_mod diff --git a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 index 74064b04e..45f91bcf4 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 @@ -169,6 +169,9 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & real(kind=r_def) :: z real(kind=r_def), dimension(nqp_h,nqp_v) :: dj real(kind=r_def), dimension(3,3,nqp_h,nqp_v) :: jac + real(kind=r_def) :: wt + real(kind=r_def) :: j_v1(3), j_v2(3) + real(kind=r_def) :: factor(ndf_w2) integer(kind=i_def) :: ipanel @@ -180,9 +183,30 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & ndof_vol = 2*element_order_h*(element_order_h+1)*(element_order_v+1) & + (element_order_h+1)*(element_order_h+1)*element_order_v + + ! Only modify dofs corresponding to vertical part of w-basis + ! function (for lowest order: final two dofs). + ! Dofs are ordered: + ! a) Horizontal volume dofs + ! b) Vertical volume dofs + ! c) Horizontal face dofs + ! d) Vertical face dofs + ! So vertical dofs follow one of the two conditions: + ! b) df > ndof_vol_h .and. df <= ndof_vol + ! d) df > ndf_w2 - 2*ndof_face_v + ! So the check is as follows + do df = 1, ndf_w2 + if ( (df > ndf_w2 - 2*ndof_face_v) .or. & + (df > ndof_vol_h .and. df <= ndof_vol) ) then + factor(df) = real(dt, r_def) + else + factor(df) = 0.0_r_def + end if + end do + + ! Loop over layers: Start from 1 as in this loop k is not an offset do k = 1, nlayers - ik = k + (cell-1)*nlayers ! Indirect the chi coord field here do df = 1, ndf_chi chi1_e(df) = chi1(map_chi(df) + k - 1) @@ -192,64 +216,48 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) + ik = k + (cell-1)*nlayers + mm(ik, :, :) = 0.0_r_def ! Only use dofs corresponding to vertical part of basis function - do df2 = 1, ndf_w2 - do df = 1, ndf_w2 ! Mass matrix is not symmetric for damping layer - mm(ik,df,df2) = 0.0_r_def - do qp2 = 1, nqp_v - do qp1 = 1, nqp_h - chi1_at_quad = 0.0_r_def - chi2_at_quad = 0.0_r_def - chi3_at_quad = 0.0_r_def - do dfc = 1,ndf_chi - chi1_at_quad = chi1_at_quad + chi1_e(dfc)*basis_chi(1,dfc,qp1,qp2) - chi2_at_quad = chi2_at_quad + chi2_e(dfc)*basis_chi(1,dfc,qp1,qp2) - chi3_at_quad = chi3_at_quad + chi3_e(dfc)*basis_chi(1,dfc,qp1,qp2) - end do - - if (geometry == geometry_spherical) then - - call chi2llr(chi1_at_quad,chi2_at_quad,chi3_at_quad, & - ipanel, long_at_quad,lat_at_quad,r_at_quad) - z=r_at_quad - radius - - if (dl_type == dl_type_latitude) then - mu_at_quad = damping_layer_func(z, dl_strength, & - dl_base_height, domain_height, lat_at_quad) - else - mu_at_quad = damping_layer_func(z, dl_strength, & - dl_base_height, domain_height, 0.0_r_def) - end if - else - mu_at_quad = damping_layer_func(chi3_at_quad, dl_strength, & - dl_base_height, domain_height, 0.0_r_def) - end if - - integrand = wqp_h(qp1) * wqp_v(qp2) * & - dot_product( & - matmul(jac(:,:,qp1,qp2),basis_w2(:,df,qp1,qp2)), & - matmul(jac(:,:,qp1,qp2),basis_w2(:,df2,qp1,qp2)) ) & - /dj(qp1,qp2) - - ! Only modify dofs corresponding to vertical part of w-basis - ! function (for lowest order: final two dofs). - ! Dofs are ordered: - ! a) Horizontal volume dofs - ! b) Vertical volume dofs - ! c) Horizontal face dofs - ! d) Vertical face dofs - ! So vertical dofs follow one of the two conditions: - ! b) df > ndof_vol_h .and. df <= ndof_vol - ! d) df > ndf_w2 - 2*ndof_face_v - ! So the check is as follows - if ( (df > ndf_w2 - 2*ndof_face_v) .or. & - (df > ndof_vol_h .and. df <= ndof_vol) ) then - mm(ik,df,df2) = mm(ik,df,df2) & - + (1.0_r_def + real(dt, r_def)*mu_at_quad) & - * integrand - else - mm(ik,df,df2) = mm(ik,df,df2) + integrand - end if + do qp2 = 1, nqp_v + do qp1 = 1, nqp_h + chi1_at_quad = 0.0_r_def + chi2_at_quad = 0.0_r_def + chi3_at_quad = 0.0_r_def + do dfc = 1,ndf_chi + chi1_at_quad = chi1_at_quad + chi1_e(dfc)*basis_chi(1,dfc,qp1,qp2) + chi2_at_quad = chi2_at_quad + chi2_e(dfc)*basis_chi(1,dfc,qp1,qp2) + chi3_at_quad = chi3_at_quad + chi3_e(dfc)*basis_chi(1,dfc,qp1,qp2) + end do + + if (geometry == geometry_spherical) then + + call chi2llr(chi1_at_quad, chi2_at_quad, chi3_at_quad, & + ipanel, long_at_quad, lat_at_quad, r_at_quad) + z = r_at_quad - radius + + if (dl_type == dl_type_latitude) then + mu_at_quad = damping_layer_func(z, dl_strength, & + dl_base_height, domain_height, lat_at_quad) + else + mu_at_quad = damping_layer_func(z, dl_strength, & + dl_base_height, domain_height, 0.0_r_def) + end if + else + mu_at_quad = damping_layer_func(chi3_at_quad, dl_strength, & + dl_base_height, domain_height, 0.0_r_def) + end if + + wt = wqp_h(qp1) * wqp_v(qp2) / dj(qp1,qp2) + do df2 = 1, ndf_w2 + j_v2 = matmul(jac(:,:,qp1,qp2),basis_w2(:,df2,qp1,qp2)) + do df = 1, ndf_w2 ! Mass matrix is not symmetric for damping layer + j_v1 = matmul(jac(:,:,qp1,qp2),basis_w2(:,df,qp1,qp2)) + + integrand = wt * dot_product( j_v1, j_v2 ) + mm(ik,df,df2) = mm(ik,df,df2) & + + (1.0_r_def + factor(df)*mu_at_quad) & + * integrand end do end do end do @@ -281,12 +289,12 @@ function damping_layer_func(height, dl_strength, dl_base_height, domain_height, real(kind=r_def) :: height_star ! Latitude over which to reduce damping height from dl_base_height ! chosen to reduce it to approximately dl_base_height/2 - real(kind=r_def), parameter :: taper_lat = 50.0_r_def + real(kind=r_def), parameter :: taper_lat = 50.0_r_def*degrees_to_radians - if (abs(latitude) < taper_lat*degrees_to_radians) then + if (abs(latitude) < taper_lat) then height_star = domain_height + (height-domain_height)*cos(latitude) else - height_star = domain_height + (height-domain_height)*cos(taper_lat*degrees_to_radians) + height_star = domain_height + (height-domain_height)*cos(taper_lat) end if if (height_star >= dl_base_height) then diff --git a/science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 b/science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 new file mode 100644 index 000000000..fb51ad119 --- /dev/null +++ b/science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 @@ -0,0 +1,157 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- + +!> @brief Compute the LHS of the semi-implicit system for the horizontal velocity: +!! lhs_uv = norm_u*(Mu*u - P2t*t - grad*p), +!! with t = -Mt^(-1) * Pt2*u +module apply_mixed_u_operator_kernel_mod + +use argument_mod, only : arg_type, & + GH_FIELD, GH_OPERATOR, & + GH_READ, & + GH_WRITE, & + GH_REAL, CELL_COLUMN +use constants_mod, only : r_solver, i_def +use kernel_mod, only : kernel_type +use fs_continuity_mod, only : W2, W3, W2h, W2v, W2broken + +implicit none +private + +!------------------------------------------------------------------------------- +! Public types +!------------------------------------------------------------------------------- + +type, public, extends(kernel_type) :: apply_mixed_u_operator_kernel_type + private + type(arg_type) :: meta_args(7) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_WRITE, W2broken), & ! lhs_uv + arg_type(GH_FIELD, GH_REAL, GH_READ, W2h), & ! uv' + arg_type(GH_FIELD, GH_REAL, GH_READ, W2v), & ! w' + arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! exner' + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W2), & ! Mu^{c,d} + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W3), & ! grad + arg_type(GH_FIELD, GH_REAL, GH_READ, W2) & ! norm_u + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: apply_mixed_u_operator_code +end type + +!------------------------------------------------------------------------------- +! Contained functions/subroutines +!------------------------------------------------------------------------------- +public :: apply_mixed_u_operator_code + +contains + +!> @brief Compute the LHS of the semi-implicit system +!> @param[in] cell Horizontal cell index +!> @param[in] nlayers Number of layers +!> @param[in,out] lhs_uv Mixed operator applied to the horizontal momentum equation +!> @param[in] wind_uv Horizontal wind field +!> @param[in] wind_w Vertical wind field +!> @param[in] exner Exner pressure field +!> @param[in] ncell1 Total number of cells for the mu_cd operator +!> @param[in] mu_cd Generalised mass matrix for the momentum equation +!> @param[in] ncell2 Total number of cells for the grad operator +!> @param[in] grad Generalised gradient operator for the momentum equation +!> @param[in] norm_u Normalisation field for the momentum equation +!> @param[in] ndf_w2hb number of degrees of freedom per cell for the broken horizontal wind space +!> @param[in] undf_w2hb unique number of degrees of freedom for the broken horizontal wind space +!> @param[in] map_w2hb dofmap for the cell at the base of the column for the broken horizontal wind space +!> @param[in] ndf_w2h number of degrees of freedom per cell for the horizontal wind space +!> @param[in] undf_w2h unique number of degrees of freedom for the horizontal wind space +!> @param[in] map_w2h dofmap for the cell at the base of the column for the horizontal wind space +!> @param[in] ndf_w2v Number of degrees of freedom per cell for the vertical wind space +!> @param[in] undf_w2v Unique number of degrees of freedom for the vertical wind space +!> @param[in] map_w2v Dofmap for the cell at the base of the column for the vertical wind space +!> @param[in] ndf_w3 Norm_umber of degrees of freedom per cell for the pressure space +!> @param[in] ndf_w3 Unique number of degrees of freedom for the pressure space +!> @param[in] map_w3 Dofmap for the cell at the base of the column for the pressure space +!> @param[in] ndf_w2 Number of degrees of freedom per cell for the 3d wind space +!> @param[in] undf_w2 Unique number of degrees of freedom for the 3d wind space +!> @param[in] map_w2 Dofmap for the cell at the base of the column for the 3d wind space + +subroutine apply_mixed_u_operator_code(cell, & + nlayers, & + lhs_uv, & + wind_uv, wind_w, exner, & + ncell1, mu_cd, & + ncell2, grad, & + norm_u, & + ndf_w2hb, undf_w2hb, map_w2hb, & + ndf_w2h, undf_w2h, map_w2h, & + ndf_w2v, undf_w2v, map_w2v, & + ndf_w3, undf_w3, map_w3, & + ndf_w2, undf_w2, map_w2) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: cell, nlayers + integer(kind=i_def), intent(in) :: ncell1, ncell2 + integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 + integer(kind=i_def), intent(in) :: undf_w2h, ndf_w2h + integer(kind=i_def), intent(in) :: undf_w2hb, ndf_w2hb + integer(kind=i_def), intent(in) :: undf_w2v, ndf_w2v + integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 + integer(kind=i_def), dimension(ndf_w2hb), intent(in) :: map_w2hb + integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h + integer(kind=i_def), dimension(ndf_w2v), intent(in) :: map_w2v + integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 + integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 + + ! Fields + real(kind=r_solver), dimension(undf_w2hb), intent(inout) :: lhs_uv + real(kind=r_solver), dimension(undf_w2h), intent(in) :: wind_uv + real(kind=r_solver), dimension(undf_w2v), intent(in) :: wind_w + real(kind=r_solver), dimension(undf_w2), intent(in) :: norm_u + real(kind=r_solver), dimension(undf_w3), intent(in) :: exner + + ! Operators + real(kind=r_solver), dimension(ncell1, ndf_w2, ndf_w2), intent(in) :: mu_cd + real(kind=r_solver), dimension(ncell2, ndf_w2, ndf_w3), intent(in) :: grad + + ! Internal variables + integer(kind=i_def) :: df, df2, ij, & + nm1, iw3, & + iw2, iw2h + + ! Set up some useful shorthands for indices + ij = (cell-1)*nlayers + 1 + nm1 = nlayers-1 + iw3 = map_w3(1) + + ! LHS UV + do df = 1, ndf_w2h + iw2h = map_w2hb(df) + iw2 = map_w2(df) + lhs_uv(iw2h:iw2h+nm1) = - norm_u(iw2:iw2+nm1) & + *grad(ij:ij+nm1, df, 1)*exner(iw3:iw3+nm1) + end do + do df2 = 1, ndf_w2h + do df = 1, ndf_w2h + iw2h = map_w2hb(df) + iw2 = map_w2(df) + lhs_uv(iw2h:iw2h+nm1) = lhs_uv(iw2h:iw2h+nm1) & + + norm_u(iw2:iw2+nm1)* & + mu_cd(ij:ij+nm1, df, df2)*wind_uv(map_w2h(df2):map_w2h(df2)+nm1) + end do + end do + do df2 = 1, ndf_w2v + do df = 1, ndf_w2h + iw2h = map_w2hb(df) + iw2 = map_w2(df) + lhs_uv(iw2h:iw2h+nm1) = lhs_uv(iw2h:iw2h+nm1) & + + norm_u(iw2:iw2+nm1)* & + mu_cd(ij:ij+nm1, df, ndf_w2h+df2)*wind_w(map_w2v(df2):map_w2v(df2)+nm1) + end do + end do + +end subroutine apply_mixed_u_operator_code + +end module apply_mixed_u_operator_kernel_mod diff --git a/science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 b/science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 new file mode 100644 index 000000000..afa1f1f7d --- /dev/null +++ b/science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 @@ -0,0 +1,225 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- + +!> @brief Compute the LHS of the semi-implicit system for the +!! vertical velocity and pressure equations: +!! (lhs_w) = norm_u*(Mu*u - P2t*t - grad*p), +!! lhs_p = M3p*p - P3t*t + Q32*u, +!! with t = -Mt^(-1) * Pt2*u +module apply_mixed_wp_operator_kernel_mod + +use argument_mod, only : arg_type, & + GH_FIELD, GH_OPERATOR, & + GH_READ, & + GH_WRITE, & + GH_REAL, CELL_COLUMN +use constants_mod, only : r_solver, i_def +use kernel_mod, only : kernel_type +use fs_continuity_mod, only : W2, W3, Wtheta, W2h, W2v + +implicit none +private + +!------------------------------------------------------------------------------- +! Public types +!------------------------------------------------------------------------------- +type, public, extends(kernel_type) :: apply_mixed_wp_operator_kernel_type + private + type(arg_type) :: meta_args(14) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_WRITE, W2v), & ! lhs_w + arg_type(GH_FIELD, GH_REAL, GH_WRITE, W3), & ! lhs_p + arg_type(GH_FIELD, GH_REAL, GH_READ, W2h), & ! uv' + arg_type(GH_FIELD, GH_REAL, GH_READ, W2v), & ! w' + arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! exner' + arg_type(GH_OPERATOR, GH_REAL, GH_READ, Wtheta, W2), & ! Ptheta2 + arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & ! Mtheta^-1 + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W2), & ! Mu^{c,d} + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, Wtheta), & ! P2theta + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W3), & ! grad + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! norm_u + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W3, W3), & ! m3p + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W3, W2), & ! q32 + arg_type(GH_OPERATOR, GH_REAL, GH_READ, W3, Wtheta) & ! p3t + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: apply_mixed_wp_operator_code +end type + +!------------------------------------------------------------------------------- +! Contained functions/subroutines +!------------------------------------------------------------------------------- +public :: apply_mixed_wp_operator_code + +contains + +!> @brief Compute the LHS of the semi-implicit system +!> @param[in] cell Horizontal cell index +!> @param[in] nlayers Number of layers +!> @param[in,out] lhs_w Mixed operator applied to the vertical momentum equation +!> @param[in,out] lhs_p Mixed operator applied to the equation of state +!> @param[in] wind_uv Horizontal wind field +!> @param[in] wind_w Vertical wind field +!> @param[in] exner Exner pressure field +!> @param[in] ncell0 Total number of cells for the pt2 operator +!> @param[in] pt2 Projection operator from W2 to Wtheta +!> @param[in] mt_lumped_inv Lumped inverse mass matrix for the Wtheta space +!> @param[in] ncell1 Total number of cells for the mu_cd operator +!> @param[in] mu_cd Generalised mass matrix for the momentum equation +!> @param[in] ncell2 Total number of cells for the p2t operator +!> @param[in] p2t Generalised projection matrix from Wtheta to W2 +!> @param[in] ncell3 Total number of cells for the grad operator +!> @param[in] grad Generalised gradient operator for the momentum equation +!> @param[in] norm_u Normalisation field for the momentum equation +!> @param[in] ncell4 Total number of cells for the m3p operator +!> @param[in] m3p Weighted mass matrix for the W3 space +!> @param[in] ncell5 Total number of cells for the q32 operator +!> @param[in] q32 Projection operator from W2 to W3 +!> @param[in] ncell6 Total number of cells for the p3t operator +!> @param[in] p3t Projection operator from W2 to Wtheta +!> @param[in] ndf_w2v Number of degrees of freedom per cell for the vertical wind space +!> @param[in] undf_w2v Unique number of degrees of freedom for the vertical wind space +!> @param[in] map_w2v Dofmap for the cell at the base of the column for the vertical wind space +!> @param[in] ndf_w3 Norm_umber of degrees of freedom per cell for the pressure space +!> @param[in] ndf_w3 Unique number of degrees of freedom for the pressure space +!> @param[in] map_w3 Dofmap for the cell at the base of the column for the pressure space +!> @param[in] ndf_w2h Number of degrees of freedom per cell for the horizontal wind space +!> @param[in] undf_w2h Unique number of degrees of freedom for the horizontal wind space +!> @param[in] map_w2h Dofmap for the cell at the base of the column for the horizontal wind space +!> @param[in] undf_wt Number of degrees of freedom per cell for the potential +!! temperature space +!> @param[in] undf_wt Unique number of degrees of freedom for the potential +!! temperature space +!> @param[in] map_wt Dofmap for the cell at the base of the column for the +!! potential temperature space +!> @param[in] ndf_w2 Number of degrees of freedom per cell for the wind space +!> @param[in] undf_w2 Unique number of degrees of freedom for the wind space +!> @param[in] map_w2 Dofmap for the cell at the base of the column for the wind space +subroutine apply_mixed_wp_operator_code(cell, & + nlayers, & + lhs_w, & + lhs_p, & + wind_uv, wind_w, exner, & + ncell0, pt2, & + mt_lumped_inv, & + ncell1, mu_cd, & + ncell2, P2t, & + ncell3, grad, & + norm_u, & + ncell4, m3p, & + ncell5, q32, & + ncell6, p3t, & + ndf_w2v, undf_w2v, map_w2v, & + ndf_w3, undf_w3, map_w3, & + ndf_w2h, undf_w2h, map_w2h, & + ndf_wt, undf_wt, map_wt, & + ndf_w2, undf_w2, map_w2) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: cell, nlayers + integer(kind=i_def), intent(in) :: ncell0, ncell1, ncell2, ncell3 + integer(kind=i_def), intent(in) :: ncell4, ncell5, ncell6 + integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 + integer(kind=i_def), intent(in) :: undf_w2h, ndf_w2h + integer(kind=i_def), intent(in) :: undf_w2v, ndf_w2v + integer(kind=i_def), intent(in) :: undf_wt, ndf_wt + integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 + integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h + integer(kind=i_def), dimension(ndf_w2v), intent(in) :: map_w2v + integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 + integer(kind=i_def), dimension(ndf_wt), intent(in) :: map_wt + integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 + + ! Fields + real(kind=r_solver), dimension(undf_w2v), intent(inout) :: lhs_w + real(kind=r_solver), dimension(undf_w3), intent(inout) :: lhs_p + real(kind=r_solver), dimension(undf_w2h), intent(in) :: wind_uv + real(kind=r_solver), dimension(undf_w2v), intent(in) :: wind_w + real(kind=r_solver), dimension(undf_w2), intent(in) :: norm_u + real(kind=r_solver), dimension(undf_wt), intent(in) :: mt_lumped_inv + real(kind=r_solver), dimension(undf_w3), intent(in) :: exner + + ! Operators + real(kind=r_solver), dimension(ncell0, ndf_wt, ndf_w2), intent(in) :: pt2 + real(kind=r_solver), dimension(ncell1, ndf_w2, ndf_w2), intent(in) :: mu_cd + real(kind=r_solver), dimension(ncell2, ndf_w2, ndf_wt), intent(in) :: p2t + real(kind=r_solver), dimension(ncell3, ndf_w2, ndf_w3), intent(in) :: grad + real(kind=r_solver), dimension(ncell4, ndf_w3, ndf_w3), intent(in) :: m3p + real(kind=r_solver), dimension(ncell5, ndf_w3, ndf_w2), intent(in) :: q32 + real(kind=r_solver), dimension(ncell6, ndf_w3, ndf_wt), intent(in) :: p3t + + ! Internal variables + integer(kind=i_def) :: df, df2, ij, & + nm1, iw3, iwt, & + iw2, iw2h, iw2v + real(kind=r_solver), dimension(0:nlayers-1,ndf_w2) :: u_e + real(kind=r_solver), dimension(0:nlayers) :: t_col + + ! Set up some useful shorthands for indices + ij = (cell-1)*nlayers + 1 + nm1 = nlayers-1 + iw3 = map_w3(1) + iwt = map_wt(1) + + ! Create the element velocity field + do df = 1, ndf_w2h + iw2h = map_w2h(df) + u_e(:,df) = wind_uv(iw2h:iw2h+nm1) + end do + do df = 1, ndf_w2v + iw2v = map_w2v(df) + u_e(:,ndf_w2h+df) = wind_w(iw2v:iw2v+nm1) + end do + + ! Compute t for the column + t_col(:) = 0.0_r_solver + do df = 1, ndf_w2 + t_col(0:nm1) = t_col(0:nm1) - pt2(ij:ij+nm1, 1, df)*u_e(:,df) + t_col(1:nm1+1) = t_col(1:nm1+1) - pt2(ij:ij+nm1, 2, df)*u_e(:,df) + end do + t_col(:) = t_col(:) * mt_lumped_inv(iwt:iwt+1+nm1) + + ! LHS W + iw2v = map_w2v(1) + lhs_w(iw2v:iw2v+nlayers) = 0.0_r_solver + + do df = 1, ndf_w2v + iw2v = map_w2v(df) + iw2 = map_w2(ndf_w2h+df) + lhs_w(iw2v:iw2v+nm1) = lhs_w(iw2v:iw2v+nm1) & + + norm_u(iw2:iw2+nm1)*( & + - p2t(ij:ij+nm1, ndf_w2h+df, 1)*t_col(0:nm1) & + - p2t(ij:ij+nm1, ndf_w2h+df, 2)*t_col(1:nm1+1) & + - grad(ij:ij+nm1, ndf_w2h+df, 1)*exner(iw3:iw3+nm1)) + + end do + do df2 = 1, ndf_w2 + do df = 1, ndf_w2v + iw2v = map_w2v(df) + iw2 = map_w2(ndf_w2h+df) + lhs_w(iw2v:iw2v+nm1) = lhs_w(iw2v:iw2v+nm1) & + + norm_u(iw2:iw2+nm1)* & + mu_cd(ij:ij+nm1, ndf_w2h+df, df2)*u_e(:,df2) + + end do + end do + ! Set BC for lhs_w + lhs_w(map_w2v(1)) = 0.0_r_solver + lhs_w(map_w2v(2)+nlayers-1) = 0.0_r_solver + + ! LHS P + lhs_p(iw3:iw3+nm1) = m3p(ij:ij+nm1, 1, 1)*exner(iw3:iw3+nm1) & + - p3t(ij:ij+nm1, 1, 1)*t_col(0:nm1) & + - p3t(ij:ij+nm1, 1, 2)*t_col(1:nm1+1) + do df = 1, ndf_w2 + lhs_p(iw3:iw3+nm1) = lhs_p(iw3:iw3+nm1) + q32(ij:ij+nm1, 1, df)*u_e(:,df) + end do + +end subroutine apply_mixed_wp_operator_code + +end module apply_mixed_wp_operator_kernel_mod diff --git a/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 b/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 index 84fd4ebcb..07d975356 100644 --- a/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 @@ -28,14 +28,13 @@ module schur_backsub_kernel_mod ! Kernel metadata for PSyclone type, public, extends(kernel_type) :: schur_backsub_kernel_type private - type(arg_type) :: meta_args(9) = (/ & + type(arg_type) :: meta_args(8) = (/ & arg_type(GH_FIELD, GH_REAL, GH_INC, W2h), & ! lhs_h arg_type(GH_FIELD, GH_REAL, GH_WRITE, W2v), & ! lhs_v arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! rhs arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! exner_inc arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W3), & ! div arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! norm - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Hb_inv arg_type(GH_SCALAR, GH_LOGICAL, GH_READ), & ! lam arg_type(GH_FIELD, GH_REAL, GH_READ, W2) & ! mask /) @@ -90,7 +89,6 @@ subroutine schur_backsub_code(cell, & ncell_3d, & div, & norm, & - Hb_inv, & lam, mask, & ndfh, undfh, maph, & ndfv, undfv, mapv, & @@ -117,7 +115,6 @@ subroutine schur_backsub_code(cell, & real(kind=r_solver), dimension(undfv), intent(inout) :: lhs_v real(kind=r_solver), dimension(ncell_3d,ndf1,ndf2), intent(in) :: div real(kind=r_solver), dimension(undf1), intent(in) :: norm - real(kind=r_solver), dimension(undf1), intent(in) :: Hb_inv real(kind=r_solver), dimension(undf1), intent(in) :: rhs real(kind=r_solver), dimension(undf1), intent(in) :: mask @@ -131,10 +128,11 @@ subroutine schur_backsub_code(cell, & do df = 1, ndfh ih = maph(df) i1 = map1(df) + lhs_h(ih:ih+nl) = lhs_h(ih:ih+nl) + 0.5_r_solver*rhs(i1:i1+nl) do df2 = 1, ndf2 i2 = map2(df2) - lhs_h(ih:ih+nl) = lhs_h(ih:ih+nl) + 0.5_r_solver*rhs(i1:i1+nl) & - + div(ij:ij+nl, df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl)*Hb_inv(i1:i1+nl) + lhs_h(ih:ih+nl) = lhs_h(ih:ih+nl) & + + div(ij:ij+nl, df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl) end do end do @@ -149,7 +147,7 @@ subroutine schur_backsub_code(cell, & do df2 = 1, ndf2 i2 = map2(df2) lhs_v(iv:iv+nl) = lhs_v(iv:iv+nl) & - + div(ij:ij+nl, ndfh + df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl)*Hb_inv(i1:i1+nl) + + div(ij:ij+nl, ndfh + df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl) end do end do diff --git a/science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf new file mode 100644 index 000000000..351b39ba5 --- /dev/null +++ b/science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf @@ -0,0 +1,86 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright Met Office. All rights reserved. +! For further details please refer to the file COPYRIGHT.txt +! which you should have received as part of this distribution. +!----------------------------------------------------------------------------- + +!> Test the assembly of a W2h field from a W2hb field +!> +module assemble_w2h_from_w2hb_kernel_mod_test + + use constants_mod, only : i_def, r_solver + use funit + + implicit none + + private + public :: test_all + +contains + + @Test + subroutine test_all( ) + + use assemble_w2h_from_w2hb_kernel_mod, only: assemble_w2h_from_w2hb_code + + implicit none + + real(r_solver), parameter :: tol = 1.0e-6_r_solver + + integer(i_def), parameter :: ncells = 2 + integer(i_def), parameter :: nlayers = 1 + integer(i_def), parameter :: ndf_w2h = 2 + integer(i_def), parameter :: undf_w2h = ndf_w2h*nlayers + integer(i_def), parameter :: ndf_w2hb = 2 + integer(i_def), parameter :: undf_w2hb = ndf_w2hb*nlayers*ncells + + integer(i_def), dimension( ndf_w2h, ncells ) :: map_w2h + integer(i_def), dimension( ndf_w2hb, ncells ) :: map_w2hb + + real(r_solver), dimension( undf_w2h ) :: field_w2h + real(r_solver), dimension( undf_w2hb ) :: field_w2hb + real(r_solver), dimension( undf_w2h ) :: answer + + integer(i_def) :: cell + + ! Assume a biperiodic mesh with two cells + ! Locations of W2 dofs + ! |---|---| + ! 1 2 1 + ! |---|---| + map_w2h(:,1) = (/ 1, nlayers+1 /) + map_w2h(:,2) = (/ nlayers+1, 1 /) + ! + ! Locations of W2b dofs + ! |---|---| + ! |1 2|3 4| + ! |---|---| + map_w2hb(:,1) = (/ 1, nlayers+1 /) + map_w2hb(:,2) = (/ 2*nlayers+1, 3*nlayers+1 /) + + field_w2h = (/ 3.0_r_solver, 4.0_r_solver /) + + field_w2hb = (/ 1.0_r_solver, 2.0_r_solver, 3.0_r_solver, 4.0_r_solver /) + + do cell = 1, ncells + call assemble_w2h_from_w2hb_code( nlayers, & + field_w2h, & + field_w2hb, & + ndf_w2h, & + undf_w2h, & + map_w2h(:,cell), & + ndf_w2hb, & + undf_w2hb, & + map_w2hb(:,cell) & + ) + end do + + ! field_w2h should equal it's initial value plus the two + ! adjacent w2hb values + answer = (/ 8.0_r_solver, 9.0_r_solver /) + + @assertEqual(answer, field_w2h, tol) + + end subroutine test_all + +end module assemble_w2h_from_w2hb_kernel_mod_test diff --git a/science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf new file mode 100644 index 000000000..111b48817 --- /dev/null +++ b/science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf @@ -0,0 +1,101 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright Met Office. All rights reserved. +! For further details please refer to the file COPYRIGHT.txt +! which you should have received as part of this distribution. +!----------------------------------------------------------------------------- + +!> Test the mixed operator of the semi-implicit lhs +module apply_mixed_u_operator_kernel_mod_test + + use constants_mod, only : i_def, r_solver + use funit + + implicit none + + private + public :: test_all + +contains + + @test( ) + subroutine test_all( ) + + use apply_mixed_u_operator_kernel_mod, only : apply_mixed_u_operator_code + + implicit none + + real(r_solver), parameter :: tol = 1.0e-6_r_solver + + ! Mesh + integer(i_def), parameter :: nlayers = 1 + integer(i_def), parameter :: cell = 1 + integer(i_def), parameter :: ncell = 1 + + ! Spaces + integer(i_def), parameter :: ndf_w2h = 2 + integer(i_def), parameter :: ndf_w2v = 2 + integer(i_def), parameter :: ndf_w2 = ndf_w2h+ndf_w2v + integer(i_def), parameter :: ndf_w3 = 1 + integer(i_def), parameter :: undf_w2h = ndf_w2h*nlayers + integer(i_def), parameter :: undf_w2v = nlayers + 1 + integer(i_def), parameter :: undf_w2 = undf_w2h + undf_w2v + integer(i_def), parameter :: undf_w3 = ndf_w3*nlayers + + ! Maps + integer(i_def), dimension(ndf_w2h) :: map_w2h + integer(i_def), dimension(ndf_w2v) :: map_w2v + integer(i_def), dimension(ndf_w2) :: map_w2 + integer(i_def), dimension(ndf_w3) :: map_w3 + + ! Operators + real(r_solver), dimension(ndf_w2, ndf_w2, ncell) :: Mu + real(r_solver), dimension(ndf_w2, ndf_w3, ncell) :: Grad + + ! Fields + real(r_solver), dimension(undf_w2) :: Nu, u + real(r_solver), dimension(undf_w2h) :: Luv, uv + real(r_solver), dimension(undf_w2v) :: w + real(r_solver), dimension(undf_w3) :: p + + integer(i_def) :: df + real(r_solver) :: answer + + map_w2h = (/ 1_i_def, 1_i_def + nlayers /) + map_w2v = (/ 1_i_def, 2_i_def /) + map_w2 = (/ 1_i_def, 1_i_def + nlayers, 1_i_def + 2*nlayers, 2_i_def + 2*nlayers /) + map_w3 = (/ 1_i_def /) + + ! Set up operators + Mu = 0.0_r_solver + do df = 1,ndf_w2 + Mu(df,df,1) = real(df,r_solver) + Grad(df,1,1) = (-1.0_r_solver)**df + end do + + ! Set up the fields + uv = (/ 0.0_r_solver, 1.0_r_solver /) + w = (/ 3.0_r_solver, -2.0_r_solver /) + p = (/ 1.2_r_solver /) + Nu = 2.0_r_solver + Luv = 0.0_r_solver + + ! Compute: (L_uv) = Nu*(Mu*u - Grad*p) + call apply_mixed_u_operator_code(cell, & + nlayers, & + Luv, & + uv, w, p, & + ncell, Mu, & + ncell, Grad, & + Nu, & + ndf_w2h, undf_w2h, map_w2h, & + ndf_w2h, undf_w2h, map_w2h, & + ndf_w2v, undf_w2v, map_w2v, & + ndf_w3, undf_w3, map_w3, & + ndf_w2, undf_w2, map_w2) + + @assertEqual(2.4_r_solver, Luv(1), tol) + @assertEqual(1.6_r_solver, Luv(2), tol) + + end subroutine test_all + +end module apply_mixed_u_operator_kernel_mod_test diff --git a/science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf new file mode 100644 index 000000000..a95cbbd6f --- /dev/null +++ b/science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf @@ -0,0 +1,160 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright Met Office. All rights reserved. +! For further details please refer to the file COPYRIGHT.txt +! which you should have received as part of this distribution. +!----------------------------------------------------------------------------- + +!> Test the mixed operator of the semi-implicit lhs +module apply_mixed_wp_operator_kernel_mod_test + + use constants_mod, only : i_def, r_solver + use funit + + implicit none + + private + public :: test_all + +contains + + @test( ) + subroutine test_all( ) + + use apply_mixed_wp_operator_kernel_mod, only : apply_mixed_wp_operator_code + + implicit none + + real(r_solver), parameter :: tol = 1.0e-6_r_solver + + ! Mesh + integer(i_def), parameter :: nlayers = 3 + integer(i_def), parameter :: cell = 1 + integer(i_def), parameter :: ncell = nlayers + + ! Spaces + integer(i_def), parameter :: ndf_w2h = 2 + integer(i_def), parameter :: ndf_w2v = 2 + integer(i_def), parameter :: ndf_w2 = ndf_w2h+ndf_w2v + integer(i_def), parameter :: ndf_wt = 2 + integer(i_def), parameter :: ndf_w3 = 1 + integer(i_def), parameter :: undf_w2h = ndf_w2h*nlayers + integer(i_def), parameter :: undf_w2v = nlayers + 1 + integer(i_def), parameter :: undf_w2 = undf_w2h + undf_w2v + integer(i_def), parameter :: undf_wt = nlayers + 1 + integer(i_def), parameter :: undf_w3 = ndf_w3*nlayers + + ! Maps + integer(i_def), dimension(ndf_w2h) :: map_w2h + integer(i_def), dimension(ndf_w2v) :: map_w2v + integer(i_def), dimension(ndf_w2) :: map_w2 + integer(i_def), dimension(ndf_wt) :: map_wt + integer(i_def), dimension(ndf_w3) :: map_w3 + + ! Operators + real(r_solver), dimension(ncell, ndf_w2, ndf_w2) :: Mu + real(r_solver), dimension(ncell, ndf_w2, ndf_wt) :: P2t + real(r_solver), dimension(ncell, ndf_w2, ndf_w3) :: Grad + real(r_solver), dimension(ncell, ndf_wt, ndf_w2) :: Pt2 + real(r_solver), dimension(ncell, ndf_w3, ndf_w3) :: M3p + real(r_solver), dimension(ncell, ndf_w3, ndf_wt) :: P3t + real(r_solver), dimension(ncell, ndf_w3, ndf_w2) :: Q32 + + ! Fields + real(r_solver), dimension(undf_w2) :: Nu + real(r_solver), dimension(undf_w2h) :: uv + real(r_solver), dimension(undf_w2v) :: Lw, w + real(r_solver), dimension(undf_wt) :: invMt + real(r_solver), dimension(undf_w3) :: p, Lp + + integer(i_def) :: df, k + real(r_solver), dimension(undf_w2v) :: answer + real(r_solver) :: answer_p + + map_w2h = (/ 1_i_def, 1_i_def + nlayers /) + map_w2v = (/ 1_i_def, 2_i_def /) + map_w2 = (/ 1_i_def, 1_i_def + nlayers, 1_i_def + 2*nlayers, 2_i_def + 2*nlayers /) + map_wt = (/ 1_i_def, 2_i_def /) + map_w3 = (/ 1_i_def /) + + ! Set up operators + Mu = 0.0_r_solver + + do df = 1,ndf_w2 + Mu(:,df,df) = real(df,r_solver) + Grad(:,df,1) = (-1.0_r_solver)**df + end do + + P2t(:,:,:) = 0.0_r_solver + P2t(:,3:4,:) = 0.5_r_solver + Pt2 = 0.0_r_solver + Pt2(:,1,3) = 7.0_r_solver + Pt2(:,2,4) = 9.0_r_solver + M3p = 0.5_r_solver + Q32 = 3.0_r_solver + P3t = 5.0_r_solver + + ! Set up the fields + do k = 1, nlayers + uv(k) = 0.0_r_solver + uv(k+nlayers) = 1.0_r_solver + end do + w = (/0.0_r_solver, 3.0_r_solver, -2.0_r_solver, 0.0_r_solver /) + p(:) = 1.2_r_solver + Nu(:) = 2.0_r_solver + invMt(:) = 0.25_r_solver + + ! Compute: (L_uv, L_w) = Nu*(Mu*u - Proj*t - Grad*p) + ! L_p = M3p*p - P3t*t + Q32*u + ! with t = -Mt^-1 * Pt2*u + call apply_mixed_wp_operator_code(cell, & + nlayers, & + Lw, Lp, & + uv, w, p, & + ncell, Pt2, & + invMt, & + ncell, Mu, & + ncell, P2t, & + ncell, Grad, & + Nu, & + ncell, M3p, & + ncell, Q32, & + ncell, P3t, & + ndf_w2v, undf_w2v, map_w2v, & + ndf_w3, undf_w3, map_w3, & + ndf_w2h, undf_w2h, map_w2h, & + ndf_wt, undf_wt, map_wt, & + ndf_w2, undf_w2, map_w2) + + ! The code below can be used to generate the answers required and + ! is kept to here to make altering the unit test following changes in the + ! kernel easier + !t(:) = 0.0_r_solver + !do k = 1, nlayers + ! t(k) = t(k) - Pt2(k,1,3)*w(k) - Pt2(k,1,4)*w(k+1) + ! t(k+1) = t(k+1) - Pt2(k,2,3)*w(k) - Pt2(k,2,4)*w(k+1) + !end do + !t(:) = invMt(:)*t(:) + + !answer(:) = 0.0_r_solver + !do k = 0, nlayers - 1 + ! do dfv = 1,ndf_w2v + ! u = (/ uv(1+k), uv(4+k), w(1+k), w(2+k) /) + ! df = ndf_w2h+dfv + ! answer(map_w2v(dfv)+k) = answer(map_w2v(dfv)+k) & + ! + Nu(map_w2(df)+k)*(sum(Mu(k+1,df,:)*u) & + ! - sum(P2t(k+1,df,:)*t(k+1:k+2)) & + ! - Grad(k+1,df,1)*p(1+k)) + ! end do + !end do + !u = (/ uv(1), uv(4), w(1), w(2) /) + !answer_p = M3p(1,1,1)*p(1) - sum(P3t(1,1,:)*t(1:2)) + sum(Q32(1,1,:)*u(1:4)) + + answer = (/ 0.0_r_solver, 58.0_r_solver, -32.0_r_solver, 0.0_r_solver /) + @assertEqual(answer, Lw, tol) + + answer_p = 72.6_r_solver + @assertEqual(answer_p, Lp(1), tol) + + end subroutine test_all + +end module apply_mixed_wp_operator_kernel_mod_test diff --git a/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf index fcbb75093..0b5014e38 100644 --- a/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf @@ -23,7 +23,7 @@ contains implicit none - real(r_solver), parameter :: tol = 1.0e-12_r_solver + real(r_solver), parameter :: tol = 1.0e-6_r_solver ! Mesh integer(i_def), parameter :: nlayers = 1_i_def @@ -50,7 +50,7 @@ contains real(r_solver), dimension(ncell, ndf_w2, ndf_w3) :: Grad ! Fields - real(r_solver), dimension(undf_w2) :: rhs, mask, z, y + real(r_solver), dimension(undf_w2) :: rhs, mask, y real(r_solver), dimension(undf_w2h) :: Luv real(r_solver), dimension(undf_w2v) :: Lw real(r_solver), dimension(undf_w3) :: x @@ -58,8 +58,8 @@ contains ! Logicals logical(l_def), parameter :: lam = .true. - integer(i_def) :: df - real(r_solver) :: answer + integer(i_def) :: df + real(r_solver), dimension(undf_w2h) :: answer map_w2h = (/ 1_i_def, 1_i_def + nlayers /) map_w2v = (/ 1_i_def, 2_i_def /) @@ -73,7 +73,6 @@ contains ! Set up the fields y = (/ 0.0_r_solver, 1.0_r_solver, 3.0_r_solver, -2.0_r_solver /) - z = (/ 2.4_r_solver, 0.4_r_solver, 7.3_r_solver, 1.2_r_solver /) x = (/ 1.2_r_solver /) rhs = (/ 6.3_r_solver, 6.7_r_solver, 4.2_r_solver, 7.5_r_solver /) Luv = 0.0_r_solver @@ -87,22 +86,17 @@ contains ncell, & Grad, & y, & - z, & lam, mask, & ndf_w2h, undf_w2h, map_w2h, & ndf_w2v, undf_w2v, map_w2v, & ndf_w2, undf_w2, map_w2, & ndf_w3, undf_w3, map_w3 ) - do df = 1, ndf_w2h - answer = mask(df)*( 0.5_r_solver*rhs(df) + y(df)*z(df)*grad(1,df,1)*x(1)) - @assertEqual(answer, Luv(df), tol) - end do + answer = (/ 6.3_r_solver, 4.55_r_solver /) + @assertEqual(answer, Luv, tol) - do df = 1, ndf_w2v - answer = 0.0_r_solver - @assertEqual(answer, Lw(df), tol) - end do + answer = (/ 0.0_r_solver, 0.0_r_solver /) + @assertEqual(answer, Lw, tol) end subroutine test_all diff --git a/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf b/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf index b1fb53e42..bb2dbf1ca 100644 --- a/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf @@ -107,6 +107,7 @@ contains wind_mono_top_depth = 0, & adjust_theta = .false., & adjust_theta_above = 0.0_r_def, & + adjust_tracer_equation = .false., & adjust_vhv_wind=.false., & broken_w2_projection = .false., & consistent_metric = .false., & diff --git a/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf index 63a8e4996..dd681f833 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf @@ -80,6 +80,7 @@ contains wind_mono_top_depth = 0, & adjust_theta = .false., & adjust_theta_above = 0.0_r_def, & + adjust_tracer_equation = .false., & adjust_vhv_wind=.false., & dry_field_name='tracer', & profile_size = 1, & diff --git a/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf index f714c9b62..b9e58d149 100644 --- a/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf @@ -72,6 +72,7 @@ contains cap_density_predictor = 0.001_r_def, & adjust_theta = .false., & adjust_theta_above = 0.0_r_def, & + adjust_tracer_equation = .false., & adjust_vhv_wind=.false., & min_val_abs_tol = -1.0e-12_r_def, & min_val_max_iterations = 100, & diff --git a/science/linear/integration-test/nwp_gal9/ReadMe b/science/linear/integration-test/nwp_gal9/ReadMe new file mode 100644 index 000000000..911e9288f --- /dev/null +++ b/science/linear/integration-test/nwp_gal9/ReadMe @@ -0,0 +1 @@ +The nwp_gal9.nml matches the configuration from the default rose-app.conf, in linear_model. diff --git a/science/linear/integration-test/nwp_gal9/iodef.xml b/science/linear/integration-test/nwp_gal9/iodef.xml new file mode 100644 index 000000000..35ae0ee07 --- /dev/null +++ b/science/linear/integration-test/nwp_gal9/iodef.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + performance + 1.0 + + + + true + 50 + true + + + + + diff --git a/science/linear/integration-test/nwp_gal9/nwp_gal9.f90 b/science/linear/integration-test/nwp_gal9/nwp_gal9.f90 new file mode 100644 index 000000000..7c3aeb90b --- /dev/null +++ b/science/linear/integration-test/nwp_gal9/nwp_gal9.f90 @@ -0,0 +1,146 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- + +!>@brief The top level program for the tangent linear tests. +!>@details The default is to run all available tests - which +!! test whether the linear code is tangent linear to the +!! corresponding nonlinear code. +program nwp_gal9 + + use driver_collections_mod, only: init_collections, final_collections + use driver_time_mod, only: init_time, final_time + use driver_comm_mod, only: init_comm, final_comm + use driver_log_mod, only: init_logger, final_logger + use driver_config_mod, only: init_config, final_config + use driver_modeldb_mod, only: modeldb_type + use lfric_mpi_mod, only: global_mpi + use gungho_mod, only: gungho_required_namelists + use log_mod, only: log_event, & + LOG_LEVEL_ERROR, & + LOG_LEVEL_INFO + use linear_driver_mod, only: initialise, finalise + use tl_test_driver_mod, only: run_timesteps, & + run_transport_control, & + run_semi_imp_alg, & + run_rhs_alg + + implicit none + + ! Model run working data set + type(modeldb_type) :: modeldb + character(*), parameter :: application_name = 'nwp_gal9' + character(:), allocatable :: filename + + ! Variables used for parsing command line arguments + integer :: length, status, nargs + character(len=0) :: dummy + character(len=:), allocatable :: program_name, test_flag + + ! Flags which determine the tests that will be carried out + logical :: do_test_timesteps = .false. + logical :: do_test_transport_control = .false. + logical :: do_test_semi_imp_alg = .false. + logical :: do_test_rhs_alg = .false. + + ! Usage message to print + character(len=256) :: usage_message + + 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) + + call log_event( 'TL testing running ...', LOG_LEVEL_INFO ) + + ! Create the depository, prognostics and diagnostics field collections + call modeldb%fields%add_empty_field_collection("depository", table_len = 100) + call modeldb%fields%add_empty_field_collection("prognostic_fields", & + table_len = 100) + call modeldb%fields%add_empty_field_collection("diagnostic_fields", & + table_len = 100) + call modeldb%fields%add_empty_field_collection("lbc_fields", & + table_len = 100) + call modeldb%fields%add_empty_field_collection("radiation_fields", & + table_len = 100) + call modeldb%fields%add_empty_field_collection("fd_fields", & + table_len = 100) + + + call modeldb%io_contexts%initialise(application_name, 100) + + ! Parse command line parameters + call get_command_argument( 0, dummy, length, status ) + allocate(character(length)::program_name) + call get_command_argument( 0, program_name, length, status ) + nargs = command_argument_count() + + ! Print out usage message if wrong number of arguments is specified + if (nargs /= 2) then + write(usage_message,*) "Usage: ",trim(program_name), & + " " // & + " test_XXX with XXX in { " // & + " timesteps, " // & + " transport_control, " // & + " semi_imp_alg, " // & + " rhs_alg, " // & + " } " + call log_event( trim(usage_message), LOG_LEVEL_ERROR ) + end if + + call get_command_argument( 1, dummy, length, status ) + allocate( character(length) :: filename ) + call get_command_argument( 1, filename, length, status ) + + call get_command_argument( 2, dummy, length, status ) + allocate(character(length)::test_flag) + call get_command_argument( 2, test_flag, length, status ) + + ! Choose test case depending on flag provided in the first command + ! line argument + select case (trim(test_flag)) + case ("test_timesteps") + do_test_timesteps = .true. + case ("test_transport_control") + do_test_transport_control = .true. + case ("test_semi_imp_alg") + do_test_semi_imp_alg = .true. + case ("test_rhs_alg") + do_test_rhs_alg = .true. + case default + call log_event( "Unknown test", LOG_LEVEL_ERROR ) + end select + + call init_comm( application_name, modeldb ) + call init_config( filename, gungho_required_namelists, & + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), application_name ) + call init_collections() + call init_time( modeldb ) + call initialise( application_name, modeldb ) + + if (do_test_timesteps) then + call run_timesteps(modeldb) + endif + if (do_test_transport_control) then + call run_transport_control(modeldb) + endif + if (do_test_rhs_alg) then + call run_rhs_alg(modeldb) + endif + if (do_test_semi_imp_alg) then + call run_semi_imp_alg(modeldb) + endif + + call finalise( application_name, modeldb ) + call final_time( modeldb ) + call final_collections() + call final_logger( application_name ) + call final_config() + call final_comm( modeldb ) + +end program nwp_gal9 diff --git a/science/linear/integration-test/nwp_gal9/nwp_gal9.py b/science/linear/integration-test/nwp_gal9/nwp_gal9.py new file mode 100755 index 000000000..aa1414177 --- /dev/null +++ b/science/linear/integration-test/nwp_gal9/nwp_gal9.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +############################################################################## +# (c) Crown copyright 2026 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## +''' +Run the linear model integration tests for the default (nwp_gal9) configuration + +''' +import os +import re +import sys + + +from testframework import LFRicLoggingTest, TestEngine, TestFailed + + +class TLTest(LFRicLoggingTest): + ''' + Run the linear model integration tests + ''' + + def __init__(self, flag): + self._flag = flag + if 'MPIEXEC_BROKEN' in os.environ: + TLTest.set_mpiexec_broken() + super(TLTest, self).__init__([sys.argv[1], + 'resources/nwp_gal9_configuration.nml', + 'test_' + self._flag], + processes=1, + name='tl_test.Log') + + def test(self, return_code, out, err): + ''' + Error messages if the test failed to run + ''' + if return_code != 0: + message = 'Test program failed with exit code: {code}' + raise TestFailed(message.format(code=return_code), + stdout=out, stderr=err, + log=self.getLFRicLoggingLog()) + + # "out" becomes self.getLFRicLoggingLog() when PE>1 + if not self.test_passed(out): + message = 'Test {} failed' + raise TestFailed(message.format(self._flag), + stdout=out, stderr=err, + log=self.getLFRicLoggingLog()) + + return 'TL test : '+self._flag + + def test_passed(self, out): + ''' + Examine the output to see if the validity test passed + ''' + success = False + pattern = re.compile(r'\s+test\s+.*?:\s*PASS\s*$') + for line in out.split("\n"): + match = pattern.search(line) + if match: + success = True + return success + +class tl_test_semi_imp_alg(TLTest): + ''' + Test the semi implicit timestep + ''' + def __init__(self): + flag = "semi_imp_alg" + super(tl_test_semi_imp_alg, self).__init__(flag) + + +class tl_test_rhs_alg(TLTest): + ''' + Test the right hand side forcing for the mixed solver + ''' + def __init__(self): + flag = "rhs_alg" + super(tl_test_rhs_alg, self).__init__(flag) + +class tl_test_transport_control(TLTest): + ''' + Test the transport + ''' + def __init__(self): + flag = "transport_control" + super(tl_test_transport_control, self).__init__(flag) + + +class tl_test_timesteps(TLTest): + ''' + Test running over multiple timesteps + ''' + def __init__(self): + flag = "timesteps" + super(tl_test_timesteps, self).__init__(flag) + +if __name__ == '__main__': + TestEngine.run(tl_test_rhs_alg()) + TestEngine.run(tl_test_transport_control()) + TestEngine.run(tl_test_semi_imp_alg()) + TestEngine.run(tl_test_timesteps()) + diff --git a/applications/jedi_lfric_tests/example_tlm_tests/mesh_C12.nc b/science/linear/integration-test/nwp_gal9/resources/mesh_C12_MG.nc similarity index 64% rename from applications/jedi_lfric_tests/example_tlm_tests/mesh_C12.nc rename to science/linear/integration-test/nwp_gal9/resources/mesh_C12_MG.nc index f7ea6988e22a06194aac0d17b6e3be62cd539773..ebe518907aea38df3c4cc5b3839febbef455ba53 100644 GIT binary patch delta 38591 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 diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml b/science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml similarity index 68% rename from applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml rename to science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml index 1296925a7..2277cacbc 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml +++ b/science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml @@ -1,53 +1,13 @@ -&jedi_lfric_tests -test_field='theta', -/ - -#### Configure JEDI-LFRIC - -&jedi_geometry -io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', -io_path_state_write='write_file', -io_setup_increment=.false., -io_time_step='P0DT1H0M0S', -/ -&jedi_state -state_time='2018-04-14 21:00:00', -use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', -/ -&jedi_increment -inc_time='2018-04-14 21:00:00', -initialise_via_read=.false., -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', -'m_cl','m_r','m_s', -/ -&jedi_linear_model -nl_time_step='P0DT1H0M0S', -/ -&jedi_pseudo_model -initial_time='2018-04-14T21:00:00', -number_of_steps=9, -time_step='P0DT1H0M0S', -/ -&jedi_lfric_settings -forecast_length='P0DT6H0M0S', -/ - -#### Configure LFRic - &base_mesh -file_prefix='mesh_C12', +file_prefix='resources/mesh_C12_MG', geometry='spherical', prepartitioned=.false., -prime_mesh_name='C12', +prime_mesh_name='dynamics', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final' +transport_overwrite_freq='final', / &checks limit_cfl=.false., @@ -60,6 +20,7 @@ cloud='none', dynamics='gungho', external_forcing=.false., iau=.false., +iau_sst=.false., iau_surf=.false., methane_oxidation=.false., orographic_drag='none', @@ -68,6 +29,15 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / +&convection +dx_ref=50000.0, +l_cvdiag_ctop_qmax=.false., +qlmin=4.0e-4, +resdep_precipramp=.false., +/ +&cosp +l_cosp=.false., +/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -77,6 +47,7 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, +share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -94,12 +65,14 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', -diag_stem_name='', +diag_stem_name='diagGungho', +ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', +ls_filename='final_ls', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', -start_dump_directory='', -start_dump_filename='', +start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', +start_dump_filename='final_pert', / &finite_element cellshape='quadrilateral', @@ -111,41 +84,53 @@ rehabilitate=.true., vorticity_in_w1=.false., / &formulation -dlayer_on=.true., +dlayer_on=.false., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., +horizontal_physics_predictor=.false., +horizontal_transport_predictor=.false., init_exner_bt=.true., -l_multigrid=.false., +l_multigrid=.true., lagged_orog=.true., -moisture_formulation='dry', -moisture_in_solver=.false., +moisture_formulation='traditional', +moisture_in_solver=.true., p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., +theta_moist_source=.false., use_multires_coupling=.false., -use_physics=.false., +use_physics=.true., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -fail_on_non_converged=.false., gcrk=8, -method='bicgstab', -monitor_convergence=.true., +method='prec_only', +monitor_convergence=.false., normalise=.true., -preconditioner='tridiagonal', +preconditioner='multigrid', si_pressure_a_tol=1.0e-8, si_pressure_maximum_iterations=400, si_pressure_tolerance=1.0e-4, / +&iau_addinf_io +/ +&iau_addinf_io +/ +&iau_ainc_io +/ +&iau_ainc_io +/ +&iau_bcorr_io +/ +&iau +/ &idealised f_lon_deg=0.0, -perturb_init=.false. -perturb_magnitude=0 -perturb_seed=0 -test='gravity_wave', +perturb_init=.false., +test='none', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -166,9 +151,9 @@ ancil_option='none', coarse_aerosol_ancil=.false., coarse_orography_ancil=.false., coarse_ozone_ancil=.false., -init_option='analytic', +init_option='fd_start_dump', lbc_option='none', -ls_option='analytic', +ls_option='file', model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., @@ -180,10 +165,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.0, -r2=0.0, -x1=0.0, -x2=0.0, +r1=0.4, +r2=0.4, +x1=0.4, +x2=-0.4, y1=0.0, y2=0.0, z1=0.0, @@ -195,7 +180,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=120.0, +pert_centre=60.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -204,11 +189,11 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='none', +profile='constant_uv', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.false., -u0=0.0, +smp_init_wind=.true., +u0=2.0, v0=0.0, wind_time_period=0.0, / @@ -220,37 +205,46 @@ diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, file_convention='UGRID', +multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., timer_output_path='timer.txt', use_xios_io=.true., write_conservation_diag=.false., -write_diag=.true., +write_diag=.false., write_dump=.false., write_fluxes=.false., write_minmax_tseries=.false., / &linear +fixed_ls=.false., +l_stabilise_bl=.false., ls_read_w2h=.false., -pert_option='analytic', +max_bl_stabilisation=0.75, +n_bl_levels_to_stabilise=15, +pert_option='file', +/ +&linear_physics +l_boundary_layer=.false., / &logging -run_log_level='info', +log_to_rank_zero_only=.false., +run_log_level='debug', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.false., -gcrk=6, +fail_on_non_converged=.true., +gcrk=4, guess_np1=.false., -mixed_solver_a_tol=0.0, +mixed_solver_a_tol=1.0e-3, monitor_convergence=.true., normalise=.true., -reference_reset_time=3600.0, +reference_reset_time=1800.0, si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-5, +si_tolerance=1.0e-1, split_w=.true., / &mixing @@ -259,6 +253,14 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / +&multigrid +chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', +multigrid_chain_nitems=3, +n_coarsesmooth=4, +n_postsmooth=2, +n_presmooth=2, +smooth_relaxation=0.8, +/ &esm_couple l_esm_couple_test=.false., / @@ -266,15 +268,18 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning +generate_inner_halos=.false., panel_decomposition='auto', -panel_xproc=1, +panel_xproc=6, panel_yproc=1, partitioner='cubedsphere', / &physics +configure_segments=.false., limit_drag_incs=.false., sample_physics_scalars=.true., sample_physics_winds=.true., +sample_physics_winds_correction=.false., / &planet cp=1005.0, @@ -286,10 +291,14 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_rad_opt='off', -cfc12_rad_opt='off', -ch4_rad_opt='off', -co2_rad_opt='off', +cfc11_mix_ratio=1.110e-09, +cfc11_rad_opt='constant', +cfc12_mix_ratio=2.187e-09, +cfc12_rad_opt='constant', +ch4_mix_ratio=1.006e-06, +ch4_rad_opt='constant', +co2_mix_ratio=6.002e-04, +co2_rad_opt='constant', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -302,18 +311,19 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_rad_opt='off', +n2o_mix_ratio=4.945e-07, +n2o_rad_opt='constant', na_rad_opt='off', nh3_rad_opt='off', -o2_rad_opt='off', -o3_rad_opt='off', +o2_mix_ratio=0.2314, +o2_rad_opt='constant', +o3_rad_opt='ancil', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver -fail_on_non_converged=.false., gcrk=18, maximum_iterations=7, method='chebyshev', @@ -321,32 +331,35 @@ monitor_convergence=.false., preconditioner='diagonal', tolerance=1.0e-6, / +&specified_surface +/ &time calendar='timestep', -calendar_origin='2018-04-14 21:00:00', -calendar_start='2018-04-14 21:00:00', +calendar_origin='2016-01-01 15:00:00', +calendar_start='2016-01-01 15:00:00', calendar_type='gregorian', -timestep_end='13', +timestep_end='3', timestep_start='1', / ×tepping alpha=0.55, -dt=3600, +dt=1800, inner_iterations=2, method='semi_implicit', outer_iterations=2, runge_kutta_method='forward_euler', -spinup_alpha=.false., +spinup_alpha=.false.tau, tau_r=1.0, tau_t=1.0, tau_u=0.55, / &transport adjust_theta=.false., -adjust_vhv_wind=.false. +adjust_vhv_wind=.false., +ageofair_reset_level=10, broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.01, +cap_density_predictor=0.5, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -356,40 +369,45 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -extended_mesh=.false., -ffsl_inner_order=2, -ffsl_outer_order=2, +ffsl_inner_order=0, +ffsl_outer_order=1, ffsl_splitting=5*1, -ffsl_unity_3d=.false. -ffsl_vertical_order=5*2 -field_names='density','potential_temperature','wind','moisture','cloud', +ffsl_unity_3d=.false., +ffsl_vertical_order=2,2,1,2,2, +field_names='density','potential_temperature','wind','moisture', +'con_tracer', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, log_space=5*.false., -max_vert_cfl_calc='uniform', +max_vert_cfl_calc='dep_point', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', +panel_edge_high_order=.true., +panel_edge_treatment='none', profile_size=5, reversible=5*.false., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', slice_order='parabola', +special_edges_monotone=5*1, splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', +transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*1, +vertical_monotone_order=5*3, vertical_sl_order='cubic', +wind_mono_top=.false., / &validity_test number_gamma_values=2, diff --git a/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml b/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml index 9298f96f7..a1361ed46 100644 --- a/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml +++ b/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml @@ -131,7 +131,7 @@ subroutine_counters=.false., subroutine_timers=.true., use_xios_io=.false., write_conservation_diag=.false., -write_diag=.true., +write_diag=.false., write_dump=.false., write_fluxes=.false., write_minmax_tseries=.false., @@ -139,6 +139,10 @@ write_minmax_tseries=.false., &linear fixed_ls=.false. pert_option='random', +transport_efficiency=.false. +/ +&linear_physics +l_boundary_layer=.false., / &logging run_log_level='info', @@ -194,7 +198,7 @@ tolerance=1.0e-6, / &time calendar='timestep', -timestep_end='1', +timestep_end='6', timestep_start='1', calendar_type='gregorian', calendar_start='2016-01-01 15:00:00', diff --git a/science/linear/integration-test/runge_kutta/runge_kutta.f90 b/science/linear/integration-test/runge_kutta/runge_kutta.f90 index ac4fae76d..7de15a664 100644 --- a/science/linear/integration-test/runge_kutta/runge_kutta.f90 +++ b/science/linear/integration-test/runge_kutta/runge_kutta.f90 @@ -10,21 +10,19 @@ !! corresponding nonlinear code. program runge_kutta - use configuration_mod, only: read_configuration, final_configuration use driver_collections_mod, only: init_collections, final_collections use driver_time_mod, only: init_time, final_time + use driver_comm_mod, only: init_comm, final_comm + use driver_log_mod, only: init_logger, final_logger + use driver_config_mod, only: init_config, final_config use driver_modeldb_mod, only: modeldb_type - use halo_comms_mod, only: initialise_halo_comms, & - finalise_halo_comms - use lfric_mpi_mod, only: create_comm, destroy_comm, global_mpi, & - lfric_comm_type - use log_mod, only: initialise_logging, finalise_logging, & - log_event, & + use lfric_mpi_mod, only: global_mpi + use gungho_mod, only: gungho_required_namelists + use log_mod, only: log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO - use tl_test_driver_mod, only: initialise, & - finalise, & - run_timesteps, & + use linear_driver_mod, only: initialise, finalise + use tl_test_driver_mod, only: run_timesteps_random, & run_kinetic_energy_gradient, & run_advect_density_field, & run_advect_theta_field, & @@ -39,7 +37,6 @@ program runge_kutta ! Model run working data set type(modeldb_type) :: modeldb character(*), parameter :: application_name = "runge_kutta" - character(:), allocatable :: filename ! Variables used for parsing command line arguments @@ -47,8 +44,6 @@ program runge_kutta character(len=0) :: dummy character(len=:), allocatable :: program_name, test_flag - type(lfric_comm_type) :: communicator - ! Flags which determine the tests that will be carried out logical :: do_test_timesteps = .false. logical :: do_test_kinetic_energy_gradient = .false. @@ -65,11 +60,9 @@ program runge_kutta modeldb%mpi => global_mpi - call create_comm( communicator ) - call modeldb%mpi%initialise( communicator ) - call initialise_logging( communicator%get_comm_mpi_val(), & - "linear_integration-runge_kutta-test" ) - call initialise_halo_comms( communicator ) + call modeldb%configuration%initialise( application_name, table_len=10 ) + call modeldb%config%initialise( application_name ) + call modeldb%values%initialise('values', 5) call log_event( 'TL testing running ...', LOG_LEVEL_INFO ) @@ -86,7 +79,7 @@ program runge_kutta call modeldb%fields%add_empty_field_collection("fd_fields", & table_len = 100) - call modeldb%io_contexts%initialise(program_name, 100) + call modeldb%io_contexts%initialise(application_name, 100) ! Parse command line parameters call get_command_argument( 0, dummy, length, status ) @@ -145,21 +138,17 @@ program runge_kutta call log_event( "Unknown test", LOG_LEVEL_ERROR ) end select - call modeldb%configuration%initialise( program_name, table_len=10 ) - call modeldb%config%initialise( program_name ) - - call read_configuration( filename, & - configuration=modeldb%configuration, & - config=modeldb%config ) - - deallocate( filename ) - + call init_comm( application_name, modeldb ) + call init_config( filename, gungho_required_namelists, & + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), application_name ) call init_collections() call init_time( modeldb ) - call initialise( application_name, modeldb, modeldb%calendar ) + call initialise( application_name, modeldb ) if (do_test_timesteps) then - call run_timesteps(modeldb) + call run_timesteps_random(modeldb) endif if (do_test_kinetic_energy_gradient) then call run_kinetic_energy_gradient(modeldb) @@ -189,9 +178,8 @@ program runge_kutta call finalise( application_name, modeldb ) call final_time( modeldb ) call final_collections() - call final_configuration() - call finalise_halo_comms() - call finalise_logging() - call destroy_comm() + call final_logger( application_name ) + call final_config() + call final_comm( modeldb ) end program runge_kutta diff --git a/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml b/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml index 2b208a451..ae4d3bf12 100644 --- a/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml +++ b/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml @@ -132,7 +132,7 @@ subroutine_counters=.false., subroutine_timers=.true., use_xios_io=.false., write_conservation_diag=.false., -write_diag=.true., +write_diag=.false., write_dump=.false., write_fluxes=.false., write_minmax_tseries=.false., @@ -140,6 +140,10 @@ write_minmax_tseries=.false., &linear fixed_ls=.false. pert_option='random', +transport_efficiency=.false. +/ +&linear_physics +l_boundary_layer=.false., / &logging run_log_level='info', diff --git a/science/linear/integration-test/semi_implicit/semi_implicit.f90 b/science/linear/integration-test/semi_implicit/semi_implicit.f90 index 572475e7f..d02b8fde2 100644 --- a/science/linear/integration-test/semi_implicit/semi_implicit.f90 +++ b/science/linear/integration-test/semi_implicit/semi_implicit.f90 @@ -10,35 +10,25 @@ !! corresponding nonlinear code. program semi_implicit - use configuration_mod, only: read_configuration, final_configuration use driver_collections_mod, only: init_collections, final_collections use driver_time_mod, only: init_time, final_time + use driver_comm_mod, only: init_comm, final_comm + use driver_log_mod, only: init_logger, final_logger + use driver_config_mod, only: init_config, final_config use driver_modeldb_mod, only: modeldb_type - use halo_comms_mod, only: initialise_halo_comms, finalise_halo_comms - use lfric_mpi_mod, only: global_mpi, & - create_comm, destroy_comm, & - lfric_comm_type - use log_mod, only: initialise_logging, finalise_logging, & - log_event, & + use lfric_mpi_mod, only: global_mpi + use gungho_mod, only: gungho_required_namelists + use log_mod, only: log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO - use namelist_collection_mod, only: namelist_collection_type - use tl_test_driver_mod, only: initialise, & - finalise, & - run_timesteps, & - run_transport_control, & - run_semi_imp_alg, & - run_rhs_sample_eos, & - run_rhs_project_eos, & - run_rhs_alg + use linear_driver_mod, only: initialise, finalise + use tl_test_driver_mod, only: run_timesteps_random implicit none ! Model run working data set type(modeldb_type) :: modeldb - character(*), parameter :: application_name = 'semi_implicit' - character(:), allocatable :: filename ! Variables used for parsing command line arguments @@ -46,26 +36,17 @@ program semi_implicit character(len=0) :: dummy character(len=:), allocatable :: program_name, test_flag - type(lfric_comm_type) :: communicator - ! Flags which determine the tests that will be carried out logical :: do_test_timesteps = .false. - logical :: do_test_transport_control = .false. - logical :: do_test_semi_imp_alg = .false. - logical :: do_test_rhs_alg = .false. - logical :: do_test_rhs_project_eos = .false. - logical :: do_test_rhs_sample_eos = .false. ! Usage message to print character(len=256) :: usage_message modeldb%mpi => global_mpi - call create_comm( communicator ) - call modeldb%mpi%initialise( communicator ) - call initialise_logging( communicator%get_comm_mpi_val(), & - "linear_interface-semi_implicit-test" ) - call initialise_halo_comms( communicator ) + call modeldb%configuration%initialise( application_name, table_len=10 ) + call modeldb%config%initialise( application_name ) + call modeldb%values%initialise('values', 5) call log_event( 'TL testing running ...', LOG_LEVEL_INFO ) @@ -82,7 +63,8 @@ program semi_implicit call modeldb%fields%add_empty_field_collection("fd_fields", & table_len = 100) - call modeldb%io_contexts%initialise(program_name, 100) + + call modeldb%io_contexts%initialise(application_name, 100) ! Parse command line parameters call get_command_argument( 0, dummy, length, status ) @@ -99,8 +81,6 @@ program semi_implicit " transport_control, " // & " semi_imp_alg, " // & " rhs_alg, " // & - " rhs_project_eos, " // & - " rhs_sample_eos, " // & " } " call log_event( trim(usage_message), LOG_LEVEL_ERROR ) end if @@ -118,58 +98,28 @@ program semi_implicit select case (trim(test_flag)) case ("test_timesteps") do_test_timesteps = .true. - case ("test_transport_control") - do_test_transport_control = .true. - case ("test_semi_imp_alg") - do_test_semi_imp_alg = .true. - case ("test_rhs_alg") - do_test_rhs_alg = .true. - case ("test_rhs_project_eos") - do_test_rhs_project_eos = .true. - case ("test_rhs_sample_eos") - do_test_rhs_sample_eos = .true. case default call log_event( "Unknown test", LOG_LEVEL_ERROR ) end select - call modeldb%configuration%initialise( program_name, table_len=10 ) - call modeldb%config%initialise( program_name) - - call read_configuration( filename, & - configuration=modeldb%configuration, & - config=modeldb%config ) - - deallocate( filename ) - + call init_comm( application_name, modeldb ) + call init_config( filename, gungho_required_namelists, & + configuration=modeldb%configuration, & + config=modeldb%config ) + call init_logger( modeldb%mpi%get_comm(), application_name ) call init_collections() call init_time( modeldb ) - call initialise( application_name, modeldb, modeldb%calendar ) + call initialise( application_name, modeldb ) if (do_test_timesteps) then - call run_timesteps(modeldb) - endif - if (do_test_transport_control) then - call run_transport_control(modeldb) - endif - if (do_test_rhs_alg) then - call run_rhs_alg(modeldb) - endif - if (do_test_rhs_project_eos) then - call run_rhs_project_eos(modeldb) - endif - if (do_test_rhs_sample_eos) then - call run_rhs_sample_eos(modeldb) - endif - if (do_test_semi_imp_alg) then - call run_semi_imp_alg(modeldb) + call run_timesteps_random(modeldb) endif call finalise( application_name, modeldb ) call final_time( modeldb ) call final_collections() - call final_configuration() - call finalise_halo_comms() - call finalise_logging() - call destroy_comm() + call final_logger( application_name ) + call final_config() + call final_comm( modeldb ) end program semi_implicit diff --git a/science/linear/integration-test/semi_implicit/semi_implicit.py b/science/linear/integration-test/semi_implicit/semi_implicit.py index af210aff1..534eb9897 100755 --- a/science/linear/integration-test/semi_implicit/semi_implicit.py +++ b/science/linear/integration-test/semi_implicit/semi_implicit.py @@ -63,43 +63,6 @@ def test_passed(self, out): success = True return success - -class tl_test_semi_imp_alg(TLTest): - ''' - Test the semi implicit timestep - ''' - def __init__(self): - flag = "semi_imp_alg" - super(tl_test_semi_imp_alg, self).__init__(flag) - - -class tl_test_rhs_alg(TLTest): - ''' - Test the right hand side forcing for the mixed solver - ''' - def __init__(self): - flag = "rhs_alg" - super(tl_test_rhs_alg, self).__init__(flag) - -class tl_test_rhs_sample_eos(TLTest): - def __init__(self): - flag = "rhs_sample_eos" - super(tl_test_rhs_sample_eos, self).__init__(flag) - -class tl_test_rhs_project_eos(TLTest): - def __init__(self): - flag = "rhs_project_eos" - super(tl_test_rhs_project_eos, self).__init__(flag) - -class tl_test_transport_control(TLTest): - ''' - Test the transport - ''' - def __init__(self): - flag = "transport_control" - super(tl_test_transport_control, self).__init__(flag) - - class tl_test_timesteps(TLTest): ''' Test running over multiple timesteps @@ -109,9 +72,4 @@ def __init__(self): super(tl_test_timesteps, self).__init__(flag) if __name__ == '__main__': - TestEngine.run( tl_test_rhs_sample_eos() ) - TestEngine.run( tl_test_rhs_project_eos() ) - TestEngine.run(tl_test_transport_control()) - TestEngine.run( tl_test_semi_imp_alg() ) - TestEngine.run( tl_test_rhs_alg() ) - TestEngine.run(tl_test_timesteps()) + TestEngine.run( tl_test_timesteps() ) diff --git a/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 b/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 index c7ee7136f..b704f3475 100644 --- a/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 @@ -185,7 +185,6 @@ module tl_test_advect_density_field_mod call invoke( X_minus_Y( diff, n2_advection_inc, n1_advection_inc ), & inc_X_minus_Y( diff, p_advection_inc ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma_u, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 b/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 index f712ba304..4630bdf10 100644 --- a/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 @@ -188,8 +188,6 @@ module tl_test_advect_theta_field_mod inc_X_minus_Y( diff, p_advection_inc ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) - write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ' , gamma_u , ' norm = ' , norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 b/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 index a13655df9..b090ba7fc 100644 --- a/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 +++ b/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 @@ -6,7 +6,7 @@ !>@brief Test the convergence rate (Taylor remainder convergence). module tl_test_convergence_rate_check - use constants_mod, only: r_def, str_def + use constants_mod, only: r_def, str_def, i_def use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO @@ -14,17 +14,129 @@ module tl_test_convergence_rate_check implicit none private - public convergence_rate_check + public convergence_pass_string, & + array_convergence_rate_check, & + convergence_rate_check + +contains + + !> @brief Test the convergence rate, with application of square root. + !> @details If the convergence rate is not close to 4, within the + !! specified tolerance, set the pass string to FAIL. + !> @param[in] name Variable or test name + !> @param[in] norm Current norm + !> @param[in] norm_prev Previous norm + !> @param[in,out] pass_str Pass string (either PASS or FAIL) + !> @param[in] tol Tolerance + subroutine convergence_pass_string( name, norm, norm_prev, pass_str, tol ) + implicit none + + real(r_def), intent(in) :: norm, norm_prev + character(len=4), intent(inout) :: pass_str + real(r_def), intent(in) :: tol + character(str_def), intent(in) :: name + + real(r_def) :: conv_rate + + ! Let the error between the nonlinear (N) difference and the linear (L) be + ! E(g) = || N(x + g dx) - N(x) - g Ldx || = O(g^2) + ! where g is a scalar, x and dx are vectors, O is the order + ! and || . || = (x^T x)^1/2 is the L2 norm. + ! + ! Then the ratio + ! E(2g) / E(g) = O(4 g^2) / O(g^2) = 4 + ! i.e. we need to check whether the convergence rate is close to 4. + + ! The norms have not had a square root applied yet. + conv_rate = sqrt(norm_prev / norm) + + if ( abs( conv_rate - 4.0_r_def ) >= tol ) then + pass_str = "FAIL" + else + pass_str = "PASS" + end if + + write( log_scratch_space, '(A, A, A, E16.8, A, E16.8)') & + name, pass_str, " Convergence rate: ", conv_rate, " Tolerance: ", tol + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + end subroutine convergence_pass_string + + !> @brief Test the convergence rate for individual variables and the sum. + !> @details Calculate the convergence rate based on the norms + !> at two different iterations, and compare with the + !> expected value. Print out either PASS or FAIL, which + !> will then be used by the top level integration test. + !> @param[in] array_norm Norm at second iteration + !> @param[in] array_norm_prev Norm at first iteration + !> @param[in] array_names Name of the variable being tested + !> @param[in] n_variables Array lengths (number of variables) + !> @param[in] label Test name + !> @param[in] tol Tolerance value + subroutine array_convergence_rate_check( array_norm, array_norm_prev, array_names, n_variables, label, tol, indiv_tol) + integer(i_def), intent(in) :: n_variables + real(r_def), intent(in) :: array_norm(n_variables) + real(r_def), intent(in) :: array_norm_prev(n_variables) + character(str_def), intent(in) :: array_names(n_variables) + character(str_def), intent(in) :: label + real(r_def), optional, intent(in) :: tol + real(r_def), optional, intent(in) :: indiv_tol + real(r_def) :: tolerance, individual_tolerance + character(len=4) :: pass_str_arr(n_variables) + character(len=4) :: sum_pass_str, pass_str + character(str_def), parameter :: sum_name = "sum" + integer(i_def) :: i + real(r_def) :: sum, sum_prev - contains + call log_event( "Checking convergence rate", LOG_LEVEL_INFO ) + + if ( present(tol) ) then + tolerance = tol + else + tolerance = 1.0E-8_r_def + end if + + if ( present(indiv_tol) ) then + individual_tolerance = indiv_tol + else + individual_tolerance = 1.0E-8_r_def + end if + + sum = 0.0_r_def + sum_prev = 0.0_r_def + do i= 1, n_variables + ! Check individual convergence rates + call convergence_pass_string( & + array_names(i), array_norm(i), & + array_norm_prev(i), pass_str_arr(i), & + individual_tolerance ) + + ! Weighted sum + sum = sum + array_norm(i) / array_norm_prev(i) + sum_prev = sum_prev + array_norm_prev(i) / array_norm_prev(i) + end do + + call convergence_pass_string( & + sum_name, sum, sum_prev, sum_pass_str, tolerance) + + pass_str = "PASS" + do i= 1, n_variables + if ( pass_str_arr(i) == "FAIL" ) pass_str = "FAIL" + end do + if ( sum_pass_str == "FAIL" ) pass_str = "FAIL" + + write(log_scratch_space,'(" test",A32," : ",A4)') trim(label), pass_str + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + end subroutine array_convergence_rate_check !> @brief Calculate and test the convergence rate. !> @details Calculate the convergence rate based on the norms !> at two different iterations, and compare with the !> expected value. Print out either PASS or FAIL, which !> will then be used by the top level integration test. - !> @param[in] norm_diff Norm at first iteration - !> @param[in] norm_diff_prev Norm at second iteration + !> @param[in] norm_diff Norm at second iteration + !> @param[in] norm_diff_prev Norm at first iteration !> @param[in] label Name of the code being tested !> @param[in] tol Tolerance value subroutine convergence_rate_check( norm_diff, norm_diff_prev, label, tol ) @@ -35,7 +147,6 @@ subroutine convergence_rate_check( norm_diff, norm_diff_prev, label, tol ) character(str_def), intent(in) :: label real(r_def), optional, intent(in) :: tol real(r_def) :: tolerance - real(r_def) :: conv_rate character(len=4) :: pass_str if ( present(tol) ) then @@ -44,23 +155,8 @@ subroutine convergence_rate_check( norm_diff, norm_diff_prev, label, tol ) tolerance = 1.0E-8_r_def end if - conv_rate = norm_diff_prev/ norm_diff - - - - write( log_scratch_space, '(A)' ) & - "TL Test: " // trim(label) - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - write( log_scratch_space, '(A, E16.8)') & - "Convergence rate: ", conv_rate - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - - if ( abs(conv_rate - 4.0_r_def ) < tolerance ) then - pass_str = "PASS" - else - pass_str = "FAIL" - end if + call convergence_pass_string( & + label, norm_diff, norm_diff_prev, pass_str, tolerance) write(log_scratch_space,'(" test",A32," : ",A4)') trim(label), pass_str call log_event( log_scratch_space, LOG_LEVEL_INFO ) diff --git a/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 b/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 index b93d850df..0d1c7e5ed 100644 --- a/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 +++ b/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 @@ -48,13 +48,13 @@ module tl_test_driver_mod use tl_test_rhs_alg_mod, only : test_rhs_alg use tl_test_semi_imp_alg_mod, only : test_semi_imp_alg use tl_test_timesteps_alg_mod, only : test_timesteps + use tl_test_timesteps_random_alg_mod, only : test_timesteps_random implicit none private - public initialise, & - finalise, & - run_timesteps, & + public run_timesteps, & + run_timesteps_random, & run_kinetic_energy_gradient, & run_advect_density_field, & run_advect_theta_field, & @@ -72,109 +72,47 @@ module tl_test_driver_mod type(mesh_type), pointer :: mesh => null() type(mesh_type), pointer :: twod_mesh => null() - type(mesh_type), pointer :: aerosol_mesh => null() - type(mesh_type), pointer :: aerosol_twod_mesh => null() contains !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !>@brief Sets up the required state in preparation for run. - !>@param [in] program_name An identifier given to the model being run - !>@param [in,out] modeldb The structure that holds model state - !> - subroutine initialise( program_name, modeldb, calendar ) + !>@brief Tests the tangent linear model for multiple timesteps + !>@param [in,out] modeldb The structure that holds model state + subroutine run_timesteps(modeldb) implicit none - character(*), intent(in) :: program_name - type(modeldb_type), intent(inout) :: modeldb - class(calendar_type), intent(in) :: calendar - - type(gungho_time_axes_type) :: model_axes - type(io_value_type) :: temp_corr_io_value - type(io_value_type) :: random_seed_io_value - integer(i_def) :: random_seed_size - real(r_def), allocatable :: real_array(:) - - call modeldb%values%initialise( 'values', 5 ) - - ! Initialise infrastructure and setup constants - ! - call initialise_infrastructure( program_name, modeldb ) - - ! Add a place to store time axes in modeldb - call modeldb%values%add_key_value('model_axes', model_axes) + type(modeldb_type), intent(inout) :: modeldb - ! Get primary and 2D meshes for initialising model data mesh => mesh_collection%get_mesh(prime_mesh_name) twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - ! Assume aerosol mesh is the same as dynamics mesh - aerosol_mesh => mesh - aerosol_twod_mesh => twod_mesh - - ! gungho_init_field() expects these values to exist. The dependency of - ! the linear application tests on this procedure will hopefully be resolved - ! in the future, at which point this initialisation may be removed. - ! - call temp_corr_io_value%init('temperature_correction_rate', [0.0_r_def]) - call modeldb%values%add_key_value( 'temperature_correction_io_value', & - temp_corr_io_value ) - call modeldb%values%add_key_value( 'total_dry_mass', 0.0_r_def ) - call modeldb%values%add_key_value( 'total_energy', 0.0_r_def ) - call modeldb%values%add_key_value( 'total_energy_previous', 0.0_r_def ) - if ( stochastic_physics == stochastic_physics_um ) then - ! Random seed for stochastic physics - call random_seed(size = random_seed_size) - allocate(real_array(random_seed_size)) - real_array(1:random_seed_size) = 0.0_r_def - call random_seed_io_value%init("random_seed", real_array) - call modeldb%values%add_key_value( 'random_seed_io_value', & - random_seed_io_value ) - deallocate(real_array) - end if - - ! Instantiate the fields stored in model_data - call create_model_data( modeldb, & - mesh, & - twod_mesh, & - aerosol_mesh, & - aerosol_twod_mesh ) - - ! Instantiate the linearisation state - call linear_create_ls( modeldb, mesh ) - - ! Initialise the fields stored in the model_data prognostics. This needs - ! to be done before initialise_model. - call initialise_model_data( modeldb, mesh, twod_mesh ) - - ! Model configuration initialisation - call initialise_model( mesh, & - modeldb ) - - ! Initialise the linearisation state - call linear_init_ls( mesh, twod_mesh, modeldb ) - - ! Finalise model - call finalise_model(modeldb) - - end subroutine initialise + call test_timesteps( modeldb, & + mesh, & + twod_mesh, & + modeldb%clock ) + + end subroutine run_timesteps !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !>@brief Tests the tangent linear model for multiple timesteps + !! using prescribed random data for the initial conditions !>@param [in,out] modeldb The structure that holds model state - subroutine run_timesteps(modeldb) + subroutine run_timesteps_random(modeldb) implicit none type(modeldb_type), intent(inout) :: modeldb - call test_timesteps( modeldb, & - mesh, & - twod_mesh, & - modeldb%clock ) + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - end subroutine run_timesteps + call test_timesteps_random( modeldb, & + mesh, & + twod_mesh, & + modeldb%clock ) + + end subroutine run_timesteps_random !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !>@brief Tests the tangent linear model kinetic energy gradient kernel @@ -185,6 +123,9 @@ subroutine run_kinetic_energy_gradient(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_kinetic_energy_gradient( modeldb, & mesh, & twod_mesh ) @@ -200,6 +141,9 @@ subroutine run_advect_density_field(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_advect_density_field( modeldb, & mesh, & twod_mesh ) @@ -215,6 +159,9 @@ subroutine run_advect_theta_field(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_advect_theta_field( modeldb, & mesh, & twod_mesh ) @@ -230,6 +177,9 @@ subroutine run_vorticity_advection(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_vorticity_advection( modeldb, & mesh, & twod_mesh ) @@ -245,6 +195,9 @@ subroutine run_project_eos_pressure(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_project_eos_pressure( modeldb, & mesh, & twod_mesh ) @@ -260,6 +213,9 @@ subroutine run_sample_eos_pressure(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_sample_eos_pressure( modeldb, & mesh, & twod_mesh ) @@ -275,6 +231,9 @@ subroutine run_hydrostatic(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_hydrostatic( modeldb, & mesh, & twod_mesh ) @@ -290,6 +249,9 @@ subroutine run_pressure_gradient_bd(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_pressure_gradient_bd( modeldb, & mesh, & twod_mesh ) @@ -305,6 +267,8 @@ subroutine run_rk_alg(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + call test_rk_alg( modeldb, & mesh) @@ -319,6 +283,9 @@ subroutine run_transport_control(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_transport_control( modeldb, & mesh, & twod_mesh ) @@ -334,6 +301,9 @@ subroutine run_semi_imp_alg(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_semi_imp_alg( modeldb, & mesh, & twod_mesh ) @@ -349,6 +319,9 @@ subroutine run_rhs_alg(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_rhs_alg( modeldb, & mesh, & twod_mesh ) @@ -364,6 +337,9 @@ subroutine run_rhs_project_eos(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_rhs_project_eos( modeldb, & mesh, & twod_mesh ) @@ -379,31 +355,13 @@ subroutine run_rhs_sample_eos(modeldb) type(modeldb_type), intent(inout) :: modeldb + mesh => mesh_collection%get_mesh(prime_mesh_name) + twod_mesh => mesh_collection%get_mesh(mesh, TWOD) + call test_rhs_sample_eos( modeldb, & mesh, & twod_mesh ) end subroutine run_rhs_sample_eos - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !>@brief Tidies up after a run. - !>@param [in] program_name An identifier given to the model being run - !>@param [in,out] modeldb The structure that holds model state - subroutine finalise( program_name, modeldb ) - - implicit none - - character(*), intent(in) :: program_name - type(modeldb_type), intent(inout) :: modeldb - - call log_event( 'Finalising '//program_name//' ...', LOG_LEVEL_ALWAYS ) - - ! Destroy the fields stored in model_data - call finalise_model_data( modeldb ) - - ! Finalise infrastructure and constants - call finalise_infrastructure(modeldb) - - end subroutine finalise - end module tl_test_driver_mod diff --git a/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 b/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 index fbcb7baad..5aa4f198b 100644 --- a/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 @@ -189,8 +189,6 @@ module tl_test_hydrostatic_mod inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) - write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 b/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 index 2138662af..f2910b1b3 100644 --- a/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 @@ -135,7 +135,6 @@ module tl_test_kinetic_energy_gradient_mod call invoke( X_minus_Y( diff, n2_rhs_u, n1_rhs_u ), & inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 b/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 index 8bb6117a3..5a9f0210e 100644 --- a/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 @@ -213,8 +213,6 @@ module tl_test_pressure_grad_bd_mod inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) - write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 b/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 index 01ef9b694..9fc26e063 100644 --- a/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 @@ -195,7 +195,6 @@ module tl_test_project_eos_pressure_mod call invoke( X_minus_Y( diff, n2_exner, n1_exner ), & inc_X_minus_Y( diff, p_exner ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma , ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 index 1c483372f..6207afcd8 100644 --- a/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 @@ -18,7 +18,7 @@ module tl_test_rhs_alg_mod use function_space_mod, only: function_space_type use derived_config_mod, only: bundle_size use moist_dyn_mod, only: num_moist_factors - use sci_assign_field_random_kernel_mod, only: assign_field_random_kernel_type + use mr_indices_mod, only: nummr use field_indices_mod, only: igh_u, igh_t, igh_d, igh_p use sci_field_bundle_builtins_mod, only: clone_bundle, & add_bundle, & @@ -29,7 +29,9 @@ module tl_test_rhs_alg_mod use tl_rhs_alg_mod, only: tl_rhs_alg use log_mod, only: log_event, LOG_LEVEL_INFO, & LOG_LEVEL_ERROR - use tl_test_convergence_rate_check, only: convergence_rate_check + use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg + use tl_moist_dyn_factors_alg_mod, only: tl_moist_dyn_factors_alg + use tl_test_convergence_rate_check, only: array_convergence_rate_check implicit none @@ -56,8 +58,8 @@ module tl_test_rhs_alg_mod character(str_def) :: label = "rhs_alg" - type(field_collection_type ), pointer :: ls_fields - + type( field_collection_type ), pointer :: ls_fields + type( field_collection_type ), pointer :: prognostic_fields => null() type( field_type ) :: state(bundle_size) type( field_type ) :: ls_state(bundle_size) @@ -73,37 +75,62 @@ module tl_test_rhs_alg_mod type(field_type), pointer :: ls_theta => null() type(field_type), pointer :: ls_exner => null() type(field_type), pointer :: ls_moist_dyn(:) => null() + type(field_type), pointer :: ls_mr(:) => null() + type(field_type), pointer :: u => null() + type(field_type), pointer :: rho => null() + type(field_type), pointer :: theta => null() + type(field_type), pointer :: exner => null() + type(field_type), pointer :: moist_dyn(:) => null() + type(field_type), pointer :: mr(:) => null() type(field_type), dimension(num_moist_factors) :: p_moist_dyn type(field_type), dimension(num_moist_factors) :: n_moist_dyn type(field_type), dimension(num_moist_factors) :: r_moist_dyn type(field_collection_type), pointer :: moisture_fields => null() + type(field_array_type), pointer :: mr_array => null() + type(field_array_type), pointer :: moist_dyn_array => null() + type(field_array_type), pointer :: ls_mr_array => null() type(field_array_type), pointer :: ls_moist_dyn_array => null() real(r_def) :: gamma_u, gamma_rho, gamma_exner, gamma_theta, & gamma_moist_dyn - real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta, norm_moist_dyn - real(r_def) :: norm_moist_dyn_tmp - real(r_def) :: norm_diff, norm_diff_prev + real(r_def) :: norm_u, norm_exner + integer(i_def), parameter :: n_variables = 2 + real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) + character(str_def) :: array_names(n_variables) - real(r_def), parameter :: tol = 1.e-2_r_def + real(r_def), parameter :: tol = 5.e-2_r_def + real(r_def), parameter :: indiv_tol = 5.e-1_r_def integer :: i, n call log_event( "TL Test: " // trim(label), & LOG_LEVEL_INFO ) + prognostic_fields => modeldb%fields%get_field_collection( & + "prognostic_fields") ls_fields => modeldb%fields%get_field_collection("ls_fields") moisture_fields => modeldb%fields%get_field_collection("moisture_fields") + call moisture_fields%get_field("mr", mr_array) + call moisture_fields%get_field("moist_dyn", moist_dyn_array) + mr => mr_array%bundle + moist_dyn => moist_dyn_array%bundle + call moisture_fields%get_field("ls_mr", ls_mr_array) call moisture_fields%get_field("ls_moist_dyn", ls_moist_dyn_array) + ls_mr => ls_mr_array%bundle ls_moist_dyn => ls_moist_dyn_array%bundle - ! Input + ! Linearisation state call ls_fields%get_field('ls_u', ls_u) call ls_fields%get_field('ls_rho', ls_rho) call ls_fields%get_field('ls_theta', ls_theta) call ls_fields%get_field('ls_exner', ls_exner) + ! Perturbation + call prognostic_fields%get_field('u', u) + call prognostic_fields%get_field('rho', rho) + call prognostic_fields%get_field('theta', theta) + call prognostic_fields%get_field('exner', exner) call ls_state(igh_u)%initialise( vector_space = ls_u%get_function_space() ) call ls_state(igh_t)%initialise( vector_space = ls_theta%get_function_space() ) @@ -127,24 +154,27 @@ module tl_test_rhs_alg_mod setval_X(ls_state(igh_d), ls_rho ), & setval_X(ls_state(igh_p), ls_exner) ) - call invoke( assign_field_random_kernel_type( random(igh_u), 1.0_r_def ) , & - assign_field_random_kernel_type( random(igh_d), 1.0_r_def ) , & - assign_field_random_kernel_type( random(igh_t), 1.0_r_def ) , & - assign_field_random_kernel_type( random(igh_p), 1.0_r_def ) ) + call moist_dyn_factors_alg(ls_moist_dyn, ls_mr) - do i = 1, num_moist_factors - call invoke( assign_field_random_kernel_type( r_moist_dyn(i), 1.0_r_def ) ) - enddo + ! Set the 'random data' to be the perturbation + call invoke( name = "copy_fields_to_state", & + setval_X(random(igh_u), u ), & + setval_X(random(igh_p), exner ), & + setval_X(random(igh_t), theta), & + setval_X(random(igh_d), rho ) ) - gamma_u = 1.e2_r_def - gamma_theta = 1.e2_r_def - gamma_rho = 1.e2_r_def - gamma_exner = 1.e1_r_def - gamma_moist_dyn = 1.e-1_r_def + call tl_moist_dyn_factors_alg(r_moist_dyn, mr ) + + gamma_u = 1.0_r_def + gamma_theta = 1.0_r_def + gamma_rho = 1.0_r_def + gamma_exner = 1.0_r_def + gamma_moist_dyn = 1.0_r_def call set_bundle_scalar( 0.0_r_def, n1_rhs, bundle_size ) call rhs_alg( n1_rhs, dt, ls_state, ls_state, ls_moist_dyn, & - .true., .true., .false., modeldb%clock ) + compute_eos=.true., compute_rhs_t_d=.true., & + dlayer_rhs=.true., model_clock=modeldb%clock ) do n=1,2 gamma_u = gamma_u / 2.0_r_def @@ -166,42 +196,45 @@ module tl_test_rhs_alg_mod do i = 1, num_moist_factors call invoke( & a_times_X( p_moist_dyn(i), gamma_moist_dyn, r_moist_dyn(i) ), & - setval_X( n_moist_dyn(i), ls_moist_dyn(i) ), & + setval_X( n_moist_dyn(i), ls_moist_dyn(i) ), & inc_X_plus_Y( n_moist_dyn(i), p_moist_dyn(i) ) ) enddo call rhs_alg( n2_rhs, dt, state, state, n_moist_dyn, & - .true., .true., .false., modeldb%clock ) + compute_eos=.true., compute_rhs_t_d=.true., & + dlayer_rhs=.true., model_clock=modeldb%clock ) call tl_rhs_alg(p_rhs, dt, p_state, p_state, p_moist_dyn, & ls_state, ls_moist_dyn, & - .true., .false., modeldb%clock) + compute_eos=.true., dlayer_rhs=.true., & + model_clock=modeldb%clock) ! diff = n2_rhs - n1_rhs call minus_bundle( n2_rhs, n1_rhs, diff, bundle_size ) call invoke( & inc_X_minus_Y( diff(igh_u), p_rhs(igh_u) ), & - inc_X_minus_Y( diff(igh_t), p_rhs(igh_t) ), & - inc_X_minus_Y( diff(igh_d), p_rhs(igh_d) ), & inc_X_minus_Y( diff(igh_p), p_rhs(igh_p) ) ) call invoke( X_innerproduct_X( norm_u, diff(igh_u) ) , & - X_innerproduct_X( norm_rho, diff(igh_d) ) , & - X_innerproduct_X( norm_theta, diff(igh_t) ) , & X_innerproduct_X( norm_exner, diff(igh_p) ) ) - print*, norm_u, norm_rho, norm_theta, norm_exner - norm_diff = norm_u + norm_rho + norm_theta + norm_exner - norm_diff = sqrt(norm_diff) - print*,'norm', norm_diff + ! The equations for rho and theta are already linear + ! so only evaluate u and exner + array_norm(1) = norm_u + array_norm(2) = norm_exner + array_names(1) = 'norm_u' + array_names(2) = 'norm_exner' if (n == 2) then - call convergence_rate_check( norm_diff, norm_diff_prev, & - label, tol=tol ) - endif + call array_convergence_rate_check( & + array_norm, array_norm_prev, & + array_names, n_variables, label, tol=tol, & + indiv_tol=indiv_tol ) + end if + + array_norm_prev = array_norm - norm_diff_prev = norm_diff enddo end subroutine test_rhs_alg diff --git a/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 index 9504122f7..8b39ecb51 100644 --- a/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 @@ -209,7 +209,6 @@ contains call invoke( X_minus_Y( diff, n2_rhs, n1_rhs ), & inc_X_minus_Y( diff, p_rhs ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) if (n == 2) then call convergence_rate_check( norm_diff, norm_diff_prev, & diff --git a/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 index 49d69273f..0d1cd26d1 100644 --- a/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 @@ -195,7 +195,6 @@ contains call invoke( X_minus_Y( diff, n2_rhs, n1_rhs ), & inc_X_minus_Y( diff, p_rhs ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) if (n == 2) then call convergence_rate_check( norm_diff, norm_diff_prev, & diff --git a/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 index 9b99f0fc8..d16f4c14c 100644 --- a/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 @@ -251,6 +251,7 @@ module tl_test_rk_alg_mod ! Evolve the perturbation fields with the linear timestep. This ! gives p_x=L(gamma r_x) + call tl_rk_alg_final() call tl_rk_alg_init(mesh, p_u, p_rho, p_theta, p_exner, & ls_u, ls_rho, ls_theta, ls_exner) @@ -300,7 +301,6 @@ module tl_test_rk_alg_mod call log_event( log_scratch_space, LOG_LEVEL_INFO ) norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_moist_dyn - norm_diff = sqrt(norm_diff) if (n == 2) then ! Compare results from first and second iteration diff --git a/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 b/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 index b6f56addf..1915214ca 100644 --- a/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 @@ -175,7 +175,6 @@ module tl_test_sample_eos_pressure_mod call invoke( X_minus_Y( diff, n2_exner, n1_exner ), & inc_X_minus_Y( diff, p_exner ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma , ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 index 2b060eac1..30bf004ec 100644 --- a/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 @@ -10,8 +10,6 @@ !! implicit algorithm, using the Taylor remainder convergence test. module tl_test_semi_imp_alg_mod - use sci_assign_field_random_kernel_mod, & - only: assign_field_random_kernel_type use constants_mod, only: i_def, r_def, str_def use field_array_mod, only: field_array_type use field_mod, only: field_type @@ -39,7 +37,7 @@ module tl_test_semi_imp_alg_mod use timestep_method_mod, only: timestep_method_type use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg use tl_moist_dyn_factors_alg_mod, only: tl_moist_dyn_factors_alg - use tl_test_convergence_rate_check, only: convergence_rate_check + use tl_test_convergence_rate_check, only: array_convergence_rate_check implicit none @@ -128,9 +126,12 @@ module tl_test_semi_imp_alg_mod real(r_def) :: gamma_mr real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta real(r_def) :: norm_mr, norm_mr_tmp - real(r_def) :: norm_diff, norm_diff_prev + integer(i_def), parameter :: n_variables = 5 + real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) + character(str_def) :: array_names(n_variables) - real(r_def), parameter :: tol = 5.e-1_r_def + real(r_def), parameter :: tol = 5.e-2_r_def + real(r_def), parameter :: indiv_tol = 5.e-1_r_def real(r_def), parameter :: dtemp_encorr = 0.0_r_def integer :: n, i @@ -173,12 +174,14 @@ module tl_test_semi_imp_alg_mod aerosol_fields => modeldb%fields%get_field_collection("aerosol_fields") stph_fields => modeldb%fields%get_field_collection("stph_fields") lbc_fields => modeldb%fields%get_field_collection("lbc_fields") - ! Input + + ! Linearisation State call ls_fields%get_field('ls_u', ls_u) call ls_fields%get_field('ls_rho', ls_rho) call ls_fields%get_field('ls_theta', ls_theta) call ls_fields%get_field('ls_exner', ls_exner) + ! Perturbation call prognostic_fields%get_field('u', u) call prognostic_fields%get_field('rho', rho) call prognostic_fields%get_field('theta', theta) @@ -228,15 +231,29 @@ module tl_test_semi_imp_alg_mod call clone_bundle(mr, b_mr, nummr) call clone_bundle(mr, diff_mr, nummr) - call invoke( assign_field_random_kernel_type( r_u, 1.0_r_def ) , & - assign_field_random_kernel_type( r_rho, 1.0_r_def ) , & - assign_field_random_kernel_type( r_theta, 1.0_r_def ) , & - assign_field_random_kernel_type( r_exner, 1.0_r_def ) ) - + ! Set the 'random data' to be the perturbation + call invoke( name = "copy_fields_to_state", & + setval_X(r_u, u ), & + setval_X(r_exner, exner ), & + setval_X(r_theta, theta), & + setval_X(r_rho, rho ) ) + + ! Overwrite the moisture fields with potential temperature + ! + ! Note: The perturbation fields are read in from file. However the + ! moisture perturbation fields have values close to zero (especially + ! at upper levels) and this gives an inaccurate linearisation test. Using + ! potential temperature is an easy fix to create a realistic 'random' + ! field using real data that has mostly non-zero values. do i = 1, nummr - call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) + call invoke( & + setval_X( r_mr(i), theta ), & + inc_a_times_X( 0.000001_r_def, r_mr(i) ), & + setval_X( ls_mr(i), ls_theta ), & + inc_a_times_X( 0.000001_r_def, ls_mr(i) )) end do + ! Set the prognostic fields to be the linearisation state call invoke( setval_X( u, ls_u ), & setval_X( theta, ls_theta ), & setval_X( rho, ls_rho ), & @@ -247,7 +264,9 @@ module tl_test_semi_imp_alg_mod end do do i = 1, nummr call invoke( setval_X( mr(i), ls_mr(i) ) ) - end do + end do + + call moist_dyn_factors_alg(moist_dyn, mr) ! Clean up solvers left over from previous tests, as semi-implicit ! method will create new solvers which cause double-allocates @@ -274,15 +293,15 @@ module tl_test_semi_imp_alg_mod call invoke( setval_X( b_mr(i), mr(i) ) ) end do - gamma_u = 1.e4_r_def - gamma_theta = 1.e2_r_def - gamma_rho = 8.0e-1_r_def - gamma_exner = 6.5e-1_r_def + gamma_u = 6.5_r_def + gamma_theta = 6.5_r_def + gamma_rho = 6.5_r_def + gamma_exner = 6.5_r_def if ( moisture_formulation == moisture_formulation_dry ) then gamma_mr = 0.0_r_def else - gamma_mr = 1.e-2_r_def + gamma_mr = 6.5_r_def end if do n=1,2 @@ -328,6 +347,8 @@ module tl_test_semi_imp_alg_mod ! Evolve the perturbation fields with the linear timestep. This ! gives p_x=L(gamma r_x) + call final_si_operators() + call tl_semi_implicit_alg_final() call tl_semi_implicit_alg_init(mesh, p_u, p_rho, p_theta, p_exner, & p_mr, ls_u, ls_rho, ls_theta, ls_exner, & ls_mr, ls_moist_dyn) @@ -365,35 +386,24 @@ module tl_test_semi_imp_alg_mod norm_mr = norm_mr + norm_mr_tmp end do - write( log_scratch_space, & - '(A, E32.12, A, E32.12 )' ) & - ' norm_u = ' , norm_u, & - ' norm_rho = ' , norm_rho - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12 )' ) & - ' norm_mr = ' , norm_mr, & - ' norm_exner = ' , norm_exner - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12 )' ) & - ' norm_theta = ' , norm_theta - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_mr - norm_diff = sqrt(norm_diff) + array_norm(1) = norm_u + array_norm(2) = norm_rho + array_norm(3) = norm_theta + array_norm(4) = norm_mr + array_norm(5) = norm_exner + array_names(1) = 'norm_u' + array_names(2) = 'norm_rho' + array_names(3) = 'norm_theta' + array_names(4) = 'norm_mr' + array_names(5) = 'norm_exner' if (n == 2) then - call convergence_rate_check( norm_diff, norm_diff_prev, & - label, tol=tol ) + call array_convergence_rate_check( array_norm, array_norm_prev, & + array_names, n_variables, label, tol=tol, indiv_tol=indiv_tol ) end if - norm_diff_prev = norm_diff + array_norm_prev = array_norm + end do end subroutine test_semi_imp_alg diff --git a/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 index 65759abf9..686e0cad9 100644 --- a/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 @@ -44,7 +44,7 @@ module tl_test_timesteps_alg_mod method, & method_rk use time_config_mod, only: timestep_start, timestep_end - use tl_test_convergence_rate_check, only: convergence_rate_check + use tl_test_convergence_rate_check, only: array_convergence_rate_check use validity_test_config_mod, only: number_gamma_values, & update_ls_frequency use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg @@ -52,7 +52,6 @@ module tl_test_timesteps_alg_mod implicit none - private convergence_pass_string public test_timesteps contains @@ -120,8 +119,12 @@ module tl_test_timesteps_alg_mod real(r_def) :: denom_u, denom_rho, denom_exner, denom_theta, denom_mr real(r_def) :: denom_mr_tmp real(r_def) :: denom_total + integer(i_def), parameter :: n_variables = 5 + real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) + character(str_def) :: array_names(n_variables) - real(r_def), parameter :: tol = 9.e-1_r_def + real(r_def), parameter :: tol = 3.e-1_r_def + real(r_def), parameter :: indiv_tol = 1.2_r_def integer(i_def) :: n, i, t character(len=4) :: pass_str @@ -212,24 +215,32 @@ module tl_test_timesteps_alg_mod function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) call clone_bundle(mr, diff_mr, nummr) - call invoke( assign_field_random_kernel_type( r_u, 1.0_r_def ) , & - assign_field_random_kernel_type( r_rho, 1.0_r_def ) , & - assign_field_random_kernel_type( r_theta, 1.0_r_def ) , & - assign_field_random_kernel_type( r_exner, 1.0_r_def ) ) + ! Set the 'random data' to be the perturbation + call invoke( name = "copy_fields_to_state", & + setval_X(r_u, u ), & + setval_X(r_exner, exner ), & + setval_X(r_theta, theta), & + setval_X(r_rho, rho ) ) + ! Overwrite the moisture fields with potential temperature do i = 1, nummr - call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) + call invoke( & + setval_X( r_mr(i), theta ), & + inc_a_times_X( 0.000001_r_def, r_mr(i) ), & + setval_X( ls_mr(i), ls_theta ), & + inc_a_times_X( 0.000001_r_def, ls_mr(i) )) end do + call moist_dyn_factors_alg( ls_moist_dyn, ls_mr ) - gamma_u = 1.e4_r_def - gamma_theta = 1.e2_r_def - gamma_rho = 1.e0_r_def - gamma_exner = 6.5e-1_r_def + gamma_u = 6.5_r_def + gamma_theta = 6.5_r_def + gamma_rho = 6.5_r_def + gamma_exner = 6.5_r_def - if ( use_moisture ) then - gamma_mr = 1.e-1_r_def + if ( use_moisture ) then + gamma_mr = 6.5_r_def else - gamma_mr = 0.0_r_def + gamma_mr = 0._r_def end if do n = 1, number_gamma_values @@ -277,6 +288,10 @@ module tl_test_timesteps_alg_mod !------------------------------------------------------------------------ ! Nonlinear model run with perturbed state !------------------------------------------------------------------------ + write(log_scratch_space,'(A, I2)') & + "Perturbed Nonlinear, timestep: ", t + call log_event(log_scratch_space, LOG_LEVEL_INFO) + call invoke( setval_X( u, n1_u ), & setval_X( theta, n1_theta ), & setval_X( rho, n1_rho ), & @@ -314,6 +329,10 @@ module tl_test_timesteps_alg_mod !------------------------------------------------------------------------ ! Linear model run !------------------------------------------------------------------------ + write(log_scratch_space,'(A, I2)') & + "Linear, timestep: ", t + call log_event(log_scratch_space, LOG_LEVEL_INFO) + call invoke( setval_X( u, p_u ), & setval_X( theta, p_theta ), & setval_X( rho, p_rho ), & @@ -337,6 +356,7 @@ module tl_test_timesteps_alg_mod call moist_dyn_factors_alg( ls_moist_dyn, ls_mr ) endif + call finalise_linear_model() call initialise_linear_model( mesh, & modeldb ) @@ -359,6 +379,10 @@ module tl_test_timesteps_alg_mod !------------------------------------------------------------------------ ! Nonlinear model run with un-perturbed state !------------------------------------------------------------------------ + write(log_scratch_space,'(A, I2)') & + "Unperturbed NonLinear, timestep: ", t + call log_event(log_scratch_space, LOG_LEVEL_INFO) + call invoke( setval_X( u, n2_u ), & setval_X( theta, n2_theta ), & setval_X( rho, n2_rho ), & @@ -386,6 +410,10 @@ module tl_test_timesteps_alg_mod setval_X( n2_rho, rho ), & setval_X( n2_exner, exner ) ) + do i = 1, nummr + call invoke( setval_X( n2_mr(i), mr(i) ) ) + end do + do i = 1, nummr call invoke( setval_X( ls_mr(i), mr(i) ) ) end do @@ -417,160 +445,67 @@ module tl_test_timesteps_alg_mod norm_mr = norm_mr + norm_mr_tmp end do - norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_mr - norm_diff = sqrt( norm_diff ) - norm_u = sqrt( norm_u ) - norm_rho= sqrt( norm_rho ) - norm_theta = sqrt( norm_theta ) - norm_exner = sqrt( norm_exner ) - norm_mr = sqrt( norm_mr ) - - call invoke( X_innerproduct_X( denom_u, p_u ) ) - call invoke( X_innerproduct_X( denom_rho, p_rho ) ) - call invoke( X_innerproduct_X( denom_exner, p_exner ) ) - call invoke( X_innerproduct_X( denom_theta, p_theta ) ) + array_norm(1) = norm_u + array_norm(2) = norm_rho + array_norm(3) = norm_theta + array_norm(4) = norm_mr + array_norm(5) = norm_exner + array_names(1) = 'norm_u' + array_names(2) = 'norm_rho' + array_names(3) = 'norm_theta' + array_names(4) = 'norm_mr' + array_names(5) = 'norm_exner' - denom_mr=0.0_r_def - do i = 1, nummr - call invoke( & - X_innerproduct_X( denom_mr_tmp, p_mr(i) ) ) - denom_mr = denom_mr + denom_mr_tmp - end do + if (n == 2) then + call array_convergence_rate_check( array_norm, array_norm_prev, & + array_names, n_variables, label, tol=tol, indiv_tol=indiv_tol ) + end if - denom_total = denom_rho + denom_theta + denom_exner + denom_u + denom_mr - denom_total = sqrt( denom_total ) - denom_u = sqrt( denom_u ) - denom_rho = sqrt( denom_rho ) - denom_theta = sqrt( denom_theta ) - denom_exner = sqrt( denom_exner ) - denom_mr = sqrt( denom_mr ) + array_norm_prev = array_norm !---------------------------------------------------------------------------- ! Print values out to enable plotting a graph !---------------------------------------------------------------------------- - write( log_scratch_space, & - '( A, E32.12, A, E32.12 )' ) & - ' gamma_total = ' , gamma_u, & - ' norm = ' , norm_diff / denom_total - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_rho = ' , gamma_u, & - ' norm = ' , norm_rho / denom_rho + ' gamma_rho = ' , gamma_rho, & + ' norm = ' , norm_rho call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_exner = ' , gamma_u, & - ' norm = ' , norm_exner / denom_exner + ' gamma_exner = ' , gamma_exner, & + ' norm = ' , norm_exner call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_theta = ' , gamma_u, & - ' norm = ' , norm_theta / denom_theta + ' gamma_theta = ' , gamma_theta, & + ' norm = ' , norm_theta call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & ' gamma_u = ' , gamma_u, & - ' norm = ' , norm_u / denom_u + ' norm = ' , norm_u call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_mr = ' , gamma_u, & - ' norm = ' , norm_mr / denom_mr + ' gamma_mr = ' , gamma_mr, & + ' norm = ' , norm_mr call log_event( log_scratch_space, LOG_LEVEL_INFO ) -!---------------------------------------------------------------------------- -! Test that gives a PASS or FAIL -!---------------------------------------------------------------------------- - if (n == 2) then - - pass_str = "PASS" - - write( log_scratch_space, '(A)' ) & - "TL Test: " // trim(label) - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, '(A)' ) "Total " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "Theta " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_theta, norm_theta_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "Rho " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_rho, norm_rho_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "Exner " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_exner, norm_exner_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "u " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_u, norm_u_prev, pass_str, tol ) - - if ( use_moisture ) then - write( log_scratch_space, '(A)' ) "mr " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_mr, norm_mr_prev, pass_str, tol ) - end if - - write( log_scratch_space,'(" test",A32," : ",A4)' ) trim(label), pass_str - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - end if - - norm_diff_prev = norm_diff - norm_rho_prev = norm_rho - norm_theta_prev = norm_theta - norm_exner_prev = norm_exner - norm_u_prev = norm_u - norm_mr_prev = norm_mr - end do ! Loop over values of gamma end subroutine test_timesteps - !> @brief Test the convergence rate. - !> @details If the convergence rate is not close to 4, within the - !! specified tolerance, then change the pass string to FAIL. - !> @param[in] norm_diff Current norm - !> @param[in] norm_diff_prev Previous norm - !> @param[inout] pass_str Pass string (either PASS or FAIL) - !> @param[in] tol Test Tolerance - subroutine convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) - implicit none - - real(r_def), intent(in) :: norm_diff, norm_diff_prev - character(len=4), intent(inout) :: pass_str - real(r_def), intent(in) :: tol - - real(r_def) :: conv_rate - conv_rate = norm_diff_prev / norm_diff - - conv_rate = norm_diff_prev / norm_diff - write( log_scratch_space, '(A, E16.8)') & - "Convergence rate: ", conv_rate - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - if ( abs( conv_rate - 4.0_r_def ) >= tol ) then - pass_str = "FAIL" - endif - - end subroutine convergence_pass_string - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Converts a string to a timestep number. !> diff --git a/science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 new file mode 100644 index 000000000..6ea6ff295 --- /dev/null +++ b/science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 @@ -0,0 +1,597 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- + +!>@brief The tangent linear test for multiple timesteps +!! (Taylor remainder convergence). +!>@details Test whether the tangent linear code is tangent linear +!! to the corresponding nonlinear code, for multiple timesteps, +!! using the Taylor remainder convergence test. +module tl_test_timesteps_random_alg_mod + use sci_assign_field_random_kernel_mod, & + only: assign_field_random_kernel_type + use constants_mod, only: i_timestep, i_def, r_def, l_def, & + str_def + use field_array_mod, only: field_array_type + use field_mod, only: field_type + use sci_field_bundle_builtins_mod, only: clone_bundle + use field_collection_mod, only: field_collection_type + use finite_element_config_mod, only: element_order_h, element_order_v + use formulation_config_mod, only: moisture_formulation, & + moisture_formulation_dry + use fs_continuity_mod, only: W2, W3, Wtheta + use function_space_collection_mod, only: function_space_collection + use gungho_step_mod, only: gungho_step + use gungho_model_mod, only: initialise_model, & + finalise_model + use driver_modeldb_mod, only: modeldb_type + use log_mod, only: log_event, & + log_scratch_space, & + LOG_LEVEL_INFO, & + LOG_LEVEL_ERROR + use linear_step_mod, only: linear_step + use linear_model_mod, only: initialise_linear_model, & + finalise_linear_model + use mesh_mod, only: mesh_type + use model_clock_mod, only: model_clock_type + use moist_dyn_mod, only: num_moist_factors + use mr_indices_mod, only: nummr + use semi_implicit_solver_alg_mod, only: semi_implicit_solver_alg_final + use si_operators_alg_mod, only: final_si_operators + use timestepping_config_mod, only: dt, & + method, & + method_rk + use time_config_mod, only: timestep_start, timestep_end + use tl_test_convergence_rate_check, only: convergence_rate_check + use validity_test_config_mod, only: number_gamma_values, & + update_ls_frequency + use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg + use tl_moist_dyn_factors_alg_mod, only: tl_moist_dyn_factors_alg + + implicit none + + private convergence_pass_string + public test_timesteps_random + + contains + + !> @brief Test the tangent linear runge-kutta algorithm. + !> @param[in] modeldb The working data set for a model run + !> @param[in] mesh The current 3d mesh + !> @param[in] twod_mesh The current 2d mesh + !> @param[in] model_clock Time within the model. + !> + subroutine test_timesteps_random( modeldb, & + mesh, & + twod_mesh, & + model_clock ) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(mesh_type), pointer, intent(in) :: twod_mesh + class(model_clock_type), intent(in) :: model_clock + + character(str_def) :: label = "timesteps" + + type(field_collection_type), pointer :: prognostic_fields + type(field_collection_type), pointer :: ls_fields + + type(field_type), pointer :: ls_u + type(field_type), pointer :: ls_rho + type(field_type), pointer :: ls_theta + type(field_type), pointer :: ls_exner + type(field_type), pointer :: ls_moist_dyn(:) + type(field_type), pointer :: ls_mr(:) + + type(field_type), pointer :: u + type(field_type), pointer :: rho + type(field_type), pointer :: theta + type(field_type), pointer :: exner + type(field_type), pointer :: moist_dyn(:) + type(field_type), pointer :: mr(:) + + type(field_type), dimension(nummr) :: p_mr + type(field_type), dimension(nummr) :: n1_mr + type(field_type), dimension(nummr) :: n2_mr + type(field_type), dimension(nummr) :: r_mr + type(field_type), dimension(nummr) :: diff_mr + type(field_type) :: p_u, p_rho, p_theta, p_exner + type(field_type) :: n1_u, n1_rho, n1_theta, n1_exner + type(field_type) :: n2_u, n2_rho, n2_theta, n2_exner + type(field_type) :: r_u, r_rho, r_theta, r_exner + type(field_type) :: diff_u, diff_rho, diff_theta, diff_exner + + type(field_collection_type), pointer :: moisture_fields + type(field_array_type), pointer :: mr_array + type(field_array_type), pointer :: moist_dyn_array + type(field_array_type), pointer :: ls_mr_array + type(field_array_type), pointer :: ls_moist_dyn_array + + real(r_def) :: gamma_u, gamma_rho, gamma_exner, gamma_theta, gamma_mr + real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta, norm_mr + real(r_def) :: norm_mr_tmp + real(r_def) :: norm_diff, norm_diff_prev + real(r_def) :: norm_u_prev, norm_rho_prev, norm_exner_prev + real(r_def) :: norm_theta_prev, norm_mr_prev + + real(r_def), parameter :: tol = 9.e-1_r_def + + integer(i_def) :: n, i, t + character(len=4) :: pass_str + logical(l_def) :: use_moisture + + call log_event( "TL Test: " // trim(label), & + LOG_LEVEL_INFO ) + + use_moisture = ( moisture_formulation /= moisture_formulation_dry ) + + if ( method == method_rk .and. use_moisture ) then + call log_event( & + 'Not possible to use Runge Kutta time stepping with moisture', & + log_level_error ) + end if + + prognostic_fields => modeldb%fields%get_field_collection( & + "prognostic_fields") + ls_fields => modeldb%fields%get_field_collection("ls_fields") + moisture_fields => modeldb%fields%get_field_collection("moisture_fields") + call moisture_fields%get_field("mr", mr_array) + call moisture_fields%get_field("moist_dyn", moist_dyn_array) + mr => mr_array%bundle + moist_dyn => moist_dyn_array%bundle + call moisture_fields%get_field("ls_mr", ls_mr_array) + call moisture_fields%get_field("ls_moist_dyn", ls_moist_dyn_array) + ls_mr => ls_mr_array%bundle + ls_moist_dyn => ls_moist_dyn_array%bundle + + ! Input + call ls_fields%get_field('ls_u', ls_u) + call ls_fields%get_field('ls_rho', ls_rho) + call ls_fields%get_field('ls_theta', ls_theta) + call ls_fields%get_field('ls_exner', ls_exner) + + call prognostic_fields%get_field('u', u) + call prognostic_fields%get_field('rho', rho) + call prognostic_fields%get_field('theta', theta) + call prognostic_fields%get_field('exner', exner) + + call r_u%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) + call r_rho%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call r_exner%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call r_theta%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) + call clone_bundle(mr, r_mr, nummr) + + call p_u%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) + call p_rho%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call p_exner%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call p_theta%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) + call clone_bundle(mr, p_mr, nummr) + + call n1_u%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) + call n1_rho%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call n1_exner%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call n1_theta%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) + call clone_bundle(mr, n1_mr, nummr) + + call n2_u%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) + call n2_rho%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call n2_exner%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call n2_theta%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) + call clone_bundle(mr, n2_mr, nummr) + + call diff_u%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) + call diff_rho%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call diff_exner%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) + call diff_theta%initialise( vector_space = & + function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) + call clone_bundle(mr, diff_mr, nummr) + + call invoke( assign_field_random_kernel_type( r_u, 1.0_r_def ) , & + assign_field_random_kernel_type( r_rho, 1.0_r_def ) , & + assign_field_random_kernel_type( r_theta, 1.0_r_def ) , & + assign_field_random_kernel_type( r_exner, 1.0_r_def ) ) + + do i = 1, nummr + call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) + end do + + gamma_u = 1.e4_r_def + gamma_theta = 1.0_r_def + gamma_rho = 1.e0_r_def + gamma_exner = 6.5e-1_r_def + + if ( use_moisture ) then + gamma_mr = 1.e-3_r_def + else + gamma_mr = 0.0_r_def + end if + + gamma_u = gamma_u /24.0_r_def + gamma_theta = gamma_theta / 24.0_r_def + gamma_rho = gamma_rho / 24.0_r_def + gamma_exner = gamma_exner / 24.0_r_def + gamma_mr = gamma_mr / 24.0_r_def + + do n = 1, number_gamma_values + gamma_u = gamma_u / 2.0_r_def + gamma_theta = gamma_theta / 2.0_r_def + gamma_rho = gamma_rho / 2.0_r_def + gamma_exner = gamma_exner / 2.0_r_def + gamma_mr = gamma_mr / 2.0_r_def + + ! Initial conditions for nonlinear perturbed + call invoke( aX_plus_Y( n1_u, gamma_u, r_u, ls_u ), & + aX_plus_Y( n1_theta, gamma_theta, r_theta, ls_theta ), & + aX_plus_Y( n1_rho, gamma_rho, r_rho, ls_rho ), & + aX_plus_Y( n1_exner, gamma_exner, r_exner, ls_exner ) ) + + do i = 1, nummr + call invoke( aX_plus_Y( n1_mr(i), gamma_mr, & + r_mr(i), ls_mr(i) ) ) + end do + + ! Initial conditions for nonlinear unperturbed + call invoke( setval_X( n2_u, ls_u ), & + setval_X( n2_theta, ls_theta ), & + setval_X( n2_rho, ls_rho ), & + setval_X( n2_exner, ls_exner ) ) + + do i = 1, nummr + call invoke( setval_X( n2_mr(i), ls_mr(i) ) ) + end do + + ! Initial conditions for the linear + call invoke( a_times_X( p_u, gamma_u, r_u ), & + a_times_X( p_theta, gamma_theta, r_theta ), & + a_times_X( p_rho, gamma_rho, r_rho ), & + a_times_X( p_exner, gamma_exner, r_exner ) ) + + do i = 1, nummr + call invoke( a_times_X( p_mr(i), gamma_mr, & + r_mr(i) ) ) + end do + + ! Multiple timesteps + do t = parse_instance(timestep_start), parse_instance(timestep_end) + +!------------------------------------------------------------------------ +! Nonlinear model run with perturbed state +!------------------------------------------------------------------------ + call invoke( setval_X( u, n1_u ), & + setval_X( theta, n1_theta ), & + setval_X( rho, n1_rho ), & + setval_X( exner, n1_exner ) ) + do i = 1, nummr + call invoke( setval_X( mr(i), n1_mr(i) ) ) + enddo + call moist_dyn_factors_alg( moist_dyn, mr ) + + ! Clean up solvers and timestep method left over from running + ! the model to set up model state and linear state + call final_si_operators() + call semi_implicit_solver_alg_final() + call finalise_model(modeldb) + + call initialise_model( mesh, & + modeldb ) + + call gungho_step( mesh, & + twod_mesh, & + modeldb, & + model_clock ) + + call finalise_model(modeldb) + + call invoke( setval_X( n1_u, u ), & + setval_X( n1_theta, theta ), & + setval_X( n1_rho, rho ), & + setval_X( n1_exner, exner) ) + + do i = 1, nummr + call invoke( setval_X( n1_mr(i), mr(i) ) ) + end do + +!------------------------------------------------------------------------ +! Linear model run +!------------------------------------------------------------------------ + call invoke( setval_X( u, p_u ), & + setval_X( theta, p_theta ), & + setval_X( rho, p_rho ), & + setval_X( exner, p_exner) ) + do i = 1, nummr + call invoke( setval_X( mr(i), p_mr(i) ) ) + end do + call tl_moist_dyn_factors_alg( moist_dyn, mr ) + + ! Set the linearisation state + ! The linearisation state is copied from the nonlinear run, + ! every few timesteps. + if ( mod(t, update_ls_frequency) == 0 ) then + call invoke( setval_X( ls_u, n2_u ), & + setval_X( ls_theta, n2_theta ), & + setval_X( ls_rho, n2_rho ), & + setval_X( ls_exner, n2_exner) ) + do i = 1, nummr + call invoke( setval_X( ls_mr(i), n2_mr(i) ) ) + enddo + call moist_dyn_factors_alg( ls_moist_dyn, ls_mr ) + endif + + call finalise_linear_model() + call initialise_linear_model( mesh, & + modeldb ) + + call linear_step( mesh, & + twod_mesh, & + modeldb, & + model_clock ) + + call finalise_linear_model() + + + call invoke( setval_X( p_u, u ), & + setval_X( p_theta, theta ), & + setval_X( p_rho, rho ), & + setval_X( p_exner, exner) ) + do i = 1, nummr + call invoke( setval_X( p_mr(i), mr(i) ) ) + enddo + +!------------------------------------------------------------------------ +! Nonlinear model run with un-perturbed state +!------------------------------------------------------------------------ + call invoke( setval_X( u, n2_u ), & + setval_X( theta, n2_theta ), & + setval_X( rho, n2_rho ), & + setval_X( exner, n2_exner ) ) + + do i = 1, nummr + call invoke( setval_X( mr(i), n2_mr(i) ) ) + end do + + call moist_dyn_factors_alg( moist_dyn, mr ) + + + call initialise_model( mesh, & + modeldb ) + + call gungho_step( mesh, & + twod_mesh, & + modeldb, & + model_clock ) + + call finalise_model(modeldb) + + call invoke( setval_X( n2_u, u ), & + setval_X( n2_theta, theta ), & + setval_X( n2_rho, rho ), & + setval_X( n2_exner, exner ) ) + + do i = 1, nummr + call invoke( setval_X( n2_mr(i), mr(i) ) ) + call invoke( setval_X( ls_mr(i), mr(i) ) ) + end do + + end do ! timesteps loop + +!------------------------------------------------------------------------ +! Calculate norms +!------------------------------------------------------------------------ + call invoke( X_minus_Y( diff_u, n1_u, n2_u ), & + inc_X_minus_Y( diff_u, p_u ), & + X_innerproduct_X( norm_u, diff_u ) ) + call invoke( X_minus_Y( diff_rho, n1_rho, n2_rho ), & + inc_X_minus_Y( diff_rho, p_rho ), & + X_innerproduct_X( norm_rho, diff_rho ) ) + call invoke( X_minus_Y( diff_exner, n1_exner, n2_exner ), & + inc_X_minus_Y( diff_exner, p_exner ), & + X_innerproduct_X( norm_exner, diff_exner ) ) + call invoke( X_minus_Y( diff_theta, n1_theta, n2_theta ), & + inc_X_minus_Y( diff_theta, p_theta ), & + X_innerproduct_X( norm_theta, diff_theta ) ) + + norm_mr=0.0_r_def + do i = 1, nummr + call invoke( & + X_minus_Y( diff_mr(i), n1_mr(i), n2_mr(i) ), & + inc_X_minus_Y( diff_mr(i), p_mr(i) ), & + X_innerproduct_X( norm_mr_tmp, diff_mr(i) ) ) + norm_mr = norm_mr + norm_mr_tmp + end do + + norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_mr + +!---------------------------------------------------------------------------- +! Print values out to enable plotting a graph +!---------------------------------------------------------------------------- + write( log_scratch_space, & + '( A, E32.12, A, E32.12 )' ) & + ' gamma_total = ' , gamma_u, & + ' norm = ' , norm_diff + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12)' ) & + ' gamma_rho = ' , gamma_u, & + ' norm = ' , norm_rho + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12)' ) & + ' gamma_exner = ' , gamma_u, & + ' norm = ' , norm_exner + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12)' ) & + ' gamma_theta = ' , gamma_u, & + ' norm = ' , norm_theta + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12)' ) & + ' gamma_u = ' , gamma_u, & + ' norm = ' , norm_u + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12)' ) & + ' gamma_mr = ' , gamma_u, & + ' norm = ' , norm_mr + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + +!---------------------------------------------------------------------------- +! Test that gives a PASS or FAIL +!---------------------------------------------------------------------------- + if (n == 2) then + + pass_str = "PASS" + + write( log_scratch_space, '(A)' ) & + "TL Test: " // trim(label) + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, '(A)' ) "Total " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "Theta " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_theta, norm_theta_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "Rho " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_rho, norm_rho_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "Exner " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_exner, norm_exner_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "u " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_u, norm_u_prev, pass_str, tol ) + + if ( use_moisture ) then + write( log_scratch_space, '(A)' ) "mr " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_mr, norm_mr_prev, pass_str, tol ) + end if + + write( log_scratch_space,'(" test",A32," : ",A4)' ) trim(label), pass_str + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + end if + + norm_diff_prev = norm_diff + norm_rho_prev = norm_rho + norm_theta_prev = norm_theta + norm_exner_prev = norm_exner + norm_u_prev = norm_u + norm_mr_prev = norm_mr + + end do ! Loop over values of gamma + + end subroutine test_timesteps_random + + !> @brief Test the convergence rate. + !> @details If the convergence rate is not close to 4, within the + !! specified tolerance, then change the pass string to FAIL. + !! This is a special routine for this particular test, to allow + !! for norms that have already had the square root applied. + !> @param[in] norm_diff Current norm + !> @param[in] norm_diff_prev Previous norm + !> @param[inout] pass_str Pass string (either PASS or FAIL) + !> @param[in] tol Test Tolerance + subroutine convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) + implicit none + + real(r_def), intent(in) :: norm_diff, norm_diff_prev + character(len=4), intent(inout) :: pass_str + real(r_def), intent(in) :: tol + + real(r_def) :: conv_rate + conv_rate = norm_diff_prev / norm_diff + + conv_rate = norm_diff_prev / norm_diff + write( log_scratch_space, '(A, E16.8)') & + "Convergence rate: ", conv_rate + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + if ( abs( conv_rate - 4.0_r_def ) >= tol ) then + pass_str = "FAIL" + endif + + end subroutine convergence_pass_string + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !> Converts a string to a timestep number. + !> + !> @param[in] string Correctly formatted timestep number. + !> @return Timestep number. + !> + function parse_instance( string ) result(instance) + + implicit none + + character(*), intent(in) :: string + integer(i_timestep) :: instance + + integer :: string_size + integer :: format_size + integer :: status + character(:), allocatable :: fmt + + ! The "I0" formatting string does not work for input. Instead the exact + ! number of digits to be read must be requested. Thus we need to construct + ! a format string from the size of the string. + ! + string_size = len(string) + format_size = string_size + 3 + allocate( character(format_size) :: fmt, stat=status ) + if ( status /= 0 ) then + call log_event( & + 'TL test parse_instance: Unable to allocate format', & + log_level_error ) + end if + write( fmt, '("(I", I0, ")")' ) string_size + read( string, fmt ) instance + deallocate( fmt ) + + if ( instance < 0 ) then + call log_event( & + 'TL test parse_instance: Instances may not be negative', & + log_level_error ) + end if + + end function parse_instance + +end module tl_test_timesteps_random_alg_mod diff --git a/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 b/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 index 02d96d2ea..d74fd3dfb 100644 --- a/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 @@ -21,7 +21,6 @@ module tl_test_transport_control_mod use function_space_collection_mod, only: function_space_collection use derived_config_mod, only: bundle_size use driver_modeldb_mod, only: modeldb_type - use moist_dyn_mod, only: num_moist_factors use mr_indices_mod, only: nummr use log_mod, only: log_event, & log_scratch_space, & @@ -31,7 +30,7 @@ module tl_test_transport_control_mod only: gungho_transport_control_alg_init, & gungho_transport_control_alg use tl_transport_control_alg_mod, only: tl_transport_control_alg - use tl_test_convergence_rate_check, only: convergence_rate_check + use tl_test_convergence_rate_check, only: array_convergence_rate_check implicit none @@ -61,10 +60,11 @@ module tl_test_transport_control_mod type(field_type), pointer :: ls_u => null() type(field_type), pointer :: ls_rho => null() type(field_type), pointer :: ls_theta => null() - type(field_type), pointer :: ls_exner => null() - type(field_type), pointer :: ls_moist_dyn(:) => null() type(field_type), pointer :: ls_mr(:) => null() - type(field_type), pointer :: moist_dyn(:) => null() + type(field_type), pointer :: ls_exner => null() + type(field_type), pointer :: u => null() + type(field_type), pointer :: rho => null() + type(field_type), pointer :: theta => null() type(field_type), pointer :: mr(:) => null() type(field_type) :: state(bundle_size) @@ -75,10 +75,7 @@ module tl_test_transport_control_mod type(field_type) :: n1_rhs(bundle_size) type(field_type) :: n2_rhs(bundle_size) type(field_type) :: diff(bundle_size) - type(field_type), dimension(num_moist_factors) :: p_moist_dyn - type(field_type), dimension(num_moist_factors) :: n_moist_dyn - type(field_type), dimension(num_moist_factors) :: r_moist_dyn - type(field_type), dimension(num_moist_factors) :: diff_moist_dyn + type(field_type), dimension(nummr) :: p_mr_in type(field_type), dimension(nummr) :: n_mr_in type(field_type), dimension(nummr) :: ls_mr_out @@ -91,36 +88,32 @@ module tl_test_transport_control_mod type(field_collection_type), pointer :: moisture_fields => null() type(field_array_type), pointer :: mr_array => null() - type(field_array_type), pointer :: moist_dyn_array => null() type(field_array_type), pointer :: ls_mr_array => null() - type(field_array_type), pointer :: ls_moist_dyn_array => null() - - real(r_def) :: gamma_u, gamma_rho, gamma_exner, gamma_theta - real(r_def) :: gamma_moist_dyn, gamma_mr - real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta - real(r_def) :: norm_moist_dyn, norm_mr - real(r_def) :: norm_diff, norm_diff_prev - real(r_def) :: norm_moist_dyn_tmp, norm_mr_tmp - real(r_def), parameter :: tol = 1.e-2_r_def + real(r_def) :: gamma_u, gamma_rho, gamma_theta + real(r_def) :: gamma_mr + real(r_def) :: norm_u, norm_rho, norm_theta + real(r_def) :: norm_mr + real(r_def) :: norm_mr_tmp + integer(i_def), parameter :: n_variables = 4 + real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) + character(str_def) :: array_names(n_variables) + real(r_def), parameter :: tol = 5.e-2_r_def + real(r_def), parameter :: indiv_tol = 5.e-1_r_def integer :: n, outer, i call log_event( "TL Test: " // trim(label), & - LOG_LEVEL_INFO ) + LOG_LEVEL_INFO ) prognostic_fields => modeldb%fields%get_field_collection( & "prognostic_fields") ls_fields => modeldb%fields%get_field_collection("ls_fields") moisture_fields => modeldb%fields%get_field_collection("moisture_fields") call moisture_fields%get_field("mr", mr_array) - call moisture_fields%get_field("moist_dyn", moist_dyn_array) mr => mr_array%bundle - moist_dyn => moist_dyn_array%bundle call moisture_fields%get_field("ls_mr", ls_mr_array) - call moisture_fields%get_field("ls_moist_dyn", ls_moist_dyn_array) ls_mr => ls_mr_array%bundle - ls_moist_dyn => ls_moist_dyn_array%bundle ! Input call ls_fields%get_field('ls_u', ls_u) @@ -128,6 +121,12 @@ module tl_test_transport_control_mod call ls_fields%get_field('ls_theta', ls_theta) call ls_fields%get_field('ls_exner', ls_exner) + ! Overwrite the moisture fields with potential temperature + do i = 1, nummr + call invoke( & + setval_X( ls_mr(i), ls_theta)) + end do + call ls_state(igh_u)%initialise( vector_space = ls_u%get_function_space() ) call ls_state(igh_t)%initialise( vector_space = ls_theta%get_function_space() ) call ls_state(igh_d)%initialise( vector_space = ls_rho%get_function_space() ) @@ -144,11 +143,6 @@ module tl_test_transport_control_mod call clone_bundle(ls_state, n2_rhs, bundle_size) call clone_bundle(ls_state, diff, bundle_size) - call clone_bundle(moist_dyn, p_moist_dyn, num_moist_factors) - call clone_bundle(moist_dyn, r_moist_dyn, num_moist_factors) - call clone_bundle(moist_dyn, n_moist_dyn, num_moist_factors) - call clone_bundle(moist_dyn, diff_moist_dyn, num_moist_factors) - call clone_bundle(mr, r_mr, nummr) call clone_bundle(mr, p_mr_in, nummr) call clone_bundle(mr, n_mr_in, nummr) @@ -161,23 +155,36 @@ module tl_test_transport_control_mod setval_X(ls_state(igh_u), ls_u ), & setval_X(ls_state(igh_t), ls_theta), & setval_X(ls_state(igh_d), ls_rho ), & - setval_X(ls_state(igh_p), ls_exner), & + setval_X(ls_state(igh_p), ls_exner ), & setval_X(ls_advected_u, ls_u ) ) call gungho_transport_control_alg_init( mesh ) - call invoke( assign_field_random_kernel_type( random(igh_u), 1.0_r_def ) , & - assign_field_random_kernel_type( random(igh_d), 1.0_r_def ) , & - assign_field_random_kernel_type( random(igh_t), 1.0_r_def ) , & - assign_field_random_kernel_type( random(igh_p), 1.0_r_def ) ) + ! Perturbation + call prognostic_fields%get_field('u', u) + call prognostic_fields%get_field('rho', rho) + call prognostic_fields%get_field('theta', theta) + + ! Set the 'random perturbation as the ls_state plus pert' + call invoke( name = "copy_fields_to_state", & + setval_X(random(igh_u), ls_u ), & + setval_X(random(igh_t), ls_theta), & + setval_X(random(igh_d), ls_rho ) ) + + do i = 1, nummr + call invoke( & + setval_X( r_mr(i), ls_mr(i) )) + end do - do i = 1, num_moist_factors - call invoke( assign_field_random_kernel_type( r_moist_dyn(i), 1.0_r_def ) ) - enddo + call invoke( name = "inc", & + inc_X_plus_Y(random(igh_u), u ), & + inc_X_plus_Y(random(igh_t), theta), & + inc_X_plus_Y(random(igh_d), rho ) ) do i = 1, nummr - call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) - enddo + call invoke( & + inc_X_plus_Y( r_mr(i), theta )) + end do call set_bundle_scalar( 0.0_r_def, n1_rhs, bundle_size ) @@ -192,19 +199,15 @@ module tl_test_transport_control_mod outer, & cheap_update = .false.) - gamma_u = 7.e8_r_def - gamma_theta = 1.e5_r_def - gamma_rho = 1.e5_r_def - gamma_exner = 1.e5_r_def - gamma_moist_dyn=1.e0_r_def - gamma_mr = 1.e0_r_def + gamma_u = 1._r_def + gamma_theta = 1._r_def + gamma_rho = 1._r_def + gamma_mr = 1._r_def do n=1,2 gamma_u = gamma_u/2.0_r_def gamma_theta = gamma_theta/2.0_r_def gamma_rho = gamma_rho/2.0_r_def - gamma_exner = gamma_exner/2.0_r_def - gamma_moist_dyn = gamma_moist_dyn/2.0_r_def gamma_mr = gamma_mr/2.0_r_def call set_bundle_scalar( 0.0_r_def, n2_rhs, bundle_size ) @@ -212,7 +215,7 @@ module tl_test_transport_control_mod call invoke( a_times_X( p_state(igh_u), gamma_u, random(igh_u) ), & a_times_X( p_state(igh_t), gamma_theta, random(igh_t) ), & a_times_X( p_state(igh_d), gamma_rho, random(igh_d) ), & - a_times_X( p_state(igh_p), gamma_exner, random(igh_p) ), & + setval_c( p_state(igh_p), 0.0_r_def ), & a_times_X( p_advected_u, gamma_u, random(igh_u) ) ) ! state = ls_state + p_state @@ -221,13 +224,6 @@ module tl_test_transport_control_mod call invoke( setval_X( n_advected_u, ls_advected_u), & inc_X_plus_Y(n_advected_u, p_advected_u ) ) - do i = 1, num_moist_factors - call invoke( & - a_times_X( p_moist_dyn(i), gamma_moist_dyn, r_moist_dyn(i) ), & - setval_X( n_moist_dyn(i), ls_moist_dyn(i) ), & - inc_X_plus_Y( n_moist_dyn(i), p_moist_dyn(i) ) ) - end do - do i = 1, nummr call invoke( & a_times_X( p_mr_in(i), gamma_mr, r_mr(i) ), & @@ -263,63 +259,43 @@ module tl_test_transport_control_mod call invoke( & inc_X_minus_Y( diff(igh_u), p_rhs(igh_u) ), & inc_X_minus_Y( diff(igh_t), p_rhs(igh_t) ), & - inc_X_minus_Y( diff(igh_d), p_rhs(igh_d) ), & - inc_X_minus_Y( diff(igh_p), p_rhs(igh_p) ) ) + inc_X_minus_Y( diff(igh_d), p_rhs(igh_d) ) ) - call invoke( X_innerproduct_X( norm_u, diff(igh_u) ) , & + call invoke( & + X_innerproduct_X( norm_u, diff(igh_u) ) , & X_innerproduct_X( norm_rho, diff(igh_d) ) , & - X_innerproduct_X( norm_theta, diff(igh_t) ) , & - X_innerproduct_X( norm_exner, diff(igh_p) ) ) + X_innerproduct_X( norm_theta, diff(igh_t) ) ) - norm_moist_dyn=0.0_r_def - do i = 1, num_moist_factors + + do i = 1, nummr call invoke( & - X_minus_Y( diff_moist_dyn(i), n_moist_dyn(i), moist_dyn(i) ), & - inc_X_minus_Y( diff_moist_dyn(i), p_moist_dyn(i) ), & - X_innerproduct_X( norm_moist_dyn_tmp, diff_moist_dyn(i) ) ) - norm_moist_dyn = norm_moist_dyn + norm_moist_dyn_tmp + X_minus_Y( diff_mr(i), n_mr_out(i), ls_mr_out(i) ), & + inc_X_minus_Y( diff_mr(i), p_mr_out(i) ) ) end do norm_mr=0.0_r_def do i = 1, nummr - call invoke( & - X_minus_Y( diff_mr(i), n_mr_out(i), ls_mr_out(i) ), & - inc_X_minus_Y( diff_mr(i), p_mr_out(i) ), & + call invoke( & X_innerproduct_X( norm_mr_tmp, diff_mr(i) ) ) norm_mr = norm_mr + norm_mr_tmp end do - write( log_scratch_space, & - '(A, E32.12, A, E32.12 )' ) & - ' norm_u = ' , norm_u, & - ' norm_rho = ' , norm_rho - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12 )' ) & - ' norm_theta = ' , norm_theta, & - ' norm_moist_dyn = ' , norm_moist_dyn - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12 )' ) & - ' norm_exner = ' , norm_exner, & - ' norm_mr = ' , norm_mr - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - norm_diff = norm_rho + norm_theta + norm_exner + norm_u & - + norm_moist_dyn + norm_mr - norm_diff = sqrt(norm_diff) + array_norm(1) = norm_u + array_norm(2) = norm_rho + array_norm(3) = norm_theta + array_norm(4) = norm_mr + array_names(1) = 'norm_u' + array_names(2) = 'norm_rho' + array_names(3) = 'norm_theta' + array_names(4) = 'norm_mr' if (n == 2) then - call convergence_rate_check( norm_diff, norm_diff_prev, & - label, tol=tol ) + call array_convergence_rate_check( array_norm, array_norm_prev, & + array_names, n_variables, label, tol=tol, indiv_tol=indiv_tol) end if - norm_diff_prev = norm_diff + array_norm_prev = array_norm + end do end subroutine test_transport_control diff --git a/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 b/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 index 47e5cdfc0..c129dd3f2 100644 --- a/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 @@ -203,8 +203,6 @@ module tl_test_vorticity_mod inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) - norm_diff = sqrt(norm_diff) - write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/applications/linear_model/plot_convergence/plot_convergence.py b/science/linear/plot_convergence/plot_convergence.py similarity index 54% rename from applications/linear_model/plot_convergence/plot_convergence.py rename to science/linear/plot_convergence/plot_convergence.py index 811421c89..6d7c42ea7 100644 --- a/applications/linear_model/plot_convergence/plot_convergence.py +++ b/science/linear/plot_convergence/plot_convergence.py @@ -14,6 +14,7 @@ import os import pandas as pd import matplotlib.pyplot as plt +import numpy as np def plot_data(filename, axes, variable, color, shape): @@ -37,12 +38,55 @@ def plot_data(filename, axes, variable, color, shape): norm_df = pd.DataFrame(norm_line, columns=['gamma', 'norm']) datafile.close() + + # Square root (as the read data is only the inner product and + # has not included the square root to give the norm) + norm_df['norm'] = np.sqrt(norm_df['norm']) + + # Normalise - to give a relative error + normalise = norm_df['norm'].iloc[4] + norm_df['norm'] = norm_df['norm'] / normalise + + # Plot the data + if (CONFIG == 'nwp_gal9'): + ymin = 10**-2 + ymax = 10**2 + xmin = 10**-3 + xmax = 10**1 + elif (CONFIG == 'semi_implicit'): + ymin = 10**-2 + ymax = 10**2 + xmin = 10**-1 + xmax = 10**4 + elif (CONFIG == 'runge_kutta'): + ymin = 10**-3 + ymax = 10**2 + xmin = 10**-1 + xmax = 10**4 + else: + print(CONFIG+' not listed') + + norm_df.plot.scatter(x='gamma', y='norm', loglog=True, + xlim=(xmin, xmax), + ylim=(ymin, ymax), + ax=axes, color=color, + marker=shape, label = variable) + + # Check extremes + norm_min = norm_df['norm'].min() + norm_max = norm_df['norm'].max() + if (norm_min < ymin) : + print('Warning: Min value is'+ str(norm_min)) + if (norm_max > ymax) : + print('Warning: Max value is'+ str(norm_max)) + + # Plot the expected line + centre = norm_df['gamma'].iloc[4] + expected_x = [10**-2 *centre, centre, 100* centre] + expected_y = [10**-2, 10**0, 100] + plt.plot(expected_x, expected_y) - norm_df.plot.scatter(x='gamma', y='norm', loglog=True, xlim=(10**0, 10**5), - ylim=(10**-5, 10**0), ax=axes, color=color, - marker=shape) - - + def make_plot(directory, filename): ''' Plot the data for the different prognostic variables, together with the @@ -55,27 +99,25 @@ def make_plot(directory, filename): plot_data(directory + filename, axs, 'gamma_u', 'r', 'o') plot_data(directory + filename, axs, 'gamma_exner', 'b', 's') plot_data(directory + filename, axs, 'gamma_theta', 'g', '^') - plot_data(directory + filename, axs, 'gamma_total', 'black', 'x') - plot_data(directory + filename, axs, 'gamma_mr', 'm', '*') + plot_data(directory + filename, axs, 'gamma_mr', 'black', 'x') - expected_x = [10**0, 10**5] - expected_y = [10**-5, 10**0] - plt.plot(expected_x, expected_y) - - plt.legend(['Expected gradient (linear)', 'density', 'momentum', - 'exner pressure', 'potential temperature', 'total', - 'moisture mixing ratios'], - loc='lower right') + plt.legend(loc='lower right') plt.xlabel('Gamma') plt.ylabel('Relative error') plt.title('Validity of the tangent linear model') - plt.show() + # To show the plot to the screen, uncommment plt.show() + #plt.show() + + # Save the plot to a file + plt.savefig(directory + filename + "convergence_plot.png") if __name__ == "__main__": DATA_DIRECTORY = os.getcwd()+'/' DATA_FILENAME = 'outfile' + CONFIG = os.getenv('CONFIG') + print(CONFIG) make_plot(DATA_DIRECTORY, DATA_FILENAME) diff --git a/science/linear/plot_convergence/plot_convergence.sh b/science/linear/plot_convergence/plot_convergence.sh new file mode 100755 index 000000000..8b60e5331 --- /dev/null +++ b/science/linear/plot_convergence/plot_convergence.sh @@ -0,0 +1,118 @@ +############################################################################## +# (c) Crown copyright 2022 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +#---------------------------------------------------------------------- +# Plots the convergence rate of the tangent linear model. +#---------------------------------------------------------------------- + +# INSTRUCTIONS TO RUN +# 1. Specify the config_list +# 2. Run using . plot_convergence.sh, from the plot_convergence directory + +# SCIENCE DETAILS +# The relative linearisation error is +# E = || N(x+ gamma x') - N(x) - L(x) gamma x' || / || L(x) gamma x' || +# where N=nonlinear model, L=linear model, x=linearisation state +# x'=perturbation, gamma=scalar. +# From the Taylor series expansion, E(gamma) = O(gamma) i.e. of the order gamma +# So the relative error should be a linear function of gamma + +# SCRIPT STEPS +# 1. Build the model +# 2. Produce the data: The integration test tl_test_timesteps is extended by +# running over 10 values of gamma, rather than 2 values of gamma. +# 3. Plot the data: The data is plotted for each prognostic variable. + +# EXTENSION +# The plot_configuration.nml can also be extended to other configurations e.g +# * increase the number of timesteps (timesteps_end) +# * increase the number of timesteps between updating the linearisation state +# (update_ls_frequency) + +#-------------------------------------------------------------------------- + +######################## Functions ########################################## +build(){ + echo $CONFIG " Building the executable" + + # Integration tests executable name + exe=$Linear_dir/test/$CONFIG/$CONFIG + + # Build the integration tests, unless that has already been completed + if [ -f $exe ] ; then + echo "Do not need to build the executable as $exe exists" + else + echo "$exe does not exist, so now building the executable" + cd $Root_dir/build + python3 local_build.py linear -t integration-tests + + if [$? -ne 0 ]; then + echo "Error building the executable" + return + fi + fi +} + +integration_test(){ + # Setup the configuration - to test with 10 values of gamma + echo $CONFIG " Setting up the configuration" + cd $Linear_dir/integration-test/$CONFIG/resources/ + cp ${CONFIG}_configuration.nml plot_configuration.nml + sed -i 's/number_gamma_values=2/number_gamma_values=10/g' plot_configuration.nml + if [ $? -ne 0 ]; then + echo "Error in creating plot_configuration.nml" + return + else + echo "plot_configuration.nml created in " $PWD + fi + + # Run the tl_test_timesteps integration test + echo $CONFIG " Running the integration test" + cd $Linear_dir/integration-test/$CONFIG + echo $PWD + $exe resources/plot_configuration.nml test_timesteps > outfile + if [ $? -ne 0 ]; then + echo "Error in creating outfile data" + return + else + echo "Data created successfully" + fi +} + +plot(){ + # Plot the data, together with the expected gradient + echo $CONFIG " Plotting the data" + cd $Linear_dir/integration-test/$CONFIG + python $Linear_dir/plot_convergence/plot_convergence.py +} + +#################### MAIN PROGRAM ################################################# + +# Modules +module purge +module use /home/users/lfricadmin/lmod +module load lfric/vn3.0 +module load scitools + +config_list=(nwp_gal9 semi_implicit runge_kutta) + +# Directory of this script +SCRIPT_DIR="$(dirname "$(realpath "$BASH_SOURCE")")" +# And parent directories +export Linear_dir="$(dirname $SCRIPT_DIR)" +export Parent_dir="$(dirname $Linear_dir)" +export Root_dir="$(dirname $Parent_dir)" +echo "Linear_dir" $Linear_dir +echo "Root_dir" $Root_dir + +for configuration in "${config_list[@]}"; do + echo $configuration + export CONFIG="$configuration" + + build + integration_test + plot +done diff --git a/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf b/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf index 98a373e47..4091f0aa2 100644 --- a/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf +++ b/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf @@ -4,7 +4,7 @@ import=lfric-gungho/HEAD compulsory=true description=Provides extra information for the tangent linear model. help= -ns=namelist/Linear/Initial +ns=namelist/Linear sort-key=Section-A07 title=Linear @@ -13,6 +13,7 @@ compulsory=true description=Do not update the linearisation state during the timestep. help=The linearisation state is the same for every outer and inner loop. !kind=default +ns=namelist/Linear/Efficiency type=logical [namelist:linear=l_stabilise_bl] @@ -20,7 +21,7 @@ compulsory=true description=?????? help=If true then turn on boundary layer stabilisation in linear model !kind=default -ns=namelist/Job/Timestepping/semi-implicit +ns=namelist/Linear/BoundaryLayer type=logical [namelist:linear=ls_read_w2h] @@ -30,7 +31,7 @@ description=For the linearisation state, read winds on a W2h space =from a file. help=Horizontal winds are read in on a W2h space from the ls file. If =false, then cell-centres (W3), co-located winds are assumed. -sort-key=Panel-A07a +ns=namelist/Linear/Data type=logical [namelist:linear=max_bl_stabilisation] @@ -39,7 +40,7 @@ description=?????? fail-if=this < 0.0 help=Maximum boundary layer stabilisation scalar in linear model !kind=default -ns=namelist/Job/Timestepping/semi-implicit +ns=namelist/Linear/BoundaryLayer range=0.0: type=real @@ -49,7 +50,7 @@ description=?????? fail-if=this < 1 ; help=Number of boundary layers levels to stabilise in linear model !kind=default -ns=namelist/Job/Timestepping/semi-implicit +ns=namelist/Linear/BoundaryLayer range=1: type=integer @@ -61,20 +62,130 @@ help=This can be an analytical perturbation, random data or from a file. =The analytical perturbation is based on the DCMIP gravity wave test. =The random data is generated with the Fortran intrinsic function 'random_number'. =The file contains data produced from LFRic with horizontal winds in W2. -ns=namelist/Linear/Initial -sort-key=Panel-A07a +ns=namelist/Linear/Data value-titles=analytic, =random, =file, =zero values='analytic', 'random', 'file', 'zero' +[namelist:linear=transport_efficiency] +compulsory=true +description=Do not update the linearisation state during the transport step. +help=The linearisation state remains fixed. +!kind=default +ns=namelist/Linear/Efficiency +type=logical + +[namelist:linear_physics] +compulsory=true +description=Settings for TLM physics schemes. +ns=namelist/Linear/Physics +sort-key=Section-A07 +title=Linear Physics + +[namelist:linear_physics=blevs_m] +compulsory=true +description=Number of momentum boundary layer levels in TLM boundary layer scheme. +fail-if=this < 1 ; +help=Determines levels from surface upwards over which tl_bdy_lyr_alg is applied. +!kind=default +ns=namelist/Linear/Physics +range=1: +type=integer + +[namelist:linear_physics=e_folding_levs_m] +compulsory=true +description=e-folding level in TLM boundary layer scheme. +fail-if=this < 1 ; +help=Number of e-folding levels in exchange coefficient for momentum. +!kind=default +ns=namelist/Linear/Physics +range=1: +type=integer + +[namelist:linear_physics=l_0_m] +compulsory=true +description=Height parameter for TLM boundary layer scheme. +fail-if=this < 0.0 +help=Mixing length for momentum. +!kind=default +ns=namelist/Linear/Physics +range=0.0: +type=real + +[namelist:linear_physics=l_boundary_layer] +compulsory=true +description=Logical switch for TLM boundary layer scheme. +help=If true then turn on boundary layer in linear model and adjoint. +!kind=default +ns=namelist/Linear/Physics +sort-key=Panel-A00 +trigger=namelist:linear_physics=blevs_m: .true. ; + =namelist:linear_physics=l_0_m: .true. ; + =namelist:linear_physics=e_folding_levs_m: .true. ; + =namelist:linear_physics=log_layer: .true. ; + =namelist:linear_physics=u_land_m: .true. ; + =namelist:linear_physics=u_sea_m: .true. ; + =namelist:linear_physics=z_land_m: .true. ; + =namelist:linear_physics=z_sea_m: .true. ; +type=logical + +[namelist:linear_physics=log_layer] +compulsory=true +description=Number of levels in log layer in TLM boundary layer scheme. +fail-if=this < 1 ; +help=Number of levels in log layer in TLM boundary layer scheme. +!kind=default +ns=namelist/Linear/Physics +range=1: +type=integer + +[namelist:linear_physics=u_land_m] +compulsory=true +description=Land friction velocity in TLM boundary layer scheme. +fail-if=this < 0.0 +help=Friction velocity for momentum over land. +!kind=default +ns=namelist/Linear/Physics +range=0.0: +type=real + +[namelist:linear_physics=u_sea_m] +compulsory=true +description=Sea friction velocity in TLM boundary layer scheme. +fail-if=this < 0.0 +help=Friction velocity for momentum over sea. +!kind=default +ns=namelist/Linear/Physics +range=0.0: +type=real + +[namelist:linear_physics=z_land_m] +compulsory=true +description=Friction height over land in TLM boundary layer scheme. +fail-if=this < 0.0 +help=Effective roughness length for momentum over land. +!kind=default +ns=namelist/Linear/Physics +range=0.0: +type=real + +[namelist:linear_physics=z_sea_m] +compulsory=true +description=Friction height over sea in TLM boundary layer scheme. +fail-if=this < 0.0 +help=Effective roughness length for momentum over sea. +!kind=default +ns=namelist/Linear/Physics +range=0.0: +type=real + [namelist:validity_test] compulsory=true description=Provides settings for the tangent linear validity tests. help=The validity tests are performed using the integration test framework. ns=namelist/Linear/ValidityTest -sort-key=Section-A07 title=Validity Tests [namelist:validity_test=number_gamma_values] @@ -87,7 +198,6 @@ help=Gamma is the size of the perturbation used in the validity test. !kind=default ns=namelist/Linear/ValidityTest range=0: -sort-key=Panel-A07b type=integer [namelist:validity_test=update_ls_frequency] @@ -102,5 +212,4 @@ help=In the integration tests, when running over multiple timesteps, !kind=default ns=namelist/Linear/ValidityTest range=0: -sort-key=Panel-A07c type=integer diff --git a/science/linear/rose-meta/lfric-linear/versions.py b/science/linear/rose-meta/lfric-linear/versions.py index 8418438c1..1f13f98f0 100644 --- a/science/linear/rose-meta/lfric-linear/versions.py +++ b/science/linear/rose-meta/lfric-linear/versions.py @@ -21,13 +21,10 @@ def __repr__(self): """ Copy this template and complete to add your macro - class vnXX_txxx(MacroUpgrade): # Upgrade macro for by - BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" - def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -44,7 +41,6 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports @@ -124,5 +120,119 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) return config, self.reports diff --git a/science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 b/science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 new file mode 100644 index 000000000..f11d3a2b7 --- /dev/null +++ b/science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 @@ -0,0 +1,144 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Given TL state(igh_u) compute TLM boundary layer increment u_bl_inc +module tl_bdy_lyr_alg_mod + + use constants_mod, only: r_def + use field_collection_mod, only: field_collection_type + use integer_field_mod, only: integer_field_type + use driver_modeldb_mod, only: modeldb_type + use sci_geometric_constants_mod, only: get_height_fe, & + get_face_selector_ew, & + get_face_selector_ns + use sci_fem_constants_mod, only: get_rmultiplicity_fe + use field_mod, only: field_type + use linear_physics_config_mod, only: log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m + use derived_config_mod, only: bundle_size + use field_indices_mod, only: igh_d + use timing_mod, only: start_timing, stop_timing, tik, LPROF + use mesh_mod, only: mesh_type + use fs_continuity_mod, only: W2, W3, Wtheta + use tl_compute_qe_kernel_mod, only: tl_compute_qe_kernel_type + use tl_compute_aubu_kernel_mod, only: tl_compute_aubu_kernel_type + use tl_bl_inc_kernel_mod, only: tl_bl_inc_kernel_type + + implicit none + + private + public :: tl_bdy_lyr_alg + +contains + +!> @brief Given TL state(igh_u) compute TLM boundary layer increment u_bl_inc +!> @details The stages are: +!> 1. Call tl_compute_qe_kernel_type: from LS, compute coefficients Q, E +!> 2. Call tl_compute_aubu_kernel_type: from Q,E, compute coefficients Auv, Buv_inv +!> 3. Call tl_bl_inc_kernel_type: from state(igh_u) use coefficients Auv, Buv_inv to compute u_bl_inc +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!> The original code is at https://wwwspice/~frva/VAR/view/var-2022.12.2/doc/PF_bdy_lyr.html +!> @param[in,out] modeldb Structure containing the model state +!> @param[in,out] u_bl_inc TLM boundary layer increment +!> @param[in,out] u The current TL model prognostic u field, state(igh_u) +!> @param[in] ls_state Lin state for Prognostic model state +!> @param[in] dt The TL model timestep length +subroutine tl_bdy_lyr_alg(modeldb, u_bl_inc, u, ls_state, dt) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(field_type), intent(inout) :: u_bl_inc + type(field_type), intent(inout) :: u + type(field_type), target, intent(in) :: ls_state(bundle_size) + real(kind=r_def), intent(in) :: dt + + type(mesh_type), pointer :: mesh + type(field_type), pointer :: height_w2 + type(field_type), pointer :: height_w3 + type(field_type), pointer :: height_wth + type(field_type), pointer :: w2_rmultiplicity + type(integer_field_type), pointer :: face_selector_ew + type(integer_field_type), pointer :: face_selector_ns + + type(field_collection_type), pointer :: ls_fields + type(field_type), pointer :: ls_land_fraction + + ! Coefficients computed from linearisation state + type(field_type) :: Q + type(field_type) :: E + type(field_type) :: auv + type(field_type) :: buv_inv + + integer(kind=tik) :: id + + if (LPROF) call start_timing(id, 'tl_bdy_lyr_alg') + + ls_fields => modeldb%fields%get_field_collection('ls_fields') + call ls_fields%get_field('ls_land_fraction', ls_land_fraction) + + mesh => u%get_mesh() + height_w2 => get_height_fe(W2, mesh%get_id()) + height_w3 => get_height_fe(W3, mesh%get_id()) + height_wth => get_height_fe(Wtheta, mesh%get_id()) + + w2_rmultiplicity => get_rmultiplicity_fe(W2, mesh%get_id()) + + face_selector_ew => get_face_selector_ew(mesh%get_id()) + face_selector_ns => get_face_selector_ns(mesh%get_id()) + + call u%copy_field_properties(u_bl_inc) + call invoke(setval_c(u_bl_inc, 0.0_r_def)) + + call ls_state(igh_d)%copy_field_properties(Q) + call ls_state(igh_d)%copy_field_properties(E) + + call u%copy_field_properties(auv) + call u%copy_field_properties(buv_inv) + + call invoke(tl_compute_qe_kernel_type(Q, & + E, & + ls_state(igh_d), & + height_w3, & + height_wth, & + ls_land_fraction, & + log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m)) + + call invoke(tl_compute_aubu_kernel_type(auv, & + buv_inv, & + Q, & + E, & + height_w2, & + w2_rmultiplicity, & + dt, & + Blevs_m)) + + call invoke(tl_bl_inc_kernel_type(u_bl_inc, & + u, & + auv, & + buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m)) + + if (LPROF) call stop_timing(id, 'tl_bdy_lyr_alg') + +end subroutine tl_bdy_lyr_alg + +end module tl_bdy_lyr_alg_mod diff --git a/science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 b/science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 new file mode 100644 index 000000000..5289776ec --- /dev/null +++ b/science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 @@ -0,0 +1,135 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Wrapper for tangent linear physics code +module tl_physics_alg_mod + + use constants_mod, only: r_def + use driver_modeldb_mod, only: modeldb_type + use field_mod, only: field_type + use derived_config_mod, only: bundle_size + use field_indices_mod, only: igh_u + use timing_mod, only: start_timing, stop_timing, tik, LPROF + use mesh_mod, only: mesh_type + use fs_continuity_mod, only: W2 + use sci_geometric_constants_mod, only: get_da_at_w2 + use sci_fem_constants_mod, only: get_mass_matrix_fe + use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type + use matrix_vector_kernel_mod, only: matrix_vector_kernel_type + use tl_bdy_lyr_alg_mod, only: tl_bdy_lyr_alg + use sci_mass_matrix_solver_alg_mod, only: mass_matrix_solver_alg + use sci_field_bundle_builtins_mod, only: clone_bundle, copy_bundle, set_bundle_scalar + use operator_mod, only: operator_type + + implicit none + + private + public :: tl_physics_alg + +contains + +!> @brief Wrapper for tangent linear physics code, currently just tl_bdy_lyr_alg +!> @param[in,out] modeldb Structure containing the model state +!> @param[in,out] u The TL model u field to be incremented +!> @param[in,out] state_star TL model prognostic fields for physics calculations +!> @param[in,out] rhs_phys Residuals +!> @param[in] state The current TL model prognostic fields +!> @param[in] rhs_n Residuals +!> @param[in] rhs_np1 Residuals +!> @param[in] rhs_adv Advective terms +!> @param[in] ls_state Lin state for Prognostic model state +!> @param[in] mesh The current mesh +!> @param[in] dt The TL model timestep length +subroutine tl_physics_alg(modeldb, & + u, & + state_star, & + rhs_phys, & + rhs_np1, & + rhs_n, & + state, & + rhs_adv, & + ls_state, & + mesh, & + dt) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(field_type), intent(inout) :: u + type(field_type), intent(inout) :: state_star(bundle_size) + type(field_type), intent(inout) :: rhs_phys(bundle_size) + type(field_type), intent(in) :: state(bundle_size) + type(field_type), intent(in) :: rhs_n(bundle_size) + type(field_type), intent(in) :: rhs_np1(bundle_size) + type(field_type), intent(in) :: rhs_adv(bundle_size) + type(field_type), intent(in) :: ls_state(bundle_size) + type(mesh_type), pointer, intent(in) :: mesh + real(kind=r_def), intent(in) :: dt + + type(field_type) :: u_bl_inc + type(field_type) :: u_bl_inc_flux + type(field_type) :: du + type(field_type) :: u_star + type(field_type) :: u_star_physical + type(field_type) :: rhsu_np1 + + type(operator_type), pointer :: mm_vel + type(field_type), pointer :: dA + + integer(kind=tik) :: id + + if (LPROF) call start_timing(id, 'tl_physics_alg') + + mm_vel => get_mass_matrix_fe(W2, mesh%get_id()) + + ! Run linear boundary layer scheme to compute increment to u perturbation + + call u%copy_field_properties( u_bl_inc ) + call u%copy_field_properties( u_bl_inc_flux ) + call u%copy_field_properties( du ) + call u%copy_field_properties( u_star ) + call u%copy_field_properties( u_star_physical ) + call rhs_adv(igh_u)%copy_field_properties( rhsu_np1 ) + + ! Compute u_star = u_np1 + du + ! where du = M^-1(-rhs_np1 + rhs_n + rhs_a) + ! This mirrors the calc_phys_predictors_alg in gungho + call du%initialise( rhs_adv(igh_u)%get_function_space() ) + call rhsu_np1%initialise( rhs_adv(igh_u)%get_function_space() ) + call invoke( setval_c( du, 0.0_r_def ), & + aX_plus_Y( rhsu_np1, -1.0_r_def, rhs_np1(igh_u), rhs_n(igh_u) ), & + inc_X_plus_Y( rhsu_np1, rhs_adv(igh_u) ) ) + + call mass_matrix_solver_alg( du, rhsu_np1 ) + + call invoke( X_plus_Y( u_star, du, state(igh_u) ) ) + + ! u_star_physical = u_star / dA + ! i.e., divide u_star from boundary layer by dA to transform from flux to velocity + dA => get_da_at_w2(mesh%get_id()) + call invoke( x_divideby_y ( u_star_physical, u_star, dA ) ) + + ! For convenience place u_star_physical as igh_u component of state_star + call clone_bundle( state,state_star, bundle_size ) + call copy_bundle( state, state_star, bundle_size ) + call invoke( setval_x( state_star(igh_u), u_star_physical ) ) + + ! u_bl_inc computed from state_star(igh_u) + call tl_bdy_lyr_alg( modeldb, u_bl_inc, state_star(igh_u), ls_state, dt ) + + ! u_bl_inc_flux = u_bl_inc * dA + ! i.e., multiply by cell face area dA to transform from velocity to flux + call invoke( x_times_y( u_bl_inc_flux, u_bl_inc, dA ) ) + + call set_bundle_scalar( 0.0_r_def, rhs_phys, bundle_size ) + call invoke( name="update_rhs_phys_from_fast_physics", & + matrix_vector_kernel_type( rhs_phys(igh_u), u_bl_inc_flux, mm_vel ), & + enforce_bc_kernel_type( rhs_phys(igh_u) ) ) + + if (LPROF) call stop_timing(id, 'tl_physics_alg') + +end subroutine tl_physics_alg + +end module tl_physics_alg_mod diff --git a/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 b/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 index bfb52ec01..d912604f0 100644 --- a/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 +++ b/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 @@ -30,6 +30,7 @@ module tl_si_timestep_alg_mod l_stabilise_bl, & n_bl_levels_to_stabilise, & max_bl_stabilisation + use linear_physics_config_mod, only: l_boundary_layer use mixed_solver_config_mod, only: guess_np1, & reference_reset_time use timestepping_config_mod, only: alpha, & @@ -95,6 +96,8 @@ module tl_si_timestep_alg_mod use map_physics_fields_alg_mod, only: map_physics_fields_alg + use tl_physics_alg_mod, only: tl_physics_alg + ! Moisture species use mr_indices_mod, only: nummr, imr_v, imr_cl use moist_dyn_mod, only: num_moist_factors, gas_law @@ -121,6 +124,7 @@ module tl_si_timestep_alg_mod type( field_type ), allocatable :: state_initial(:) type( field_type ), allocatable :: state_n(:) type( field_type ), allocatable :: state_after_slow(:) + type( field_type ), allocatable :: state_star(:) type( field_type ), allocatable :: advected_state(:) type( field_type ), allocatable :: mr_n(:) type( field_type ), allocatable :: mr_inc(:) @@ -128,6 +132,7 @@ module tl_si_timestep_alg_mod type( field_type ), allocatable :: rhs_n(:) type( field_type ), allocatable :: rhs_np1(:) type( field_type ), allocatable :: rhs_adv(:) + type( field_type ), allocatable :: rhs_phys(:) ! Linearisation state type( field_type ), allocatable :: ls_state(:) @@ -218,10 +223,12 @@ contains allocate(state_initial(bundle_size)) allocate(state_n(bundle_size)) allocate(state_after_slow(bundle_size)) + allocate(state_star(bundle_size)) allocate(advected_state(bundle_size)) allocate(rhs_n(bundle_size)) allocate(rhs_np1(bundle_size)) allocate(rhs_adv(bundle_size)) + allocate(rhs_phys(bundle_size)) allocate(mr_n(nummr)) allocate(mr_after_slow(nummr)) allocate(mr_inc(nummr)) @@ -271,6 +278,7 @@ contains call clone_bundle(state, rhs_n, bundle_size) call clone_bundle(state, rhs_np1, bundle_size) call clone_bundle(state, rhs_adv, bundle_size) + call clone_bundle(state, rhs_phys, bundle_size) call clone_bundle(state, ls_state, bundle_size) call clone_bundle(state, ls_state_n, bundle_size) @@ -696,6 +704,8 @@ contains moist_dyn, ls_state_n, ls_moist_dyn_itns(:, 1,1), & .false., .false., model_clock=modeldb%clock ) + call invoke(setval_c( rhs_np1(igh_u), 0.0_r_def )) + call copy_bundle(state_after_slow, advected_state, bundle_size) if ( .not. si_momentum_equation ) then ! Predictor of the wind field (u-beta*dt*rhs) to be advected if using @@ -738,6 +748,38 @@ contains dg_inc_matrix_vector_kernel_type(rhs_adv(igh_t), & theta_fv_inc, mm_wt) ) + ! Previously tl_rhs_alg was called within each inner loop. + ! It still is called there for inner_iterations > 1. + ! For the first inner loop, it needs to be called before entering. + ! This is because rhs_np1 is used to calculate u_star in tl_bdy_lyr_alg. + if (use_wavedynamics) then + call tl_rhs_alg( rhs_np1, & + -varalpha*cast_dt, & + state, & + state, & + moist_dyn, & + ls_state_itns( :, ls_outer, 1 ), & + ls_moist_dyn_itns( :, ls_outer, 1 ), & + .true., & + dlayer_on, & + modeldb%clock ) + end if + + if (l_boundary_layer) then + ! Linear boundary layer scheme is currently the only linear physics scheme + call tl_physics_alg( modeldb, & + u, & + state_star, & + rhs_phys, & + rhs_np1, & + rhs_n, & + state, & + rhs_adv, & + ls_state_itns(:,ls_outer,1), & + mesh, & + cast_dt ) + end if ! l_boundary_layer + if (use_wavedynamics) then ! Use advective update to guess n+1 level scalar fieldsgv . @@ -761,16 +803,19 @@ contains !-------------------------------------------------------------------- ! Compute the time-level n+1 dynamics terms !-------------------------------------------------------------------- - call tl_rhs_alg(rhs_np1, & - -varalpha*cast_dt, & - state, & - state, & - moist_dyn, & - ls_state_itns(:, ls_outer, ls_inner), & - ls_moist_dyn_itns(:, ls_outer, ls_inner), & - .true., & - dlayer_on, & - modeldb%clock) + ! Only call tl_rhs_alg if inner > 1 as for inner===1 it is already called early (see comment above) + if (inner > 1) then + call tl_rhs_alg(rhs_np1, & + -varalpha*cast_dt, & + state, & + state, & + moist_dyn, & + ls_state_itns(:, ls_outer, ls_inner), & + ls_moist_dyn_itns(:, ls_outer, ls_inner), & + .true., & + dlayer_on, & + modeldb%clock) + end if !-------------------------------------------------------------------- ! Compute the LAM LBCs and RHS @@ -787,6 +832,7 @@ contains !-------------------------------------------------------------------- call bundle_axpy(-1.0_r_def, rhs_np1, rhs_n, rhs_np1, bundle_size) call add_bundle(rhs_np1, rhs_adv, rhs_np1, bundle_size) + if (l_boundary_layer) call add_bundle(rhs_np1, rhs_phys, rhs_np1, bundle_size) if ( limited_area ) then call log_event( "No limited area for Tangent linear", LOG_LEVEL_ERROR ) @@ -909,10 +955,12 @@ contains if (allocated(state_initial)) deallocate(state_initial) if (allocated(state_n)) deallocate(state_n) if (allocated(state_after_slow)) deallocate(state_after_slow) + if (allocated(state_star)) deallocate(state_star) if (allocated(advected_state)) deallocate(advected_state) if (allocated(rhs_n)) deallocate(rhs_n) if (allocated(rhs_np1)) deallocate(rhs_np1) if (allocated(rhs_adv)) deallocate(rhs_adv) + if (allocated(rhs_phys)) deallocate(rhs_phys) if (allocated(mr_n)) deallocate(mr_n) if (allocated(mr_after_slow)) deallocate(mr_after_slow) if (allocated(mr_inc)) deallocate(mr_inc) diff --git a/science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 b/science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 new file mode 100644 index 000000000..779dd5b5a --- /dev/null +++ b/science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 @@ -0,0 +1,333 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Tangent linear version of split_transport + +module tl_split_transport_mod + + use constants_mod, only: i_def, r_tran + use r_tran_field_mod, only: r_tran_field_type + use log_mod, only: log_event, LOG_LEVEL_ERROR + use split_transport_utils_mod, only: get_splitting_direction, & + get_splitting_fraction, & + get_num_split_steps + use split_transport_mod, only: split_transport_field + + ! Transport control infrastructure + use transport_controller_mod, only: transport_controller_type + use tl_transport_controller_mod, only: tl_transport_controller_type + use transport_counter_mod, only: transport_counter_type + use transport_enumerated_types_mod, only: direction_h, & + direction_v, & + split_method_null, & + split_method_mol, & + split_method_ffsl, & + split_method_sl, & + equation_form_conservative, & + equation_form_advective, & + equation_form_consistent + use transport_metadata_mod, only: transport_metadata_type + + ! Algorithms + use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg, & + end_of_consistent_step_alg, & + end_of_advective_step_alg + use linear_config_mod, only: transport_efficiency + + implicit none + + private + + public :: tl_split_transport_control + public :: tl_split_transport_field + +contains + + !============================================================================= + !> @brief Controls vertical/horizontal split transport. + !> @details Manages the vertical/horizontal splitting of the split transport + !! scheme by choosing the splitting type and calling the individual + !! vertical and horizontal split components. + !> @param[in,out] field_np1 ACTIVE Field to return at end + !> @param[in] field_n ACTIVE Field at the start + !> @param[in] ls_field_n PASSIVE LS Field at the start + !> @param[in,out] tl_transport_controller + !! Encapsulating object containing the + !! transport counter and precomputations + subroutine tl_split_transport_control(field_np1, field_n, ls_field_n, & + tl_transport_controller) + + implicit none + + ! Arguments + type(r_tran_field_type), intent(inout) :: field_np1 + type(r_tran_field_type), target, intent(in) :: field_n + type(r_tran_field_type), target, intent(in) :: ls_field_n + type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + + ! Internal variables + integer(kind=i_def) :: num_split_steps + integer(kind=i_def) :: split_step_count + type(r_tran_field_type), allocatable :: ls_field_np1(:) + type(r_tran_field_type), target :: field_tmp + type(r_tran_field_type), pointer :: field_ptr + type(transport_counter_type), pointer :: transport_counter + type(transport_counter_type), pointer :: ls_transport_counter + type(transport_metadata_type), pointer :: transport_metadata + type(transport_controller_type), pointer :: pert_transport_controller + type(transport_controller_type), pointer :: ls_transport_controller + real(kind=r_tran) :: dt_substep + integer(kind=i_def) :: num_substeps + + ! ------------------------------------------------------------------------ ! + ! NONLINEAR (LS) + ! ------------------------------------------------------------------------ ! + + ls_transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() + transport_metadata => ls_transport_controller%get_transport_metadata() + ls_transport_counter => ls_transport_controller%get_transport_counter() + + ! Initialise fields + num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) + allocate(ls_field_np1(num_split_steps + 1)) + do split_step_count = 1, num_split_steps + 1 + call field_n%copy_field_properties(ls_field_np1(split_step_count)) + end do + + if ( .not. transport_efficiency ) then + + ! When we have multiple split steps, we need an intermediate field for the + ! field at the start of each substep + ! field_ptr points to the field at the start of each split step + call invoke( setval_X(ls_field_np1(1), ls_field_n) ) + + if (num_split_steps > 1) then + call field_n%copy_field_properties(field_tmp) + call invoke( setval_X(field_tmp, ls_field_n) ) + field_ptr => field_tmp + else + field_ptr => ls_field_n + end if + + do split_step_count = 1, num_split_steps + call split_transport_field( ls_field_np1(split_step_count+1), & + field_ptr, & + ls_transport_controller & + ) + + if (split_step_count < num_split_steps) then + call invoke( setval_X(field_tmp, ls_field_np1(split_step_count+1) ) ) + + ! Increment split step counter + call ls_transport_counter%inc_split_step_counter() + end if + end do + + else + ! Assume that the linearisation state does not evolve during the split transport + do split_step_count = 1, num_split_steps + 1 + call invoke( setval_X(ls_field_np1(split_step_count), ls_field_n) ) + end do + end if + + dt_substep = ls_transport_counter%get_dt_substep() + num_substeps = ls_transport_counter%get_num_substeps() + call ls_transport_counter%initialise(transport_metadata, dt_substep, num_substeps ) + + ! ------------------------------------------------------------------------ ! + ! LINEAR + ! ------------------------------------------------------------------------ ! + + pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_metadata => pert_transport_controller%get_transport_metadata() + transport_counter => pert_transport_controller%get_transport_counter() + + ! Initialise fields + num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) + + ! When we have multiple split steps, we need an intermediate field for the + ! field at the start of each substeps + ! field_ptr points to the field at the start of each split step + if (num_split_steps > 1) then + call field_n%copy_field_properties(field_tmp) + call invoke( setval_X(field_tmp, field_n) ) + field_ptr => field_tmp + else + field_ptr => field_n + end if + + do split_step_count = 1, num_split_steps + + call tl_split_transport_field( & + field_np1, field_ptr, ls_field_np1(split_step_count), & + tl_transport_controller & + ) + + if (split_step_count < num_split_steps) then + call invoke( setval_X(field_tmp, field_np1 ) ) + + ! Increment split step counter + call transport_counter%inc_split_step_counter() + call ls_transport_counter%inc_split_step_counter() + end if + + end do + + deallocate( ls_field_np1 ) + + end subroutine tl_split_transport_control + + !============================================================================= + !> @brief Does either vertical or horizontal transport of a field. + !> @details Performs a vertical or horizontal transport step, solving the + !! transport equation for a (multidata) field. + !> @param[in,out] field_np1 ACTIVE Field to return at end + !> @param[in] field_n ACTIVE Field at the start + !> @param[in] ls_field_n PASSIVE Field at the start + !> @param[in,out] tl_transport_controller + !! Encapsulating object containing the + !! transport counter and precomputations + subroutine tl_split_transport_field(field_np1, field_n, ls_field_n, tl_transport_controller) + + use tl_mol_conservative_alg_mod, only: tl_mol_conservative_alg + use tl_mol_advective_alg_mod, only: tl_mol_advective_alg + + implicit none + + ! Arguments + type(r_tran_field_type), intent(inout) :: field_np1 + type(r_tran_field_type), intent(in) :: field_n + type(r_tran_field_type), intent(in) :: ls_field_n + type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + + ! Internal variables + integer(kind=i_def) :: method, direction + type(transport_counter_type), pointer :: transport_counter + type(transport_metadata_type), pointer :: transport_metadata + type(transport_controller_type), pointer :: pert_transport_controller + + pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_counter => pert_transport_controller%get_transport_counter() + transport_metadata => pert_transport_controller%get_transport_metadata() + + ! -------------------------------------------------------------------------! + ! Set up method based on direction + ! -------------------------------------------------------------------------! + direction = get_splitting_direction( & + transport_metadata%get_splitting(), & + transport_counter%get_split_step_of_substep_counter() & + ) + + select case ( direction ) + case ( direction_h ) + method = transport_metadata%get_horizontal_method() + case ( direction_v ) + method = transport_metadata%get_vertical_method() + case default + call log_event('Split transport direction not recognised', LOG_LEVEL_ERROR) + end select + + ! -------------------------------------------------------------------------! + ! Choose method, and then choose equation + ! -------------------------------------------------------------------------! + select case ( method ) + + ! -------------------------------------------------------------------------! + ! Null step + ! -------------------------------------------------------------------------! + case ( split_method_null ) + call log_event( & + 'TL: Split method null not coded', & + LOG_LEVEL_ERROR & + ) + + ! -------------------------------------------------------------------------! + ! Method of Lines step + ! -------------------------------------------------------------------------! + case ( split_method_mol ) + ! Choose form of transport equation + select case ( transport_metadata%get_equation_form() ) + case ( equation_form_conservative ) + call tl_mol_conservative_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller & + ) + case ( equation_form_advective ) + call tl_mol_advective_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller & + ) + case ( equation_form_consistent ) + call log_event( & + 'TL: MoL Consistent not coded yet', & + LOG_LEVEL_ERROR & + ) + case default + call log_event( & + 'Trying to solve unrecognised form of transport equation', & + LOG_LEVEL_ERROR & + ) + + end select + + ! -------------------------------------------------------------------------! + ! Flux-Form Semi-Lagrangian step + ! -------------------------------------------------------------------------! + case ( split_method_ffsl ) + ! All equation forms have the same control method + call log_event( & + 'TL: FFSL not coded yet', & + LOG_LEVEL_ERROR & + ) + ! -------------------------------------------------------------------------! + ! Semi-Lagrangian step + ! -------------------------------------------------------------------------! + case ( split_method_sl ) + ! Choose direction + select case ( direction ) + + case ( direction_h ) + ! Horizontal SL only for advective form + if ( transport_metadata%get_equation_form() /= equation_form_advective ) then + call log_event( & + 'Horizontal semi-Lagrangian is only for advective form', & + LOG_LEVEL_ERROR & + ) + end if + call log_event( & + 'TL: Horizontal SL not coded yet', & + LOG_LEVEL_ERROR & + ) + + case ( direction_v ) + ! Choose form of transport equation for vertical + select case ( transport_metadata%get_equation_form() ) + + case ( equation_form_conservative ) + call log_event( & + 'TL: Vertical SL conservative not coded yet', & + LOG_LEVEL_ERROR & + ) + case ( equation_form_advective ) + call log_event( & + 'TL: Vertical SL advective not coded yet', & + LOG_LEVEL_ERROR & + ) + case default + call log_event( & + 'Trying to solve unrecognised form of transport equation', & + LOG_LEVEL_ERROR & + ) + end select + end select + + case default + call log_event( & + 'Trying to transport with unrecognised scheme', & + LOG_LEVEL_ERROR & + ) + end select + + end subroutine tl_split_transport_field + +end module tl_split_transport_mod diff --git a/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 b/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 index 17016206a..5fd0a5b02 100644 --- a/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 +++ b/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 @@ -21,6 +21,7 @@ module tl_transport_field_mod equation_form_advective use tl_mol_conservative_alg_mod, only: tl_mol_conservative_alg use tl_mol_advective_alg_mod, only: tl_mol_advective_alg + use tl_split_transport_mod, only: tl_split_transport_control use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -121,10 +122,8 @@ subroutine tl_transport_field(field_np1, field_n, ls_field_n, & ! Some split horizontal/vertical transport scheme ! -------------------------------------------------------------------------! case ( scheme_split ) - call log_event( & - 'Split transport not implemented for tangent-linear app', & - LOG_LEVEL_ERROR & - ) + call tl_split_transport_control(field_np1, field_n, ls_field_n, & + tl_transport_controller) case default call log_event( & diff --git a/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 b/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 index a1a34919f..e85d71036 100644 --- a/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 +++ b/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 @@ -28,6 +28,7 @@ module tl_mol_advective_alg_mod ! Configuration use transport_config_mod, only: runge_kutta_method + use linear_config_mod, only: transport_efficiency implicit none @@ -58,7 +59,9 @@ contains ! Internal variables integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep + integer(kind=i_def) :: ls_nstage, ls_substep integer(kind=i_def) :: number_substeps + integer(kind=i_def) :: ls_stage, ls_number_substeps integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -73,7 +76,10 @@ contains type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata + type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter + type(transport_counter_type), pointer :: ls_transport_counter + type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller type(wind_precomputations_type), pointer :: ls_wind_precomputations @@ -83,10 +89,17 @@ contains ! Extract transport objects and initialise temporary fields ! ------------------------------------------------------------------------ ! mesh => field%get_mesh() + + transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_metadata => pert_transport_controller%get_transport_metadata() + ls_transport_metadata => transport_controller%get_transport_metadata() + transport_counter => pert_transport_controller%get_transport_counter() + ls_transport_counter => transport_controller%get_transport_counter() + ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -107,13 +120,23 @@ contains call field_n%initialise(field%get_function_space()) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) + + if (transport_efficiency) then + ls_number_substeps = 1 + ls_nstage =1 + else + ls_number_substeps = number_substeps + ls_nstage = nstage + end if allocate( rk_field(nstage) ) - allocate( stored_ls_field(number_substeps, nstage) ) + allocate( stored_ls_field(ls_number_substeps, ls_nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - do substep = 1, number_substeps - call stored_ls_field(substep, stage)%initialise(field%get_function_space()) + end do + do ls_stage = 1, ls_nstage + do ls_substep = 1, ls_number_substeps + call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -130,19 +153,23 @@ contains ! array for each substep and each RK stage to use in the perturbation !--------------------------------------------------------------------------! + if (transport_efficiency) then + call invoke( setval_X( stored_ls_field(1,1), ls_field_np1)) + else + ! Perform the number of rk-stages and substeps required - do substep = 1, number_substeps + do substep = 1, ls_number_substeps ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - do stage = 1, nstage + do stage = 1, ls_nstage ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state call invoke( setval_X(stored_ls_field(substep, stage), ls_field_np1) ) - final_rk_stage = ( stage == nstage ) + final_rk_stage = ( stage == ls_nstage ) ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) @@ -153,9 +180,9 @@ contains end do ! Compute update: rhs = u.grad(rhs_field) - call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & - ls_advecting_wind, direction, & - transport_metadata, final_rk_stage, & + call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & + ls_advecting_wind, direction, & + ls_transport_metadata, final_rk_stage, & dt_mol_substep, .false., .true. ) ! Update field: f = f^n - dt*rhs @@ -165,10 +192,12 @@ contains end do ! End of step: if necessary enforce min val and overwrite in blending zone - call end_of_advective_step_alg( & - ls_field_np1, ls_field_n, transport_counter, transport_metadata & + call end_of_advective_step_alg( & + ls_field_np1, ls_field_n, ls_transport_counter, ls_transport_metadata & ) + end if + ! -------------------------------------------------------------------------- ! Perturbation ! @@ -177,15 +206,28 @@ contains ! linearisation stage stage !--------------------------------------------------------------------------- + ! Perform the number of rk-stages and substeps required do substep = 1, number_substeps + if (transport_efficiency) then + ls_substep = 1 + else + ls_substep = substep + end if + ! Reset field_n ready for the this substep call field_np1%copy_field_properties(field_n) call invoke( setval_X(field_n, field_np1) ) do stage = 1, nstage + if (transport_efficiency) then + ls_stage = 1 + else + ls_stage = stage + end if + final_rk_stage = ( stage == nstage ) ! Compute the field for this stage: @@ -199,7 +241,7 @@ contains ! Compute update: rhs = u.grad(rhs_field) call tl_advective_and_flux_alg( & dummy, dummy, rhs, rhs_field, advecting_wind, & - stored_ls_field(substep, stage), ls_advecting_wind, & + stored_ls_field(ls_substep, ls_stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, dt_mol_substep, & .false., .true. & ) diff --git a/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 b/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 index f3a247f10..2b83dbe30 100644 --- a/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 +++ b/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 @@ -28,7 +28,7 @@ module tl_mol_conservative_alg_mod use runge_kutta_init_mod, only: get_rk_transport_weights use split_transport_utils_mod, only: get_num_split_steps, & get_splitting_direction - use transport_constants_mod, only: get_directional_im3_div + use transport_constants_mod, only: get_directional_im3_div_r_tran use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -43,6 +43,7 @@ module tl_mol_conservative_alg_mod ! Configuration use boundaries_config_mod, only: limited_area use base_mesh_config_mod, only: topology, topology_non_periodic + use linear_config_mod, only: transport_efficiency use transport_config_mod, only: runge_kutta_method, & dry_field_name, & operators, & @@ -79,6 +80,8 @@ module tl_mol_conservative_alg_mod integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep integer(kind=i_def) :: number_substeps + integer(kind=i_def) :: ls_nstage, ls_substep + integer(kind=i_def) :: ls_stage, ls_number_substeps integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -106,7 +109,9 @@ module tl_mol_conservative_alg_mod type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata + type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter + type(transport_counter_type), pointer :: ls_transport_counter type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller @@ -127,11 +132,18 @@ module tl_mol_conservative_alg_mod transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() + transport_metadata => pert_transport_controller%get_transport_metadata() + ls_transport_metadata => transport_controller%get_transport_metadata() + transport_counter => pert_transport_controller%get_transport_counter() + ls_transport_counter => transport_controller%get_transport_counter() + flux_precomputations => transport_controller%get_flux_precomputations() + ls_wind_flux_precomp => ls_transport_controller%get_flux_precomputations() pert_wind_flux_precomp => pert_transport_controller%get_flux_precomputations() + ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -147,16 +159,27 @@ module tl_mol_conservative_alg_mod dt_mol_substep = ls_wind_precomputations%get_dt_mol_substep( & mesh%get_id(), direction, splitting, step & ) - div => get_directional_im3_div(mesh_id, direction) + div => get_directional_im3_div_r_tran(mesh_id, direction) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) + + if (transport_efficiency) then + ls_number_substeps = 1 + ls_nstage = 1 + else + ls_number_substeps = number_substeps + ls_nstage = nstage + end if + allocate( rk_field(nstage) ) - allocate( stored_ls_field(number_substeps,nstage) ) + allocate( stored_ls_field(ls_number_substeps,ls_nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - do substep = 1, number_substeps - call stored_ls_field(substep, stage)%initialise(field%get_function_space()) + end do + do ls_stage = 1, ls_nstage + do ls_substep = 1, ls_number_substeps + call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -195,20 +218,23 @@ module tl_mol_conservative_alg_mod ! array for each substep and each RK stage to use in the perturbation ! ======================================================================== ! + if (transport_efficiency) then + call invoke( setval_X( stored_ls_field(1,1), ls_field_np1 ) ) + else ! ------------------------------------------------------------------------ ! ! Start of substepping loop ! ------------------------------------------------------------------------ ! - ls_substep_loop: do substep = 1, number_substeps + ls_substep_loop: do substep = 1, ls_number_substeps - final_substep = ( substep == number_substeps ) + final_substep = ( substep == ls_number_substeps ) ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - ls_stage_loop: do stage = 1, nstage + ls_stage_loop: do stage = 1, ls_nstage - final_rk_stage = ( stage == nstage ) + final_rk_stage = ( stage == ls_nstage ) ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state @@ -249,7 +275,7 @@ module tl_mol_conservative_alg_mod call advective_and_flux_alg(flux_step, adv_inc, rhs_field, ls_field_n, & ls_advecting_wind, direction, & - transport_metadata, final_rk_stage, & + ls_transport_metadata, final_rk_stage, & dt_mol_substep, do_flux, do_advective) if ( do_flux ) then @@ -292,9 +318,11 @@ module tl_mol_conservative_alg_mod ! increment, and may be adjusted to enforce min value or in blending zone call end_of_conservative_step_alg( & ls_field_np1, ls_field, ls_sum_flux, flux_precomputations, & - transport_counter, transport_metadata & + ls_transport_counter, ls_transport_metadata & ) + end if + ! ======================================================================== ! ! Perturbation ! @@ -308,6 +336,12 @@ module tl_mol_conservative_alg_mod ! ------------------------------------------------------------------------ ! substep_loop: do substep = 1, number_substeps + if (transport_efficiency) then + ls_substep = 1 + else + ls_substep = substep + end if + final_substep = ( substep == number_substeps ) ! Reset field_n ready for the this substep @@ -316,6 +350,12 @@ module tl_mol_conservative_alg_mod stage_loop: do stage = 1, nstage + if (transport_efficiency) then + ls_stage = 1 + else + ls_stage = stage + end if + final_rk_stage = ( stage == nstage ) ! Compute the field for this stage: @@ -353,7 +393,7 @@ module tl_mol_conservative_alg_mod call tl_advective_and_flux_alg( & flux_step_ls_wind, flux_step_pert_wind, adv_inc, & rhs_field, advecting_wind, & - stored_ls_field(substep,stage), ls_advecting_wind, & + stored_ls_field(ls_substep,ls_stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, & dt_mol_substep, do_flux, do_advective & ) diff --git a/science/linear/source/driver/linear_driver_mod.f90 b/science/linear/source/driver/linear_driver_mod.f90 index 662faea60..c7ac56319 100644 --- a/science/linear/source/driver/linear_driver_mod.f90 +++ b/science/linear/source/driver/linear_driver_mod.f90 @@ -174,7 +174,7 @@ subroutine initialise( program_name, modeldb ) end if ! Instantiate the linearisation state - call linear_create_ls( modeldb, mesh ) + call linear_create_ls( modeldb, mesh, twod_mesh) ! Initialise the fields stored in the model_data if ( init_option == init_option_fd_start_dump ) then diff --git a/science/linear/source/driver/linear_model_data_mod.f90 b/science/linear/source/driver/linear_model_data_mod.f90 index 95befc39f..00c78d8ff 100644 --- a/science/linear/source/driver/linear_model_data_mod.f90 +++ b/science/linear/source/driver/linear_model_data_mod.f90 @@ -39,6 +39,7 @@ module linear_model_data_mod pert_option_file, & pert_option_zero, & ls_read_w2h + use linear_physics_config_mod, only : l_boundary_layer use linked_list_mod, only : linked_list_type use log_mod, only : log_event, & log_scratch_space, & @@ -71,23 +72,24 @@ module linear_model_data_mod !> @param[inout] modeldb The working data set for a model run !> @param[in] mesh The current 3d mesh !> - subroutine linear_create_ls( modeldb, mesh ) + subroutine linear_create_ls( modeldb, mesh, twod_mesh ) implicit none type( modeldb_type ), target, intent(inout) :: modeldb type( mesh_type ), pointer, intent(in) :: mesh + type( mesh_type ), pointer, intent(in) :: twod_mesh select case( ls_option ) case( ls_option_analytic ) - call linear_create_ls_analytic( modeldb, mesh ) + call linear_create_ls_analytic( modeldb, mesh, twod_mesh ) case( ls_option_file ) - call linear_create_ls_file( modeldb, mesh ) + call linear_create_ls_file( modeldb, mesh, twod_mesh ) case default @@ -106,13 +108,14 @@ end subroutine linear_create_ls !> @param[inout] modeldb The working data set for a model run !> @param[in] mesh The current 3d mesh !> - subroutine linear_create_ls_analytic( modeldb, mesh ) + subroutine linear_create_ls_analytic( modeldb, mesh, twod_mesh ) implicit none type( modeldb_type ), target, intent(inout) :: modeldb type( mesh_type ), pointer, intent(in) :: mesh + type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), pointer :: depository type( field_collection_type ), pointer :: prognostics @@ -170,6 +173,10 @@ subroutine linear_create_ls_analytic( modeldb, mesh ) imr=imr ) end do + if (l_boundary_layer) & + call setup_field( ls_fields, depository, prognostics, "ls_land_fraction", W3, & + twod_mesh, checkpoint_restart_flag ) + end subroutine linear_create_ls_analytic !> @brief Create the fields in the ls fields field collection to be setup @@ -180,13 +187,14 @@ end subroutine linear_create_ls_analytic !> @param[inout] modeldb The working data set for a model run !> @param[in] mesh The current 3d mesh !> - subroutine linear_create_ls_file( modeldb, mesh ) + subroutine linear_create_ls_file( modeldb, mesh, twod_mesh ) implicit none type( modeldb_type ), target, intent(inout) :: modeldb type( mesh_type ), pointer, intent(in) :: mesh + type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), pointer :: depository type( field_collection_type ), pointer :: prognostics @@ -243,6 +251,10 @@ subroutine linear_create_ls_file( modeldb, mesh ) call setup_field( ls_fields, depository, prognostics, "ls_theta", Wtheta, & mesh, checkpoint_restart_flag, time_axis=ls_time_axis ) + if (l_boundary_layer) & + call setup_field( ls_fields, depository, prognostics, "ls_land_fraction", W3, & + twod_mesh, checkpoint_restart_flag, time_axis=ls_time_axis ) + if ( ls_read_w2h ) then call setup_field( ls_fields, depository, prognostics, "ls_h_u", W2h, & mesh, checkpoint_restart_flag, time_axis=ls_time_axis ) @@ -454,4 +466,4 @@ subroutine linear_init_pert( mesh, twod_mesh, modeldb ) end subroutine linear_init_pert -end module linear_model_data_mod \ No newline at end of file +end module linear_model_data_mod diff --git a/science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 b/science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 new file mode 100644 index 000000000..9141565c8 --- /dev/null +++ b/science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 @@ -0,0 +1,165 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Computes u_inc, the change in TLM velocity due to TLM boundary layer processes. +module tl_bl_inc_kernel_mod + + use argument_mod, only : arg_type, & + GH_FIELD, GH_OPERATOR, & + GH_SCALAR, GH_INTEGER, & + GH_READ, GH_INC, & + GH_REAL, CELL_COLUMN, & + ANY_DISCONTINUOUS_SPACE_1 + use constants_mod, only : r_def, i_def, r_um + use fs_continuity_mod, only : W1, W2, W3 + use kernel_mod, only : kernel_type + use reference_element_mod, only : N + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + + type, public, extends(kernel_type) :: tl_bl_inc_kernel_type + private + type(arg_type) :: meta_args(7) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! u_inc + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! u + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Auv + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Buv_inv + arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew + arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ns + arg_type(GH_SCALAR, GH_INTEGER, GH_READ ) & ! Blevs_m + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: tl_bl_inc_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: tl_bl_inc_code + +contains + +!> @brief Computes u_inc, the change in TLM velocity due to TLM boundary layer processes. +!> @details The algorithm uses coefficients Auv and Buv_inv computed in tl_compute_aubu_kernel_mod. +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!! @param[in] nlayers Number of layers +!! @param[in,out] u_inc Change in TLM velocity due to TLM boundary layer processes +!! @param[in] u TLM velocity +!! @param[in] nlayers Number of layers +!! @param[in] Auv Coefficient for TLM boundary layer +!! @param[in] Buv_inv Inverse of coefficient for TLM boundary layer +!! @param[in] face_selector_ew 2D field indicating which W/E faces to loop over in this column +!! @param[in] face_selector_ns 2D field indicating which N/S faces to loop over in this column +!! @param[in] Blevs_m Number of levels in momentum boundary layer +!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space +!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space +!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 +!! @param[in] ndf_w3_2d Number of DoFs for 2D W3 per cell +!! @param[in] undf_w3_2d Number of DoFs for this partition for 2D W3 +!! @param[in] map_w3_2d Map for 2D W3 +subroutine tl_bl_inc_code( nlayers, & + u_inc, & + u, & + Auv, & + Buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m, & + ndf_w2, undf_w2, map_w2, & + ndf_w3_2d, undf_w3_2d, map_w3_2d ) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 + real(kind=r_def), dimension(undf_w2), intent(inout) :: u_inc + integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 + real(kind=r_def), dimension(undf_w2), intent(in) :: u + real(kind=r_def), dimension(undf_w2), intent(in) :: Auv + real(kind=r_def), dimension(undf_w2), intent(in) :: Buv_inv + integer(kind=i_def), intent(in) :: ndf_w3_2d, undf_w3_2d + integer(kind=i_def), dimension(ndf_w3_2d), intent(in) :: map_w3_2d + integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ew + integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ns + integer(kind=i_def), intent(in) :: Blevs_m + + ! Internal variables + integer(kind=i_def) :: df, k, j + real(kind=r_def) :: a0(1:BLevs_m) ! Coefficient + real(kind=r_def) :: a1(1:BLevs_m) ! Coefficient + real(kind=r_def) :: a2(1:BLevs_m) ! Coefficient + real(kind=r_def) :: u_rhs(1:BLevs_m) ! Local perturbation velocity variable + real(kind=r_def) :: u_out(1:BLevs_m) ! Local perturbation velocity variable + real(kind=r_def) :: factor_u(1:BLevs_m) + + ! Loop over horizontal W2 DoFs whilst minimising double counting. + ! (Looping over all dofs would mean that faces are visited twice – for the cells on both sides. + ! So here the loop is only for a specific selection of dofs.) + do j = 1, face_selector_ew(map_w3_2d(1)) + face_selector_ns(map_w3_2d(1)) + + df = j + if (j == 3 .and. face_selector_ns(map_w3_2d(1)) == 2 .and. face_selector_ew(map_w3_2d(1)) == 1) df = N + + a0 = 0.0_r_def + a1 = 0.0_r_def + a2 = 0.0_r_def + u_rhs = 0.0_r_def + u_out = 0.0_r_def + factor_u = 0.0_r_def + + ! Set up coeffs a0, a1, a2, u_rhs + do k = 1, BLevs_m + if (k == 1) then + a0(1) = 1.0_r_def + (Auv(map_w2(df) + 1) + Auv(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) + a1(k) = -Auv(map_w2(df) + 1) / Buv_inv(map_w2(df) + 1) + u_rhs(1) = (Auv(map_w2(df) + 1) & + * (u(map_w2(df) + 1) - u(map_w2(df) + 0)) - Auv(map_w2(df) + 0) * u(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) + else if (k > 1 .and. k < BLevs_m) then + a0(k) = 1.0_r_def + (Auv(map_w2(df) + k) + Auv(map_w2(df) + k - 1)) / Buv_inv(map_w2(df) + k) + a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) + a1(k) = -Auv(map_w2(df) + k) / Buv_inv(map_w2(df) + k) + u_rhs(k) = (Auv(map_w2(df) + k) & + * (u(map_w2(df) + k) - u(map_w2(df) + k - 1)) & + - Auv(map_w2(df) + k - 1) * (u(map_w2(df) + k - 1) - u(map_w2(df) + k - 2))) / Buv_inv(map_w2(df) + k) + else + a0(k) = 1.0_r_def + Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) + a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) + u_rhs(k) = -(Auv(map_w2(df) + k - 1) * (u(map_w2(df) + k - 1) - u(map_w2(df) + k - 2))) / Buv_inv(map_w2(df) + k) + end if + end do + + ! Transform to upper triangular form + do k = 1, BLevs_m + if (k == 1) then + a0(1) = 1.0_r_def / a0(1) + else + factor_u(k) = a2(k) * a0(k - 1) + a0(k) = 1.0_r_def / (a0(k) - factor_u(k) * a1(k - 1)) + u_rhs(k) = u_rhs(k) - factor_u(k) * u_rhs(k - 1) + end if + end do + + ! Solve for u_inc + u_out(BLevs_m) = a0(BLevs_m) * u_rhs(BLevs_m) + u_inc(map_w2(df) + BLevs_m - 1) = u_out(BLevs_m) + do k = BLevs_m - 1, 1, -1 + u_out(k) = a0(k) * (u_rhs(k) - a1(k) * u_out(k + 1)) + u_inc(map_w2(df) + k - 1) = u_out(k) + end do + + end do ! Loop over horizontal W2 DoFs + +end subroutine tl_bl_inc_code + +end module tl_bl_inc_kernel_mod diff --git a/science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 b/science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 new file mode 100644 index 000000000..1f16f4b81 --- /dev/null +++ b/science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 @@ -0,0 +1,117 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Computes coefficients Auv and Buv_inv used in the TLM boundary layer scheme for momentum. +module tl_compute_aubu_kernel_mod + + use argument_mod, only : arg_type, func_type, & + GH_FIELD, GH_OPERATOR, & + GH_SCALAR, GH_INTEGER, & + GH_READ, GH_INC, GH_READWRITE, & + GH_REAL, CELL_COLUMN, GH_BASIS, GH_EVALUATOR, & + ANY_DISCONTINUOUS_SPACE_1 + use constants_mod, only : r_def, i_def, r_um + use fs_continuity_mod, only : W1, W2, W3 + use kernel_mod, only : kernel_type + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + type, public, extends(kernel_type) :: tl_compute_aubu_kernel_type + private + type(arg_type) :: meta_args(8) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! Auv + arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! Buv_inv + arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! Q + arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! E + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! height_w2 + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! w2_rmultiplicity + arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! dt + arg_type(GH_SCALAR, GH_INTEGER, GH_READ ) & ! Blevs_m + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: tl_compute_aubu_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: tl_compute_aubu_code + +contains + +!> @brief Computes coefficients Auv and Buv_inv used in the TLM boundary layer scheme for momentum. +!> @details Auv and Buv_inv are derived from coefficients Q and E which are computed in tl_compute_qe_kernel_mod. +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!! @param[in] nlayers Number of layers +!! @param[in,out] Auv Coefficient for TLM boundary layer +!! @param[in,out] Buv_inv Inverse of coefficient for TLM boundary layer +!! @param[in] Q Coefficient for TLM boundary layer +!! @param[in] E Coefficient for TLM boundary layer +!! @param[in] height_w2 Height of w2 space levels above the surface +!! @param[in] w2_rmultiplicity Reciprocal of multiplicity for W2 +!! @param[in] dt TLM time step +!! @param[in] Blevs_m Number of levels in momentum boundary layer +!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space +!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space +!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 +!! @param[in] ndf_w3 Number of degrees of freedom per cell for w3 space +!! @param[in] undf_w3 Number of unique degrees of freedom for w3 space +!! @param[in] map_w3 Dofmap for the cell at column base for w3 +subroutine tl_compute_aubu_code( nlayers, & + Auv, & + Buv_inv, & + Q, & + E, & + height_w2, & + w2_rmultiplicity, & + dt, & + Blevs_m, & + ndf_w2, undf_w2, map_w2, & + ndf_w3, undf_w3, map_w3) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 + integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 + integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 + integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 + real(kind=r_def), dimension(undf_w2), intent(in) :: w2_rmultiplicity + real(kind=r_def), dimension(undf_w2), intent(inout) :: Auv !(0:BLevs_m) + real(kind=r_def), dimension(undf_w2), intent(inout) :: Buv_inv ! Use inverse of Buv as this is what is averaged + real(kind=r_def), dimension(undf_w3), intent(in) :: Q ! (0:BLevs_m) + real(kind=r_def), dimension(undf_w3), intent(in) :: E ! (BLevs_m) + real(kind=r_def), dimension(undf_w2), intent(in) :: height_w2 + real(kind=r_def), intent(in) :: dt + integer(kind=i_def), intent(in) :: Blevs_m + + ! Internal variables + integer(kind=i_def) :: df, df3, k + + df3 = 1 + + do df = 1, 4 + do k = 0, BLevs_m + if (k == 0) then + Auv(map_w2(df) + k) = w2_rmultiplicity(map_w2(df)) * Q(map_w3(df3)) + else ! 1 <= k <= BLevs_m + Auv(map_w2(df) + k) = & + w2_rmultiplicity(map_w2(df) + k) * Q(map_w3(df3) + k) / (height_w2(map_w2(df) + k) - height_w2(map_w2(df) + k - 1)) + Buv_inv(map_w2(df) + k) = ( w2_rmultiplicity(map_w2(df) + k) * E(map_w3(df3) + k) ) / dt + end if + end do ! k = 0, BLevs_m + end do ! df = 1, 4 + +end subroutine tl_compute_aubu_code + +end module tl_compute_aubu_kernel_mod diff --git a/science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 b/science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 new file mode 100644 index 000000000..89c6a7710 --- /dev/null +++ b/science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 @@ -0,0 +1,179 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Computes coefficients Q and E used in the TLM boundary layer scheme for momentum. +module tl_compute_qe_kernel_mod + + use argument_mod, only : arg_type, func_type, & + GH_FIELD, GH_OPERATOR, & + GH_SCALAR, GH_INTEGER, & + GH_READ, GH_INC, GH_READWRITE, & + GH_REAL, CELL_COLUMN, GH_BASIS, GH_EVALUATOR, & + ANY_DISCONTINUOUS_SPACE_1 + use constants_mod, only : r_def, i_def, r_um + use fs_continuity_mod, only : W1, W2, W3, Wtheta + use kernel_mod, only : kernel_type + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + type, public, extends(kernel_type) :: tl_compute_qe_kernel_type + private + type(arg_type) :: meta_args(14) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_READWRITE, W3), & ! Q + arg_type(GH_FIELD, GH_REAL, GH_READWRITE, W3), & ! E + arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! ls_rho + arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! height_w3 + arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & ! height_wth + arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1 ), & ! ls_land_fraction + arg_type(GH_SCALAR, GH_INTEGER, GH_READ ), & ! log_layer + arg_type(GH_SCALAR, GH_INTEGER, GH_READ ), & ! Blevs_m + arg_type(GH_SCALAR, GH_INTEGER, GH_READ ), & ! e_folding_levs_m + arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! u_land_m + arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! u_sea_m + arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! z_land_m + arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! z_sea_m + arg_type(GH_SCALAR, GH_REAL, GH_READ ) & ! L_0_m + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: tl_compute_qe_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: tl_compute_qe_code + +contains + +!> @brief Computes coefficients Q and E used in the TLM boundary layer scheme for momentum. +!> @details The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!! @param[in] nlayers Number of layers +!! @param[in,out] Q Coefficient for TLM boundary layer +!! @param[in,out] E Coefficient for TLM boundary layer +!! @param[in] ls_rho Linearisation state for density +!! @param[in] height_w3 Height of w3 space levels above the surface +!! @param[in] height_wth Height of wth space levels above surface +!! @param[in] ls_land_fraction Land area fraction +!! @param[in] log_layer Number of levels in log layer +!! @param[in] Blevs_m Number of levels in momentum boundary layer +!! @param[in] e_folding_levs_m e-folding level in exchange coefficient for momemtum +!! @param[in] z_land_m Effective roughness length for momemtum over land +!! @param[in] z_sea_m Effective roughness length for momemtum over sea +!! @param[in] u_land_m Friction velocity for momemtum over land +!! @param[in] u_sea_m Friction velocity for momemtum over sea +!! @param[in] L_0_m Mixing length for momemtum +!! @param[in] ndf_w3 Number of degrees of freedom per cell for w3 space +!! @param[in] undf_w3 Number of unique degrees of freedom for w3 space +!! @param[in] map_w3 Dofmap for the cell at column base for w3 +!! @param[in] ndf_wtheta Number of degrees of freedom per cell for wtheta space +!! @param[in] undf_wtheta Number of unique degrees of freedom for wtheta space +!! @param[in] map_wtheta Dofmap for the cell at the base of the column for wtheta +!! @param[in] ndf_2d Number of degrees of freedom per cell for 2D field +!! @param[in] undf_2d Number of unique degrees of freedom for 2D field +!! @param[in] map_2d Dofmap for 2D field +subroutine tl_compute_qe_code( nlayers, & + Q, & + E, & + ls_rho, & + height_w3, & + height_wth, & + ls_land_fraction, & + log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m, & + ndf_w3, undf_w3, map_w3, & + ndf_wtheta, undf_wtheta, map_wtheta, & + ndf_2d, undf_2d, map_2d ) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 + integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 + integer(kind=i_def), intent(in) :: undf_wtheta, ndf_wtheta + integer(kind=i_def), dimension(ndf_wtheta), intent(in) :: map_wtheta + integer(kind=i_def), intent(in) :: undf_2d, ndf_2d + integer(kind=i_def), dimension(ndf_2d), intent(in) :: map_2d + real(kind=r_def), dimension(undf_w3), intent(inout) :: Q ! (0:BLevs_m) + real(kind=r_def), dimension(undf_w3), intent(inout) :: E ! (BLevs_m) + real(kind=r_def), dimension(undf_w3), intent(in) :: ls_rho + real(kind=r_def), dimension(undf_w3), intent(in) :: height_w3 + real(kind=r_def), dimension(undf_wtheta), intent(in) :: height_wth + real(kind=r_def), dimension(undf_2d), intent(in) :: ls_land_fraction + integer(kind=i_def), intent(in) :: log_layer,Blevs_m,e_folding_levs_m + real(kind=r_def), intent(in) :: u_land_m, u_sea_m, z_land_m, z_sea_m, L_0_m + + ! Internal variables + integer(kind=i_def) :: df, k + real(kind=r_def) :: roughness_length_m + real(kind=r_def), parameter :: Von_Karman = 0.4_r_def + real(kind=r_def) :: L_diff_m(1:BLevs_m) + real(kind=r_def) :: u1 + real(kind=r_def) :: num + real(kind=r_def) :: denom + + df = 1 ! map_w3 only has range 1:1, map_wtheta has range 1:2 with 1 being lower face of cell + roughness_length_m = z_land_m * ls_land_fraction(map_2d(df)) + z_sea_m * (1.0_r_def - ls_land_fraction(map_2d(df))) + + ! Define the mixing length, L_diff + ! L_diff is on centre of horizontal faces - for convenience indexed by centre of cell above. + ! Vertical numbering (k index) matches that in old Var schemePF_bdy_lyr.f90 (see link above), + ! in which centre of lowest cell is rho level 1 (allowing for the fact that the PF model is for New Dynamics, + ! which has an extra rho level which means that W3 k=0 in LFRic is equivalent to rho levels k=1 in VAR). + ! L_diff_m(k) defined for 1 <= k <= BLevs_m. + do k = 1, BLevs_m + if (k <= Log_layer) then + ! num and denom to take log of + num = height_w3(map_w3(df) + k) - height_wth(map_wtheta(df)) + roughness_length_m + denom = height_w3(map_w3(df) + k - 1) - height_wth(map_wtheta(df)) + roughness_length_m + ! num and denom of final expression + denom = log(num / denom) + Von_Karman * (height_w3(map_w3(df) + k) - height_w3(map_w3(df) + k - 1)) / L_0_m + num = (height_w3(map_w3(df) + k) - height_w3(map_w3(df) + k - 1)) + else + num = height_wth(map_wtheta(df) + k) - height_wth(map_wtheta(df)) + roughness_length_m + denom = 1.0_r_def + (height_wth(map_wtheta(df) + k) - height_wth(map_wtheta(df)) + roughness_length_m) / L_0_m + end if + L_diff_m(k) = Von_Karman * num / denom + end do + + ! Define Q and E + ! E is on cell centres + ! Q is on centre of horizontal faces - for convenience indexed by centre of cell above + ! Q(k) defined for 0 <= k <= BLevs_m + ! E(k) defined for 1 <= k <= BLevs_m + u1 = u_land_m * ls_land_fraction(map_2d(df)) + u_sea_m * (1.0_r_def - ls_land_fraction(map_2d(df))) + do k = 0, BLevs_m + if (k == 0) then + ! num and denom to take log of + num = height_w3(map_w3(df) + 0) - height_wth(map_wtheta(df) + 0) + roughness_length_m + denom = roughness_length_m + ! num and denom of final expression + denom = log(num / denom) + num = Von_Karman * u1 + Q(map_w3(df) + k) = num / denom + else ! i.e., k >= 1 + num = height_wth(map_wtheta(df)) - height_wth(map_wtheta(df) + k) + denom = height_wth(map_wtheta(df) + e_folding_levs_m) - height_wth(map_wtheta(df)) + Q(map_w3(df) + k) = L_diff_m(k) * u1 * exp(num / denom) + E(map_w3(df) + k) = ls_rho(map_w3(df) + k - 1) * (height_wth(map_wtheta(df) + k) - height_wth(map_wtheta(df) + k - 1)) + end if + end do + +end subroutine tl_compute_qe_code + +end module tl_compute_qe_kernel_mod diff --git a/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 b/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 index af0136c06..557125c8a 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 @@ -46,7 +46,7 @@ subroutine bdy_expl2 ( & ! in cloud/moisture data : cf_bulk,q,qcf,qcl,t,qw,tl, & ! in everything not covered so far : - rad_hr,micro_tends,fb_surf,u_s,pstar,tstar,h_blend_orog, & + rad_hr,micro_tends,fb_surf,u_s,pstar,tstar, & zh_prev,zhpar,z_lcl,ho2r2_orog,sd_orog,wtrac_as, & ! 2 in 3 INOUT for Smagorinsky delta_smag, max_diff, rneutml_sq, visc_m, visc_h, & @@ -77,11 +77,11 @@ subroutine bdy_expl2 ( & off, max_t_grad, a_grad_adj, sg_orog_mixing, l_use_surf_in_ri, & h_scale, t_drain, idyndiag, DynDiag_ZL, l_noice_in_turb, & DynDiag_ZL_corrn, DynDiag_ZL_CuOnly, DynDiag_Ribased, & - RiCrit_sharp, zhloc_depth_fac, non_local_bl, on, l_full_lambdas, & + RiCrit_sharp, zhloc_depth_fac, non_local_bl, on, & nl_bl_levels, local_fa, free_trop_layers, to_sharp_across_1km, & sbl_op, equilibrium_sbl, one_third, two_thirds, blending_option, & blend_except_cu, blend_cth_shcu_only, sg_shear, sg_shear_enh_lambda, & - max_tke, var_diags_opt, original_vars, split_tke_and_inv, tke_diag_fac, & + max_tke, tke_diag_fac, & i_interp_local, i_interp_local_gradients, i_interp_local_cf_dbdz, & shallow_cu_maxtop, sc_cftol, near_neut_z_on_l, zero, one, one_half use cloud_inputs_mod, only: i_rhcpt, forced_cu, i_cld_vn, i_pc2_init_method, & @@ -257,9 +257,6 @@ subroutine bdy_expl2 ( & ! in Surface pressure (Pascals). tstar(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & ! in Surface temperature (K). - h_blend_orog(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & - ! in Blending height used as part - ! of effective roughness scheme zh_prev(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & ! in boundary layer height from ! previous timestep @@ -808,12 +805,9 @@ subroutine bdy_expl2 ( & real(kind=r_bl), parameter :: max_abs_obkhov = 1.0e6_r_bl ! Maximum permitted magnitude of the Obukhov ! length (m). -real(kind=r_bl), parameter :: small_sh = 0.01_r_bl - ! Minimum value of sh used in - ! original_vars variance diagnostics real(kind=r_bl), parameter :: small_tke = 1.0e-6_r_bl ! Minimum required value of TKE before - ! split_tke_and_inv variance diagnostics are calculated + ! variance diagnostics are calculated real(kind=r_bl), parameter :: max_ri = 0.01_r_bl*sqrt(huge(one)) ! Maximum (absolute) Richardson number which ensures that ! the stability functions (~ri^2) remain real-valued at @@ -957,11 +951,10 @@ subroutine bdy_expl2 ( & ! heterogeneous land surface this is poorly defined and we can't use Rib ! from the surface scheme as vertically averaging Ri is numerically ! unstable. So, over land, only the average temperature gradient is used -if ( .not. l_use_surf_in_ri .and. (var_diags_opt > original_vars .or. & - i_interp_local == i_interp_local_cf_dbdz ) ) then +if (.not. l_use_surf_in_ri) then ! if not using surface variables in Ri (l_use_surf_in_ri=false) we - ! extrapolate dbdz itself from level 2, but the sl and qw gradients are - ! used in the newer variance calculations and with i_interp_local_cf_dbdz + ! extrapolate dbdz itself from level 2, with the sl and qw gradients being + ! used in the variance calculations and with i_interp_local_cf_dbdz ! so extrapolate them here !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end @@ -2002,11 +1995,10 @@ subroutine bdy_expl2 ( & !----------------------------------------------------------------------- call ex_coef ( & ! in levels/logicals - bl_levels,k_log_layr,nSCMDpkgs,L_SCMDiags,BL_diag, & + bl_levels,k_log_layr,BL_diag, & ! in fields - sigma_h,flandg,dbdz,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m_eff_gb, & - h_blend_orog,zhpar,ntpar,ntml_nl,ntdsc,nbdsc,u_p,v_p,u_s,fb_surf, & - qw,tl,l_shallow_cth,rmlmax2, rneutml_sq, delta_smag, & + sigma_h,flandg,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m_eff_gb,zhpar,ntpar, & + ntml_nl,ntdsc,nbdsc,l_shallow_cth,rmlmax2,rneutml_sq,delta_smag, & ! in/out fields cumulus,weight_1dbl, & ! out fields @@ -2067,27 +2059,6 @@ subroutine bdy_expl2 ( & ! Include mixing length, ELH, in RHOKH. ! Code moved from EX_COEF to avoid interpolation !------------------------------------------------------------ - if ( k >= ntml_local(i,j)+2 .and. l_full_lambdas .and. & - local_fa == to_sharp_across_1km ) then - ! Assuming only LOCAL_FA = "to_sharp_across_1km" option - ! will have L_FULL_LAMBDAS. - ! If other LOCAL_FA options are coded here then - ! changes must be included in section 2.1 of ex_coef - if (l_rp2) then - lambdah = max ( lambda_min , & - par_mezcla_rp(rp_idx)*zh_local(i,j) ) - else - lambdah = max ( lambda_min , 0.15_r_bl*zh_local(i,j) ) - end if - z_scale = 1000.0_r_bl - weight1 = one_half*( one - & - tanh(3.0_r_bl*((z_uv(i,j,k)/z_scale )-one) ) ) - lambdah = lambdah * weight1 & - + lambda_min*( one - weight1) - ! no need to do log profile correction as klog_layr eq 2 - vkz = vkman * ( z_uv(i,j,k) + z0m_eff_gb(i,j) ) - elh_rho(i,j,k) = vkz / (one + vkz/lambdah ) - end if ! Reinstate UKV drainage flow bug here, where lambdah was not ! enhanced as intended (and as was done in ex_coef)! if (sg_orog_mixing == sg_shear_enh_lambda) then @@ -2097,7 +2068,7 @@ subroutine bdy_expl2 ( & else lambdah = max ( lambda_min , 0.15_r_bl*zh_local(i,j) ) end if - if (k >= ntml_local(i,j)+2 .and. .not. l_full_lambdas) then + if (k >= ntml_local(i,j)+2) then lambdah = lambda_min end if if (k <= k_log_layr) then @@ -2226,65 +2197,37 @@ subroutine bdy_expl2 ( & ! function of ustar, wstar) but is currently just set to zero if (BL_diag%l_tke) then - if (var_diags_opt == original_vars) then - ! BL_diag%tke currently contains (the reciprocal of) the non-local - ! (SML and DSC) mixed layer timescale, calculated in excf_nl - -!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & -!$OMP SHARED(BL_diag, rho_wet_tq, rhokm, dbdz, bl_levels, pdims) & -!$OMP private(i, j, k, recip_time_sbl, recip_time_cbl) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - - ! stable timescale - recip_time_sbl = sqrt( max(dbdz(i,j,k),1.0e-5_r_bl) )/0.7_r_bl - recip_time_cbl = BL_diag%tke(i,j,k) - - ! TKE diagnostic - taking 5 m2/s2 as a suitable maximum - BL_diag%tke(i,j,k)= min( max_tke, & - ( rhokm(i,j,k) / rho_wet_tq(i,j,k-1) )*( & - recip_time_cbl + recip_time_sbl ) ) - - end do - end do - end do -!$OMP end PARALLEL do - - else if (var_diags_opt == split_tke_and_inv) then - ! Combine the, separately calculated, local and non-local TKE diagnostics + ! Combine the, separately calculated, local and non-local TKE diagnostics !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & !$OMP SHARED(BL_diag, tke_nl, tke_loc, rho_wet_tq, weight_1dbl, & !$OMP tke_diag_fac, bl_levels, pdims) & !$OMP private(i, j, k) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end - ! TKE diagnostic - ! Currently tke_nl is strictly rho*sigma_w^2 while tke_loc is TKE - ! Assume isotropic turb so TKE_nl = 3/2 sigma_w^2 - tke_nl(i,j,k) = weight_1dbl(i,j,k) * 1.5_r_bl * & - tke_nl(i,j,k)/rho_wet_tq(i,j,k-1) - BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,k) ) + ! TKE diagnostic + ! Currently tke_nl is strictly rho*sigma_w^2 while tke_loc is TKE + ! Assume isotropic turb so TKE_nl = 3/2 sigma_w^2 + tke_nl(i,j,k) = weight_1dbl(i,j,k) * 1.5_r_bl * & + tke_nl(i,j,k)/rho_wet_tq(i,j,k-1) + BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,k) ) - ! Multiply by tuning factor - BL_diag%tke(i,j,k) = tke_diag_fac * BL_diag%tke(i,j,k) + ! Multiply by tuning factor + BL_diag%tke(i,j,k) = tke_diag_fac * BL_diag%tke(i,j,k) - ! Keep TKE below a sensible max value of max_tke - BL_diag%tke(i,j,k) = min( max_tke, BL_diag%tke(i,j,k) ) - ! Applying this limit can occasionally cause the length-scale - ! Km / sqrt(w_var) to become unrealistically large, since no - ! equivalent limiting is done on Km. + ! Keep TKE below a sensible max value of max_tke + BL_diag%tke(i,j,k) = min( max_tke, BL_diag%tke(i,j,k) ) + ! Applying this limit can occasionally cause the length-scale + ! Km / sqrt(w_var) to become unrealistically large, since no + ! equivalent limiting is done on Km. - end do end do end do + end do !$OMP end PARALLEL do - end if ! var_diags_opt - if ( i_bm_ez_opt == i_bm_ez_entpar ) then ! Calculate mixing-length to pass to bimodal cloud scheme, ! using Km and TKE. @@ -2362,7 +2305,7 @@ subroutine bdy_expl2 ( & ! to the microphysics turbulence call !$OMP PARALLEL DEFAULT(none) private(k,j,i) & -!$OMP SHARED(tdims, bl_levels,pdims,BL_diag,bl_w_var,var_diags_opt) +!$OMP SHARED(tdims, bl_levels,pdims,BL_diag,bl_w_var) !$OMP do SCHEDULE(STATIC) do k = 2, tdims%k_end+1 @@ -2374,73 +2317,41 @@ subroutine bdy_expl2 ( & end do !$OMP end do - if (var_diags_opt == original_vars) then - ! Original version: w_var = TKE + ! w_var = 2/3 TKE !$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if (BL_diag%tke(i,j,k) > 1.0e-12_r_bl) then - bl_w_var(i,j,k) = BL_diag%tke(i,j,k) - end if - end do - end do - end do -!$OMP end do - else if (var_diags_opt == split_tke_and_inv) then - ! Improved version: w_var = 2/3 TKE -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if (BL_diag%tke(i,j,k) > 1.0e-12_r_bl) then - bl_w_var(i,j,k) = two_thirds * BL_diag%tke(i,j,k) - end if - end do + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (BL_diag%tke(i,j,k) > 1.0e-12_r_bl) then + bl_w_var(i,j,k) = two_thirds * BL_diag%tke(i,j,k) + end if end do end do + end do !$OMP end do - end if ! test on var_diags_opt !$OMP end PARALLEL end if ! l_subgrid_qcl_mp .or. l_wvar_for_conv - if (var_diags_opt == original_vars) then - ! at this point, BL_diag%tke really contains 1.5*sigma_w^2. To make it look - ! a bit more like TKE near the surface, we will keep it constant below - ! the max of rhokm_surf -!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & -!$OMP SHARED( pdims, rhokmz, BL_diag ) private(i, j, k, kmax ) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - kmax = maxloc(rhokmz(i,j,:), dim=1) - do k = 2, kmax - BL_diag%tke(i,j,k) = BL_diag%tke(i,j,kmax) - end do - end do - end do -!$OMP end PARALLEL do - else if (var_diags_opt == split_tke_and_inv) then - ! at this point, tke_nl really contained 1.5*sigma_w^2. To make it look - ! a bit more like TKE near the surface, we will keep it constant below - ! the max of rhokm_surf (here we find the first local maximum in case there - ! is a larger rhokmz in a resolved inversion + ! At this point, tke_nl really contained 1.5*sigma_w^2. To make it look + ! a bit more like TKE near the surface, we will keep it constant below + ! the max of rhokm_surf (here we find the first local maximum in case there + ! is a larger rhokmz in a resolved inversion !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & !$OMP SHARED( pdims, bl_levels, rhokmz, BL_diag, tke_loc, tke_nl ) & !$OMP private(i, j, k, kp) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - kp=2 - do while ( rhokmz(i,j,kp+1) > rhokmz(i,j,kp) .and. kp < bl_levels ) - kp = kp +1 - end do - do k = 2, kp-1 - BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,kp) ) - end do + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + kp=2 + do while ( rhokmz(i,j,kp+1) > rhokmz(i,j,kp) .and. kp < bl_levels ) + kp = kp +1 + end do + do k = 2, kp-1 + BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,kp) ) end do end do + end do !$OMP end PARALLEL do - end if ! test on var_diags_opt end if ! BL_diag%L_tke @@ -2915,14 +2826,6 @@ subroutine bdy_expl2 ( & ! slvar,qwvar,slqw are on theta-level K ! tke is on theta-level K-1 ! exner is on theta-level K-1 - - ! For var_diags_opt = original_vars we use the following variables: - ! dsldzm is on theta-level K-1 - ! dqwdzm is on theta-level K-1 - ! elm is on theta-level K-1 - ! rhokh is on rho-level K - - ! For var_diags_opt = split_tke_and_inv ! dsldz is on rho-level K ! dqwdz is on rho-level K ! ftl is on rho-level k @@ -2943,85 +2846,47 @@ subroutine bdy_expl2 ( & call qsat_wat(qsw_arr,tl(:,j,k-1),p_theta_levels(:,j,k-1),tdims%i_len) end if - if (var_diags_opt == original_vars) then - - do i = tdims%i_start, tdims%i_end - ! calculate sh, don't interpolate with the surface flux or divide by 0 - if ( BL_diag%tke(i,j,k) > 1.0e-10_r_bl ) then - sh = rhokh(i,j,k) & - / ( rho_wet_tq(i,j,k-1) * elm(i,j,k) & - * sqrt( 2.0_r_bl * BL_diag%tke(i,j,k) ) ) - else - sh = small_sh - end if - if ( sh < small_sh ) sh = small_sh - ! calculate exner - exner = ( p_theta_levels(i,j,k-1) / pref )**kappa - ! calculate the variance, use gradient interpolated between levs 1 and 2 - sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * b2 * sh & - * elm(i,j,k)**2 * dsldz(i,j,k)**2 & - + a_qs(i,j,k-1)**2 * b2 * sh & - * elm(i,j,k)**2 * dqwdz(i,j,k)**2 & - - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * b2 & - * sh * elm(i,j,k)**2 * dsldz(i,j,k) * dqwdz(i,j,k) + do i = tdims%i_start, tdims%i_end + ! calculate the variance + sl_var = zero + qw_var = zero + sl_qw = zero + if ( BL_diag%tke(i,j,k) > small_tke ) then + ! vertical interpolation weights + weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) + weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) + weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) + ! var_fac=b2*L/sqrt(TKE) + var_fac = b2 * rhokm(i,j,k) / ( weight1 * BL_diag%tke(i,j,k) * & + rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1) ) + ! Note that flux*gradient can be negative so the absolute values + ! are used + qw_var= abs( -var_fac*( weight2 * fqw(i,j,k) * dqwdz(i,j,k) + & + weight3 * fqw(i,j,k-1)* dqwdz(i,j,k-1) ) ) + sl_var= abs( -var_fac*( weight2 * ftl(i,j,k) * dsldz(i,j,k) + & + weight3 * ftl(i,j,k-1)* dsldz(i,j,k-1) ) ) + sl_qw = - one_half * var_fac*( & + weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & + weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& + ) if (BL_diag%l_slvar) then - BL_diag%slvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldz(i,j,k)**2 + BL_diag%slvar(i,j,k-1) = sl_var end if if (BL_diag%l_qwvar) then - BL_diag%qwvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dqwdz(i,j,k)**2 + BL_diag%qwvar(i,j,k-1) = qw_var end if if (BL_diag%l_slqw) then - BL_diag%slqw(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldz(i,j,k) & - * dqwdz(i,j,k) + BL_diag%slqw(i,j,k-1) = sl_qw end if - ! do this for safety, not sure if it's really needed - sgm(i) = sqrt ( max( sgm(i), zero ) ) - end do - - else ! var_diags_opt - - do i = tdims%i_start, tdims%i_end - ! calculate the variance - sl_var = zero - qw_var = zero - sl_qw = zero - if ( BL_diag%tke(i,j,k) > small_tke ) then - ! vertical interpolation weights - weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) - weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) - weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) - ! var_fac=b2*L/sqrt(TKE) - var_fac = b2 * rhokm(i,j,k) / ( weight1 * BL_diag%tke(i,j,k) * & - rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1) ) - ! Note that flux*gradient can be negative so the absolute values - ! are used - qw_var= abs( -var_fac*( weight2 * fqw(i,j,k) * dqwdz(i,j,k) + & - weight3 * fqw(i,j,k-1)* dqwdz(i,j,k-1) ) ) - sl_var= abs( -var_fac*( weight2 * ftl(i,j,k) * dsldz(i,j,k) + & - weight3 * ftl(i,j,k-1)* dsldz(i,j,k-1) ) ) - sl_qw = - one_half * var_fac*( & - weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & - weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& - ) - if (BL_diag%l_slvar) then - BL_diag%slvar(i,j,k-1) = sl_var - end if - if (BL_diag%l_qwvar) then - BL_diag%qwvar(i,j,k-1) = qw_var - end if - if (BL_diag%l_slqw) then - BL_diag%slqw(i,j,k-1) = sl_qw - end if - end if - exner = ( p_theta_levels(i,j,k-1) / pref )**kappa - sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & - + a_qs(i,j,k-1)**2 * qw_var & - - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw - ! do this for safety, not sure if it's really needed - sgm(i) = sqrt ( max( sgm(i), zero ) ) + end if + exner = ( p_theta_levels(i,j,k-1) / pref )**kappa + sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & + + a_qs(i,j,k-1)**2 * qw_var & + - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw + ! do this for safety, not sure if it's really needed + sgm(i) = sqrt ( max( sgm(i), zero ) ) - end do !i - end if ! var_diags_opt + end do !i if (i_rhcpt == rhcpt_tke_based) then do i = tdims%i_start, tdims%i_end @@ -3057,110 +2922,61 @@ subroutine bdy_expl2 ( & call qsat_wat(qsw_arr,tl(:,j,k-1),p_theta_levels(:,j,k-1),tdims%i_len) end if - if (var_diags_opt == original_vars) then - - do i = tdims%i_start, tdims%i_end - ! calculate sh, don't divide by 0 - if ( BL_diag%tke(i,j,k) > 1.0e-10_r_bl ) then - weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) - weight2 = r_theta_levels(i,j,k-1)-r_rho_levels(i,j,k-1) - weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) - sh = ( weight2 * rhokh(i,j,k) + weight3 * rhokh(i,j,k-1) ) & - / ( weight1 * rho_wet_tq(i,j,k-1) * elm(i,j,k) & - * sqrt( 2.0_r_bl * BL_diag%tke(i,j,k) ) ) - else - sh = small_sh - end if - if ( sh < small_sh ) sh = small_sh - ! calculate exner - exner = ( p_theta_levels(i,j,k-1) / pref )**kappa - ! calculate the variance - sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * b2 * sh & - * elm(i,j,k)**2 * dsldzm(i,j,k)**2 & - + a_qs(i,j,k-1)**2 * b2 * sh & - * elm(i,j,k)**2 * dqwdzm(i,j,k)**2 & - - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * b2 & - * sh * elm(i,j,k)**2 * dsldzm(i,j,k) * dqwdzm(i,j,k) + do i = tdims%i_start, tdims%i_end + ! calculate the variance + sl_var = zero + qw_var = zero + sl_qw = zero + if ( BL_diag%tke(i,j,k) > small_tke ) then + ! vertical interpolation weights + weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) + weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) + weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) + var_fac = b2 * rhokm(i,j,k) / ( weight1*BL_diag%tke(i,j,k) * & + rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1)) + kp=k + km=k-1 + ! Don't use level ntml (or ntdsc) if disc_inv=2 as this indicates + ! the inversion has just risen and the gradients between ntml and + ! ntml-1 are likely to give excessive variances + if ( (kp == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & + (kp == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) kp = km + if ( (km == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & + (km == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) km = kp + ! Note that flux*gradient can be negative so the absolute values + ! are used + qw_var= abs( -var_fac*( weight2 * fqw(i,j,kp) * dqwdz(i,j,kp) + & + weight3 * fqw(i,j,km) * dqwdz(i,j,km) ) ) + sl_var= abs( -var_fac*( weight2 * ftl(i,j,kp) * dsldz(i,j,kp) + & + weight3 * ftl(i,j,km) * dsldz(i,j,km) ) ) + sl_qw = - one_half * var_fac*( & + weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & + weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& + ) if (BL_diag%l_slvar) then - BL_diag%slvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldz(i,j,k)**2 + BL_diag%slvar(i,j,k-1) = sl_var end if if (BL_diag%l_qwvar) then - BL_diag%qwvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dqwdz(i,j,k)**2 + BL_diag%qwvar(i,j,k-1) = qw_var end if if (BL_diag%l_slqw) then - BL_diag%slqw(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldzm(i,j,k) & - * dqwdz(i,j,k) + BL_diag%slqw(i,j,k-1) = sl_qw end if - end do !i - if (i_rhcpt == rhcpt_tke_based) then - do i = tdims%i_start, tdims%i_end - ! do this for safety, not sure if it's really needed - sgm(i) = sqrt ( max( sgm(i), zero ) ) - ! calculate rhcrit, with appropriate limits - rhcpt(i,j,k-1) = min( max_rhcpt(i,j), max( min_rhcpt(i,j), & - one - root6 * sgm(i) / (a_qs(i,j,k-1) * qsw_arr(i)))) - end do !i end if - - else ! var_diags_opt - + exner = ( p_theta_levels(i,j,k-1) / pref )**kappa + sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & + + a_qs(i,j,k-1)**2 * qw_var & + - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw + end do !i + if (i_rhcpt == rhcpt_tke_based) then do i = tdims%i_start, tdims%i_end - ! calculate the variance - sl_var = zero - qw_var = zero - sl_qw = zero - if ( BL_diag%tke(i,j,k) > small_tke ) then - ! vertical interpolation weights - weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) - weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) - weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) - var_fac = b2 * rhokm(i,j,k) / ( weight1*BL_diag%tke(i,j,k) * & - rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1)) - kp=k - km=k-1 - ! Don't use level ntml (or ntdsc) if disc_inv=2 as this indicates - ! the inversion has just risen and the gradients between ntml and - ! ntml-1 are likely to give excessive variances - if ( (kp == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & - (kp == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) kp = km - if ( (km == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & - (km == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) km = kp - ! Note that flux*gradient can be negative so the absolute values - ! are used - qw_var= abs( -var_fac*( weight2 * fqw(i,j,kp) * dqwdz(i,j,kp) + & - weight3 * fqw(i,j,km) * dqwdz(i,j,km) ) ) - sl_var= abs( -var_fac*( weight2 * ftl(i,j,kp) * dsldz(i,j,kp) + & - weight3 * ftl(i,j,km) * dsldz(i,j,km) ) ) - sl_qw = - one_half * var_fac*( & - weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & - weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& - ) - if (BL_diag%l_slvar) then - BL_diag%slvar(i,j,k-1) = sl_var - end if - if (BL_diag%l_qwvar) then - BL_diag%qwvar(i,j,k-1) = qw_var - end if - if (BL_diag%l_slqw) then - BL_diag%slqw(i,j,k-1) = sl_qw - end if - end if - exner = ( p_theta_levels(i,j,k-1) / pref )**kappa - sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & - + a_qs(i,j,k-1)**2 * qw_var & - - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw + ! do this for safety, not sure if it's really needed + sgm(i) = sqrt ( max( sgm(i), zero ) ) + ! calculate rhcrit, with appropriate limits + rhcpt(i,j,k-1) = min( max_rhcpt(i,j), max( min_rhcpt(i,j), & + one - root6 * sgm(i) / (a_qs(i,j,k-1) * qsw_arr(i)))) end do !i - if (i_rhcpt == rhcpt_tke_based) then - do i = tdims%i_start, tdims%i_end - ! do this for safety, not sure if it's really needed - sgm(i) = sqrt ( max( sgm(i), zero ) ) - ! calculate rhcrit, with appropriate limits - rhcpt(i,j,k-1) = min( max_rhcpt(i,j), max( min_rhcpt(i,j), & - one - root6 * sgm(i) / (a_qs(i,j,k-1) * qsw_arr(i)))) - end do !i - end if - - end if ! var_diags_opt + end if end do !j !$OMP end do NOWAIT diff --git a/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 b/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 index 0a7ca2b94..c18f9f550 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 @@ -51,7 +51,7 @@ subroutine bdy_impl3 ( & use yomhook, only: lhook, dr_hook use parkind1, only: jprb, jpim -!$ use omp_lib, only: omp_get_num_threads +!$ use omp_lib, only: omp_get_max_threads implicit none @@ -317,12 +317,15 @@ subroutine bdy_impl3 ( & ! Loop counter (horizontal field index). k, & ! Loop counter (vertical index). - omp_block, & + tdims_omp_block, & ! omp block length - jj, & + tdims_seg_block, & + ! omp segment length + ii, & ! omp block loop counter - l + l, & ! vector counter + max_threads integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -333,9 +336,16 @@ subroutine bdy_impl3 ( & if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) -!$OMP PARALLEL DEFAULT(none) SHARED(l_correct,bl_levels,tdims, & -!$OMP dqw_nt,dtl_nt,q_latest,qcl_latest, dtrdz_v,dtrdz_u,udims, rdz_v, & -!$OMP gamma1,q,qcl,qcf,t_latest,t,ftl,rhokh,dtl,rdz_charney_grid,dqw, & +blm1 = bl_levels-1 + +max_threads = 1 +!$ max_threads = omp_get_max_threads() +tdims_omp_block = ceiling(real(tdims%i_len)/max_threads) +tdims_seg_block = min(tdims_omp_block, tdims%i_len) + +!$OMP PARALLEL DEFAULT(none) SHARED(tdims_seg_block,l_correct,bl_levels, & +!$OMP blm1,tdims, dqw_nt,dtl_nt,q_latest,qcl_latest,dtrdz_v,dtrdz_u,udims, & +!$OMP rdz_v,gamma1,q,qcl,qcf,t_latest,t,ftl,rhokh,dtl,rdz_charney_grid,dqw, & !$OMP tau_x,rhokm_u,du,rdz_u,vdims,tau_y,dv, qcf_latest, & !$OMP qw,tl,r_theta_levels,r_theta_u,r_theta_v,r_rho_levels,fqw, & !$OMP dtrdz_charney_grid,gamma2,ct_ctq,dqw1,dtl1,ctctq1,model_type, & @@ -344,7 +354,7 @@ subroutine bdy_impl3 ( & !$OMP ct_prod, cu_prod, cv_prod,k_blend_tq,k_blend_u,k_blend_v, & !$OMP gamma_in,cq_cm_u,cq_cm_v,du_nt,dv_nt,rhokm_v,lcrcp,lsrcp) & !$OMP private(k,j,i,r_sq,rbt,temp,temp_u,temp_v,l,temp_out,temp_u_out, & -!$OMP temp_v_out,at,blm1,am,rbm,rr_sq,jj,omp_block,gamma1_uv,gamma2_uv) +!$OMP temp_v_out,at,am,rbm,rr_sq,ii,gamma1_uv,gamma2_uv) if ( l_correct ) then @@ -402,8 +412,6 @@ subroutine bdy_impl3 ( & end if ! l_correct -blm1 = bl_levels-1 - !----------------------------------------------------------------------- ! 1.0 Interpolate r_theta_levels to U,V columns !----------------------------------------------------------------------- @@ -443,15 +451,12 @@ subroutine bdy_impl3 ( & end do !$OMP end do -omp_block = tdims%j_end -!$ omp_block = ceiling(tdims%j_end/real(omp_get_num_threads())) - !$OMP do SCHEDULE(STATIC) -do jj = tdims%j_start, tdims%j_end, omp_block +do ii = tdims%i_start, tdims%i_end, tdims_seg_block do k = blm1, 2, -1 l = 0 - do j = jj, min(jj+omp_block-1, tdims%j_end) - do i = tdims%i_start, tdims%i_end + do j = tdims%j_start, tdims%j_end + do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) r_sq = r_rho_levels(i,j,k)*r_rho_levels(i,j,k) rr_sq = r_rho_levels(i,j,k+1)*r_rho_levels(i,j,k+1) dqw(i,j,k) = ( -dtrdz_charney_grid(i,j,k)* & @@ -476,8 +481,8 @@ subroutine bdy_impl3 ( & call oneover_v(l, temp, temp_out) l = 0 - do j = jj, min(jj+omp_block-1, tdims%j_end) - do i = tdims%i_start, tdims%i_end + do j = tdims%j_start, tdims%j_end + do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) l = l + 1 dqw(i,j,k) = temp_out(l) * dqw(i,j,k) dtl(i,j,k) = temp_out(l) * dtl(i,j,k) @@ -534,11 +539,11 @@ subroutine bdy_impl3 ( & !$OMP end do !$OMP do SCHEDULE(STATIC) - do jj = tdims%j_start, tdims%j_end, omp_block + do ii = tdims%i_start, tdims%i_end, tdims_seg_block do k = blm1, 2, -1 l = 0 - do j = jj, min(jj+omp_block-1, tdims%j_end) - do i = tdims%i_start, tdims%i_end + do j = tdims%j_start, tdims%j_end + do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) r_sq = r_rho_levels(i,j,k)*r_rho_levels(i,j,k) rr_sq = r_rho_levels(i,j,k+1)*r_rho_levels(i,j,k+1) dqw1(i,j,k) = -dtrdz_charney_grid(i,j,k) * & @@ -560,8 +565,8 @@ subroutine bdy_impl3 ( & call oneover_v(l, temp, temp_out) l = 0 - do j = jj, min(jj+omp_block-1, tdims%j_end) - do i = tdims%i_start, tdims%i_end + do j = tdims%j_start, tdims%j_end + do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) l = l + 1 dqw1(i,j,k) = temp_out(l) * dqw1(i,j,k) dtl1(i,j,k) = temp_out(l) * dtl1(i,j,k) diff --git a/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 b/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 index 088653df1..d482b53d9 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 @@ -41,7 +41,7 @@ subroutine bdy_impl4 ( & use atm_fields_bounds_mod, only: & udims, vdims, udims_s, vdims_s, tdims, pdims, tdims_l use bl_diags_mod, only: strnewbldiag - +use tuning_segments_mod, only: bl_segment_size use model_domain_mod, only: model_type, mt_single_column use planet_constants_mod, only: cp => cp_bl use yomhook, only: lhook, dr_hook @@ -196,7 +196,7 @@ subroutine bdy_impl4 ( & ! LOCAL Loop counter (horizontal field index). k ! LOCAL Loop counter (vertical level index). -integer :: jj, j_block ! omp blocking variables +integer :: ii, tdims_omp_block, tdims_seg_block ! omp blocking variables integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -206,9 +206,10 @@ subroutine bdy_impl4 ( & if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) -j_block = 4 +tdims_omp_block = bl_segment_size +tdims_seg_block = min(tdims_omp_block, tdims%i_len) -!$OMP PARALLEL DEFAULT(SHARED) private(i,j,k,jj,at,rbt,gamma1_uv, & +!$OMP PARALLEL DEFAULT(SHARED) private(i,j,k,ii,at,rbt,gamma1_uv, & !$OMP gamma2_uv,r_sq) if ( .not. l_correct ) then ! 1st stage: predictor @@ -266,10 +267,10 @@ subroutine bdy_impl4 ( & !$OMP end do !$OMP do SCHEDULE(STATIC) -do jj = tdims%j_start, tdims%j_end, j_block +do ii = tdims%j_start, tdims%i_end, tdims_seg_block do k = 2, bl_levels - do j = jj, min(jj+j_block-1,tdims%j_end) - do i = tdims%i_start, tdims%i_end + do j = tdims%j_start, tdims%j_end + do i = ii, min(ii+tdims_seg_block-1,tdims%i_end) dtl(i,j,k) = dtl(i,j,k) - ct_ctq(i,j,k)*dtl(i,j,k-1) tl(i,j,k) = tl(i,j,k) + dtl(i,j,k) dqw(i,j,k) = dqw(i,j,k) - ct_ctq(i,j,k)*dqw(i,j,k-1) diff --git a/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 b/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 index d6fccca90..faaa5a96a 100644 --- a/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 +++ b/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 @@ -64,7 +64,7 @@ module bl_option_mod integer, parameter :: sharp_sea_long_land = 2 integer, parameter :: mes_tails = 3 integer, parameter :: louis_tails = 4 -integer, parameter :: depth_based = 5 +integer, parameter :: depth_based = 5 ! not available in LFRic integer, parameter :: sharp_sea_mes_land = 6 integer, parameter :: lem_stability = 7 integer, parameter :: sharp_sea_louis_land = 8 @@ -291,11 +291,6 @@ module bl_option_mod ! 13 Improved method to calculate cloud-top radiative flux jump logical :: l_new_kcloudtop = .false. -! 14 Switch for alternative TKE and variance diagnostics -integer :: var_diags_opt = imdi -integer, parameter :: original_vars = 0 -integer, parameter :: split_tke_and_inv = 1 - ! 15 Multiplicative tuning factor in TKE diagnosis, usually 1.0 real(kind=r_bl) :: tke_diag_fac = rmdi @@ -503,12 +498,6 @@ module bl_option_mod ! Switch for coupled gradient method in Equilibrium SBL model logical, parameter :: L_SBLco = .true. -! LambdaM=2*LambdaH (operational setting) -logical, parameter :: l_lambdam2 = .false. - -! Lambdas not reduced above NTML_LOCAL+1 -logical, parameter :: l_full_lambdas = .false. - ! logical for whether to skip calculations based on start of timestep ! quantities when using semi-lagrangian cycling with Endgame ! This is set to true in dynamics_input_mod as Endgame always uses it, @@ -531,7 +520,7 @@ module bl_option_mod l_use_surf_in_ri, lambda_min_nml, ritrans, c_gust, & dzrad_disc_opt, num_sweeps_bflux, l_converge_ga, & local_fa, Keep_Ri_FA, l_bl_mix_qcf, l_conv_tke, l_use_var_fixes, & - l_reset_neg_q, var_diags_opt, tke_diag_fac, i_interp_local, & + l_reset_neg_q, tke_diag_fac, i_interp_local, & sg_orog_mixing, fric_heating, calc_prob_of_vis, z_nl_bl_levels, & idyndiag, zhloc_depth_fac, flux_grad, entr_smooth_dec, & sc_diag_opt, kprof_cu, bl_res_inv, blending_option, & @@ -632,8 +621,6 @@ subroutine print_nlist_run_bl() call umprint(linebuffer,src='bl_option_mod') write(linebuffer,'(A,L1)') 'l_converge_ga = ',l_converge_ga call umprint(linebuffer,src='bl_option_mod') -write(linebuffer,'(A,I4)') 'var_diags_opt = ',var_diags_opt -call umprint(linebuffer,src='bl_option_mod') write(linebuffer,'(A,L1)') 'l_use_var_fixes = ',l_use_var_fixes call umprint(linebuffer,src='bl_option_mod') write(linebuffer,'(A,ES12.4)') 'tke_diag_fac = ',tke_diag_fac diff --git a/science/physics_schemes/source/boundary_layer/ex_coef.F90 b/science/physics_schemes/source/boundary_layer/ex_coef.F90 index fd9ffe3e1..01164c314 100644 --- a/science/physics_schemes/source/boundary_layer/ex_coef.F90 +++ b/science/physics_schemes/source/boundary_layer/ex_coef.F90 @@ -24,11 +24,10 @@ module ex_coef_mod subroutine ex_coef ( & ! in levels/logicals - bl_levels,k_log_layr,nSCMDpkgs,L_SCMDiags, BL_diag, & + bl_levels, k_log_layr, BL_diag, & ! in fields - sigma_h,flandg,dbdz,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m,h_blend,zhpar, & - ntpar,ntml_nl,ntdsc,nbdsc,u_p,v_p,v_s,fb_surf,qw,tl,l_shallow_cth,rmlmax2, & - rneutml_sq, delta_smag, & + sigma_h,flandg,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m,zhpar,ntpar, & + ntml_nl,ntdsc,nbdsc,l_shallow_cth,rmlmax2,rneutml_sq, delta_smag, & ! in/out fields cumulus,weight_1dbl, & ! out fields @@ -39,18 +38,17 @@ subroutine ex_coef ( & use atm_fields_bounds_mod, only: pdims, tdims, pdims_s use bl_diags_mod, only: strnewbldiag use bl_option_mod, only: WeightLouisToLong, Variable_RiC, cbl_op, & - sg_orog_mixing, ricrit_sharp, pr_max, l_lambdam2, l_full_lambdas, & + sg_orog_mixing, ricrit_sharp, pr_max, & local_fa,Prandtl,ishear_bl,L_SBLco,Muw_SBL,Mwt_SBL,sbl_op, & - LockMailhot2004, depth_based, lem_stability, lem_std, lem_conven, & + LockMailhot2004, lem_stability, lem_std, lem_conven, & lem_adjust, cbl_mix_fac_nml, & off, on, sharpest, sharp_sea_long_land, sharp_sea_mes_land, & louis_tails, sharp_sea_louis_land, long_tails, mes_tails, ritrans, & - neut_cbl, equilibrium_sbl, lambda_min_nml, lambda_max_nml, & + neut_cbl, lambda_min_nml, lambda_max_nml, & lambda_fac, beta_bl, beta_fa, rlinfac, linear0, & to_sharp_across_1km, ntml_level_corrn, free_trop_layers, two_thirds, & blending_option, blend_except_cu, blend_gridindep_fa, blend_cth_shcu_only, & - extended_tail, sg_shear_enh_lambda, l_use_var_fixes, var_diags_opt, & - split_tke_and_inv, zero, one, one_half + extended_tail, zero, one, one_half use conversions_mod, only: pi => pi_bl use gen_phys_inputs_mod, only: l_mr_physics @@ -63,8 +61,6 @@ subroutine ex_coef ( & use turb_diff_mod, only: l_subfilter_vert, l_subfilter_horiz use model_domain_mod, only: model_type, mt_single_column -use s_scmop_mod, only: default_streams, & - t_avg, d_sl, scmdiag_bl use yomhook, only: lhook, dr_hook use parkind1, only: jprb, jpim @@ -98,20 +94,6 @@ subroutine ex_coef ( & bl_levels), & ! in density on theta levels; ! used in RHOKM so wet density - dbdz(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end, & - 2:bl_levels), & - ! in Buoyancy gradient across lower - ! interface of layer. - u_p(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & - ! in Westerly wind component horizontally - ! interpolated to P-grid. (m/s) - v_p(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & - ! in Southerly wind component horizontally - ! interpolated to P-grid. (m/s) - qw(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & - ! in Total water content (kg per kg air). - tl(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & - ! in Liquid/frozen water temperature (K). rmlmax2(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & ! in Square of asymptotic mixing length for Smagorinsky scheme z_uv(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels+1), & @@ -123,18 +105,11 @@ subroutine ex_coef ( & ! in Height of top of initial parcel ascent z0m(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! in Roughness length for momentum (m). - h_blend(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! in Blending height for effective - ! roughness length scheme dvdzm(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end, & 2:bl_levels), & ! in Modulus of wind shear. ri(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,2:bl_levels), & ! in Local Richardson number. - v_s(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! in Surface friction velocity (m/s) - fb_surf(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! in Surface buoyancy flux over density (m^2/s^3). flandg(pdims_s%i_start:pdims_s%i_end,pdims_s%j_start:pdims_s%j_end), & ! in Land fraction on all tiles. rneutml_sq(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & @@ -146,13 +121,6 @@ subroutine ex_coef ( & l_shallow_cth(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) ! in Flag to indicate shallow convection based on cl-top -! Additional variables for SCM diagnostics which are dummy in full UM -integer, intent(in) :: & - nSCMDpkgs ! in No of SCM diagnostics packages - -logical, intent(in) :: & - L_SCMDiags(nSCMDpkgs) ! Logicals for SCM diagnostics packages - ! Declaration of new BL diagnostics. type (strnewbldiag), intent(in out) :: BL_diag @@ -216,7 +184,7 @@ subroutine ex_coef ( & character(len=*), parameter :: RoutineName = 'EX_COEF' -real(kind=r_bl) :: eh,em,g0,dh,dm,a_lambda,r_c_tke +real(kind=r_bl) :: eh,em,g0,dh,dm,r_c_tke real(kind=r_bl) :: subbmin,subbmax,subcmin,subcmax real(kind=r_bl) :: a_ri,b_ri @@ -225,8 +193,6 @@ subroutine ex_coef ( & ! Used in calc of stability function FH. em=4.0_r_bl, & ! Used in calc of stability function FM. - a_lambda=2.0_r_bl, & - ! used in calc of LAMBDA_EFF r_c_tke=one/0.41_r_bl & ! used in calc of TKE (1/stress-energy ratio, see UMDP25) ) @@ -246,20 +212,6 @@ subroutine ex_coef ( & ! Used in calc of unstability function FM. ) -! Equilibrium SBL model constants -real(kind=r_bl) :: RtestMin -integer :: gn,NGz,kMINh -parameter ( & - RtestMin=zero, & - ! Threshold for Rtest - gn=19, & - ! Size of "G"-tables (No. HonL values) - NGz=90, & - ! No. z/h steps in each "G" integration - kMINh=2 & - ! Level of minimum SBL height (>=2) -) - ! Define local storage. real(kind=r_bl) :: & ricrit(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & @@ -268,21 +220,6 @@ subroutine ex_coef ( & ! 2D variable for SBL stabiliy function options sharp(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! 2D variable for SHARP stabiliy function - invMOsurf(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! Inverse of sfce M-O length - ! Note: Inverse is used so that neutral conditions - ! can be handled (M-O length --> infinity) - zh_esbl(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! Ht of equilib SBL (sub-grid - HLtab(gn), & - ! Lookup tables (Gx calcs - GHsav(gn,NGz),gmsav(gn,NGz), & - ! in equilib SBL scheme) - THv_TQ(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end, & - bl_levels), & - ! Virtual potential temperature on theta levels - THv(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & - ! THv_TQ interpolated to U,V levels prandtl_number(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! = KM/KH (currently only calculated for stable) BL_weight(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end, & @@ -296,10 +233,6 @@ subroutine ex_coef ( & weight_bltop(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) ! weight_1dbl at the top of the PBL -integer :: & - ntml_esbl(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) - ! No. UV-levels inside equilibrium SBL - logical :: & topbl(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) ! Flag for having reached the @@ -319,25 +252,12 @@ subroutine ex_coef ( & ! z/sigma_h rpr ! !/Pr -! Variables for boundary layer depth based formulation -real(kind=r_bl) :: & - h_tkeb(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! TKE budget based BL depth - MOsurf(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! surface Obukhov length - diff_min(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) real(kind=r_bl) :: & - h_est, & - rifb, & - ! Bulk flux Richardson number pr_n, & ! neutral Prandtl number - r_pr_n, & + r_pr_n ! 1 / neutral Prandtl number - m_tau,m_buoy, & - ! Indices for implied stress and buoyancy flux profs - ind,diff real(kind=r_bl) :: & subb, subc, subg, ric, ricinv, rifac @@ -373,12 +293,7 @@ subroutine ex_coef ( & ! top of boundary layer mixing zfa, & ! height to use beta_fa in blendin - lambda_eff ! Effective mixing length used with effective - ! roughness length scheme. - -!Equilibrium SBL model temporary real scalar variables -real(kind=r_bl) :: & - km, u1, zz + zz integer :: & i,j, & @@ -388,38 +303,15 @@ subroutine ex_coef ( & kb, kt ! Base and top level of unstable Ri layers -!Equilibrium SBL model temporary integer scalar variables -integer :: & - kZtop,kZbot,gk,kG0, & - ! Temporary loop counters - iERRSBL ! SBLequil error status - -!Equilibrium SBL model logical variables logical :: & - GcalcDone, & - ! Calculation of Gx values has been performed - subcrit, & - ! flag for being in a subcritical ri layer - subgrid ! Will perform subgrid SBL depth calculation - -!Switch to enable subgrid SBL depth diagnosis -logical :: sg_enabled -parameter (sg_enabled=.true.) - -!Equilibrium SBL model SAVED variables -save HLtab,GHsav,gmsav,GcalcDone - -!Equilibrium SBL model data statements -data HLtab /0.0001_r_bl,0.001_r_bl,0.002_r_bl,0.005_r_bl,0.01_r_bl,0.02_r_bl, & - 0.05_r_bl,0.1_r_bl,0.2_r_bl,one_half,one,2.0_r_bl,5.0_r_bl, & - 10.0_r_bl,20.0_r_bl,50.0_r_bl,100.0_r_bl,200.0_r_bl,500.0_r_bl/ -data GcalcDone /.false./ + subcrit ! flag for being in a subcritical ri layer integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 real(kind=jprb) :: zhook_handle if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) + !----------------------------------------------------------------------- ! if stochastic physics random parameters is used set the parameter ! used to vary the stability function to a perturbed value, if not @@ -443,7 +335,6 @@ subroutine ex_coef ( & !--------------------------------------------------------------- pr_n = one if (Prandtl == LockMailhot2004) pr_n = 0.7_r_bl -if (sbl_op == depth_based) pr_n = 0.7_r_bl ! Use pr_n=0.7 if any LEM stability function selected if (sbl_op == lem_stability .or. cbl_op == lem_std & .or. cbl_op == lem_conven & @@ -496,7 +387,7 @@ subroutine ex_coef ( & ricinv = one/ric rlambda_fac=one/lambda_fac -!$OMP PARALLEL DEFAULT(SHARED) private ( i, j, k, z_scale, zpr ) +!$OMP PARALLEL DEFAULT(SHARED) private ( i, j ) !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end @@ -504,7 +395,6 @@ subroutine ex_coef ( & ! 0. Initialise flag for having reached top of turbulently mixed layer !----------------------------------------------------------------------- topbl(i,j) = .false. - prandtl_number(i,j) = pr_n ! initialise blending weight at top of BL to one weight_bltop(i,j) = one @@ -512,97 +402,6 @@ subroutine ex_coef ( & end do !$OMP end do NOWAIT !----------------------------------------------------------------------- -! Set-up a BL weighting function, =1 near the ground (ie in the BL) -! =0 in the free troposphere -! Rate and height at which transition occurs varys depending on choices: -!----------------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) -do k = 1, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - BL_weight(i,j,k) = one - end do - end do -end do -!$OMP end do - -if (local_fa == to_sharp_across_1km) then - !--------------------------------------------------------- - ! Additional code to allow the local Ri scheme to use - ! SHARPEST in the free atmosphere, ie above the BL top, - ! regardless of the tail option selected above. - ! Set Z_SCALE to 1km to mimic old value of BL_LEVELS, - ! gives BL_weight~0 by 2km, ~0.95 at 500m - !--------------------------------------------------------- - z_scale = 1000.0_r_bl -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - zpr = z_tq(i,j,k-1)/z_scale - BL_weight(i,j,k) = one_half*(one - tanh(3.0_r_bl*(zpr-one) ) ) - end do - end do - end do -!$OMP end do NOWAIT -end if - -if (sg_orog_mixing /= off) then - !----------------------------------------------------------------- - ! Subgrid orographic height dependence for SBL tail (option 1) - ! or orographic dependence of mixing lengths, lambdam,h (opt 2) - ! Gives BL_weight~[1,0.95,0.5,0] at ZPR=[0,0.6,1,1.7] - !---------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if (sigma_h(i,j) > one ) then - zpr = z_tq(i,j,k-1)/sigma_h(i,j) - BL_weight(i,j,k) = one_half*( one - & - tanh(4.0_r_bl*(zpr-one) ) ) - end if - end do - end do - end do -!$OMP end do NOWAIT -end if - -if (l_use_var_fixes) then -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - turb_length(i,j,k) = lambda_min*rlambda_fac - end do - end do - end do -!$OMP end do NOWAIT - if (blending_option == blend_cth_shcu_only) then - ! use Smag mixing length as background length scale if smaller - ! than lambda_min (ie ignore lambda_min for high res simulations) -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - turb_length(i,j,k) = min( turb_length(i,j,k), sqrt(rmlmax2(i,j,k)) ) - end do - end do - end do -!$OMP end do NOWAIT - end if -else -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - turb_length(i,j,k)=lambda_min - end do - end do - end do -!$OMP end do NOWAIT -end if -!----------------------------------------------------------------------- ! Set critical Richardson number !----------------------------------------------------------------------- if (l_rp2) then @@ -699,20 +498,18 @@ subroutine ex_coef ( & end if !----------------------------------------------------------------------- -! 1.1 Loop over levels calculating Richardson numbers. +! 1.1 Use Richardson number profile to calculate BL depth, zh !----------------------------------------------------------------------- - !$OMP PARALLEL DEFAULT(none) private(k,j,i) & !$OMP SHARED(bl_levels,pdims,topbl,ri,ricrit,local_fa,ntml_local,zh_local,z_uv) do k = 2, bl_levels !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - !------------------------------------------------------------------ - ! 1.2 If either a stable layer (Ri>RiCrit) or the maximum BL - ! height has been reached, set boundary layer height (ZH_LOCAL) to - ! the height of the lower boundary of the current layer + ! If either a stable layer (Ri>RiCrit) or the maximum BL + ! height has been reached, set boundary layer height (ZH_LOCAL) to + ! the height of the lower boundary of the current layer !------------------------------------------------------------------ if ( .not. topbl(i,j) .and. & (ri(i,j,k) > ricrit(i,j) .or. k == bl_levels) ) then @@ -741,18 +538,17 @@ subroutine ex_coef ( & end if !----------------------------------------------------------------------- -! In CUMULUS layers the local scheme is capped at the LCL (given in -! this case by NTML_NL). Save local BL depth as SCM diagnostic. -!----------------------------------------------------------------------- -!----------------------------------------------------------------------- -! If NTML_LOCAL is greater than the top of the parcel ascent (NTPAR) -! for a cumulus-capped layer, shear driven mixing is allowed to -! dominate (if ISHEAR_BL=1 selected) +! 1.2 In CUMULUS layers the local scheme is capped at the LCL (given in +! this case by NTML_NL). +! If NTML_LOCAL is greater than the top of the parcel ascent (NTPAR) +! for a cumulus-capped layer, shear driven mixing is allowed to +! dominate (if ISHEAR_BL=1 selected) !----------------------------------------------------------------------- !$OMP PARALLEL DEFAULT(none) & -!$OMP SHARED( pdims, ishear_bl, l_use_var_fixes, ntml_local, ntpar, cumulus, & -!$OMP ntml_nl, zh_local, z_uv ) & -!$OMP private( i, j ) +!$OMP SHARED( pdims, ishear_bl, ntml_local, ntpar, cumulus, & +!$OMP bl_levels, lambda_min, rlambda_fac, & +!$OMP turb_length, blending_option, rmlmax2) & +!$OMP private( i, j, k ) !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end @@ -762,30 +558,37 @@ subroutine ex_coef ( & end do end do !$OMP end do - -if ( .not. l_use_var_fixes ) then - ! Use sub-cloud layer as local PBL depth (as for non-local). - ! Found to give large TKE and variances with new diagnostics - ! and isn't particularly justifiable +!----------------------------------------------------------------------- +! 1.3 Search for sub-critical layers above the PBL and set the +! mixing length to scale with these layer depths +!----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) +do k = 2, bl_levels do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - if ( cumulus(i,j) ) then - ntml_local(i,j) = ntml_nl(i,j) - zh_local(i,j) = z_uv(i,j,ntml_local(i,j)+1) - end if + turb_length(i,j,k) = lambda_min*rlambda_fac end do end do -!$OMP end do +end do +!$OMP end do NOWAIT +if (blending_option == blend_cth_shcu_only) then + ! use Smag mixing length as background length scale if smaller + ! than lambda_min (ie ignore lambda_min for high res simulations) +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + turb_length(i,j,k) = min( turb_length(i,j,k), sqrt(rmlmax2(i,j,k)) ) + end do + end do + end do +!$OMP end do NOWAIT end if !$OMP end PARALLEL -!----------------------------------------------------------------------- -! 1.3 Search for sub-critical layers above the PBL and set the -! mixing length to scale with these layer depths -!----------------------------------------------------------------------- + if (local_fa == free_trop_layers) then !$OMP PARALLEL do DEFAULT(none) SCHEDULE(STATIC) & -!$OMP SHARED( pdims, bl_levels, ntml_local, ri, ricrit, z_uv, l_use_var_fixes, & +!$OMP SHARED( pdims, bl_levels, ntml_local, ri, ricrit, z_uv, & !$OMP turb_length, rlambda_fac, lambda_min ) & !$OMP private( i, j, k, subcrit, kb, kt, kl, turb_length_layer ) do j = pdims%j_start, pdims%j_end @@ -806,17 +609,10 @@ subroutine ex_coef ( & ! turb_length(k) is held, with Ri(k), on th-level(k-1) !--------------------------------------------------------- turb_length_layer = z_uv(i,j,kt) - z_uv(i,j,kb-1) - if (l_use_var_fixes) then - do kl = kb, kt - turb_length(i,j,kl) = max( turb_length(i,j,kl), & - min(turb_length_layer,lambda_max_nml*rlambda_fac) ) - end do - else - do kl = kb, kt - turb_length(i,j,kl) = max( lambda_min*rlambda_fac, & - min(turb_length_layer,lambda_max_nml*rlambda_fac) ) - end do - end if + do kl = kb, kt + turb_length(i,j,kl) = max( turb_length(i,j,kl), & + min(turb_length_layer,lambda_max_nml*rlambda_fac) ) + end do end if end do @@ -851,94 +647,255 @@ subroutine ex_coef ( & !$OMP end PARALLEL do end if !----------------------------------------------------------------------- -! 2. Richardson Number based local mixing scheme -!----------------------------------------------------------------------- -! 2.0 Loop round "boundary" levels; calculate the stability- -! dependent turbulent mixing coefficients. +! 2.0 Loop over levels; calculate the mixing lengths !----------------------------------------------------------------------- -! TKE budget based depth diagnosis +do k = 2, bl_levels +!$OMP PARALLEL DEFAULT(none) & +!$OMP PRIVATE(z_scale,j,i,lambdam,lambdah, & +!$OMP lambdah_rho,vkz,f_log,zz,zht,zfa,beta) & +!$OMP SHARED(k,pdims,ri,ricrit,flandg,ntml_local,ntml_nl,z_tq, & +!$OMP l_rp2,lambda_min,par_mezcla_rp,zh_local,turb_length,k_log_layr, & +!$OMP z_uv,z0m,elm,elh,elh_rho,blending_option,cumulus,l_shallow_cth,zhpar, & +!$OMP ntdsc,weight_1dbl,weight_bltop,delta_smag,rneutml_sq,BL_diag,local_fa) + !----------------------------------------------------------------- + ! 2.1 Calculate asymptotic mixing lengths LAMBDAM and LAMBDAH + !----------------------------------------------------------------- +!$OMP do SCHEDULE(STATIC) + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (l_rp2) then + lambdam = max ( lambda_min , par_mezcla_rp(rp_idx)*zh_local(i,j) ) + else + lambdam = max ( lambda_min , lambda_fac*zh_local(i,j) ) + end if + !----------------------------------------------------------------- + ! Reduce mixing lengths above BL + !----------------------------------------------------------------- + if (k >= ntml_local(i,j)+2) then + lambdam = lambda_min + end if -! Starting with the definition of the flux Richardson -! number, assuming similarity profiles for -! stress and buoyancy flux, and vertically integrating -! gives an expression for the stable boundary layer -! depth which is based just on surface fluxes and -! the wind speed change across the boundary layer. -! ---------------------------------------------------- + lambdah = lambdam + lambdah_rho = lambdah -if (sbl_op == depth_based) then + if ( local_fa == free_trop_layers ) then + lambdam = max( lambdam, lambda_fac*turb_length(i,j,k) ) + lambdah = max( lambdah, lambda_fac*turb_length(i,j,k) ) + ! lambdah_rho does not need to be recalculated under + ! local_fa option "free_trop_layers" as the full KH profile + ! will be interpolated in bdy_expl2 + end if + !----------------------------------------------------------------------- + ! 2.2 Calculate mixing lengths ELH, ELM coincident with RI(K) and so + ! at Z_TQ(K-1) + !----------------------------------------------------------------------- + ! Incorporate log profile corrections to the vertical finite + ! differences into the definitions of ELM and ELH. + ! Note that ELH_RHO is calculated (on rho levels) for direct inclusion + ! in RHOKH and also (as elh) on theta levels for the unstable + ! stability functions and inclusion in RHOKH before interpolation + ! (under local_fa option "free_trop_layers"). + ! To save computing logarithms for all K, the values of ELM and ELH + ! are unchanged for K > K_LOG_LAYR. - ! Index for assumed buoyancy profile - m_buoy=one + if (k <= k_log_layr) then + vkz = vkman * ( z_uv(i,j,k) - z_uv(i,j,k-1) ) + f_log = log( ( z_uv(i,j,k) + z0m(i,j) ) / & + ( z_uv(i,j,k-1) + z0m(i,j) ) ) + elm(i,j,k) = vkz / ( f_log + vkz/lambdam ) + elh(i,j,k) = vkz / ( f_log + vkz/lambdah ) + vkz = vkman * ( z_tq(i,j,k) - z_tq(i,j,k-1) ) + f_log = log( ( z_tq(i,j,k) + z0m(i,j) ) / & + ( z_tq(i,j,k-1) + z0m(i,j) ) ) + elh_rho(i,j,k) = vkz / ( f_log + vkz/lambdah_rho ) + else + vkz = vkman * ( z_tq(i,j,k-1) + z0m(i,j) ) + elm(i,j,k) = vkz / (one + vkz/lambdam ) + elh(i,j,k) = vkz / (one + vkz/lambdah ) + vkz = vkman * ( z_uv(i,j,k) + z0m(i,j) ) + elh_rho(i,j,k) = vkz / (one + vkz/lambdah_rho ) + end if + end do + end do +!$OMP end do +!---------------------------------------------------------------- +! 2.3 Blend mixing lengths between 1D and 3D Smagorinsky +!---------------------------------------------------------------- + if (blending_option /= off) then +!$OMP do SCHEDULE(STATIC) + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end - ! Index for assumed stress profile - m_tau=one + zz = z_tq(i,j,k-1) ! height of rhokm(k) + ! turb_length is the greater of the local and non-local + ! BL depths up to that bl top + z_scale = max( zz, turb_length(i,j,k) ) + ! zht = interface between BL and FA + zht = max( z_uv(i,j,ntml_nl(i,j)+1) , zh_local(i,j) ) + ! Relevant scale in cumulus layers can be cloud top height, zhpar + if ( cumulus(i,j) .and. ( blending_option /= blend_cth_shcu_only .or. & + l_shallow_cth(i,j) ) ) then + z_scale = max( z_scale, zhpar(i,j) ) + zht = max( zht, zhpar(i,j) ) + end if + ! BL top includes decoupled stratocu layer, if it exists + if (ntdsc(i,j) > 0) zht = max( zht, z_uv(i,j,ntdsc(i,j)+1) ) + ! Need to restrict z_scale to dsc depth within a dsc layer + ! (given by turb_length) and to distance from dsc top below the + ! dsc layer + if ( k-1 <= ntdsc(i,j) ) then + z_scale = min( z_scale, & + max( turb_length(i,j,k), z_uv(i,j,ntdsc(i,j)+1)-zz ) ) + end if - ! Effective bulk flux Richardson number - rifb=0.3_r_bl + ! Finally calculate 1D BL weighting factor + if ( blending_option == blend_except_cu .and. & + cumulus(i,j) .and. ntdsc(i,j) == 0) then + ! pure cumulus layer so revert to 1D BL scheme + weight_1dbl(i,j,k) = one + else - ind=m_buoy-m_tau+one + if ( blending_option == blend_gridindep_fa .or. & + blending_option == blend_cth_shcu_only ) then + if (zz <= zht) then + weight_1dbl(i,j,k) = & + one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & + max( zero, & + min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + weight_bltop(i,j) = weight_1dbl(i,j,k) + else ! above PBL + ! Above the PBL top (at zht) increase weight to one smoothly + ! between zht and zfa in order to default to 1D BL when not + ! turbulent. There is some arbitrariness here but: + ! a) we want to use a physical height, to avoid grid dependence + ! b) for shallow PBLs at high resolution it seems sensible to + ! get well (a PBL depth) above the resolved PBL before + ! reverting to 1D + ! c) for deep PBLs we still want to revert to 1D reasonably + ! quickly, hence within at most 1km of zht + zfa=min( 2.0_r_bl*zht, zht+1000.0_r_bl ) + if (zz <= zfa ) then + weight_1dbl(i,j,k) = one + one_half * & + (weight_bltop(i,j) - one) * & + ( one + cos(pi*(zz-zht)/(zfa-zht)) ) + else + weight_1dbl(i,j,k) = one + end if + if ( local_fa == free_trop_layers .and. & + ri(i,j,k) < ricrit(i,j) ) then + ! Except in an elevated turbulent layer where we still use + ! the standard blending weight + z_scale = turb_length(i,j,k) + weight_1dbl(i,j,k) = & + one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & + max( zero, & + min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + end if + end if ! test on zz < zht + else + zfa=zht+1000.0_r_bl + if (zz <= zht) then + beta=beta_bl + else if (zz <= zfa) then + beta = beta_bl*(zfa-zz)/(zfa-zht) + & + beta_fa*(zz-zht)/(zfa-zht) + else + beta=beta_fa + end if + weight_1dbl(i,j,k) = & + one - tanh( beta*z_scale/delta_smag(i,j)) * max( zero, & + min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + end if + end if + + elm(i,j,k) = elm(i,j,k)*weight_1dbl(i,j,k) + & + sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) + elh(i,j,k) = elh(i,j,k)*weight_1dbl(i,j,k) + & + sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) + end do + end do +!$OMP end do + end if ! test on blending_option +!$OMP end PARALLEL +end do ! loop over levels +!---------------------------------------------------------------- +! 3.0 Calculate stability functions +!---------------------------------------------------------------- +! 3.1 Set-up a BL weighting function, =1 near the ground (ie in the BL) +! =0 in the free troposphere +! Rate and height at which transition occurs varys depending on choices +!----------------------------------------------------------------------- +!$OMP PARALLEL DEFAULT(none) private( i, j, k, z_scale, zpr) & +!$OMP SHARED( pdims, bl_levels, BL_weight, local_fa, z_tq, sg_orog_mixing, & +!$OMP sigma_h) +!$OMP do SCHEDULE(STATIC) +do k = 1, bl_levels do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - - ! Set diff_min to a large initial value - diff_min(i,j)=1000.0_r_bl - - ! Surface Obukhov length - MOsurf(i,j)= -v_s(i,j)*v_s(i,j)*v_s(i,j) & - /(vkman*fb_surf(i,j)) + BL_weight(i,j,k) = one end do end do +end do +!$OMP end do +if (local_fa == to_sharp_across_1km) then + !--------------------------------------------------------- + ! Additional code to allow the local Ri scheme to use + ! SHARPEST in the free atmosphere, ie above the BL top, + ! regardless of the tail option selected above. + ! Set Z_SCALE to 1km to mimic old value of BL_LEVELS, + ! gives BL_weight~0 by 2km, ~0.95 at 500m + !--------------------------------------------------------- + z_scale = 1000.0_r_bl +!$OMP do SCHEDULE(STATIC) do k = 2, bl_levels do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end + zpr = z_tq(i,j,k-1)/z_scale + BL_weight(i,j,k) = one_half*(one - tanh(3.0_r_bl*(zpr-one) ) ) + end do + end do + end do +!$OMP end do NOWAIT +end if - ! The wind speed change from level k to the surface - u1=sqrt(u_p(i,j,k)*u_p(i,j,k)+v_p(i,j,k)*v_p(i,j,k)) - - ! h_est is the estimate of the stable boundary layer - ! depth using the TKE based formula - h_est=vkman*MOsurf(i,j)*ind*rifb*u1/v_s(i,j) - - ! Absolute difference between height and estimate - diff=abs(z_uv(i,j,k)-h_est) - - ! If h_est is closer than the previous closest value - ! (diff_min) reset the h_tkeb to h_est - - if (diff < diff_min(i,j)) then - diff_min(i,j)=diff - h_tkeb(i,j)=h_est +if (sg_orog_mixing /= off) then + !----------------------------------------------------------------- + ! Subgrid orographic height dependence for SBL tail (option 1) + ! or orographic dependence of mixing lengths, lambdam,h (opt 2) + ! Gives BL_weight~[1,0.95,0.5,0] at ZPR=[0,0.6,1,1.7] + !---------------------------------------------------------------- +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (sigma_h(i,j) > one ) then + zpr = z_tq(i,j,k-1)/sigma_h(i,j) + BL_weight(i,j,k) = one_half*( one - tanh(4.0_r_bl*(zpr-one) ) ) end if - end do end do end do - -end if ! SBL_OP = Depth_based - +!$OMP end do NOWAIT +end if +!$OMP end PARALLEL ! ---------------------------------------------------------------- -! Main loop over levels +! 3.2 calculating stable stability function +! ---------------------------------------------------------------- +! Load up 2D array FUNC with selected stability function for Ri>=0 +! +! SBL_OP Option +! +! Long_tails Long tails +! Sharpest SHARPEST function +! Sharp_sea_long_land SHARPEST over sea ; Long tails over land +! Mes_tails MESOSCALE model: Louis/SHARPEST blend +! Louis_tails Louis function +! Sharp_sea_mes_land SHARP over sea; Mes over land +! Sharp_sea_Louis_land SHARP over sea; Louis over land ! ---------------------------------------------------------------- - do k = 2, bl_levels - ! ---------------------------------------------------------------- - ! Load up 2D array FUNC with selected stability function for Ri>=0 - - ! SBL_OP Option - - ! Long_tails Long tails - ! Sharpest SHARPEST function - ! Sharp_sea_long_land SHARPEST over sea ; Long tails over land - ! Mes_tails MESOSCALE model: Louis/SHARPEST blend - ! Louis_tails Louis function - ! Depth_based Boundary layer depth based formulation - ! Sharp_sea_mes_land SHARP over sea; Mes over land - ! Sharp_sea_Louis_land SHARP over sea; Louis over land - ! ---------------------------------------------------------------- - select case (sbl_op) !-------------------------------------------- @@ -1061,19 +1018,6 @@ subroutine ex_coef ( & end do end do - !-------------------------------------------- - ! long TAILS FOR use WITH DEPTH BASED SCHEME - !-------------------------------------------- - case (depth_based) - ! long TAILS - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if (ri(i,j,k) >= zero) then - func(i,j)=one / ( one + g0 * ri(i,j,k) ) - end if - end do - end do - !-------------------------------------------- ! SHARP TAILS OVER SEA; MES TAILS OVER LAND !-------------------------------------------- @@ -1152,9 +1096,8 @@ subroutine ex_coef ( & end select ! SBL_OP !------------------------------------------------------------------ - ! Additional code to allow the local Ri scheme to use - ! SHARPEST in the free atmosphere, ie above the BL top, - ! regardless of the tail option selected above. + ! Additional option to use SHARPEST in the free atmosphere, ie above + ! the BL top, regardless of the tail option selected above. !------------------------------------------------------------------ if (local_fa == to_sharp_across_1km) then @@ -1214,7 +1157,7 @@ subroutine ex_coef ( & end if !--------------------------------------------------------------- - ! Set stable Prandtl number (=KM/KH) + ! 3.3 Set stable Prandtl number (=KM/KH) !--------------------------------------------------------------- if (sbl_op == lem_stability) then !$OMP PARALLEL do DEFAULT(none) SCHEDULE(STATIC) & @@ -1244,223 +1187,20 @@ subroutine ex_coef ( & end do !$OMP end PARALLEL do end if - -!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & -!$OMP private(z_scale,fm,j,i,lambdam,lambdah,lambda_eff, & -!$OMP lambdah_rho,vkz,f_log,zz,zht,zfa,beta,fh,rtmri,km,rpr) & -!$OMP SHARED(k,sbl_op,var_diags_opt,bl_levels,pdims,g0,ri,ricrit, & -!$OMP flandg,ntml_local,ntml_nl,subb,dh,z_tq, & -!$OMP BL_weight,sg_orog_mixing,sigma_h,pr_n, & -!$OMP l_rp2,lambda_min,par_mezcla_rp,zh_local, & -!$OMP h_blend,turb_length,k_log_layr, & -!$OMP z_uv,z0m,elm,elh,elh_rho,blending_option,cumulus,l_shallow_cth,zhpar, & -!$OMP ntdsc,weight_1dbl,weight_bltop,delta_smag,rneutml_sq,BL_diag, & -!$OMP r_pr_n,cbl_op,subc,dm,h_tkeb,v_s,MOsurf,rho_wet_tq, & -!$OMP l_subfilter_vert,l_subfilter_horiz,fm_3d,fh_3d,rhokm,tke_loc, & -!$OMP dvdzm,l_mr_physics,rhokh,local_fa,fb_surf,func,prandtl_number) - do j = pdims%j_start, pdims%j_end +!---------------------------------------------------------------- +! 3.4 Calculate (values of) stability functions FH, FM. +!---------------------------------------------------------------- +!$OMP PARALLEL DEFAULT(none) & +!$OMP SHARED( k, pdims,BL_diag,elm,elh,ri,func,prandtl_number,cbl_op,r_pr_n, & +!$OMP l_subfilter_vert,l_subfilter_horiz,fm_3d,fh_3d,rhokm,rhokh, & +!$OMP rho_wet_tq,dvdzm,l_mr_physics,local_fa,tke_loc,subb,subc,g0,dm, & +!$OMP dh ) & +!$OMP PRIVATE( i, j, fm, fh, rtmri, rpr ) +!$OMP do SCHEDULE(STATIC) + do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - !----------------------------------------------------------------- - ! 2.1 Calculate asymptotic mixing lengths LAMBDAM and LAMBDAH - ! (may be equal or LambdaM=2*LambdaH (operational setting)). - !----------------------------------------------------------------- - if (l_lambdam2) then - if (l_rp2) then - lambdam = max (lambda_min , 2*par_mezcla_rp(rp_idx)*zh_local(i,j)) - lambdah = max (lambda_min , par_mezcla_rp(rp_idx)*zh_local(i,j)) - else - lambdam = max (lambda_min , 0.30_r_bl*zh_local(i,j)) - lambdah = max (lambda_min , 0.15_r_bl*zh_local(i,j)) - end if - else - if (l_rp2) then - lambdam = max ( lambda_min , par_mezcla_rp(rp_idx)*zh_local(i,j) ) - else - lambdam = max ( lambda_min , lambda_fac*zh_local(i,j) ) - end if - lambdah = lambdam - end if - - if (sg_orog_mixing == sg_shear_enh_lambda) then - !-------------------------------------------------------------- - ! Use orographic mixing length for heat too, and reduce both - ! above sigma_h smoothly - ! NOTE: THIS CODE WILL not ENHANCE LAMBDAH because it only - ! gets used in bdy_expl2 where the calculation is redone as - ! standard - this was a mistake but is now operational in - ! the UKV! - !-------------------------------------------------------------- - if (k >= ntml_local(i,j)+2) then - lambdam = lambda_min - lambdah = lambda_min - end if - lambdah = max (lambdah, & - BL_weight(i,j,k)*a_lambda*h_blend(i,j) ) - lambda_eff = max (lambdam, & - BL_weight(i,j,k)*a_lambda*h_blend(i,j) ) - else - lambda_eff = max (lambdam, a_lambda*h_blend(i,j) ) - !------------------------------------------------------------ - ! Optionally reduce mixing length above local BL top - !------------------------------------------------------------ - if (k >= ntml_local(i,j)+2 .and. .not. l_full_lambdas) then - lambdam = lambda_min - lambdah = lambda_min - if (z_tq(i,j,k-1) > a_lambda*h_blend(i,j)) & - lambda_eff=lambda_min - end if - if ( k >= ntml_local(i,j)+2 .and. l_full_lambdas .and. & - local_fa == to_sharp_across_1km ) then - ! Weight lambda to lambda_min with height - ! Assuming only local_fa == to_sharp_across_1km will have - ! L_FULL_LAMBDAS. If other LOCAL_FA options are coded here - ! then changes must be included in section 5.3 of bdy_expl2 - - lambda_eff = lambda_eff * BL_weight(i,j,k) & - + lambda_min*( one - BL_weight(i,j,k) ) - lambdah = lambdah * BL_weight(i,j,k) & - + lambda_min*( one - BL_weight(i,j,k) ) - end if - end if - - lambdah_rho = lambdah - - if ( local_fa == free_trop_layers ) then - lambda_eff = max( lambda_eff, lambda_fac*turb_length(i,j,k) ) - lambdah = max( lambdah, lambda_fac*turb_length(i,j,k) ) - ! lambdah_rho does not need to be recalculated under - ! local_fa option "free_trop_layers" as the full KH profile - ! will be interpolated in bdy_expl2 - end if - !----------------------------------------------------------------------- - ! 2.2 Calculate mixing lengths ELH, ELM coincident with RI(K) and so - ! at Z_TQ(K-1) - !----------------------------------------------------------------------- - ! Incorporate log profile corrections to the vertical finite - ! differences into the definitions of ELM and ELH. - ! Note that ELH_RHO is calculated (on rho levels) for direct inclusion - ! in RHOKH and also (as elh) on theta levels for the unstable - ! stability functions and inclusion in RHOKH before interpolation - ! (under local_fa option "free_trop_layers"). - ! To save computing logarithms for all K, the values of ELM and ELH - ! are unchanged for K > K_LOG_LAYR. - - if (k <= k_log_layr) then - vkz = vkman * ( z_uv(i,j,k) - z_uv(i,j,k-1) ) - f_log = log( ( z_uv(i,j,k) + z0m(i,j) ) / & - ( z_uv(i,j,k-1) + z0m(i,j) ) ) - elm(i,j,k) = vkz / ( f_log + vkz/lambda_eff ) - elh(i,j,k) = vkz / ( f_log + vkz/lambdah ) - vkz = vkman * ( z_tq(i,j,k) - z_tq(i,j,k-1) ) - f_log = log( ( z_tq(i,j,k) + z0m(i,j) ) / & - ( z_tq(i,j,k-1) + z0m(i,j) ) ) - elh_rho(i,j,k) = vkz / ( f_log + vkz/lambdah_rho ) - else - vkz = vkman * ( z_tq(i,j,k-1) + z0m(i,j) ) - elm(i,j,k) = vkz / (one + vkz/lambda_eff ) - elh(i,j,k) = vkz / (one + vkz/lambdah ) - vkz = vkman * ( z_uv(i,j,k) + z0m(i,j) ) - elh_rho(i,j,k) = vkz / (one + vkz/lambdah_rho ) - end if - - if (blending_option /= off) then - - zz = z_tq(i,j,k-1) ! height of rhokm(k) - ! turb_length is the greater of the local and non-local - ! BL depths up to that bl top - z_scale = max( zz, turb_length(i,j,k) ) - ! zht = interface between BL and FA - zht = max( z_uv(i,j,ntml_nl(i,j)+1) , zh_local(i,j) ) - ! Relevant scale in cumulus layers can be cloud top height, zhpar - if ( cumulus(i,j) .and. ( blending_option /= blend_cth_shcu_only .or. & - l_shallow_cth(i,j) ) ) then - z_scale = max( z_scale, zhpar(i,j) ) - zht = max( zht, zhpar(i,j) ) - end if - ! BL top includes decoupled stratocu layer, if it exists - if (ntdsc(i,j) > 0) zht = max( zht, z_uv(i,j,ntdsc(i,j)+1) ) - ! Need to restrict z_scale to dsc depth within a dsc layer - ! (given by turb_length) and to distance from dsc top below the - ! dsc layer - if ( k-1 <= ntdsc(i,j) ) then - z_scale = min( z_scale, & - max( turb_length(i,j,k), z_uv(i,j,ntdsc(i,j)+1)-zz ) ) - end if - - ! Finally calculate 1D BL weighting factor - if ( blending_option == blend_except_cu .and. & - cumulus(i,j) .and. ntdsc(i,j) == 0) then - ! pure cumulus layer so revert to 1D BL scheme - weight_1dbl(i,j,k) = one - else - - if ( blending_option == blend_gridindep_fa .or. & - blending_option == blend_cth_shcu_only ) then - if (zz <= zht) then - weight_1dbl(i,j,k) = & - one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & - max( zero, & - min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) - weight_bltop(i,j) = weight_1dbl(i,j,k) - else ! above PBL - ! Above the PBL top (at zht) increase weight to one smoothly - ! between zht and zfa in order to default to 1D BL when not - ! turbulent. There is some arbitrariness here but: - ! a) we want to use a physical height, to avoid grid dependence - ! b) for shallow PBLs at high resolution it seems sensible to - ! get well (a PBL depth) above the resolved PBL before - ! reverting to 1D - ! c) for deep PBLs we still want to revert to 1D reasonably - ! quickly, hence within at most 1km of zht - zfa=min( 2.0_r_bl*zht, zht+1000.0_r_bl ) - if (zz <= zfa ) then - weight_1dbl(i,j,k) = one + one_half * & - (weight_bltop(i,j) - one) * & - ( one + cos(pi*(zz-zht)/(zfa-zht)) ) - else - weight_1dbl(i,j,k) = one - end if - if ( local_fa == free_trop_layers .and. & - ri(i,j,k) < ricrit(i,j) ) then - ! Except in an elevated turbulent layer where we still use - ! the standard blending weight - z_scale = turb_length(i,j,k) - weight_1dbl(i,j,k) = & - one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & - max( zero, & - min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) - - end if - end if ! test on zz < zht - else - zfa=zht+1000.0_r_bl - if (zz <= zht) then - beta=beta_bl - else if (zz <= zfa) then - beta = beta_bl*(zfa-zz)/(zfa-zht) + & - beta_fa*(zz-zht)/(zfa-zht) - else - beta=beta_fa - end if - weight_1dbl(i,j,k) = & - one - tanh( beta*z_scale/delta_smag(i,j)) * max( zero, & - min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) - end if - end if - - elm(i,j,k) = elm(i,j,k)*weight_1dbl(i,j,k) + & - sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) - elh(i,j,k) = elh(i,j,k)*weight_1dbl(i,j,k) + & - sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) - - end if ! test on blending_option if (BL_diag%l_elm3d) BL_diag%elm3d(i,j,k)=elm(i,j,k) - - !---------------------------------------------------------------- - ! 2.4 Calculate (values of) stability functions FH, FM. - !---------------------------------------------------------------- - if (ri(i,j,k) >= zero) then !----------------------------------------------------------- ! Note that we choose to include the Pr dependence such that @@ -1489,7 +1229,7 @@ subroutine ex_coef ( & end if !------------------------------------------------------------------ - ! 2.5_r_bl Calculate exchange coefficients RHO*KM(K), RHO*KH(K) + ! 4.0 Calculate exchange coefficients RHO*KM(K), RHO*KH(K) ! both on TH-level K-1 at this stage (RHOKH will be interpolated ! onto uv-levels and then be multiplied by ELH in BDY_EXPL2 if ! local_fa is not "free_trop_layers") @@ -1517,7 +1257,7 @@ subroutine ex_coef ( & if (local_fa == free_trop_layers) & rhokh(i,j,k) = rhokh(i,j,k) * elh(i,j,k) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then rpr = fh / max(fm, tiny(one) ) tke_loc(i,j,k) = ( r_c_tke*elm(i,j,k)*dvdzm(i,j,k)*dvdzm(i,j,k) & *(rhokm(i,j,k)/rho_wet_tq(i,j,k-1)) & @@ -1525,47 +1265,13 @@ subroutine ex_coef ( & one - ri(i,j,k)*rpr ) ) & )**two_thirds end if - ! ------------------------------------------- - ! Boundary layer depth based formulation - ! ------------------------------------------- - - if (sbl_op == depth_based .and. & - fb_surf(i,j) <= zero) then - if (z_tq(i,j,k-1) < h_tkeb(i,j)) then - - ! Formula for diffusion coefficient - ! see Beare et al 2006, Boundary layer Met. - - km = v_s(i,j) * vkman * z_tq(i,j,k-1) * & - ( (one-z_tq(i,j,k-1)/h_tkeb(i,j))**(1.5_r_bl) ) & - / (one + 4.7_r_bl*z_tq(i,j,k-1)/MOsurf(i,j)) - rhokm(i,j,k)= rho_wet_tq(i,j,k-1) * km - if (l_mr_physics) then - ! Note "RHO" here is always wet density (RHO_WET_TQ) so - ! save multiplication of RHOKH to after interpolation - rhokh(i,j,k)= km*r_pr_n / elm(i,j,k) - else - rhokh(i,j,k) = rho_wet_tq(i,j,k-1)*km*r_pr_n /elm(i,j,k) - end if - else - rhokm(i,j,k)=zero - rhokh(i,j,k)=zero - end if - end if !SBL_OP == Depth_based - - end do !I + end do !i end do !j -!$OMP end PARALLEL do +!$OMP end do +!$OMP end PARALLEL end do ! bl_levels -!----------------------------------------------------------------------- -! 3. Equilibrium Stable Boundary Layer (SBL) model. -!----------------------------------------------------------------------- -!----------------------------------------------------------------------- -! Finish up -!----------------------------------------------------------------------- - if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_out,zhook_handle) return end subroutine ex_coef diff --git a/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 b/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 index 4525be05d..a708083c2 100644 --- a/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 @@ -56,7 +56,7 @@ subroutine excf_nl_9c ( & flux_grad, Locketal2000, HoltBov1993, LockWhelan2006, entr_smooth_dec, & entr_taper_zh, kprof_cu, klcl_entr, buoy_integ, buoy_integ_low, & max_cu_depth, bl_res_inv, a_ent_shr_nml, a_ent_2, one_third, two_thirds, & - l_reset_dec_thres, var_diags_opt, original_vars, split_tke_and_inv, & + l_reset_dec_thres, & l_use_var_fixes, dzrad_disc_opt, dzrad_ntm1, dzrad_1p5dz, & num_sweeps_bflux, l_converge_ga, l_use_sml_dsc_fixes, zero, one, one_half use model_domain_mod, only: model_type, mt_single_column @@ -2990,7 +2990,7 @@ subroutine excf_nl_9c ( & ( (max(one - km_sct_factor(i,j)*z_pr/zh_pr, zero))**0.8_r_bl ) & * z_pr * z_pr / zh_pr ! PRANDTL=0.75 - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k)=rhokm_top(i,j,k)*c_tke*v_top(i,j)/zh(i,j) end if @@ -3054,26 +3054,13 @@ subroutine excf_nl_9c ( & 0.75_r_bl*rho_wet_tq(i,j,k-1)*v_top_dsc(i,j)*g1*vkman* & ( (max(one - km_dsct_factor(i,j)*z_pr/zh_pr,zero))**0.8_r_bl ) & * z_pr * z_pr / zh_pr - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm_dsct*c_tke*v_top_dsc(i,j)/dscdepth(i,j) end if rhokm_top(i,j,k) = rhokm_top(i,j,k) + rhokm_dsct end if - if (BL_diag%l_tke .and. var_diags_opt == original_vars) then - ! save 1/timescale for TKE diag, completed in bdy_expl2 - if ( zk_tq < zsml_top(i,j) .and. & - zk_tq > zsml_base(i,j) ) then - BL_diag%tke(i,j,k) = c_tke*v_top(i,j)/zh(i,j) - end if - if ( zk_tq < zhsc(i,j) .and. & - zk_tq > zdsc_base(i,j) ) then - ! save 1/timescale for TKE diag, completed in bdy_expl2 - BL_diag%tke(i,j,k) = max( BL_diag%tke(i,j,k), & - c_tke*v_top_dsc(i,j)/dscdepth(i,j) ) - end if - end if end do end do @@ -3183,19 +3170,12 @@ subroutine excf_nl_9c ( & ( one - ( zk_tq / zh(i,j) ) ) * & ( one - ( zk_tq / zh(i,j) ) ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm(i,j,k)*c_tke*w_m_tq/zh(i,j) end if end if - if (BL_diag%l_tke .and. var_diags_opt == original_vars) then - ! save 1/timescale for TKE diag, completed in bdy_expl2 - if ( zk_tq < zsml_top(i,j) ) then - BL_diag%tke(i,j,k) = max( BL_diag%tke(i,j,k), & - c_tke*w_m_tq/zh(i,j) ) - end if - end if end if end do end do @@ -3333,7 +3313,7 @@ subroutine excf_nl_9c ( & ( one - km_top_factor(i,j) * ( zk_tq / zh(i,j) ) ) * & ( one - km_top_factor(i,j) * ( zk_tq / zh(i,j) ) ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm(i,j,k)*c_tke*w_m_tq/zh(i,j) @@ -3345,20 +3325,13 @@ subroutine excf_nl_9c ( & rhokm(i,j,k) = prandtl_top(i,j) * rhokh_lcl(i,j) * & exp(-(zk_tq-zh(i,j))/cu_depth_scale(i,j)) * & (one-(zk_tq-zh(i,j))/(zsml_top(i,j)-zh(i,j))) - if (BL_diag%l_tke .and. var_diags_opt==split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm(i,j,k)*c_tke*w_m_tq/zh(i,j) end if end if end if - if (BL_diag%l_tke .and. var_diags_opt == original_vars) then - ! save 1/timescale for TKE diag, completed in bdy_expl2 - if ( zk_tq < zsml_top(i,j) ) then - BL_diag%tke(i,j,k) = max( BL_diag%tke(i,j,k), & - c_tke*w_m_tq/zh(i,j) ) - end if - end if end if end do diff --git a/science/physics_schemes/source/boundary_layer/imp_mix.F90 b/science/physics_schemes/source/boundary_layer/imp_mix.F90 index 622a181f4..3d5916f32 100644 --- a/science/physics_schemes/source/boundary_layer/imp_mix.F90 +++ b/science/physics_schemes/source/boundary_layer/imp_mix.F90 @@ -32,7 +32,7 @@ subroutine imp_mix ( & use atm_fields_bounds_mod, only: pdims, array_dims use yomhook, only: lhook, dr_hook use parkind1, only: jprb, jpim -!$ use omp_lib, only: omp_get_num_threads +!$ use omp_lib, only: omp_get_max_threads implicit none ! Inputs :- @@ -109,10 +109,13 @@ subroutine imp_mix ( & ! K minus 1. kp1, & ! K plus 1. - jj, & + ii, & ! omp blocking counter - omp_block + pdims_omp_block, & ! omp block size + pdims_seg_block, & + ! omp segment length + max_threads integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -124,14 +127,15 @@ subroutine imp_mix ( & blm1 = bl_levels-1 -omp_block = pdims%j_len +max_threads = 1 +!$ max_threads = omp_get_max_threads() +pdims_omp_block = ceiling(real(pdims%i_end)/max_threads) +pdims_seg_block = min(pdims_omp_block, pdims%i_len) -!$OMP PARALLEL DEFAULT(none) SHARED(f_field, dtrdz, field, pdims, & +!$OMP PARALLEL DEFAULT(none) SHARED(pdims_seg_block, f_field, dtrdz, field, pdims, & !$OMP gamma_rhokh_rdz, r_rho_levels, surf_dep_flux, d_field, af, & !$OMP r_theta_levels, gamma_rhok_dep, bl_levels, blm1) & -!$OMP private(r_sq, cf, rbf, kp1, km1, jj, k, j, i, rr_sq, omp_block) - -!$ omp_block = ceiling(real(pdims%j_len)/ omp_get_num_threads()) +!$OMP private(r_sq, cf, rbf, kp1, km1, ii, k, j, i, rr_sq) ! ---------------------------------------------------------------------- ! (A) Calculations on P-grid. @@ -191,12 +195,12 @@ subroutine imp_mix ( & !----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) -do jj = pdims%j_start, pdims%j_end, omp_block +do ii = pdims%i_start, pdims%i_end, pdims_seg_block do k = 2, blm1 kp1 = k+1 km1 = k-1 - do j = jj, min(jj+omp_block-1, pdims%j_end) - do i = pdims%i_start, pdims%i_end + do j = pdims%j_start, pdims%j_end + do i = ii, min(ii+pdims_seg_block-1, pdims%i_end) ! "Explicit" flux divergence across layer giving explicit FIELD ! increment due to mixing @@ -245,10 +249,10 @@ subroutine imp_mix ( & !----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) -do jj = pdims%j_start, pdims%j_end, omp_block +do ii = pdims%i_start, pdims%i_end, pdims_seg_block do k = blm1, 1, -1 - do j = jj, min(jj+omp_block-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end + do j = pdims%j_start, pdims%j_end + do i = ii, min(ii+pdims_seg_block-1,pdims%i_end) d_field(i,j,k) = d_field(i,j,k) - & af(i,j,k)*d_field(i,j,k+1) field(i,j,k) = field(i,j,k) + d_field(i,j,k) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 24008fac1..32fb1559c 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -57,8 +57,7 @@ subroutine kmkhz_9c ( & a_grad_adj, max_t_grad, flux_grad, Locketal2000, & HoltBov1993, LockWhelan2006, entr_smooth_dec, entr_taper_zh, & kprof_cu, l_use_sml_dsc_fixes, l_converge_ga, & - bl_res_inv, cosine_inv_flux, target_inv_profile, pr_max, var_diags_opt, & - split_tke_and_inv, l_noice_in_turb, & + bl_res_inv, cosine_inv_flux, target_inv_profile, pr_max, l_noice_in_turb, & one_third, two_thirds, zero, one, one_half use conversions_mod, only: pi => pi_bl use cv_run_mod, only: l_param_conv @@ -4165,7 +4164,7 @@ subroutine kmkhz_9c ( & if (res_inv(i,j) == 1) then Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & pr_max ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! need velocity scale for TKE diagnostic w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third @@ -4189,7 +4188,7 @@ subroutine kmkhz_9c ( & * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) end if @@ -4237,7 +4236,7 @@ subroutine kmkhz_9c ( & * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + if (BL_diag%l_tke) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) end if @@ -4702,7 +4701,7 @@ subroutine kmkhz_9c ( & ! Estimate turbulent w-variance scale at discontinuous inversions !----------------------------------------------------------------------- -if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then +if (BL_diag%l_tke) then !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end From 6774d2a300b9cbaf45d755f02db865e845014269 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:49:30 +0000 Subject: [PATCH 17/17] Revert "Merge on main" This reverts commit 710ff9acf35eaab0af104231da3289b931a92166. --- .github/CODEOWNERS | 80 +- .github/pull_request_template.md | 2 +- .../workflows/trigger-project-workflow.yaml | 2 +- CONTRIBUTORS.md | 58 +- CodeOwners.txt | 54 ++ README.md | 2 - .../adjoint_tests/example/configuration.nml | 30 +- applications/adjoint_tests/example/iodef.xml | 10 - .../rose-meta/lfric-adjoint_tests/versions.py | 120 --- .../linear_physics/atlt_bdy_lyr_alg_mod.x90 | 192 ---- .../linear_physics/atlt_bl_inc_alg_mod.x90 | 187 ---- .../mol/adjt_poly1d_recon_lookup_alg_mod.x90 | 9 +- .../mol/adjt_poly2d_recon_lookup_alg_mod.x90 | 7 +- .../mol/adjt_poly_adv_upd_lookup_alg_mod.x90 | 7 +- .../mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 | 9 +- .../solver/adjt_mixed_operator_alg_mod.x90 | 11 +- ...djt_mixed_schur_preconditioner_alg_mod.x90 | 31 +- .../solver/adjt_mixed_solver_alg_mod.x90 | 31 +- .../solver/adjt_pressure_precon_alg_mod.x90 | 27 +- .../adjt_scaled_matrix_vector_alg_mod.x90 | 5 +- ...adjt_semi_implicit_solver_step_alg_mod.x90 | 42 +- .../adjt_end_transport_step_alg_mod.x90 | 12 +- .../atlt_end_transport_step_alg_mod.x90 | 20 +- .../atlt_moist_mr_transport_alg_mod.x90 | 18 +- .../control/atlt_theta_transport_alg_mod.x90 | 16 +- .../atlt_transport_control_alg_mod.x90 | 23 +- .../control/atlt_transport_field_alg_mod.x90 | 50 +- .../control/atlt_wind_transport_alg_mod.x90 | 18 +- .../init_from_controller_alg_mod.x90 | 4 +- .../inner_from_controller_rdef_alg_mod.x90 | 32 +- .../inner_from_controller_rtran_alg_mod.x90 | 24 +- .../mol/adjt_reconstruct_w3_field_alg_mod.x90 | 24 +- .../mol/adjt_wt_advective_update_alg_mod.x90 | 22 +- .../mol/atlt_advective_and_flux_alg_mod.x90 | 29 +- .../mol/atlt_mol_advective_alg_mod.x90 | 22 +- .../mol/atlt_mol_conservative_alg_mod.x90 | 34 +- .../mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 | 9 +- .../mol/atlt_poly_adv_update_alg_mod.X90 | 7 +- .../mol/atlt_reconstruct_w3_field_alg_mod.x90 | 33 +- .../mol/atlt_w3h_advective_update_alg_mod.X90 | 7 +- .../mol/atlt_wt_advective_update_alg_mod.x90 | 41 +- .../source/driver/adjoint_test_driver_mod.f90 | 44 +- .../driver/adjoint_test_parameters_mod.F90 | 12 +- .../rose-meta/lfric-gravity_wave/versions.py | 45 - .../gravity_wave_infrastructure_mod.f90 | 9 +- .../gungho_model/example/configuration.nml | 1 - .../gungho_model/example/file_def_initial.xml | 2 - .../lam_example/baroclinic/config_driver.nml | 1 - .../lam_example/baroclinic/config_lam.nml | 1 - .../lam_example/straka/config_driver.nml | 1 - .../lam_example/straka/config_lam.nml | 1 - .../rose-meta/lfric-gungho_model/versions.py | 45 - .../example/configuration.nml | 145 +-- .../jedi_lfric_tests/example/iodef.xml | 10 - .../jedi_lfric_tests/example/mesh_C12.nc | Bin 128056 -> 85708 bytes .../C224_create_traj_file.sh | 19 - .../example_forecast/configuration.nml | 1 - .../example_forecast/iodef.xml | 2 - .../example_id_tlm_tests/configuration.nml | 204 ++-- .../example_id_tlm_tests/iodef.xml | 18 +- .../example_id_tlm_tests/mesh_C12.nc | Bin 0 -> 85708 bytes .../example_tlm_forecast_tl/configuration.nml | 214 ++--- .../configuration_op.nml | 1 - .../example_tlm_forecast_tl/iodef.xml | 10 - .../example_tlm_forecast_tl/mesh_C12.nc | Bin 0 -> 85708 bytes .../example_tlm_tests/configuration.nml | 211 ++--- .../example_tlm_tests/configuration_dry.nml | 404 ++++++++ .../configuration_dry_relaxed.nml | 222 ++--- .../example_tlm_tests/iodef.xml | 18 +- .../example_tlm_tests/mesh_C12.nc | Bin 0 -> 85708 bytes .../algorithm/algorithm_test.f90 | 2 +- .../rose-meta/jedi_common/HEAD/rose-meta.conf | 8 - .../rose-meta/jedi_common/versions.py | 138 +-- .../rose-meta/jedi_forecast/versions.py | 137 --- .../jedi_forecast_pseudo/versions.py | 137 --- .../rose-meta/jedi_id_tlm_tests/versions.py | 137 --- .../rose-meta/jedi_lfric_tests/versions.py | 137 --- .../jedi_tlm_forecast_tl/versions.py | 137 --- .../jedi_tlm_tests/HEAD/rose-meta.conf | 3 + .../rose-meta/jedi_tlm_tests/versions.py | 137 --- .../jedi_id_linear_model_mod.f90 | 5 +- .../jedi-interface/jedi_linear_model_mod.f90 | 5 +- .../jedi_setup_field_meta_data_mod.F90 | 3 - .../source/jedi_id_tlm_tests.f90 | 4 +- .../source/jedi_tlm_tests.f90 | 22 +- applications/jules/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 5 - applications/jules/example/configuration.nml | 1 - .../jules/rose-meta/lfric-jules/versions.py | 45 - .../lfric2lfric/example/configuration.nml | 1 - .../lfric-lfric2lfric/HEAD/rose-meta.conf | 48 +- .../rose-meta/lfric-lfric2lfric/versions.py | 69 +- .../lfric2lfric_oasis_regrid_mod.X90 | 11 +- .../source/driver/lfric2lfric_driver_mod.F90 | 193 ++-- .../source/driver/lfric2lfric_init_mod.f90 | 64 +- .../source/driver/lfric2lfric_regrid_mod.F90 | 112 --- .../lfric2lfric_field_init_mod.f90 | 22 +- .../lfric2lfric_file_init_mod.f90 | 127 +-- .../lfric2lfric_infrastructure_mod.X90 | 101 +- .../initialisation/lfric2lfric_init_mesh.f90 | 38 +- .../lfric2lfric/source/lfric2lfric.F90 | 8 +- applications/lfric_atm/Makefile | 2 +- .../lfric_atm/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 28 +- .../lfric_atm/example/configuration.nml | 1 - .../lfric_atm/metadata/field_def_diags.xml | 2 - .../metadata/field_def_initial_diags.xml | 2 - .../transmute/boundary_layer/bl_diags_mod.py | 33 - .../boundary_layer/kmkhz_9c_wtrac.py | 80 -- .../transmute/boundary_layer/local.py | 176 ---- .../boundary_layer/script_options.py | 165 ---- .../transmute/kernel/bm_tau_kernel_mod.py | 6 +- .../transmute/kernel/jules_exp_kernel_mod.py | 17 +- .../kernel/jules_extra_kernel_mod.py | 10 +- .../transmute/kernel/jules_imp_kernel_mod.py | 21 +- .../kernel/pc2_conv_coupling_kernel_mod.py | 6 +- .../kernel/pc2_initiation_kernel_mod.py | 6 +- .../kernel/sw_rad_tile_kernel_mod.py | 10 +- .../meto-ex1a/transmute/script_options.py | 1 - .../rose-meta/lfric-lfric_atm/versions.py | 45 - applications/lfric_coupled/Makefile | 2 +- .../lfric_coupled/build/compile_options.mk | 3 +- .../lfric_coupled/example/configuration.nml | 1 - .../rose-meta/lfric-lfric_coupled/versions.py | 45 - .../common/lfricinp_lfric_driver_mod.f90 | 2 +- .../linear_model/example/configuration.nml | 6 +- applications/linear_model/example/iodef.xml | 10 +- .../example_file/config_linear.nml | 1 - .../example_file/config_nonlinear.nml | 1 - .../plot_convergence/plot_convergence.py | 74 +- .../plot_convergence/plot_convergence.sh | 83 ++ .../rose-meta/lfric-linear_model/versions.py | 120 --- .../name_transport/example/configuration.nml | 1 - .../lfric-name_transport/versions.py | 45 - .../driver/name_transport_driver_mod.f90 | 26 +- applications/ngarch/Makefile | 2 +- applications/ngarch/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 18 +- .../ngarch/example/configuration_bl.nml | 1 - .../ngarch/example/configuration_casim.nml | 1 - .../ngarch/rose-meta/lfric-ngarch/versions.py | 45 - .../algorithm/boundary_layer_timestep_mod.x90 | 6 +- .../shallow_water/example/configuration.nml | 1 - .../rose-meta/lfric-shallow_water/versions.py | 45 - .../source/driver/shallow_water_model_mod.F90 | 11 +- applications/solver/source/solver.F90 | 2 +- .../transport/example/configuration.nml | 1 - .../rose-meta/lfric-transport/versions.py | 45 - .../source/driver/transport_driver_mod.f90 | 27 +- build/extract/extract_physics.mk | 5 +- build/extract/extract_science.py | 130 ++- build/extract/get_git_sources.py | 402 -------- build/local_build.py | 115 ++- .../source/developer_guide/local_builds.rst | 16 - .../checkpointing/lfric_atm_checkpoint.rst | 20 +- .../rose-meta/coupling/versions.py | 45 - .../jedi_lfric_interface/versions.py | 120 --- .../jedi_lfric_linear_modeldb_driver_mod.f90 | 2 +- .../field/atlas_field_interface_mod.F90 | 8 +- .../field/jedi_lfric_linear_fields_mod.f90 | 61 +- .../source/mesh/jedi_lfric_mesh_setup_mod.F90 | 16 +- interfaces/jules_interface/build/import.mk | 3 +- .../source/algorithm/jules_exp_alg_mod.x90 | 7 +- .../algorithm/jules_timestep_alg_mod.x90 | 4 +- .../source/kernel/jules_exp_kernel_mod.F90 | 7 +- .../build/psyclone_transmute.mk | 10 +- .../build/psyclone_transmute_pass.mk | 8 +- .../build/transmute_psytrans/tools.py | 50 - .../transmute_psytrans/transmute_functions.py | 160 ---- .../um-stochastic_physics/HEAD/rose-meta.conf | 31 +- .../source/algorithm/bl_exp_alg_mod.x90 | 7 +- .../algorithm/glomap_aerosol_alg_mod.x90 | 10 +- .../source/algorithm/skeb_main_alg_mod.x90 | 12 +- .../source/algorithm/spt_main_alg_mod.x90 | 12 +- .../source/algorithm/stph_fp_main_alg_mod.x90 | 23 +- .../source/kernel/bl_exp_kernel_mod.F90 | 15 +- .../kernel/glomap_aerosol_kernel_mod.F90 | 10 +- .../source/psy/psykal_lite_phys_mod.F90 | 10 +- .../source/support/um_physics_init_mod.f90 | 10 +- interfaces/socrates_interface/build/import.mk | 3 +- .../socrates-radiation/HEAD/rose-meta.conf | 13 +- .../rose-meta/socrates-radiation/versions.py | 17 +- .../source/algorithm/cosp_alg_mod.x90 | 6 +- .../source/algorithm/illuminate_alg_mod.x90 | 3 - .../source/kernel/illuminate_kernel_mod.F90 | 45 +- .../adjoint_tests/file/field_def_diags_ls.xml | 44 - .../app/adjoint_tests/file/file_def_ancil.xml | 9 - .../file/file_def_check_restart.xml | 15 - .../app/adjoint_tests/file/file_def_diags.xml | 17 - .../adjoint_tests/file/file_def_diags_ls.xml | 13 - .../adjoint_tests/file/file_def_initial.xml | 17 - .../app/adjoint_tests/file/file_def_ls.xml | 20 - .../app/adjoint_tests/file/file_def_read.xml | 19 - rose-stem/app/adjoint_tests/file/iodef.xml | 369 ++++++-- .../opt/rose-app-nwp_gal9_c12.conf | 4 +- .../opt/rose-app-varying_ls.conf | 1 - rose-stem/app/adjoint_tests/rose-app.conf | 39 +- .../bin/generate_weights_lfric2lfric.py | 2 +- rose-stem/app/gravity_wave/rose-app.conf | 16 +- .../gungho_model/file/file_def_initial.xml | 2 - .../opt/rose-app-suite_controlled.conf | 5 - rose-stem/app/gungho_model/rose-app.conf | 16 +- rose-stem/app/jedi_forecast/file/iodef.xml | 2 - .../opt/rose-app-gh-si-for-linear.conf | 1 - rose-stem/app/jedi_forecast/rose-app.conf | 30 +- .../app/jedi_forecast_pseudo/rose-app.conf | 30 +- .../app/jedi_id_tlm_tests/file/iodef.xml | 12 - .../opt/rose-app-C12_MG.conf | 8 - .../opt/rose-app-default.conf | 0 .../opt/rose-app-nwp_gal9_c12.conf | 26 - rose-stem/app/jedi_id_tlm_tests/rose-app.conf | 290 +++--- rose-stem/app/jedi_lfric_tests/file/iodef.xml | 12 +- .../jedi_lfric_tests/opt/rose-app-C12_MG.conf | 8 - .../opt/rose-app-nwp_gal9.conf | 3 + .../opt/rose-app-nwp_gal9_c12.conf | 20 - .../opt/rose-app-runge-kutta.conf | 32 +- rose-stem/app/jedi_lfric_tests/rose-app.conf | 227 ++--- .../app/jedi_tlm_forecast_tl/file/iodef.xml | 12 - .../opt/rose-app-C12_MG.conf | 8 - .../opt/rose-app-C12_MG_op.conf | 7 - .../opt/rose-app-default.conf | 0 .../opt/rose-app-nwp_gal9_c12.conf | 26 - .../opt/rose-app-rrt_equals_dt.conf | 2 - .../opt/rose-app-semi_strict_solver.conf | 9 - .../app/jedi_tlm_forecast_tl/rose-app.conf | 293 +++--- rose-stem/app/jedi_tlm_tests/file/iodef.xml | 12 - .../jedi_tlm_tests/opt/rose-app-C12_MG.conf | 8 - .../opt/rose-app-C12_MG_op.conf | 7 - .../jedi_tlm_tests/opt/rose-app-C224_MG.conf | 8 - .../jedi_tlm_tests/opt/rose-app-default.conf | 0 .../app/jedi_tlm_tests/opt/rose-app-dry.conf | 5 - .../opt/rose-app-nwp_gal9_c12.conf | 28 - .../opt/rose-app-nwp_gal9_c224.conf | 3 - .../opt/rose-app-real_increment.conf | 5 - .../opt/rose-app-relaxed_solver.conf | 15 + .../opt/rose-app-rrt_equals_dt.conf | 2 - .../opt/rose-app-semi_strict_solver.conf | 9 - .../opt/rose-app-strict_solver.conf | 15 - rose-stem/app/jedi_tlm_tests/rose-app.conf | 294 +++--- rose-stem/app/jules/rose-app.conf | 16 +- .../app/lfric2lfric/file/axis_def_main.xml | 1 - rose-stem/app/lfric2lfric/file/iodef_lbc.xml | 86 -- .../app/lfric2lfric/opt/rose-app-lbc.conf | 21 - rose-stem/app/lfric2lfric/rose-app.conf | 19 +- .../file/file_def_diags_oper_nwp_gl.xml | 7 + .../lfric_atm/file/file_def_initial_diags.xml | 2 +- .../file/iodef_gal_nwp_oper_hres.xml | 1 - .../opt/rose-app-camembert_case3_gj1214b.conf | 1 - .../app/lfric_atm/opt/rose-app-climate.conf | 1 - rose-stem/app/lfric_atm/opt/rose-app-da.conf | 4 +- rose-stem/app/lfric_atm/opt/rose-app-eda.conf | 4 +- .../app/lfric_atm/opt/rose-app-eda_jada.conf | 4 +- .../app/lfric_atm/opt/rose-app-hd209458b.conf | 1 - .../opt/rose-app-physics_segmentation.conf | 2 + rose-stem/app/lfric_atm/rose-app.conf | 16 +- .../lfric_coupled_atmosphere/rose-app.conf | 16 +- .../linear_model/file/field_def_diags_ls.xml | 44 - .../app/linear_model/file/file_def_ancil.xml | 9 - .../file/file_def_check_restart.xml | 15 - .../app/linear_model/file/file_def_diags.xml | 17 - .../linear_model/file/file_def_diags_ls.xml | 13 - .../linear_model/file/file_def_initial.xml | 17 - .../app/linear_model/file/file_def_ls.xml | 20 - .../app/linear_model/file/file_def_read.xml | 19 - rose-stem/app/linear_model/file/iodef.xml | 378 ++++++-- .../linear_model/opt/rose-app-dcmip301.conf | 11 - .../opt/rose-app-nwp_gal9_c12.conf | 4 +- .../opt/rose-app-runge-kutta.conf | 13 - .../opt/rose-app-semi-implicit.conf | 13 - rose-stem/app/linear_model/rose-app.conf | 37 +- .../app/mesh/opt/rose-app-C12_MG_op.conf | 18 - .../app/mesh/opt/rose-app-C24_MG_op.conf | 1 - .../app/mesh/opt/rose-app-ral3_seuk.conf | 199 ++++ rose-stem/app/mesh/opt/rose-app-ral3_uk.conf | 194 ++++ rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf | 194 ++++ rose-stem/app/mesh/opt/rose-app-seuk_MG.conf | 3 - rose-stem/app/name_transport/rose-app.conf | 16 +- rose-stem/app/ngarch/rose-app.conf | 16 +- rose-stem/app/shallow_water/rose-app.conf | 16 +- rose-stem/app/transport/rose-app.conf | 16 +- .../gungho_model/tasks_gungho_model.cylc | 41 - .../tasks_jedi_lfric_tests.cylc | 211 ++--- .../common/lfric2lfric/tasks_lfric2lfric.cylc | 16 +- .../common/lfric_atm/tasks_lfric_atm.cylc | 55 +- .../linear_model/tasks_linear_model.cylc | 9 +- .../site/meto/common/suite_config_ex1a.cylc | 32 +- .../meto/groups/groups_adjoint_tests.cylc | 6 +- .../site/meto/groups/groups_gungho_model.cylc | 3 - .../meto/groups/groups_jedi_lfric_tests.cylc | 74 +- .../site/meto/groups/groups_lfric2lfric.cylc | 2 - .../site/meto/groups/groups_lfric_atm.cylc | 12 +- .../site/meto/groups/groups_linear_model.cylc | 16 +- ...2000x2000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ic-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...MG-2panel_azspice_gnu_fast-debug-64bit.txt | 3 - ...MG-3panel_azspice_gnu_fast-debug-64bit.txt | 3 - ...ic-C48_MG_azspice_gnu_fast-debug-64bit.txt | 3 - ...1-C24s_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...C24_MG_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...G_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...rt-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0-100x100_azspice_gnu_fast-debug-64bit.txt | 6 +- ...00-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...og-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...01-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...er-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ke-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ez-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...in-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0x8-10x10_azspice_gnu_fast-debug-64bit.txt | 8 +- ...0x8-10x10_azspice_gnu_fast-debug-64bit.txt | 8 +- ...br-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...C24_MG_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...G_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...96_MG_lam_azspice_gnu_fast-debug-64bit.txt | 6 +- ...am_rotate_azspice_gnu_fast-debug-64bit.txt | 6 +- ...8-500x500_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1000x1000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...inear-C12_azspice_gnu_fast-debug-64bit.txt | 2 +- ...er-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1000x2000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...8-200x200_azspice_gnu_fast-debug-64bit.txt | 6 +- ...4-200x200_azspice_gnu_fast-debug-64bit.txt | 6 +- ...200x50_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...th-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...4s_rot_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...linic-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...linic-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 3 - ...alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...t2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...0x10-100x100_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...ip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...lorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...ip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...piter-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...uarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...omain-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...P100x8-10x10_ex1a_gnu_fast-debug-64bit.txt | 8 +- ...P100x8-10x10_ex1a_gnu_fast-debug-64bit.txt | 8 +- ...l_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...t2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...4_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...m-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...G_lam_rotate_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...00x8-500x500_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...r-linear-C12_ex1a_gnu_fast-debug-64bit.txt | 2 +- ...piter-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x8-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x4-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...16-200x50_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x8-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...inear-C12_azspice_gnu_fast-debug-64bit.txt | 2 +- ...inear-C12_azspice_gnu_full-debug-64bit.txt | 2 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 9 - ..._gal9-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...kutta-C12_azspice_gnu_fast-debug-64bit.txt | 6 +- ...kutta-C12_azspice_gnu_full-debug-64bit.txt | 6 +- ...fault-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...lt-C12_op_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 9 - ...C12_MG_op_azspice_gnu_fast-debug-64bit.txt | 9 - ...r-linear-C12_ex1a_cce_fast-debug-64bit.txt | 2 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 9 - ...nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ...ge-kutta-C12_ex1a_cce_fast-debug-64bit.txt | 6 +- ..._default-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ...fault-C12_op_ex1a_cce_fast-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 9 - ...l9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt | 9 - ...6_lam-lbc_azspice_gnu_fast-debug-64bit.txt | 6 - ...k_C16_lam_azspice_gnu_fast-debug-64bit.txt | 6 +- ..._C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt | 6 - ...seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt | 6 +- ...lanet-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...1214b-C12_azspice_gnu_fast-debug-32bit.txt | 4 +- ..._gal9-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._chem-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...9458b-C24_azspice_gnu_fast-debug-32bit.txt | 6 +- ...casim-C12_azspice_gnu_fast-debug-32bit.txt | 18 +- ...coma9-C12_azspice_gnu_fast-debug-32bit.txt | 16 +- ...h_dev-C12_azspice_gnu_fast-debug-32bit.txt | 9 + ..._gal9-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._gal9-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C48_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...-pert-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...ro-C48_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...l9_da-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...debug-C12_azspice_gnu_full-debug-32bit.txt | 14 +- ...ug-C48_MG_azspice_gnu_full-debug-32bit.txt | 12 +- ...9_eda-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._jada-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...9_mol-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...short-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...3-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 16 +- ...s-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 16 +- ...l-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...0x1500_MG_azspice_gnu_fast-debug-32bit.txt | 12 +- ...n1-C48_MG_azspice_gnu_fast-debug-32bit.txt | 6 +- ...uaplanet-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gj1214b-C12_ex1a_cce_fast-debug-32bit.txt | 4 +- ...lim_gal9-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...al9_chem-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._chem_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._chem_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...1500x1500_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ...d209458b-C24_ex1a_cce_fast-debug-32bit.txt | 4 +- ...wp_casim-C12_ex1a_cce_fast-debug-32bit.txt | 18 +- ...wp_coma9-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...orph_dev-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...morph_tb-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ..._gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...al9-pert-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt | 14 +- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._aero-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eaded-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt | 14 +- ..._gal9_da-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_debug-C12_ex1a_cce_full-debug-32bit.txt | 12 +- ...debug-C48_MG_ex1a_cce_full-debug-32bit.txt | 12 +- ...gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eda_jada-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...oukca_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...oukca_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ...ca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt | 15 +- ...ca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_short-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ..._ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ...xmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 10 +- ...1500x1500_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ..._ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt | 6 +- ...nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +- ...ip301-C24_azspice_gnu_fast-debug-64bit.txt | 6 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C12_MG_azspice_gnu_production-32bit.txt | 9 - ...om-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...licit-C12_azspice_gnu_fast-debug-64bit.txt | 6 +- ...dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt | 6 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt | 9 - ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 9 - ..._gal9-C12_MG_ex1a_cce_production-32bit.txt | 9 - ..._gal9-C12_MG_ex1a_cce_production-64bit.txt | 9 - ..._gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt | 9 - ..._gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt | 9 - ..._gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt | 9 - ..._gal9-C12_MG_ex1a_gnu_production-32bit.txt | 9 - ..._gal9-C12_MG_ex1a_gnu_production-64bit.txt | 9 - ...andom-C12_MG_ex1a_gnu_fast-debug-64bit.txt | 14 +- ...implicit-C12_ex1a_gnu_fast-debug-64bit.txt | 6 +- rose-stem/site/meto/macros/macros_ex1a.cylc | 10 +- rose-stem/site/meto/suite_config.cylc | 4 - rose-stem/site/meto/variables.cylc | 27 +- .../runtime/generate_runtime_control.cylc | 10 +- .../adj_dg_matrix_vector_kernel_mod.patch | 18 - .../adj_horizontal_mass_flux_kernel_mod.patch | 11 - ...i_combine_multidata_field_kernel_mod.patch | 73 +- .../adj_w3v_advective_update_kernel_mod.patch | 42 - .../atl_horizontal_mass_flux_kernel_mod.patch | 15 +- .../atl_w3v_advective_update_kernel_mod.patch | 19 +- .../rose-meta/lfric-adjoint/versions.py | 120 --- .../linear_physics/atl_bdy_lyr_alg.x90 | 141 --- .../linear_physics/atl_physics_alg.x90 | 148 --- .../algorithm/lookup/adj_lookup_table_mod.x90 | 22 + .../solver/adj_solver_lookup_cache_mod.x90 | 46 +- .../transport/adj_trans_lookup_cache_mod.x90 | 86 +- .../solver/adj_pressure_operator_alg_mod.x90 | 30 +- .../adj_semi_implicit_solver_alg_mod.x90 | 27 +- .../timestepping/atl_si_timestep_alg_mod.x90 | 96 +- .../common/adj_end_transport_step_alg_mod.x90 | 9 - .../common/adj_flux_precomputations_mod.x90 | 2 +- .../common/atl_end_transport_step_alg_mod.x90 | 9 +- .../atl_moist_mr_transport_alg_mod.x90 | 29 +- .../control/atl_split_transport_mod.x90 | 338 ------- .../control/atl_theta_transport_alg_mod.x90 | 38 +- .../control/atl_transport_control_alg_mod.x90 | 64 +- .../control/atl_transport_field_mod.f90 | 34 +- .../control/atl_wind_transport_alg_mod.x90 | 34 +- .../mol/adj_reconstruct_w3_field_alg_mod.x90 | 54 +- .../mol/adj_wt_advective_update_alg_mod.x90 | 62 +- .../mol/atl_advective_and_flux_alg_mod.x90 | 84 +- .../mol/atl_mol_advective_alg_mod.x90 | 92 +- .../mol/atl_mol_conservative_alg_mod.x90 | 92 +- .../mol/atl_reconstruct_w3_field_alg_mod.x90 | 39 +- .../mol/atl_wt_advective_update_alg_mod.x90 | 56 +- .../linear_physics/atl_bl_inc_kernel_mod.F90 | 177 ---- ...ly1d_vert_w3_reconstruction_kernel_mod.F90 | 7 +- .../mol/atl_poly_adv_update_kernel_mod.F90 | 19 +- .../atl_w3h_advective_update_kernel_mod.F90 | 8 +- .../integration-test/cma_test/cma_test.f90 | 5 +- .../lfric-gungho/HEAD/rose-meta.conf | 19 +- .../gungho/rose-meta/lfric-gungho/versions.py | 43 +- .../physics/map_fd_to_prognostics_alg_mod.x90 | 81 +- .../physics/slow_physics_alg_mod.X90 | 6 +- .../solver/mixed_operator_alg_mod.x90 | 58 +- .../mixed_schur_preconditioner_alg_mod.x90 | 5 +- .../common/end_of_transport_step_alg_mod.x90 | 1 - .../common/remap_on_extended_mesh_alg_mod.x90 | 3 +- .../common/transport_counter_mod.x90 | 74 +- .../common/transport_metadata_mod.F90 | 14 +- .../control/transport_controller_mod.x90 | 51 +- .../transport/ffsl/ffsl_hori_alg_mod.x90 | 9 +- .../mol/reconstruct_w3_field_alg_mod.x90 | 3 +- .../mol/wt_advective_update_alg_mod.x90 | 3 +- .../configuration/check_configuration_mod.F90 | 116 +-- .../source/diagnostics/diagnostics_io_mod.x90 | 57 +- .../driver/create_physics_prognostics_mod.F90 | 64 +- .../driver/gungho_diagnostics_driver_mod.F90 | 187 ++-- .../gungho/source/driver/gungho_model_mod.F90 | 9 +- .../gungho/source/driver/gungho_step_mod.x90 | 12 +- .../assemble_w2h_from_w2hb_kernel_mod.F90 | 95 -- .../compute_dl_matrix_kernel_mod.F90 | 130 ++- .../apply_mixed_u_operator_kernel_mod.F90 | 157 ---- .../apply_mixed_wp_operator_kernel_mod.F90 | 225 ----- .../solver/schur_backsub_kernel_mod.F90 | 12 +- .../assemble_w2h_from_w2hb_kernel_mod_test.pf | 86 -- .../apply_mixed_u_operator_kernel_mod_test.pf | 101 -- ...apply_mixed_wp_operator_kernel_mod_test.pf | 160 ---- .../solver/schur_backsub_kernel_mod_test.pf | 22 +- .../transport_metadata_collection_test.pf | 1 - .../poly1d_vert_adv_coeffs_kernel_mod_test.pf | 1 - .../mol/polyv_wtheta_koren_kernel_mod_test.pf | 1 - .../linear/integration-test/nwp_gal9/ReadMe | 1 - .../integration-test/nwp_gal9/iodef.xml | 124 --- .../integration-test/nwp_gal9/nwp_gal9.f90 | 146 --- .../integration-test/nwp_gal9/nwp_gal9.py | 105 --- .../resources/runge_kutta_configuration.nml | 8 +- .../runge_kutta/runge_kutta.f90 | 56 +- .../resources/semi_implicit_configuration.nml | 6 +- .../semi_implicit/semi_implicit.f90 | 96 +- .../semi_implicit/semi_implicit.py | 44 +- .../tl_test_advect_density_field_mod.x90 | 1 + .../tl_test_advect_theta_field_mod.x90 | 2 + .../tl_test_convergence_rate_check.f90 | 142 +-- .../tl_test/tl_test_driver_mod.f90 | 170 ++-- .../tl_test/tl_test_hydrostatic_mod.x90 | 2 + .../tl_test_kinetic_energy_gradient_mod.x90 | 1 + .../tl_test/tl_test_pressure_grad_bd_mod.x90 | 2 + .../tl_test_project_eos_pressure_mod.x90 | 1 + .../tl_test/tl_test_rhs_alg_mod.x90 | 107 +-- .../tl_test/tl_test_rhs_project_eos_mod.x90 | 1 + .../tl_test/tl_test_rhs_sample_eos_mod.x90 | 1 + .../tl_test/tl_test_rk_alg_mod.x90 | 2 +- .../tl_test_sample_eos_pressure_mod.x90 | 1 + .../tl_test/tl_test_semi_imp_alg_mod.x90 | 96 +- .../tl_test/tl_test_timesteps_alg_mod.x90 | 199 ++-- .../tl_test_timesteps_random_alg_mod.x90 | 597 ------------ .../tl_test/tl_test_transport_control_mod.x90 | 168 ++-- .../tl_test/tl_test_vorticity_mod.x90 | 2 + .../plot_convergence/plot_convergence.sh | 118 --- .../lfric-linear/HEAD/rose-meta.conf | 129 +-- .../linear/rose-meta/lfric-linear/versions.py | 118 +-- .../linear_physics/tl_bdy_lyr_alg.x90 | 144 --- .../linear_physics/tl_physics_alg.x90 | 135 --- .../timestepping/tl_si_timestep_alg_mod.x90 | 68 +- .../control/tl_split_transport_mod.x90 | 333 ------- .../control/tl_transport_field_mod.f90 | 7 +- .../mol/tl_mol_advective_alg_mod.x90 | 66 +- .../mol/tl_mol_conservative_alg_mod.x90 | 64 +- .../source/driver/linear_driver_mod.f90 | 2 +- .../source/driver/linear_model_data_mod.f90 | 24 +- .../linear_physics/tl_bl_inc_kernel_mod.F90 | 165 ---- .../tl_compute_aubu_kernel_mod.F90 | 117 --- .../tl_compute_qe_kernel_mod.F90 | 179 ---- .../source/boundary_layer/bdy_expl2.F90 | 446 ++++++--- .../source/boundary_layer/bdy_impl3.F90 | 51 +- .../source/boundary_layer/bdy_impl4.F90 | 15 +- .../source/boundary_layer/bl_option_mod.F90 | 17 +- .../source/boundary_layer/ex_coef.F90 | 886 ++++++++++++------ .../source/boundary_layer/excf_nl_9c.F90 | 39 +- .../source/boundary_layer/imp_mix.F90 | 32 +- .../source/boundary_layer/kmkhz_9c.F90 | 11 +- 596 files changed, 7100 insertions(+), 15447 deletions(-) create mode 100644 CodeOwners.txt delete mode 100644 applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 delete mode 100644 applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 rename science/linear/integration-test/nwp_gal9/resources/mesh_C12_MG.nc => applications/jedi_lfric_tests/example/mesh_C12.nc (64%) delete mode 100755 applications/jedi_lfric_tests/example_create_traj/C224_create_traj_file.sh create mode 100644 applications/jedi_lfric_tests/example_id_tlm_tests/mesh_C12.nc create mode 100644 applications/jedi_lfric_tests/example_tlm_forecast_tl/mesh_C12.nc create mode 100644 applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml rename science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml => applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml (68%) create mode 100644 applications/jedi_lfric_tests/example_tlm_tests/mesh_C12.nc delete mode 100644 applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 delete mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py delete mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py delete mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py delete mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py rename {science/linear => applications/linear_model}/plot_convergence/plot_convergence.py (54%) create mode 100755 applications/linear_model/plot_convergence/plot_convergence.sh delete mode 100644 build/extract/get_git_sources.py delete mode 100644 interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py delete mode 100644 rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_ancil.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_check_restart.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_diags.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_initial.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_ls.xml delete mode 100644 rose-stem/app/adjoint_tests/file/file_def_read.xml delete mode 100644 rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf create mode 100644 rose-stem/app/jedi_id_tlm_tests/opt/rose-app-default.conf delete mode 100644 rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf delete mode 100644 rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf create mode 100644 rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf delete mode 100644 rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf delete mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf delete mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf create mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-default.conf delete mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf delete mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf delete mode 100644 rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-default.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf create mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf delete mode 100644 rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf delete mode 100644 rose-stem/app/lfric2lfric/file/iodef_lbc.xml delete mode 100644 rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf delete mode 100644 rose-stem/app/linear_model/file/field_def_diags_ls.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_ancil.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_check_restart.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_diags.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_diags_ls.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_initial.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_ls.xml delete mode 100644 rose-stem/app/linear_model/file/file_def_read.xml delete mode 100644 rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf delete mode 100644 rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt create mode 100644 rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt delete mode 100644 science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch delete mode 100644 science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch delete mode 100644 science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 delete mode 100644 science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 delete mode 100644 science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 delete mode 100644 science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 delete mode 100644 science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 delete mode 100644 science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 delete mode 100644 science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 delete mode 100644 science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf delete mode 100644 science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf delete mode 100644 science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf delete mode 100644 science/linear/integration-test/nwp_gal9/ReadMe delete mode 100644 science/linear/integration-test/nwp_gal9/iodef.xml delete mode 100644 science/linear/integration-test/nwp_gal9/nwp_gal9.f90 delete mode 100755 science/linear/integration-test/nwp_gal9/nwp_gal9.py delete mode 100644 science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 delete mode 100755 science/linear/plot_convergence/plot_convergence.sh delete mode 100644 science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 delete mode 100644 science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 delete mode 100644 science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 delete mode 100644 science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 delete mode 100644 science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 delete mode 100644 science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c005bbe44..dbadb762f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,78 +1,4 @@ -# This CODEOWNERS file includes a primary codeowner and a deputy for each section. -# Codeowners who are not in a comment will be automatically notified of changes -# to the listed files. All codeowners listed are valid points of contact -# for discussing changes and seeking approval for work. +**/jules_interface/rose-meta @maggiehendry +**/jedi_lfric* @ss421 @matthewrmshin +**/linear* @ss421 @matthewrmshin -# Applications -**/adjoint_tests @DrTVockerodtMO # @mo-joshuacolclough -**/gravity_wave @thomasmelvin # @cjohnson-pi -**/gungho_model @thomasmelvin # @BShipway -**/jedi_lfric_tests @ss421 @matthewrmshin # @DavidSimonin -**/jules @iboutle # @MetOfficessdtesam -**/lfricinputs @mo-lottieturner # @mike-hobson -**/lfric_atm @iboutle # @BShipway -**/lfric_coupled @HengistPodd # @BShipway -**/lfricinputs @mo-lottieturner # @mike-hobson -**/linear_model @cjohnson-pi @ss421 @matthewrmshin # @tommbendall # Also notifiy jedi team about linear changes. -**/name_transport @jameskent-metoffice # @tommbendall -**/ngarch @christophermaynard # @jcsmeto -**/shallow_water @jameskent-metoffice # @atb1995 -**/solver @christophermaynard # @thomasmelvin -**/transport @tommbendall # @jameskent-metoffice - -# Science -**/adjoint @DrTVockerodtMO # @mo-joshuacolclough -**/linear @cjohnson-pi @ss421 @matthewrmshin # @tommbendall # Also notifiy jedi team about linear changes. -science/shared/source/constants/ @iboutle # @BShipway - -**/gungho @thomasmelvin # @iboutle -science/gungho/**/configuration/ @jameskent-metoffice # @thomasmelvin -science/gungho/**/core_dynamics/ @jameskent-metoffice # @thomasmelvin -science/gungho/**/diagnostics/ @atb1995 # @iboutle -science/gungho/**/diffusion/ @iboutle # @tommbendall -science/gungho/**/driver/ @MetOffice/core-capability-development -science/gungho/**/external_forcing/ @iboutle # @tommbendall -science/gungho/**/initialisation/ @mo-cjsmith # @thomasmelvin -science/gungho/**/limited_area/ @cjohnson-pi # @thomasmelvin -science/gungho/**/orography/ @atb1995 # @tommbendall -science/gungho/**/physics/ @iboutle # @tommbendall -science/gungho/**/psy/ @thomasmelvin # @tommbendall -science/gungho/**/runtime_constants/ @tommbendall # @atb1995 -science/gungho/**/solver/ @thomasmelvin # @tommbendall -science/gungho/**/timestepping/ @thomasmelvin # @jameskent-metoffice -science/gungho/**/transport/ @tommbendall # @jameskent-metoffice - -**/physics_schemes @iboutle # @MetOffice/ssdteam -science/physics_schemes/**/boundary_layer @Adrian-Lock # @P-Burns -science/physics_schemes/**/convection @MichaelWhitall -science/physics_schemes/**/convection/comorph @MichaelWhitall -science/physics_schemes/**/large_scale_cloud @paul-barrett # @CyrilMorcrette -science/physics_schemes/**/large_scale_precipitation @paulfield2024 # @paul-barrett -science/physics_schemes/**/radiation_control @mo-jmanners # @Petzi1 -science/physics_schemes/**/stochastic_physics @wjtmo # @annemccabe - -# Interfaces -**/coupled_interface @mike-hobson # @harry-shepherd -**/jedi_lfric_interface @ss421 @matthewrmshin # @DavidSimonin -**/jules_interface @iboutle # @MetOfficessdteam -**/jules_interface/rose-meta @maggiehendry -**/physics_schemes_interface @iboutle # @MetOfficessdteam -**/socrates_interface @mo-jmanners # @Petzi1 - -# System Components -rose-stem/templates/ @james-bruten-mo # @jennyhickson -rose-stem/lib/ @james-bruten-mo # @jennyhickson -rose-stem/bin/ @james-bruten-mo # @jennyhickson -rose-stem/site/meto/common/ @james-bruten-mo # @jennyhickson -rose-stem/site/meto/macros/ @james-bruten-mo # @jennyhickson -rose-stem/apps # Mostly updated by macros, no codeowner -**/versions.py @james-bruten-mo # @jennyhickson -build/ @MetOffice/ssdteam @hiker -**/*Makefile @MatthewHambley @hiker -**/*.mk @MatthewHambley @hiker - -# Other areas -documentation # @MetOffice/ssdteam -.github/ @MetOffice/ssdteam -LICENSE @yaswant -README.md @MetOffice/ssdteam diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 240f53879..bcfbc8fc0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -63,7 +63,7 @@ Code Reviewer: ## PSyclone Approval -- [ ] If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the [TCD Team](mailto:ToolsCollabDevTeam@metoffice.gov.uk) +- [ ] If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the [TCD Team](toolscollabdevteam@metoffice.gov.uk) # Sci/Tech Review diff --git a/.github/workflows/trigger-project-workflow.yaml b/.github/workflows/trigger-project-workflow.yaml index ccb7a55b0..4d0a8f6e6 100644 --- a/.github/workflows/trigger-project-workflow.yaml +++ b/.github/workflows/trigger-project-workflow.yaml @@ -2,7 +2,7 @@ name: Trigger Review Project on: pull_request_target: - types: ["opened", "synchronize", "reopened", "edited", "review_requested", "review_request_removed", "closed"] + types: ["opened", "synchronize", "reopened", "edited", "review_requested", "review_request_removed"] pull_request_review: pull_request_review_comment: diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 507cd2799..337cde25b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,33 +1,27 @@ # Contributors -| GitHub user | Real Name | Affiliation | Date | -| ------------------- | ------------------ | -------------------------------- | ---------- | -| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | -| jedbakerMO | Jed Baker | Met Office | 2025-12-29 | -| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | -| mike-hobson | Mike Hobson | Met Office | 2025-12-17 | -| mo-marqh | mark Hedley | Met Office | 2025-12-11 | -| 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 | -| DrTVockerodtMO | Terence Vockerodt | Met Office | 2026-01-08 | -| ricky-lv426 | Ricky Olivier | University of Exeter | 2026-01-12 | -| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-15 | -| timgraham-Met | Tim Graham | Met Office | 2026-01-15 | -| mcdalvi | Mohit Dalvi | Met Office | 2026-01-15 | -| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 | -| jasonjunweilyu | Junwei (Jason) Lyu | Bureau of Meteorology, Australia | 2025-12-17 | -| EdHone | Ed Hone | Met Office | 2026-01-26 | -| tom-j-h | Tom Hill | Met Office | 2026-01-27 | -| alanjhewitt | Alan J Hewitt | Met Office | 2026-01-28 | -| mo-lottieturner | Lottie Turner | Met Office | 2026-01-27 | -| andrewcoughtrie | Andrew Coughtrie | Met Office | 2026-01-28 | -| tommbendall | Thomas Bendall | Met Office | 2026-01-13 | -| mo-jmanners | James Manners | Met Office | 2026-01-14 | -| maggiehendry | Maggie Hendry | Met Office | 2026-01-29 | -| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-28 | -| jameskent-metoffice | James Kent | Met Office | 2026-01-21 | -| cjohnson-pi | Christine Johnson | Met Office | 2026-01-19 | -| t00sa | Sam Clarke-Green | Met Office | 2026-01-20 | -| ukmo-juan-castillo | Juan M. Castillo | Met Office | 2026-01-23 | -| Adrian-Lock | Adrian Lock | Met Office | 2026-01-09 | -| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 | + +| GitHub user | Real Name | Affiliation | Date | +| --------------- | ------------------ | -------------------------------- | ---------- | +| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | +| jedbakerMO | Jed Baker | Met Office | 2025-12-29 | +| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | +| 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 | +| DrTVockerodtMO | Terence Vockerodt | Met Office | 2026-01-08 | +| ricky-lv426 | Ricky Olivier | University of Exeter | 2026-01-12 | +| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-15 | +| timgraham-Met | Tim Graham | Met Office | 2026-01-15 | +| mcdalvi | Mohit Dalvi | Met Office | 2026-01-15 | +| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 | +| jasonjunweilyu | Junwei (Jason) Lyu | Bureau of Meteorology, Australia | 2025-12-17 | +| EdHone | Ed Hone | Met Office | 2026-01-26 | +| tom-j-h | Tom Hill | Met Office | 2026-01-27 | +| alanjhewitt | Alan J Hewitt | Met Office | 2026-01-28 | +| mo-lottieturner | Lottie Turner | Met Office | 2026-01-27 | +| andrewcoughtrie | Andrew Coughtrie | Met Office | 2026-01-28 | +| tommbendall | Thomas Bendall | Met Office | 2026-01-13 | +| maggiehendry | Maggie Hendry | Met Office | 2026-01-29 | diff --git a/CodeOwners.txt b/CodeOwners.txt new file mode 100644 index 000000000..36b0e9873 --- /dev/null +++ b/CodeOwners.txt @@ -0,0 +1,54 @@ += Code Owners = + +This file lists ownership of the major components in the LFRic Apps codebase. + +* Ownership is not a commitment for the individual to undertake all work + requested or all reviewing for the owned section. +* Any planned changes to a section should be discussed with the code owner to + ensure all plans are appropriate. +* Code owners should be given the option to be a science/technical reviewer + for any code that alters their sections. + +Contact details for code owners: https://code.metoffice.gov.uk/trac/home/wiki/UserList + +# Start of script readable lines + += System Components = +{{{ +Area First Contact Second Contact Team +rose-stem jamesbruten jenniferhickson simulation_systems_and_deployment +build umsysteam@metoffice.gov.uk -- simulation_systems_and_deployment +Makefiles matthewhambley -- core_capability_development +}}} + += Applications = +{{{ +Area First Contact Second Contact Team +adjoint_tests terencevockerodt joshuacolclough data_assimilation +gravity_wave thomasmelvin christinejohnson dynamics_research +gungho_model thomasmelvin benshipway dynamics_research +jedi_lfric_tests stevensandbach davidsimonin data_assimilation +lfric_atm ianboutle benshipway dynamics_research +lfric_coupled richardhill benshipway global_coupled_model_development +lfricinputs charlotteturner mikehobson core_capability_development +linear_model christinejohnson thomasbendall dynamics_research +name_transport jameskent thomasbendall dynamics_research +ngarch christophermaynard jamescunningham-smith ng-arch +shallow_water jameskent alexbrown dynamics_research +solver christophermaynard thomasmelvin ng-opt +transport thomasbendall jameskent dynamics_research +}}} + += Science = +{{{ +Area First Contact Second Contact Team +adjoint terencevockerodt joshuacolclough data_assimilation +constants ianboutle benshipway dynamics_research +coupled_interface mikehobson jeanrioual -- +gungho thomasmelvin benshipway dynamics_research +jedi_lfric_interface stevensandbach davidsimonin data_assimilation +jules_interface ianboutle richardgilham atmospheric_processes_and_parametrizations +linear christinejohnson thomasbendall dynamics_research +socrates_interface jamesmanners stephanhavemann radiation +physics_schemes_interface ianboutle https://code.metoffice.gov.uk/trac/um/browser/main/trunk/CodeOwners.txt simulation_systems_and_deployment +}}} diff --git a/README.md b/README.md index 1b0ff9fe1..8bddc4cae 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,6 @@ Core](https://github.com/MetOffice/lfric_core) repository. In development documentation for LFRic Apps is available at: [https://metoffice.github.io/lfric_apps](https://metoffice.github.io/lfric_apps) -The LFRic Apps release schedule and deadlines can be viewed in the [milestones](https://github.com/metoffice/lfric_apps/milestones). - Example standalone scientific suites for use with Met Office systems are available at: diff --git a/applications/adjoint_tests/example/configuration.nml b/applications/adjoint_tests/example/configuration.nml index e19710cb8..c3ff431f9 100644 --- a/applications/adjoint_tests/example/configuration.nml +++ b/applications/adjoint_tests/example/configuration.nml @@ -68,8 +68,8 @@ stretching_method='smooth', ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='diagGungho', -ls_directory='/data/users/tim.payne/lfric_apps/files', -ls_filename='final_ls_with_land', +ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', +ls_filename='final_ls', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', start_dump_filename='final_pert', @@ -221,23 +221,11 @@ write_minmax_tseries=.false., / &linear fixed_ls=.true., -l_stabilise_bl=.false., +l_stabilise_bl=.true., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', -transport_efficiency=.true., -/ -&linear_physics -blevs_m=15, -e_folding_levs_m=10, -l_0_m=80.0, -l_boundary_layer=.true., -log_layer=2, -u_land_m=0.4, -u_sea_m=0.4, -z_land_m=0.05, -z_sea_m=0.0005, / &logging log_to_rank_zero_only=.false., @@ -286,16 +274,11 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -bl_segment=0, -configure_segments=.true., -conv_gr_segment=16, -gw_segment=0, +configure_segments=.false., limit_drag_incs=.false., -ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., -ussp_segment=0, / &planet cp=1005.0, @@ -371,7 +354,6 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., @@ -410,11 +392,11 @@ panel_edge_treatment='none', profile_size=5, reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', -scheme=5*3, +scheme=5*1, si_outer_transport='none', slice_order='parabola', special_edges_monotone=5*1, -splitting=5*2, +splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', diff --git a/applications/adjoint_tests/example/iodef.xml b/applications/adjoint_tests/example/iodef.xml index 4e14df122..11c6939fa 100644 --- a/applications/adjoint_tests/example/iodef.xml +++ b/applications/adjoint_tests/example/iodef.xml @@ -50,11 +50,6 @@ - - - - - @@ -138,8 +133,6 @@ - - @@ -186,8 +179,6 @@ - - @@ -327,7 +318,6 @@ - diff --git a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py index 2d3f6a52e..8418438c1 100644 --- a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py @@ -126,123 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 deleted file mode 100644 index c1294aa55..000000000 --- a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 +++ /dev/null @@ -1,192 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be brief. -!----------------------------------------------------------------------------- -!> @brief Module containing adjoint test for atl_bdy_lyr_alg -module atlt_bdy_lyr_alg_mod - - use sci_assign_field_random_range_alg_mod, & - only : assign_field_random_range - use field_mod, only : field_type - use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def - use field_indices_mod, only : igh_u, igh_t, & - igh_d, igh_p - use log_mod, only : log_event, & - log_scratch_space, & - LOG_LEVEL_INFO, & - LOG_LEVEL_DEBUG, & - LOG_LEVEL_ERROR - use mesh_mod, only : mesh_type - use derived_config_mod, only : bundle_size - use driver_modeldb_mod, only : modeldb_type - use finite_element_config_mod, only : element_order_h, element_order_v - use fs_continuity_mod, only : W2, W3, Wtheta - use function_space_collection_mod, only : function_space_collection - use adjoint_test_parameters_mod, only : ls_u_range, ls_theta_range, & - ls_rho_range, ls_exner_range - use timing_mod, only : start_timing, stop_timing, tik, LPROF - - implicit none - - public - - contains - - !============================================================================= - !> @brief Adjoint test for atl_bdy_lyr_alg. - !> @details Passes if adjoint is transpose of tangent linear. - !> Determined by testing the equality of inner products and , - !> where M is the tangent linear and A is the adjoint. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - subroutine atlt_bdy_lyr_alg( modeldb, mesh ) - - use tl_bdy_lyr_alg_mod, only : tl_bdy_lyr_alg - use atl_bdy_lyr_alg_mod, only : atl_bdy_lyr_alg - - implicit none - - ! Arguments - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - - ! Arguments for tl and atl calls - ! Form of state is [u,theta,rho,exner] - type(field_type) :: state(bundle_size) - type(field_type) :: u_bl_inc - type(field_type) :: ls_state(bundle_size) - - ! Copies of input fields used in inner products - type(field_type) :: state_input(bundle_size) - type(field_type) :: u_bl_inc_input - - ! Pointers for initialising fields - type(function_space_type), pointer :: vector_space_wtheta_ptr - type(function_space_type), pointer :: vector_space_w2_ptr - type(function_space_type), pointer :: vector_space_w3_ptr - - ! Inner products - real(kind=r_def) :: inner1 - real(kind=r_def) :: inner2 - real(kind=r_def) :: ip1(2),ip2(2) - real(kind=r_def) :: sf(2) - - ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def - real(kind=r_def) :: machine_tol - real(kind=r_def) :: relative_diff - real(kind=r_def), parameter :: eps = 1e-30_r_def - - ! Misc - real(kind=r_def) :: dt - - integer(kind=tik) :: id - - if ( LPROF ) call start_timing( id, 'atlt_bdy_lyr_alg' ) - - ! Determining time constants - dt = real(modeldb%clock%get_seconds_per_step(), r_def) - if ( dt <= 0.0_r_def ) then - write( log_scratch_space, * ) "dt cannot be leq 0, found dt = ", dt - call log_event( log_scratch_space, log_level_error ) - end if - - ! Initialising fields - vector_space_wtheta_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, Wtheta ) - vector_space_w2_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W2 ) - vector_space_w3_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W3 ) - - call state(igh_u) % initialise( vector_space = vector_space_w2_ptr ) - call state(igh_t) % initialise( vector_space = vector_space_wtheta_ptr ) - call state(igh_d) % initialise( vector_space = vector_space_w3_ptr ) - call state(igh_p) % initialise( vector_space = vector_space_w3_ptr ) - call u_bl_inc % initialise( vector_space = vector_space_w2_ptr ) - - call state(igh_u) % copy_field_properties( state_input(igh_u) ) - call state(igh_t) % copy_field_properties( state_input(igh_t) ) - call state(igh_d) % copy_field_properties( state_input(igh_d) ) - call state(igh_p) % copy_field_properties( state_input(igh_p) ) - call state(igh_u) % copy_field_properties( u_bl_inc_input ) - - call state(igh_u) % copy_field_properties( ls_state(igh_u) ) - call state(igh_t) % copy_field_properties( ls_state(igh_t) ) - call state(igh_d) % copy_field_properties( ls_state(igh_d) ) - call state(igh_p) % copy_field_properties( ls_state(igh_p) ) - - ! Initialise values and call the tangent-linear alg. - call invoke( setval_random( u_bl_inc ), & - setval_x(u_bl_inc_input, u_bl_inc ), & - setval_random( state(igh_u) ), & - setval_x( state_input(igh_u), state(igh_u) ), & - setval_random( state(igh_t) ), & - setval_x( state_input(igh_t), state(igh_t) ), & - setval_random( state(igh_d) ), & - setval_x( state_input(igh_d), state(igh_d) ), & - setval_random( state(igh_p) ), & - setval_x( state_input(igh_p), state(igh_p) ) ) - - ! LS init - call assign_field_random_range( ls_state(igh_u), ls_u_range(1), ls_u_range(2) ) - call assign_field_random_range( ls_state(igh_t), ls_theta_range(1), ls_theta_range(2) ) - call invoke( setval_random( ls_state(igh_d) ), setval_random( ls_state(igh_p) ) ) - - ! Tangent linear - call tl_bdy_lyr_alg(modeldb, u_bl_inc, state(igh_u), ls_state, dt ) - - ! < Mx, Mx > - call invoke( x_innerproduct_x( ip1(1), state(igh_u) ), & - x_innerproduct_x( ip1(2), u_bl_inc ) ) - - sf(1) = 1.0_r_def / (ip1(1) + eps) - sf(2) = 1.0_r_def / (ip1(2) + eps) - - inner1 = 0.0_r_def - inner1 = inner1 + ip1(1) * sf(1) - inner1 = inner1 + ip1(2) * sf(2) - - ! Scaling fields - call invoke( inc_a_times_X( sf(1), state(igh_u) ), & - inc_a_times_X( sf(2), u_bl_inc ) ) - - ! Adjoint alg call and inner products - - ! Adjoint - call atl_bdy_lyr_alg(modeldb, u_bl_inc, state(igh_u), ls_state, dt ) - - ! < AMx, x > - call invoke( x_innerproduct_y( ip2(1), & - state(igh_u), & - state_input(igh_u) ), & - x_innerproduct_y( ip2(2), & - u_bl_inc, & - u_bl_inc_input ) ) - - inner2 = 0.0_r_def - inner2 = inner2 + ip2(1) - inner2 = inner2 + ip2(2) - - write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: ip1=', ip1(1) * sf(1), ip1(2) * sf(2) - call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: ip2=', ip2 - call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: s(ip1),s(ip2)=', inner1, inner2 - call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - - ! Test the inner-product values for equality, allowing for the precision of the active variables - machine_tol = spacing( max( abs( inner1 ), abs( inner2 ) ) ) - relative_diff = abs( inner1 - inner2 ) / machine_tol - if ( relative_diff < overall_tolerance ) then - write( log_scratch_space, * ) "PASSED tl_bdy_lyr_alg:", inner1, inner2, relative_diff - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - else - write( log_scratch_space, * ) "FAILED tl_bdy_lyr_alg:", inner1, inner2, relative_diff - call log_event( log_scratch_space, LOG_LEVEL_ERROR ) - end if - - if ( LPROF ) call stop_timing( id, 'atlt_bdy_lyr_alg' ) - - end subroutine atlt_bdy_lyr_alg - -end module atlt_bdy_lyr_alg_mod diff --git a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 deleted file mode 100644 index c617ba147..000000000 --- a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 +++ /dev/null @@ -1,187 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be brief. -!----------------------------------------------------------------------------- -!> @brief Module containing adjoint test for atl_bl_inc_kernel -module atlt_bl_inc_alg_mod - - use sci_assign_field_random_range_alg_mod, & - only : assign_field_random_range - use sci_geometric_constants_mod, only: get_face_selector_ew, & - get_face_selector_ns - use integer_field_mod, only: integer_field_type - use field_mod, only : field_type - use function_space_mod, only : function_space_type - use log_mod, only : log_event, & - log_scratch_space, & - LOG_LEVEL_ERROR, & - LOG_LEVEL_DEBUG, & - LOG_LEVEL_INFO - use mesh_mod, only : mesh_type - use function_space_collection_mod, only : function_space_collection - use finite_element_config_mod, only : element_order_h, element_order_v - use fs_continuity_mod, only : W2, W3, Wtheta - use constants_mod, only : i_def, r_def - use quadrature_face_mod, only : quadrature_face_type - use quadrature_rule_gaussian_mod, only : quadrature_rule_gaussian_type - use reference_element_mod, only : reference_element_type - use planet_config_mod, only : cp - use adjoint_test_parameters_mod, only : ls_theta_range, & - ls_exner_range, & - ls_md1_range, & - ls_md2_range, & - ls_md3_range - use timing_mod, only : start_timing, stop_timing, tik, LPROF - - implicit none - - public - - contains - - !============================================================================= - !> @brief Adjoint test for atl_bl_inc. - !> @details Passes if adjoint is transpose of tangent linear. - !> Determined by testing the equality of inner products and , - !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh Mesh object - subroutine atlt_bl_inc_alg( mesh ) - - use tl_bl_inc_kernel_mod, only : tl_bl_inc_kernel_type - use atl_bl_inc_kernel_mod, only : atl_bl_inc_kernel_type - use linear_physics_config_mod, only : log_layer, & - Blevs_m, & - e_folding_levs_m, & - u_land_m, & - u_sea_m, & - z_land_m, & - z_sea_m, & - L_0_m - - implicit none - - ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - - ! Arguments for tl and adj calls - type( field_type) :: u_inc - type( field_type) :: u - type( field_type) :: auv - type( field_type) :: buv_inv - type(integer_field_type), pointer :: face_selector_ew => null() - type(integer_field_type), pointer :: face_selector_ns => null() - - ! Copies of input fields used in inner products - type( field_type) :: u_inc_input - type( field_type) :: u_input - - ! Pointers for initialising fields - type(function_space_type), pointer :: vector_space_wtheta_ptr - type(function_space_type), pointer :: vector_space_w2_ptr - type(function_space_type), pointer :: vector_space_w3_ptr - - ! Inner products - real(kind=r_def) :: ip1(2) - real(kind=r_def) :: ip2(2) - real(kind=r_def) :: sf(2) - real(kind=r_def) :: inner1 - real(kind=r_def) :: inner2 - - ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 3000.0_r_def - real(kind=r_def) :: machine_tol - real(kind=r_def) :: relative_diff - real(kind=r_def), parameter :: eps = 1e-30_r_def - - integer(kind=tik) :: id - - if ( LPROF ) call start_timing( id, 'atlt_bl_inc_alg' ) - - vector_space_wtheta_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, Wtheta ) - vector_space_w2_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W2 ) - vector_space_w3_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W3 ) - - call auv % initialise( vector_space = vector_space_w2_ptr, name = 'auv' ) - call buv_inv % initialise( vector_space = vector_space_w2_ptr, name = 'buv_inv' ) - - call u_inc % initialise( vector_space = vector_space_w2_ptr, name = 'u_inc' ) - call u % initialise( vector_space = vector_space_w2_ptr, name = 'u' ) - - face_selector_ew => get_face_selector_ew(mesh%get_id()) - face_selector_ns => get_face_selector_ns(mesh%get_id()) - - call u_inc % copy_field_properties( u_inc_input ) - call u % copy_field_properties( u_input ) - - ! Initialise arguments and call the tangent-linear kernel. - call invoke( setval_random( u ), & - setval_x( u_input, u ), & - setval_random( u_inc ), & - setval_x( u_inc_input, u_inc ) ) - - ! LS init - call assign_field_random_range( auv, -1.0_r_def, 1.0_r_def ) - call assign_field_random_range( buv_inv, 1.0_r_def, 2.0_r_def ) ! must avoid 0 - - ! < Mx, Mx > - call invoke ( tl_bl_inc_kernel_type( u_inc, & - u, & - auv,buv_inv, & - face_selector_ew, & - face_selector_ns, & - Blevs_m ) ) - call invoke ( x_innerproduct_x( ip1(1), u_inc ), & - x_innerproduct_x( ip1(2), u ) ) - - sf(1) = 1.0_r_def / (ip1(1) + eps) - sf(2) = 1.0_r_def / (ip1(2) + eps) - - inner1 = 0.0_r_def - inner1 = inner1 + ip1(1) * sf(1) - inner1 = inner1 + ip1(2) * sf(2) - - ! Scaling fields - call invoke( inc_a_times_X( sf(1), u_inc ), & - inc_a_times_X( sf(2), u ) ) - - ! < AMx, x > - call invoke ( atl_bl_inc_kernel_type( u_inc, & - u, & - auv,buv_inv, & - face_selector_ew, & - face_selector_ns, & - Blevs_m ) ) - - call invoke ( x_innerproduct_y( ip2(1), u_inc, u_inc_input ), & - x_innerproduct_y( ip2(2), u, u_input ) ) - - inner2 = 0.0_r_def - inner2 = inner2 + ip2(1) - inner2 = inner2 + ip2(2) - - write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: ip1=', & - ip1(1) * sf(1), ip1(2) * sf(2) - call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: ip2=', ip2 - call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: s(ip1),s(ip2)=', & - inner1, inner2 - call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - - ! Test the inner-product values for equality, allowing for the precision of the active variables - machine_tol = spacing( max( abs(inner1), abs(inner2) ) ) - relative_diff = abs(inner1 - inner2) / machine_tol - if (relative_diff < overall_tolerance) then - write(log_scratch_space, *) "PASSED tl_bl_inc:", inner1, inner2, relative_diff - call log_event(log_scratch_space, LOG_LEVEL_INFO) - else - write(log_scratch_space, *) "FAILED tl_bl_inc:", inner1, inner2, relative_diff - call log_event(log_scratch_space, LOG_LEVEL_ERROR) - end if - - if ( LPROF ) call stop_timing( id, 'atlt_bl_inc_alg' ) - - end subroutine atlt_bl_inc_alg - -end module atlt_bl_inc_alg_mod diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 index c8b3833f5..096545519 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly1d_recon_lookup_alg_mod.x90 @@ -17,7 +17,7 @@ module adjt_poly1d_recon_lookup_alg_mod use r_tran_field_mod, only : r_tran_field_type use mesh_mod, only : mesh_type use fs_continuity_mod, only : Wtheta - use constants_mod, only : i_def, r_def, r_tran, EPS + use constants_mod, only : i_def, r_def, r_tran use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -79,9 +79,10 @@ module adjt_poly1d_recon_lookup_alg_mod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_tran) :: inner2 + real(kind=r_tran), parameter :: eps = 1.0e-30_r_def ! Test parameters and variables - real(kind=r_tran), parameter :: overall_tolerance = 2500.0_r_tran + real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran real(kind=r_tran) :: machine_tol real(kind=r_tran) :: relative_diff @@ -122,8 +123,8 @@ module adjt_poly1d_recon_lookup_alg_mod x_innerproduct_x( tracer_inner_prod, tracer ) ) ! Determining scale factors - reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + EPS ) - tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + EPS ) + reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + eps ) + tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + eps ) inner1 = 0.0_r_tran inner1 = inner1 + real( reconstruction_inner_prod, r_tran )*reconstruction_sf diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 index 8d9ff6466..ed53392d1 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly2d_recon_lookup_alg_mod.x90 @@ -16,7 +16,7 @@ module adjt_poly2d_recon_lookup_alg_mod use fs_continuity_mod, only : name_from_functionspace use finite_element_config_mod, only : element_order_h, & element_order_v - use constants_mod, only : i_def, r_def, r_tran, EPS + use constants_mod, only : i_def, r_def, r_tran use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -84,6 +84,7 @@ module adjt_poly2d_recon_lookup_alg_mod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_tran) :: inner2 + real(kind=r_tran), parameter :: eps = 1.0e-30_r_def ! Test parameters and variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -130,8 +131,8 @@ module adjt_poly2d_recon_lookup_alg_mod x_innerproduct_x( tracer_inner_prod, tracer ) ) ! Determining scale factors - reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + EPS ) - tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + EPS ) + reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + eps ) + tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + eps ) inner1 = 0.0_r_tran inner1 = inner1 + real( reconstruction_inner_prod, r_tran )*reconstruction_sf diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 index 311c89b38..501399468 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_poly_adv_upd_lookup_alg_mod.x90 @@ -18,7 +18,7 @@ module adjt_poly_adv_upd_lookup_alg_mod use integer_field_mod, only : integer_field_type, & integer_field_proxy_type use fs_continuity_mod, only : W2H, Wtheta - use constants_mod, only : i_def, r_def, r_tran, l_def, EPS + use constants_mod, only : i_def, r_def, r_tran, l_def use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -81,6 +81,7 @@ module adjt_poly_adv_upd_lookup_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_tran) :: inner2 + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran ! Test variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -124,8 +125,8 @@ module adjt_poly_adv_upd_lookup_alg_mod x_innerproduct_x( reconstruction_inner_prod, reconstruction) ) ! Determining scale factors - advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + EPS ) - reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + EPS ) + advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + eps ) + reconstruction_sf = 1.0_r_tran/( real( reconstruction_inner_prod, r_tran ) + eps ) inner1 = 0.0_r_tran inner1 = inner1 + real( advective_inner_prod, r_tran )*advective_sf diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 index 112891ecb..9a076295e 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 @@ -16,7 +16,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod use function_space_collection_mod, only : function_space_collection use finite_element_config_mod, only : element_order_h, element_order_V use operator_mod, only : operator_type - use constants_mod, only : i_def, r_def, r_tran, EPS + use constants_mod, only : i_def, r_def, r_tran use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -78,6 +78,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod real(kind=r_def) :: adv_inc_adv_inc_inp_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_tran) :: inner2 + real(kind=r_tran), parameter :: eps = 1.0e-30_r_def ! Test parameters and variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -124,8 +125,8 @@ module adjt_w3h_adv_upd_lookup_alg_mod x_innerproduct_x(tracer_inner_prod, tracer) ) ! Determining scale factors - advective_increment_sf = 1.0_r_tran/( real( advective_increment_inner_prod, r_tran ) + EPS ) - tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + EPS ) + advective_increment_sf = 1.0_r_tran/( real( advective_increment_inner_prod, r_tran ) + eps ) + tracer_sf = 1.0_r_tran/( real( tracer_inner_prod, r_tran ) + eps ) inner1 = 0.0_r_tran inner1 = inner1 + real( advective_increment_inner_prod, r_tran )*advective_increment_sf @@ -145,7 +146,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod adv_inc_adv_inc_inp_inner_prod = 0.0_r_def tracer_tracer_input_inner_prod = 0.0_r_def - lookup_w3h_adv_upd => adj_lookup_table_cache%get_lookup_w3h_adv_upd(wind%which_function_space()) + lookup_w3h_adv_upd => adj_lookup_table_cache%get_lookup_w3h_adv_upd() lookup_w3h_adv_upd_field => lookup_w3h_adv_upd%get_lookup_field() set_count_w3h_adv_upd_field => lookup_w3h_adv_upd%get_set_count_field() nsets = lookup_w3h_adv_upd%get_nsets_max() diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 index ae617be40..36906bb77 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_operator_alg_mod.x90 @@ -7,7 +7,7 @@ module adjt_mixed_operator_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver, EPS + use constants_mod, only: i_def, r_def, l_def, r_solver use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_DEBUG, & @@ -82,7 +82,8 @@ contains real(kind=r_def) :: inner1, inner2 real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver - real(kind=r_def), parameter :: overall_tolerance = 2000.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def + real(kind=r_def), parameter :: eps = 1e-30_r_def integer(kind=tik) :: id if ( LPROF ) call start_timing( id, 'adjt_mixed_operator_alg' ) @@ -166,9 +167,9 @@ contains write(log_scratch_space, *) "w inner product = ", w_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - p_sf = 1.0_r_def / (p_inner_prod + EPS) - uv_sf = 1.0_r_def / (uv_inner_prod + EPS) - w_sf = 1.0_r_def / (w_inner_prod + EPS) + p_sf = 1.0_r_def / (p_inner_prod + eps) + uv_sf = 1.0_r_def / (uv_inner_prod + eps) + w_sf = 1.0_r_def / (w_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 index d29d53c46..5972ce407 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 @@ -7,8 +7,7 @@ module adjt_mixed_schur_preconditioner_alg_mod - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type - use constants_mod, only: i_def, r_def, l_def, r_solver, EPS + use constants_mod, only: i_def, r_def, l_def, r_solver use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -60,18 +59,16 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adjt_mixed_schur_preconditioner_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine adjt_mixed_schur_preconditioner_alg( modeldb, mesh, model_clock ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Prognostic fields type(field_type), dimension(bundle_size) :: rhs @@ -107,9 +104,10 @@ contains real(kind=r_def) :: p_sf, uv_sf, w_sf real(kind=r_def) :: p_p_inp_inner_prod, uv_uv_inp_inner_prod, w_w_inp_inner_prod real(kind=r_def) :: inner1, inner2 - real(kind=r_def), parameter :: overall_tolerance = 1100.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver + real(kind=r_def), parameter :: eps = 1e-30_r_def integer(kind=tik) :: id if ( LPROF ) call start_timing( id, 'adjt_mixed_schur_preconditioner_alg' ) @@ -168,8 +166,7 @@ contains call create_pressure_solver( pressure_operator, pressure_preconditioner, pressure_solver ) call create_mixed_preconditioner( rhs, pressure_solver, mixed_preconditioner ) - call create_adj_pressure_preconditioner( rhs, adj_lookup_table_cache, & - adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) call create_adj_pressure_solver( adj_pressure_operator, adj_pressure_preconditioner, adj_pressure_solver ) call create_adj_mixed_preconditioner( rhs, adj_pressure_solver, adj_mixed_preconditioner ) @@ -203,9 +200,9 @@ contains write(log_scratch_space, *) "w inner product = ", w_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - p_sf = 1.0_r_def / (p_inner_prod + EPS) - uv_sf = 1.0_r_def / (uv_inner_prod + EPS) - w_sf = 1.0_r_def / (w_inner_prod + EPS) + p_sf = 1.0_r_def / (p_inner_prod + eps) + uv_sf = 1.0_r_def / (uv_inner_prod + eps) + w_sf = 1.0_r_def / (w_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 index 51b712148..bf8b9658d 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 @@ -7,8 +7,7 @@ module adjt_mixed_solver_alg_mod - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type - use constants_mod, only: i_def, r_def, l_def, r_solver, EPS + use constants_mod, only: i_def, r_def, l_def, r_solver use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -71,18 +70,16 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adjt_mixed_solver_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine adjt_mixed_solver_alg( modeldb, mesh, model_clock ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Prognostic fields type(field_type) :: rhs(bundle_size) @@ -124,9 +121,10 @@ contains real(kind=r_def) :: p_sf, uv_sf, w_sf real(kind=r_def) :: p_p_inp_inner_prod, uv_uv_inp_inner_prod, w_w_inp_inner_prod real(kind=r_def) :: inner1, inner2 - real(kind=r_def), parameter :: overall_tolerance = 1300.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver + real(kind=r_def), parameter :: eps = 1e-30_r_def integer(tik) :: id if ( LPROF ) call start_timing( id, 'adjt_mixed_solver_alg' ) @@ -198,8 +196,7 @@ contains call create_mixed_preconditioner( rhs, pressure_solver, mixed_preconditioner ) call create_mixed_solver( mixed_preconditioner, mixed_operator, mixed_solver ) - call create_adj_pressure_preconditioner( rhs, adj_lookup_table_cache, & - adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) call create_adj_pressure_solver( adj_pressure_operator, adj_pressure_preconditioner, adj_pressure_solver ) call create_adj_mixed_preconditioner( rhs, adj_pressure_solver, adj_mixed_preconditioner ) call create_adj_mixed_solver( adj_mixed_preconditioner, adj_mixed_operator, adj_mixed_solver ) @@ -235,9 +232,9 @@ contains call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) ! Scaling factors are scaled up a bit to avoid numerical issues - p_sf = 1.0E4_r_def / (p_inner_prod + EPS) - uv_sf = 1.0E4_r_def / (uv_inner_prod + EPS) - w_sf = 1.0E4_r_def / (w_inner_prod + EPS) + p_sf = 1.0E4_r_def / (p_inner_prod + eps) + uv_sf = 1.0E4_r_def / (uv_inner_prod + eps) + w_sf = 1.0E4_r_def / (w_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 index ea0c0eb80..0e2ae0aa6 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 @@ -7,8 +7,7 @@ module adjt_pressure_precon_alg_mod - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type - use constants_mod, only: i_def, r_def, l_def, r_solver, EPS + use constants_mod, only: i_def, r_def, l_def, r_solver use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -54,18 +53,16 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adjt_pressure_precon_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine adjt_pressure_precon_alg( modeldb, mesh, model_clock ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Prognostic fields type(field_type), dimension(bundle_size) :: rhs @@ -99,6 +96,7 @@ contains real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver + real(kind=r_def), parameter :: eps = 1e-30_r_def integer(tik) :: id if ( LPROF ) call start_timing( id, 'adjt_pressure_precon_alg' ) @@ -155,10 +153,7 @@ contains call create_pressure_preconditioner( rhs, pressure_operator, pressure_preconditioner ) - call create_adj_pressure_preconditioner( rhs, & - adj_lookup_table_cache, & - adj_pressure_operator, & - adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) ! Size = 1 as only P field needed vector_x = r_solver_field_vector_type(1_i_def) @@ -189,7 +184,7 @@ contains write(log_scratch_space, *) "p inner product = ", p_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - p_sf = 1.0_r_def / (p_inner_prod + EPS) + p_sf = 1.0_r_def / (p_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + p_inner_prod * p_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 index 33a2a9f96..81c23dd57 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_scaled_matrix_vector_alg_mod.x90 @@ -9,7 +9,7 @@ !> @brief Module containing adjoint test for scaled_matrix_vector_kernel module adjt_scaled_matrix_vector_alg_mod - use constants_mod, only: i_def, r_def, l_def, r_solver, EPS + use constants_mod, only: i_def, r_def, l_def, r_solver use field_mod, only: field_type use finite_element_config_mod, only: element_order_h, element_order_v use fs_continuity_mod, only: W2, W3, Wtheta @@ -77,6 +77,7 @@ module adjt_scaled_matrix_vector_alg_mod real(kind=r_def) :: machine_tolerance real(kind=r_def) :: relative_diff real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Setup @@ -127,7 +128,7 @@ module adjt_scaled_matrix_vector_alg_mod write(log_scratch_space, *) "vector inner product = ", vector_inner_prod call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) - vector_sf = 1.0_r_def / (vector_inner_prod + EPS) + vector_sf = 1.0_r_def / (vector_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + vector_inner_prod * vector_sf diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 index 3e61588ff..2492720a6 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 @@ -7,8 +7,7 @@ module adjt_semi_implicit_solver_step_alg_mod - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type - use constants_mod, only: i_def, r_def, l_def, r_solver, EPS + use constants_mod, only: i_def, r_def, l_def, r_solver use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -48,18 +47,16 @@ contains !> @brief Adjoint test for semi_implicit_solver_alg_mod subroutine step !> @details Does some setup, then calls the actual test via a private subroutine !! twice with different flag values - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adjt_semi_implicit_solver_step_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine adjt_semi_implicit_solver_step_alg( modeldb, mesh, model_clock ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Prognostic fields type(field_type), dimension(bundle_size) :: state @@ -156,7 +153,7 @@ contains call compute_si_operators( ls_theta, ls_rho, ls_exner, & model_clock, ls_moist_dyn ) - call adj_semi_implicit_solver%initialise(rhs, adj_lookup_table_cache) + call adj_semi_implicit_solver%initialise(rhs) ! Set up moist_dyn_gas_law & mr call moist_dyn_gas_law%initialise(vector_space=vector_space_wtheta_ptr) @@ -258,6 +255,7 @@ contains real(kind=r_def), parameter :: overall_tolerance = 1000.0_r_def real(kind=r_def) :: machine_tol, machine_tol_r_solver real(kind=r_def) :: relative_diff, relative_diff_r_solver + real(kind=r_def), parameter :: eps = 1e-30_r_def integer(kind=i_def) :: i @@ -313,17 +311,17 @@ contains end do ! Scaling factors are scaled up a bit to avoid numerical issues - state_sf(igh_u) = 1.0E4_r_def / (state_inner_prod(igh_u) + EPS) - state_sf(igh_t) = 1.0E4_r_def / (state_inner_prod(igh_t) + EPS) - state_sf(igh_d) = 1.0E4_r_def / (state_inner_prod(igh_d) + EPS) - state_sf(igh_p) = 1.0E4_r_def / (state_inner_prod(igh_p) + EPS) - rhs_sf(igh_u) = 1.0E4_r_def / (rhs_inner_prod(igh_u) + EPS) - rhs_sf(igh_t) = 1.0E4_r_def / (rhs_inner_prod(igh_t) + EPS) - rhs_sf(igh_d) = 1.0E4_r_def / (rhs_inner_prod(igh_d) + EPS) - rhs_sf(igh_p) = 1.0E4_r_def / (rhs_inner_prod(igh_p) + EPS) - moist_dyn_gas_law_sf = 1.0E4_r_def / (moist_dyn_gas_law_inner_prod + EPS) + state_sf(igh_u) = 1.0E4_r_def / (state_inner_prod(igh_u) + eps) + state_sf(igh_t) = 1.0E4_r_def / (state_inner_prod(igh_t) + eps) + state_sf(igh_d) = 1.0E4_r_def / (state_inner_prod(igh_d) + eps) + state_sf(igh_p) = 1.0E4_r_def / (state_inner_prod(igh_p) + eps) + rhs_sf(igh_u) = 1.0E4_r_def / (rhs_inner_prod(igh_u) + eps) + rhs_sf(igh_t) = 1.0E4_r_def / (rhs_inner_prod(igh_t) + eps) + rhs_sf(igh_d) = 1.0E4_r_def / (rhs_inner_prod(igh_d) + eps) + rhs_sf(igh_p) = 1.0E4_r_def / (rhs_inner_prod(igh_p) + eps) + moist_dyn_gas_law_sf = 1.0E4_r_def / (moist_dyn_gas_law_inner_prod + eps) do i = 1, nummr - mr_sf(i) = 1.0E4_r_def / (mr_inner_prod(i) + EPS) + mr_sf(i) = 1.0E4_r_def / (mr_inner_prod(i) + eps) end do inner1 = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 index 7fa6bf71e..9342ce993 100644 --- a/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/common/adjt_end_transport_step_alg_mod.x90 @@ -21,7 +21,7 @@ module adjt_end_transport_step_alg_mod use model_clock_mod, only : model_clock_type use finite_element_config_mod, only : element_order_h, & element_order_v - use fs_continuity_mod, only : W2, W2V + use fs_continuity_mod, only : W2 use function_space_collection_mod, only : function_space_collection use setup_test_alg_mod, only : setup_test_tl_transport_controller use init_from_controller_alg_mod, only : init_counter_fieldvals @@ -78,7 +78,6 @@ module adjt_end_transport_step_alg_mod ! Variables for initialising fields type(function_space_type), pointer :: vector_space_w2_ptr - type(function_space_type), pointer :: vector_space_w2v_ptr ! Inner products real(kind=r_tran) :: inner1 @@ -109,16 +108,13 @@ module adjt_end_transport_step_alg_mod vector_space_w2_ptr => function_space_collection%get_fs( & mesh, element_order_h, element_order_v, W2 & - ) - vector_space_w2v_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W2V) + ) - ! Assume that the last split step is in W2V (for VHV splitting) call sum_flux%initialise( vector_space = vector_space_w2_ptr ) - call flux_last_step%initialise( vector_space = vector_space_w2v_ptr ) + call flux_last_step%initialise( vector_space = vector_space_w2_ptr ) call sum_flux_input%initialise( vector_space = vector_space_w2_ptr ) - call flux_last_step_input%initialise( vector_space = vector_space_w2v_ptr ) + call flux_last_step_input%initialise( vector_space = vector_space_w2_ptr ) sum_flux_inner_prod = 0.0_r_def flux_last_step_inner_prod = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 index a4d64e064..08a3b7a2b 100644 --- a/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/common/atlt_end_transport_step_alg_mod.x90 @@ -21,14 +21,12 @@ module atlt_end_transport_step_alg_mod use model_clock_mod, only : model_clock_type use finite_element_config_mod, only : element_order_h, & element_order_v - use fs_continuity_mod, only : W2, W3, W2V + use fs_continuity_mod, only : W2, W3 use function_space_collection_mod, only : function_space_collection use tl_transport_controller_mod, only : tl_transport_controller_type use transport_controller_mod, only : transport_controller_type use flux_precomputations_alg_mod, only : flux_precomputations_type use transport_counter_mod, only : transport_counter_type - use split_transport_utils_mod, only : get_num_split_steps, & - get_direction_w2_fs use setup_test_alg_mod, only : setup_test_tl_transport_controller use transport_metadata_collection_mod, only : transport_metadata_collection use transport_metadata_mod, only : transport_metadata_type @@ -235,9 +233,6 @@ module atlt_end_transport_step_alg_mod type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_2_inp ! Variables for initialising fields - integer(kind=i_def) :: splitting - integer(kind=i_def) :: num_split_steps - integer(kind=i_def) :: fs_id type(function_space_type), pointer :: vector_space_w2_ptr type(function_space_type), pointer :: vector_space_w3_ptr @@ -289,16 +284,11 @@ module atlt_end_transport_step_alg_mod dummy_ref_mass_2_inp, & pert_transport_controller ) - ! W2 function space appropriate for splitting (fs on the last step) - splitting = transport_metadata%get_splitting() - num_split_steps = get_num_split_steps(splitting) - fs_id = get_direction_w2_fs(splitting, num_split_steps) - vector_space_w2_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, fs_id & + vector_space_w2_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W2 & ) - - vector_space_w3_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3 & + vector_space_w3_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3 & ) call field_np1%initialise( vector_space = vector_space_w3_ptr ) diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 index 0f706f161..fe4808112 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing adjoint test for atl_moist_mr_transport_alg module atlt_moist_mr_transport_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -50,10 +49,9 @@ module atlt_moist_mr_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products < Mx, Mx > and < AMx, x >, !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_moist_mr_transport_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_moist_mr_transport_alg( mesh, model_clock ) use tl_moist_mr_transport_alg_mod, only : tl_moist_mr_transport_alg use atl_moist_mr_transport_alg_mod, only : atl_moist_mr_transport_alg @@ -61,9 +59,8 @@ module atlt_moist_mr_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type), dimension(:), allocatable :: mr_out @@ -205,9 +202,8 @@ module atlt_moist_mr_transport_alg_mod call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_3d ) ! Adjoint - call atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, nummr_to_transport, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + call atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, & + nummr_to_transport, tl_transport_controller, transport_metadata ) ! < AMx, x > inner2 = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 index 1b027ea72..711799f0b 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing adjoint test for atl_theta_transport_alg module atlt_theta_transport_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -49,10 +48,9 @@ module atlt_theta_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_theta_transport_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_theta_transport_alg( mesh, model_clock ) use tl_theta_transport_alg_mod, only : tl_theta_transport_alg use atl_theta_transport_alg_mod, only : atl_theta_transport_alg @@ -60,9 +58,8 @@ module atlt_theta_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: theta_out @@ -215,8 +212,7 @@ module atlt_theta_transport_alg_mod ! Adjoint call atl_theta_transport_alg( theta_out, theta_inc, theta_in, ls_theta_in, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + tl_transport_controller, transport_metadata ) ! < AMx, x > call invoke( x_innerproduct_y( thout_thout_inp_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 index 3ac396cab..93f7e94aa 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing adjoint test for atl_transport_control_alg module atlt_transport_control_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use constants_mod, only : r_def, i_def, l_def @@ -35,18 +34,16 @@ module atlt_transport_control_alg_mod !============================================================================= !> @brief Adjoint test for atl_transport_control_alg - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock !> - subroutine atlt_transport_control_alg( mesh, model_clock, adj_lookup_table_cache ) + subroutine atlt_transport_control_alg( mesh, model_clock ) implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Passive arguments for tl and adj calls type(field_type) :: ls_advected_fields(bundle_size) @@ -105,8 +102,7 @@ module atlt_transport_control_alg_mod ls_wind_n, & ls_mr_in, & model_clock, & - outer, & - adj_lookup_table_cache ) + outer ) end do @@ -123,7 +119,6 @@ module atlt_transport_control_alg_mod !> @param[in] ls_mr_in Linearisation state mixing ratios !> @param[in] model_clock The model clock !> @param[in] outer The outer iteration variable - !> @param[in] adj_lookup_table_cache Lookup table cache !> subroutine run_atlt_transport_control_alg( vector_space_wtheta_ptr, & vector_space_w2_ptr, & @@ -133,8 +128,7 @@ module atlt_transport_control_alg_mod ls_wind_n, & ls_mr_in, & model_clock, & - outer, & - adj_lookup_table_cache ) + outer ) use tl_transport_control_alg_mod, only : tl_transport_control_alg use atl_transport_control_alg_mod, only : atl_transport_control_alg @@ -151,7 +145,6 @@ module atlt_transport_control_alg_mod type(field_type), dimension(:), intent(in) :: ls_mr_in type(model_clock_type), intent(in) :: model_clock integer(kind=i_def), intent(in) :: outer - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Active arguments for tl and adj calls type(field_type) :: advection_inc(bundle_size) @@ -374,7 +367,7 @@ module atlt_transport_control_alg_mod wind_np1, wind_n, mr_out, mr_in, & ls_advected_fields, & ls_wind_np1, ls_wind_n, ls_mr_in, & - model_clock, outer, adj_lookup_table_cache ) + model_clock, outer ) ! < AMx, x > ai_ai_inp_inner_prod = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 index 182c70400..d1120743d 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing adjoint test for atl_transport_field_alg module atlt_transport_field_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -28,19 +27,13 @@ module atlt_transport_field_alg_mod use setup_test_alg_mod, only : setup_test_tl_transport_controller use inner_from_controller_rdef_alg_mod, only : flux_pc_ref_flux_prod_rdef, & flux_pc_ref_flux_inp_prod_rdef, & - counter_flux_prod_rdef, & - counter_flux_inp_prod_rdef, & - counter_field_n_prod_rdef, & - counter_field_n_inp_prod_rdef, & wind_pc_dir_prod_rdef, & wind_pc_dir_inp_prod_rdef use init_from_controller_alg_mod, only : init_flux_pc_fieldvals, & - init_wind_pc_fieldvals, & - init_counter_fieldvals + init_wind_pc_fieldvals use transport_enumerated_types_mod, only : direction_3d, & direction_h, & direction_v - use fs_continuity_mod, only : W3 implicit none @@ -54,10 +47,9 @@ module atlt_transport_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_transport_field_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_transport_field_alg( mesh, model_clock ) use tl_transport_field_mod, only : tl_transport_field use atl_transport_field_mod, only : atl_transport_field @@ -65,9 +57,8 @@ module atlt_transport_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -95,25 +86,18 @@ module atlt_transport_field_alg_mod ! Variables used to handle calculations for fields stored in tl_transport_controller integer(kind=i_def) :: mesh_id - type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: pert_transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_metadata_type), pointer :: transport_metadata type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp - type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp2 type(r_tran_field_type), dimension(:), allocatable :: fpc_pert_wind_ref_flux_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_2_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_2_inp - type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_3_inp - type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_3_inp type(r_tran_field_type) :: wind_pc_h_inp type(r_tran_field_type) :: wind_pc_v_inp type(r_tran_field_type) :: wind_pc_3d_inp - type(r_tran_field_type) :: tctr_field_n_inp - type(r_tran_field_type), dimension(:), allocatable :: tctr_flux_inp - type(function_space_type), pointer :: vector_space_w3_ptr ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -122,16 +106,11 @@ module atlt_transport_field_alg_mod mesh_id = mesh%get_id() call setup_test_tl_transport_controller( mesh, model_clock, tl_transport_controller, field_n, field_n_fs ) - transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() transport_metadata => pert_transport_controller%get_transport_metadata() ! Initialising fields - call init_counter_fieldvals( mesh, & - tctr_field_n_inp, & - tctr_flux_inp, & - pert_transport_controller ) call init_flux_pc_fieldvals( mesh, & 1_i_def, & fpc_ls_wind_ref_flux_inp, & @@ -144,12 +123,6 @@ module atlt_transport_field_alg_mod dummy_ref_field_2_inp, & dummy_ref_mass_2_inp, & pert_transport_controller ) - call init_flux_pc_fieldvals( mesh, & - 1_i_def, & - fpc_ls_wind_ref_flux_inp2, & - dummy_ref_field_3_inp, & - dummy_ref_mass_3_inp, & - transport_controller ) call init_wind_pc_fieldvals( mesh, & wind_pc_h_inp, & direction_h, & @@ -163,11 +136,6 @@ module atlt_transport_field_alg_mod direction_3d, & pert_transport_controller ) - vector_space_w3_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3 & - ) - call field_n%initialise(vector_space = vector_space_w3_ptr) - call field_n%copy_field_properties( field_np1 ) call field_n%copy_field_properties( ls_field_n ) @@ -179,7 +147,6 @@ module atlt_transport_field_alg_mod ! Initialise values and call the tangent-linear alg. call invoke( setval_random( field_np1 ), & - setval_random( field_n ), & setval_x( field_np1_input, field_np1 ), & setval_x( field_n_input, field_n ), & setval_random( ls_field_n ) ) @@ -212,7 +179,6 @@ module atlt_transport_field_alg_mod call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_h ) call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_v ) call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_3d ) - call counter_flux_prod_rdef( inner1, pert_transport_controller ) ! Scaling fields call invoke( inc_a_times_X( field_np1_sf, field_np1 ), & @@ -225,8 +191,7 @@ module atlt_transport_field_alg_mod ! Adjoint call atl_transport_field( & field_np1, field_n, ls_field_n, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache & + tl_transport_controller, transport_metadata & ) ! < AMx, x > @@ -245,7 +210,6 @@ module atlt_transport_field_alg_mod call wind_pc_dir_inp_prod_rdef( inner2, pert_transport_controller, mesh_id, direction_h, wind_pc_h_inp ) call wind_pc_dir_inp_prod_rdef( inner2, pert_transport_controller, mesh_id, direction_v, wind_pc_v_inp ) call wind_pc_dir_inp_prod_rdef( inner2, pert_transport_controller, mesh_id, direction_3d, wind_pc_3d_inp ) - call counter_flux_inp_prod_rdef( inner2, pert_transport_controller, tctr_flux_inp ) call tl_transport_controller%finalise() if ( allocated(fpc_ls_wind_ref_flux_inp) ) deallocate( fpc_ls_wind_ref_flux_inp ) diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 index 480c73a96..8fd27ff48 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing adjoint test for atl_wind_transport_alg module atlt_wind_transport_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -49,10 +48,9 @@ module atlt_wind_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_wind_transport_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_wind_transport_alg( mesh, model_clock ) use tl_wind_transport_alg_mod, only : tl_wind_transport_alg use atl_wind_transport_alg_mod, only : atl_wind_transport_alg @@ -60,9 +58,8 @@ module atlt_wind_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: rhs_u @@ -197,9 +194,8 @@ module atlt_wind_transport_alg_mod wn_wn_inp_inner_prod = 0.0_r_def ! Adjoint - call atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + call atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & + tl_transport_controller, transport_metadata ) ! < AMx, x > call invoke( x_innerproduct_y( ru_ru_inp_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 index d33548660..17e300fa3 100644 --- a/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/init_from_controller_alg_mod.x90 @@ -222,9 +222,7 @@ module init_from_controller_alg_mod if ( flux_ptr%is_initialised() ) then call invoke( setval_X( counter_flux_inp(step), flux_ptr ) ) else - call counter_flux_inp(step)%copy_field_properties(flux_ptr) - call invoke( setval_random( flux_ptr ), & - setval_X( counter_flux_inp(step), flux_ptr ) ) + call invoke( setval_c( counter_flux_inp(step), 0.0_r_tran ) ) end if end do diff --git a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 index bef3c3a70..d98491647 100644 --- a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rdef_alg_mod.x90 @@ -8,7 +8,7 @@ module inner_from_controller_rdef_alg_mod - use constants_mod, only : i_def, l_def, r_def, EPS + use constants_mod, only : i_def, l_def, r_def use field_mod, only : field_type use r_tran_field_mod, only : r_tran_field_type use transport_controller_mod, only : transport_controller_type @@ -72,6 +72,7 @@ module inner_from_controller_rdef_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_flux_ptr real(kind=r_def) :: flux_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -87,7 +88,7 @@ module inner_from_controller_rdef_alg_mod flux_inner_prod = 0.0_r_def if ( ref_flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, ref_flux_ptr ) ) - flux_sf = 1.0_r_def/(flux_inner_prod + EPS) + flux_sf = 1.0_r_def/(flux_inner_prod + eps) inner = inner + flux_inner_prod*flux_sf write(log_scratch_space, *) "Flux precomputations ref_flux(step = ", step, ") inner prod = ", & flux_inner_prod @@ -163,6 +164,7 @@ module inner_from_controller_rdef_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_field_ptr real(kind=r_def) :: field_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -179,7 +181,7 @@ module inner_from_controller_rdef_alg_mod field_inner_prod = 0.0_r_def if ( ref_field_ptr%is_initialised() ) then call invoke( x_innerproduct_x( field_inner_prod, ref_field_ptr ) ) - field_sf = 1.0_r_def/(field_inner_prod + EPS) + field_sf = 1.0_r_def/(field_inner_prod + eps) inner = inner + field_inner_prod*field_sf write(log_scratch_space, *) "Flux precomputations ref_field(step = ", step, ") inner prod = ", & field_inner_prod @@ -254,6 +256,7 @@ module inner_from_controller_rdef_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_mass_ptr real(kind=r_def) :: mass_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -270,7 +273,7 @@ module inner_from_controller_rdef_alg_mod mass_inner_prod = 0.0_r_def if ( ref_mass_ptr%is_initialised() ) then call invoke( x_innerproduct_x( mass_inner_prod, ref_mass_ptr ) ) - mass_sf = 1.0_r_def/(mass_inner_prod + EPS) + mass_sf = 1.0_r_def/(mass_inner_prod + eps) inner = inner + mass_inner_prod*mass_sf write(log_scratch_space, *) "Flux precomputations ref_mass(step = ", step, ") inner prod = ", & mass_inner_prod @@ -342,6 +345,7 @@ module inner_from_controller_rdef_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: flux_ptr real(kind=r_def) :: flux_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def integer(kind=i_def) :: step integer(kind=i_def) :: num_steps real(kind=r_def) :: flux_inner_prod @@ -354,7 +358,7 @@ module inner_from_controller_rdef_alg_mod flux_inner_prod = 0.0_r_def if ( flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, flux_ptr ) ) - flux_sf = 1.0_r_def/(flux_inner_prod + EPS) + flux_sf = 1.0_r_def/(flux_inner_prod + eps) inner = inner + flux_inner_prod*flux_sf write(log_scratch_space, *) "Transport counter flux(step = ", step, ") inner prod = ", & flux_inner_prod @@ -421,6 +425,7 @@ module inner_from_controller_rdef_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: field_n_ptr real(kind=r_def) :: field_n_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: field_n_inner_prod transport_counter => transport_controller%get_transport_counter() @@ -429,7 +434,7 @@ module inner_from_controller_rdef_alg_mod if ( field_n_ptr%is_initialised() ) then field_n_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( field_n_inner_prod, field_n_ptr ) ) - field_n_sf = 1.0_r_def/(field_n_inner_prod + EPS) + field_n_sf = 1.0_r_def/(field_n_inner_prod + eps) inner = inner + field_n_inner_prod*field_n_sf write(log_scratch_space, *) "Transport counter field_n inner prod = ", & field_n_inner_prod @@ -494,6 +499,7 @@ module inner_from_controller_rdef_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -502,7 +508,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Wind precomputations(delta_t = ", delta_t, ") inner prod = ", & wind_inner_prod @@ -573,6 +579,7 @@ module inner_from_controller_rdef_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -581,7 +588,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Wind precomputations(direction = ", direction, ") inner prod = ", & wind_inner_prod @@ -645,6 +652,7 @@ module inner_from_controller_rdef_alg_mod ! Internal variables type(r_tran_field_type), pointer :: ref_field_ptr real(kind=r_def) :: ref_field_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: ref_field_inner_prod ref_field_ptr => transport_controller%get_ref_field() @@ -652,7 +660,7 @@ module inner_from_controller_rdef_alg_mod if ( ref_field_ptr%is_initialised() ) then ref_field_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( ref_field_inner_prod, ref_field_ptr ) ) - ref_field_sf = 1.0_r_def/(ref_field_inner_prod + EPS) + ref_field_sf = 1.0_r_def/(ref_field_inner_prod + eps) inner = inner + ref_field_inner_prod*ref_field_sf write(log_scratch_space, *) "Transport controller ref_field inner prod = ", & ref_field_inner_prod @@ -711,6 +719,7 @@ module inner_from_controller_rdef_alg_mod ! Internal variables type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_ptr => transport_controller%get_wind_npdt( delta_t ) @@ -718,7 +727,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Transport controller wind(delta_t = ", delta_t, ") inner prod = ", & wind_inner_prod @@ -777,6 +786,7 @@ module inner_from_controller_rdef_alg_mod ! Internal variables type(r_tran_field_type), pointer :: wind_ptr real(kind=r_def) :: wind_sf + real(kind=r_def), parameter :: eps = 1.0e-30_r_def real(kind=r_def) :: wind_inner_prod wind_ptr => transport_controller%get_transporting_wind() @@ -784,7 +794,7 @@ module inner_from_controller_rdef_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner = inner + wind_inner_prod*wind_sf write(log_scratch_space, *) "Transport controller transporting_wind inner prod = ", & wind_inner_prod diff --git a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 index 2ee21745e..4a56dd02e 100644 --- a/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/inner_from_controller_rtran_alg_mod.x90 @@ -8,8 +8,7 @@ module inner_from_controller_rtran_alg_mod - use constants_mod, only : i_def, l_def, r_def, & - r_tran, EPS + use constants_mod, only : i_def, l_def, r_def, r_tran use r_tran_field_mod, only : r_tran_field_type use transport_controller_mod, only : transport_controller_type use flux_precomputations_alg_mod, only : flux_precomputations_type @@ -63,6 +62,7 @@ module inner_from_controller_rtran_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_flux_ptr real(kind=r_tran) :: flux_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -79,7 +79,7 @@ module inner_from_controller_rtran_alg_mod flux_inner_prod = 0.0_r_def if ( ref_flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, ref_flux_ptr ) ) - flux_sf = 1.0_r_tran/( real(flux_inner_prod, r_tran) + EPS ) + flux_sf = 1.0_r_tran/( real(flux_inner_prod, r_tran) + eps ) inner = inner + real( flux_inner_prod, r_tran )*flux_sf write(log_scratch_space, *) "Flux precomputations ref_flux(step = ", step, ") inner prod = ", & real( flux_inner_prod, r_tran ) @@ -154,6 +154,7 @@ module inner_from_controller_rtran_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_field_ptr real(kind=r_tran) :: field_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -170,7 +171,7 @@ module inner_from_controller_rtran_alg_mod field_inner_prod = 0.0_r_def if ( ref_field_ptr%is_initialised() ) then call invoke( x_innerproduct_x( field_inner_prod, ref_field_ptr ) ) - field_sf = 1.0_r_tran/( real( field_inner_prod, r_tran ) + EPS ) + field_sf = 1.0_r_tran/( real( field_inner_prod, r_tran ) + eps ) inner = inner + real( field_inner_prod, r_tran )*field_sf write(log_scratch_space, *) "Flux precomputations ref_field(step = ", step, ") inner prod = ", & real( field_inner_prod, r_tran ) @@ -245,6 +246,7 @@ module inner_from_controller_rtran_alg_mod type(flux_precomputations_type), pointer :: flux_pc type(r_tran_field_type), pointer :: ref_mass_ptr real(kind=r_tran) :: mass_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps integer(kind=i_def) :: mesh_id_from_idx @@ -261,7 +263,7 @@ module inner_from_controller_rtran_alg_mod mass_inner_prod = 0.0_r_def if ( ref_mass_ptr%is_initialised() ) then call invoke( x_innerproduct_x( mass_inner_prod, ref_mass_ptr ) ) - mass_sf = 1.0_r_tran/( real( mass_inner_prod, r_tran ) + EPS ) + mass_sf = 1.0_r_tran/( real( mass_inner_prod, r_tran ) + eps ) inner = inner + real( mass_inner_prod, r_tran )*mass_sf write(log_scratch_space, *) "Flux precomputations ref_mass(step = ", step, ") inner prod = ", & real( mass_inner_prod, r_tran ) @@ -333,6 +335,7 @@ module inner_from_controller_rtran_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: flux_ptr real(kind=r_tran) :: flux_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran integer(kind=i_def) :: step integer(kind=i_def) :: num_steps real(kind=r_def) :: flux_inner_prod @@ -345,7 +348,7 @@ module inner_from_controller_rtran_alg_mod flux_inner_prod = 0.0_r_def if ( flux_ptr%is_initialised() ) then call invoke( x_innerproduct_x( flux_inner_prod, flux_ptr ) ) - flux_sf = 1.0_r_tran/( real( flux_inner_prod, r_tran ) + EPS ) + flux_sf = 1.0_r_tran/( real( flux_inner_prod, r_tran ) + eps ) inner = inner + real( flux_inner_prod, r_tran )*flux_sf write(log_scratch_space, *) "Transport counter flux(step = ", step, ") inner prod = ", & real( flux_inner_prod, r_tran ) @@ -410,6 +413,7 @@ module inner_from_controller_rtran_alg_mod type(transport_counter_type), pointer :: transport_counter type(r_tran_field_type), pointer :: field_n_ptr real(kind=r_tran) :: field_n_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran real(kind=r_def) :: field_n_inner_prod transport_counter => transport_controller%get_transport_counter() @@ -418,7 +422,7 @@ module inner_from_controller_rtran_alg_mod if ( field_n_ptr%is_initialised() ) then field_n_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( field_n_inner_prod, field_n_ptr ) ) - field_n_sf = 1.0_r_tran/( real( field_n_inner_prod, r_tran ) + EPS ) + field_n_sf = 1.0_r_tran/( real( field_n_inner_prod, r_tran ) + eps ) inner = inner + real( field_n_inner_prod, r_tran )*field_n_sf write(log_scratch_space, *) "Transport counter field_n inner prod = ", & real( field_n_inner_prod, r_tran ) @@ -483,6 +487,7 @@ module inner_from_controller_rtran_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_tran) :: wind_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -491,7 +496,7 @@ module inner_from_controller_rtran_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + EPS ) + wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + eps ) inner = inner + real( wind_inner_prod, r_tran )*wind_sf write(log_scratch_space, *) "Wind precomputations(delta_t = ", delta_t, ") inner prod = ", & real( wind_inner_prod, r_tran ) @@ -562,6 +567,7 @@ module inner_from_controller_rtran_alg_mod type(wind_precomputations_type), pointer :: wind_pc type(r_tran_field_type), pointer :: wind_ptr real(kind=r_tran) :: wind_sf + real(kind=r_tran), parameter :: eps = 1.0e-30_r_tran real(kind=r_def) :: wind_inner_prod wind_pc => transport_controller%get_wind_precomputations() @@ -570,7 +576,7 @@ module inner_from_controller_rtran_alg_mod if ( wind_ptr%is_initialised() ) then wind_inner_prod = 0.0_r_def call invoke( x_innerproduct_x( wind_inner_prod, wind_ptr ) ) - wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + EPS ) + wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + eps ) inner = inner + real( wind_inner_prod, r_tran )*wind_sf write(log_scratch_space, *) "Wind precomputations(direction = ", direction, ") inner prod = ", & real( wind_inner_prod, r_tran ) diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 index 164b3d534..0ccda5295 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 @@ -6,10 +6,9 @@ !> @brief Module containing adjoint test for adj_reconstruct_w3_field_alg module adjt_reconstruct_w3_field_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def, EPS + use constants_mod, only : r_def, i_def, l_def use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -23,6 +22,7 @@ module adjt_reconstruct_w3_field_alg_mod use function_space_collection_mod, only : function_space_collection use transport_metadata_collection_mod, only : transport_metadata_collection use transport_metadata_mod, only : transport_metadata_type + use check_configuration_mod, only : get_required_stencil_depth implicit none @@ -36,10 +36,9 @@ module adjt_reconstruct_w3_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adjt_hori_w3_reconstruct_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine adjt_hori_w3_reconstruct_alg( mesh, model_clock ) use adj_reconstruct_w3_field_alg_mod, only : adj_hori_w3_reconstruct_alg use reconstruct_w3_field_alg_mod, only : hori_w3_reconstruct_alg @@ -47,9 +46,8 @@ module adjt_reconstruct_w3_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: field_new @@ -74,6 +72,7 @@ module adjt_reconstruct_w3_field_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_new_field_new_input_inner_prod real(kind=r_def) :: field_old_field_old_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -113,8 +112,8 @@ module adjt_reconstruct_w3_field_alg_mod x_innerproduct_x( field_old_inner_prod, field_old ) ) ! Determining scale factors - field_new_sf = 1.0_r_def/(field_new_inner_prod + EPS) - field_old_sf = 1.0_r_def/(field_old_inner_prod + EPS) + field_new_sf = 1.0_r_def/(field_new_inner_prod + eps) + field_old_sf = 1.0_r_def/(field_old_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + field_new_inner_prod*field_new_sf @@ -136,8 +135,7 @@ module adjt_reconstruct_w3_field_alg_mod ! Adjoint call adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata, & - adj_lookup_table_cache ) + transport_metadata ) ! < AMx, x > call invoke( x_innerproduct_y( field_new_field_new_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 index 0eb5cc146..6c20ece3d 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing adjoint test for adj_wt_advective_update_alg module adjt_wt_advective_update_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use mesh_mod, only : mesh_type @@ -15,7 +14,7 @@ module adjt_wt_advective_update_alg_mod use finite_element_config_mod, only : element_order_h, & element_order_v use fs_continuity_mod, only : W2h, W2v, Wtheta - use constants_mod, only : i_def, r_def, l_def, EPS + use constants_mod, only : i_def, r_def, l_def use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -36,10 +35,9 @@ module adjt_wt_advective_update_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adjt_hori_wt_update_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine adjt_hori_wt_update_alg( mesh, model_clock ) use wt_advective_update_alg_mod, only : hori_wt_update_alg use adj_wt_advective_update_alg_mod, only : adj_hori_wt_update_alg @@ -47,9 +45,8 @@ module adjt_wt_advective_update_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Internal arguments for forward and adjoint type(field_type) :: u_grad_f @@ -75,6 +72,7 @@ module adjt_wt_advective_update_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod real(kind=r_def) :: inner2 + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -109,8 +107,8 @@ module adjt_wt_advective_update_alg_mod x_innerproduct_x(field_inner_prod, field) ) ! Determining scale factors - advective_sf = 1.0_r_def/(advective_inner_prod + EPS) - field_sf = 1.0_r_def/(field_inner_prod + EPS) + advective_sf = 1.0_r_def/(advective_inner_prod + eps) + field_sf = 1.0_r_def/(field_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + advective_inner_prod*advective_sf @@ -129,7 +127,7 @@ module adjt_wt_advective_update_alg_mod advective_advective_input_inner_prod = 0.0_r_def field_field_input_inner_prod = 0.0_r_def - call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, field, transport_metadata, adj_lookup_table_cache ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, field, transport_metadata ) call invoke( x_innerproduct_y(advective_advective_input_inner_prod, u_grad_f, advective_input), & x_innerproduct_y(field_field_input_inner_prod, field, field_input) ) diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 index 6082fa336..e12aa59a9 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 @@ -6,11 +6,10 @@ !> @brief Module containing adjoint test for atl_advective_and_flux_alg module atlt_advective_and_flux_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def, EPS + use constants_mod, only : r_def, i_def, l_def use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -38,10 +37,9 @@ module atlt_advective_and_flux_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_advective_and_flux_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_advective_and_flux_alg( mesh, model_clock ) use atl_advective_and_flux_alg_mod, only : atl_advective_and_flux_alg use tl_advective_and_flux_alg_mod, only : tl_advective_and_flux_alg @@ -49,9 +47,8 @@ module atlt_advective_and_flux_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: mass_flux_1 @@ -97,6 +94,7 @@ module atlt_advective_and_flux_alg_mod real(kind=r_def) :: adv_inc_adv_inc_input_inner_prod real(kind=r_def) :: density_density_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -175,11 +173,11 @@ module atlt_advective_and_flux_alg_mod x_innerproduct_x( wind_inner_prod, wind ) ) ! Determining scale factors - mass_flux_1_sf = 1.0_r_def/(mass_flux_1_inner_prod + EPS) - mass_flux_2_sf = 1.0_r_def/(mass_flux_2_inner_prod + EPS) - adv_inc_sf = 1.0_r_def/(adv_inc_inner_prod + EPS) - density_sf = 1.0_r_def/(density_inner_prod + EPS) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + mass_flux_1_sf = 1.0_r_def/(mass_flux_1_inner_prod + eps) + mass_flux_2_sf = 1.0_r_def/(mass_flux_2_inner_prod + eps) + adv_inc_sf = 1.0_r_def/(adv_inc_inner_prod + eps) + density_sf = 1.0_r_def/(density_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + mass_flux_1_inner_prod*mass_flux_1_sf @@ -219,8 +217,7 @@ module atlt_advective_and_flux_alg_mod density, wind, ls_density, ls_wind, & direction, transport_metadata, & final_rk_stage, dt, & - do_flux, do_advective, & - adj_lookup_table_cache ) + do_flux, do_advective ) ! < AMx, x > call invoke( x_innerproduct_y( mass_flux_1_mass_flux_1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 index 020220d98..92fd13b5a 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 @@ -6,11 +6,10 @@ !> @brief Module containing adjoint test for atl_mol_advective_alg module atlt_mol_advective_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def, EPS + use constants_mod, only : r_def, i_def, l_def use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -47,10 +46,9 @@ module atlt_mol_advective_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_mol_advective_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_mol_advective_alg( mesh, model_clock ) use atl_mol_advective_alg_mod, only : atl_mol_advective_alg use tl_mol_advective_alg_mod, only : tl_mol_advective_alg @@ -58,9 +56,8 @@ module atlt_mol_advective_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -84,6 +81,7 @@ module atlt_mol_advective_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_np1_field_np1_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Variables used to handle calculations for fields stored in tl_transport_controller integer(kind=i_def) :: mesh_id @@ -146,8 +144,8 @@ module atlt_mol_advective_alg_mod x_innerproduct_x( field_inner_prod, field ) ) ! Determining scale factors - field_np1_sf = 1.0_r_def/(field_np1_inner_prod + EPS) - field_sf = 1.0_r_def/(field_inner_prod + EPS) + field_np1_sf = 1.0_r_def/(field_np1_inner_prod + eps) + field_sf = 1.0_r_def/(field_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + field_np1_inner_prod*field_np1_sf @@ -171,7 +169,7 @@ module atlt_mol_advective_alg_mod field_field_input_inner_prod = 0.0_r_def ! Adjoint - call atl_mol_advective_alg( field_np1, field, ls_field, tl_transport_controller, adj_lookup_table_cache ) + call atl_mol_advective_alg( field_np1, field, ls_field, tl_transport_controller ) ! < AMx, x > call invoke( x_innerproduct_y( field_np1_field_np1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 index 2b5d89620..6f2a2cabc 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 @@ -6,11 +6,10 @@ !> @brief Module containing adjoint test for atl_mol_conservative_alg module atlt_mol_conservative_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def, EPS + use constants_mod, only : r_def, i_def, l_def use copy_field_alg_mod, only : copy_field use log_mod, only : log_event, & log_scratch_space, & @@ -57,10 +56,9 @@ module atlt_mol_conservative_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_mol_conservative_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_mol_conservative_alg( mesh, model_clock ) use atl_mol_conservative_alg_mod, only : atl_mol_conservative_alg use tl_mol_conservative_alg_mod, only : tl_mol_conservative_alg @@ -68,9 +66,8 @@ module atlt_mol_conservative_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -94,25 +91,22 @@ module atlt_mol_conservative_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_np1_field_np1_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Variables used to handle calculations for fields stored in tl_transport_controller integer(kind=i_def) :: mesh_id type(transport_controller_type), pointer :: pert_transport_controller type(transport_controller_type), pointer :: ls_transport_controller - type(transport_controller_type), pointer :: transport_controller type(field_type) :: tctr_field_n type(function_space_type), pointer :: tctr_field_n_vs type(field_type) :: tctr_field_n_inp type(r_tran_field_type), dimension(:), allocatable :: tctr_flux_inp type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp type(r_tran_field_type), dimension(:), allocatable :: fpc_pert_wind_ref_flux_inp - type(r_tran_field_type), dimension(:), allocatable :: fpc_ls_wind_ref_flux_inp2 type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_1_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_2_inp type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_2_inp - type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_field_3_inp - type(r_tran_field_type), dimension(:), allocatable :: dummy_ref_mass_3_inp type(r_tran_field_type) :: wind_pc_h_inp type(r_tran_field_type) :: wind_pc_v_inp type(r_tran_field_type) :: wind_pc_3d_inp @@ -124,7 +118,6 @@ module atlt_mol_conservative_alg_mod mesh_id = mesh%get_id() call setup_test_tl_transport_controller( mesh, model_clock, tl_transport_controller, tctr_field_n, tctr_field_n_vs ) - transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() @@ -133,12 +126,6 @@ module atlt_mol_conservative_alg_mod tctr_field_n_inp, & tctr_flux_inp, & pert_transport_controller ) - call init_flux_pc_fieldvals( mesh, & - 1_i_def, & - fpc_ls_wind_ref_flux_inp2, & - dummy_ref_field_3_inp, & - dummy_ref_mass_3_inp, & - transport_controller ) call init_flux_pc_fieldvals( mesh, & 1_i_def, & fpc_ls_wind_ref_flux_inp, & @@ -195,8 +182,8 @@ module atlt_mol_conservative_alg_mod x_innerproduct_x( field_inner_prod, field ) ) ! Determining scale factors - field_np1_sf = 1.0_r_def/(field_np1_inner_prod + EPS) - field_sf = 1.0_r_def/(field_inner_prod + EPS) + field_np1_sf = 1.0_r_def/(field_np1_inner_prod + eps) + field_sf = 1.0_r_def/(field_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + field_np1_inner_prod*field_np1_sf @@ -225,8 +212,7 @@ module atlt_mol_conservative_alg_mod ! Adjoint call atl_mol_conservative_alg( field_np1, field, ls_field, & - tl_transport_controller, & - adj_lookup_table_cache ) + tl_transport_controller ) ! < AMx, x > call invoke( x_innerproduct_y( field_np1_field_np1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 index 23e244285..374325a37 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly1d_vert_w3_recon_alg_mod.X90 @@ -12,7 +12,7 @@ module atlt_poly1d_vert_w3_recon_alg_mod use function_space_collection_mod, only : function_space_collection use finite_element_config_mod, only : element_order_h, element_order_v use fs_continuity_mod, only : W3 - use constants_mod, only : i_def, l_def, r_def, EPS + use constants_mod, only : i_def, l_def, r_def use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_DEBUG, & @@ -78,9 +78,10 @@ module atlt_poly1d_vert_w3_recon_alg_mod real(kind=r_def) :: reconstruction_reconstruction_input_inner_prod real(kind=r_def) :: tracer_tracer_input_inner_prod real(kind=r_def) :: inner2 + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 3100.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def real(kind=r_def) :: machine_tol real(kind=r_def) :: relative_diff @@ -140,8 +141,8 @@ module atlt_poly1d_vert_w3_recon_alg_mod x_innerproduct_x( tracer_inner_prod, tracer ) ) ! Determining scale factors - reconstruction_sf = 1.0_r_def/(reconstruction_inner_prod + EPS) - tracer_sf = 1.0_r_def/(tracer_inner_prod + EPS) + reconstruction_sf = 1.0_r_def/(reconstruction_inner_prod + eps) + tracer_sf = 1.0_r_def/(tracer_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + reconstruction_inner_prod*reconstruction_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 index cafc398f0..c579342e5 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_poly_adv_update_alg_mod.X90 @@ -13,7 +13,7 @@ module atlt_poly_adv_update_alg_mod use function_space_collection_mod, only : function_space_collection use finite_element_config_mod, only : element_order_h, element_order_v use fs_continuity_mod, only : W2H, Wtheta - use constants_mod, only : i_def, r_def, r_tran, EPS + use constants_mod, only : i_def, r_def, r_tran use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -61,6 +61,7 @@ module atlt_poly_adv_update_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_tran) :: inner2 + real(kind=r_tran), parameter :: eps = 1e-30_r_tran ! Test variables real(kind=r_tran), parameter :: overall_tolerance = 1500.0_r_tran @@ -102,8 +103,8 @@ module atlt_poly_adv_update_alg_mod x_innerproduct_x( wind_inner_prod, wind ) ) ! Determining scale factors - advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + EPS ) - wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + EPS ) + advective_sf = 1.0_r_tran/( real( advective_inner_prod, r_tran ) + eps ) + wind_sf = 1.0_r_tran/( real( wind_inner_prod, r_tran ) + eps ) inner1 = 0.0_r_tran inner1 = inner1 + real( advective_inner_prod, r_tran )*advective_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 index b1599e315..dc8b4c2c0 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 @@ -6,10 +6,9 @@ !> @brief Module containing handwritten adjoint test for atl_reconstruct_w3_field_alg module atlt_reconstruct_w3_field_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type - use constants_mod, only : r_def, i_def, l_def, EPS + use constants_mod, only : r_def, i_def, l_def use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_INFO, & @@ -38,10 +37,9 @@ module atlt_reconstruct_w3_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_reconstruct_w3_field_alg( mesh, model_clock, adj_lookup_table_cache ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + subroutine atlt_reconstruct_w3_field_alg( mesh, model_clock ) use atl_reconstruct_w3_field_alg_mod, only : atl_reconstruct_w3_field_alg use tl_reconstruct_w3_field_alg_mod, only : tl_reconstruct_w3_field_alg @@ -49,10 +47,8 @@ module atlt_reconstruct_w3_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache - + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: field_new @@ -80,9 +76,10 @@ module atlt_reconstruct_w3_field_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_new_field_new_input_inner_prod real(kind=r_def) :: field_old_field_old_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 3000.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def real(kind=r_def) :: machine_tol real(kind=r_def) :: relative_diff @@ -125,8 +122,8 @@ module atlt_reconstruct_w3_field_alg_mod x_innerproduct_x( field_old_inner_prod, field_old ) ) ! Determining scale factors - field_new_sf = 1.0_r_def/(field_new_inner_prod + EPS) - field_old_sf = 1.0_r_def/(field_old_inner_prod + EPS) + field_new_sf = 1.0_r_def/(field_new_inner_prod + eps) + field_old_sf = 1.0_r_def/(field_old_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + field_new_inner_prod*field_new_sf @@ -147,9 +144,8 @@ module atlt_reconstruct_w3_field_alg_mod field_old_field_old_input_inner_prod = 0.0_r_def ! Adjoint - call atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & - direction, transport_metadata, final_rk_stage, & - adj_lookup_table_cache ) + call atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & + direction, transport_metadata, final_rk_stage ) ! < AMx, x > call invoke( x_innerproduct_y( field_new_field_new_input_inner_prod, & @@ -219,6 +215,7 @@ module atlt_reconstruct_w3_field_alg_mod real(kind=r_def) :: inner2 real(kind=r_def) :: field_new_field_new_input_inner_prod real(kind=r_def) :: field_old_field_old_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -263,8 +260,8 @@ module atlt_reconstruct_w3_field_alg_mod x_innerproduct_x( field_old_inner_prod, field_old ) ) ! Determining scale factors - field_new_sf = 1.0_r_def/(field_new_inner_prod + EPS) - field_old_sf = 1.0_r_def/(field_old_inner_prod + EPS) + field_new_sf = 1.0_r_def/(field_new_inner_prod + eps) + field_old_sf = 1.0_r_def/(field_old_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + field_new_inner_prod*field_new_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 index 1f942264d..a66ed877c 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_w3h_advective_update_alg_mod.X90 @@ -13,7 +13,7 @@ module atlt_w3h_advective_update_alg_mod use finite_element_config_mod, only : element_order_h, element_order_v use fs_continuity_mod, only : W2, W3 use operator_mod, only : operator_type - use constants_mod, only : i_def, r_def, EPS + use constants_mod, only : i_def, r_def use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -67,6 +67,7 @@ module atlt_w3h_advective_update_alg_mod real(kind=r_def) :: advective_increment_advective_increment_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_def) :: inner2 + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -114,8 +115,8 @@ module atlt_w3h_advective_update_alg_mod x_innerproduct_x(wind_inner_prod, wind) ) ! Determining scale factors - advective_increment_sf = 1.0_r_def/(advective_increment_inner_prod + EPS) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + advective_increment_sf = 1.0_r_def/(advective_increment_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + advective_increment_inner_prod*advective_increment_sf diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 index a00003edc..fc15d1db0 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 @@ -6,7 +6,6 @@ !> @brief Module containing handwritten adjoint test for atl_wt_advective_update_alg_mod routines module atlt_wt_advective_update_alg_mod - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -16,7 +15,7 @@ module atlt_wt_advective_update_alg_mod use finite_element_config_mod, only : element_order_h, & element_order_v use fs_continuity_mod, only : W2h, W2v, Wtheta, W2 - use constants_mod, only : i_def, r_def, l_def, EPS + use constants_mod, only : i_def, r_def, l_def use log_mod, only : log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO, & @@ -44,10 +43,7 @@ module atlt_wt_advective_update_alg_mod !> Determined by testing the equality of inner products !> < Mx, Mx > and < AMx, x >, where M is the tangent linear !> and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atlt_wt_advective_update_alg( mesh, model_clock, adj_lookup_table_cache ) + subroutine atlt_wt_advective_update_alg( mesh, model_clock ) use atl_wt_advective_update_alg_mod, only : atl_wt_advective_update_alg use tl_wt_advective_update_alg_mod, only : tl_wt_advective_update_alg @@ -55,9 +51,8 @@ module atlt_wt_advective_update_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock ! Arguments for tl and adj calls type(field_type) :: rhs @@ -92,6 +87,7 @@ module atlt_wt_advective_update_alg_mod real(kind=r_def) :: rhs_rhs_input_inner_prod real(kind=r_def) :: adv_field_adv_field_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -154,9 +150,9 @@ module atlt_wt_advective_update_alg_mod x_innerproduct_x( wind_inner_prod, wind ) ) ! Determining scale factors - rhs_sf = 1.0_r_def/(rhs_inner_prod + EPS) - adv_field_sf = 1.0_r_def/(adv_field_inner_prod + EPS) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + rhs_sf = 1.0_r_def/(rhs_inner_prod + eps) + adv_field_sf = 1.0_r_def/(adv_field_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + rhs_inner_prod*rhs_sf @@ -182,11 +178,10 @@ module atlt_wt_advective_update_alg_mod wind_wind_input_inner_prod = 0.0_r_def ! Adjoint - call atl_wt_advective_update_alg( rhs, adv_field, wind, & - ls_adv_field, ls_wind, & - dt, direction, & - transport_metadata, final_rk_stage, & - adj_lookup_table_cache ) + call atl_wt_advective_update_alg( rhs, adv_field, wind, & + ls_adv_field, ls_wind, & + dt, direction, & + transport_metadata, final_rk_stage ) ! < AMx, x > call invoke( x_innerproduct_y( rhs_rhs_input_inner_prod, & @@ -258,6 +253,7 @@ module atlt_wt_advective_update_alg_mod real(kind=r_def) :: advective_advective_input_inner_prod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_def) :: inner2 + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -292,8 +288,8 @@ module atlt_wt_advective_update_alg_mod x_innerproduct_x(wind_inner_prod, wind) ) ! Determining scale factors - advective_sf = 1.0_r_def/(advective_inner_prod + EPS) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) + advective_sf = 1.0_r_def/(advective_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + advective_inner_prod*advective_sf @@ -380,6 +376,7 @@ module atlt_wt_advective_update_alg_mod real(kind=r_def) :: wind_wind_input_inner_prod real(kind=r_def) :: field_field_input_inner_prod real(kind=r_def) :: inner2 + real(kind=r_def), parameter :: eps = 1e-30_r_def ! Test parameters and variables real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def @@ -420,9 +417,9 @@ module atlt_wt_advective_update_alg_mod x_innerproduct_x(field_inner_prod, field) ) ! Determining scale factors - advective_sf = 1.0_r_def/(advective_inner_prod + EPS) - wind_sf = 1.0_r_def/(wind_inner_prod + EPS) - field_sf = 1.0_r_def/(field_inner_prod + EPS) + advective_sf = 1.0_r_def/(advective_inner_prod + eps) + wind_sf = 1.0_r_def/(wind_inner_prod + eps) + field_sf = 1.0_r_def/(field_inner_prod + eps) inner1 = 0.0_r_def inner1 = inner1 + advective_inner_prod*advective_sf diff --git a/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 b/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 index 9f426f45d..f9d458c4d 100644 --- a/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 +++ b/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 @@ -56,9 +56,6 @@ subroutine run( modeldb ) use adjt_poly_adv_upd_lookup_alg_mod, only : adjt_poly_adv_upd_lookup_alg use adjt_w3h_adv_upd_lookup_alg_mod, only : adjt_w3h_adv_upd_lookup_alg - ! ./linear_physics - use atlt_bl_inc_alg_mod, only : atlt_bl_inc_alg - ! Handwritten algorithm tests ! ./interpolation use adjt_interpolation_alg_mod, only : adjt_interp_w3wth_to_w2_alg, & @@ -108,9 +105,6 @@ subroutine run( modeldb ) use adjt_mixed_solver_alg_mod, only : adjt_mixed_solver_alg use adjt_semi_implicit_solver_step_alg_mod, only : adjt_semi_implicit_solver_step_alg - ! ./linear_physics - use atlt_bdy_lyr_alg_mod, only : atlt_bdy_lyr_alg - ! ./timestepping use atlt_si_timestep_alg_mod, only : atlt_si_timestep_alg @@ -153,9 +147,6 @@ subroutine run( modeldb ) ! ./core_dynamics call atlt_pressure_gradient_bd_alg( mesh ) - ! ./linear_physics - call atlt_bl_inc_alg( mesh ) - ! ./inter_function_space call adjt_sci_convert_hdiv_field_alg( mesh, chi, panel_id ) @@ -177,26 +168,26 @@ subroutine run( modeldb ) call atlt_end_con_step_alg( mesh, modeldb%clock ) ! ./transport/mol - call adjt_hori_w3_reconstruct_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call adjt_hori_w3_reconstruct_alg( mesh, modeldb%clock ) call atlt_vert_w3_reconstruct_alg( mesh, modeldb%clock ) - call atlt_reconstruct_w3_field_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_reconstruct_w3_field_alg( mesh, modeldb%clock ) call atlt_hori_wt_update_alg( mesh, modeldb%clock ) call atlt_vert_wt_update_alg( mesh, modeldb%clock ) - call adjt_hori_wt_update_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_wt_advective_update_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_advective_and_flux_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_mol_conservative_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_mol_advective_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call adjt_hori_wt_update_alg( mesh, modeldb%clock ) + call atlt_wt_advective_update_alg( mesh, modeldb%clock ) + call atlt_advective_and_flux_alg( mesh, modeldb%clock ) + call atlt_mol_conservative_alg( mesh, modeldb%clock ) + call atlt_mol_advective_alg( mesh, modeldb%clock ) ! ./transport/control - call atlt_transport_field_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_wind_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_moist_mr_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) - call atlt_theta_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_transport_field_alg( mesh, modeldb%clock ) + call atlt_wind_transport_alg( mesh, modeldb%clock ) + call atlt_moist_mr_transport_alg( mesh, modeldb%clock ) + call atlt_theta_transport_alg( mesh, modeldb%clock ) call adjt_ls_wind_pert_rho_initialiser_alg( mesh, modeldb%clock ) call adjt_pert_wind_ls_rho_initialiser_alg( mesh, modeldb%clock ) call atlt_transport_controller_initialiser_alg( mesh, modeldb%clock ) - call atlt_transport_control_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_transport_control_alg( mesh, modeldb%clock ) ! ./core_dynamics call atlt_rhs_alg( mesh, modeldb%clock ) @@ -204,15 +195,12 @@ subroutine run( modeldb ) call atlt_derive_exner_from_eos_alg( mesh ) call atlt_moist_dyn_factors_alg( mesh ) - ! ./linear_physics - call atlt_bdy_lyr_alg( modeldb, mesh ) - ! ./solver - call adjt_pressure_precon_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) + call adjt_pressure_precon_alg( modeldb, mesh, modeldb%clock ) call adjt_mixed_operator_alg( mesh, modeldb%clock ) - call adjt_mixed_schur_preconditioner_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) - call adjt_mixed_solver_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) - call adjt_semi_implicit_solver_step_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) + call adjt_mixed_schur_preconditioner_alg( modeldb, mesh, modeldb%clock ) + call adjt_mixed_solver_alg( modeldb, mesh, modeldb%clock ) + call adjt_semi_implicit_solver_step_alg( modeldb, mesh, modeldb%clock ) ! ./timestepping call atlt_si_timestep_alg( modeldb, mesh, twod_mesh, 1 ) diff --git a/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 b/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 index 9db0ddb99..09f74b4c9 100644 --- a/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 +++ b/applications/adjoint_tests/source/driver/adjoint_test_parameters_mod.F90 @@ -28,12 +28,12 @@ module adjoint_test_parameters_mod ! if the ls is not realistic. ls can still be ! randomly assigned, but in a sensible range ! to prevent these issues. - real(r_def), dimension(2), parameter :: ls_u_range = (/ 1.e2_r_def, 1.e3_r_def /) + real(r_def), dimension(2), parameter :: ls_u_range = (/ 0.0_r_def, 10.0_r_def /) real(r_def), dimension(2), parameter :: ls_theta_range = (/ 280.0_r_def, 340.0_r_def /) - real(r_def), dimension(2), parameter :: ls_rho_range = (/ 0.1_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_exner_range = (/ 0.1_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_md1_range = (/ 0.1_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_md2_range = (/ 0.1_r_def, 1.0_r_def /) - real(r_def), dimension(2), parameter :: ls_md3_range = (/ 0.1_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_rho_range = (/ 0.0_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_exner_range = (/ 0.0_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_md1_range = (/ 0.0_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_md2_range = (/ 0.0_r_def, 1.0_r_def /) + real(r_def), dimension(2), parameter :: ls_md3_range = (/ 0.0_r_def, 1.0_r_def /) end module adjoint_test_parameters_mod diff --git a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 index f5d8d9fe2..5ecef8fd2 100644 --- a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 +++ b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 @@ -10,6 +10,7 @@ module gravity_wave_infrastructure_mod use add_mesh_map_mod, only : assign_mesh_maps use driver_modeldb_mod, only : modeldb_type + use check_configuration_mod, only : get_required_stencil_depth use constants_mod, only : i_def, & PRECISION_REAL, & r_def, r_second, & @@ -80,8 +81,7 @@ subroutine initialise_infrastructure( program_name, & logical(l_def) :: prepartitioned logical :: apply_partition_check - integer(i_def) :: stencil_depth(1) - + integer(i_def) :: stencil_depth integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers @@ -191,7 +191,7 @@ subroutine initialise_infrastructure( program_name, & !======================================================================= ! 1.3 Initialise mesh objects and assign InterGrid maps !======================================================================= - stencil_depth = 2 + stencil_depth = get_required_stencil_depth() apply_partition_check = .false. if ( .not. prepartitioned .and. l_multigrid ) then apply_partition_check = .true. @@ -237,9 +237,6 @@ subroutine initialise_infrastructure( program_name, & nullify(chi_inventory, panel_id_inventory) deallocate(base_mesh_names) - deallocate(twod_names) - deallocate(extrusion) - deallocate(extrusion_2d) end subroutine initialise_infrastructure diff --git a/applications/gungho_model/example/configuration.nml b/applications/gungho_model/example/configuration.nml index aa74a254d..ea60b8aa1 100644 --- a/applications/gungho_model/example/configuration.nml +++ b/applications/gungho_model/example/configuration.nml @@ -286,7 +286,6 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. adjust_vhv_wind=.true., broken_w2_projection=.false., calculate_detj='upwind', diff --git a/applications/gungho_model/example/file_def_initial.xml b/applications/gungho_model/example/file_def_initial.xml index 42cf3bfec..2b1050253 100644 --- a/applications/gungho_model/example/file_def_initial.xml +++ b/applications/gungho_model/example/file_def_initial.xml @@ -13,8 +13,6 @@ - - diff --git a/applications/gungho_model/lam_example/baroclinic/config_driver.nml b/applications/gungho_model/lam_example/baroclinic/config_driver.nml index 0aea85072..43d72b197 100644 --- a/applications/gungho_model/lam_example/baroclinic/config_driver.nml +++ b/applications/gungho_model/lam_example/baroclinic/config_driver.nml @@ -210,7 +210,6 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/lam_example/baroclinic/config_lam.nml b/applications/gungho_model/lam_example/baroclinic/config_lam.nml index 7187243e9..d63ada536 100644 --- a/applications/gungho_model/lam_example/baroclinic/config_lam.nml +++ b/applications/gungho_model/lam_example/baroclinic/config_lam.nml @@ -226,7 +226,6 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/lam_example/straka/config_driver.nml b/applications/gungho_model/lam_example/straka/config_driver.nml index 094790169..82fd2d418 100644 --- a/applications/gungho_model/lam_example/straka/config_driver.nml +++ b/applications/gungho_model/lam_example/straka/config_driver.nml @@ -211,7 +211,6 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/lam_example/straka/config_lam.nml b/applications/gungho_model/lam_example/straka/config_lam.nml index 30a4ea4b8..636c9e6e0 100644 --- a/applications/gungho_model/lam_example/straka/config_lam.nml +++ b/applications/gungho_model/lam_example/straka/config_lam.nml @@ -223,7 +223,6 @@ log_space = .true., .false., .false. enforce_min_value=.false.,.false.,.false. max_vert_cfl_calc='uniform' min_value=0.0,0.0,-99999999.0,0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. calculate_detj='upwind', cap_density_predictor = 0.01 diff --git a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/example/configuration.nml b/applications/jedi_lfric_tests/example/configuration.nml index 3e1f564da..b2d3c1ff0 100644 --- a/applications/jedi_lfric_tests/example/configuration.nml +++ b/applications/jedi_lfric_tests/example/configuration.nml @@ -1,13 +1,13 @@ &base_mesh -file_prefix='mesh_C12_MG', +file_prefix='mesh_C12', geometry='spherical', prepartitioned=.false., -prime_mesh_name='dynamics', +prime_mesh_name='C12', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final', +transport_overwrite_freq='final' / &checks limit_cfl=.false., @@ -29,25 +29,16 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / -&convection -dx_ref=50000.0, -l_cvdiag_ctop_qmax=.false., -qlmin=4.0e-4, -resdep_precipramp=.false., -/ -&cosp -l_cosp=.false., -/ &damping_layer dl_base=40000.0, dl_str=0.05, -dl_type='standard', +dl_type='latitude', / &departure_points horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true., +share_stencil_extent=.true. vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -65,13 +56,13 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfric/data/ancils/basic-gal/Quagga/C12/n96e_l70', checkpoint_stem_name='restart', diag_stem_name='diagGungho', -ls_directory='/data/users/tim.payne/lfric_apps/files', -ls_filename='final_ls_with_land', -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', -start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', +ls_directory='/data/users/lfric/data/tangent-linear/Ticket46', +ls_filename='final_ls', +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid', +start_dump_directory='/data/users/lfric/data/tangent-linear/Ticket3590', start_dump_filename='final_pert', / &finite_element @@ -88,10 +79,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false., -horizontal_transport_predictor=.false., +horizontal_physics_predictor=.false. +horizontal_transport_predictor=.false. init_exner_bt=.true., -l_multigrid=.true., +l_multigrid=.false., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -99,7 +90,7 @@ p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false., +theta_moist_source=.false. use_multires_coupling=.false., use_physics=.true., use_wavedynamics=.true., @@ -110,27 +101,15 @@ gcrk=8, method='prec_only', monitor_convergence=.false., normalise=.true., -preconditioner='multigrid', +preconditioner='tridiagonal', si_pressure_a_tol=1.0e-8, si_pressure_maximum_iterations=400, si_pressure_tolerance=1.0e-4, / -&iau_addinf_io -/ -&iau_addinf_io -/ -&iau_ainc_io -/ -&iau_ainc_io -/ -&iau_bcorr_io -/ -&iau -/ &idealised f_lon_deg=0.0, -perturb_init=.false., -test='none', +perturb_init=.false. +test='gravity_wave', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -165,10 +144,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.4, -r2=0.4, -x1=0.4, -x2=-0.4, +r1=0.0, +r2=0.0, +x1=0.0, +x2=0.0, y1=0.0, y2=0.0, z1=0.0, @@ -180,7 +159,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=60.0, +pert_centre=120.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -189,25 +168,22 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='constant_uv', +profile='none', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.true., -u0=2.0, +smp_init_wind=.false., +u0=0.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., -checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, -end_of_run_checkpoint=.true., file_convention='UGRID', -multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -220,27 +196,11 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true., -l_stabilise_bl=.false., +fixed_ls=.true. ls_read_w2h=.false., -max_bl_stabilisation=0.75, -n_bl_levels_to_stabilise=15, pert_option='file', -transport_efficiency=.true., -/ -&linear_physics -blevs_m=15, -e_folding_levs_m=10, -l_0_m=80.0, -l_boundary_layer=.true., -log_layer=2, -u_land_m=0.4, -u_sea_m=0.4, -z_land_m=0.05, -z_sea_m=0.0005, / &logging -log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver @@ -251,7 +211,7 @@ guess_np1=.false., mixed_solver_a_tol=1.0e-3, monitor_convergence=.true., normalise=.true., -reference_reset_time=3600.0, +reference_reset_time=3600., si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', @@ -264,14 +224,6 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / -&multigrid -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', -multigrid_chain_nitems=3, -n_coarsesmooth=4, -n_postsmooth=2, -n_presmooth=2, -smooth_relaxation=0.8, -/ &esm_couple l_esm_couple_test=.false., / @@ -279,23 +231,16 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning -generate_inner_halos=.false., panel_decomposition='auto', -panel_xproc=1, +panel_xproc=6, panel_yproc=1, partitioner='cubedsphere', / &physics -bl_segment=0, -configure_segments=.true., -conv_gr_segment=16, -gw_segment=0, limit_drag_incs=.false., -ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., -sample_physics_winds_correction=.false., -ussp_segment=0, +configure_segments=.false. / &planet cp=1005.0, @@ -307,14 +252,10 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_mix_ratio=1.110e-09, -cfc11_rad_opt='constant', -cfc12_mix_ratio=2.187e-09, -cfc12_rad_opt='constant', -ch4_mix_ratio=1.006e-06, -ch4_rad_opt='constant', -co2_mix_ratio=6.002e-04, -co2_rad_opt='constant', +cfc11_rad_opt='off', +cfc12_rad_opt='off', +ch4_rad_opt='off', +co2_rad_opt='off', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -327,13 +268,11 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_mix_ratio=4.945e-07, -n2o_rad_opt='constant', +n2o_rad_opt='off', na_rad_opt='off', nh3_rad_opt='off', -o2_mix_ratio=0.2314, -o2_rad_opt='constant', -o3_rad_opt='ancil', +o2_rad_opt='off', +o3_rad_opt='off', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', @@ -347,8 +286,6 @@ monitor_convergence=.false., preconditioner='diagonal', tolerance=1.0e-6, / -&specified_surface -/ &time calendar='timestep', calendar_origin='2016-01-01 15:00:00', @@ -360,7 +297,7 @@ timestep_start='1', ×tepping alpha=0.55, dt=1800, -inner_iterations=1, +inner_iterations=2, method='semi_implicit', outer_iterations=2, runge_kutta_method='forward_euler', @@ -371,7 +308,6 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., @@ -405,8 +341,8 @@ min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.true., -panel_edge_treatment='none', +panel_edge_high_order=.false., +panel_edge_treatment='none' profile_size=5, reversible=.true.,.true.,.false.,.true.,.true., runge_kutta_method='ssp3', @@ -424,7 +360,8 @@ vertical_method=5*1, vertical_monotone=5*1, vertical_monotone_order=5*3, vertical_sl_order='cubic', -wind_mono_top=.false., +wind_mono_top=.false. +wind_mono_top_depth=5 / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example/iodef.xml b/applications/jedi_lfric_tests/example/iodef.xml index 90edb87ac..92e9017c2 100644 --- a/applications/jedi_lfric_tests/example/iodef.xml +++ b/applications/jedi_lfric_tests/example/iodef.xml @@ -50,11 +50,6 @@ - - - - - @@ -145,8 +140,6 @@ - - @@ -193,8 +186,6 @@ - - @@ -336,7 +327,6 @@ - diff --git a/science/linear/integration-test/nwp_gal9/resources/mesh_C12_MG.nc b/applications/jedi_lfric_tests/example/mesh_C12.nc similarity index 64% rename from science/linear/integration-test/nwp_gal9/resources/mesh_C12_MG.nc rename to applications/jedi_lfric_tests/example/mesh_C12.nc index ebe518907aea38df3c4cc5b3839febbef455ba53..f7ea6988e22a06194aac0d17b6e3be62cd539773 100644 GIT binary patch delta 676 zcmdn-g8j@~Rsm-hHzo!M-~v)?69v>`IrE$ijpFn2Q&Pba%t=5BB9@wx4iRHJ02fP3 zOopmU0E)o?H;@4`kQrzcOpFJ}5S#pf`Lcp6$e{S-)SR4RTSFu3;@tfFl8pF*#Ny)A zVp{_ShRO2<9461_mYCeknjs+yb4`4O0-RY1RK(3DBMFuSIRPpOW&$M{CW*+4fPBUW z(gGF*d8n9Say^@h09X+02B=`Z5L6JX5+nmu`5vYcESQs-mkktDXP+V>1Tr%vKQ}Qm zFFv)RBsH%DC^21FO^ksn1Dlo4IrJuTinPj_0VP3zD+fp*90s-SImc#E2UHoTotrt& zi?@$^<2|uV*ul#_BJOoZENEFxInRp)Ir+-32%oIq>lra?YwyM@w4UC6AOb==#6tOrj2pNBmD#r8 delta 38591 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 - - diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml index d44020c0f..53acee0fc 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml @@ -1,10 +1,13 @@ &jedi_lfric_tests test_field='theta', / + +#### Configure JEDI-LFRIC + &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', @@ -12,8 +15,8 @@ io_time_step='P0DT1H0M0S', &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', -'m_cl','m_r','m_s','land_fraction', +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', +'m_v','m_cl','m_r','m_s', / &jedi_increment inc_time='2018-04-14 21:00:00', @@ -33,16 +36,19 @@ time_step='P0DT1H0M0S', &jedi_lfric_settings forecast_length='P0DT6H0M0S', / + +#### Configure LFRic + &base_mesh -file_prefix='mesh_C12_MG', +file_prefix='mesh_C12', geometry='spherical', prepartitioned=.false., -prime_mesh_name='dynamics', +prime_mesh_name='C12', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final', +transport_overwrite_freq='final' / &checks limit_cfl=.false., @@ -64,15 +70,6 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / -&convection -dx_ref=50000.0, -l_cvdiag_ctop_qmax=.false., -qlmin=4.0e-4, -resdep_precipramp=.false., -/ -&cosp -l_cosp=.false., -/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -82,7 +79,6 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -100,7 +96,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', @@ -121,10 +117,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false., -horizontal_transport_predictor=.false., +horizontal_physics_predictor=.false. +horizontal_transport_predictor=.false. init_exner_bt=.true., -l_multigrid=.true., +l_multigrid=.false., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -134,36 +130,27 @@ shallow=.true., si_momentum_equation=.false., theta_moist_source=.false., use_multires_coupling=.false., -use_physics=.true., +use_physics=.false., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -gcrk=8, -method='prec_only', -monitor_convergence=.false., +fail_on_non_converged=.false., +gcrk=18, +method='bicgstab', +monitor_convergence=.true., normalise=.true., -preconditioner='multigrid', -si_pressure_a_tol=1.0e-8, -si_pressure_maximum_iterations=400, -si_pressure_tolerance=1.0e-4, -/ -&iau_addinf_io -/ -&iau_addinf_io -/ -&iau_ainc_io -/ -&iau_ainc_io -/ -&iau_bcorr_io -/ -&iau +preconditioner='tridiagonal', +si_pressure_a_tol=0, +si_pressure_maximum_iterations=40, +si_pressure_tolerance=1.0e-15, / &idealised f_lon_deg=0.0, -perturb_init=.false., -test='none', +perturb_init=.false. +perturb_magnitude=0 +perturb_seed=0 +test='gravity_wave', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -187,6 +174,7 @@ coarse_ozone_ancil=.false., init_option='analytic', lbc_option='none', ls_option='analytic', +model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., sea_ice_source='ancillary', @@ -197,10 +185,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.4, -r2=0.4, -x1=0.4, -x2=-0.4, +r1=0.0, +r2=0.0, +x1=0.0, +x2=0.0, y1=0.0, y2=0.0, z1=0.0, @@ -212,7 +200,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=60.0, +pert_centre=120.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -221,25 +209,22 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='constant_uv', +profile='none', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.true., -u0=2.0, +smp_init_wind=.false., +u0=0.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., -checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, -end_of_run_checkpoint=.true., file_convention='UGRID', -multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -252,42 +237,26 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true., -l_stabilise_bl=.false., +fixed_ls=.true. ls_read_w2h=.false., -max_bl_stabilisation=0.75, -n_bl_levels_to_stabilise=15, -pert_option='file', -transport_efficiency=.true., -/ -&linear_physics -blevs_m=15, -e_folding_levs_m=10, -l_0_m=80.0, -l_boundary_layer=.true., -log_layer=2, -u_land_m=0.4, -u_sea_m=0.4, -z_land_m=0.05, -z_sea_m=0.0005, +pert_option='analytic', / &logging -log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.true., -gcrk=4, +fail_on_non_converged=.false., +gcrk=10, guess_np1=.false., -mixed_solver_a_tol=1.0e-3, +mixed_solver_a_tol=1.0e-21, monitor_convergence=.true., normalise=.true., reference_reset_time=3600.0, -si_maximum_iterations=10, +si_maximum_iterations=7, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-1, +si_tolerance=1.0e-21, split_w=.true., / &mixing @@ -296,14 +265,6 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / -&multigrid -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', -multigrid_chain_nitems=3, -n_coarsesmooth=4, -n_postsmooth=2, -n_presmooth=2, -smooth_relaxation=0.8, -/ &esm_couple l_esm_couple_test=.false., / @@ -311,23 +272,15 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning -generate_inner_halos=.false., panel_decomposition='auto', panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics -bl_segment=0, -configure_segments=.true., -conv_gr_segment=16, -gw_segment=0, limit_drag_incs=.false., -ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., -sample_physics_winds_correction=.false., -ussp_segment=0, / &planet cp=1005.0, @@ -339,14 +292,10 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_mix_ratio=1.110e-09, -cfc11_rad_opt='constant', -cfc12_mix_ratio=2.187e-09, -cfc12_rad_opt='constant', -ch4_mix_ratio=1.006e-06, -ch4_rad_opt='constant', -co2_mix_ratio=6.002e-04, -co2_rad_opt='constant', +cfc11_rad_opt='off', +cfc12_rad_opt='off', +ch4_rad_opt='off', +co2_rad_opt='off', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -359,27 +308,24 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_mix_ratio=4.945e-07, -n2o_rad_opt='constant', +n2o_rad_opt='off', na_rad_opt='off', nh3_rad_opt='off', -o2_mix_ratio=0.2314, -o2_rad_opt='constant', -o3_rad_opt='ancil', +o2_rad_opt='off', +o3_rad_opt='off', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver +fail_on_non_converged=.false., gcrk=18, -maximum_iterations=7, +maximum_iterations=50, method='chebyshev', monitor_convergence=.false., preconditioner='diagonal', -tolerance=1.0e-6, -/ -&specified_surface +tolerance=1.0e-18, / &time calendar='timestep', @@ -391,8 +337,8 @@ timestep_start='1', / ×tepping alpha=0.55, -dt=1800, -inner_iterations=1, +dt=3600, +inner_iterations=2, method='semi_implicit', outer_iterations=2, runge_kutta_method='forward_euler', @@ -403,12 +349,10 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false., -adjust_vhv_wind=.false., -ageofair_reset_level=10, +adjust_vhv_wind=.false. broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.5, +cap_density_predictor=0.01, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -418,45 +362,43 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=0, -ffsl_outer_order=1, +ffsl_inner_order=2, +ffsl_outer_order=2, ffsl_splitting=5*1, -ffsl_unity_3d=.false., -ffsl_vertical_order=2,2,1,2,2, -field_names='density','potential_temperature','wind','moisture', -'con_tracer', +ffsl_unity_3d=.false. +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, -log_space=.true.,.true.,.false.,.false.,.false., -max_vert_cfl_calc='dep_point', +log_space=5*.false., +max_vert_cfl_calc='uniform', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.true., -panel_edge_treatment='none', +panel_edge_high_order=.false. +panel_edge_treatment='none' profile_size=5, -reversible=.true.,.true.,.false.,.true.,.true., +reversible=5*.false., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', slice_order='parabola', -special_edges_monotone=5*1, splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', -transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*3, +vertical_monotone_order=5*1, vertical_sl_order='cubic', -wind_mono_top=.false., +wind_mono_top=.false. +wind_mono_top_depth=5 / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml b/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml index eaf53286a..fade05b82 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml @@ -47,7 +47,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -144,11 +144,6 @@ - - - - - @@ -239,8 +234,6 @@ - - @@ -287,8 +280,6 @@ - - @@ -405,7 +396,7 @@ - + @@ -430,7 +421,6 @@ - diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/mesh_C12.nc b/applications/jedi_lfric_tests/example_id_tlm_tests/mesh_C12.nc new file mode 100644 index 0000000000000000000000000000000000000000..f7ea6988e22a06194aac0d17b6e3be62cd539773 GIT binary patch literal 85708 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 Rwf*lmDjqBQ-|O@_{yzW$Qgi?S literal 0 HcmV?d00001 diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml index 3ea39dd10..f61e5aab0 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml @@ -1,28 +1,30 @@ &jedi_lfric_tests test_field='theta', / + +#### Configure JEDI-LFRIC + &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', -io_setup_increment=.false., +io_setup_increment=.true., io_time_step='P0DT1H0M0S', / &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', -'m_cl','m_r','m_s','land_fraction', +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', +'m_v','m_cl','m_r','m_s', / &jedi_increment inc_time='2018-04-14 21:00:00', -initialise_via_read=.false., +initialise_via_read=.true., variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', 'm_cl','m_r','m_s', / &jedi_linear_model -incremental_wind_interpolation=.false., nl_time_step='P0DT1H0M0S', / &jedi_pseudo_model @@ -31,19 +33,21 @@ number_of_steps=9, time_step='P0DT1H0M0S', / &jedi_lfric_settings -adjoint_test_tolerance=1.0e-3, forecast_length='P0DT6H0M0S', / + +#### Configure LFRic + &base_mesh -file_prefix='mesh_C12_MG', +file_prefix='mesh_C12', geometry='spherical', prepartitioned=.false., -prime_mesh_name='dynamics', +prime_mesh_name='C12', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final', +transport_overwrite_freq='final' / &checks limit_cfl=.false., @@ -65,15 +69,6 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / -&convection -dx_ref=50000.0, -l_cvdiag_ctop_qmax=.false., -qlmin=4.0e-4, -resdep_precipramp=.false., -/ -&cosp -l_cosp=.false., -/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -83,7 +78,7 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true., +share_stencil_extent=.true. vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -101,7 +96,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', @@ -122,10 +117,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false., -horizontal_transport_predictor=.false., +horizontal_physics_predictor=.false. +horizontal_transport_predictor=.false. init_exner_bt=.true., -l_multigrid=.true., +l_multigrid=.false., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -133,38 +128,29 @@ p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false., +theta_moist_source=.false. use_multires_coupling=.false., -use_physics=.true., +use_physics=.false., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -gcrk=8, -method='prec_only', -monitor_convergence=.false., +fail_on_non_converged=.false., +gcrk=18, +method='bicgstab', +monitor_convergence=.true., normalise=.true., -preconditioner='multigrid', -si_pressure_a_tol=1.0e-8, -si_pressure_maximum_iterations=400, -si_pressure_tolerance=1.0e-4, -/ -&iau_addinf_io -/ -&iau_addinf_io -/ -&iau_ainc_io -/ -&iau_ainc_io -/ -&iau_bcorr_io -/ -&iau +preconditioner='tridiagonal', +si_pressure_a_tol=0, +si_pressure_maximum_iterations=40, +si_pressure_tolerance=1.0e-15, / &idealised f_lon_deg=0.0, -perturb_init=.false., -test='none', +perturb_init=.false. +perturb_magnitude=0 +perturb_seed=0 +test='gravity_wave', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -188,6 +174,7 @@ coarse_ozone_ancil=.false., init_option='analytic', lbc_option='none', ls_option='analytic', +model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., sea_ice_source='ancillary', @@ -198,10 +185,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.4, -r2=0.4, -x1=0.4, -x2=-0.4, +r1=0.0, +r2=0.0, +x1=0.0, +x2=0.0, y1=0.0, y2=0.0, z1=0.0, @@ -213,7 +200,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=60.0, +pert_centre=120.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -222,25 +209,22 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='constant_uv', +profile='none', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.true., -u0=2.0, +smp_init_wind=.false., +u0=0.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., -checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, -end_of_run_checkpoint=.true., file_convention='UGRID', -multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -253,42 +237,26 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true., -l_stabilise_bl=.false., +fixed_ls=.true. ls_read_w2h=.false., -max_bl_stabilisation=0.75, -n_bl_levels_to_stabilise=15, -pert_option='file', -transport_efficiency=.true., -/ -&linear_physics -blevs_m=15, -e_folding_levs_m=10, -l_0_m=80.0, -l_boundary_layer=.true., -log_layer=2, -u_land_m=0.4, -u_sea_m=0.4, -z_land_m=0.05, -z_sea_m=0.0005, +pert_option='analytic', / &logging -log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.true., -gcrk=4, +fail_on_non_converged=.false., +gcrk=10, guess_np1=.false., mixed_solver_a_tol=1.0e-21, monitor_convergence=.true., normalise=.true., -reference_reset_time=1800, -si_maximum_iterations=10, +reference_reset_time=3600.0, +si_maximum_iterations=7, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-3, +si_tolerance=1.0e-21, split_w=.true., / &mixing @@ -297,14 +265,6 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / -&multigrid -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', -multigrid_chain_nitems=3, -n_coarsesmooth=4, -n_postsmooth=2, -n_presmooth=2, -smooth_relaxation=0.8, -/ &esm_couple l_esm_couple_test=.false., / @@ -312,23 +272,15 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning -generate_inner_halos=.false., panel_decomposition='auto', panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics -bl_segment=0, -configure_segments=.true., -conv_gr_segment=16, -gw_segment=0, limit_drag_incs=.false., -ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., -sample_physics_winds_correction=.false., -ussp_segment=0, / &planet cp=1005.0, @@ -340,14 +292,10 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_mix_ratio=1.110e-09, -cfc11_rad_opt='constant', -cfc12_mix_ratio=2.187e-09, -cfc12_rad_opt='constant', -ch4_mix_ratio=1.006e-06, -ch4_rad_opt='constant', -co2_mix_ratio=6.002e-04, -co2_rad_opt='constant', +cfc11_rad_opt='off', +cfc12_rad_opt='off', +ch4_rad_opt='off', +co2_rad_opt='off', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -360,27 +308,24 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_mix_ratio=4.945e-07, -n2o_rad_opt='constant', +n2o_rad_opt='off', na_rad_opt='off', nh3_rad_opt='off', -o2_mix_ratio=0.2314, -o2_rad_opt='constant', -o3_rad_opt='ancil', +o2_rad_opt='off', +o3_rad_opt='off', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver +fail_on_non_converged=.false., gcrk=18, -maximum_iterations=7, +maximum_iterations=50, method='chebyshev', monitor_convergence=.false., preconditioner='diagonal', -tolerance=1.0e-6, -/ -&specified_surface +tolerance=1.0e-18, / &time calendar='timestep', @@ -392,10 +337,10 @@ timestep_start='1', / ×tepping alpha=0.55, -dt=1800, -inner_iterations=1, +dt=3600, +inner_iterations=2, method='semi_implicit', -outer_iterations=1, +outer_iterations=2, runge_kutta_method='forward_euler', spinup_alpha=.false., tau_r=1.0, @@ -404,12 +349,10 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false., -adjust_vhv_wind=.false., -ageofair_reset_level=10, +adjust_vhv_wind=.false. broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.5, +cap_density_predictor=0.01, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -419,29 +362,28 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=0, -ffsl_outer_order=1, +ffsl_inner_order=2, +ffsl_outer_order=2, ffsl_splitting=5*1, -ffsl_unity_3d=.false., -ffsl_vertical_order=2,2,1,2,2, -field_names='density','potential_temperature','wind','moisture', -'con_tracer', +ffsl_unity_3d=.false. +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, -log_space=.true.,.true.,.false.,.false.,.false., -max_vert_cfl_calc='dep_point', +log_space=5*.false., +max_vert_cfl_calc='uniform', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.true., -panel_edge_treatment='none', +panel_edge_high_order=.false., +panel_edge_treatment='none' profile_size=5, -reversible=.true.,.true.,.false.,.true.,.true., +reversible=5*.false., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', @@ -451,13 +393,13 @@ splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', -transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*3, +vertical_monotone_order=5*1, vertical_sl_order='cubic', -wind_mono_top=.false., +wind_mono_top=.false. +wind_mono_top_depth=5 / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml index 862b1278c..7b9d54bf3 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml @@ -345,7 +345,6 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false., calculate_detj='upwind', diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml index af380004b..fade05b82 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml @@ -144,11 +144,6 @@ - - - - - @@ -239,8 +234,6 @@ - - @@ -287,8 +280,6 @@ - - @@ -430,7 +421,6 @@ - diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/mesh_C12.nc b/applications/jedi_lfric_tests/example_tlm_forecast_tl/mesh_C12.nc new file mode 100644 index 0000000000000000000000000000000000000000..f7ea6988e22a06194aac0d17b6e3be62cd539773 GIT binary patch literal 85708 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 Rwf*lmDjqBQ-|O@_{yzW$Qgi?S literal 0 HcmV?d00001 diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml index da9b864b8..283c5dafb 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml @@ -1,10 +1,13 @@ &jedi_lfric_tests test_field='theta', / + +#### Configure JEDI-LFRIC + &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', @@ -12,8 +15,8 @@ io_time_step='P0DT1H0M0S', &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', -'m_cl','m_r','m_s','land_fraction', +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', +'m_v','m_cl','m_r','m_s', / &jedi_increment inc_time='2018-04-14 21:00:00', @@ -22,7 +25,7 @@ variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', 'm_cl','m_r','m_s', / &jedi_linear_model -incremental_wind_interpolation=.false., +incremental_wind_interpolation=.true., nl_time_step='P0DT1H0M0S', / &jedi_pseudo_model @@ -31,19 +34,21 @@ number_of_steps=9, time_step='P0DT1H0M0S', / &jedi_lfric_settings -adjoint_test_tolerance=1.0e-2, forecast_length='P0DT6H0M0S', / + +#### Configure LFRic + &base_mesh -file_prefix='mesh_C12_MG', +file_prefix='mesh_C12', geometry='spherical', prepartitioned=.false., -prime_mesh_name='dynamics', +prime_mesh_name='C12', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final', +transport_overwrite_freq='final' / &checks limit_cfl=.false., @@ -65,15 +70,6 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / -&convection -dx_ref=50000.0, -l_cvdiag_ctop_qmax=.false., -qlmin=4.0e-4, -resdep_precipramp=.false., -/ -&cosp -l_cosp=.false., -/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -83,7 +79,7 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true., +share_stencil_extent=.true. vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -101,7 +97,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', @@ -122,10 +118,10 @@ dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false., -horizontal_transport_predictor=.false., +horizontal_physics_predictor=.false. +horizontal_transport_predictor=.false. init_exner_bt=.true., -l_multigrid=.true., +l_multigrid=.false., lagged_orog=.true., moisture_formulation='traditional', moisture_in_solver=.true., @@ -133,38 +129,29 @@ p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false., +theta_moist_source=.false. use_multires_coupling=.false., -use_physics=.true., +use_physics=.false., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver -gcrk=8, -method='prec_only', -monitor_convergence=.false., +fail_on_non_converged=.false., +gcrk=18, +method='bicgstab', +monitor_convergence=.true., normalise=.true., -preconditioner='multigrid', -si_pressure_a_tol=1.0e-8, -si_pressure_maximum_iterations=400, -si_pressure_tolerance=1.0e-4, -/ -&iau_addinf_io -/ -&iau_addinf_io -/ -&iau_ainc_io -/ -&iau_ainc_io -/ -&iau_bcorr_io -/ -&iau +preconditioner='tridiagonal', +si_pressure_a_tol=0, +si_pressure_maximum_iterations=40, +si_pressure_tolerance=1.0e-15, / &idealised f_lon_deg=0.0, -perturb_init=.false., -test='none', +perturb_init=.false. +perturb_magnitude=0 +perturb_seed=0 +test='gravity_wave', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -188,6 +175,7 @@ coarse_ozone_ancil=.false., init_option='analytic', lbc_option='none', ls_option='analytic', +model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., sea_ice_source='ancillary', @@ -198,10 +186,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.4, -r2=0.4, -x1=0.4, -x2=-0.4, +r1=0.0, +r2=0.0, +x1=0.0, +x2=0.0, y1=0.0, y2=0.0, z1=0.0, @@ -213,7 +201,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=60.0, +pert_centre=120.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -222,25 +210,22 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='constant_uv', +profile='none', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.true., -u0=2.0, +smp_init_wind=.false., +u0=0.0, v0=0.0, wind_time_period=0.0, / &io checkpoint_read=.false., -checkpoint_times=, checkpoint_write=.false., counter_output_suffix='counter.txt', diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, -end_of_run_checkpoint=.true., file_convention='UGRID', -multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., @@ -253,42 +238,26 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true., -l_stabilise_bl=.false., +fixed_ls=.true. ls_read_w2h=.false., -max_bl_stabilisation=0.75, -n_bl_levels_to_stabilise=15, -pert_option='file', -transport_efficiency=.true., -/ -&linear_physics -blevs_m=15, -e_folding_levs_m=10, -l_0_m=80.0, -l_boundary_layer=.true., -log_layer=2, -u_land_m=0.4, -u_sea_m=0.4, -z_land_m=0.05, -z_sea_m=0.0005, +pert_option='analytic', / &logging -log_to_rank_zero_only=.false., run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.true., -gcrk=4, +fail_on_non_converged=.false., +gcrk=10, guess_np1=.false., mixed_solver_a_tol=1.0e-21, monitor_convergence=.true., normalise=.true., -reference_reset_time=1800, -si_maximum_iterations=10, +reference_reset_time=3600.0, +si_maximum_iterations=7, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-3, +si_tolerance=1.0e-21, split_w=.true., / &mixing @@ -297,14 +266,6 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / -&multigrid -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', -multigrid_chain_nitems=3, -n_coarsesmooth=4, -n_postsmooth=2, -n_presmooth=2, -smooth_relaxation=0.8, -/ &esm_couple l_esm_couple_test=.false., / @@ -312,23 +273,15 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning -generate_inner_halos=.false., panel_decomposition='auto', panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics -bl_segment=0, -configure_segments=.true., -conv_gr_segment=16, -gw_segment=0, limit_drag_incs=.false., -ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., -sample_physics_winds_correction=.false., -ussp_segment=0, / &planet cp=1005.0, @@ -340,14 +293,10 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_mix_ratio=1.110e-09, -cfc11_rad_opt='constant', -cfc12_mix_ratio=2.187e-09, -cfc12_rad_opt='constant', -ch4_mix_ratio=1.006e-06, -ch4_rad_opt='constant', -co2_mix_ratio=6.002e-04, -co2_rad_opt='constant', +cfc11_rad_opt='off', +cfc12_rad_opt='off', +ch4_rad_opt='off', +co2_rad_opt='off', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -360,27 +309,24 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_mix_ratio=4.945e-07, -n2o_rad_opt='constant', +n2o_rad_opt='off', na_rad_opt='off', nh3_rad_opt='off', -o2_mix_ratio=0.2314, -o2_rad_opt='constant', -o3_rad_opt='ancil', +o2_rad_opt='off', +o3_rad_opt='off', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver +fail_on_non_converged=.false., gcrk=18, -maximum_iterations=7, +maximum_iterations=50, method='chebyshev', monitor_convergence=.false., preconditioner='diagonal', -tolerance=1.0e-6, -/ -&specified_surface +tolerance=1.0e-18, / &time calendar='timestep', @@ -392,10 +338,10 @@ timestep_start='1', / ×tepping alpha=0.55, -dt=1800, -inner_iterations=1, +dt=3600, +inner_iterations=2, method='semi_implicit', -outer_iterations=1, +outer_iterations=2, runge_kutta_method='forward_euler', spinup_alpha=.false., tau_r=1.0, @@ -404,12 +350,10 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false., -adjust_vhv_wind=.false., -ageofair_reset_level=10, +adjust_vhv_wind=.false. broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.5, +cap_density_predictor=0.01, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -419,29 +363,28 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=0, -ffsl_outer_order=1, +ffsl_inner_order=2, +ffsl_outer_order=2, ffsl_splitting=5*1, -ffsl_unity_3d=.false., -ffsl_vertical_order=2,2,1,2,2, -field_names='density','potential_temperature','wind','moisture', -'con_tracer', +ffsl_unity_3d=.false. +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, -log_space=.true.,.true.,.false.,.false.,.false., -max_vert_cfl_calc='dep_point', +log_space=5*.false., +max_vert_cfl_calc='uniform', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.true., -panel_edge_treatment='none', +panel_edge_high_order=.false., +panel_edge_treatment='none' profile_size=5, -reversible=.true.,.true.,.false.,.true.,.true., +reversible=5*.false., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', @@ -451,13 +394,13 @@ splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', -transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*3, +vertical_monotone_order=5*1, vertical_sl_order='cubic', -wind_mono_top=.false., +wind_mono_top=.false. +wind_mono_top_depth=5 / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml new file mode 100644 index 000000000..c9b945825 --- /dev/null +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry.nml @@ -0,0 +1,404 @@ +&jedi_lfric_tests +test_field='theta', +/ + +#### Configure JEDI-LFRIC + +&jedi_geometry +io_calender_start='2018-04-14T21:00:00', +io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_state_write='write_file', +io_setup_increment=.false., +io_time_step='P0DT1H0M0S', +/ +&jedi_state +state_time='2018-04-14 21:00:00', +use_pseudo_model=.true., +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', +'m_v','m_cl','m_r','m_s', +/ +&jedi_increment +inc_time='2018-04-14 21:00:00', +initialise_via_read=.false., +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s', +/ +&jedi_linear_model +incremental_wind_interpolation=.true., +nl_time_step='P0DT1H0M0S', +/ +&jedi_pseudo_model +initial_time='2018-04-14T21:00:00', +number_of_steps=9, +time_step='P0DT1H0M0S', +/ +&jedi_lfric_settings +forecast_length='P0DT6H0M0S', +/ + +#### Configure LFRic + +&base_mesh +file_prefix='mesh_C12', +geometry='spherical', +prepartitioned=.false., +prime_mesh_name='C12', +topology='fully_periodic', +/ +&boundaries +limited_area=.false., +transport_overwrite_freq='final' +/ +&checks +limit_cfl=.false., +/ +§ion_choice +aerosol='none', +boundary_layer='none', +chemistry='none', +cloud='none', +dynamics='gungho', +external_forcing=.false., +iau=.false., +iau_sst=.false., +iau_surf=.false., +methane_oxidation=.false., +orographic_drag='none', +radiation='none', +spectral_gwd='none', +stochastic_physics='none', +surface='none', +/ +&damping_layer +dl_base=40000.0, +dl_str=0.05, +dl_type='standard', +/ +&departure_points +horizontal_limit='cap', +horizontal_method='ffsl', +n_dep_pt_iterations=1, +vertical_limit='exponential', +vertical_method='timeaverage', +vertical_sorting=.false., +/ +&energy_correction +encorr_usage='none', +integral_method='fd', +/ +&extrusion +domain_height=80000.0, +method='um_L70_50t_20s_80km', +number_of_layers=70, +planet_radius=6371229.0, +stretching_height=17507.0, +stretching_method='smooth', +/ +&files +ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', +checkpoint_stem_name='', +diag_stem_name='', +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', +start_dump_directory='', +start_dump_filename='', +/ +&finite_element +cellshape='quadrilateral', +coord_order=1, +coord_system='native', +element_order_h=0, +element_order_v=0, +rehabilitate=.true., +vorticity_in_w1=.false., +/ +&formulation +dlayer_on=.true., +dry_static_adjust=.true., +eos_method='sampled', +exner_from_eos=.false., +horizontal_physics_predictor=.false. +horizontal_transport_predictor=.false. +init_exner_bt=.true., +l_multigrid=.false., +lagged_orog=.true., +moisture_formulation='dry', +moisture_in_solver=.false., +p2theta_vert=.true., +rotating=.true., +shallow=.true., +si_momentum_equation=.false., +use_multires_coupling=.false., +use_physics=.false., +use_wavedynamics=.true., +vector_invariant=.false., +/ +&helmholtz_solver +fail_on_non_converged=.false., +gcrk=18, +method='bicgstab', +monitor_convergence=.true., +normalise=.true., +preconditioner='tridiagonal', +si_pressure_a_tol=0, +si_pressure_maximum_iterations=40, +si_pressure_tolerance=1.0e-15, +/ +&idealised +f_lon_deg=0.0, +perturb_init=.false. +perturb_magnitude=0 +perturb_seed=0 +test='gravity_wave', +/ +&ideal_surface +canopy_height=19.01,16.38,0.79,1.26,1.0, +leaf_area_index=5.0,4.0,1.5,1.5,1.5, +n_snow_layers=11*0, +snow_depth=11*0.0, +snow_layer_ice_mass=27*0.0, +snow_layer_temp=27*273.0, +snow_layer_thickness=27*0.0, +soil_moisture=15.86,98.861,274.35,862.27, +soil_temperature=284.508,286.537,289.512,293.066, +surf_tile_fracs=9*0.0,1.0,0.0, +surf_tile_temps=9*295.0,300.0,265.0, +tile_snow_mass=11*0.0, +/ +&initialization +ancil_option='none', +coarse_aerosol_ancil=.false., +coarse_orography_ancil=.false., +coarse_ozone_ancil=.false., +init_option='analytic', +lbc_option='none', +ls_option='analytic', +model_eos_height=100, +n_orog_smooth=0, +read_w2h_wind=.true., +sea_ice_source='ancillary', +snow_source='start_dump', +w0_orography_mapping=.false., +zero_w2v_wind=.false., +/ +&initial_density +density_background=0.1, +density_max=2.0, +r1=0.0, +r2=0.0, +x1=0.0, +x2=0.0, +y1=0.0, +y2=0.0, +z1=0.0, +z2=0.0, +/ +&initial_pressure +method='balanced', +surface_pressure=1000.0e2, +/ +&initial_temperature +bvf_square=0.0001, +pert_centre=120.0, +pert_width_scaling=1.0, +perturb='none', +theta_surf=300.0, +/ +&initial_vapour +/ +&initial_wind +nl_constant=0.0, +profile='none', +sbr_angle_lat=0.0, +sbr_angle_lon=0.0, +smp_init_wind=.false., +u0=0.0, +v0=0.0, +wind_time_period=0.0, +/ +&io +checkpoint_read=.false., +checkpoint_write=.false., +counter_output_suffix='counter.txt', +diag_active_files='lfric_diag', +diag_always_on_sampling=.false., +diagnostic_frequency=8, +file_convention='UGRID', +nodal_output_on_w3=.false., +subroutine_counters=.false., +subroutine_timers=.true., +timer_output_path='timer.txt', +use_xios_io=.true., +write_conservation_diag=.false., +write_diag=.true., +write_dump=.false., +write_fluxes=.false., +write_minmax_tseries=.false., +/ +&linear +fixed_ls=.true. +ls_read_w2h=.false., +pert_option='analytic', +/ +&logging +run_log_level='info', +/ +&mixed_solver +eliminate_variables='discrete', +fail_on_non_converged=.false., +gcrk=10, +guess_np1=.false., +mixed_solver_a_tol=1.0e-21, +monitor_convergence=.true., +normalise=.true., +reference_reset_time=3600.0, +si_maximum_iterations=7, +si_method='block_gcr', +si_preconditioner='pressure', +si_tolerance=1.0e-21, +split_w=.true., +/ +&mixing +leonard_term=.false., +smagorinsky=.false., +viscosity=.false., +viscosity_mu=0.0, +/ +&esm_couple +l_esm_couple_test=.false., +/ +&orography +orog_init_option='ancil', +/ +&partitioning +panel_decomposition='auto', +panel_xproc=1, +panel_yproc=1, +partitioner='cubedsphere', +/ +&physics +limit_drag_incs=.false., +sample_physics_scalars=.true., +sample_physics_winds=.true., +/ +&planet +cp=1005.0, +gravity=9.80665, +omega=7.292116E-5, +p_zero=100000.0, +rd=287.05, +scaling_factor=1.0, +/ +&radiative_gases +cfc113_rad_opt='off', +cfc11_rad_opt='off', +cfc12_rad_opt='off', +ch4_rad_opt='off', +co2_rad_opt='off', +co_rad_opt='off', +cs_rad_opt='off', +h2_rad_opt='off', +h2o_rad_opt='prognostic', +hcfc22_rad_opt='off', +hcn_rad_opt='off', +he_rad_opt='off', +hfc134a_rad_opt='off', +k_rad_opt='off', +l_cts_fcg_rates=.false., +li_rad_opt='off', +n2_rad_opt='off', +n2o_rad_opt='off', +na_rad_opt='off', +nh3_rad_opt='off', +o2_rad_opt='off', +o3_rad_opt='off', +rb_rad_opt='off', +so2_rad_opt='off', +tio_rad_opt='off', +vo_rad_opt='off', +/ +&solver +fail_on_non_converged=.false., +gcrk=18, +maximum_iterations=50, +method='chebyshev', +monitor_convergence=.false., +preconditioner='diagonal', +tolerance=1.0e-18, +/ +&time +calendar='timestep', +calendar_origin='2018-04-14 21:00:00', +calendar_start='2018-04-14 21:00:00', +calendar_type='gregorian', +timestep_end='13', +timestep_start='1', +/ +×tepping +alpha=0.55, +dt=3600, +inner_iterations=2, +method='semi_implicit', +outer_iterations=2, +runge_kutta_method='forward_euler', +spinup_alpha=.false., +tau_r=1.0, +tau_t=1.0, +tau_u=0.55, +/ +&transport +adjust_theta=.false., +adjust_vhv_wind=.false. +broken_w2_projection=.false., +calculate_detj='upwind', +cap_density_predictor=0.01, +cfl_mol_1d_stab=1.0, +cfl_mol_2d_stab=1.0, +cfl_mol_3d_stab=1.0, +cheap_update=.false., +consistent_metric=.false., +dep_pt_stencil_extent=3, +dry_field_name='density', +enforce_min_value=5*.false., +equation_form=1,2,2,2,2, +extended_mesh=.false., +ffsl_inner_order=2, +ffsl_outer_order=2, +ffsl_splitting=5*1, +ffsl_unity_3d=.false. +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud', +fv_horizontal_order=2, +fv_vertical_order=2, +horizontal_method=5*1, +horizontal_monotone=5*1, +log_space=5*.false., +max_vert_cfl_calc='uniform', +min_val_abs_tol=-1.0e-12, +min_val_max_iterations=10, +min_val_method='iterative', +min_value=0.0,0.0,-99999999.0,0.0,0.0, +oned_reconstruction=.false., +operators='fv', +profile_size=5, +reversible=5*.false., +runge_kutta_method='ssp3', +scheme=5*1, +si_outer_transport='none', +slice_order='parabola', +splitting=5*1, +substep_transport='off', +theta_dispersion_correction=.false., +theta_variable='dry', +use_density_predictor=.false., +vertical_method=5*1, +vertical_monotone=5*1, +vertical_monotone_order=5*1, +vertical_sl_order='cubic', +wind_mono_top=.false. +wind_mono_top_depth=5 +/ +&validity_test +number_gamma_values=2, +update_ls_frequency=1, +/ diff --git a/science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml similarity index 68% rename from science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml rename to applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml index 2277cacbc..1296925a7 100644 --- a/science/linear/integration-test/nwp_gal9/resources/nwp_gal9_configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration_dry_relaxed.nml @@ -1,13 +1,53 @@ +&jedi_lfric_tests +test_field='theta', +/ + +#### Configure JEDI-LFRIC + +&jedi_geometry +io_calender_start='2018-04-14T21:00:00', +io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_state_write='write_file', +io_setup_increment=.false., +io_time_step='P0DT1H0M0S', +/ +&jedi_state +state_time='2018-04-14 21:00:00', +use_pseudo_model=.true., +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', +'m_v','m_cl','m_r','m_s', +/ +&jedi_increment +inc_time='2018-04-14 21:00:00', +initialise_via_read=.false., +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s', +/ +&jedi_linear_model +nl_time_step='P0DT1H0M0S', +/ +&jedi_pseudo_model +initial_time='2018-04-14T21:00:00', +number_of_steps=9, +time_step='P0DT1H0M0S', +/ +&jedi_lfric_settings +forecast_length='P0DT6H0M0S', +/ + +#### Configure LFRic + &base_mesh -file_prefix='resources/mesh_C12_MG', +file_prefix='mesh_C12', geometry='spherical', prepartitioned=.false., -prime_mesh_name='dynamics', +prime_mesh_name='C12', topology='fully_periodic', / &boundaries limited_area=.false., -transport_overwrite_freq='final', +transport_overwrite_freq='final' / &checks limit_cfl=.false., @@ -20,7 +60,6 @@ cloud='none', dynamics='gungho', external_forcing=.false., iau=.false., -iau_sst=.false., iau_surf=.false., methane_oxidation=.false., orographic_drag='none', @@ -29,15 +68,6 @@ spectral_gwd='none', stochastic_physics='none', surface='none', / -&convection -dx_ref=50000.0, -l_cvdiag_ctop_qmax=.false., -qlmin=4.0e-4, -resdep_precipramp=.false., -/ -&cosp -l_cosp=.false., -/ &damping_layer dl_base=40000.0, dl_str=0.05, @@ -47,7 +77,6 @@ dl_type='standard', horizontal_limit='cap', horizontal_method='ffsl', n_dep_pt_iterations=1, -share_stencil_extent=.true., vertical_limit='exponential', vertical_method='timeaverage', vertical_sorting=.false., @@ -65,14 +94,12 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', -diag_stem_name='diagGungho', -ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', -ls_filename='final_ls', +diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', -start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', -start_dump_filename='final_pert', +start_dump_directory='', +start_dump_filename='', / &finite_element cellshape='quadrilateral', @@ -84,53 +111,41 @@ rehabilitate=.true., vorticity_in_w1=.false., / &formulation -dlayer_on=.false., +dlayer_on=.true., dry_static_adjust=.true., eos_method='sampled', exner_from_eos=.false., -horizontal_physics_predictor=.false., -horizontal_transport_predictor=.false., init_exner_bt=.true., -l_multigrid=.true., +l_multigrid=.false., lagged_orog=.true., -moisture_formulation='traditional', -moisture_in_solver=.true., +moisture_formulation='dry', +moisture_in_solver=.false., p2theta_vert=.true., rotating=.true., shallow=.true., si_momentum_equation=.false., -theta_moist_source=.false., use_multires_coupling=.false., -use_physics=.true., +use_physics=.false., use_wavedynamics=.true., vector_invariant=.false., / &helmholtz_solver +fail_on_non_converged=.false., gcrk=8, -method='prec_only', -monitor_convergence=.false., +method='bicgstab', +monitor_convergence=.true., normalise=.true., -preconditioner='multigrid', +preconditioner='tridiagonal', si_pressure_a_tol=1.0e-8, si_pressure_maximum_iterations=400, si_pressure_tolerance=1.0e-4, / -&iau_addinf_io -/ -&iau_addinf_io -/ -&iau_ainc_io -/ -&iau_ainc_io -/ -&iau_bcorr_io -/ -&iau -/ &idealised f_lon_deg=0.0, -perturb_init=.false., -test='none', +perturb_init=.false. +perturb_magnitude=0 +perturb_seed=0 +test='gravity_wave', / &ideal_surface canopy_height=19.01,16.38,0.79,1.26,1.0, @@ -151,9 +166,9 @@ ancil_option='none', coarse_aerosol_ancil=.false., coarse_orography_ancil=.false., coarse_ozone_ancil=.false., -init_option='fd_start_dump', +init_option='analytic', lbc_option='none', -ls_option='file', +ls_option='analytic', model_eos_height=100, n_orog_smooth=0, read_w2h_wind=.true., @@ -165,10 +180,10 @@ zero_w2v_wind=.false., &initial_density density_background=0.1, density_max=2.0, -r1=0.4, -r2=0.4, -x1=0.4, -x2=-0.4, +r1=0.0, +r2=0.0, +x1=0.0, +x2=0.0, y1=0.0, y2=0.0, z1=0.0, @@ -180,7 +195,7 @@ surface_pressure=1000.0e2, / &initial_temperature bvf_square=0.0001, -pert_centre=60.0, +pert_centre=120.0, pert_width_scaling=1.0, perturb='none', theta_surf=300.0, @@ -189,11 +204,11 @@ theta_surf=300.0, / &initial_wind nl_constant=0.0, -profile='constant_uv', +profile='none', sbr_angle_lat=0.0, sbr_angle_lon=0.0, -smp_init_wind=.true., -u0=2.0, +smp_init_wind=.false., +u0=0.0, v0=0.0, wind_time_period=0.0, / @@ -205,46 +220,37 @@ diag_active_files='lfric_diag', diag_always_on_sampling=.false., diagnostic_frequency=8, file_convention='UGRID', -multifile_io=.false., nodal_output_on_w3=.false., subroutine_counters=.false., subroutine_timers=.true., timer_output_path='timer.txt', use_xios_io=.true., write_conservation_diag=.false., -write_diag=.false., +write_diag=.true., write_dump=.false., write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.false., -l_stabilise_bl=.false., ls_read_w2h=.false., -max_bl_stabilisation=0.75, -n_bl_levels_to_stabilise=15, -pert_option='file', -/ -&linear_physics -l_boundary_layer=.false., +pert_option='analytic', / &logging -log_to_rank_zero_only=.false., -run_log_level='debug', +run_log_level='info', / &mixed_solver eliminate_variables='discrete', -fail_on_non_converged=.true., -gcrk=4, +fail_on_non_converged=.false., +gcrk=6, guess_np1=.false., -mixed_solver_a_tol=1.0e-3, +mixed_solver_a_tol=0.0, monitor_convergence=.true., normalise=.true., -reference_reset_time=1800.0, +reference_reset_time=3600.0, si_maximum_iterations=10, si_method='block_gcr', si_preconditioner='pressure', -si_tolerance=1.0e-1, +si_tolerance=1.0e-5, split_w=.true., / &mixing @@ -253,14 +259,6 @@ smagorinsky=.false., viscosity=.false., viscosity_mu=0.0, / -&multigrid -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2', -multigrid_chain_nitems=3, -n_coarsesmooth=4, -n_postsmooth=2, -n_presmooth=2, -smooth_relaxation=0.8, -/ &esm_couple l_esm_couple_test=.false., / @@ -268,18 +266,15 @@ l_esm_couple_test=.false., orog_init_option='ancil', / &partitioning -generate_inner_halos=.false., panel_decomposition='auto', -panel_xproc=6, +panel_xproc=1, panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., limit_drag_incs=.false., sample_physics_scalars=.true., sample_physics_winds=.true., -sample_physics_winds_correction=.false., / &planet cp=1005.0, @@ -291,14 +286,10 @@ scaling_factor=1.0, / &radiative_gases cfc113_rad_opt='off', -cfc11_mix_ratio=1.110e-09, -cfc11_rad_opt='constant', -cfc12_mix_ratio=2.187e-09, -cfc12_rad_opt='constant', -ch4_mix_ratio=1.006e-06, -ch4_rad_opt='constant', -co2_mix_ratio=6.002e-04, -co2_rad_opt='constant', +cfc11_rad_opt='off', +cfc12_rad_opt='off', +ch4_rad_opt='off', +co2_rad_opt='off', co_rad_opt='off', cs_rad_opt='off', h2_rad_opt='off', @@ -311,19 +302,18 @@ k_rad_opt='off', l_cts_fcg_rates=.false., li_rad_opt='off', n2_rad_opt='off', -n2o_mix_ratio=4.945e-07, -n2o_rad_opt='constant', +n2o_rad_opt='off', na_rad_opt='off', nh3_rad_opt='off', -o2_mix_ratio=0.2314, -o2_rad_opt='constant', -o3_rad_opt='ancil', +o2_rad_opt='off', +o3_rad_opt='off', rb_rad_opt='off', so2_rad_opt='off', tio_rad_opt='off', vo_rad_opt='off', / &solver +fail_on_non_converged=.false., gcrk=18, maximum_iterations=7, method='chebyshev', @@ -331,35 +321,32 @@ monitor_convergence=.false., preconditioner='diagonal', tolerance=1.0e-6, / -&specified_surface -/ &time calendar='timestep', -calendar_origin='2016-01-01 15:00:00', -calendar_start='2016-01-01 15:00:00', +calendar_origin='2018-04-14 21:00:00', +calendar_start='2018-04-14 21:00:00', calendar_type='gregorian', -timestep_end='3', +timestep_end='13', timestep_start='1', / ×tepping alpha=0.55, -dt=1800, +dt=3600, inner_iterations=2, method='semi_implicit', outer_iterations=2, runge_kutta_method='forward_euler', -spinup_alpha=.false.tau, +spinup_alpha=.false., tau_r=1.0, tau_t=1.0, tau_u=0.55, / &transport adjust_theta=.false., -adjust_vhv_wind=.false., -ageofair_reset_level=10, +adjust_vhv_wind=.false. broken_w2_projection=.false., calculate_detj='upwind', -cap_density_predictor=0.5, +cap_density_predictor=0.01, cfl_mol_1d_stab=1.0, cfl_mol_2d_stab=1.0, cfl_mol_3d_stab=1.0, @@ -369,45 +356,40 @@ dep_pt_stencil_extent=3, dry_field_name='density', enforce_min_value=5*.false., equation_form=1,2,2,2,2, -ffsl_inner_order=0, -ffsl_outer_order=1, +extended_mesh=.false., +ffsl_inner_order=2, +ffsl_outer_order=2, ffsl_splitting=5*1, -ffsl_unity_3d=.false., -ffsl_vertical_order=2,2,1,2,2, -field_names='density','potential_temperature','wind','moisture', -'con_tracer', +ffsl_unity_3d=.false. +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud', fv_horizontal_order=2, fv_vertical_order=2, horizontal_method=5*1, horizontal_monotone=5*1, log_space=5*.false., -max_vert_cfl_calc='dep_point', +max_vert_cfl_calc='uniform', min_val_abs_tol=-1.0e-12, min_val_max_iterations=10, min_val_method='iterative', min_value=0.0,0.0,-99999999.0,0.0,0.0, oned_reconstruction=.false., operators='fv', -panel_edge_high_order=.true., -panel_edge_treatment='none', profile_size=5, reversible=5*.false., runge_kutta_method='ssp3', scheme=5*1, si_outer_transport='none', slice_order='parabola', -special_edges_monotone=5*1, splitting=5*1, substep_transport='off', theta_dispersion_correction=.false., theta_variable='dry', -transport_ageofair=.false., use_density_predictor=.false., vertical_method=5*1, vertical_monotone=5*1, -vertical_monotone_order=5*3, +vertical_monotone_order=5*1, vertical_sl_order='cubic', -wind_mono_top=.false., / &validity_test number_gamma_values=2, diff --git a/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml b/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml index eaf53286a..fade05b82 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml +++ b/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml @@ -47,7 +47,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -144,11 +144,6 @@ - - - - - @@ -239,8 +234,6 @@ - - @@ -287,8 +280,6 @@ - - @@ -405,7 +396,7 @@ - + @@ -430,7 +421,6 @@ - diff --git a/applications/jedi_lfric_tests/example_tlm_tests/mesh_C12.nc b/applications/jedi_lfric_tests/example_tlm_tests/mesh_C12.nc new file mode 100644 index 0000000000000000000000000000000000000000..f7ea6988e22a06194aac0d17b6e3be62cd539773 GIT binary patch literal 85708 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 Rwf*lmDjqBQ-|O@_{yzW$Qgi?S literal 0 HcmV?d00001 diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 index b25e8123e..0be6d7cd1 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 @@ -71,7 +71,7 @@ program algorithm_test logical(l_def) :: apply_partition_check integer(i_def) :: geometry - integer(i_def) :: stencil_depth(1) + integer(i_def) :: stencil_depth integer(i_def) :: method integer(i_def) :: number_of_layers real(r_def) :: domain_bottom diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf index 57cab669b..683dc9533 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/HEAD/rose-meta.conf @@ -52,14 +52,6 @@ help=Configuration option for JEDI-LFRIC emulator. ns=namelist/JEDI-LFRIC-setup title=JEDI-LFRIC Setings -[namelist:jedi_lfric_settings=adjoint_test_tolerance] -compulsory=false -description=Tolerance for inner product adjoint tests in jedi_tlm_tests -help=Set as appropriate based on configuration -!kind=default -sort-key= -type=real - [namelist:jedi_lfric_settings=forecast_length] compulsory=true description=The forecast duration diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py index f1f0c6481..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py @@ -21,10 +21,13 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -41,6 +44,7 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports @@ -120,139 +124,5 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py index 8c1c7b597..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py @@ -126,140 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py index 8c1c7b597..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py @@ -126,140 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py index 8c1c7b597..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py @@ -126,140 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py index 8c1c7b597..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py @@ -126,140 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py index 8c1c7b597..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py @@ -126,140 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf index 7f4050279..57a38b5b9 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/HEAD/rose-meta.conf @@ -1,5 +1,8 @@ import=jedi_common/HEAD +#============================================================================== +# Increment for the JEDI-LFRIC Emulator +#============================================================================== [namelist:jedi_increment] compulsory=true description=JEDI-LFRIC emulator increment configuration diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py index 8c1c7b597..8418438c1 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py @@ -126,140 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 index 2cc8af089..4cf75379e 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 @@ -34,7 +34,6 @@ module jedi_id_linear_model_mod use jedi_base_linear_model_mod, only : jedi_base_linear_model_type use jedi_lfric_duration_mod, only : jedi_duration_type use jedi_lfric_linear_fields_mod, only : variable_names, & - ls_variable_names, & create_linear_fields use jedi_lfric_wind_fields_mod, only : create_scalar_winds, & setup_vector_wind @@ -185,10 +184,10 @@ subroutine set_trajectory( self, jedi_state ) ! Create field collection that contains the linear state fields ! without "ls_" prepended. - call create_linear_fields(jedi_state%geometry%get_mesh(), jedi_state%geometry%get_twod_mesh(), next_linear_state) + call create_linear_fields(jedi_state%geometry%get_mesh(), next_linear_state) ! Copy data from the input state into next_linear_state - call jedi_state%get_to_field_collection( ls_variable_names, & + call jedi_state%get_to_field_collection( variable_names, & next_linear_state ) ! Create W2 wind, interpolate from scaler winds (W3/Wtheta) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 index 797201121..6be770327 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 @@ -39,7 +39,6 @@ module jedi_linear_model_mod zero_moist_fields use jedi_lfric_duration_mod, only : jedi_duration_type use jedi_lfric_linear_fields_mod, only : variable_names, & - ls_variable_names, & create_linear_fields use jedi_lfric_wind_fields_mod, only : create_scalar_winds, & setup_vector_wind @@ -183,10 +182,10 @@ subroutine set_trajectory( self, jedi_state ) ! Create field collection that contains the linear state fields ! without "ls_" prepended. - call create_linear_fields(jedi_state%geometry%get_mesh(), jedi_state%geometry%get_twod_mesh(), next_linear_state) + call create_linear_fields(jedi_state%geometry%get_mesh(), next_linear_state) ! Copy data from the input state into next_linear_state - call jedi_state%get_to_field_collection( ls_variable_names, & + call jedi_state%get_to_field_collection( variable_names, & next_linear_state ) ! Create W2 wind, interpolate from scaler winds (W3/Wtheta) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 index 34dd084dc..c8d0c0f0a 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 @@ -108,9 +108,6 @@ subroutine get_field_info(function_space, is_2d, variable_name) case ( "u10m" ) function_space = W3 is_2d = .true. - case ( "land_fraction" ) - function_space = W3 - is_2d = .true. case default write ( log_scratch_space, '(4A)' ) & "jedi_setup_field_meta_data_mod::get_field_info:: ", & diff --git a/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 index b72380ea3..adfa8a2b3 100644 --- a/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_id_tlm_tests.f90 @@ -198,10 +198,10 @@ program jedi_id_tlm_tests ! Apply the Adjoint dot product test: == ! Evaluate dot product of increments I11 and I21 - dot_product_1 = real(increment_11%dot_product_with(increment_21), r_def) + dot_product_1 = increment_11%dot_product_with(increment_21) ! Evaluate dot product of increments I12 and I22 - dot_product_2 = real(increment_12%dot_product_with(increment_22), r_def) + dot_product_2 = increment_12%dot_product_with(increment_22) ! == ! The two dot products should be nearly identical. The tolerance is diff --git a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 index 7a1580685..bfff68a72 100644 --- a/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 +++ b/applications/jedi_lfric_tests/source/jedi_tlm_tests.f90 @@ -36,8 +36,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, l_def + 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, & LOG_LEVEL_ALWAYS, LOG_LEVEL_ERROR, & @@ -74,12 +73,10 @@ program jedi_tlm_tests integer( kind=i_def ) :: model_communicator type( jedi_duration_type ) :: forecast_length type( namelist_type ), pointer :: jedi_lfric_settings_config - type( namelist_type ), pointer :: jedi_increment_config - logical( kind=l_def ) :: real_increment character( str_def ) :: forecast_length_str real( kind=r_def ) :: dot_product_1 real( kind=r_def ) :: dot_product_2 - real( kind=r_def ) :: absolute_tolerance + real( kind=r_def ), parameter :: absolute_tolerance = 1.0E-4_r_def real( kind=r_def ) :: machine_tolerance real( kind=r_def ) :: absolute_diff real( kind=r_def ) :: relative_diff @@ -116,12 +113,6 @@ program jedi_tlm_tests ! Create geometry call geometry%initialise( model_communicator, configuration, config ) - ! Create inc_initial, either from file or random - call inc_initial%initialise( geometry, configuration ) - jedi_increment_config => configuration%get_namelist('jedi_increment') - call jedi_increment_config%get_value( 'initialise_via_read', real_increment ) - if (.not. real_increment) call inc_initial%random() - ! Create state call state%initialise( geometry, configuration ) @@ -139,6 +130,10 @@ program jedi_tlm_tests ! ---- Perform the adjoint test + ! Create inc_initial and randomise + call inc_initial%initialise( geometry, configuration ) + call inc_initial%random() + ! Check the norm is not zero if (inc_initial%norm() <= 0.0_r_def) then call log_event("inc_initial norm not > 0.0", LOG_LEVEL_ERROR) @@ -156,7 +151,7 @@ program jedi_tlm_tests end if ! Compute - dot_product_1 = real(inc%scaled_dot_product_with_itself(), r_def) + dot_product_1 = inc%scaled_dot_product_with_itself() ! Propagate via AD model call linear_model%forecastAD( inc, forecast_length ) @@ -166,14 +161,13 @@ program jedi_tlm_tests end if ! Compute - dot_product_2 = real(inc%dot_product_with(inc_initial), r_def) + dot_product_2 = inc%dot_product_with(inc_initial) ! The two dot products should be nearly identical. The tolerance is included ! due to differences in order of operations and solver non-convergence. absolute_diff = abs( dot_product_1 - dot_product_2 ) machine_tolerance = spacing( max( abs( dot_product_1 ), abs( dot_product_2 ) ) ) relative_diff = absolute_diff / machine_tolerance - call jedi_lfric_settings_config%get_value( 'adjoint_test_tolerance', absolute_tolerance ) if (absolute_diff > absolute_tolerance ) then call run%finalise_timers() ! We still want timing info even if the test fails write( log_scratch_space, * ) "Adjoint test FAILED", & diff --git a/applications/jules/build/compile_options.mk b/applications/jules/build/compile_options.mk index 3ab2dcbf3..bf4bad539 100644 --- a/applications/jules/build/compile_options.mk +++ b/applications/jules/build/compile_options.mk @@ -13,8 +13,7 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +science/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/jules/build/psyclone_transmute_file_list.mk b/applications/jules/build/psyclone_transmute_file_list.mk index 61fa12ff2..dc6e63654 100644 --- a/applications/jules/build/psyclone_transmute_file_list.mk +++ b/applications/jules/build/psyclone_transmute_file_list.mk @@ -18,11 +18,6 @@ export PSYCLONE_PHYSICS_FILES = ##### TRANSMUTE_INCLUDE_METHOD specify_include ##### -# List to use PSyclone explicitly without any opt script -# This will remove hand written (OMP) directives in the source -# Used by both methods, specify_include and specify_exclude -export PSYCLONE_PASS_NO_SCRIPT = - ##### TRANSMUTE_INCLUDE_METHOD specify_exclude ##### # For GPU, we may want to use more generic local.py transformation scripts and psyclone by directory. # Advise which directories to pass to PSyclone. diff --git a/applications/jules/example/configuration.nml b/applications/jules/example/configuration.nml index 5000fe6ad..203e8892d 100644 --- a/applications/jules/example/configuration.nml +++ b/applications/jules/example/configuration.nml @@ -475,7 +475,6 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, -adjust_tracer_equation=.false. adjust_vhv_wind=.true., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jules/rose-meta/lfric-jules/versions.py b/applications/jules/rose-meta/lfric-jules/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/jules/rose-meta/lfric-jules/versions.py +++ b/applications/jules/rose-meta/lfric-jules/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/lfric2lfric/example/configuration.nml b/applications/lfric2lfric/example/configuration.nml index ea19ff585..b70cd2d22 100644 --- a/applications/lfric2lfric/example/configuration.nml +++ b/applications/lfric2lfric/example/configuration.nml @@ -5,7 +5,6 @@ destination_geometry = 'spherical', destination_mesh_name = 'dynamics', destination_meshfile_prefix = 'mesh_C24_MG', destination_topology = 'fully_periodic', -mode = 'ics', origin_domain = 'global', prepartitioned_meshes = .false., regrid_method = 'oasis', diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf index dbe84fe41..9b114f748 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf @@ -32,7 +32,6 @@ fail-if=this == namelist:lfric2lfric=source_mesh_name ; help=Mesh topologies are held in UGRID conformant NetCDF files which =may contain more than one mesh topology. This tag-name identifies =the mesh topology to use from the mesh file namelist:lfric2lfric=destination_meshfile_prefix. -ns=namelist/lfric2lfric/configuration !string_length=default type=character @@ -42,7 +41,6 @@ description=Location of destination 2D mesh input file(s) (prefix). help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should =be conformant to UGRID convention. = -ns=namelist/lfric2lfric/configuration !string_length=filename type=character @@ -80,20 +78,6 @@ ns=namelist/lfric2lfric/configuration !string_length=filename type=character -[namelist:lfric2lfric=mode] -compulsory=true -description=Generate Initial Conditions (ics) or Lateral Boundary Conditions (lbc) -!enumeration=true -help=Indicates whether to generate data on the destination mesh from data - =on the source mesh (ics), or whether to generate lateral boundary - =conditions for a regional destination mesh from data on the source - =mesh (lbc). -ns=namelist/lfric2lfric/configuration -trigger=namelist:lfric2lfric=source_file_lbc: 'lbc' ; - =namelist:lfric2lfric=weight_file_lbc: 'lbc' ; -value-titles=Initial conditions,Boundary conditions -values='ics','lbc' - [namelist:lfric2lfric=origin_domain] compulsory=true description=The domain that will be the source of the values to be regridded. @@ -101,7 +85,6 @@ description=The domain that will be the source of the values to be regridded. help=The LAM domain can only be used as an origin domain when regridding =to another LAM mesh, lfric2lfric does not support LAM-to-global or =LAM-to-LBC regridding. -ns=namelist/lfric2lfric/configuration sort-key=1 value-titles=global, LAM values='global', 'LAM' @@ -123,7 +106,6 @@ help=Input mesh files may contain global meshes whose extents are intended to co =Note: With increasing mesh size, at some point prepartitioned meshes may become = necessary. = -ns=namelist/lfric2lfric/configuration trigger=namelist:partitioning: .false. ; type=logical @@ -150,24 +132,13 @@ help=Method used to regrid between the source and destination mesh, = 'Oasis' : The regridding between the source and destination = grids is make through the weigh files generated = by an external tool, applied by the OASIS - = library. The weight file is specified in the - = OASIS namcouple file + = library. = ns=namelist/lfric2lfric/configuration trigger=namelist:lfric2lfric=weight_file: 'lfric2lfric' ; - =namelist:lfric2lfric=weight_file_lbc: 'lfric2lfric' ; value-titles=Inter-grid maps, LFRic2LFRic, Oasis values='map','lfric2lfric','oasis' -[namelist:lfric2lfric=source_file_lbc] -compulsory=true -description=Location of the lbc source file -help=File from where lateral boundary conditions will be generated - = -ns=namelist/lfric2lfric/configuration -!string_length=filename -type=character - [namelist:lfric2lfric=source_geometry] compulsory=true description=The geometry on which the source domain is embedded @@ -187,7 +158,6 @@ fail-if=this == namelist:lfric2lfric=destination_mesh_name ; help=Mesh topologies are held in UGRID conformant NetCDF files which =may contain more than one mesh topology. This tag-name identifies =the mesh topology to use from the mesh file namelist:lfric2lfric=source_meshfile_prefix. -ns=namelist/lfric2lfric/configuration !string_length=default type=character @@ -198,7 +168,6 @@ fail-if=namelist:lfric2lfric=regrid_method == "'map'" and this != namelist:lfric help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should =be conformant to UGRID convention. = -ns=namelist/lfric2lfric/configuration !string_length=filename type=character @@ -249,29 +218,16 @@ help=Target domains currently not supported include: = LAM => LBC = LAM => global = -ns=namelist/lfric2lfric/configuration sort-key=2 value-titles=global, LAM, LBC values='global', 'LAM', 'LBC' [namelist:lfric2lfric=weight_file] compulsory=true -description=Weight file for ics mesh regridding -fail-if=this == '' ; -help=Location of the weight file used to interpolate - =between the source and destination meshes - =when creating checkpoint files -ns=namelist/lfric2lfric/configuration -!string_length=filename -type=character - -[namelist:lfric2lfric=weight_file_lbc] -compulsory=true -description=Weight file for lbc mesh regridding +description=Weight file for mesh regridding fail-if=this == '' ; help=Location of the weight file used to interpolate =between the source and destination meshes - =when creating lateral boundary files ns=namelist/lfric2lfric/configuration !string_length=filename type=character diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 85f9ad8cf..8418438c1 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -21,10 +21,13 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -41,6 +44,7 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports @@ -120,70 +124,5 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t48(MacroUpgrade): - """Upgrade macro for ticket #48 by Juan M Castillo.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t48" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric2lfric - self.add_setting(config, ["namelist:lfric2lfric", "mode"], "'ics'") - self.add_setting( - config, - ["namelist:lfric2lfric", "source_file_lbc"], - "'source_file_lbc'", - ) - self.add_setting( - config, - ["namelist:lfric2lfric", "weight_file_lbc"], - "'weight_file_lbc'", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t48" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) return config, self.reports diff --git a/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 b/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 index 18e87d041..12fcaf4d6 100644 --- a/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 +++ b/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 @@ -32,7 +32,6 @@ module lfric2lfric_oasis_regrid_mod use constants_mod, only: i_def, r_def, l_def use fs_continuity_mod, only: W3, Wtheta use driver_modeldb_mod, only: modeldb_type - use model_clock_mod, only: model_clock_type #ifdef MCT use coupling_mod, only: coupling_type, & get_coupling_from_collection @@ -61,18 +60,16 @@ contains !> @brief Perform regridding of a field collection using weight files !> and OASIS !> @param[inout] modeldb The structure that holds model state - !> @param[inout] clock Clock for oasis time !> @param[out] field_dst Field in the destination mesh obtained !> after regridding the field in the !> source mesh !> @param[in] field_src Field in the source mesh - subroutine lfric2lfric_oasis_regrid(modeldb, clock, field_dst, field_src) + subroutine lfric2lfric_oasis_regrid(modeldb, field_dst, field_src) implicit none type(modeldb_type), intent(inout) :: modeldb - type(model_clock_type), intent(inout) :: clock type(field_type), pointer, intent(inout) :: field_dst type(field_type), pointer, intent(in) :: field_src @@ -127,7 +124,7 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(src_field, local_index) - call coupler_exchange_2d%set_time(clock) + call coupler_exchange_2d%set_time(modeldb%clock) call coupler_exchange_2d%copy_from_lfric(ierror) call coupler_exchange_2d%clear() @@ -136,7 +133,7 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling_dst" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(dst_field, local_index) - call coupler_exchange_2d%set_time(clock) + call coupler_exchange_2d%set_time(modeldb%clock) call coupler_exchange_2d%copy_to_lfric(ierror) call coupler_exchange_2d%clear() @@ -146,7 +143,7 @@ contains dst_field, l, k)) ! Update the coupling time - is_running = clock%tick() + is_running = modeldb%clock%tick() end do end do diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 b/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 index e02dd5580..c38f37b34 100644 --- a/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 +++ b/applications/lfric2lfric/source/driver/lfric2lfric_driver_mod.F90 @@ -7,35 +7,40 @@ !> module lfric2lfric_driver_mod - use constants_mod, only: str_def, i_def, l_def, r_second - use driver_fem_mod, only: final_fem - use driver_io_mod, only: final_io - use driver_modeldb_mod, only: modeldb_type - use field_collection_mod, only: field_collection_type - use lfric_xios_action_mod, only: advance - use lfric_xios_context_mod, only: lfric_xios_context_type - use lfric_xios_read_mod, only: read_checkpoint, & - read_state - use lfric_xios_write_mod, only: write_checkpoint, & - write_state - use log_mod, only: log_scratch_space, & - log_event, & - log_level_info - use model_clock_mod, only: model_clock_type - use namelist_mod, only: namelist_type - use sci_checksum_alg_mod, only: checksum_alg - use xios, only: xios_date, xios_get_current_date, & - xios_date_convert_to_string + use constants_mod, only: str_def, i_def, l_def, r_second + use driver_fem_mod, only: final_fem + use driver_io_mod, only: final_io + use driver_modeldb_mod, only: modeldb_type + use field_collection_iterator_mod, only: & + field_collection_iterator_type + use field_collection_mod, only: field_collection_type + use field_mod, only: field_type + use field_parent_mod, only: field_parent_type + use function_space_mod, only: function_space_type + use lfric_xios_context_mod, only: lfric_xios_context_type + use lfric_xios_read_mod, only: read_checkpoint + use lfric_xios_write_mod, only: write_checkpoint + use log_mod, only: log_event, & + log_level_info, & + log_scratch_space + use mesh_collection_mod, only: mesh_collection + use mesh_mod, only: mesh_type + use namelist_mod, only: namelist_type + use sci_checksum_alg_mod, only: checksum_alg !------------------------------------ ! lfric2lfric modules !------------------------------------ - use lfric2lfric_config_mod, only: mode_ics, mode_lbc + use lfric2lfric_config_mod, only: regrid_method_map, & + regrid_method_lfric2lfric, & + regrid_method_oasis use lfric2lfric_infrastructure_mod, only: initialise_infrastructure, & context_dst, context_src, & source_collection_name, & target_collection_name - use lfric2lfric_regrid_mod, only: lfric2lfric_regrid + use lfric2lfric_map_regrid_mod, only: lfric2lfric_map_regrid + use lfric2lfric_no_regrid_mod, only: lfric2lfric_no_regrid + use lfric2lfric_oasis_regrid_mod, only: lfric2lfric_oasis_regrid implicit none @@ -51,16 +56,13 @@ module lfric2lfric_driver_mod !! extrusions, XIOS contexts and files, field collections !! and fields. !> @param [in,out] modeldb The structure holding model state - !> @param [in,out] oasis_clock Clock for OASIS exchanges - subroutine initialise( modeldb, oasis_clock ) + subroutine initialise( modeldb ) implicit none - type(modeldb_type), intent(inout) :: modeldb - type(model_clock_type), allocatable, & - intent(inout) :: oasis_clock + type(modeldb_type), intent(inout) :: modeldb - call initialise_infrastructure( modeldb, oasis_clock ) + call initialise_infrastructure( modeldb ) end subroutine initialise @@ -69,16 +71,24 @@ end subroutine initialise !> @details Populates fields in the source field collection with data !! read from the source XIOS context file, regrids the field !! collection to a destination mesh, switches to the destination - !! XIOS context and writes to an output file. - !> @param [in,out] modeldb The structure that holds model state - !> @param [in,out] oasis_clock Clock for OASIS exchanges - subroutine run( modeldb, oasis_clock ) + !! XIOS context and writes to a checkpoint file. + !! TODO: #262 Porting algorithms and kernels + !! Over one time step, all regridding is performed by algorithm + !! modules specific to the regrid method defined in the + !! configuration. + !! Fields to be regridded are extracted from the source field + !! collection and located in the source dump file using + !! `read_checkpoint`. Corresponding source and target field pairs + !! are passed to the regridding algorithm, written to fields + !! in the destination field collection and then written to + !! an outfile. + !> @param [in,out] modeldb The structure that holds model + !! state + subroutine run( modeldb ) implicit none - type(modeldb_type), intent(inout) :: modeldb - type(model_clock_type), allocatable, & - intent(inout) :: oasis_clock + type(modeldb_type), intent(inout) :: modeldb ! LFRic-XIOS constants integer(kind=i_def), parameter :: start_timestep = 1_i_def @@ -86,24 +96,27 @@ subroutine run( modeldb, oasis_clock ) ! Namelist variables character(len=str_def) :: start_dump_filename character(len=str_def) :: checkpoint_stem_name - integer(kind=i_def) :: mode integer(kind=i_def) :: regrid_method ! Local parameters type(namelist_type), pointer :: files_nml type(namelist_type), pointer :: lfric2lfric_nml - integer(kind=i_def) :: step, time_steps - logical(kind=l_def) :: is_running - type(xios_date) :: current_date - character(len=32) :: current_date_str - real(kind=r_second) :: checkpoint_times(1) + type(field_collection_type), pointer :: source_fields + type(field_collection_type), pointer :: target_fields + + type(field_collection_iterator_type) :: iter - type(field_collection_type), pointer :: source_fields - type(field_collection_type), pointer :: target_fields + class(field_parent_type), pointer :: field => null() + type(field_type), pointer :: field_src => null() + type(field_type), pointer :: field_dst => null() type(lfric_xios_context_type), pointer :: io_context + character(len=str_def) :: field_name + + real(r_second) :: checkpoint_times(1) + ! Namelist pointers files_nml => modeldb%configuration%get_namelist('files') lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') @@ -111,59 +124,61 @@ subroutine run( modeldb, oasis_clock ) ! Extract configuration variables call files_nml%get_value( 'start_dump_filename', start_dump_filename ) call files_nml%get_value( 'checkpoint_stem_name', checkpoint_stem_name ) - call lfric2lfric_nml%get_value( 'mode', mode ) call lfric2lfric_nml%get_value( 'regrid_method', regrid_method ) ! Point to source and target field collections source_fields => modeldb%fields%get_field_collection(source_collection_name) target_fields => modeldb%fields%get_field_collection(target_collection_name) - ! Read fields and perform the regridding - if (mode == mode_ics) then - call read_checkpoint(source_fields, & - start_timestep, & - start_dump_filename ) - - call lfric2lfric_regrid(modeldb, oasis_clock, source_fields, & - target_fields, regrid_method) - - ! Write output - call modeldb%io_contexts%get_io_context(context_dst, io_context) - call io_context%set_current() - - checkpoint_times(1) = modeldb%clock%seconds_from_steps(modeldb%clock%get_step()) - call write_checkpoint(target_fields, modeldb%values, modeldb%clock, & - checkpoint_stem_name, checkpoint_times) - - else if (mode == mode_lbc) then - time_steps = modeldb%clock%get_last_step() - & - modeldb%clock%get_first_step() + 1 - - do step=1, time_steps - call xios_get_current_date(current_date) - call xios_date_convert_to_string(current_date, current_date_str) - write(log_scratch_space, '(A)') 'Regridding at xios date: ' // & - current_date_str - call log_event( log_scratch_space, log_level_info ) - - call read_state(source_fields) - - call lfric2lfric_regrid(modeldb, oasis_clock, source_fields, & - target_fields, regrid_method) - - is_running = modeldb%clock%tick() - - call modeldb%io_contexts%get_io_context(context_dst, io_context) - call io_context%set_current() - call advance(io_context, modeldb%clock) - - call write_state(target_fields, prefix='lbc_') - - call modeldb%io_contexts%get_io_context(context_src, io_context) - call io_context%set_current() - call advance(io_context, modeldb%clock) - end do - end if + call read_checkpoint(source_fields, & + start_timestep, & + start_dump_filename ) + + ! Main loop over fields to be processed + call iter%initialise(source_fields) + do + ! Locate the field to be processed in the field collections + if ( .not.iter%has_next() ) exit + field => iter%next() + field_name = field%get_name() + + call source_fields%get_field(field_name, field_src) + call target_fields%get_field(field_name, field_dst) + + write(log_scratch_space, '(A,A)') "Processing lfric field ", & + trim(field_name) + call log_event(log_scratch_space, log_level_info) + + ! Regrid source field depending on regrid method + select case (regrid_method) + case (regrid_method_map) + call lfric2lfric_map_regrid(field_dst, field_src) + + case (regrid_method_lfric2lfric) + write(log_scratch_space, '(A)') & + 'Regrid method lfric2lfric not implemented yet' + call log_event(log_scratch_space, log_level_info) + + call lfric2lfric_no_regrid(field_dst) + + case (regrid_method_oasis) +#ifdef MCT + call lfric2lfric_oasis_regrid(modeldb, & + field_dst, field_src) +#endif + end select + + ! Free memory of the processed field + call field_src%field_final() + end do + + ! Write output + call modeldb%io_contexts%get_io_context(context_dst, io_context) + call io_context%set_current() + + checkpoint_times(1) = modeldb%clock%seconds_from_steps(modeldb%clock%get_step()) + call write_checkpoint( target_fields, modeldb%values, modeldb%clock, & + checkpoint_stem_name, checkpoint_times ) ! Write checksum call checksum_alg("lfric2lfric", field_collection=target_fields) diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 b/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 index ab2a73b09..0258c78d9 100644 --- a/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 +++ b/applications/lfric2lfric/source/driver/lfric2lfric_init_mod.f90 @@ -11,18 +11,15 @@ module lfric2lfric_init_mod - use constants_mod, only: i_def, r_def, str_def - use driver_modeldb_mod, only: modeldb_type - use field_collection_mod, only: field_collection_type - use lfric_xios_context_mod, only: lfric_xios_context_type - use log_mod, only: log_event, & - log_level_info - use mesh_mod, only: mesh_type - use netcdf, only: nf90_max_name + use constants_mod, only : i_def, r_def, str_def + use driver_modeldb_mod, only : modeldb_type + use field_collection_mod, only : field_collection_type + use log_mod, only : log_event, & + log_level_info + use mesh_mod, only : mesh_type ! lfric2lfric mods - use lfric2lfric_config_mod, only: mode_ics, mode_lbc - use lfric2lfric_field_init_mod, only: get_field_list, field_maker + use lfric2lfric_field_init_mod, only : get_field_list, field_maker implicit none private @@ -34,32 +31,23 @@ module lfric2lfric_init_mod !> @details Calls out to field_maker to initialise fields on given field !! collection. !> @param [in,out] modeldb Holds model state - !> @param [in] context_src The name of the XIOS context that - !! will hold the source file - !> @param [in] context_dst The name of the XIOS context that - !! will hold the file to be written !> @param [in] start_dump_filename File to get field names from - !> @param [in] mode Process ics or lbcs !> @param [in] origin_collection_name Holds the origin fields !> @param [in] origin_mesh Mesh to initialise 3D fields !> @param [in] origin_twod_mesh Mesh to initialise 2D fields !> @param [in] target_collection_name Holds target fields !> @param [in] target_mesh Mesh for target 3D fields !> @param [in] target_twod_mesh Mesh for target 2D fields - subroutine init_lfric2lfric( modeldb, context_src, context_dst, & - start_dump_filename, mode, & - origin_collection_name, & - origin_mesh, origin_twod_mesh, & - target_collection_name, & + subroutine init_lfric2lfric( modeldb, start_dump_filename, & + origin_collection_name, & + origin_mesh, origin_twod_mesh, & + target_collection_name, & target_mesh, target_twod_mesh ) implicit none type(modeldb_type), intent(inout) :: modeldb - character(len=*), intent(in) :: context_src - character(len=*), intent(in) :: context_dst character(len=*), intent(in) :: start_dump_filename - integer(i_def), intent(in) :: mode character(len=*), intent(in) :: origin_collection_name type(mesh_type), intent(in), pointer :: origin_mesh type(mesh_type), intent(in), pointer :: origin_twod_mesh @@ -74,24 +62,14 @@ subroutine init_lfric2lfric( modeldb, context_src, context_dst, & ! For get_field_list returns integer(kind=i_def) :: num_fields character(len=str_def), allocatable :: config_list(:) - character(len=nf90_max_name) :: prefix - - ! Source context pointer and temporary context for setup - type(lfric_xios_context_type), pointer :: io_context ! Looping variable integer(kind=i_def) :: i call log_event( 'lfric2lfric: Initialising miniapp ...', log_level_info ) - if (mode == mode_ics) then - prefix = 'restart_' - else if (mode == mode_lbc) then - prefix = '' - end if - ! Get field names from filename and validate presence in iodef.xml - call get_field_list( num_fields, config_list, start_dump_filename, prefix ) + call get_field_list( num_fields, config_list, start_dump_filename ) !-------------------------------------------------------------------------- ! Initialise Source Fields @@ -105,8 +83,7 @@ subroutine init_lfric2lfric( modeldb, context_src, context_dst, & call field_maker( field_collection, & config_list(i), & origin_mesh, & - origin_twod_mesh, & - prefix ) + origin_twod_mesh ) end do !-------------------------------------------------------------------------- @@ -116,26 +93,13 @@ subroutine init_lfric2lfric( modeldb, context_src, context_dst, & field_collection => & modeldb%fields%get_field_collection(target_collection_name) - call modeldb%io_contexts%get_io_context(context_dst, io_context) - call io_context%set_current() - - if (mode == mode_ics) then - prefix = 'checkpoint_' - else if (mode == mode_lbc) then - prefix = 'lbc_' - end if - do i = 1, num_fields call field_maker( field_collection, & config_list(i), & target_mesh, & - target_twod_mesh, & - prefix ) + target_twod_mesh ) end do - call modeldb%io_contexts%get_io_context(context_src, io_context) - call io_context%set_current() - ! Now finished with config_list, deallocate deallocate(config_list) diff --git a/applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 b/applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 deleted file mode 100644 index fcab9323b..000000000 --- a/applications/lfric2lfric/source/driver/lfric2lfric_regrid_mod.F90 +++ /dev/null @@ -1,112 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2025 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Performs regridding of a field collection -!> -module lfric2lfric_regrid_mod - - use constants_mod, only: str_def, i_def - use driver_modeldb_mod, only: modeldb_type - use field_parent_mod, only: field_parent_type - use field_mod, only: field_type - use field_collection_mod, only: field_collection_type - use field_collection_iterator_mod, only: & - field_collection_iterator_type - use log_mod, only: log_event, & - log_level_info, & - log_scratch_space - use model_clock_mod, only: model_clock_type - - !------------------------------------ - ! lfric2lfric modules - !------------------------------------ - use lfric2lfric_config_mod, only: regrid_method_map, & - regrid_method_lfric2lfric, & - regrid_method_oasis - use lfric2lfric_map_regrid_mod, only: lfric2lfric_map_regrid - use lfric2lfric_no_regrid_mod, only: lfric2lfric_no_regrid - use lfric2lfric_oasis_regrid_mod, only: lfric2lfric_oasis_regrid - - implicit none - - private - public lfric2lfric_regrid - -contains - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !> @brief Performs regridding of a field collection - !> @details Over one time step, all regridding is performed by algorithm - !! modules specific to the regrid method defined in the - !! configuration. - !! Fields to be regridded are extracted from the source field - !! collection. Corresponding source and target field pairs - !! are passed to the regridding algorithm, and written to fields - !! in the destination field collection. - !> @param [in,out] modeldb The structure that holds model - !! state - !> @param [in,out] oasis_clock Clock for OASIS exchanges - !> @param [in] source_fields Collection of fields to be regridded - !> @param [in] target_fields Collection of regridded fields - !> @param [in] regrid_method Method for regridding between the - !> source and destination meshes - subroutine lfric2lfric_regrid( modeldb, oasis_clock, & - source_fields, target_fields, regrid_method ) - - implicit none - - type(modeldb_type), intent(inout) :: modeldb - type(model_clock_type), allocatable, intent(inout) :: oasis_clock - type(field_collection_type), pointer, intent(in) :: source_fields - type(field_collection_type), pointer, intent(inout) :: target_fields - integer(kind=i_def), intent(in) :: regrid_method - - - type(field_collection_iterator_type) :: iter - - class(field_parent_type), pointer :: field => null() - type(field_type), pointer :: field_src => null() - type(field_type), pointer :: field_dst => null() - - character(len=str_def) :: field_name - - ! Main loop over fields to be processed - call iter%initialise(source_fields) - do - ! Locate the field to be processed in the field collections - if ( .not.iter%has_next() ) exit - field => iter%next() - field_name = field%get_name() - - call source_fields%get_field(field_name, field_src) - call target_fields%get_field(field_name, field_dst) - - write(log_scratch_space, '(A,A)') "Processing lfric field ", & - trim(field_name) - call log_event(log_scratch_space, log_level_info) - - ! Regrid source field depending on regrid method - select case (regrid_method) - case (regrid_method_map) - call lfric2lfric_map_regrid(field_dst, field_src) - - case (regrid_method_lfric2lfric) - write(log_scratch_space, '(A)') & - 'Regrid method lfric2lfric not implemented yet' - call log_event(log_scratch_space, log_level_info) - - call lfric2lfric_no_regrid(field_dst) - - case (regrid_method_oasis) -#ifdef MCT - call lfric2lfric_oasis_regrid(modeldb, oasis_clock, & - field_dst, field_src) -#endif - end select - end do - - end subroutine lfric2lfric_regrid - -end module lfric2lfric_regrid_mod diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 index d992e89b6..03fe1e587 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_field_init_mod.f90 @@ -22,9 +22,9 @@ module lfric2lfric_field_init_mod use lfric_xios_diag_mod, only: field_is_valid use lfric_xios_read_mod, only: read_field_generic, & checkpoint_read_xios + use space_from_metadata_mod, only: space_from_metadata use lfric_xios_write_mod, only: write_field_generic, & checkpoint_write_xios - use lfric2lfric_config_mod, only: mode_ics, mode_lbc use log_mod, only: log_event, & log_scratch_space, & log_level_info, & @@ -34,7 +34,6 @@ module lfric2lfric_field_init_mod use netcdf, only: nf90_inquire_variable, & nf90_inquire, & nf90_max_name - use space_from_metadata_mod, only: space_from_metadata implicit none @@ -55,15 +54,13 @@ module lfric2lfric_field_init_mod !> @param [out] num_fields Number of valid fields in the input file !> @param [out] config_list Vector of valid field names in the input file !> @param [in] file_name Input file to be checked - !> @param [in] prefix Variable name prefix - subroutine get_field_list(num_fields, config_list, file_name, prefix) + subroutine get_field_list(num_fields, config_list, file_name) implicit none integer(kind=i_def), intent(out) :: num_fields character(len=str_def), allocatable, intent(out) :: config_list(:) character(len=str_def), intent(in) :: file_name - character(len=nf90_max_name), intent(in) :: prefix ! Local variables type(lfric_ncdf_file_type) :: input_file integer(kind=i_def), allocatable :: varid_list(:) @@ -94,7 +91,7 @@ subroutine get_field_list(num_fields, config_list, file_name, prefix) varid_list(i), & name=var_name ) - if (field_is_valid(trim(prefix)//trim(var_name))) then + if (field_is_valid('restart_'//trim(var_name))) then num_fields = num_fields + 1 ! Increment counter config_list(num_fields) = trim(var_name) ! Add field to the config_list @@ -105,7 +102,7 @@ subroutine get_field_list(num_fields, config_list, file_name, prefix) else write(log_scratch_space, '(A)') & "Field not found in iodef file, skipping: "//& - trim(prefix)//trim(var_name) + "restart_"//trim(var_name) call log_event(log_scratch_space, log_level_trace) endif end do @@ -135,13 +132,12 @@ end subroutine get_field_list !! initalised on !> @param [in] twod_mesh The 2D mesh the field could be !! intialised on - subroutine field_maker(field_collection, field_name, mesh, twod_mesh, prefix) + subroutine field_maker(field_collection, field_name, mesh, twod_mesh) type(field_collection_type), pointer, intent(inout) :: field_collection character(len=*), intent(in) :: field_name type(mesh_type), pointer, intent(in) :: mesh type(mesh_type), pointer, intent(in) :: twod_mesh - character(len=nf90_max_name), intent(in) :: prefix ! Field object to initialise type(field_type) :: field @@ -161,10 +157,10 @@ subroutine field_maker(field_collection, field_name, mesh, twod_mesh, prefix) if ( .NOT. field_collection%field_exists(field_name) ) then ! Get function space from metadata - vector_space => space_from_metadata(trim(prefix)//trim(field_name), & - 'Regridding', & - mesh_3d=mesh, & - mesh_2d=twod_mesh ) + vector_space => space_from_metadata(trim("restart_"//field_name), & + 'Regridding', & + mesh_3d=mesh, & + mesh_2d=twod_mesh ) ! Initialise the field call field%initialise(vector_space=vector_space, & diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 index 10adc1eb6..c11ae829b 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_file_init_mod.f90 @@ -8,27 +8,28 @@ !! and formats it so that it can be passed to the infrastructure. module lfric2lfric_file_init_mod - use constants_mod, only: i_def, & - str_max_filename - use driver_modeldb_mod, only: modeldb_type - use file_mod, only: FILE_MODE_READ, & - FILE_MODE_WRITE - use io_config_mod, only: diagnostic_frequency, & - checkpoint_write, & - checkpoint_read, & - write_diag, & - use_xios_io - use lfric_xios_file_mod, only: lfric_xios_file_type, & - OPERATION_TIMESERIES - use lfric2lfric_config_mod, only: dst_ancil_directory, & - dst_orography_mean_ancil_path, & - src_ancil_directory, & - src_orography_mean_ancil_path, & - mode_ics, mode_lbc - use linked_list_mod, only: linked_list_type - use namelist_mod, only: namelist_type - use orography_config_mod, only: orog_init_option, & - orog_init_option_ancil + use constants_mod, only : i_def, & + str_max_filename + use driver_modeldb_mod, only : modeldb_type + use file_mod, only : FILE_MODE_READ, & + FILE_MODE_WRITE + use files_config_mod, only : checkpoint_stem_name, & + diag_stem_name, & + start_dump_filename + use io_config_mod, only : diagnostic_frequency, & + checkpoint_write, & + checkpoint_read, & + write_diag, & + use_xios_io + use lfric_xios_file_mod, only : lfric_xios_file_type, & + OPERATION_TIMESERIES + use lfric2lfric_config_mod, only : dst_ancil_directory, & + dst_orography_mean_ancil_path, & + src_ancil_directory, & + src_orography_mean_ancil_path + use linked_list_mod, only : linked_list_type + use orography_config_mod, only : orog_init_option, & + orog_init_option_ancil implicit none @@ -39,8 +40,7 @@ module lfric2lfric_file_init_mod !> @brief Sets up source I/O configuration. !> @details Initialises the file list for the source I/O context, using the - !! start_dump_filename extracted from the `files` namelist, or the - !! source_file_lbc extracted from the `lfric2lfric` namelist. + !! start_dump_filename extracted from the `files` namelist. !> @param [out] files_list The list of I/O files. !> @param [in,out] modeldb Required by init_io. subroutine init_lfric2lfric_src_files( files_list, modeldb ) @@ -50,41 +50,26 @@ subroutine init_lfric2lfric_src_files( files_list, modeldb ) type(linked_list_type), intent(out) :: files_list type(modeldb_type), optional, intent(inout) :: modeldb - type(namelist_type), pointer :: lfric2lfric_nml - type(namelist_type), pointer :: files_nml - - integer(kind=i_def) :: mode - character(len=str_max_filename) :: start_dump_filename - character(len=str_max_filename) :: source_file_lbc character(len=str_max_filename) :: src_ancil_fname if( use_xios_io ) then - lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') - call lfric2lfric_nml%get_value( 'mode', mode ) - - files_nml => modeldb%configuration%get_namelist('files') - if (mode == mode_ics) then - call files_nml%get_value( 'start_dump_filename', start_dump_filename ) - - ! Setup checkpoint reading context information - call files_list%insert_item( & - lfric_xios_file_type( trim(start_dump_filename), & - xios_id="lfric_checkpoint_read", & - io_mode=FILE_MODE_READ ) ) - - else if (mode == mode_lbc) then - call lfric2lfric_nml%get_value( 'source_file_lbc', source_file_lbc ) - - ! Setup lbc source reading context information - call files_list%insert_item( & - lfric_xios_file_type( trim(source_file_lbc), & - xios_id="lfric_lbc_read", & - io_mode=FILE_MODE_READ, & - operation=OPERATION_TIMESERIES, & + ! Set up diagnostic writing info + if( write_diag ) then + ! Setup diagnostic output file + call files_list%insert_item( & + lfric_xios_file_type( trim( diag_stem_name ), & + xios_id="lfric_diag", & + io_mode=FILE_MODE_WRITE, & freq=diagnostic_frequency) ) endif + ! Setup checkpoint reading context information + call files_list%insert_item( & + lfric_xios_file_type( trim(start_dump_filename), & + xios_id="lfric_checkpoint_read", & + io_mode=FILE_MODE_READ ) ) + ! Setup orography ancillary file if ( orog_init_option == orog_init_option_ancil ) then ! Set orography ancil filename from namelist @@ -113,52 +98,20 @@ subroutine init_lfric2lfric_dst_files( files_list, modeldb ) type(modeldb_type), optional, intent(inout) :: modeldb ! Local variables - type(namelist_type), pointer :: lfric2lfric_nml - type(namelist_type), pointer :: files_nml - integer(kind=i_def), parameter :: checkpoint_frequency = 1_i_def + integer(kind=i_def), parameter :: checkpoint_frequency = 1_i_def - integer(kind=i_def) :: mode character(len=str_max_filename) :: dst_ancil_fname - character(len=str_max_filename) :: checkpoint_stem_name - character(len=str_max_filename) :: diag_stem_name if( use_xios_io ) then - lfric2lfric_nml => modeldb%configuration%get_namelist('lfric2lfric') - call lfric2lfric_nml%get_value( 'mode', mode ) - - files_nml => modeldb%configuration%get_namelist('files') - ! Set up diagnostic writing info - if( write_diag ) then - call files_nml%get_value( 'diag_stem_name', diag_stem_name ) - - ! Setup diagnostic output file - call files_list%insert_item( & - lfric_xios_file_type( trim( diag_stem_name ), & - xios_id="lfric_diag", & - io_mode=FILE_MODE_WRITE, & - freq=diagnostic_frequency) ) - endif - - if (mode == mode_ics) then - ! Setup checkpoint writing context information - if ( checkpoint_write ) then - call files_nml%get_value( 'checkpoint_stem_name', checkpoint_stem_name ) - + ! Setup checkpoint reading context information + if ( checkpoint_write ) then call files_list%insert_item( & lfric_xios_file_type( trim( checkpoint_stem_name ), & xios_id="lfric_checkpoint_write", & io_mode=FILE_MODE_WRITE, & + operation=OPERATION_TIMESERIES, & freq=checkpoint_frequency ) ) - end if - else if (mode == mode_lbc) then - ! Setup lbc writing context information - call files_list%insert_item( & - lfric_xios_file_type( "lfric2lfric_lbc", & - xios_id="lfric_lbc_write", & - io_mode=FILE_MODE_WRITE, & - operation=OPERATION_TIMESERIES, & - freq=diagnostic_frequency ) ) endif ! Setup orography ancillary file diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index c295d528e..faf7d2240 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -21,6 +21,7 @@ module lfric2lfric_infrastructure_mod use driver_fem_mod, only: init_fem use driver_io_mod, only: init_io, & filelist_populator + use check_configuration_mod, only: get_required_stencil_depth use extrusion_mod, only: extrusion_type, & uniform_extrusion_type, & prime_extrusion, & @@ -67,7 +68,7 @@ module lfric2lfric_infrastructure_mod use lfric2lfric_init_mesh_mod, only: init_mesh use lfric2lfric_check_conf_mod, only: lfric2lfric_check_configuration use lfric2lfric_file_init_mod, only: init_lfric2lfric_dst_files, & - init_lfric2lfric_src_files + init_lfric2lfric_src_files use lfric2lfric_init_mod, only: init_lfric2lfric use lfric2lfric_init_coupler_mod,only: lfric2lfric_init_coupler_src, & lfric2lfric_init_coupler_dst, & @@ -92,13 +93,11 @@ module lfric2lfric_infrastructure_mod method_um_L120_99t_21s_40km, & method_um_L140_122t_18s_40km, & method_um_L70_50t_20s_80km - use lfric2lfric_config_mod, only: mode_ics, mode_lbc, & + use lfric2lfric_config_mod, only: regrid_method_oasis, & regrid_method_lfric2lfric, & regrid_method_map, & - regrid_method_oasis, & - source_geometry_planar, & - source_geometry_spherical - + source_geometry_spherical, & + source_geometry_planar implicit none @@ -121,15 +120,12 @@ contains !! checks the configuration namelist, initialises meshes, !! extrusions, XIOS contexts and files, field collections and !! fields. - !> @param [in,out] modeldb The structure holding model state - !> @param [in,out] oasis_clock Clock for OASIS exchanges - subroutine initialise_infrastructure( modeldb, oasis_clock ) + !> @param [in,out] modeldb The structure holding model state + subroutine initialise_infrastructure( modeldb ) implicit none type(modeldb_type), intent(inout) :: modeldb - type(model_clock_type), allocatable, & - intent(inout) :: oasis_clock ! Coordinate field type(field_type), pointer :: chi(:) @@ -137,12 +133,12 @@ contains type(field_type) :: surface_altitude_dst type(field_type) :: surface_altitude_src type(field_type) :: surface_altitude_src_on_dst - type(field_type), pointer :: src_field - type(field_type), pointer :: dst_field + type(field_type), pointer :: src_field + type(field_type), pointer :: dst_field type(inventory_by_mesh_type), pointer :: chi_inventory type(inventory_by_mesh_type), pointer :: panel_id_inventory - type(function_space_type), pointer :: vector_space + type(function_space_type), pointer :: vector_space !----------------------- ! Mesh Pointers @@ -168,12 +164,13 @@ contains character(len=str_def) :: mesh_names(2) character(len=str_def), allocatable :: twod_names(:) character(len=str_def) :: start_dump_filename - character(len=str_def) :: source_file_lbc ! lfric2lfric namelist parameters - integer(kind=i_def) :: stencil_depth(1) + integer(kind=i_def) :: origin_domain + integer(kind=i_def) :: target_domain + + integer(kind=i_def) :: stencil_depth integer(kind=i_def) :: source_geometry - integer(i_def) :: mode integer(i_def) :: regrid_method real(kind=r_def) :: domain_bottom real(kind=r_def) :: scaled_radius @@ -190,20 +187,21 @@ contains integer(kind=i_def), parameter :: dst = 1 integer(kind=i_def), parameter :: src = 2 - type(coupling_type), pointer :: coupling_ptr - type(field_collection_type), pointer :: cpl_snd_2d - type(field_collection_type), pointer :: cpl_rcv_2d - integer(kind=i_def), pointer :: local_index(:) - type(coupler_exchange_2d_type) :: coupler_exchange_2d - integer(kind=i_def) :: ierror - logical(kind=l_def) :: is_running + type(coupling_type), pointer :: coupling_ptr + + type(field_collection_type), pointer :: cpl_snd_2d + type(field_collection_type), pointer :: cpl_rcv_2d + integer(i_def), pointer :: local_index(:) + type(coupler_exchange_2d_type) :: coupler_exchange_2d + integer(i_def) :: ierror + logical(l_def) :: is_running !------------------------ ! XIOS contexts !------------------------ ! Pointer for subroutines used in init_io - procedure(filelist_populator), pointer :: files_init_ptr - procedure(callback_clock_arg), pointer :: before_close + procedure(filelist_populator), pointer :: files_init_ptr + procedure(callback_clock_arg), pointer :: before_close => null() ! Source context pointer and temporary context for setup type(lfric_xios_context_type) :: tmp_io_context_src @@ -229,12 +227,13 @@ contains ! Check lfric2lfric configuration settings are allowed call lfric2lfric_check_configuration( lfric2lfric_nml ) - call lfric2lfric_nml%get_value( 'mode', mode ) + call lfric2lfric_nml%get_value( 'origin_domain', origin_domain ) call lfric2lfric_nml%get_value( 'regrid_method', regrid_method ) call lfric2lfric_nml%get_value( 'destination_mesh_name', & mesh_names(dst) ) call lfric2lfric_nml%get_value( 'source_mesh_name', & mesh_names(src) ) + call lfric2lfric_nml%get_value( 'target_domain', target_domain ) call lfric2lfric_nml%get_value( 'source_geometry', source_geometry ) call files_nml%get_value( 'start_dump_filename', start_dump_filename ) call finite_element_nml%get_value( 'element_order_h', element_order_h) @@ -316,7 +315,7 @@ contains !----------------------------------------------------------------------- ! Create the required meshes !----------------------------------------------------------------------- - stencil_depth = 2 + stencil_depth = get_required_stencil_depth() call init_mesh( modeldb%config, & modeldb%configuration, & modeldb%mpi%get_comm_rank(), & @@ -343,8 +342,9 @@ contains call init_fem( mesh_collection, chi_inventory, panel_id_inventory ) !----------------------------------------------------------------------- - ! Assign pointers to the correct meshes + ! Create the coordinates fields !----------------------------------------------------------------------- + ! Assign pointers to the correct meshes mesh_src => mesh_collection%get_mesh(trim(mesh_names(src))) twod_mesh_src => mesh_collection%get_mesh(trim(twod_names(src))) mesh_dst => mesh_collection%get_mesh(trim(mesh_names(dst))) @@ -380,16 +380,23 @@ contains call modeldb%io_contexts%get_io_context(context_dst, io_context_dst) + ! Must call advance to align IO context clock with iodef and file + ! output frequency + call advance(io_context_dst, modeldb%clock) + !======================================================================= - ! Initialise the OASIS clock + ! Initialise the clock !======================================================================= - ! If Oasis is used, it can only provide one coupling per clock tick - so we + ! lfric2lfric doesn't use a typical model clock. To make it more flexible, + ! fields (which can be multi-level and multi data) are broken down into + ! simple 2d fields, which are then passed through regridding. If Oasis is + ! being used, it can only provide one coupling per clock tick - so we ! introduce a pseudo clock, that ticks every coupling, rather than every ! timestep. We don't know how many 2d fields will be passed through the - ! coupler yet, so set the upper limit to "huge" to support everything - oasis_clock = model_clock_type(1_i_def, huge(1_i_def), & + ! coupler, yet, so set the upper limit to "huge" to support everything + modeldb%clock = model_clock_type(1_i_def, huge(1_i_def), & 1.0_r_second, 0.0_r_second) - is_running = oasis_clock%tick() + is_running = modeldb%clock%tick() !======================================================================= ! Initialise destination orography @@ -431,7 +438,6 @@ contains call panel_id_inventory%get_field(mesh_src, panel_id) ! Using correct chi and panel_id, initialise xios context for source mesh - nullify( before_close ) call io_context_src%initialise_xios_context( modeldb%mpi%get_comm(), & chi, & panel_id, & @@ -439,6 +445,10 @@ contains modeldb%calendar, & before_close ) + ! Must call advance to align IO context clock with iodef and file + ! output frequency + call advance(io_context_src, modeldb%clock) + !======================================================================= ! Initialise source orography !======================================================================= @@ -461,18 +471,9 @@ contains !======================================================================= ! Create and initialise prognostic fields !======================================================================= - if (mode == mode_ics) then - call init_lfric2lfric( modeldb, context_src, context_dst, & - start_dump_filename, mode, & - source_collection_name, mesh_src, twod_mesh_src, & - target_collection_name, mesh_dst, twod_mesh_dst ) - else if (mode == mode_lbc) then - call lfric2lfric_nml%get_value( 'source_file_lbc', source_file_lbc ) - call init_lfric2lfric( modeldb, context_src, context_dst, & - source_file_lbc, mode, & - source_collection_name, mesh_src, twod_mesh_src, & - target_collection_name, mesh_dst, twod_mesh_dst ) - end if + call init_lfric2lfric( modeldb, start_dump_filename, & + source_collection_name, mesh_src, twod_mesh_src, & + target_collection_name, mesh_dst, twod_mesh_dst ) !======================================================================= ! Initialize variables for each regrid method @@ -538,7 +539,7 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(src_field, local_index) - call coupler_exchange_2d%set_time(oasis_clock) + call coupler_exchange_2d%set_time(modeldb%clock) call coupler_exchange_2d%copy_from_lfric(ierror) call coupler_exchange_2d%clear() @@ -546,12 +547,12 @@ contains coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling_dst" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(dst_field, local_index) - call coupler_exchange_2d%set_time(oasis_clock) + call coupler_exchange_2d%set_time(modeldb%clock) call coupler_exchange_2d%copy_to_lfric(ierror) call coupler_exchange_2d%clear() ! Done the first coupling - so advance the pseudo-clock - is_running = oasis_clock%tick() + is_running = modeldb%clock%tick() ! Copy the horizontally regridded src orography into dst orography mesh ! ----------------------------------------------------------- diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 index fd240af17..b2b544282 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 @@ -76,8 +76,7 @@ module lfric2lfric_init_mesh_mod !> @param[in] total_ranks Total number of MPI ranks in this job. !> @param[in] mesh_names Mesh names to load from the mesh input file(s). !> @param[in] extrusion Extrusion object to be applied to meshes. -!> @param[in] stencil_depths_in Required stencil depth for the application -!! for each mesh. +!> @param[in] stencil_depth Required stencil depth for the application. !> @param[in] regrid_method Apply check for even partitions with the !> configured partition strategy if the !> regridding method is 'map'. @@ -87,7 +86,7 @@ subroutine init_mesh( config, configuration, & local_rank, total_ranks, & mesh_names, & extrusion, & - stencil_depths_in, & + stencil_depth, & regrid_method ) use partitioning_nml_iterator_mod, only: partitioning_nml_iterator_type @@ -103,7 +102,7 @@ subroutine init_mesh( config, configuration, & integer(kind=i_def), intent(in) :: total_ranks character(len=*), intent(in) :: mesh_names(2) class(extrusion_type), intent(in) :: extrusion - integer(kind=i_def), intent(in) :: stencil_depths_in(:) + integer(kind=i_def), intent(in) :: stencil_depth integer(kind=i_def), intent(in) :: regrid_method ! Parameters @@ -131,9 +130,7 @@ subroutine init_mesh( config, configuration, & integer(kind=i_def) :: mesh_selection(2) ! Local variables - integer(kind=i_def) :: i character(len=str_max_filename) :: mesh_file(2) - integer(kind=i_def) :: stencil_depths(2) procedure(partitioner_interface), pointer :: partitioner_src => null() procedure(partitioner_interface), pointer :: partitioner_dst => null() @@ -188,22 +185,6 @@ subroutine init_mesh( config, configuration, & call log_event(log_scratch_space, log_level_error) end if - ! Set up stencil depths - if ( size(stencil_depths) == 1 ) then - ! Single stencil depth specified, apply to all meshes - do i = 1, size(mesh_names) - stencil_depths(i) = stencil_depths_in(1) - end do - else if ( size(stencil_depths) == size(mesh_names) ) then - ! Stencil depths specified per mesh - stencil_depths(:) = stencil_depths_in(:) - else - write(log_scratch_space, '(A)') & - 'Number of stencil depths specified does not '// & - 'match number of requested meshes.' - call log_event(log_scratch_space, log_level_error) - end if - !=========================================================================== ! Create local mesh objects: @@ -262,8 +243,8 @@ subroutine init_mesh( config, configuration, & ! meshes are suitable for the supplied application ! configuration. !=========================================================== - call check_local_mesh( config, & - stencil_depths, & + call check_local_mesh( config, & + stencil_depth, & mesh_names ) ! Load and assign mesh maps. @@ -320,6 +301,7 @@ subroutine init_mesh( config, configuration, & decomposition_dst, & partitioner_dst ) + ! Read in all global meshes from input file !=========================================================== if (mesh_file(dst) == mesh_file(src)) then @@ -334,15 +316,15 @@ subroutine init_mesh( config, configuration, & call create_local_mesh( mesh_names(dst:dst), & local_rank, total_ranks, & decomposition_dst, & - stencil_depths, & - generate_inner_halos(dst), & + stencil_depth, & + generate_inner_halos(dst), & partitioner_dst ) call create_local_mesh( mesh_names(src:src), & local_rank, total_ranks, & decomposition_src, & - stencil_depths, & - generate_inner_halos(src), & + stencil_depth, & + generate_inner_halos(src), & partitioner_src ) ! Read in the global intergrid mesh mappings, diff --git a/applications/lfric2lfric/source/lfric2lfric.F90 b/applications/lfric2lfric/source/lfric2lfric.F90 index c00688655..6a877c0d3 100644 --- a/applications/lfric2lfric/source/lfric2lfric.F90 +++ b/applications/lfric2lfric/source/lfric2lfric.F90 @@ -29,9 +29,9 @@ program lfric2lfric log_level_trace, & log_scratch_space use lfric_mpi_mod, only: global_mpi + use lfric2lfric_mod, only: lfric2lfric_required_namelists use lfric2lfric_driver_mod, only: initialise, run, finalise - use model_clock_mod, only: model_clock_type implicit none @@ -45,8 +45,6 @@ program lfric2lfric ! Coupler objects type(coupling_type) :: coupler #endif - ! Clock for OASIS exchanges - type(model_clock_type), allocatable :: oasis_clock call parse_command_line( filename ) @@ -85,9 +83,9 @@ program lfric2lfric call modeldb%io_contexts%initialise(program_name, 100) call log_event( 'Initialising ' // program_name // ' ...', log_level_trace ) - call initialise( modeldb, oasis_clock ) + call initialise( modeldb ) - call run( modeldb, oasis_clock ) + call run( modeldb ) call log_event( 'Finalising ' // program_name // ' ...', log_level_trace ) call finalise( program_name, modeldb ) diff --git a/applications/lfric_atm/Makefile b/applications/lfric_atm/Makefile index 7457acec7..e45cb2d89 100644 --- a/applications/lfric_atm/Makefile +++ b/applications/lfric_atm/Makefile @@ -75,7 +75,7 @@ build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = YES build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -exec egrep -l "^\s*program" {} \;))) build: export PROJECT = lfric_atm -build: export SCRATCH_DIR := $(WORKING_DIR)/.. +build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch build: export WORKING_DIR := $(WORKING_DIR) build: export LDFLAGS_GROUPS = OPENMP diff --git a/applications/lfric_atm/build/compile_options.mk b/applications/lfric_atm/build/compile_options.mk index 842a61d60..143f09ae6 100644 --- a/applications/lfric_atm/build/compile_options.mk +++ b/applications/lfric_atm/build/compile_options.mk @@ -13,8 +13,7 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +science/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/lfric_atm/build/psyclone_transmute_file_list.mk b/applications/lfric_atm/build/psyclone_transmute_file_list.mk index ae3bdf711..3de55a505 100644 --- a/applications/lfric_atm/build/psyclone_transmute_file_list.mk +++ b/applications/lfric_atm/build/psyclone_transmute_file_list.mk @@ -15,41 +15,27 @@ # Choose which files to Pre-proccess and PSyclone from physics_schemes / other source (e.g. UKCA) export PSYCLONE_PHYSICS_FILES = \ - bl_lsp \ - bl_diags_mod \ bm_tau_kernel_mod \ - btq_int \ - conv_gr_kernel_mod \ - ex_flux_tq \ - ex_flux_uv \ - fm_drag \ gw_ussp_mod \ - imp_mix \ - jules_exp_kernel_mod \ - jules_extra_kernel_mod \ - jules_imp_kernel_mod \ - kmkh \ - kmkhz_9c_wtrac \ lw_kernel_mod \ mphys_kernel_mod \ pc2_initiation_kernel_mod \ pc2_conv_coupling_kernel_mod \ sw_kernel_mod \ - sw_rad_tile_kernel_mod \ - tr_mix \ - ukca_aero_ctl \ + ukca_aero_ctl \ ukca_chemistry_ctl_full_mod \ - ukca_main1-ukca_main1 - - -##### TRANSMUTE_INCLUDE_METHOD specify_include ##### + ukca_main1-ukca_main1 \ + sw_rad_tile_kernel_mod \ + jules_imp_kernel_mod \ + jules_exp_kernel_mod \ + jules_extra_kernel_mod \ + conv_gr_kernel_mod # List to use PSyclone explicitly without any opt script # This will remove hand written (OMP) directives in the source # Used by both methods, specify_include and specify_exclude export PSYCLONE_PASS_NO_SCRIPT = ukca_abdulrazzak_ghan - ##### TRANSMUTE_INCLUDE_METHOD specify_exclude ##### # For GPU, we may want to use more generic local.py transformation scripts and psyclone by directory. # Advise which directories to pass to PSyclone. diff --git a/applications/lfric_atm/example/configuration.nml b/applications/lfric_atm/example/configuration.nml index d46ff98c4..12631de24 100644 --- a/applications/lfric_atm/example/configuration.nml +++ b/applications/lfric_atm/example/configuration.nml @@ -624,7 +624,6 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/lfric_atm/metadata/field_def_diags.xml b/applications/lfric_atm/metadata/field_def_diags.xml index a17d884f9..007ee86df 100644 --- a/applications/lfric_atm/metadata/field_def_diags.xml +++ b/applications/lfric_atm/metadata/field_def_diags.xml @@ -43,8 +43,6 @@ - - zoomed__orography diff --git a/applications/lfric_atm/metadata/field_def_initial_diags.xml b/applications/lfric_atm/metadata/field_def_initial_diags.xml index b91c8aed1..707675af2 100644 --- a/applications/lfric_atm/metadata/field_def_initial_diags.xml +++ b/applications/lfric_atm/metadata/field_def_initial_diags.xml @@ -21,8 +21,6 @@ - - diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py deleted file mode 100644 index 2fa660bdc..000000000 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/bl_diags_mod.py +++ /dev/null @@ -1,33 +0,0 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -# ----------------------------------------------------------------------------- -''' -Bespoke Opt script for bl_diags_mod to add OpenMP to loops present in -the file. - To be replaced by a global in #900 -''' - -import logging -from psyclone.transformations import ( - TransformationError) -from psyclone.psyir.nodes import Loop -from transmute_psytrans.transmute_functions import ( - OMP_PARALLEL_LOOP_DO_TRANS_STATIC, -) - - -def trans(psyir): - ''' - Work through each loop in bl_diags_mod and add a parallel region - ''' - for loop in psyir.walk(Loop): - if not loop.ancestor(Loop): - options = { - "node-type-check": False} - try: - OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop, options) - - except (TransformationError, IndexError) as err: - logging.warning( - "Could not transform because:\n %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py deleted file mode 100644 index 4f08b7b3c..000000000 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py +++ /dev/null @@ -1,80 +0,0 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -# ----------------------------------------------------------------------------- -''' -Bespoke script for kmkhz_9c_wtrac. -Remove any j loops. -Place a OMP parallel do inside the i_wt loop. -''' - -import logging -from psyclone.psyir.nodes import ( - Schedule, - Routine, - Loop, - OMPParallelDirective, -) -from psyclone.transformations import TransformationError -from transmute_psytrans.transmute_functions import ( - loop_replacement_of, - get_compiler, - first_priv_red_init, - OMP_PARALLEL_LOOP_DO_TRANS_STATIC, -) - -Loop.set_loop_type_inference_rules({ - "i_wt": {"variable": "i_wt"}, - "j": {"variable": "j"}}) - - -def trans(psyir): - """ - Bespoke script for kmkhz_9c_wtrac - """ - - # For the PSyclone 3.1 bug with CCE. Certain files - # are causing a first private to be generated in the parallel section. - first_private_list = [ - "dz_disc", - "qw_lapse", - "k", - "fa_tend", - "inv_tend", - "ml_tend", - "totqf_efl" - ] - - # Remove any loops relating to j loop type - for node in psyir.walk(Routine): - loop_replacement_of(node, "j") - - # Span a parallel section across the whole routine, - # apart for a few exceptions provided - for loop in psyir.walk(Loop): - loop_ancestor_type = "" - try: - loop_ancestor_type = loop.ancestor(Loop).loop_type - # pylint: disable=bare-except - except: # noqa: E722 - pass - if loop_ancestor_type: - if loop_ancestor_type == "i_wt": - # Span the region - try: - OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply( - loop) - except (TransformationError, IndexError) as err: - logging.warning("OMPParallelLoopTrans failed: %s", err) - - # CCE first private issue with 3.1, to be removed longer term - # pylint: disable=too-many-nested-blocks - if get_compiler() == "cce": - for routine in psyir.walk(Routine): - for node in routine.children: - for schedule in node.walk(Schedule): - for child in schedule.children: - if isinstance(child, OMPParallelDirective): - first_priv_red_init(child, first_private_list) - break diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py deleted file mode 100644 index edbef2b99..000000000 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/local.py +++ /dev/null @@ -1,176 +0,0 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -# ----------------------------------------------------------------------------- -''' -Local script for Boundary layer. -This by default removes the j loop(s) and replaces it with a init, -spans a PARALLEL region across the whole file, -and then adds OMP DO to the top most loop in each group of loops. -There are some small bespoke needs for the 6x files that this currently -affects which are captured below as they are initialised. - -This is currently used by the following files: -* bl_lsp -* btq_int -* ex_flux_tq -* ex_flux_uv -* kmkh -* tr_mix -* imp_mix -* fm_drag -''' - -import logging -from psyclone.psyir.nodes import ( - Routine, - Loop, - OMPParallelDirective, -) -from psyclone.transformations import (TransformationError) -from transmute_psytrans.transmute_functions import ( - loop_replacement_of, - get_compiler, - first_priv_red_init, - remove_unspanable_nodes, - set_pure_subroutines, - replace_n_threads, - OMP_PARALLEL_REGION_TRANS, - OMP_DO_LOOP_TRANS_STATIC, -) -from boundary_layer.script_options import ( - SCRIPT_OPTIONS_DICT -) - - -Loop.set_loop_type_inference_rules({ - "i_wt": {"variable": "i_wt"}, # For ex_flux_tq.F90 - "ient": {"variable": "ient"}, # For tr_mix.F90 - "ii": {"variable": "ii"}, # For bdy_impl3.F90 - "k": {"variable": "k"}, # For all files which use script - "j": {"variable": "j"}, # For all files which use script - "i": {"variable": "i"}}) # For bdy_impl3.F90 - - -# Longer term we will raise some of these into a override import, see Apps#900 -# pylint: disable=too-many-locals -# pylint: disable=too-many-statements -# pylint: disable=too-many-branches -def trans(psyir): - """ - Local.py script for boundary layer. - This spans a PARALLEL section across the whole file, - and then adds OMP to either to top loop of a nest, or k - - This is currently used by the following files: - * bl_lsp - * btq_int - * ex_flux_tq - * ex_flux_uv - * kmkh - * tr_mix - * imp_mix - * fm_drag - """ - - # options list for Transformation. - options = {} - # First privates created by CCE redundant inits. - first_private_list = [] - # Designate calls in regions as safe to parallelise over. - safe_pure_calls = [] - # Do we update the max_threads variable with a library call? - max_threads_parse = False - # Assignment nodes that we do not wish to parallelise over at the start - loop_type_init = ["j"] - - # Lifted and extended from Global.py - # Given the file, update the above lists with extra options - - # Get the file name to use with the SCRIPT_OPTIONS_DICT - fortran_file_name = str(psyir.root.name) - # Check if file is in the script_options_dict - # Copy out anything that's needed - # Only the options list is currently - if fortran_file_name in SCRIPT_OPTIONS_DICT: - file_overrides = SCRIPT_OPTIONS_DICT[fortran_file_name] - # Update the respective lists if the filename override exists - if "options" in file_overrides.keys(): - options = file_overrides["options"] - if "first_private_list" in file_overrides.keys(): - first_private_list = file_overrides["first_private_list"] - if "safe_pure_calls" in file_overrides.keys(): - safe_pure_calls = file_overrides["safe_pure_calls"] - if "max_threads_parse" in file_overrides.keys(): - max_threads_parse = file_overrides["max_threads_parse"] - if "loop_type_init" in file_overrides.keys(): - for name in file_overrides["loop_type_init"]: - loop_type_init.append(name) - - # Set up some specifics to this local script - - # Remove any j loops and add an init for j - remove_loop_type = ["j"] - # Avoid any nodes related to the timers - timer_routine_names = ["lhook"] - - # Set the pure calls if needed - if safe_pure_calls: - set_pure_subroutines(psyir, safe_pure_calls) - - # Replace max_threads = 1 - if max_threads_parse: - replace_n_threads(psyir, "max_threads") - - # Remove any loops relating to specified loop type - for node in psyir.walk(Routine): - for removal_type in remove_loop_type: - loop_replacement_of(node, removal_type) - - # Span a parallel section across the whole routine, - # apart for a few exceptions provided - for routine in psyir.walk(Routine): - routine_children = remove_unspanable_nodes( - routine, - timer_routine_names, - loop_type_init - ) - # Span the region across filtered down node list - try: - OMP_PARALLEL_REGION_TRANS.apply( - routine_children) - except (TransformationError, IndexError) as err: - logging.warning("OMPParallelTrans failed: %s", err) - - # CCE first private issue with 3.1, to be removed longer term - if get_compiler() == "cce" and first_private_list: - for routine in psyir.walk(Routine): - for node in routine.children: - if isinstance(node, OMPParallelDirective): - first_priv_red_init(node, first_private_list) - break - - # Loop ancestor type that a loop cannot have. - avoid_loop_ancestor = ["ii", "k", "i"] - # A loop type which a loop cannot have an OMP do section - avoid_loop_type = ["i_wt", "ient"] - # Work through the loops now in the spanned section and try transformations - for loop in psyir.walk(Loop): - loop_ancestor_type = "" - try: - loop_ancestor_type = loop.ancestor(Loop).loop_type - # pylint: disable=bare-except - except: # noqa: E722 - pass - # Default is there is no Loop ancestor - if (((not loop.ancestor(Loop)) or - # Or the rest, the loop ancestor is not to be avoided - loop_ancestor_type not in avoid_loop_ancestor) and - # And the loop is not of certain loop types - str(loop.loop_type) not in avoid_loop_type): - try: - OMP_DO_LOOP_TRANS_STATIC.apply( - loop, options) - except (TransformationError, IndexError) as err: - logging.warning("OMPLoopTrans failed: %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py deleted file mode 100644 index 9b27403d1..000000000 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/boundary_layer/script_options.py +++ /dev/null @@ -1,165 +0,0 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -# ----------------------------------------------------------------------------- -''' -Lift options list and similar from each individual script up into this file. -Aim is to allow the creation of a simple global.py which adds OMP over all -loops. The option which matches the file being worked on can be pulled in -and referenced. This helps reduce the number of files needed. - -The following files have overrides below: -* bl_lsp -* btq_int -* ex_flux_tq -* ex_flux_uv -* kmkh -* tr_mix -* imp_mix -* fm_drag -''' - -FILE_EXTEN = ".xu90" - -# Basic initialisation, will be used by the local script -SCRIPT_OPTIONS_DICT = {} - -# ## Local.py options for boundary layer ## - -SCRIPT_OPTIONS_DICT["bl_lsp"+str(FILE_EXTEN)] = { - "first_private_list": [ - "newqcf" - ] -} - -SCRIPT_OPTIONS_DICT["ex_flux_tq"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "bl_diag%grad_t_adj" - ] - }, - "first_private_list": [ - "f2_fqw", - "f2_ftl", - "fsc_fqw", - "fsc_ftl", - "non_grad_fqw", - "non_grad_ftl" - ] -} - -SCRIPT_OPTIONS_DICT["ex_flux_uv"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "tau_x_y" - ] - } -} - -SCRIPT_OPTIONS_DICT["tr_mix"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "f_field", - "rhok_dep", - "surf_dep_flux", - "gamma_rhokh_rdz" - ] - }, - "first_private_list": [ - "dfield_inv", - "dz_disc", - "dzlkp1", - "f_field_ent", - "km1" - ] -} - -SCRIPT_OPTIONS_DICT["bdy_impl3"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "dtl1_1", - "ct_prod", - "dqw1_1", - "dqw", - "dtl", - "ct_ctq", - "temp", - "dqw1", - "dtl1", - "ctctq1" - ] - }, - "safe_pure_calls": [ - "oneover_v" - ], - "max_threads_parse": True, - "loop_type_init": [ - "max_threads", - "blm1", - "tdims_omp_block", - "tdims_seg_block" - ] -} - -SCRIPT_OPTIONS_DICT["bdy_impl4"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "tl", - "qw", - "dtl", - "dqw" - ] - }, - "loop_type_init": [ - "tdims_omp_block", - "tdims_seg_block" - ] -} - -SCRIPT_OPTIONS_DICT["imp_mix"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "d_field", - "af", - "field", - "gamma_rhok_dep", - "f_field", - "surf_dep_flux" - ] - }, - "max_threads_parse": True, - "loop_type_init": [ - "max_threads", - "blm1", - "pdims_omp_block", - "pdims_seg_block" - ] -} - -SCRIPT_OPTIONS_DICT["fm_drag"+str(FILE_EXTEN)] = { - "options": { - "ignore_dependencies_for": [ - "k_for_buoy", - "u_hm", - "v_hm", - "tl_hm", - "qw_hm", - "tau_fd_x", - "tau_fd_y" - ] - }, - "first_private_list": [ - "fp_x_low", - "fp_x_steep", - "fp_y_low", - "fp_y_steep", - "rib_fn", - "tausx", - "tausy", - "wta", - "wtb" - ] -} - -# ## Other boundary layer options ## diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py index cf4b240ce..cc3235be5 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## """ Optimisation script that adds OpenMP worksharing-loop directives to speed up loops before and after a PC2 subroutine call. Some PSyclone dependency errors diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py index e63362014..7c28ef7f4 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## ''' Bespoke PSyclone transformation script for jules_imp_kernel_mod. ''' @@ -21,11 +21,10 @@ SAFE_IMPURE_CALLS = ["qsat_mix"] - def trans(psyir): ''' PSyclone function call, run through psyir object, - each schedule (or subroutine) and apply OMP paralleldo transformations + each schedul e(or subroutine) and apply OMP paralleldo transformations to each loop in jules_imp_kernel_mod. ''' @@ -37,6 +36,7 @@ def trans(psyir): "sea_ice_pensolar", "rhostar_2d", "recip_l_mo_sea_2d", + "h_blend_orog_2d", "t1_sd_2d", "q1_sd_2d", "surf_interp", @@ -81,6 +81,7 @@ def trans(psyir): impure_calls = [c for c in loop.walk(Call) if not c.is_pure] for call in impure_calls: if call.routine.symbol.name in SAFE_IMPURE_CALLS: + print(call.routine.name) call.routine.symbol.is_pure = True omp_transform_par_do.apply(loop, options) @@ -88,7 +89,5 @@ def trans(psyir): logging.warning( "Could not transform because:\n %s", err) -# Ignore loops setting these as order dependent: -# land_field l ainfo%land_index sea_pts ainfo%sea_index -# ainfo%sice_pts_ncat ainfo%sice_index_ncat -# Ignore as calls subroutine: qsat_mix +#Ignore loops setting these as order dependent: land_field l ainfo%land_index sea_pts ainfo%sea_index ainfo%sice_pts_ncat ainfo%sice_index_ncat +#Ignore as calls subroutine: qsat_mix diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py index 87052696b..783dbf800 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## ''' Bespoke PSyclone transformation script for jules_extra_kernel_mod. ''' @@ -63,6 +63,4 @@ def trans(psyir): logging.warning( "Could not transform because:\n %s", err) -# Ignore loops setting these as order dependent: -# land_pts l ainfo%land_index soil_pts -# ainfo%soil_index lice_pts ainfo%lice_index +#Ignore loops setting these as order dependent: land_pts l ainfo%land_index soil_pts ainfo%soil_index lice_pts ainfo%lice_index diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py index c1a880515..dff5f1311 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## ''' Bespoke PSyclone transformation script for jules_imp_kernel_mod. ''' @@ -11,7 +11,7 @@ from psyclone.transformations import ( OMPLoopTrans, TransformationError) -from psyclone.psyir.nodes import Loop, IfBlock +from psyclone.psyir.nodes import Loop, IfBlock, Schedule omp_transform_par_do = OMPLoopTrans( @@ -88,11 +88,9 @@ def trans(psyir): if descendent is not loop] if loop_descendents[0].loop_type == 'l': # Now check if there are any if statements in this loop - if_statements = [ - descendent for descendent in - loop_descendents[0].walk(IfBlock, depth=None) - if descendent is not loop - ] + if_statements = [descendent for descendent in + loop_descendents[0].walk(IfBlock, depth=None) + if descendent is not loop] # There is only one loop like this so we can just skip the # transformation for it if len(if_statements) > 0: @@ -107,6 +105,5 @@ def trans(psyir): logging.warning( "Could not transform:\n %s", err) -# Ignore loops setting these as order dependent: -# land_field l ainfo%land_index sice_pts ainfo%sice_index -# sea_pts ainfo%sea_inde ainfo%sice_pts_ncat +#Ignore loops setting these as order dependent: land_field l ainfo%land_index sice_pts ainfo%sice_index sea_pts ainfo%sea_inde ainfo%sice_pts_ncat + diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py index 5ce26ee90..d7748acfa 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## """ Optimisation script that adds OpenMP parallel do worksharing-loop directives. The main loop requires dynamic schedule to improve load balancing between diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py index c1eddb8f2..ed4a0e90e 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## """ Optimisation script that adds OpenMP worksharing-loop directives to speed up various loops. Some PSyclone dependency errors need to be overridden; these diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py index ceff34094..a8a2210a6 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py @@ -1,8 +1,8 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. # The file LICENCE, distributed with this code, contains details of the terms # under which the code may be used. -# ----------------------------------------------------------------------------- +############################################################################## ''' Bespoke PSyclone transformation script for sw_rad_tile_kernel_mod. ''' @@ -44,6 +44,4 @@ def trans(psyir): logging.warning( "Could not transform because:\n %s", err) -# Ignore loops setting these as order dependent: -# land_field l ainfo%land_index sea_pts -# ainfo%sea_index ainfo%sice_pts_ncat ainfo%sice_index_ncat +#Ignore loops setting these as order dependent: land_field l ainfo%land_index sea_pts ainfo%sea_index ainfo%sice_pts_ncat ainfo%sice_index_ncat diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py index c2685d3e1..e4f2e8b6c 100644 --- a/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py @@ -19,7 +19,6 @@ # Kernels SCRIPT_OPTIONS_DICT["mphys_kernel_mod"+str(FILE_EXTEN)] = { - "options": { "node-type-check": False, "ignore_dependencies_for": [ diff --git a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/lfric_coupled/Makefile b/applications/lfric_coupled/Makefile index 3954e7075..10b57aa7a 100644 --- a/applications/lfric_coupled/Makefile +++ b/applications/lfric_coupled/Makefile @@ -102,7 +102,7 @@ document-api: api-documentation build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = TRUE build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) -build: export SCRATCH_DIR := $(WORKING_DIR)/.. +build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR)/$(PROJECT_NAME) diff --git a/applications/lfric_coupled/build/compile_options.mk b/applications/lfric_coupled/build/compile_options.mk index 9623d56e1..10ad895f2 100644 --- a/applications/lfric_coupled/build/compile_options.mk +++ b/applications/lfric_coupled/build/compile_options.mk @@ -9,8 +9,7 @@ $(info UM physics specific compile options for $(FORTRAN_COMPILER) compiler) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -casim/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) -ukca/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) +science/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) jules/%.o jules/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) socrates/%.o socrates/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) legacy/%.o legacy/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/lfric_coupled/example/configuration.nml b/applications/lfric_coupled/example/configuration.nml index e160a8be8..f54da4162 100644 --- a/applications/lfric_coupled/example/configuration.nml +++ b/applications/lfric_coupled/example/configuration.nml @@ -408,7 +408,6 @@ tau_u=0.55, &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 index 8f961d706..51e577a87 100644 --- a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 +++ b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 @@ -134,7 +134,7 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & character(str_def) :: prime_mesh_name -integer(i_def) :: stencil_depth(1) +integer(i_def) :: stencil_depth integer(i_def) :: geometry real(r_def) :: domain_bottom real(r_def) :: scaled_radius diff --git a/applications/linear_model/example/configuration.nml b/applications/linear_model/example/configuration.nml index 6c85616bc..5ed21fc6c 100644 --- a/applications/linear_model/example/configuration.nml +++ b/applications/linear_model/example/configuration.nml @@ -154,7 +154,6 @@ write_minmax_tseries=.false., fixed_ls=.false. pert_option='analytic', l_stabilise_bl=.false., -transport_efficiency=.false., / &logging run_log_level='info', @@ -227,7 +226,6 @@ spinup_alpha=.false., &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj = 'upwind', @@ -264,11 +262,11 @@ panel_edge_high_order=.true., panel_edge_treatment='none' reversible=.false.,.false.,.false.,.false.,.false. runge_kutta_method='ssp3' -scheme=5*3 +scheme=1,1,1,1,1 si_outer_transport='none', slice_order='parabola' special_edges_monotone=5*1 -splitting=5*2 +splitting=1,1,1,1,1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' diff --git a/applications/linear_model/example/iodef.xml b/applications/linear_model/example/iodef.xml index e00c7e843..d685e7e88 100644 --- a/applications/linear_model/example/iodef.xml +++ b/applications/linear_model/example/iodef.xml @@ -80,9 +80,9 @@ - - - + + + @@ -134,8 +134,6 @@ - - @@ -182,8 +180,6 @@ - - diff --git a/applications/linear_model/example_file/config_linear.nml b/applications/linear_model/example_file/config_linear.nml index 301120422..18df08580 100644 --- a/applications/linear_model/example_file/config_linear.nml +++ b/applications/linear_model/example_file/config_linear.nml @@ -222,7 +222,6 @@ spinup_alpha=.false., &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj = 'upwind', diff --git a/applications/linear_model/example_file/config_nonlinear.nml b/applications/linear_model/example_file/config_nonlinear.nml index e14b9d6bb..b32d3f15b 100644 --- a/applications/linear_model/example_file/config_nonlinear.nml +++ b/applications/linear_model/example_file/config_nonlinear.nml @@ -216,7 +216,6 @@ spinup_alpha=.false., &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj = 'upwind' diff --git a/science/linear/plot_convergence/plot_convergence.py b/applications/linear_model/plot_convergence/plot_convergence.py similarity index 54% rename from science/linear/plot_convergence/plot_convergence.py rename to applications/linear_model/plot_convergence/plot_convergence.py index 6d7c42ea7..811421c89 100644 --- a/science/linear/plot_convergence/plot_convergence.py +++ b/applications/linear_model/plot_convergence/plot_convergence.py @@ -14,7 +14,6 @@ import os import pandas as pd import matplotlib.pyplot as plt -import numpy as np def plot_data(filename, axes, variable, color, shape): @@ -38,55 +37,12 @@ def plot_data(filename, axes, variable, color, shape): norm_df = pd.DataFrame(norm_line, columns=['gamma', 'norm']) datafile.close() - - # Square root (as the read data is only the inner product and - # has not included the square root to give the norm) - norm_df['norm'] = np.sqrt(norm_df['norm']) - - # Normalise - to give a relative error - normalise = norm_df['norm'].iloc[4] - norm_df['norm'] = norm_df['norm'] / normalise - - # Plot the data - if (CONFIG == 'nwp_gal9'): - ymin = 10**-2 - ymax = 10**2 - xmin = 10**-3 - xmax = 10**1 - elif (CONFIG == 'semi_implicit'): - ymin = 10**-2 - ymax = 10**2 - xmin = 10**-1 - xmax = 10**4 - elif (CONFIG == 'runge_kutta'): - ymin = 10**-3 - ymax = 10**2 - xmin = 10**-1 - xmax = 10**4 - else: - print(CONFIG+' not listed') - - norm_df.plot.scatter(x='gamma', y='norm', loglog=True, - xlim=(xmin, xmax), - ylim=(ymin, ymax), - ax=axes, color=color, - marker=shape, label = variable) - - # Check extremes - norm_min = norm_df['norm'].min() - norm_max = norm_df['norm'].max() - if (norm_min < ymin) : - print('Warning: Min value is'+ str(norm_min)) - if (norm_max > ymax) : - print('Warning: Max value is'+ str(norm_max)) - - # Plot the expected line - centre = norm_df['gamma'].iloc[4] - expected_x = [10**-2 *centre, centre, 100* centre] - expected_y = [10**-2, 10**0, 100] - plt.plot(expected_x, expected_y) - + norm_df.plot.scatter(x='gamma', y='norm', loglog=True, xlim=(10**0, 10**5), + ylim=(10**-5, 10**0), ax=axes, color=color, + marker=shape) + + def make_plot(directory, filename): ''' Plot the data for the different prognostic variables, together with the @@ -99,25 +55,27 @@ def make_plot(directory, filename): plot_data(directory + filename, axs, 'gamma_u', 'r', 'o') plot_data(directory + filename, axs, 'gamma_exner', 'b', 's') plot_data(directory + filename, axs, 'gamma_theta', 'g', '^') - plot_data(directory + filename, axs, 'gamma_mr', 'black', 'x') + plot_data(directory + filename, axs, 'gamma_total', 'black', 'x') + plot_data(directory + filename, axs, 'gamma_mr', 'm', '*') - plt.legend(loc='lower right') + expected_x = [10**0, 10**5] + expected_y = [10**-5, 10**0] + plt.plot(expected_x, expected_y) + + plt.legend(['Expected gradient (linear)', 'density', 'momentum', + 'exner pressure', 'potential temperature', 'total', + 'moisture mixing ratios'], + loc='lower right') plt.xlabel('Gamma') plt.ylabel('Relative error') plt.title('Validity of the tangent linear model') - # To show the plot to the screen, uncommment plt.show() - #plt.show() - - # Save the plot to a file - plt.savefig(directory + filename + "convergence_plot.png") + plt.show() if __name__ == "__main__": DATA_DIRECTORY = os.getcwd()+'/' DATA_FILENAME = 'outfile' - CONFIG = os.getenv('CONFIG') - print(CONFIG) make_plot(DATA_DIRECTORY, DATA_FILENAME) diff --git a/applications/linear_model/plot_convergence/plot_convergence.sh b/applications/linear_model/plot_convergence/plot_convergence.sh new file mode 100755 index 000000000..ab6e366a5 --- /dev/null +++ b/applications/linear_model/plot_convergence/plot_convergence.sh @@ -0,0 +1,83 @@ +############################################################################## +# (c) Crown copyright 2022 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +#---------------------------------------------------------------------- +# Plots the convergence rate of the tangent linear model. +#---------------------------------------------------------------------- + +# INSTRUCTIONS TO RUN +# 1. Specify CONFIG +# 2. Run using . plot_convergence.sh, from the plot_convergence directory + +# SCIENCE DETAILS +# The relative linearisation error is +# E = || N(x+ gamma x') - N(x) - L(x) gamma x' || / || L(x) gamma x' || +# where N=nonlinear model, L=linear model, x=linearisation state +# x'=perturbation, gamma=scalar. +# From the Taylor series expansion, E(gamma) = O(gamma) i.e. of the order gamma +# So the relative error should be a linear function of gamma + +# SCRIPT STEPS +# 1. Produce the data: The integration test tl_test_timesteps is extended by +# running over 10 values of gamma, rather than 2 values of gamma. +# 2. Plot the data: The data is plotted for each prognostic variable. + +# EXTENSION +# The plot_configuration.nml can also be extended to other configurations e.g +# * increase the number of timesteps (timesteps_end) +# * increase the number of timesteps between updating the linearisation state +# (update_ls_frequency) + +#-------------------------------------------------------------------------- + +# CONFIG can be specified as either runge_kutta or semi_implicit +CONFIG=semi_implicit + +# Define directories using the current working directory +Working_dir=$PWD +Linear_dir="$(dirname "$PWD")" + +# Integration tests executable name +exe=$Linear_dir/test/$CONFIG + +# Build the integration tests, unless that has already been completed +if [ -f $exe ] ; then + echo "Do not need to build the executable as $exe exists" +else + echo "$exe does not exist, so now building the executable" + cd $Linear_dir + make integration-tests + + if [$? -ne 0 ]; then + echo "Error building the executable" + return + fi +fi + +# Setup the configuration - to test with 10 values of gamma +cd $Linear_dir/test/test_files/$CONFIG +cp ${CONFIG}_configuration.nml plot_configuration.nml +sed -i 's/number_gamma_values=2/number_gamma_values=10/g' plot_configuration.nml +if [ $? -ne 0 ]; then + echo "Error in creating plot_configuration.nml" + return +fi + +# Run the tl_test_timesteps integration test +echo "Running the integration test" +../../$CONFIG plot_configuration.nml test_timesteps > outfile +if [ $? -ne 0 ]; then + echo "Error in creating outfile data" + return +else + echo "Data created successfully" +fi + +# Plot the data, together with the expected gradient +echo "Plotting the data" +python $Working_dir/plot_convergence.py + + diff --git a/applications/linear_model/rose-meta/lfric-linear_model/versions.py b/applications/linear_model/rose-meta/lfric-linear_model/versions.py index 2d3f6a52e..8418438c1 100644 --- a/applications/linear_model/rose-meta/lfric-linear_model/versions.py +++ b/applications/linear_model/rose-meta/lfric-linear_model/versions.py @@ -126,123 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/applications/name_transport/example/configuration.nml b/applications/name_transport/example/configuration.nml index daaa66420..3bcb4b2f4 100644 --- a/applications/name_transport/example/configuration.nml +++ b/applications/name_transport/example/configuration.nml @@ -129,7 +129,6 @@ runge_kutta_method='forward_euler', &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/applications/name_transport/rose-meta/lfric-name_transport/versions.py b/applications/name_transport/rose-meta/lfric-name_transport/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/name_transport/rose-meta/lfric-name_transport/versions.py +++ b/applications/name_transport/rose-meta/lfric-name_transport/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/name_transport/source/driver/name_transport_driver_mod.f90 b/applications/name_transport/source/driver/name_transport_driver_mod.f90 index a5783624a..c63fc8088 100644 --- a/applications/name_transport/source/driver/name_transport_driver_mod.f90 +++ b/applications/name_transport/source/driver/name_transport_driver_mod.f90 @@ -109,12 +109,12 @@ subroutine initialise_name_transport( program_name, modeldb ) character(len=str_def), allocatable :: shifted_names(:) character(len=str_def), allocatable :: double_names(:) character(len=str_def) :: prime_mesh_name - integer(kind=i_def), allocatable :: stencil_depths(:) logical(kind=l_def) :: prepartitioned logical(kind=l_def) :: apply_partition_check integer(kind=i_def) :: geometry + integer(kind=i_def) :: stencil_depth real(kind=r_def) :: domain_bottom real(kind=r_def) :: domain_height real(kind=r_def) :: scaled_radius @@ -237,18 +237,14 @@ subroutine initialise_name_transport( program_name, modeldb ) ! 1.3a Initialise prime/2d meshes ! --------------------------------------------------------- - allocate(stencil_depths(num_base_meshes)) - call get_required_stencil_depth( & - stencil_depths, base_mesh_names, modeldb%configuration & - ) - + stencil_depth = get_required_stencil_depth() apply_partition_check = .false. call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & - extrusion, stencil_depths, & + extrusion, stencil_depth, & apply_partition_check ) call create_mesh( base_mesh_names, extrusion_2d, & @@ -355,19 +351,11 @@ subroutine initialise_name_transport( program_name, modeldb ) end if - if (allocated(base_mesh_names)) deallocate(base_mesh_names) - if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) - if (allocated(meshes_to_double)) deallocate(meshes_to_double) - if (allocated(twod_names)) deallocate(twod_names) - if (allocated(shifted_names)) deallocate(shifted_names) - if (allocated(double_names)) deallocate(double_names) - if (allocated(extrusion)) deallocate(extrusion) - if (allocated(extrusion_2d)) deallocate(extrusion_2d) - if (allocated(extrusion_shifted)) deallocate(extrusion_shifted) - if (allocated(extrusion_double)) deallocate(extrusion_double) - if (allocated(stencil_depths)) deallocate(stencil_depths) - if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) + if (allocated(base_mesh_names)) deallocate(base_mesh_names) + if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) + if (allocated(meshes_to_double)) deallocate(meshes_to_double) + if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) nullify(chi_inventory, panel_id_inventory, mesh) end subroutine initialise_name_transport diff --git a/applications/ngarch/Makefile b/applications/ngarch/Makefile index a645cd3d2..4c3ca1f69 100644 --- a/applications/ngarch/Makefile +++ b/applications/ngarch/Makefile @@ -100,7 +100,7 @@ document-api: api-documentation build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = TRUE build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) -build: export SCRATCH_DIR := $(WORKING_DIR)/.. +build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR) diff --git a/applications/ngarch/build/compile_options.mk b/applications/ngarch/build/compile_options.mk index 4ef9b69bd..810698d65 100644 --- a/applications/ngarch/build/compile_options.mk +++ b/applications/ngarch/build/compile_options.mk @@ -13,8 +13,7 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -casim/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -ukca/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +science/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o jules/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o socrates/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o legacy/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/ngarch/build/psyclone_transmute_file_list.mk b/applications/ngarch/build/psyclone_transmute_file_list.mk index da9997e42..a2cf17195 100644 --- a/applications/ngarch/build/psyclone_transmute_file_list.mk +++ b/applications/ngarch/build/psyclone_transmute_file_list.mk @@ -15,33 +15,17 @@ # Choose which files to Pre-proccess and PSyclone from physics / FCM UM source. export PSYCLONE_PHYSICS_FILES = \ - bl_lsp \ - bl_diags_mod \ bm_tau_kernel_mod \ - btq_int \ - conv_gr_kernel_mod \ - ex_flux_tq \ - ex_flux_uv \ - fm_drag \ gw_ussp_mod \ - imp_mix \ - jules_exp_kernel_mod \ - jules_extra_kernel_mod \ - jules_imp_kernel_mod \ - kmkh \ - kmkhz_9c_wtrac \ lw_kernel_mod \ mphys_kernel_mod \ pc2_initiation_kernel_mod \ pc2_conv_coupling_kernel_mod \ sw_kernel_mod \ - sw_rad_tile_kernel_mod \ - tr_mix \ - ukca_aero_ctl \ + ukca_aero_ctl \ ukca_chemistry_ctl_full_mod \ ukca_main1-ukca_main1 - ##### TRANSMUTE_INCLUDE_METHOD specify_include ##### # List to use PSyclone explicitly without any opt script diff --git a/applications/ngarch/example/configuration_bl.nml b/applications/ngarch/example/configuration_bl.nml index 22e22b87f..87c3e5318 100644 --- a/applications/ngarch/example/configuration_bl.nml +++ b/applications/ngarch/example/configuration_bl.nml @@ -483,7 +483,6 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, -adjust_tracer_equation=.false. adjust_vhv_wind=.true., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/ngarch/example/configuration_casim.nml b/applications/ngarch/example/configuration_casim.nml index fedbde276..4db857e52 100644 --- a/applications/ngarch/example/configuration_casim.nml +++ b/applications/ngarch/example/configuration_casim.nml @@ -543,7 +543,6 @@ tau_u=0.55, &transport adjust_theta=.true., adjust_theta_above=30000.0, -adjust_tracer_equation=.false. adjust_vhv_wind=.true., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/ngarch/rose-meta/lfric-ngarch/versions.py b/applications/ngarch/rose-meta/lfric-ngarch/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/ngarch/rose-meta/lfric-ngarch/versions.py +++ b/applications/ngarch/rose-meta/lfric-ngarch/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 b/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 index e2ba03076..27cac265b 100644 --- a/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 +++ b/applications/ngarch/source/algorithm/boundary_layer_timestep_mod.x90 @@ -57,7 +57,7 @@ contains water_extraction, lake_evap, & theta_star_surf, qv_star_surf, & recip_l_mo_sea, rhostar, & - t1_sd_2d, q1_sd_2d + h_blend_orog, t1_sd_2d, q1_sd_2d type( field_array_type ), pointer :: mr type(field_collection_type), pointer :: prognostic_fields, & @@ -121,7 +121,7 @@ contains turbulence_fields, convection_fields, cloud_fields, & surface_fields, soil_fields, snow_fields, & aerosol_fields, recip_l_mo_sea, rhostar, & - t1_sd_2d, q1_sd_2d ) + h_blend_orog, t1_sd_2d, q1_sd_2d ) ! Call the algorithm call log_event( "Running BOUNDARY LAYER EXP", LOG_LEVEL_INFO ) @@ -136,7 +136,7 @@ contains cloud_fields, & surface_fields, & recip_l_mo_sea, rhostar, & - t1_sd_2d, q1_sd_2d, & + h_blend_orog, t1_sd_2d, q1_sd_2d, & modeldb%clock ) call log_event( "Running BOUNDARY LAYER IMP", LOG_LEVEL_INFO ) diff --git a/applications/shallow_water/example/configuration.nml b/applications/shallow_water/example/configuration.nml index 94bc7b36e..d4ab292f9 100644 --- a/applications/shallow_water/example/configuration.nml +++ b/applications/shallow_water/example/configuration.nml @@ -178,7 +178,6 @@ tau_u = 0.0 &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection = .true. calculate_detj = 'upwind' diff --git a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 index df1fb2bd8..40ac6cf93 100644 --- a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 +++ b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 @@ -83,7 +83,6 @@ subroutine initialise_infrastructure( program_name, modeldb) character(str_def), allocatable :: base_mesh_names(:) character(str_def), allocatable :: twod_names(:) - integer(i_def), allocatable :: stencil_depths(:) class(extrusion_type), allocatable :: extrusion type(uniform_extrusion_type), allocatable :: extrusion_2d @@ -94,6 +93,7 @@ subroutine initialise_infrastructure( program_name, modeldb) character(str_def) :: prime_mesh_name + integer(i_def) :: stencil_depth integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers @@ -180,14 +180,13 @@ subroutine initialise_infrastructure( program_name, modeldb) ! Initialise prime/2d meshes ! --------------------------------------------------------- check_partitions = .false. - allocate(stencil_depths(size(base_mesh_names))) - call get_required_stencil_depth( stencil_depths, base_mesh_names, & - modeldb%configuration ) + stencil_depth = get_required_stencil_depth() + call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, extrusion, & - stencil_depths, check_partitions ) + stencil_depth, check_partitions ) allocate( twod_names, source=base_mesh_names ) @@ -224,8 +223,6 @@ subroutine initialise_infrastructure( program_name, modeldb) call create_runtime_constants() deallocate(base_mesh_names) - deallocate(twod_names) - deallocate(stencil_depths) nullify(chi_inventory, panel_id_inventory) end subroutine initialise_infrastructure diff --git a/applications/solver/source/solver.F90 b/applications/solver/source/solver.F90 index 2aa4b8246..65d816094 100644 --- a/applications/solver/source/solver.F90 +++ b/applications/solver/source/solver.F90 @@ -87,7 +87,7 @@ program solver character(str_def) :: prime_mesh_name - integer(i_def) :: stencil_depth(1) + integer(i_def) :: stencil_depth integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers diff --git a/applications/transport/example/configuration.nml b/applications/transport/example/configuration.nml index 297bf9328..e240dc3ad 100644 --- a/applications/transport/example/configuration.nml +++ b/applications/transport/example/configuration.nml @@ -98,7 +98,6 @@ y2=0.0, &transport adjust_theta=.false. adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/applications/transport/rose-meta/lfric-transport/versions.py b/applications/transport/rose-meta/lfric-transport/versions.py index 8bab40a9e..8418438c1 100644 --- a/applications/transport/rose-meta/lfric-transport/versions.py +++ b/applications/transport/rose-meta/lfric-transport/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/applications/transport/source/driver/transport_driver_mod.f90 b/applications/transport/source/driver/transport_driver_mod.f90 index 5b23c6dbc..18a4a756b 100644 --- a/applications/transport/source/driver/transport_driver_mod.f90 +++ b/applications/transport/source/driver/transport_driver_mod.f90 @@ -126,7 +126,6 @@ subroutine initialise_transport( program_name, modeldb ) character(len=str_def), allocatable :: chain_mesh_tags(:) character(len=str_def) :: aerosol_mesh_name character(len=str_def) :: prime_mesh_name - integer(kind=i_def), allocatable :: stencil_depths(:) logical(kind=l_def) :: use_multires_coupling logical(kind=l_def) :: l_multigrid @@ -134,6 +133,7 @@ subroutine initialise_transport( program_name, modeldb ) logical(kind=l_def) :: apply_partition_check integer(kind=i_def) :: geometry + integer(kind=i_def) :: stencil_depth real(kind=r_def) :: domain_bottom real(kind=r_def) :: domain_height real(kind=r_def) :: scaled_radius @@ -284,11 +284,7 @@ subroutine initialise_transport( program_name, modeldb ) ! 1.3a Initialise prime/2d meshes ! --------------------------------------------------------- - allocate(stencil_depths(num_base_meshes)) - call get_required_stencil_depth( & - stencil_depths, base_mesh_names, modeldb%configuration & - ) - + stencil_depth = get_required_stencil_depth() apply_partition_check = .false. if ( .not. prepartitioned .and. & ( l_multigrid .or. use_multires_coupling ) ) then @@ -299,7 +295,7 @@ subroutine initialise_transport( program_name, modeldb ) modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & - extrusion, stencil_depths, & + extrusion, stencil_depth, & apply_partition_check ) call create_mesh( base_mesh_names, extrusion_2d, & @@ -451,20 +447,11 @@ subroutine initialise_transport( program_name, modeldb ) end if - if (allocated(base_mesh_names)) deallocate(base_mesh_names) - if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) - if (allocated(meshes_to_double)) deallocate(meshes_to_double) - if (allocated(twod_names)) deallocate(twod_names) - if (allocated(shifted_names)) deallocate(shifted_names) - if (allocated(double_names)) deallocate(double_names) - if (allocated(extrusion)) deallocate(extrusion) - if (allocated(extrusion_2d)) deallocate(extrusion_2d) - if (allocated(extrusion_shifted)) deallocate(extrusion_shifted) - if (allocated(extrusion_double)) deallocate(extrusion_double) - if (allocated(chain_mesh_tags)) deallocate(chain_mesh_tags) - if (allocated(stencil_depths)) deallocate(stencil_depths) - if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) + if (allocated(base_mesh_names)) deallocate(base_mesh_names) + if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) + if (allocated(meshes_to_double)) deallocate(meshes_to_double) + if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) nullify(chi_inventory, panel_id_inventory, mesh, aerosol_mesh) end subroutine initialise_transport diff --git a/build/extract/extract_physics.mk b/build/extract/extract_physics.mk index 7e43cd1b0..a4df2535b 100644 --- a/build/extract/extract_physics.mk +++ b/build/extract/extract_physics.mk @@ -20,4 +20,7 @@ extract: # Retrieve and preprocess the UKCA and CASIM code - python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/build/extract/extract.yaml + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/build/extract/extract.yaml + $Qrsync -acvz $(SCRATCH_DIR)/ukca $(WORKING_DIR)/science/ + $Qrsync -acvz $(SCRATCH_DIR)/casim $(WORKING_DIR)/science/ + diff --git a/build/extract/extract_science.py b/build/extract/extract_science.py index 845b87b01..042fe6f32 100755 --- a/build/extract/extract_science.py +++ b/build/extract/extract_science.py @@ -1,12 +1,35 @@ import argparse +import subprocess import os +import tempfile import yaml +from shutil import rmtree from pathlib import Path -from get_git_sources import clone_and_merge, run_command -import logging +from typing import Dict, List -def load_yaml(fpath: Path) -> dict: +def run_command(command): + """ + Run a subprocess command and check output + Inputs: + - command, str with command to run + """ + command = command.split() + result = subprocess.run( + command, + capture_output=True, + text=True, + timeout=120, + shell=False, + check=False, + ) + if result.returncode: + raise RuntimeError( + f"The command '{command}' failed with error:\n\n{result.stderr}" + ) + + +def load_yaml(fpath: Path) -> Dict: """ Read in the dependencies.yaml file """ @@ -17,45 +40,56 @@ def load_yaml(fpath: Path) -> dict: return sources -def extract_files(dependencies: dict, extract_lists: dict, working: Path) -> None: +def clone_dependency(values: Dict, temp_dep: Path) -> None: + """ + Clone the physics dependencies into a temporary directory + """ + + source = values["source"] + ref = values["ref"] + + commands = ( + f"git -C {temp_dep} init", + f"git -C {temp_dep} remote add origin {source}", + f"git -C {temp_dep} fetch origin {ref}", + f"git -C {temp_dep} checkout FETCH_HEAD" + ) + for command in commands: + run_command(command) + + +def extract_files(dependency: str, values: Dict, files: List[str], working: Path): """ Clone the dependency to a temporary location Then copy the desired files to the working directory Then delete the temporary directory """ - mirror_loc = os.getenv("MIRROR_LOC", "") - use_mirrors = bool(mirror_loc) - mirror_loc = Path(mirror_loc) - - for dependency, sources in dependencies.items(): - if dependency not in extract_lists: - continue - files = extract_lists[dependency] - - # If the PHYSICS_ROOT environment variable is provided, then use sources there - if "PHYSICS_ROOT" in os.environ and Path(os.environ["PHYSICS_ROOT"]).exists(): - clone_loc = Path(os.environ["PHYSICS_ROOT"]) / dependency - else: - clone_loc = working.parent / "scratch" / dependency - clone_and_merge(dependency, sources, clone_loc, use_mirrors, mirror_loc) - - # make the working directory location - working_dir = working / dependency - working_dir.mkdir(parents=True, exist_ok=True) - - # rsync extract files from clone loc to the working directory - copy_command = "rsync --include='**/' " - for extract_file in files: - if not extract_file: - continue - if Path(clone_loc / extract_file).is_dir(): - extract_file = extract_file.rstrip("/") - extract_file += "/**" - copy_command += f"--include='{extract_file}' " - copy_command += f"--exclude='*' -avmq {clone_loc}/ {working_dir}" + tempdir = Path(tempfile.mkdtemp()) + if ( + "PHYSICS_ROOT" not in os.environ + or not Path(os.environ["PHYSICS_ROOT"]).exists() + ): + temp_dep = tempdir / dependency + temp_dep.mkdir(parents=True) + clone_dependency(values, temp_dep) + else: + temp_dep = Path(os.environ["PHYSICS_ROOT"]) / dependency + + working_dep = working / dependency + + # make the working directory location + working_dep.mkdir(parents=True) + + for extract_file in files: + source_file = temp_dep / extract_file + dest_file = working_dep / extract_file + run_command(f"mkdir -p {dest_file.parents[0]}") + copy_command = f"cp -r {source_file} {dest_file}" run_command(copy_command) + rmtree(tempdir) + def parse_args() -> argparse.Namespace: """ @@ -67,30 +101,34 @@ def parse_args() -> argparse.Namespace: "-d", "--dependencies", default="./dependencies.yaml", - help="The dependencies file for the apps working copy", + help="The dependencies file for the apps working copy.", + ) + parser.add_argument( + "-w", "--working", default=".", help="Location to perform extract steps in." ) - parser.add_argument("-w", "--working", default=".", help="Build location") parser.add_argument( "-e", "--extract", default="./extract.yaml", help="Path to file containing extract lists", ) - - args = parser.parse_args() - args.working = Path(args.working) - return args + return parser.parse_args() def main(): args: argparse.Namespace = parse_args() - logging.basicConfig(level=logging.INFO) - - extract_lists: dict = load_yaml(args.extract) - dependencies: dict = load_yaml(args.dependencies) - - extract_files(dependencies, extract_lists, args.working) + extract_lists: Dict = load_yaml(args.extract) + dependencies: Dict = load_yaml(args.dependencies) + + for dependency in dependencies: + if dependency in extract_lists: + extract_files( + dependency, + dependencies[dependency], + extract_lists[dependency], + Path(args.working), + ) if __name__ == "__main__": diff --git a/build/extract/get_git_sources.py b/build/extract/get_git_sources.py deleted file mode 100644 index 4bf5fd632..000000000 --- a/build/extract/get_git_sources.py +++ /dev/null @@ -1,402 +0,0 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -# ----------------------------------------------------------------------------- -""" -Helper functions for cloning git sources in command line builds -""" - -import re -import subprocess -from datetime import datetime -from typing import Optional, Union -from pathlib import Path -from shutil import rmtree -import shlex -import logging - -logger = logging.getLogger(__name__) - - -def run_command( - command: str, check: bool = True, capture: bool = True, timeout: int = 600 -) -> Optional[subprocess.CompletedProcess]: - """ - Run a subprocess command and return the result object - Inputs: - - command, str with command to run - Outputs: - - result object from subprocess.run - """ - - args = shlex.split(command) - - try: - result = subprocess.run( - args, - capture_output=capture, - text=capture, - timeout=timeout, - shell=False, - check=False, - ) - if check and result.returncode != 0: - err_msg = (result.stderr or "").strip() - logger.error(f"[FAIL] Command failed: {command}\nError: {err_msg}") - raise subprocess.CalledProcessError( - result.returncode, args, output=result.stdout, stderr=result.stderr - ) - return result - - except (subprocess.TimeoutExpired, FileNotFoundError) as e: - logger.error(f"[FAIL] Execution error for '{args[0]}': {e}") - raise - - -def validate_dependencies(dependencies: dict) -> None: - """ - Check that the dependencies file dictionary matches format expectations. - Each dictionary value should be a list of dictionaries (or a single dictionary) - Those dictionaries should have a "source" and a "ref" key - """ - for item, values in dependencies.items(): - failed = False - if isinstance(values, dict): - values = [values] - if not isinstance(values, list): - failed = True - else: - for entry in values: - if not isinstance(entry, dict) or ( - "source" not in entry or "ref" not in entry - ): - failed = True - if failed: - raise ValueError( - f"The dependency {item} does not contain a list of dictionaries (or a " - "single dictionary) with keys of 'source' and 'ref'.\nPlease edit your " - "dependencies.yaml file to satisfy this." - ) - - -def datetime_str() -> str: - """ - Create and return a datetime string at the current time - """ - return datetime.now().strftime("%Y-%m-%d %H:%M:%S") - - -def clone_and_merge( - dependency: str, opts: Union[list, dict], loc: Path, use_mirrors: bool, mirror_loc: Path -) -> None: - """ - Wrapper script for calling get_source and merge_source for a single dependency - - dependency: name of the dependency - opts: dict or list of dicts for a dependency in the dependencies file - loc: path to location to clone to - use_mirrors: bool, use local git mirrors if true - mirror_loc: path to local git mirrors - """ - - if not isinstance(opts, list): - opts = [opts] - - for i, values in enumerate(opts): - if values["ref"] is None: - values["ref"] = "" - - # Clone the first provided source - if i == 0: - get_source( - values["source"], - values["ref"], - loc, - dependency, - use_mirrors, - mirror_loc, - ) - # For all other sources, attempt to merge into the first - else: - merge_source( - values["source"], - values["ref"], - loc, - dependency, - use_mirrors, - mirror_loc, - ) - - -def get_source( - source: str, - ref: str, - dest: Path, - repo: str, - use_mirrors: bool = False, - mirror_loc: Path = Path(""), -) -> None: - """ - Call functions to clone or rsync git source - """ - - if ".git" in source: - if use_mirrors: - logger.info( - f"[{datetime_str()}] Cloning {repo} from {mirror_loc} at ref {ref}" - ) - mirror_loc = Path(mirror_loc) / "MetOffice" / repo - clone_repo_mirror(source, ref, mirror_loc, dest) - else: - logger.info(f"[{datetime_str()}] Cloning {repo} from {source} at ref {ref}") - clone_repo(source, ref, dest) - else: - logger.info(f"[{datetime_str()}] Syncing {repo} at ref {ref}") - sync_repo(source, ref, dest) - - -def merge_source( - source: str, - ref: str, - dest: Path, - repo: str, - use_mirrors: bool = False, - mirror_loc: Path = Path(""), -) -> None: - """ - Merge git source into a local git clone. Assumes dest is a git clone that this - source can be merged into. - """ - - logger.info( - f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Merging " - f"{source} at ref {ref} into {repo}" - ) - - if use_mirrors: - remote_path = Path(mirror_loc) / "MetOffice" / repo - else: - remote_path = source - run_command(f"git -C {dest} remote add local {remote_path}") - - if use_mirrors: - fetch = determine_mirror_fetch(source, ref) - else: - fetch = ref - - run_command(f"git -C {dest} fetch local {fetch}") - command = f"git -C {dest} merge --no-gpg-sign FETCH_HEAD" - result = run_command(command, check=False) - if result.returncode: - unmerged_files = get_unmerged(dest) - if unmerged_files: - handle_merge_conflicts(source, ref, dest, repo) - else: - raise subprocess.CalledProcessError( - result.returncode, command, result.stdout, result.stderr - ) - - # Remove the added remote - run_command(f"git -C {dest} remote remove local") - - -def handle_merge_conflicts(source: str, ref: str, loc: Path, dependency: str) -> None: - """ - If merge conflicts are in `rose-stem/` or `dependencies.yaml` then accept the - current changes and mark as resolved. - If others remain then raise an error - """ - - # For suites, merge conflicts in these files/directories are unimportant so accept - # the current changes - for filepath in ("dependencies.yaml", "rose-stem"): - logger.warning(f"Ignoring merge conflicts in {filepath}") - run_command(f"git -C {loc} checkout --ours -- {filepath}") - run_command(f"git -C {loc} add {filepath}") - - # Check if there are any remaining merge conflicts - unmerged = get_unmerged(loc) - if unmerged: - files = "\n".join(f for f in unmerged) - raise RuntimeError( - "\nA merge conflict has been identified while merging the following branch " - f"into the {dependency} source:\n\nsource: {source}\nref: {ref}\n\n" - f"with conflicting files:{files}" - "\n\nThese will need changing in the source branches to be useable together" - ) - - -def get_unmerged(loc: Path) -> list[str]: - """ - Return list of unmerged files in a git clone - """ - - files = run_command(f"git -C {loc} --no-pager diff --name-only --diff-filter=U") - return files.stdout.split() - - -def clone_repo_mirror( - repo_source: str, - repo_ref: str, - mirror_loc: Path, - loc: Path, -) -> None: - """ - Clone a repo source using a local git mirror. - Assume the mirror is set up as per the Met Office - - repo_source: ssh url of the source repository - - repo_ref: git ref for the source. An empty string will get the default branch - - mirror_loc: path to the local git mirrors - - loc: path to clone the repository to - """ - - # If the repository exists and isn't a git repo, exit now as we don't want to - # overwrite it - if loc.exists(): - if not Path(loc / ".git").exists(): - raise RuntimeError( - f"The destination for the clone of {repo_source} already exists but " - "isn't a git directory. Exiting so as to not overwrite it." - ) - - # Clone if the repo doesn't exist - else: - command = f"git clone {mirror_loc} {loc}" - run_command(command) - - # If not provided a ref, pull the latest repository and return - if not repo_ref: - run_command(f"git -C {loc} pull") - return - - fetch = determine_mirror_fetch(repo_source, repo_ref) - commands = ( - f"git -C {loc} fetch origin {fetch}", - f"git -C {loc} checkout FETCH_HEAD", - ) - for command in commands: - run_command(command) - - -def determine_mirror_fetch(repo_source: str, repo_ref: str) -> str: - """ - Determine the fetch ref for the git mirrors - """ - - repo_source = repo_source.removeprefix("git@github.com:") - user = repo_source.split("/")[0] - # Check that the user is different to the Upstream User - if "MetOffice" in user: - user = None - - # If the ref is a hash then we don't need the fork user as part of the fetch. - # Equally, if the user is the Upstream User, it's not needed - if not user or re.match(r"^\s*([0-9a-f]{40})\s*$", repo_ref): - fetch = repo_ref - else: - fetch = f"{user}/{repo_ref}" - - return fetch - - -def clone_repo(repo_source: str, repo_ref: str, loc: Path) -> None: - """ - Clone the repo and checkout the provided ref - Only if a remote source - - repo_source: ssh url of the source repository - - repo_ref: git ref for the source. An empty string will get the default branch - - loc: path to clone the repository to - """ - - if not loc.exists(): - # Create a clean clone location - loc.mkdir(parents=True) - - # This process is equivalent to doing a git clone - # It saves a small amount of space by not fetching all refs - commands = ( - f"git -C {loc} init", - f"git -C {loc} remote add origin {repo_source}", - f"git -C {loc} fetch origin {repo_ref}", - f"git -C {loc} checkout FETCH_HEAD", - f"git -C {loc} fetch origin main:main", - ) - for command in commands: - run_command(command) - else: - commands = ( - f"git -C {loc} fetch origin {repo_ref}", - f"git -C {loc} checkout FETCH_HEAD", - ) - for command in commands: - run_command(command) - - -def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: - """ - Rsync a local git clone and checkout the provided ref - """ - - # Remove if this clone already exists - if loc.exists(): - rmtree(loc) - - # Create a clean clone location - loc.mkdir(parents=True) - - exclude_dirs = [] - try: - host, path = repo_source.split(":", 1) - result = run_command(f"ssh {host} git -C {path} status --ignored -s") - except ValueError: - # In case the path does not contain `host:` - see if it can be accessed locally - result = run_command(f"git -C {repo_source} status --ignored -s") - for ignore_file in result.stdout.split("\n"): - ignore_file = ignore_file.strip() - if not ignore_file.startswith("!!"): - continue - ignore_file = ignore_file.removeprefix("!!").strip() - exclude_dirs.append(ignore_file) - - # Trailing slash required for rsync - command = f"rsync -av {repo_source}/ {loc}" - for item in exclude_dirs: - command = f"{command} --exclude '{item}'" - run_command(command) - - # Fetch the main branch from origin - # Ignore errors - these are likely because the main branch already exists - # Instead write them as warnings - command = f"git -C {loc} fetch origin main:main" - result = run_command(command, check=False) - if result and result.returncode: - logger.warning( - "Fetching main from origin resulted in an error." - "This is likely due to the main branch already existing" - f"\nError message:\n\n{result.stderr}" - ) - - if repo_ref: - command = f"git -C {loc} checkout {repo_ref}" - run_command(command) - - -def set_https(dependencies: dict) -> dict: - """ - Change sources in a dependencies dictionary to use https instead of ssh - """ - - logger.info("Modifying Dependencies to use https") - for dependency, opts in dependencies.items(): - if not isinstance(opts, list): - opts = [opts] - for i, values in enumerate(opts): - if values["source"].startswith("git@github.com:"): - values["source"] = values["source"].replace( - "git@github.com:", "https://github.com/" - ) - opts[i] = values - dependencies[dependency] = opts - - return dependencies diff --git a/build/local_build.py b/build/local_build.py index 7f66e614c..988efe3e6 100755 --- a/build/local_build.py +++ b/build/local_build.py @@ -17,9 +17,8 @@ import subprocess import argparse import yaml -import logging from pathlib import Path -from extract.get_git_sources import clone_and_merge +import shutil def subprocess_run(command): @@ -48,7 +47,7 @@ def get_root_path(): Get the root path of the current working copy """ - return Path(__file__).absolute().parent.parent + return os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def determine_core_source(root_dir): @@ -59,7 +58,7 @@ def determine_core_source(root_dir): # Read through the dependencies file and populate revision and source # variables for requested repo - with open(root_dir / "dependencies.yaml", "r") as stream: + with open(os.path.join(root_dir, "dependencies.yaml"), "r") as stream: dependencies = yaml.safe_load(stream) return dependencies["lfric_core"] @@ -73,9 +72,9 @@ def determine_project_path(project, root_dir): # Find the project in either science/ interfaces/ or applications/ for drc in ["science/", "interfaces/", "applications/"]: - path = root_dir / drc + path = os.path.join(root_dir, drc) for item in os.listdir(path): - item_path = path / item + item_path = os.path.join(path, item) if item_path and item == project: return item_path @@ -85,6 +84,45 @@ def determine_project_path(project, root_dir): ) +def clone_dependency(source, ref, temp_dep): + """ + Clone the physics dependencies into a temporary directory + """ + + commands = ( + f"git -C {temp_dep} init", + f"git -C {temp_dep} remote add origin {source}", + f"git -C {temp_dep} fetch origin {ref}", + f"git -C {temp_dep} checkout FETCH_HEAD" + ) + for command in commands: + subprocess_run(command) + + +def get_lfric_core(core_source, working_dir): + """ + Clone the lfric_core source if the source is a git url + rsync this export into the working dir as the lfric_core source - done so + incremental builds can still be used. + If core_source is a local working copy just rsync from there. + """ + + if core_source["source"].endswith(".git"): + print("Cloning LFRic Core from Github") + lfric_core_loc = Path(working_dir) / "scratch" / "core" + if lfric_core_loc.exists(): + shutil.rmtree(lfric_core_loc) + lfric_core_loc.mkdir(parents=True) + clone_dependency(core_source["source"], core_source["ref"], lfric_core_loc) + print("rsyncing the exported lfric_core source") + else: + lfric_core_loc = core_source["source"] + print("rsyncing the local lfric_core source") + + rsync_command = f"rsync -acvzq {lfric_core_loc}/ {working_dir}/lfric_core" + subprocess_run(rsync_command) + + def build_makefile( root_dir, project_path, @@ -94,6 +132,7 @@ def build_makefile( target, optlevel, psyclone, + um_fcm_platform, verbose, ): """ @@ -103,19 +142,21 @@ def build_makefile( if target == "clean": working_path = working_dir else: - working_path = working_dir / f"{target}_{project}" + working_path = os.path.join(working_dir, f"{target}_{project}") print(f"Calling make command for makefile at {project_path}") make_command = ( f"make {target} -C {project_path} -j {ncores} " f"WORKING_DIR={working_path} " - f"CORE_ROOT_DIR={working_dir / 'scratch' / 'lfric_core'} " + f"CORE_ROOT_DIR={working_dir}/lfric_core " f"APPS_ROOT_DIR={root_dir} " ) if optlevel: make_command += f"PROFILE={optlevel} " if psyclone: make_command += f"PSYCLONE_TRANSFORMATION={psyclone} " + if um_fcm_platform: + make_command += f"UM_FCM_TARGET_PLATFORM={um_fcm_platform} " if verbose: make_command += "VERBOSE=1 " @@ -132,31 +173,20 @@ def main(): ) parser.add_argument( "project", - help="project to build. Will search in both science and projects dirs.", + help="project to build. Will search in both " + "science and projects dirs.", ) parser.add_argument( "-c", "--core_source", default=None, - help="Source for lfric_core. Defaults to looking in dependencies file.", - ) - parser.add_argument( - "-m", - "--mirrors", - action="store_true", - help="If true, attempts to use local git mirrors", - ) - parser.add_argument( - "--mirror_loc", - default="/data/users/gitassist/git_mirrors", - help="Location of github mirrors", + help="Source for lfric_core. Defaults to looking in " "dependencies file.", ) parser.add_argument( "-w", "--working_dir", default=None, - type=Path, - help="Working directory where builds occur. Defaults to the project " + help="Working directory where builds occur. Default to the project " "directory in the working copy.", ) parser.add_argument( @@ -169,7 +199,7 @@ def main(): "-t", "--target", default="build", - help="The makefile target, eg. unit-tests, clean, etc. Default of build.", + help="The makefile target, eg. unit-tests, clean, etc. Default " "of build.", ) parser.add_argument( "-o", @@ -185,6 +215,14 @@ def main(): help="Value passed to PSYCLONE_TRANSFORMATION variable in makefile. " "Defaults to the makefile default", ) + parser.add_argument( + "-u", + "--um_fcm_platform", + default=None, + help="Value passed to UM_FCM_TARGET_PLATFORM variable in makefile, " + "used for build settings for extracted UM physics. Defaults to the " + "makefile default.", + ) parser.add_argument( "-v", "--verbose", @@ -193,12 +231,6 @@ def main(): ) args = parser.parse_args() - logging.basicConfig(level=logging.INFO) - - # If using mirrors, set environment variable for science extract step - if args.mirrors: - os.environ["USE_MIRRORS"] = args.mirror_loc - # Find the root directory of the working copy root_dir = get_root_path() @@ -207,26 +239,24 @@ def main(): # Set the working dir default of the project directory if not args.working_dir: - args.working_dir = Path(project_path) / "working" + args.working_dir = os.path.join(project_path, "working") else: # If the working dir doesn't end in working, set that here - if not args.working_dir.name == "working": - args.working_dir = Path(args.working_dir) / "working" - # Ensure that working_dir is an absolute path and make the directory - args.working_dir = args.working_dir.resolve() - args.working_dir.mkdir(parents=True, exist_ok=True) + if not args.working_dir.strip("/").endswith("working"): + args.working_dir = os.path.join(args.working_dir, "working") + # Ensure that working_dir is an absolute path + args.working_dir = os.path.abspath(args.working_dir) + # Create the working_dir + subprocess_run(f"mkdir -p {args.working_dir}") # Determine the core source if not provided if args.core_source is None: core_source = determine_core_source(root_dir) else: - core_source = {"source": args.core_source, "ref": ""} - - if not isinstance(core_source, list): - core_source = [core_source] + core_source = {"source": args.core_source} - core_loc = args.working_dir / "scratch" / "lfric_core" - clone_and_merge("lfric_core", core_source, core_loc, args.mirrors, args.mirror_loc) + # Export and rsync the lfric_core source + get_lfric_core(core_source, args.working_dir) # Build the makefile build_makefile( @@ -238,6 +268,7 @@ def main(): args.target, args.optlevel, args.psyclone, + args.um_fcm_platform, args.verbose, ) diff --git a/documentation/source/developer_guide/local_builds.rst b/documentation/source/developer_guide/local_builds.rst index c57f67e62..9e5bd9310 100644 --- a/documentation/source/developer_guide/local_builds.rst +++ b/documentation/source/developer_guide/local_builds.rst @@ -67,19 +67,3 @@ This table lists the command line arguments available: | | | will request verbose output | | | | from the makefile. | +----------------------+-----------------------------+-----------------------------+ -| ``-m --mirrors`` | False | If True, this will attempt | -| ``store_true`` | | to extract using local | -| | | github mirrors | -+----------------------+-----------------------------+-----------------------------+ -| ``--mirror-loc`` | MetOffice Mirror Location | The path to the github | -| | | mirror location | -+----------------------+-----------------------------+-----------------------------+ - -Incremental Builds ------------------- - -The local build script will attempt to build incrementally if a previous attempt -at the build exists. This should happen automatically if the working directory -is the same. If there are large changes then it may be sensible to start the -build afresh by cleaning the build ``-t clean`` (or deleting the working -directory). diff --git a/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst b/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst index 2a664b051..17be30420 100644 --- a/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst +++ b/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst @@ -9,26 +9,18 @@ LFRic atmosphere checkpoint/restart system ========================================== -The LFRic atmosphere ``lfric_atm`` application can be configured to generate -checkpoint dumps at multiple points within a model run. A checkpoint dump can be read in -by a new integration of the model allowing further timesteps to be run. Each dump +The LFRic atmosphere ``lfric_atm`` application can be configured to generate a +checkpoint dump at the end of each model run. The checkpoint dump can be read in +by a new integration of the model allowing further timesteps to be run. The dump is written using XIOS. Requesting checkpoint restart ----------------------------- Set ``checkpoint_write=.true.`` in the ``io`` namelist of the model -configuration to turn on checkpoint writing. The times when checkpoint files -will be written are defined by the ``checkpoint_times`` list. The -``checkpoint_times`` must be real values in seconds corresponding to an integer -number of timesteps in the model run (e.g. if ``dt=0.5`` the -``checkpoint_times`` can include ``0.5`` and ``1.0`` etc. but **not** ``0.3``). -Setting ``end_of_run_checkpoint=.true.`` will write a checkpoint file at the end -of the run. Only one checkpoint file will be written at the end of a run even if -both the final timestep is included in the ``checkpoint_times`` list and the -``end_of_run_checkpoint`` flag is set to ``.true.``. The checkpoint dumps will -be named after the ``checkpoint_stem_name`` string in the ``files`` namelist -appended with timestep number of the checkpoint time. +configuration to generate a checkpoint dump at the end of a model run. The +checkpoint dump will be named after the ``checkpoint_stem_name`` string in the +``files`` namelist appended with the number of the last timestep of the run. Set ``checkpoint_read=.true.`` in the ``io`` namelist to restart a run from an existing checkpoint dump. The expected start timestep will be defined by diff --git a/interfaces/coupled_interface/rose-meta/coupling/versions.py b/interfaces/coupled_interface/rose-meta/coupling/versions.py index 8bab40a9e..8418438c1 100644 --- a/interfaces/coupled_interface/rose-meta/coupling/versions.py +++ b/interfaces/coupled_interface/rose-meta/coupling/versions.py @@ -126,48 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports diff --git a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py index 2d3f6a52e..8418438c1 100644 --- a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py @@ -126,123 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 index a4a287444..4530bade2 100644 --- a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 @@ -193,7 +193,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ aerosol_twod_mesh ) ! Instantiate the linearisation state - call linear_create_ls_analytic( modeldb, mesh, twod_mesh ) + call linear_create_ls_analytic( modeldb, mesh ) ! 4. Initialise the model 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..c630b998d 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 @@ -46,7 +46,7 @@ module atlas_field_interface_mod use field_mod, only : field_type, field_proxy_type use field_parent_mod, only : field_parent_type use fs_continuity_mod, only : W3, Wtheta, name_from_functionspace - use constants_mod, only : i_def, str_def, l_def, r_def + use constants_mod, only : i_def, str_def, l_def implicit none @@ -394,7 +394,7 @@ subroutine copy_to_lfric( self, return_code ) atlas_ij = self%map_horizontal(ij) lfric_ij = (ij-1)*n_vertical_lfric field_proxy%data(lfric_ij+lfric_kstart:lfric_ij+n_vertical_lfric) & - = real(self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij), r_def) + = self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij) end do ! Fill missing data if required @@ -410,7 +410,7 @@ subroutine copy_to_lfric( self, return_code ) atlas_ij = self%map_horizontal(ij) lfric_ij = (ij-1)*n_vertical_lfric field_proxy%data(lfric_ij+1) & - = real(self%atlas_data(atlas_kstart,atlas_ij), r_def) + = self%atlas_data(atlas_kstart,atlas_ij) end do end if @@ -466,7 +466,7 @@ subroutine copy_from_lfric_ad(self) lfric_ij = (ij-1)*n_vertical_lfric field_proxy%data(lfric_ij+lfric_kstart:lfric_ij+n_vertical_lfric) & = field_proxy%data(lfric_ij+lfric_kstart:lfric_ij+n_vertical_lfric) & - + real(self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij), r_def) + + self%atlas_data(atlas_kstart:atlas_kend:atlas_kdirection,atlas_ij) end do ! Initialise out of scope variable to zero diff --git a/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 b/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 index 9f7185cd5..b1ab23597 100644 --- a/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 @@ -21,7 +21,7 @@ !> ii) all three "moist_dyn" fields. !> module jedi_lfric_linear_fields_mod - use constants_mod, only : i_def, str_def, r_def, l_def + use constants_mod, only : i_def, str_def, r_def use field_mod, only : field_type use field_collection_mod, only : field_collection_type use fs_continuity_mod, only : W3, Wtheta, W2 @@ -35,7 +35,6 @@ module jedi_lfric_linear_fields_mod integer( kind=i_def ), parameter :: element_order_h = 0 integer( kind=i_def ), parameter :: element_order_v = 0 integer( kind=i_def ), parameter :: nvars = 10 - integer( kind=i_def ), parameter :: ls_nvars = 11 character( len=str_def ), parameter, public :: & variable_names(nvars) = (/'theta ', & 'exner ', & @@ -47,18 +46,6 @@ module jedi_lfric_linear_fields_mod 'm_cl ', & 'm_r ', & 'm_s '/) - character( len=str_def ), parameter, public :: & - ls_variable_names(ls_nvars) = (/'theta ', & - 'exner ', & - 'rho ', & - 'u_in_w3 ', & - 'v_in_w3 ', & - 'w_in_wth ', & - 'm_v ', & - 'm_cl ', & - 'm_r ', & - 'm_s ', & - 'land_fraction'/) integer( kind=i_def ), parameter, public :: & variable_function_spaces(nvars) = (/Wtheta, & @@ -71,31 +58,6 @@ module jedi_lfric_linear_fields_mod Wtheta, & Wtheta, & Wtheta/) - integer( kind=i_def ), parameter, public :: & - ls_variable_function_spaces(ls_nvars) = (/Wtheta, & - W3, & - W3, & - W3, & - W3, & - Wtheta, & - Wtheta, & - Wtheta, & - Wtheta, & - Wtheta, & - W3/) - - logical( kind=l_def ), parameter, public :: & - ls_variable_is_2d(ls_nvars) = (/.false., & - .false., & - .false., & - .false., & - .false., & - .false., & - .false., & - .false., & - .false., & - .false., & - .true./) public :: create_linear_fields @@ -107,42 +69,33 @@ module jedi_lfric_linear_fields_mod !> @brief Create a field collection that includes the linear model variables !> !> @param [in] mesh Pointer to a mesh object -!> @param [in] twod_mesh Pointer to a 2D mesh object !> @param [out] linear_fields A field collection that includes the linear !> fields -subroutine create_linear_fields( mesh, twod_mesh, linear_fields ) +subroutine create_linear_fields( mesh, linear_fields ) implicit none type( mesh_type ), pointer, intent(in) :: mesh - type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), intent(out) :: linear_fields ! Local type( field_type ) :: field - type( mesh_type ), pointer :: mesh_for_field character( len=str_def ) :: variable_name integer :: i ! Setup the field_collection - call linear_fields%initialise(name = 'linear_state_trajectory', table_len = ls_nvars) + call linear_fields%initialise(name = 'linear_state_trajectory', table_len = nvars) ! Create and add the fields defined in the list of variable names - do i = 1, ls_nvars - - variable_name = trim(ls_variable_names(i)) + do i = 1, nvars - if (ls_variable_is_2d(i)) then - mesh_for_field => twod_mesh - else - mesh_for_field => mesh - end if + variable_name = trim(variable_names(i)) call field%initialise( & - vector_space = function_space_collection%get_fs(mesh_for_field, & + vector_space = function_space_collection%get_fs(mesh, & element_order_h, & element_order_v, & - ls_variable_function_spaces(i)), & + variable_function_spaces(i)), & name = variable_name ) call linear_fields%add_field( field ) diff --git a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 index 50fb9070b..6857363e6 100644 --- a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 +++ b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 @@ -10,7 +10,6 @@ module jedi_lfric_mesh_setup_mod use add_mesh_map_mod, only: assign_mesh_maps use base_mesh_config_mod, only: GEOMETRY_SPHERICAL, & GEOMETRY_PLANAR - use check_configuration_mod, only: get_required_stencil_depth use config_mod, only: config_type use constants_mod, only: str_def, i_def, l_def, r_def use create_mesh_mod, only: create_mesh @@ -66,7 +65,7 @@ subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_ integer(i_def), parameter :: one_layer = 1_i_def integer(i_def) :: geometry integer(i_def) :: extrusion_method - integer(i_def), allocatable :: stencil_depths(:) + integer(i_def) :: stencil_depth integer(i_def) :: number_of_layers integer(i_def) :: i real(r_def) :: domain_bottom @@ -126,18 +125,14 @@ subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_ !------------------------------------------------------------------------- ! 1.2 Create the required meshes !------------------------------------------------------------------------- - - allocate(stencil_depths(size(base_mesh_names))) - call get_required_stencil_depth( stencil_depths, base_mesh_names, & - configuration ) - + stencil_depth = 2 apply_partition_check = .false. call init_mesh( config, & mpi_obj%get_comm_rank(), & mpi_obj%get_comm_size(), & base_mesh_names, & extrusion, & - stencil_depths, & + stencil_depth, & apply_partition_check ) allocate( twod_names, source=base_mesh_names ) @@ -148,11 +143,6 @@ subroutine initialise_mesh( mesh_name, configuration, config, mpi_obj, alt_mesh_ alt_name=twod_names ) call assign_mesh_maps(twod_names) - deallocate(twod_names) - deallocate(stencil_depths) - deallocate(extrusion) - if (allocated(extrusion_2d)) deallocate(extrusion_2d) - end subroutine initialise_mesh end module jedi_lfric_mesh_setup_mod diff --git a/interfaces/jules_interface/build/import.mk b/interfaces/jules_interface/build/import.mk index 73b35d289..bb1c8870b 100644 --- a/interfaces/jules_interface/build/import.mk +++ b/interfaces/jules_interface/build/import.mk @@ -8,7 +8,8 @@ export PROJECT_SOURCE = $(APPS_ROOT_DIR)/interfaces/jules_interface/source .PHONY: import-jules_interface import-jules_interface: # Get a copy of the source code from the JULES repository - python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.yaml + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.yaml + $Qrsync -acvz $(SCRATCH_DIR)/jules $(WORKING_DIR)/ # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 index ee0bb5f8d..555e5d24e 100644 --- a/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_exp_alg_mod.x90 @@ -64,6 +64,7 @@ contains !>@param[in] aerosol_fields Fields for aerosol scheme !>@param[in,out] recip_l_mo_sea Inverse Obukhov length over sea only !>@param[in,out] rhostar Surface density + !>@param[in,out] h_blend_orog Orographic blending height !>@param[in,out] t1_sd_2d StDev of level 1 temperature !>@param[in,out] q1_sd_2d StDev of level 1 humidity subroutine jules_exp_alg(modeldb, theta, mr_n, & @@ -72,7 +73,7 @@ contains turbulence_fields, convection_fields, & cloud_fields, surface_fields, soil_fields, & snow_fields, aerosol_fields, recip_l_mo_sea, & - rhostar, t1_sd_2d, q1_sd_2d) + rhostar, h_blend_orog, t1_sd_2d, q1_sd_2d) use psykal_lite_phys_mod, only: invoke_jules_exp_kernel_type use xios, only: xios_date, xios_get_current_date, & @@ -97,6 +98,7 @@ contains type( field_type ), intent( inout ) :: recip_l_mo_sea type( field_type ), intent( inout ) :: rhostar + type( field_type ), intent( inout ) :: h_blend_orog type( field_type ), intent( inout ) :: t1_sd_2d type( field_type ), intent( inout ) :: q1_sd_2d @@ -375,6 +377,7 @@ contains call zh%copy_field_properties(recip_l_mo_sea) call zh%copy_field_properties(rhostar) + call zh%copy_field_properties(h_blend_orog) call zh%copy_field_properties(t1_sd_2d) call zh%copy_field_properties(q1_sd_2d) @@ -446,7 +449,7 @@ contains flux_e, flux_h, urbwrr, & urbhwr, urbhgt, urbztm, urbdisp, & rhostar, recip_l_mo_sea, & - t1_sd_2d, q1_sd_2d, & + h_blend_orog, t1_sd_2d, q1_sd_2d, & gross_prim_prod, z0h_eff, ocn_cpl_point, & stencil_depth) diff --git a/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 index 50a9db08c..f529642ac 100644 --- a/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_timestep_alg_mod.x90 @@ -218,7 +218,7 @@ contains ! For jules_exp_alg ! not required for standalone, but required for boundary layer - type( field_type ) :: recip_l_mo_sea, rhostar + type( field_type ) :: recip_l_mo_sea, rhostar, h_blend_orog type( field_type ) :: t1_sd_2d, q1_sd_2d ! For jules_imp_alg @@ -288,7 +288,7 @@ contains turbulence_fields, convection_fields, cloud_fields, & surface_fields, soil_fields, snow_fields, & aerosol_fields, recip_l_mo_sea, rhostar, & - t1_sd_2d, q1_sd_2d) + h_blend_orog, t1_sd_2d, q1_sd_2d) ! Fields set up for jules_imp ! ncells is set to 1 after jules_exp so needs to be reset 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..27f10473f 100644 --- a/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 +++ b/interfaces/jules_interface/source/kernel/jules_exp_kernel_mod.F90 @@ -46,7 +46,7 @@ module jules_exp_kernel_mod !> type, public, extends(kernel_type) :: jules_exp_kernel_type private - type(arg_type) :: meta_args(108) = (/ & + type(arg_type) :: meta_args(109) = (/ & arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! theta_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! exner_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, W3, STENCIL(REGION)), &! u_in_w3 @@ -150,6 +150,7 @@ module jules_exp_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), &! urbdisp arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! rhostar arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! recip_l_mo_sea + arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! h_blend_orog arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! t1_sd arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! q1_sd arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1),&! diag__gross_prim_prod @@ -272,6 +273,7 @@ module jules_exp_kernel_mod !> @param[in] urbdisp Urban displacement height !> @param[in,out] rhostar_2d Surface density !> @param[in,out] recip_l_mo_sea_2d Inverse Obukhov length over sea only + !> @param[in,out] h_blend_orog_2d Orographic blending height !> @param[in,out] t1_sd_2d StDev of level 1 temperature !> @param[in,out] q1_sd_2d StDev of level 1 humidity !> @param[in,out] gross_prim_prod Diagnostic: Gross Primary Productivity @@ -422,6 +424,7 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & urbdisp, & rhostar_2d, & recip_l_mo_sea_2d, & + h_blend_orog_2d, & t1_sd_2d, & q1_sd_2d, & gross_prim_prod, & @@ -600,6 +603,7 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & z0m_eff, & ustar, & soil_moist_avail, & + h_blend_orog_2d, & recip_l_mo_sea_2d, & rhostar_2d, & t1_sd_2d, q1_sd_2d @@ -1674,6 +1678,7 @@ subroutine jules_exp_code(nlayers, seg_len, seg_len_halo, & ! variables passed to explicit BL rhostar_2d(map_2d(1,i)) = rhostar(i,1) recip_l_mo_sea_2d(map_2d(1,i)) = recip_l_mo_sea(i,1) + h_blend_orog_2d(map_2d(1,i)) = jules_vars%h_blend_orog_ij(i,1) t1_sd_2d(map_2d(1,i)) = t1_sd(i,1) q1_sd_2d(map_2d(1,i)) = q1_sd(i,1) diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk index 55dab07a2..aa704fa70 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk @@ -13,10 +13,6 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute -# Set default PSyclone transmute command additional options -PSYCLONE_TRANSMUTE_EXTRAS ?= -l all -# - # Find the specific files we wish to pre-processed and PSyclone from physics source # Set our target dependency to the version of the file we are to generate after # the psycloning step. @@ -58,9 +54,9 @@ psyclone: $(SOURCE_F_FILES) $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py echo PSyclone with file override script $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ + -l all \ -s $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py \ -o $(SOURCE_DIR)/$*.f90 \ - $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< # Where a local optimisation script exists, use it. @@ -69,9 +65,9 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DSL)/$$*)local.py echo PSyclone with local script $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ + -l all \ -s $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py \ -o $(SOURCE_DIR)/$*.f90 \ - $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< # Where a global optimisation script exists, use it. @@ -79,7 +75,7 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DS $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/global.py echo PSyclone with global script $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ + -l all \ -s $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py \ -o $(SOURCE_DIR)/$*.f90 \ - $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk index 29ca28d04..5c6370185 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk @@ -13,10 +13,6 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute -# Set default PSyclone transmute command additional options -PSYCLONE_TRANSMUTE_EXTRAS ?= -l all -# - # Find the specific files we wish to pre-processed and PSyclone from physics source # Set our target dependency to the version of the file we are to generate after # the psycloning step. @@ -32,13 +28,13 @@ SOURCE_F_FILES_PASS := $(foreach THE_FILE, $(PSYCLONE_PASS_NO_SCRIPT), $(patsubs # psyclone_pass: $(SOURCE_F_FILES_PASS) - # PSyclone files back into f90 files. + # Where no optimisation script exists, don't use it. # $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 echo PSyclone pass with no optimisation applied, OMP and Clauses removed on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ + -l all \ -o $(SOURCE_DIR)/$*.f90 \ - $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< diff --git a/interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py b/interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py deleted file mode 100644 index 35c1b1c32..000000000 --- a/interfaces/physics_schemes_interface/build/transmute_psytrans/tools.py +++ /dev/null @@ -1,50 +0,0 @@ -# ----------------------------------------------------------------------------- -# (C) Crown copyright Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -# ----------------------------------------------------------------------------- -''' -Contains some functions which might assist in generating scripts, but otherwise -would not be used in the script actively. -''' - - -# Tool, not active part of script -def find_node_index(routine_children, find_lhs, find_rhs): - ''' - A tool to assist developers finding the index of a node to - use when spanning a parallel section. - You can use the variable name of the LHS and either the variable - name of the RHS (if it exists), or the name of the function used - on the RHS. - This is called with a list of routine_children inside a walk of the - routines in the PSyIR object. - ''' - for index, node in enumerate(routine_children): - list_of_attributes = [] - try: - list_of_attributes = node.walk(Assignment) - except AttributeError: - pass - - for assignment in list_of_attributes: - if str(assignment.lhs.name) == find_lhs: - found_rhs=False - print("#### New find ####") - print("found LHS") - print(index) - try: - print(assignment.rhs.ast) - if find_rhs in str(assignment.rhs.ast): - found_rhs = True - except: - pass - try: - if str(assignment.rhs.name) == find_rhs: - found_rhs = True - except: - pass - if found_rhs: - print("Found RHS - Y") - print(index) - break diff --git a/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py b/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py index a28728454..9833d8adf 100644 --- a/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py +++ b/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py @@ -13,12 +13,10 @@ from typing import Sequence, Optional, Tuple, Set from psyclone.psyir.nodes import ( - Node, Loop, Call, Assignment, Reference, - Return, OMPParallelDirective, OMPDoDirective, OMPParallelDoDirective, @@ -33,7 +31,6 @@ RoutineSymbol, ImportInterface, UnsupportedFortranType, - INTEGER_TYPE, CHARACTER_TYPE, ) from psyclone.transformations import ( @@ -605,58 +602,6 @@ def match_lhs_assignments(node, names): return lhs_names -def loop_replacement_of(routine_itr, - target_name: str, - init_at_start=True): - ''' - This transformation checks that the loop iterator we are on is the one - we want, and then changes it to be of length 1 instead - The intent - is to primarily target the UM j loops with this call, but it is - generic. - - Parameters - ---------- - routine_itr : Routine iteration from a loop which walks the psyir routines - target_name : A loop of a given type - init_at_start : Do we want a initialisation at the start? Default True. - - Returns - ---------- - None : Note the tree has been modified - ''' - - do_once = False - # Get the loops from the provided routine and walk - for loop in routine_itr.walk(Loop): - # if the loop is of the target type - if str(loop.loop_type) == target_name: - - # Only init once in the routine at the start - if not do_once and init_at_start: - parent = routine_itr - assign = Assignment.create( - Reference(loop.variable), - Literal("1", INTEGER_TYPE)) - parent.children.insert(0, assign) - do_once = True - - # Get a parent table reference to move the loop body - try: - parent_table = loop.parent.scope.symbol_table - except AttributeError as err: - parent_table = False - - # if the loop parent table is a valid reference - if parent_table: - parent_table.merge(loop.loop_body.symbol_table) - # Move the body of the loop after the loop - for statement in reversed(loop.loop_body.children): - loop.parent.addchild( - statement.detach(), - loop.position + 1) - tmp = loop.detach() # noqa: F841 - - def add_omp_parallel_region( start_node, end_node, @@ -721,108 +666,3 @@ def add_omp_parallel_region( except TransformationError as e: logging.warning(e) - -def remove_unspanable_nodes( - routine_itr, - timer_routine_names, - remove_loop_type, -): - ''' - A method to help reduce the number of nodes found in a routine list. - This will remove some nodes that we do not ever wish to parallelise over. - This includes: - * The first and last timer calipers from the list: timer_routine_names. - * Ideally the final, but any return statement. - * Any variables which have had their loops removed, and are initialised. - - Parameters - ---------- - routine_itr : Routine iteration from a loop which walks the psyir routines. - timer_routine_names : Timer caliper list of names. - remove_loop_type : lhs only holds the variable name, keep this simple. - - Returns - ---------- - Copy of node list: A list of nodes from the given routine without - the above nodes. - ''' - - routine_children = routine_itr.children - return_copy_span = [] - delete_node_indexes = [] - - # Remove calipers - for index, routine_child in enumerate(routine_children): - - for routine in routine_child.walk(Reference): - try: - if str(routine.name) in timer_routine_names: - delete_node_indexes.append(index) - break - except: # noqa: E722 - continue - - # Remove the return statement - for index in range((len(routine_children)-1), 0, -1): - # If the instance is a return, add it to the list of indexes and exit - if isinstance(routine_children[index], Return): - delete_node_indexes.append(index) - break - - # Remove indexes at the start until we get to the first non assignment loop - for index, routine_child in enumerate(routine_children): - # Check if it is an assignment - # If so check whether the lhs name is in the remove_loop_type list - if isinstance(routine_child, Assignment): - if str(routine_child.lhs.name) in remove_loop_type: - delete_node_indexes.append(index) - # Otherwise exit - elif index not in delete_node_indexes: - break - - # A safer way is to build up a list of elements to remove - # Then remove the elements all at once. - delete_node_indexes.sort() - for index, routine_child in enumerate(routine_children): - if index not in delete_node_indexes: - return_copy_span.append(routine_child) - - return return_copy_span - - -def get_ancestors( - node, node_type=Loop, inclusive=False, exclude=(), depth=None -): - """ - Lifted from PSyTran. - Get all ancestors of a Node with a given type. - - :arg node: the Node to search for ancestors of. - :type node: :py:class:`Node` - :kwarg node_type: the type of node to search for. - :type node_type: :py:class:`type` - :kwarg inclusive: if ``True``, the current node is included. - :type inclusive: :py:class:`bool` - :kwarg exclude: type(s) of node to exclude. - :type exclude: :py:class:`bool` - :kwarg depth: specify a depth for the ancestors to have. - :type depth: :py:class:`int` - - :returns: list of ancestors according to specifications. - :rtype: :py:class:`list` - """ - assert isinstance(node, Node), f"Expected a Node, not '{type(node)}'." - assert isinstance( - inclusive, bool - ), f"Expected a bool, not '{type(inclusive)}'." - assert isinstance(node_type, tuple) or issubclass(node_type, Node) - if depth is not None: - assert isinstance(depth, int), f"Expected an int, not '{type(depth)}'." - ancestors = [] - node = node.ancestor(node_type, excluding=exclude, include_self=inclusive) - while node is not None: - ancestors.append(node) - node = node.ancestor(node_type, excluding=exclude) - if depth is not None: - ancestors = [a for a in ancestors if a.depth == depth] - return ancestors diff --git a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf index 957c94aad..c01f31b69 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/HEAD/rose-meta.conf @@ -827,8 +827,7 @@ values='fd','fe' [namelist:stochastic_physics=skeb_level_bottom] compulsory=true description=Bottom level of SKEB calculations -help=The bottom pressure-level at which SKEB is active. - =A value of 1 corresponds to the lowest level of the model. +help=Bottom level of SKEB calculations - model level a little above surface ns=namelist/Science/Stochastic Physics/SKEB range=2:60 sort-key=Panel-A3a @@ -846,7 +845,7 @@ type=integer [namelist:stochastic_physics=skeb_level_top] compulsory=true description=Top level of SKEB calculations -help=If the model has N layers, a value of N would correspond to the top layer. +help=Top level of SKEB calculations - model level at or just above tropopause ns=namelist/Science/Stochastic Physics/SKEB range=30:200 sort-key=Panel-A3b @@ -964,14 +963,12 @@ type=integer [namelist:stochastic_physics=spt_level_bottom] compulsory=true -description=Bottom level at which SPT is active -help=The bottom theta-level at which SPT perturbations are applied. - =A value of 0 would correspond to the surface, so a value of 2 means that - =perturbations are applied from the third theta-level and above. - =Note that the perturbations are actually tapered, so that at the level - =specified here the perturbations will still be 0, and SPT perturbations - =effectively start at one level above this specified value. - =For more information, see help-panel of spt_level_begin_tapering_bottom. +description=Bottom level where SPT is active + =See Help panel for details +help=Bottom level wehre SPT perturbations are applied. + =Though, the tapering at this level is 0 so effectively + =SPT perturbations start one level above, see help-panel + = of spt_level_begin_tapering_bottom. ns=namelist/Science/Stochastic Physics/SPT range=2:60 sort-key=Panel-A6a @@ -979,14 +976,12 @@ type=integer [namelist:stochastic_physics=spt_level_top] compulsory=true -description=Top level at which SPT is active -help=The top theta-level at which SPT perturbations are applied. - =If the model has N layers, a value of N would correspond to the top - =boundary. Note that the perturbations are actually tapered, so that at the - =level specified here the perturbations will still be 0, and SPT - =perturbations effectively start at one level below this specified value. +description=Top level where SPT is active + =See Help panel for details +help=Top level where SPT perturbations are applied. =Though, the tapering at this level is 0 so effectively - =For more information, see help-panel of spt_level_begin_tapering_top. + =SPT perturbations start one level below, see help-panel + = of spt_level_begin_tapering_top. ns=namelist/Science/Stochastic Physics/SPT range=30:200 sort-key=Panel-A6d diff --git a/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 index c1f05d8eb..80d03be2b 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/bl_exp_alg_mod.x90 @@ -66,6 +66,7 @@ contains !>@param[in,out] surface_fields Fields for surface scheme !>@param[in] recip_l_mo_sea Inverse Obukhov length over sea only !>@param[in] rhostar Surface density + !>@param[in h_blend_orog Orographic blending height !>@param[in] t1_sd_2d StDev of level 1 temperature !>@param[in] q1_sd_2d StDev of level 1 humidity !>@param[in] model_clock Time in the model @@ -74,7 +75,8 @@ contains microphysics_fields, dmr_mphys, orography_fields, & turbulence_fields, convection_fields, & cloud_fields, surface_fields, & - recip_l_mo_sea, rhostar, t1_sd_2d, q1_sd_2d, & + recip_l_mo_sea, & + rhostar, h_blend_orog, t1_sd_2d, q1_sd_2d, & model_clock) use bl_exp_kernel_mod, only: bl_exp_kernel_type @@ -98,6 +100,7 @@ contains type( field_type ), intent( in ) :: recip_l_mo_sea type( field_type ), intent( in ) :: rhostar + type( field_type ), intent( in ) :: h_blend_orog type( field_type ), intent( in ) :: t1_sd_2d type( field_type ), intent( in ) :: q1_sd_2d @@ -377,7 +380,7 @@ contains cumulus, tile_fraction, sd_orog, & peak_to_trough_orog, silhouette_area_orog, & tile_temperature, rhostar, recip_l_mo_sea, & - t1_sd_2d, q1_sd_2d, & + h_blend_orog, t1_sd_2d, q1_sd_2d, & dtl_mphys, dmt_mphys, sw_heating_rate, & lw_heating_rate, cf_bulk, cf_liquid, & rh_crit, tnuc, tnuc_nlcl, & diff --git a/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 index 48d245b30..0fd4a7582 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/glomap_aerosol_alg_mod.x90 @@ -70,6 +70,7 @@ contains type( field_type ), pointer :: cf_bulk => null() type( field_type ), pointer :: cf_liquid => null() + type( field_type ), pointer :: rh_crit => null() ! Temporary unpacked fields from collection aerosol_fields type( field_type ), pointer :: n_nuc_sol => null() @@ -138,8 +139,9 @@ contains type( field_type ), pointer :: cf_bulk_aero => null() type( field_type ), pointer :: cf_liquid_aero => null() + type( field_type ), pointer :: rh_crit_aero => null() type( field_type ), pointer :: cloud_drop_no_conc_aero => null() - type( field_type ), target :: cf_bulk_coarse, cf_liquid_coarse, cloud_drop_no_conc_coarse + type( field_type ), target :: cf_bulk_coarse, cf_liquid_coarse, rh_crit_coarse, cloud_drop_no_conc_coarse type( field_type ) :: mr_ice integer(tik) :: id_alg, id_diags @@ -208,23 +210,28 @@ contains ! Unpack fields from cloud_fields call cloud_fields%get_field('bulk_fraction', cf_bulk) call cloud_fields%get_field('liquid_fraction', cf_liquid) + call cloud_fields%get_field('rh_crit', rh_crit) call aerosol_fields%get_field('cloud_drop_no_conc', cloud_drop_no_conc) ! Initialise coarse aerosol fields aerosol_mesh => exner_in_wth%get_mesh() wth_aero => function_space_collection%get_fs( aerosol_mesh, 0, 0, WTHETA ) call cf_bulk_coarse%initialise(vector_space = wth_aero) call cf_liquid_coarse%initialise(vector_space = wth_aero) + call rh_crit_coarse%initialise(vector_space = wth_aero) call cloud_drop_no_conc_coarse%initialise(vector_space = wth_aero) call map_scalar_intermesh(cf_bulk_coarse, cf_bulk) call map_scalar_intermesh(cf_liquid_coarse, cf_liquid) + call map_scalar_intermesh(rh_crit_coarse, rh_crit) call map_scalar_intermesh(cloud_drop_no_conc_coarse, cloud_drop_no_conc) cf_bulk_aero => cf_bulk_coarse cf_liquid_aero => cf_liquid_coarse + rh_crit_aero => rh_crit_coarse cloud_drop_no_conc_aero => cloud_drop_no_conc_coarse else ! Unpack fields from cloud_fields call cloud_fields%get_field('bulk_fraction', cf_bulk_aero) call cloud_fields%get_field('liquid_fraction', cf_liquid_aero) + call cloud_fields%get_field('rh_crit', rh_crit_aero) call aerosol_fields%get_field('cloud_drop_no_conc', cloud_drop_no_conc_aero) end if @@ -250,6 +257,7 @@ contains exner_in_wth, & cf_bulk_aero, & cf_liquid_aero, & + rh_crit_aero, & mr_n(imr_v), & mr_ice, & n_nuc_sol, & diff --git a/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 index f9e8d6f3c..6e2b68315 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/skeb_main_alg_mod.x90 @@ -296,10 +296,6 @@ module skeb_main_alg_mod ! Iterators in for loops integer(i_def) :: m, n, n_row, stencil_extent - ! SKEB calculations are performed at cell centres (W3 points). To index the - ! "eta_theta_levels" array correctly at these points, set offset to 1 - integer(kind=i_def), parameter :: lev_offset = 1 - ! Timing handle integer(tik) :: id_skeb, id_diags @@ -385,10 +381,10 @@ module skeb_main_alg_mod end if !!!!!! 1.b call stph_fp_main to create forcing pattern for SKEB - call stph_fp_main_alg(skeb_level_bottom-1_i_def, skeb_level_top-1_i_def, & - lev_offset, stph_n_min, stph_n_max, stph_spectral_dim, & - skeb_alpha, skeb_power_law, & - skeb_spectral_coeffc, skeb_spectral_coeffs, & + call stph_fp_main_alg(skeb_level_bottom-1_i_def, skeb_level_top-1_i_def, & + stph_n_min, stph_n_max, stph_spectral_dim, & + skeb_alpha, skeb_power_law, & + skeb_spectral_coeffc, skeb_spectral_coeffs, & fp_skeb) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 index abacd9da7..1a28bec41 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/spt_main_alg_mod.x90 @@ -229,10 +229,6 @@ module spt_main_alg_mod ! iterators in for loops integer(i_def) :: n,n_row, m - ! SPT calculations are performed at theta-levels (Wtheta points). To index the - ! "eta_theta_levels" array correctly at these points, set offset to 0 - integer(kind=i_def), parameter :: lev_offset = 0 - ! Timestepping_config_mod scalar (for PSyclone to know data type) real(kind=r_second) :: timestepping_config_mod_dt @@ -302,10 +298,10 @@ module spt_main_alg_mod call invoke( setval_c(fp_spt, 0.0_r_def)) ! Create forcing pattern for SPT - call stph_fp_main_alg(spt_level_bottom, spt_level_top, lev_offset, & - 1, stph_n_max, stph_spectral_dim, & - spt_alpha, spt_power_law, & - spt_spectral_coeffc, spt_spectral_coeffs, & + call stph_fp_main_alg(spt_level_bottom, spt_level_top, & + 1, stph_n_max, stph_spectral_dim, & + spt_alpha, spt_power_law, & + spt_spectral_coeffc, spt_spectral_coeffs, & fp_spt) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 b/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 index a6abf14be..dc82fade1 100644 --- a/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 +++ b/interfaces/physics_schemes_interface/source/algorithm/stph_fp_main_alg_mod.x90 @@ -46,12 +46,6 @@ module stph_fp_main_alg_mod !>@param[in] level_bottom Bottom level of the stochastic scheme !>@param[in] level_top Top level of the stochastic scheme - !>@param[in] level_offset Level offset. This routine can be - !! applied at W3 and Wtheta points, - !! but both implementations index - !! from the same "eta_theta_levels" - !! array, so need an offset to index - !! correctly. Set 0 Wtheta, 1 for W3 !>@param[in] wavenumber_min Minimum wavenumber applied to build the FP !>@param[in] wavenumber_max Maximum wavenumber applied to build the FP !>@param[in] spectral_dim Dimension of spectral coeffients arrays @@ -61,10 +55,10 @@ module stph_fp_main_alg_mod !>@param[in,out] spectral_coeffs Imaginary Spectral coefficients !>@param[i,out] fp Forcing pattern - subroutine stph_fp_main_alg(level_bottom, level_top, level_offset, & - wavenumber_min, wavenumber_max, & - spectral_dim, alpha, power_law, & - spectral_coeffc, spectral_coeffs, & + subroutine stph_fp_main_alg(level_bottom, level_top, & + wavenumber_min, wavenumber_max, & + spectral_dim, alpha, power_law, & + spectral_coeffc, spectral_coeffs, & fp) ! TO DO after PSyclone ticket 1312 @@ -84,8 +78,8 @@ module stph_fp_main_alg_mod !!!! Arguments ! Scalars with scheme levels, wavenumbers and spectral dimensions - integer(kind=i_def), intent(in) :: level_bottom, level_top, level_offset, & - wavenumber_min, wavenumber_max, & + integer(kind=i_def), intent(in) :: level_bottom, level_top, & + wavenumber_min, wavenumber_max, & spectral_dim ! spectral coefficients power law and decorrelation @@ -159,13 +153,12 @@ module stph_fp_main_alg_mod my_phi_stph = ATAN2(spectral_coeffs(n_row+m), & spectral_coeffc(n_row+m)) ! Max shift ranges from 0 <-> pi for wavenos 1 <-> wavenumber_max - my_phishft_stph = (wavenumber_max - max(n,m)) * pi & - / (wavenumber_max - wavenumber_min) + my_phishft_stph = (wavenumber_max - max(n,m)) * pi / (wavenumber_max-1) do k = level_bottom, level_top ! Apply vertical scaling Level 1 = no change -> 12km Level = max change (=pi) - kr = (domain_height*eta_theta_levels(k + level_offset))/12.0e3_r_def + kr = (domain_height*eta_theta_levels(k))/12.0e3_r_def ! Create coeff with phase shift coeffc_phase(k, n_row+m) = my_coeff_rad * cos(my_phi_stph + & diff --git a/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 index c63bc632f..f5ab6605d 100644 --- a/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90 @@ -40,7 +40,7 @@ module bl_exp_kernel_mod !> type, public, extends(kernel_type) :: bl_exp_kernel_type private - type(arg_type) :: meta_args(93) = (/ & + type(arg_type) :: meta_args(94) = (/ & arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! theta_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, W3), &! rho_in_w3 arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! rho_in_wth @@ -72,6 +72,7 @@ module bl_exp_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2),&! tile_temperature arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! rhostar arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! recip_l_mo_sea + arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! h_blend_orog arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! t1_sd arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1),&! q1_sd arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), &! dtl_mphys @@ -180,6 +181,7 @@ module bl_exp_kernel_mod !> @param[in] tile_temperature Surface tile temperatures !> @param[in] rhostar_2d Surface density !> @param[in] recip_l_mo_sea_2d Inverse Obukhov length over sea only + !> @param[in] h_blend_orog_2d Orographic blending height !> @param[in] t1_sd_2d StDev of level 1 temperature !> @param[in] q1_sd_2d StDev of level 1 humidity !> @param[in] dtl_mphys Microphysics liq temperature increment @@ -295,6 +297,7 @@ subroutine bl_exp_code(nlayers, seg_len, & tile_temperature, & rhostar_2d, & recip_l_mo_sea_2d, & + h_blend_orog_2d, & t1_sd_2d, & q1_sd_2d, & dtl_mphys, & @@ -476,7 +479,8 @@ subroutine bl_exp_code(nlayers, seg_len, & cumulus_2d, & shallow_flag, & level_parcel_top - real(kind=r_def), dimension(undf_2d), intent(in) :: recip_l_mo_sea_2d, & + real(kind=r_def), dimension(undf_2d), intent(in) :: h_blend_orog_2d, & + recip_l_mo_sea_2d, & rhostar_2d, & t1_sd_2d, q1_sd_2d, & sea_u_current, & @@ -545,7 +549,7 @@ subroutine bl_exp_code(nlayers, seg_len, & zh, dzh, wstar, wthvs, u_0_p, v_0_p, zlcl_uv, qsat_lcl, delthvu, & bl_type_1, bl_type_2, bl_type_3, bl_type_4, bl_type_5, bl_type_6, & bl_type_7, uw0, vw0, zhnl, rhostar, & - recip_l_mo_sea, flandg, t1_sd, q1_sd, qcl_inv_top, & + h_blend_orog, recip_l_mo_sea, flandg, t1_sd, q1_sd, qcl_inv_top, & fb_surf, rib_gb, z0m_eff_gb, zhsc, ustargbm, cos_theta_latitude, & max_diff, delta_smag, tnuc_nlcl_um real(r_um), dimension(seg_len,1) :: surf_dep_flux, zeroes @@ -648,6 +652,7 @@ subroutine bl_exp_code(nlayers, seg_len, & ustargbm(i,1) = ustar(map_2d(1,i)) rhostar(i,1) = rhostar_2d(map_2d(1,i)) recip_l_mo_sea(i,1) = recip_l_mo_sea_2d(map_2d(1,i)) + h_blend_orog(i,1) = h_blend_orog_2d(map_2d(1,i)) rib_gb(i,1) = gradrinr(map_wth(1,i)) z0m_eff_gb(i,1) = z0m_eff(map_2d(1,i)) ftl(i,1,1) = heat_flux_bl(map_w3(1,i)) @@ -890,8 +895,8 @@ subroutine bl_exp_code(nlayers, seg_len, & ! IN cloud/moisture data : bulk_cloud_fraction,q,qcf,qcl,temperature,qw,tl, & ! IN everything not covered so far : - rad_hr,micro_tends,fb_surf,ustargbm,p_star,tstar, & - zh_prev, zhpar,zlcl,ho2r2_orog_gb,sd_orog,wtrac_as, & + rad_hr,micro_tends,fb_surf,ustargbm,p_star,tstar,h_blend_orog, & + zh_prev, zhpar,zlcl,ho2r2_orog_gb,sd_orog,wtrac_as, & ! 2 IN 3 INOUT for Smagorinsky delta_smag, max_diff, rneutml_sq, visc_m, visc_h, & ! SCM Diagnostics (dummy values in full UM) & stash diag diff --git a/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 index 350a8ec8e..65a42e3a9 100644 --- a/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/glomap_aerosol_kernel_mod.F90 @@ -35,12 +35,13 @@ module glomap_aerosol_kernel_mod type, public, extends(kernel_type) :: glomap_aerosol_kernel_type private - type(arg_type) :: meta_args(65) = (/ & + type(arg_type) :: meta_args(66) = (/ & arg_type(GH_SCALAR, GH_LOGICAL, GH_READ), & ! rad_this_tstep arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! theta_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! exner_in_wth arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! cf_bulk arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! cf_liquid + arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! rh_crit arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! m_v arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! m_cf arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! n_nuc_sol @@ -119,6 +120,7 @@ module glomap_aerosol_kernel_mod !! in potential temperature space !> @param[in] cf_bulk Bulk cloud fraction !> @param[in] cf_liquid Liquid cloud fraction +!> @param[in] rh_crit Critical rel humidity !> @param[in] m_v aka q !> @param[in] m_cf aka qcf !> @param[in] n_nuc_sol Climatology aerosol field @@ -193,6 +195,7 @@ subroutine glomap_aerosol_code( nlayers, & exner_in_wth, & cf_bulk, & cf_liquid, & + rh_crit, & m_v, & m_cf, & n_nuc_sol, & @@ -263,8 +266,6 @@ subroutine glomap_aerosol_code( nlayers, & ! UM modules !--------------------------------------- - use cloud_inputs_mod, only: rhcrit - use glomap_clim_interface_mod, only: glomap_clim_interface use planet_constants_mod, only: p_zero, kappa @@ -294,6 +295,7 @@ subroutine glomap_aerosol_code( nlayers, & real(kind=r_def), intent(in), dimension(undf_wth) :: exner_in_wth real(kind=r_def), intent(in), dimension(undf_wth) :: cf_bulk real(kind=r_def), intent(in), dimension(undf_wth) :: cf_liquid + real(kind=r_def), intent(in), dimension(undf_wth) :: rh_crit real(kind=r_def), intent(in), dimension(undf_wth) :: m_v real(kind=r_def), intent(in), dimension(undf_wth) :: m_cf real(kind=r_def), intent(in), dimension(undf_wth) :: n_nuc_sol @@ -485,7 +487,7 @@ subroutine glomap_aerosol_code( nlayers, & qcf_um(k) = m_cf(map_wth(1) + k) cloud_blk_frac_um(k) = cf_bulk(map_wth(1) + k) cloud_liq_frac_um(k) = cf_liquid(map_wth(1) + k) - rh_crit_um(k) = rhcrit(k) + rh_crit_um(k) = rh_crit(map_wth(1) + k) end do !----------------------------------------------------------------------- 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..71e723b3a 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 @@ -338,7 +338,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &soil_moist_avail, snow_unload_rate, albedo_obs_scaling, soil_clay, soil_sand, dust_mrel, dust_flux, day_of_year, second_of_day, & flux_e, flux_h, urbwrr, urbhwr, urbhgt, urbztm, urbdisp, & &rhostar, recip_l_mo_sea, & -&t1_sd_2d, q1_sd_2d, gross_prim_prod, z0h_eff, ocn_cpl_point, stencil_depth) +&h_blend_orog, t1_sd_2d, q1_sd_2d, gross_prim_prod, z0h_eff, ocn_cpl_point, stencil_depth) USE jules_exp_kernel_mod, ONLY: jules_exp_code USE mesh_mod, ONLY: mesh_type USE stencil_dofmap_mod, ONLY: STENCIL_REGION @@ -358,7 +358,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &chr1p5m_tile, resfs_tile, gc_tile, canhc_tile, tile_water_extract, z0m_eff, ustar, soil_moist_avail, snow_unload_rate, & &albedo_obs_scaling, soil_clay, soil_sand, dust_mrel, dust_flux, & urbwrr, urbhwr, urbhgt, urbztm, urbdisp, & -rhostar, recip_l_mo_sea, t1_sd_2d, q1_sd_2d, & +rhostar, recip_l_mo_sea, h_blend_orog, t1_sd_2d, q1_sd_2d, & &gross_prim_prod, z0h_eff 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 @@ -385,7 +385,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth &tile_water_extract_proxy, z0m_eff_proxy, ustar_proxy, soil_moist_avail_proxy, snow_unload_rate_proxy, albedo_obs_scaling_proxy, & &soil_clay_proxy, soil_sand_proxy, dust_mrel_proxy, dust_flux_proxy, & urbwrr_proxy, urbhwr_proxy, urbhgt_proxy, urbztm_proxy, urbdisp_proxy, & -rhostar_proxy, recip_l_mo_sea_proxy, & +rhostar_proxy, recip_l_mo_sea_proxy, h_blend_orog_proxy, & &t1_sd_2d_proxy, q1_sd_2d_proxy, gross_prim_prod_proxy, z0h_eff_proxy INTEGER(KIND=i_def), pointer :: map_adspc10_dust_mrel(:,:) => null(), map_adspc1_zh(:,:) => null(), & &map_adspc2_tile_fraction(:,:) => null(), map_adspc3_leaf_area_index(:,:) => null(), & @@ -515,6 +515,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth urbdisp_proxy = urbdisp%get_proxy() rhostar_proxy = rhostar%get_proxy() recip_l_mo_sea_proxy = recip_l_mo_sea%get_proxy() + h_blend_orog_proxy = h_blend_orog%get_proxy() t1_sd_2d_proxy = t1_sd_2d%get_proxy() q1_sd_2d_proxy = q1_sd_2d%get_proxy() gross_prim_prod_proxy = gross_prim_prod%get_proxy() @@ -672,7 +673,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth urbwrr_proxy%data, urbhwr_proxy%data, urbhgt_proxy%data, urbztm_proxy%data, & urbdisp_proxy%data, & rhostar_proxy%data, recip_l_mo_sea_proxy%data, & -&t1_sd_2d_proxy%data, q1_sd_2d_proxy%data, gross_prim_prod_proxy%data, & +&h_blend_orog_proxy%data, t1_sd_2d_proxy%data, q1_sd_2d_proxy%data, gross_prim_prod_proxy%data, & z0h_eff_proxy%data, ocn_cpl_point_proxy%data, ndf_wtheta, & &undf_wtheta, map_wtheta, ndf_w3, undf_w3, map_w3, ndf_adspc1_zh, undf_adspc1_zh, map_adspc1_zh, & &ndf_adspc2_tile_fraction, undf_adspc2_tile_fraction, map_adspc2_tile_fraction, ndf_adspc3_leaf_area_index, & @@ -722,6 +723,7 @@ SUBROUTINE invoke_jules_exp_kernel_type(ncells, ncells_halo, theta, exner_in_wth CALL dust_flux_proxy%set_dirty() CALL rhostar_proxy%set_dirty() CALL recip_l_mo_sea_proxy%set_dirty() + CALL h_blend_orog_proxy%set_dirty() CALL t1_sd_2d_proxy%set_dirty() CALL q1_sd_2d_proxy%set_dirty() CALL gross_prim_prod_proxy%set_dirty() 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 b1ca9c1fe..191a42bce 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 @@ -338,8 +338,9 @@ subroutine um_physics_init() lem_adjust, interactive_fluxes, specified_fluxes_only, & except_disc_inv, ntml_level_corrn, free_trop_layers, sharpest, & lem_stability, sg_shear_enh_lambda, l_new_kcloudtop, buoy_integ, & - l_reset_dec_thres, DynDiag_ZL_CuOnly, i_interp_local, & - i_interp_local_gradients, l_noice_in_turb, l_use_var_fixes, & + l_reset_dec_thres, DynDiag_ZL_CuOnly, var_diags_opt, & + i_interp_local, i_interp_local_gradients, & + split_tke_and_inv, l_noice_in_turb, l_use_var_fixes, & i_interp_local_cf_dbdz, tke_diag_fac, a_ent_2, dec_thres_cloud, & dec_thres_cu, near_neut_z_on_l, blend_gridindep_fa, & specified_fluxes_tstar, buoy_integ_low, num_sweeps_bflux, & @@ -765,9 +766,10 @@ subroutine um_physics_init() sg_orog_mixing = sg_shear_enh_lambda end select - ! Switch for corrections to variance diagnostics - l_use_var_fixes = .true. + ! Switch for alternative TKE and variance diagnostics + var_diags_opt = split_tke_and_inv tke_diag_fac = 1.0_r_bl + l_use_var_fixes = .true. zhloc_depth_fac = real(zhloc_depth_fac_in, r_bl) if (topography == topography_horizon) then diff --git a/interfaces/socrates_interface/build/import.mk b/interfaces/socrates_interface/build/import.mk index a12f78739..35e5a09b3 100644 --- a/interfaces/socrates_interface/build/import.mk +++ b/interfaces/socrates_interface/build/import.mk @@ -8,7 +8,8 @@ export PROJECT_SOURCE = $(APPS_ROOT_DIR)/interfaces/socrates_interface/source .PHONY: import-socrates_interface import-socrates_interface: # Get a copy of the source code from the SCORATES repository - python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.yaml + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.yaml + $Qrsync -acvz $(SCRATCH_DIR)/socrates $(WORKING_DIR)/ # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf b/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf index 4385576ff..43f642ccb 100644 --- a/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/HEAD/rose-meta.conf @@ -15,23 +15,14 @@ description=Run COSP if diagnostics are requested !kind=default ns=namelist/Science/SOCRATES COSP sort-key=Panel-A01 -trigger=namelist:cosp=n_cosp_step: .true. ; - =namelist:cosp=n_subcol_gen: .true. ; +trigger=namelist:cosp=n_subcol_gen: .true. ; type=logical -[namelist:cosp=n_cosp_step] -compulsory=true -description=Number of model timesteps per COSP diagnostic sampling -help=COSP will use a sunlit mask based on the length of the COSP timestep. -!kind=default -sort-key=Panel-A02 -type=integer - [namelist:cosp=n_subcol_gen] compulsory=true description=Number of sub-columns for the cloud generator !kind=default -sort-key=Panel-A03 +sort-key=Panel-A02 type=integer #============================================================================== diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py index ce7195ecd..152c043d0 100644 --- a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py @@ -1,4 +1,3 @@ -import re import sys from metomi.rose.upgrade import MacroUpgrade @@ -21,24 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports diff --git a/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 b/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 index adf6728a3..3db633e3d 100644 --- a/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 +++ b/interfaces/socrates_interface/source/algorithm/cosp_alg_mod.x90 @@ -93,7 +93,7 @@ subroutine cosp_alg(pressure_in_wth, temperature_in_wth, exner, mr, & ! Unpacked fields from collections type( field_type ), pointer :: rho_in_wth => null() - type( field_type ), pointer :: lit_fraction_cosp => null() + type( field_type ), pointer :: lit_fraction => null() type( field_type ), pointer :: liquid_fraction => null() type( field_type ), pointer :: frozen_fraction => null() type( field_type ), pointer :: sigma_ml @@ -130,7 +130,7 @@ subroutine cosp_alg(pressure_in_wth, temperature_in_wth, exner, mr, & ! Unpack fields from collections call derived_fields%get_field('rho_in_wth', rho_in_wth) - call radiation_fields%get_field('lit_fraction_cosp', lit_fraction_cosp) + call radiation_fields%get_field('lit_fraction', lit_fraction) call cloud_fields%get_field('liquid_fraction', liquid_fraction) call cloud_fields%get_field('frozen_fraction', frozen_fraction) @@ -203,7 +203,7 @@ subroutine cosp_alg(pressure_in_wth, temperature_in_wth, exner, mr, & conv_liquid_mmr, conv_frozen_mmr, conv_frozen_number, & sigma_ml, sigma_mi, cloud_drop_no_conc, & ls_rain_3d, conv_rain_3d, conv_snow_3d, & - lit_fraction_cosp, rand_seed, n_cloud_layer, & + lit_fraction, rand_seed, n_cloud_layer, & n_subcol_gen, & cosp_x1r, cosp_x2r, cosp_x1g, cosp_x2g, cosp_x4g, & sunlit_mask, & diff --git a/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 b/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 index 69c02b4d1..8d46cb533 100644 --- a/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 +++ b/interfaces/socrates_interface/source/algorithm/illuminate_alg_mod.x90 @@ -51,7 +51,6 @@ subroutine illuminate_alg(radiation_fields, timestep, dt) type( field_type ), pointer :: lit_fraction => null() type( field_type ), pointer :: cos_zenith_angle_rts => null() type( field_type ), pointer :: lit_fraction_rts => null() - type( field_type ), pointer :: lit_fraction_cosp => null() type( field_type ), pointer :: stellar_irradiance_rts => null() type( field_type ), pointer :: sin_stellar_declination_rts => null() type( field_type ), pointer :: stellar_eqn_of_time_rts => null() @@ -76,7 +75,6 @@ subroutine illuminate_alg(radiation_fields, timestep, dt) call radiation_fields%get_field('lit_fraction',lit_fraction) call radiation_fields%get_field('cos_zenith_angle_rts',cos_zenith_angle_rts) call radiation_fields%get_field('lit_fraction_rts',lit_fraction_rts) - call radiation_fields%get_field('lit_fraction_cosp',lit_fraction_cosp) call radiation_fields%get_field('stellar_irradiance_rts', & stellar_irradiance_rts) call radiation_fields%get_field('sin_stellar_declination_rts', & @@ -99,7 +97,6 @@ subroutine illuminate_alg(radiation_fields, timestep, dt) call invoke( illuminate_kernel_type( & cos_zenith_angle, lit_fraction, & cos_zenith_angle_rts, lit_fraction_rts, & - lit_fraction_cosp, & stellar_irradiance_rts, & sin_stellar_declination_rts, & stellar_eqn_of_time_rts, & diff --git a/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 b/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 index 0ac2f4566..e4f1a23a4 100644 --- a/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 +++ b/interfaces/socrates_interface/source/kernel/illuminate_kernel_mod.F90 @@ -29,12 +29,11 @@ module illuminate_kernel_mod ! Contains the metadata needed by the PSy layer. type, public, extends(kernel_type) :: illuminate_kernel_type private - type(arg_type) :: meta_args(20) = (/ & + type(arg_type) :: meta_args(19) = (/ & arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cos_zenith_angle arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! lit_fraction arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cos_zenith_angle_rts arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! lit_fraction_rts - arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! lit_fraction_cosp arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! stellar_irradiance_rts arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! sin_stellar_declination_rts arg_type(GH_FIELD, GH_REAL, GH_READWRITE, ANY_DISCONTINUOUS_SPACE_1), & ! stellar_eqn_of_time_rts @@ -67,8 +66,7 @@ module illuminate_kernel_mod !> @param[in,out] cos_zenith_angle Cosine of the stellar zenith angle !> @param[in,out] lit_fraction Lit fraction of the timestep !> @param[in,out] cos_zenith_angle_rts Cosine of the stellar zenith angle -!> @param[in,out] lit_fraction_rts Lit fraction of the radiation timestep -!> @param[in,out] lit_fraction_cosp Lit fraction of the COSP timestep +!> @param[in,out] lit_fraction_rts Lit fraction of the timestep !> @param[in,out] stellar_irradiance_rts Stellar irradiance at the planet !> @param[in,out] sin_stellar_declination_rts Stellar declination !> @param[in,out] stellar_eqn_of_time_rts Stellar equation of time @@ -98,7 +96,6 @@ subroutine illuminate_code(nlayers, & lit_fraction, & cos_zenith_angle_rts, & lit_fraction_rts, & - lit_fraction_cosp, & stellar_irradiance_rts, & sin_stellar_declination_rts, & stellar_eqn_of_time_rts, & @@ -116,7 +113,6 @@ subroutine illuminate_code(nlayers, & use radiation_config_mod, only: n_radstep, n_horiz_ang, n_horiz_layer, & topography, & topography_slope, topography_horizon - use cosp_config_mod, only: l_cosp, n_cosp_step use star_config_mod, only: stellar_constant use orbit_config_mod, only: & elements, elements_user, elements_earth_fixed, & @@ -145,10 +141,9 @@ subroutine illuminate_code(nlayers, & integer(i_def), intent(in) :: map_h_asp(ndf_h_asp) real(r_def), dimension(undf_2d), intent(inout):: & - cos_zenith_angle, lit_fraction, & - cos_zenith_angle_rts, lit_fraction_rts, & - lit_fraction_cosp, & - stellar_irradiance_rts, & + cos_zenith_angle, lit_fraction + real(r_def), dimension(undf_2d), intent(inout):: & + cos_zenith_angle_rts, lit_fraction_rts, stellar_irradiance_rts, & sin_stellar_declination_rts, stellar_eqn_of_time_rts, & orographic_correction_rts real(r_def), dimension(undf_2d), intent(in) :: slope_angle, slope_aspect @@ -163,7 +158,7 @@ subroutine illuminate_code(nlayers, & integer :: h_ang_1, h_ang_last integer :: h_asp_1, h_asp_last logical :: l_slope, l_shading - real(r_def), dimension(undf_2d) :: cos_zenith_angle_cosp + ! Set orbital elements select case (elements) @@ -287,34 +282,6 @@ subroutine illuminate_code(nlayers, & lit_fraction = lit_fraction(map_2d(1):map_2d(1)) ) end if - if (l_cosp) then - if (n_cosp_step == 1) then - lit_fraction_cosp(map_2d(1):map_2d(1)) & - = lit_fraction(map_2d(1):map_2d(1)) - else if (n_cosp_step == n_radstep) then - lit_fraction_cosp(map_2d(1):map_2d(1)) & - = lit_fraction_rts(map_2d(1):map_2d(1)) - else if (mod(timestep-1_i_def, n_cosp_step) == 0) then - ! Calculate parameters for external illumination of the atmosphere - ! over the COSP timestep - call illuminate( & - l_stellar_angle = .true., & - n_profile = n_profile, & - i_spin = i_spin, & - second_of_day = second_of_day, & - length_of_timestep = dt*real(n_cosp_step, r_def), & - hour_angle_inc = hour_angle_inc, & - fixed_zenith_angle = fixed_zenith_angle, & - fixed_azimuth_angle = fixed_azimuth_angle, & - latitude = latitude(map_2d(1):map_2d(1)), & - longitude = longitude(map_2d(1):map_2d(1)), & - sin_stellar_declination = sin_stellar_declination_rts(map_2d(1)), & - stellar_eqn_of_time = stellar_eqn_of_time_rts(map_2d(1)), & - cos_zenith_angle = cos_zenith_angle_cosp(map_2d(1):map_2d(1)), & - lit_fraction = lit_fraction_cosp(map_2d(1):map_2d(1)) ) - end if - end if - end subroutine illuminate_code end module illuminate_kernel_mod diff --git a/rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml b/rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml deleted file mode 100644 index 8a2c34e54..000000000 --- a/rose-stem/app/adjoint_tests/file/field_def_diags_ls.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_ancil.xml b/rose-stem/app/adjoint_tests/file/file_def_ancil.xml deleted file mode 100644 index 43c9e9e44..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_ancil.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_check_restart.xml b/rose-stem/app/adjoint_tests/file/file_def_check_restart.xml deleted file mode 100644 index 05ba6dcbc..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_check_restart.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_diags.xml b/rose-stem/app/adjoint_tests/file/file_def_diags.xml deleted file mode 100644 index c12613f00..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_diags.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml b/rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml deleted file mode 100644 index 0cdd03798..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_diags_ls.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_initial.xml b/rose-stem/app/adjoint_tests/file/file_def_initial.xml deleted file mode 100644 index 05a68968e..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_initial.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_ls.xml b/rose-stem/app/adjoint_tests/file/file_def_ls.xml deleted file mode 100644 index a2766a236..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_ls.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/file_def_read.xml b/rose-stem/app/adjoint_tests/file/file_def_read.xml deleted file mode 100644 index 61cc7f81e..000000000 --- a/rose-stem/app/adjoint_tests/file/file_def_read.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/adjoint_tests/file/iodef.xml b/rose-stem/app/adjoint_tests/file/iodef.xml index fb000671f..11c6939fa 100644 --- a/rose-stem/app/adjoint_tests/file/iodef.xml +++ b/rose-stem/app/adjoint_tests/file/iodef.xml @@ -5,59 +5,322 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + processed__tot_col_uv_kinetic_energy + processed__tot_col_w_kinetic_energy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf index 864c6a623..4b375741d 100644 --- a/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/linear_model/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' -ls_filename='final_ls_with_land' +ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' +ls_filename='final_ls' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf b/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf index dddbeae1e..6ff994e7f 100644 --- a/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf +++ b/rose-stem/app/adjoint_tests/opt/rose-app-varying_ls.conf @@ -1,3 +1,2 @@ [namelist:linear] fixed_ls=.false. -transport_efficiency=.false. diff --git a/rose-stem/app/adjoint_tests/rose-app.conf b/rose-stem/app/adjoint_tests/rose-app.conf index 4dafac183..eb44451ad 100644 --- a/rose-stem/app/adjoint_tests/rose-app.conf +++ b/rose-stem/app/adjoint_tests/rose-app.conf @@ -1,7 +1,7 @@ -meta=lfric-adjoint_tests/vn3.0_t108 +meta=lfric-adjoint_tests/vn3.0_t146 [command] -default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe +default=$LAUNCH_SCRIPT/launch-exe [env] ENSEMBLE_MEMBER=0 @@ -62,7 +62,6 @@ source=(namelist:aerosol) = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -273,7 +272,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -379,7 +377,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -745,23 +743,11 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.false. +l_stabilise_bl=.true. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -942,17 +928,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -962,7 +948,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1376,7 +1362,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. @@ -1415,11 +1400,11 @@ panel_edge_treatment='none' profile_size=5 reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' -scheme=5*3 +scheme=5*1 si_outer_transport='none' slice_order='parabola' special_edges_monotone=5*1 -splitting=5*2 +splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' diff --git a/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py b/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py index f74ab7beb..ec28ce2e0 100755 --- a/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py +++ b/rose-stem/app/generate_weights/bin/generate_weights_lfric2lfric.py @@ -145,8 +145,8 @@ def run_exe(arg, outfile, style): DST_GRID = GRID() DST_GRID = get_env_info(DST_GRID, 'DST') DST_GRID = get_data(DST_GRID) - validate_input(DST_GRID) # end processing destination grid + validate_input(DST_GRID) print('DESTINATION grid ') print('Save SRC -> DST grid info') diff --git a/rose-stem/app/gravity_wave/rose-app.conf b/rose-stem/app/gravity_wave/rose-app.conf index 291204129..c26fef7c1 100644 --- a/rose-stem/app/gravity_wave/rose-app.conf +++ b/rose-stem/app/gravity_wave/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-gravity_wave/vn3.0_t214 +meta=lfric-gravity_wave/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -242,7 +242,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -880,17 +879,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -900,7 +899,7 @@ ls_ppn_segment=0 !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1314,7 +1313,6 @@ tau_u=0.0 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/app/gungho_model/file/file_def_initial.xml b/rose-stem/app/gungho_model/file/file_def_initial.xml index 42cf3bfec..2b1050253 100644 --- a/rose-stem/app/gungho_model/file/file_def_initial.xml +++ b/rose-stem/app/gungho_model/file/file_def_initial.xml @@ -13,8 +13,6 @@ - - diff --git a/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf b/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf index 81be83085..c3789d266 100644 --- a/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf +++ b/rose-stem/app/gungho_model/opt/rose-app-suite_controlled.conf @@ -24,11 +24,6 @@ use_xios_io=${USE_XIOS_IO} [namelist:logging] run_log_level='${LOG_LEVEL}' -[namelist:partitioning] -panel_decomposition='${PANEL_DECOMP}' -panel_xproc=${XPROC} -panel_yproc=${YPROC} - [namelist:time] timestep_end='${RESTART_STOP}' timestep_start='${RESTART_START}' diff --git a/rose-stem/app/gungho_model/rose-app.conf b/rose-stem/app/gungho_model/rose-app.conf index 999ed6092..8e0e78c4b 100644 --- a/rose-stem/app/gungho_model/rose-app.conf +++ b/rose-stem/app/gungho_model/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-gungho_model/vn3.0_t214 +meta=lfric-gungho_model/vn3.0_t146 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ @@ -262,7 +262,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -905,17 +904,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -925,7 +924,7 @@ ls_ppn_segment=0 !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1339,7 +1338,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.true. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/app/jedi_forecast/file/iodef.xml b/rose-stem/app/jedi_forecast/file/iodef.xml index 7a100a000..fb4ab30d6 100644 --- a/rose-stem/app/jedi_forecast/file/iodef.xml +++ b/rose-stem/app/jedi_forecast/file/iodef.xml @@ -66,8 +66,6 @@ - - diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf b/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf index c25ab8db7..c2178fe4b 100644 --- a/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf +++ b/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf @@ -31,7 +31,6 @@ pert_centre=120.0 [namelist:linear] fixed_ls=.false. -transport_efficiency=.false. [namelist:mixed_solver] gcrk=6 diff --git a/rose-stem/app/jedi_forecast/rose-app.conf b/rose-stem/app/jedi_forecast/rose-app.conf index 42c17cee6..b1d6ba36e 100644 --- a/rose-stem/app/jedi_forecast/rose-app.conf +++ b/rose-stem/app/jedi_forecast/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_forecast/vn3.0_t108 +meta=jedi_forecast/vn3.0_t146 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ @@ -62,7 +62,6 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging = namelist:mixed_solver = (namelist:mixing) @@ -268,7 +267,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -602,7 +600,6 @@ io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] @@ -773,18 +770,6 @@ fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. pert_option='analytic' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -957,17 +942,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -977,7 +962,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1391,7 +1376,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf index 5734e167c..0fa8d12d9 100644 --- a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf +++ b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_forecast_pseudo/vn3.0_t108 +meta=jedi_forecast_pseudo/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -60,7 +60,6 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging = namelist:mixed_solver = (namelist:mixing) @@ -266,7 +265,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -598,7 +596,6 @@ io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] @@ -767,18 +764,6 @@ fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. pert_option='analytic' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -951,17 +936,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -971,7 +956,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1385,7 +1370,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml b/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml index 4a65814b5..808f8ef91 100644 --- a/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml +++ b/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml @@ -41,7 +41,6 @@ - @@ -56,7 +55,6 @@ - @@ -146,11 +144,6 @@ - - - - - @@ -241,8 +234,6 @@ - - @@ -289,8 +280,6 @@ - - @@ -432,7 +421,6 @@ - diff --git a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf deleted file mode 100644 index 125a4758d..000000000 --- a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-C12_MG.conf +++ /dev/null @@ -1,8 +0,0 @@ -[file:mesh_C12_MG.nc] -mode=auto -source=$MESH_DIR/mesh_C12_MG.nc - -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='mesh_C12_MG' -!!fplane= diff --git a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-default.conf b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-default.conf new file mode 100644 index 000000000..e69de29bb diff --git a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf deleted file mode 100644 index 379986682..000000000 --- a/rose-stem/app/jedi_id_tlm_tests/opt/rose-app-nwp_gal9_c12.conf +++ /dev/null @@ -1,26 +0,0 @@ -[file:iodef_temp.xml] -mode=auto -source=$ROSE_SUITE_DIR/app/jedi_id_tlm_tests/file/iodef.xml - -[namelist:io] -diagnostic_frequency=8 - -[namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' - -[namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' - -[namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' - -[namelist:jedi_state] -state_time='2018-04-14 21:00:00' - -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' -multigrid_chain_nitems=3 - -[namelist:time] -calendar_origin='2018-04-14 21:00:00' -calendar_start='2018-04-14 21:00:00' diff --git a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf index dc2a904a2..3cebf5804 100644 --- a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_id_tlm_tests/vn3.0_t108 +meta=jedi_id_tlm_tests/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -23,19 +23,13 @@ source=namelist:jedi_lfric_tests = namelist:jedi_linear_model = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings - = (namelist:aerosol) = namelist:base_mesh - = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice - = (namelist:cloud) - = (namelist:chemistry) - = (namelist:convection) - = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = (namelist:energy_correction) + = namelist:energy_correction = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -46,7 +40,6 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) - = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -69,35 +62,30 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging - = (namelist:microphysics) = namelist:mixed_solver - = namelist:mixing + = (namelist:mixing) = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple - = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) + = (namelist:orography_bell_cartesian) + = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet - = (namelist:radiation) = namelist:radiative_gases - = (namelist:spectral_gwd) - = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) - = (namelist:star) = (namelist:stochastic_physics) - = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) + = (namelist:theta_relax) = namelist:time = namelist:timestepping = namelist:transport @@ -118,24 +106,24 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='dust_and_clim' +glomap_mode='off' !!horiz_d=2.25 -!!l_radaer=.true. +!!l_radaer=.false. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='precalc/RADAER_pcalc.ukca' -sulphuric_strat_climatology=.true. +!!prec_file='' +sulphuric_strat_climatology=.false. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 [namelist:base_mesh] !!f_lat_deg=45.0 -file_prefix='mesh' +file_prefix='mesh.nc' !!fplane=.false. geometry='spherical' prepartitioned=.false. @@ -198,7 +186,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='final' +transport_overwrite_freq='split_step' [namelist:checks] limit_cfl=.false. @@ -218,14 +206,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=111 +!!i_ukca_chem_version=0 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling= -!!l_ukca_quasinewton= +!!l_ukca_linox_scaling=.false. +!!l_ukca_quasinewton=.false. !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac= +!!lightnox_scale_fac=0 !!photol_scheme='off' -!!top_bdy_opt='' +!!top_bdy_opt='no_overwrt' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -280,7 +268,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -331,7 +318,7 @@ stretching_method='smooth' !!aerosols_ancil_path='' !!albedo_nir_ancil_path='' !!albedo_vis_ancil_path='' -ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${RESOLUTION}' +ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${ancil_resolution}' checkpoint_stem_name='' !!cloud_drop_no_conc_ancil_path='' !!coarse_ancil_directory='' @@ -392,7 +379,7 @@ diag_stem_name='' !!o3_ancil_path='' !!oh_ancil_path='' orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='' +!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -424,7 +411,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.true. +l_multigrid=.false. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -434,7 +421,7 @@ shallow=.true. si_momentum_equation=.false. theta_moist_source=.false. use_multires_coupling=.false. -use_physics=.true. +use_physics=.false. use_wavedynamics=.true. vector_invariant=.false. @@ -448,16 +435,16 @@ profile_data_v=0.0 times=0.0 [namelist:helmholtz_solver] -!!fail_on_non_converged=.false. -gcrk=8 +fail_on_non_converged=.false. +gcrk=18 !!jacobi_relaxation=0.5 -method='prec_only' -monitor_convergence=.false. +method='bicgstab' +monitor_convergence=.true. normalise=.true. -preconditioner='multigrid' -si_pressure_a_tol=1.0e-8 -si_pressure_maximum_iterations=400 -si_pressure_tolerance=1.0e-4 +preconditioner='tridiagonal' +si_pressure_a_tol=0 +si_pressure_maximum_iterations=40 +si_pressure_tolerance=1.0e-15 [namelist:iau] !!iau_ainc_multifile=.false. @@ -467,7 +454,7 @@ si_pressure_tolerance=1.0e-4 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=1 +!!iau_ts_start=0 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -514,15 +501,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='none' +test='gravity_wave' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.4 -r2=0.4 -x1=0.4 -x2=-0.4 +r1=0.0 +r2=0.0 +x1=0.0 +x2=0.0 y1=0.0 y2=0.0 z1=0.0 @@ -534,22 +521,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=60.0 +pert_centre=120.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0,300.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=300.0 +!!profile_heights=0.0 +!!profile_size=1 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0,0.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=0.0 +!!profile_heights=0.0 +!!profile_size=1 [namelist:initial_wind] nl_constant=0.0 -profile='constant_uv' +profile='none' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -559,8 +546,8 @@ profile='constant_uv' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.true. -u0=2.0 +smp_init_wind=.false. +u0=0.0 v0=0.0 wind_time_period=0.0 @@ -588,7 +575,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=12 +diagnostic_frequency=8 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -604,7 +591,7 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2021-06-02T00:00:00' +io_calender_start='2018-04-14T21:00:00' io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' @@ -612,13 +599,12 @@ io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2021-06-02 00:00:00' +inc_time='2018-04-14 21:00:00' initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] @@ -629,15 +615,15 @@ incremental_wind_interpolation=.true. nl_time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2021-06-02 00:00:00' +initial_time='2018-04-14T21:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2021-06-02 00:00:00' +state_time='2018-04-14 21:00:00' use_pseudo_model=.true. -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', - ='m_cl','m_r','m_s','land_fraction' +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', + ='m_v','m_cl','m_r','m_s' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -671,7 +657,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 +z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -710,8 +696,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.0 -!!z0m_specified=0.0 +!!z0h_specified=0.01 +!!z0m_specified=0.1 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -790,21 +776,7 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -max_bl_stabilisation=0.75 -n_bl_levels_to_stabilise=15 -pert_option='file' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 +pert_option='analytic' [namelist:logging] log_to_rank_zero_only=.true. @@ -832,40 +804,40 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.true. +!!prog_tnuc=.false. !!qcl_rime=1.0e-4 -!!shape_rime=.true. +!!shape_rime=.false. turb_gen_mixph=.true. !!z_surf=50.0 [namelist:mixed_solver] eliminate_variables='discrete' -fail_on_non_converged=.true. -gcrk=4 +fail_on_non_converged=.false. +gcrk=10 guess_np1=.false. !!jacobi_relaxation=0.5 -mixed_solver_a_tol=1.0e-3 +mixed_solver_a_tol=1.0e-21 monitor_convergence=.true. normalise=.true. reference_reset_time=3600.0 -si_maximum_iterations=10 +si_maximum_iterations=7 si_method='block_gcr' si_preconditioner='pressure' -si_tolerance=1.0e-1 +si_tolerance=1.0e-21 split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blend_1dbl_fa' +!!method='blending' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' +[!!namelist:multigrid] +chain_mesh_tags='','','','' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -873,17 +845,9 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='aerosol' +aerosol_mesh_name='dynamics' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. -dynamics_mesh_name='dynamics' -!!lowest_order_aero_flag=.false. -multires_coupling_mesh_tags='dynamics' -multires_coupling_mode='test' -negative_correction='none' -physics_mesh_name='aerosol' -reconstruction='simple' -recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -978,34 +942,34 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.false. +generate_inner_halos=.true. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 -limit_drag_incs=.false. +!!gw_segment=0 +!!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' -sample_physics_scalars=.true. -sample_physics_winds=.true. -sample_physics_winds_correction=.false. +!!sample_physics_scalars=.true. +!!sample_physics_winds=.true. +!!sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1044,12 +1008,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='hybrid' -!!scatter_method_lwinc='approx' +scatter_method_lw='full' +!!scatter_method_lwinc='full' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud9' +!!spectral_file_lwinc='spec/sp_lw_cloud7' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud9' +!!spectral_file_swinc='spec/sp_sw_cloud7' topography='slope' [namelist:radiative_gases] @@ -1063,26 +1027,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='constant' +!!cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='off' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='constant' +!!cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='off' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -ch4_mix_ratio=1.006e-06 -ch4_rad_opt='constant' +!!ch4_mix_ratio=1.006e-06 +ch4_rad_opt='off' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -co2_mix_ratio=6.002e-04 -co2_rad_opt='constant' +!!co2_mix_ratio=6.002e-04 +co2_rad_opt='off' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1154,8 +1118,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -n2o_mix_ratio=4.945e-07 -n2o_rad_opt='constant' +!!n2o_mix_ratio=4.945e-07 +n2o_rad_opt='off' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1172,8 +1136,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -o2_mix_ratio=0.2314 -o2_rad_opt='constant' +!!o2_mix_ratio=0.2314 +o2_rad_opt='off' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1182,7 +1146,7 @@ o2_rad_opt='constant' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='ancil' +o3_rad_opt='off' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1209,10 +1173,10 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -aerosol='none' -boundary_layer='none' -chemistry='none' -cloud='none' +!!aerosol='none' +!!boundary_layer='none' +!!chemistry='none' +!!cloud='none' !!convection='none' dynamics='gungho' !!electric='none' @@ -1220,23 +1184,23 @@ external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -methane_oxidation=.false. +!!methane_oxidation=.false. !!microphysics='none' -orographic_drag='none' -radiation='none' -spectral_gwd='none' -stochastic_physics='none' -surface='none' +!!orographic_drag='none' +!!radiation='none' +!!spectral_gwd='none' +!!stochastic_physics='none' +!!surface='none' [namelist:solver] -!!fail_on_non_converged=.false. +fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 -maximum_iterations=7 +maximum_iterations=50 method='chebyshev' -monitor_convergence=.false. +monitor_convergence=.true. preconditioner='diagonal' -tolerance=1.0e-6 +tolerance=1.0e-18 [namelist:specified_surface] !!function_amplitude_e=200 @@ -1263,10 +1227,10 @@ tolerance=1.0e-6 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.true. -!!cgw_scale_factor=0.86 +add_cgw=.false. +!!cgw_scale_factor=1.0 ussp_heating=.true. -ussp_launch_factor=1.2 +ussp_launch_factor=1.3 wavelstar=4300.0 [!!namelist:star] @@ -1319,9 +1283,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1366,7 +1330,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=60 +stph_n_max=22 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1397,8 +1361,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2021-06-02 00:00:00' -calendar_start='2021-06-02 00:00:00' +calendar_origin='2018-04-14 21:00:00' +calendar_start='2018-04-14 21:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1406,7 +1370,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=1 +inner_iterations=2 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1419,9 +1383,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. -ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' cap_density_predictor=0.5 @@ -1438,15 +1400,14 @@ ffsl_inner_order=0 ffsl_outer_order=1 ffsl_splitting=5*1 ffsl_unity_3d=.false. -ffsl_vertical_order=2,2,1,2,2 -field_names='density','potential_temperature','wind','moisture', - ='con_tracer' +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud' fv_horizontal_order=2 fv_vertical_order=2 horizontal_method=5*1 horizontal_monotone=5*1 -log_space=.true.,.true.,.false.,.false.,.false. -max_vert_cfl_calc='dep_point' +log_space=5*.false. +max_vert_cfl_calc='uniform' min_val_abs_tol=-1.0e-12 min_val_max_iterations=10 min_val_method='iterative' @@ -1456,7 +1417,7 @@ operators='fv' panel_edge_high_order=.true. panel_edge_treatment='none' profile_size=5 -reversible=.true.,.true.,.false.,.true.,.true. +reversible=5*.false. runge_kutta_method='ssp3' scheme=5*1 si_outer_transport='none' @@ -1466,11 +1427,10 @@ splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' -transport_ageofair=.false. use_density_predictor=.false. vertical_method=5*1 vertical_monotone=5*1 -vertical_monotone_order=5*3 +vertical_monotone_order=5*1 vertical_sl_order='cubic' wind_mono_top=.false. !!wind_mono_top_depth=5 diff --git a/rose-stem/app/jedi_lfric_tests/file/iodef.xml b/rose-stem/app/jedi_lfric_tests/file/iodef.xml index dfb5b1345..be8ae0240 100644 --- a/rose-stem/app/jedi_lfric_tests/file/iodef.xml +++ b/rose-stem/app/jedi_lfric_tests/file/iodef.xml @@ -50,11 +50,6 @@ - - - - - @@ -145,8 +140,6 @@ - - @@ -193,8 +186,6 @@ - - @@ -311,7 +302,7 @@ - + @@ -336,7 +327,6 @@ - diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf deleted file mode 100644 index 125a4758d..000000000 --- a/rose-stem/app/jedi_lfric_tests/opt/rose-app-C12_MG.conf +++ /dev/null @@ -1,8 +0,0 @@ -[file:mesh_C12_MG.nc] -mode=auto -source=$MESH_DIR/mesh_C12_MG.nc - -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='mesh_C12_MG' -!!fplane= diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf new file mode 100644 index 000000000..90d207a80 --- /dev/null +++ b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9.conf @@ -0,0 +1,3 @@ +[file:iodef_temp.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_lfric_tests/file/iodef.xml diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf deleted file mode 100644 index 0e183de1c..000000000 --- a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf +++ /dev/null @@ -1,20 +0,0 @@ -[file:iodef_temp.xml] -mode=auto -source=$ROSE_SUITE_DIR/app/jedi_lfric_tests/file/iodef.xml - -[namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' -ls_filename='final_ls_with_land' -start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -start_dump_filename='final_pert' - -[namelist:io] -diagnostic_frequency=8 - -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' -multigrid_chain_nitems=3 - -[namelist:time] -calendar_origin='2016-01-01 15:00:00' -calendar_start='2016-01-01 15:00:00' diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf index 645167002..6c3a2714d 100644 --- a/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf +++ b/rose-stem/app/jedi_lfric_tests/opt/rose-app-runge-kutta.conf @@ -20,6 +20,7 @@ start_dump_directory='' start_dump_filename='' [namelist:finite_element] +coord_system='xyz' vorticity_in_w1=.true. [namelist:formulation] @@ -27,28 +28,12 @@ dlayer_on=.false. dry_static_adjust=.false. eos_method='projected' exner_from_eos=.true. -l_multigrid=.false. moisture_formulation='dry' !!theta_moist_source=.false. [namelist:helmholtz_solver] -preconditioner='tridiagonal' - -[namelist:idealised] -test='gravity_wave' - -[namelist:initial_density] -r1=0.0 -r2=0.0 -x1=0.0 -x2=0.0 - -[namelist:initial_temperature] -pert_centre=-60.0 - -[namelist:initial_wind] -smp_init_wind=.false. -u0=0.0 +gcrk=18 +si_pressure_tolerance=1.0e-6 [namelist:initialization] init_option='analytic' @@ -60,24 +45,16 @@ diagnostic_frequency=20 [namelist:linear] fixed_ls=.false. -l_stabilise_bl=.false. pert_option='analytic' -transport_efficiency=.false. [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 si_tolerance=1.0e-3 -[!!namelist:multigrid] -chain_mesh_tags='','','','' - [namelist:orography] orog_init_option='none' -[namelist:partitioning] -generate_inner_halos=.true. - [namelist:planet] scaling_factor=125.0 @@ -97,6 +74,9 @@ method='rk' cfl_mol_1d_stab=2.0 cfl_mol_2d_stab=2.0 cfl_mol_3d_stab=2.0 +log_space=5*.false. max_vert_cfl_calc='uniform' +reversible=.false. runge_kutta_method='ssp4' +slice_order='cubic' !!wind_mono_top_depth=0 diff --git a/rose-stem/app/jedi_lfric_tests/rose-app.conf b/rose-stem/app/jedi_lfric_tests/rose-app.conf index 07157baf5..79eddf549 100644 --- a/rose-stem/app/jedi_lfric_tests/rose-app.conf +++ b/rose-stem/app/jedi_lfric_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_lfric_tests/vn3.0_t108 +meta=jedi_lfric_tests/vn3.0_t146 [command] default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe @@ -20,22 +20,17 @@ source=namelist:jedi_lfric_tests = namelist:jedi_geometry = namelist:jedi_state = namelist:jedi_increment - = namelist:jedi_linear_model = namelist:jedi_pseudo_model + = namelist:jedi_linear_model + = namelist:jedi_model = namelist:jedi_lfric_settings - = (namelist:aerosol) = namelist:base_mesh - = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice - = (namelist:cloud) - = (namelist:chemistry) - = (namelist:convection) - = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = (namelist:energy_correction) + = namelist:energy_correction = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -46,7 +41,6 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) - = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -69,33 +63,27 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging - = (namelist:microphysics) = namelist:mixed_solver - = namelist:mixing + = (namelist:mixing) = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple - = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) + = (namelist:orography_bell_cartesian) + = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet - = (namelist:radiation) = namelist:radiative_gases - = (namelist:spectral_gwd) - = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) - = (namelist:star) = (namelist:stochastic_physics) - = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) = namelist:time @@ -118,17 +106,17 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='dust_and_clim' +glomap_mode='off' !!horiz_d=2.25 -!!l_radaer=.true. +!!l_radaer=.false. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='precalc/RADAER_pcalc.ukca' -sulphuric_strat_climatology=.true. +!!prec_file='' +sulphuric_strat_climatology=.false. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 @@ -198,7 +186,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='final' +transport_overwrite_freq='split_step' [namelist:checks] limit_cfl=.false. @@ -218,14 +206,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=111 +!!i_ukca_chem_version=0 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling= -!!l_ukca_quasinewton= +!!l_ukca_linox_scaling=.false. +!!l_ukca_quasinewton=.false. !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac= +!!lightnox_scale_fac=0 !!photol_scheme='off' -!!top_bdy_opt='' +!!top_bdy_opt='no_overwrt' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -280,13 +268,12 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] dl_base=40000.0 dl_str=0.05 -dl_type='standard' +dl_type='latitude' [namelist:departure_points] horizontal_limit='cap' @@ -331,7 +318,7 @@ stretching_method='smooth' !!aerosols_ancil_path='' !!albedo_nir_ancil_path='' !!albedo_vis_ancil_path='' -ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${RESOLUTION}' +ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/Quagga/${ancil_resolution}/n96e_l70' checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartGungho_$ROSE_TASK_NAME' !!cloud_drop_no_conc_ancil_path='' !!coarse_ancil_directory='' @@ -386,13 +373,13 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' -ls_filename='final_2021060200-2021060207' +ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' +ls_filename='final_ls' !!no3_ancil_path='' !!o3_ancil_path='' !!oh_ancil_path='' -orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='' +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -402,8 +389,8 @@ orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' !!soil_dust_ancil_path='' !!soil_rough_ancil_path='' !!sst_ancil_path='' -start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' -start_dump_filename='final_2021060200-2021060207.pert' +start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' +start_dump_filename='final_pert' !!surface_frac_ancil_path='' !!urban_ancil_path='' @@ -424,7 +411,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.true. +l_multigrid=.false. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -454,7 +441,7 @@ gcrk=8 method='prec_only' monitor_convergence=.false. normalise=.true. -preconditioner='multigrid' +preconditioner='tridiagonal' si_pressure_a_tol=1.0e-8 si_pressure_maximum_iterations=400 si_pressure_tolerance=1.0e-4 @@ -467,7 +454,7 @@ si_pressure_tolerance=1.0e-4 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=1 +!!iau_ts_start=0 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -514,15 +501,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='none' +test='gravity_wave' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.4 -r2=0.4 -x1=0.4 -x2=-0.4 +r1=0.0 +r2=0.0 +x1=0.0 +x2=0.0 y1=0.0 y2=0.0 z1=0.0 @@ -534,22 +521,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=60.0 +pert_centre=120.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0,300.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=300.0 +!!profile_heights=0.0 +!!profile_size=1 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0,0.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=0.0 +!!profile_heights=0.0 +!!profile_size=1 [namelist:initial_wind] nl_constant=0.0 -profile='constant_uv' +profile='none' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -559,8 +546,8 @@ profile='constant_uv' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.true. -u0=2.0 +smp_init_wind=.false. +u0=0.0 v0=0.0 wind_time_period=0.0 @@ -588,7 +575,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=12 +diagnostic_frequency=8 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -604,43 +591,42 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2021-06-02T00:00:00' -io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' +io_calender_start='2018-04-14T21:00:00' +io_path_inc_read='' io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2021-06-02 00:00:00' +inc_time='2018-04-14 21:00:00' initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] test_field='theta' [namelist:jedi_linear_model] -incremental_wind_interpolation=.false. +incremental_wind_interpolation=.true. nl_time_step='P0DT1H0M0S' [namelist:jedi_model] time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2021-06-02 00:00:00' +initial_time='2018-04-14T21:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2021-06-02 00:00:00' +state_time='2018-04-14 21:00:00' use_pseudo_model=.true. variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s','land_fraction' + ='m_v','m_cl','m_r','m_s' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -674,7 +660,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 +z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -713,8 +699,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.0 -!!z0m_specified=0.0 +!!z0h_specified=0.01 +!!z0m_specified=0.1 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -793,21 +779,7 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -max_bl_stabilisation=0.75 -n_bl_levels_to_stabilise=15 pert_option='file' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -835,9 +807,9 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.true. +!!prog_tnuc=.false. !!qcl_rime=1.0e-4 -!!shape_rime=.true. +!!shape_rime=.false. turb_gen_mixph=.true. !!z_surf=50.0 @@ -850,7 +822,7 @@ guess_np1=.false. mixed_solver_a_tol=1.0e-3 monitor_convergence=.true. normalise=.true. -reference_reset_time=3600.0 +reference_reset_time=3600. si_maximum_iterations=10 si_method='block_gcr' si_preconditioner='pressure' @@ -860,15 +832,15 @@ split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blend_1dbl_fa' +!!method='blending' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' +[!!namelist:multigrid] +chain_mesh_tags='','','','' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -876,17 +848,9 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='aerosol' +aerosol_mesh_name='dynamics' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. -dynamics_mesh_name='dynamics' -!!lowest_order_aero_flag=.false. -multires_coupling_mesh_tags='dynamics' -multires_coupling_mode='test' -negative_correction='none' -physics_mesh_name='aerosol' -reconstruction='simple' -recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -981,24 +945,24 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.false. +generate_inner_halos=.true. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -1008,7 +972,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1047,12 +1011,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='hybrid' -!!scatter_method_lwinc='approx' +scatter_method_lw='full' +!!scatter_method_lwinc='full' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud9' +!!spectral_file_lwinc='spec/sp_lw_cloud7' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud9' +!!spectral_file_swinc='spec/sp_sw_cloud7' topography='slope' [namelist:radiative_gases] @@ -1066,26 +1030,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='constant' +!!cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='off' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='constant' +!!cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='off' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -ch4_mix_ratio=1.006e-06 -ch4_rad_opt='constant' +!!ch4_mix_ratio=1.006e-06 +ch4_rad_opt='off' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -co2_mix_ratio=6.002e-04 -co2_rad_opt='constant' +!!co2_mix_ratio=6.002e-04 +co2_rad_opt='off' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1157,8 +1121,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -n2o_mix_ratio=4.945e-07 -n2o_rad_opt='constant' +!!n2o_mix_ratio=4.945e-07 +n2o_rad_opt='off' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1175,8 +1139,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -o2_mix_ratio=0.2314 -o2_rad_opt='constant' +!!o2_mix_ratio=0.2314 +o2_rad_opt='off' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1185,7 +1149,7 @@ o2_rad_opt='constant' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='ancil' +o3_rad_opt='off' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1266,10 +1230,10 @@ tolerance=1.0e-6 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.true. -!!cgw_scale_factor=0.86 +add_cgw=.false. +!!cgw_scale_factor=1.0 ussp_heating=.true. -ussp_launch_factor=1.2 +ussp_launch_factor=1.3 wavelstar=4300.0 [!!namelist:star] @@ -1322,9 +1286,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1369,7 +1333,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=60 +stph_n_max=22 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1400,8 +1364,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2021-06-02 00:00:00' -calendar_start='2021-06-02 00:00:00' +calendar_origin='2016-01-01 15:00:00' +calendar_start='2016-01-01 15:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1409,7 +1373,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=1 +inner_iterations=2 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1422,7 +1386,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml b/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml index 4a65814b5..808f8ef91 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml +++ b/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml @@ -41,7 +41,6 @@ - @@ -56,7 +55,6 @@ - @@ -146,11 +144,6 @@ - - - - - @@ -241,8 +234,6 @@ - - @@ -289,8 +280,6 @@ - - @@ -432,7 +421,6 @@ - diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf deleted file mode 100644 index 125a4758d..000000000 --- a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG.conf +++ /dev/null @@ -1,8 +0,0 @@ -[file:mesh_C12_MG.nc] -mode=auto -source=$MESH_DIR/mesh_C12_MG.nc - -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='mesh_C12_MG' -!!fplane= diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf deleted file mode 100644 index 8e18ae5fd..000000000 --- a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-C12_MG_op.conf +++ /dev/null @@ -1,7 +0,0 @@ -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='${MESH_DIR}/mesh_C12_MG_op' -!!fplane= -prepartitioned=.true. - -[!!namelist:partitioning] diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-default.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-default.conf new file mode 100644 index 000000000..e69de29bb diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf deleted file mode 100644 index 065a444b6..000000000 --- a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-nwp_gal9_c12.conf +++ /dev/null @@ -1,26 +0,0 @@ -[file:iodef_temp.xml] -mode=auto -source=$ROSE_SUITE_DIR/app/jedi_tlm_forecast_tl/file/iodef.xml - -[namelist:io] -diagnostic_frequency=8 - -[namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' - -[namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' - -[namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' - -[namelist:jedi_state] -state_time='2018-04-14 21:00:00' - -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' -multigrid_chain_nitems=3 - -[namelist:time] -calendar_origin='2018-04-14 21:00:00' -calendar_start='2018-04-14 21:00:00' diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf deleted file mode 100644 index 3d9745645..000000000 --- a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-rrt_equals_dt.conf +++ /dev/null @@ -1,2 +0,0 @@ -[namelist:mixed_solver] -reference_reset_time=$DT diff --git a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf b/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf deleted file mode 100644 index d9c5499fd..000000000 --- a/rose-stem/app/jedi_tlm_forecast_tl/opt/rose-app-semi_strict_solver.conf +++ /dev/null @@ -1,9 +0,0 @@ -[namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-3 - -[namelist:mixed_solver] -mixed_solver_a_tol=1.0e-21 -si_tolerance=1.0e-3 - -[namelist:timestepping] -outer_iterations=1 diff --git a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf index b446f4c69..f1e513244 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf +++ b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_tlm_forecast_tl/vn3.0_t108 +meta=jedi_tlm_forecast_tl/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -23,19 +23,13 @@ source=namelist:jedi_lfric_tests = namelist:jedi_linear_model = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings - = (namelist:aerosol) = namelist:base_mesh - = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice - = (namelist:cloud) - = (namelist:chemistry) - = (namelist:convection) - = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = (namelist:energy_correction) + = namelist:energy_correction = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -46,7 +40,6 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) - = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -69,33 +62,26 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging - = (namelist:microphysics) = namelist:mixed_solver - = namelist:mixing + = (namelist:mixing) = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple - = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) + = (namelist:orography_bell_cartesian) + = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet - = (namelist:radiation) = namelist:radiative_gases - = (namelist:spectral_gwd) - = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) - = (namelist:star) - = (namelist:stochastic_physics) - = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) = namelist:time @@ -118,24 +104,24 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='dust_and_clim' +glomap_mode='off' !!horiz_d=2.25 -!!l_radaer=.true. +!!l_radaer=.false. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='precalc/RADAER_pcalc.ukca' -sulphuric_strat_climatology=.true. +!!prec_file='' +sulphuric_strat_climatology=.false. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 [namelist:base_mesh] !!f_lat_deg=45.0 -file_prefix='mesh' +file_prefix='mesh.nc' !!fplane=.false. geometry='spherical' prepartitioned=.false. @@ -198,7 +184,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='final' +transport_overwrite_freq='split_step' [namelist:checks] limit_cfl=.false. @@ -218,14 +204,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=111 +!!i_ukca_chem_version=0 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling= -!!l_ukca_quasinewton= +!!l_ukca_linox_scaling=.false. +!!l_ukca_quasinewton=.false. !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac= +!!lightnox_scale_fac=0 !!photol_scheme='off' -!!top_bdy_opt='' +!!top_bdy_opt='no_overwrt' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -280,7 +266,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -392,7 +377,7 @@ diag_stem_name='' !!o3_ancil_path='' !!oh_ancil_path='' orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='' +!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -424,7 +409,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.true. +l_multigrid=.false. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -434,7 +419,7 @@ shallow=.true. si_momentum_equation=.false. theta_moist_source=.false. use_multires_coupling=.false. -use_physics=.true. +use_physics=.false. use_wavedynamics=.true. vector_invariant=.false. @@ -448,16 +433,16 @@ profile_data_v=0.0 times=0.0 [namelist:helmholtz_solver] -!!fail_on_non_converged=.false. -gcrk=8 +fail_on_non_converged=.false. +gcrk=18 !!jacobi_relaxation=0.5 -method='prec_only' -monitor_convergence=.false. +method='bicgstab' +monitor_convergence=.true. normalise=.true. -preconditioner='multigrid' -si_pressure_a_tol=1.0e-8 -si_pressure_maximum_iterations=400 -si_pressure_tolerance=1.0e-4 +preconditioner='tridiagonal' +si_pressure_a_tol=0 +si_pressure_maximum_iterations=40 +si_pressure_tolerance=1.0e-15 [namelist:iau] !!iau_ainc_multifile=.false. @@ -467,7 +452,7 @@ si_pressure_tolerance=1.0e-4 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=1 +!!iau_ts_start=0 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -514,15 +499,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='none' +test='gravity_wave' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.4 -r2=0.4 -x1=0.4 -x2=-0.4 +r1=0.0 +r2=0.0 +x1=0.0 +x2=0.0 y1=0.0 y2=0.0 z1=0.0 @@ -534,22 +519,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=60.0 +pert_centre=120.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0,300.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=300.0 +!!profile_heights=0.0 +!!profile_size=1 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0,0.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=0.0 +!!profile_heights=0.0 +!!profile_size=1 [namelist:initial_wind] nl_constant=0.0 -profile='constant_uv' +profile='none' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -559,8 +544,8 @@ profile='constant_uv' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.true. -u0=2.0 +smp_init_wind=.false. +u0=0.0 v0=0.0 wind_time_period=0.0 @@ -588,7 +573,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=12 +diagnostic_frequency=8 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -604,40 +589,38 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2021-06-02T00:00:00' +io_calender_start='2018-04-14T21:00:00' io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' -io_setup_increment=.false. +io_setup_increment=.true. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2021-06-02 00:00:00' -initialise_via_read=.false. +inc_time='2018-04-14 21:00:00' +initialise_via_read=.true. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] test_field='theta' [namelist:jedi_linear_model] -incremental_wind_interpolation=.false. nl_time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2021-06-02 00:00:00' +initial_time='2018-04-14T21:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2021-06-02 00:00:00' +state_time='2018-04-14 21:00:00' use_pseudo_model=.true. -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', - ='m_cl','m_r','m_s','land_fraction' +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', + ='m_v','m_cl','m_r','m_s' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -671,7 +654,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 +z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -710,8 +693,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.0 -!!z0m_specified=0.0 +!!z0h_specified=0.01 +!!z0m_specified=0.1 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -790,21 +773,7 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -max_bl_stabilisation=0.75 -n_bl_levels_to_stabilise=15 -pert_option='file' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 +pert_option='analytic' [namelist:logging] log_to_rank_zero_only=.true. @@ -832,40 +801,40 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.true. +!!prog_tnuc=.false. !!qcl_rime=1.0e-4 -!!shape_rime=.true. +!!shape_rime=.false. turb_gen_mixph=.true. !!z_surf=50.0 [namelist:mixed_solver] eliminate_variables='discrete' -fail_on_non_converged=.true. -gcrk=4 +fail_on_non_converged=.false. +gcrk=10 guess_np1=.false. !!jacobi_relaxation=0.5 -mixed_solver_a_tol=1.0e-3 +mixed_solver_a_tol=1.0e-21 monitor_convergence=.true. normalise=.true. reference_reset_time=3600.0 -si_maximum_iterations=10 +si_maximum_iterations=7 si_method='block_gcr' si_preconditioner='pressure' -si_tolerance=1.0e-1 +si_tolerance=1.0e-21 split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blend_1dbl_fa' +!!method='blending' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' +[!!namelist:multigrid] +chain_mesh_tags='','','','' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -873,17 +842,9 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='aerosol' +aerosol_mesh_name='dynamics' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. -dynamics_mesh_name='dynamics' -!!lowest_order_aero_flag=.false. -multires_coupling_mesh_tags='dynamics' -multires_coupling_mode='test' -negative_correction='none' -physics_mesh_name='aerosol' -reconstruction='simple' -recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -978,34 +939,34 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.false. +generate_inner_halos=.true. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 -limit_drag_incs=.false. +!!gw_segment=0 +!!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' -sample_physics_scalars=.true. -sample_physics_winds=.true. -sample_physics_winds_correction=.false. +!!sample_physics_scalars=.true. +!!sample_physics_winds=.true. +!!sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1044,12 +1005,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='hybrid' -!!scatter_method_lwinc='approx' +scatter_method_lw='full' +!!scatter_method_lwinc='full' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud9' +!!spectral_file_lwinc='spec/sp_lw_cloud7' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud9' +!!spectral_file_swinc='spec/sp_sw_cloud7' topography='slope' [namelist:radiative_gases] @@ -1063,26 +1024,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='constant' +!!cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='off' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='constant' +!!cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='off' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -ch4_mix_ratio=1.006e-06 -ch4_rad_opt='constant' +!!ch4_mix_ratio=1.006e-06 +ch4_rad_opt='off' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -co2_mix_ratio=6.002e-04 -co2_rad_opt='constant' +!!co2_mix_ratio=6.002e-04 +co2_rad_opt='off' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1154,8 +1115,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -n2o_mix_ratio=4.945e-07 -n2o_rad_opt='constant' +!!n2o_mix_ratio=4.945e-07 +n2o_rad_opt='off' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1172,8 +1133,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -o2_mix_ratio=0.2314 -o2_rad_opt='constant' +!!o2_mix_ratio=0.2314 +o2_rad_opt='off' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1182,7 +1143,7 @@ o2_rad_opt='constant' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='ancil' +o3_rad_opt='off' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1209,10 +1170,10 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -aerosol='none' -boundary_layer='none' -chemistry='none' -cloud='none' +!!aerosol='none' +!!boundary_layer='none' +!!chemistry='none' +!!cloud='none' !!convection='none' dynamics='gungho' !!electric='none' @@ -1220,23 +1181,23 @@ external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -methane_oxidation=.false. +!!methane_oxidation=.false. !!microphysics='none' -orographic_drag='none' -radiation='none' -spectral_gwd='none' -stochastic_physics='none' -surface='none' +!!orographic_drag='none' +!!radiation='none' +!!spectral_gwd='none' +!!stochastic_physics='none' +!!surface='none' [namelist:solver] -!!fail_on_non_converged=.false. +fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 -maximum_iterations=7 +maximum_iterations=50 method='chebyshev' -monitor_convergence=.false. +monitor_convergence=.true. preconditioner='diagonal' -tolerance=1.0e-6 +tolerance=1.0e-18 [namelist:specified_surface] !!function_amplitude_e=200 @@ -1263,10 +1224,10 @@ tolerance=1.0e-6 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.true. -!!cgw_scale_factor=0.86 +add_cgw=.false. +!!cgw_scale_factor=1.0 ussp_heating=.true. -ussp_launch_factor=1.2 +ussp_launch_factor=1.3 wavelstar=4300.0 [!!namelist:star] @@ -1319,9 +1280,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1366,7 +1327,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=60 +stph_n_max=22 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1397,8 +1358,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2021-06-02 00:00:00' -calendar_start='2021-06-02 00:00:00' +calendar_origin='2018-04-14 21:00:00' +calendar_start='2018-04-14 21:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1406,7 +1367,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=1 +inner_iterations=2 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1419,9 +1380,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. -ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' cap_density_predictor=0.5 @@ -1438,15 +1397,14 @@ ffsl_inner_order=0 ffsl_outer_order=1 ffsl_splitting=5*1 ffsl_unity_3d=.false. -ffsl_vertical_order=2,2,1,2,2 -field_names='density','potential_temperature','wind','moisture', - ='con_tracer' +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud' fv_horizontal_order=2 fv_vertical_order=2 horizontal_method=5*1 horizontal_monotone=5*1 -log_space=.true.,.true.,.false.,.false.,.false. -max_vert_cfl_calc='dep_point' +log_space=5*.false. +max_vert_cfl_calc='uniform' min_val_abs_tol=-1.0e-12 min_val_max_iterations=10 min_val_method='iterative' @@ -1456,7 +1414,7 @@ operators='fv' panel_edge_high_order=.true. panel_edge_treatment='none' profile_size=5 -reversible=.true.,.true.,.false.,.true.,.true. +reversible=5*.false. runge_kutta_method='ssp3' scheme=5*1 si_outer_transport='none' @@ -1466,11 +1424,10 @@ splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' -transport_ageofair=.false. use_density_predictor=.false. vertical_method=5*1 vertical_monotone=5*1 -vertical_monotone_order=5*3 +vertical_monotone_order=5*1 vertical_sl_order='cubic' wind_mono_top=.false. !!wind_mono_top_depth=5 diff --git a/rose-stem/app/jedi_tlm_tests/file/iodef.xml b/rose-stem/app/jedi_tlm_tests/file/iodef.xml index 4a65814b5..808f8ef91 100644 --- a/rose-stem/app/jedi_tlm_tests/file/iodef.xml +++ b/rose-stem/app/jedi_tlm_tests/file/iodef.xml @@ -41,7 +41,6 @@ - @@ -56,7 +55,6 @@ - @@ -146,11 +144,6 @@ - - - - - @@ -241,8 +234,6 @@ - - @@ -289,8 +280,6 @@ - - @@ -432,7 +421,6 @@ - diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf deleted file mode 100644 index 125a4758d..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG.conf +++ /dev/null @@ -1,8 +0,0 @@ -[file:mesh_C12_MG.nc] -mode=auto -source=$MESH_DIR/mesh_C12_MG.nc - -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='mesh_C12_MG' -!!fplane= diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf deleted file mode 100644 index 8e18ae5fd..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C12_MG_op.conf +++ /dev/null @@ -1,7 +0,0 @@ -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='${MESH_DIR}/mesh_C12_MG_op' -!!fplane= -prepartitioned=.true. - -[!!namelist:partitioning] diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf deleted file mode 100644 index 1814a4708..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-C224_MG.conf +++ /dev/null @@ -1,8 +0,0 @@ -[file:mesh_C224_MG.nc] -mode=auto -source=$MESH_DIR/mesh_C224_MG.nc - -[namelist:base_mesh] -!!f_lat_deg= -file_prefix='mesh_C224_MG' -!!fplane= diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-default.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-default.conf new file mode 100644 index 000000000..e69de29bb diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf index ffd315be0..3f2af7e5b 100644 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-dry.conf @@ -2,8 +2,3 @@ moisture_formulation='dry' moisture_in_solver=.false. !!theta_moist_source=.false. - -[namelist:section_choice] -!!aerosol='none' -!!cloud='none' -!!methane_oxidation=.false. diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf deleted file mode 100644 index ccd55de3b..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c12.conf +++ /dev/null @@ -1,28 +0,0 @@ -[file:iodef_temp.xml] -mode=auto -source=$ROSE_SUITE_DIR/app/jedi_tlm_tests/file/iodef.xml - -[namelist:io] -diagnostic_frequency=8 - -[namelist:jedi_geometry] -io_calender_start='2018-04-14T21:00:00' -io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' -io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' - -[namelist:jedi_increment] -inc_time='2018-04-14 21:00:00' - -[namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' - -[namelist:jedi_state] -state_time='2018-04-14 21:00:00' - -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2' -multigrid_chain_nitems=3 - -[namelist:time] -calendar_origin='2018-04-14 21:00:00' -calendar_start='2018-04-14 21:00:00' diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf deleted file mode 100644 index dfe2b916d..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-nwp_gal9_c224.conf +++ /dev/null @@ -1,3 +0,0 @@ -[file:iodef_temp.xml] -mode=auto -source=$ROSE_SUITE_DIR/app/jedi_tlm_tests/file/iodef.xml diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf deleted file mode 100644 index aea74c8fa..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-real_increment.conf +++ /dev/null @@ -1,5 +0,0 @@ -[namelist:jedi_geometry] -io_setup_increment=.true. - -[namelist:jedi_increment] -initialise_via_read=.true. diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf new file mode 100644 index 000000000..b435c2bc3 --- /dev/null +++ b/rose-stem/app/jedi_tlm_tests/opt/rose-app-relaxed_solver.conf @@ -0,0 +1,15 @@ +[namelist:helmholtz_solver] +gcrk=8 +si_pressure_a_tol=1.0e-8 +si_pressure_maximum_iterations=400 +si_pressure_tolerance=1.0e-4 + +[namelist:mixed_solver] +gcrk=6 +mixed_solver_a_tol=0.0 +si_maximum_iterations=10 +si_tolerance=1.0e-5 + +[namelist:solver] +maximum_iterations=7 +tolerance=1.0e-6 diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf deleted file mode 100644 index 3d9745645..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-rrt_equals_dt.conf +++ /dev/null @@ -1,2 +0,0 @@ -[namelist:mixed_solver] -reference_reset_time=$DT diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf deleted file mode 100644 index 4af6d3cf1..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-semi_strict_solver.conf +++ /dev/null @@ -1,9 +0,0 @@ -[namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-2 - -[namelist:mixed_solver] -mixed_solver_a_tol=1.0e-21 -si_tolerance=1.0e-3 - -[namelist:timestepping] -outer_iterations=1 diff --git a/rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf b/rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf deleted file mode 100644 index 77270e0f5..000000000 --- a/rose-stem/app/jedi_tlm_tests/opt/rose-app-strict_solver.conf +++ /dev/null @@ -1,15 +0,0 @@ -[namelist:helmholtz_solver] -gcrk=18 -si_pressure_a_tol=0 -si_pressure_tolerance=1.0e-15 - -[namelist:mixed_solver] -fail_on_non_converged=.false. -gcrk=10 -mixed_solver_a_tol=1.0e-21 -si_maximum_iterations=100 -si_tolerance=1.0e-21 - -[namelist:solver] -maximum_iterations=50 -tolerance=1.0e-18 diff --git a/rose-stem/app/jedi_tlm_tests/rose-app.conf b/rose-stem/app/jedi_tlm_tests/rose-app.conf index 6e8c2a776..78c06f6a3 100644 --- a/rose-stem/app/jedi_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_tlm_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_tlm_tests/vn3.0_t108 +meta=jedi_tlm_tests/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -23,19 +23,13 @@ source=namelist:jedi_lfric_tests = namelist:jedi_linear_model = namelist:jedi_pseudo_model = namelist:jedi_lfric_settings - = (namelist:aerosol) = namelist:base_mesh - = (namelist:blayer) = namelist:boundaries = namelist:checks = namelist:section_choice - = (namelist:cloud) - = (namelist:chemistry) - = (namelist:convection) - = (namelist:cosp) = (namelist:damping_layer) = (namelist:departure_points) - = (namelist:energy_correction) + = namelist:energy_correction = (namelist:external_forcing) = namelist:extrusion = (namelist:files) @@ -46,7 +40,6 @@ source=namelist:jedi_lfric_tests = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) - = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -69,35 +62,30 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging - = (namelist:microphysics) = namelist:mixed_solver - = namelist:mixing + = (namelist:mixing) = (namelist:multigrid) = (namelist:multires_coupling) = namelist:esm_couple - = (namelist:orbit) = namelist:orography = (namelist:orography_agnesi_cartesian) = (namelist:orography_agnesi_spherical) + = (namelist:orography_bell_cartesian) + = (namelist:orography_bell_spherical) = (namelist:orography_dcmip200_spherical) = (namelist:orography_schar_cartesian) = (namelist:orography_schar_spherical) = namelist:partitioning = (namelist:physics) = namelist:planet - = (namelist:radiation) = namelist:radiative_gases - = (namelist:spectral_gwd) - = (namelist:orographic_drag) = namelist:solver = (namelist:specified_surface) - = (namelist:star) = (namelist:stochastic_physics) - = (namelist:surface) = (namelist:temp_tend_data) = (namelist:theta_relax) + = (namelist:theta_relax) = namelist:time = namelist:timestepping = namelist:transport @@ -118,24 +106,24 @@ easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='dust_and_clim' +glomap_mode='off' !!horiz_d=2.25 -!!l_radaer=.true. +!!l_radaer=.false. murk=.false. !!murk_lbc=.false. !!murk_prognostic=.false. !!murk_source_scaling=1.0 !!murk_visibility=.false. !!n_radaer_step=1 -!!prec_file='precalc/RADAER_pcalc.ukca' -sulphuric_strat_climatology=.true. +!!prec_file='' +sulphuric_strat_climatology=.false. !!sulphuric_strat_column=1.86604e-6 ukca_mode_seg_size=4 !!us_am=1.45 [namelist:base_mesh] !!f_lat_deg=45.0 -file_prefix='mesh' +file_prefix='mesh.nc' !!fplane=.false. geometry='spherical' prepartitioned=.false. @@ -198,7 +186,7 @@ limited_area=.false. !!rim_width_ns=1 !!solver_boundary_depth=1 !!transport_boundary_depth=6 -transport_overwrite_freq='final' +transport_overwrite_freq='split_step' [namelist:checks] limit_cfl=.false. @@ -218,14 +206,14 @@ chem_scheme='none' !!fjx_spec_file='FJX_spec_Nov11.dat' !!flexchem_opt='bs1999' i_chem_timestep_halvings=0 -!!i_ukca_chem_version=111 +!!i_ukca_chem_version=0 !!l_ukca_asad_full=.false. -!!l_ukca_linox_scaling= -!!l_ukca_quasinewton= +!!l_ukca_linox_scaling=.false. +!!l_ukca_quasinewton=.false. !!l_ukca_ro2_ntp=.false. -!!lightnox_scale_fac= +!!lightnox_scale_fac=0 !!photol_scheme='off' -!!top_bdy_opt='' +!!top_bdy_opt='no_overwrt' [!!namelist:cloud] !!cff_spread_rate=1.0e-5 @@ -280,7 +268,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -392,7 +379,7 @@ diag_stem_name='' !!o3_ancil_path='' !!oh_ancil_path='' orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' -!!orography_subgrid_ancil_path='' +!!orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' !!ozone_ancil_path='' !!plant_func_ancil_path='' !!sea_ancil_path='' @@ -424,7 +411,7 @@ exner_from_eos=.false. horizontal_physics_predictor=.false. horizontal_transport_predictor=.false. init_exner_bt=.true. -l_multigrid=.true. +l_multigrid=.false. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -434,7 +421,7 @@ shallow=.true. si_momentum_equation=.false. theta_moist_source=.false. use_multires_coupling=.false. -use_physics=.true. +use_physics=.false. use_wavedynamics=.true. vector_invariant=.false. @@ -448,16 +435,16 @@ profile_data_v=0.0 times=0.0 [namelist:helmholtz_solver] -!!fail_on_non_converged=.false. -gcrk=8 +fail_on_non_converged=.false. +gcrk=18 !!jacobi_relaxation=0.5 -method='prec_only' -monitor_convergence=.false. +method='bicgstab' +monitor_convergence=.true. normalise=.true. -preconditioner='multigrid' -si_pressure_a_tol=1.0e-8 -si_pressure_maximum_iterations=400 -si_pressure_tolerance=1.0e-4 +preconditioner='tridiagonal' +si_pressure_a_tol=0 +si_pressure_maximum_iterations=40 +si_pressure_tolerance=1.0e-15 [namelist:iau] !!iau_ainc_multifile=.false. @@ -467,7 +454,7 @@ si_pressure_tolerance=1.0e-4 !!iau_tendency_ainc=.false. !!iau_tendency_bcorr=.true. !!iau_tendency_pertinc=.false. -!!iau_ts_start=1 +!!iau_ts_start=0 !!iau_use_addinf=.false. !!iau_use_bcorr=.false. !!iau_use_level_one_temp=.false. @@ -514,15 +501,15 @@ f_lon_deg=0.0 perturb_init=.false. !!perturb_magnitude=0 !!perturb_seed=0 -test='none' +test='gravity_wave' [namelist:initial_density] density_background=0.1 density_max=2.0 -r1=0.4 -r2=0.4 -x1=0.4 -x2=-0.4 +r1=0.0 +r2=0.0 +x1=0.0 +x2=0.0 y1=0.0 y2=0.0 z1=0.0 @@ -534,22 +521,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=60.0 +pert_centre=120.0 pert_width_scaling=1.0 perturb='none' -!!profile_data=300.0,300.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=300.0 +!!profile_heights=0.0 +!!profile_size=1 theta_surf=300.0 [namelist:initial_vapour] -!!profile_data=0.0,0.0 -!!profile_heights=0.0,10.0e3 -!!profile_size=2 +!!profile_data=0.0 +!!profile_heights=0.0 +!!profile_size=1 [namelist:initial_wind] nl_constant=0.0 -profile='constant_uv' +profile='none' !!profile_data_u=0.0 !!profile_data_v=0.0 !!profile_data_w=0.0 @@ -559,8 +546,8 @@ profile='constant_uv' !!profile_size_w=1 sbr_angle_lat=0.0 sbr_angle_lon=0.0 -smp_init_wind=.true. -u0=2.0 +smp_init_wind=.false. +u0=0.0 v0=0.0 wind_time_period=0.0 @@ -588,7 +575,7 @@ checkpoint_write=.false. counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -diagnostic_frequency=12 +diagnostic_frequency=8 !!end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. @@ -604,40 +591,39 @@ write_fluxes=.false. write_minmax_tseries=.false. [namelist:jedi_geometry] -io_calender_start='2021-06-02T00:00:00' -io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Issue126/C224_lfric_diag' -io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Issue126/C224_jedi_trajectory' +io_calender_start='2018-04-14T21:00:00' +io_path_inc_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/pert_fields/lfric_diag' +io_path_state_read='$BIG_DATA_DIR/jedi-lfric/Ticket354/ls_fields/jedi_trajectory' io_path_state_write='write_file' io_setup_increment=.false. io_time_step='P0DT1H0M0S' [namelist:jedi_increment] -inc_time='2021-06-02 00:00:00' +inc_time='2018-04-14 21:00:00' initialise_via_read=.false. variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', ='m_cl','m_r','m_s' [namelist:jedi_lfric_settings] -adjoint_test_tolerance=1.0e-4 forecast_length='P0DT6H0M0S' [namelist:jedi_lfric_tests] test_field='theta' [namelist:jedi_linear_model] -incremental_wind_interpolation=.false. +incremental_wind_interpolation=.true. nl_time_step='P0DT1H0M0S' [namelist:jedi_pseudo_model] -initial_time='2021-06-02 00:00:00' +initial_time='2018-04-14T21:00:00' number_of_steps=9 time_step='P0DT1H0M0S' [namelist:jedi_state] -state_time='2021-06-02 00:00:00' +state_time='2018-04-14 21:00:00' use_pseudo_model=.true. -variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', - ='m_cl','m_r','m_s','land_fraction' +variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', + ='m_v','m_cl','m_r','m_s' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -671,7 +657,7 @@ kext_io=0.5,0.5,1.0,1.0,0.5 knl_io=5*0.2 omega_io=0.101,0.083,0.132,0.135,0.115 omnir_io=0.788,0.545,0.864,0.787,0.785 -z0hm_pft_io=1.0,1.0,0.01,0.01,0.01 +z0hm_pft_io=1.65,1.65,0.1,0.1,0.1 !!z0v_io=1.1,1.1,0.22,0.22,1.0 [!!namelist:jules_radiation] @@ -710,8 +696,8 @@ l_use_dtstar_sea=.false. nice=1 !!u_cdn_hw=55.0 !!u_cdn_max=33.0 -!!z0h_specified=0.0 -!!z0m_specified=0.0 +!!z0h_specified=0.01 +!!z0m_specified=0.1 [!!namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 @@ -790,21 +776,7 @@ l_spec_veg_z0=.true. fixed_ls=.true. l_stabilise_bl=.false. ls_read_w2h=.false. -max_bl_stabilisation=0.75 -n_bl_levels_to_stabilise=15 -pert_option='file' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 +pert_option='analytic' [namelist:logging] log_to_rank_zero_only=.true. @@ -832,40 +804,40 @@ microphysics_casim=.false. !!orog_block=.true. !!orog_rain=.true. !!orog_rime=.true. -!!prog_tnuc=.true. +!!prog_tnuc=.false. !!qcl_rime=1.0e-4 -!!shape_rime=.true. +!!shape_rime=.false. turb_gen_mixph=.true. !!z_surf=50.0 [namelist:mixed_solver] eliminate_variables='discrete' -fail_on_non_converged=.true. -gcrk=4 +fail_on_non_converged=.false. +gcrk=10 guess_np1=.false. !!jacobi_relaxation=0.5 -mixed_solver_a_tol=1.0e-3 +mixed_solver_a_tol=1.0e-21 monitor_convergence=.true. normalise=.true. reference_reset_time=3600.0 -si_maximum_iterations=10 +si_maximum_iterations=7 si_method='block_gcr' si_preconditioner='pressure' -si_tolerance=1.0e-1 +si_tolerance=1.0e-21 split_w=.true. [namelist:mixing] !!leonard_kl=2.0 leonard_term=.false. -!!method='blend_1dbl_fa' +!!method='blending' !!mix_factor=0.2 !!smag_l_calc='UseDx' smagorinsky=.false. viscosity=.false. viscosity_mu=0.0 -[namelist:multigrid] -chain_mesh_tags='dynamics','multigrid_l1','multigrid_l2','multigrid_l3' +[!!namelist:multigrid] +chain_mesh_tags='','','','' multigrid_chain_nitems=4 n_coarsesmooth=4 n_postsmooth=2 @@ -873,17 +845,9 @@ n_presmooth=2 smooth_relaxation=0.8 [!!namelist:multires_coupling] -aerosol_mesh_name='aerosol' +aerosol_mesh_name='dynamics' coarse_aerosol_transport=.false. coarse_rad_aerosol=.false. -dynamics_mesh_name='dynamics' -!!lowest_order_aero_flag=.false. -multires_coupling_mesh_tags='dynamics' -multires_coupling_mode='test' -negative_correction='none' -physics_mesh_name='aerosol' -reconstruction='simple' -recovery_order='linear' [!!namelist:orbit] !!arg_periapsis=1.796767421 @@ -978,34 +942,34 @@ phi_centre_dec=0.0 wavelength=4000.0 [namelist:partitioning] -generate_inner_halos=.false. +generate_inner_halos=.true. panel_decomposition='auto' !!panel_xproc=1 !!panel_yproc=1 partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 -limit_drag_incs=.false. +!!gw_segment=0 +!!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' -sample_physics_scalars=.true. -sample_physics_winds=.true. -sample_physics_winds_correction=.false. +!!sample_physics_scalars=.true. +!!sample_physics_winds=.true. +!!sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1044,12 +1008,12 @@ mcica_data_file='spec/mcica_data' n_radstep=2 !!planet_albedo=0.06 !!planet_emissivity=0.985 -scatter_method_lw='hybrid' -!!scatter_method_lwinc='approx' +scatter_method_lw='full' +!!scatter_method_lwinc='full' spectral_file_lw='spec/sp_lw_ga9' -!!spectral_file_lwinc='spec/sp_lw_cloud9' +!!spectral_file_lwinc='spec/sp_lw_cloud7' spectral_file_sw='spec/sp_sw_ga9' -!!spectral_file_swinc='spec/sp_sw_cloud9' +!!spectral_file_swinc='spec/sp_sw_cloud7' topography='slope' [namelist:radiative_gases] @@ -1063,26 +1027,26 @@ cfc113_rad_opt='off' !!cfc11_clim_fcg_nyears=0 !!cfc11_clim_fcg_rates=0 !!cfc11_clim_fcg_years=0 -cfc11_mix_ratio=1.110e-09 -cfc11_rad_opt='constant' +!!cfc11_mix_ratio=1.110e-09 +cfc11_rad_opt='off' !!cfc12_clim_fcg_levls=0 !!cfc12_clim_fcg_nyears=0 !!cfc12_clim_fcg_rates=0 !!cfc12_clim_fcg_years=0 -cfc12_mix_ratio=2.187e-09 -cfc12_rad_opt='constant' +!!cfc12_mix_ratio=2.187e-09 +cfc12_rad_opt='off' !!ch4_clim_fcg_levls=0 !!ch4_clim_fcg_nyears=0 !!ch4_clim_fcg_rates=0 !!ch4_clim_fcg_years=0 -ch4_mix_ratio=1.006e-06 -ch4_rad_opt='constant' +!!ch4_mix_ratio=1.006e-06 +ch4_rad_opt='off' !!co2_clim_fcg_levls=0 !!co2_clim_fcg_nyears=0 !!co2_clim_fcg_rates=0 !!co2_clim_fcg_years=0 -co2_mix_ratio=6.002e-04 -co2_rad_opt='constant' +!!co2_mix_ratio=6.002e-04 +co2_rad_opt='off' !!co_clim_fcg_levls=0 !!co_clim_fcg_nyears=0 !!co_clim_fcg_rates=0 @@ -1154,8 +1118,8 @@ n2_rad_opt='off' !!n2o_clim_fcg_nyears=0 !!n2o_clim_fcg_rates=0 !!n2o_clim_fcg_years=0 -n2o_mix_ratio=4.945e-07 -n2o_rad_opt='constant' +!!n2o_mix_ratio=4.945e-07 +n2o_rad_opt='off' !!na_clim_fcg_levls=0 !!na_clim_fcg_nyears=0 !!na_clim_fcg_rates=0 @@ -1172,8 +1136,8 @@ nh3_rad_opt='off' !!o2_clim_fcg_nyears=0 !!o2_clim_fcg_rates=0 !!o2_clim_fcg_years=0 -o2_mix_ratio=0.2314 -o2_rad_opt='constant' +!!o2_mix_ratio=0.2314 +o2_rad_opt='off' !!o3_clim_fcg_levls=0 !!o3_clim_fcg_nyears=0 !!o3_clim_fcg_rates=0 @@ -1182,7 +1146,7 @@ o2_rad_opt='constant' !!o3_profile_data=0 !!o3_profile_heights=0.0 !!o3_profile_size=0 -o3_rad_opt='ancil' +o3_rad_opt='off' !!rb_clim_fcg_levls=0 !!rb_clim_fcg_nyears=0 !!rb_clim_fcg_rates=0 @@ -1209,10 +1173,10 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -aerosol='none' -boundary_layer='none' -chemistry='none' -cloud='none' +!!aerosol='none' +!!boundary_layer='none' +!!chemistry='none' +!!cloud='none' !!convection='none' dynamics='gungho' !!electric='none' @@ -1220,23 +1184,23 @@ external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -methane_oxidation=.false. +!!methane_oxidation=.false. !!microphysics='none' -orographic_drag='none' -radiation='none' -spectral_gwd='none' -stochastic_physics='none' -surface='none' +!!orographic_drag='none' +!!radiation='none' +!!spectral_gwd='none' +!!stochastic_physics='none' +!!surface='none' [namelist:solver] -!!fail_on_non_converged=.false. +fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 -maximum_iterations=7 +maximum_iterations=50 method='chebyshev' -monitor_convergence=.false. +monitor_convergence=.true. preconditioner='diagonal' -tolerance=1.0e-6 +tolerance=1.0e-18 [namelist:specified_surface] !!function_amplitude_e=200 @@ -1263,10 +1227,10 @@ tolerance=1.0e-6 !!time_units_sst='seconds' [!!namelist:spectral_gwd] -add_cgw=.true. -!!cgw_scale_factor=0.86 +add_cgw=.false. +!!cgw_scale_factor=1.0 ussp_heating=.true. -ussp_launch_factor=1.2 +ussp_launch_factor=1.3 wavelstar=4300.0 [!!namelist:star] @@ -1319,9 +1283,9 @@ ens_memb=${ENSEMBLE_MEMBER} !!rp_lsfc_orog_drag_param=0.15,0.15,0.15 !!rp_lsfc_z0_soil=1.0e-3,1.0e-3,1.0e-3 !!rp_lsfc_z0_urban_mult=1.0,1.0,1.0 -!!rp_lsfc_z0hm_pft=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_max=1.00,1.00,0.022,0.022,0.025 -!!rp_lsfc_z0hm_pft_min=1.00,1.00,0.022,0.022,0.025 +!!rp_lsfc_z0hm_pft=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_max=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 +!!rp_lsfc_z0hm_pft_min=1.65000,1.65000,1.00000e-2,1.00000e-2,1.00000e-1 !!rp_lsfc_z0hm_soil=2.0e-1,2.0e-1,2.0e-1 !!rp_lsfc_z0v= !!rp_lsfc_z0v_max= @@ -1366,7 +1330,7 @@ ens_memb=${ENSEMBLE_MEMBER} !!spt_use_convection=.true. !!spt_use_microphysics=.true. !!spt_use_radiation=.true. -stph_n_max=60 +stph_n_max=22 stph_n_min=20 use_random_parameters=.false. use_skeb=.false. @@ -1397,8 +1361,8 @@ timescale=1.0 [namelist:time] calendar='timestep' -calendar_origin='2021-06-02 00:00:00' -calendar_start='2021-06-02 00:00:00' +calendar_origin='2018-04-14 21:00:00' +calendar_start='2018-04-14 21:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1406,7 +1370,7 @@ timestep_start='$RESTART_START' [namelist:timestepping] alpha=0.55 dt=$DT -inner_iterations=1 +inner_iterations=2 method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' @@ -1419,9 +1383,7 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. -ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' cap_density_predictor=0.5 @@ -1438,15 +1400,14 @@ ffsl_inner_order=0 ffsl_outer_order=1 ffsl_splitting=5*1 ffsl_unity_3d=.false. -ffsl_vertical_order=2,2,1,2,2 -field_names='density','potential_temperature','wind','moisture', - ='con_tracer' +ffsl_vertical_order=5*2 +field_names='density','potential_temperature','wind','moisture','cloud' fv_horizontal_order=2 fv_vertical_order=2 horizontal_method=5*1 horizontal_monotone=5*1 -log_space=.true.,.true.,.false.,.false.,.false. -max_vert_cfl_calc='dep_point' +log_space=5*.false. +max_vert_cfl_calc='uniform' min_val_abs_tol=-1.0e-12 min_val_max_iterations=10 min_val_method='iterative' @@ -1456,7 +1417,7 @@ operators='fv' panel_edge_high_order=.true. panel_edge_treatment='none' profile_size=5 -reversible=.true.,.true.,.false.,.true.,.true. +reversible=5*.false. runge_kutta_method='ssp3' scheme=5*1 si_outer_transport='none' @@ -1466,11 +1427,10 @@ splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' -transport_ageofair=.false. use_density_predictor=.false. vertical_method=5*1 vertical_monotone=5*1 -vertical_monotone_order=5*3 +vertical_monotone_order=5*1 vertical_sl_order='cubic' wind_mono_top=.false. !!wind_mono_top_depth=5 diff --git a/rose-stem/app/jules/rose-app.conf b/rose-stem/app/jules/rose-app.conf index 019126505..73185cb90 100644 --- a/rose-stem/app/jules/rose-app.conf +++ b/rose-stem/app/jules/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-jules/vn3.0_t214 +meta=lfric-jules/vn3.0_t146 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ @@ -287,7 +287,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -982,17 +981,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -bl_segment=0 +!!bl_segment=0 blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -1002,7 +1001,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1416,7 +1415,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.true. adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.true. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/lfric2lfric/file/axis_def_main.xml b/rose-stem/app/lfric2lfric/file/axis_def_main.xml index ce91cb353..83637bd76 100644 --- a/rose-stem/app/lfric2lfric/file/axis_def_main.xml +++ b/rose-stem/app/lfric2lfric/file/axis_def_main.xml @@ -19,5 +19,4 @@ - diff --git a/rose-stem/app/lfric2lfric/file/iodef_lbc.xml b/rose-stem/app/lfric2lfric/file/iodef_lbc.xml deleted file mode 100644 index 3d2e14bd0..000000000 --- a/rose-stem/app/lfric2lfric/file/iodef_lbc.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - performance - 1.0 - - - - false - false - 50 - true - lfric2lfric lfric2lfric - - - - - diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf b/rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf deleted file mode 100644 index 629b93487..000000000 --- a/rose-stem/app/lfric2lfric/opt/rose-app-lbc.conf +++ /dev/null @@ -1,21 +0,0 @@ -[env] -RESTART_STOP=2 - -[file:iodef.xml] -source=$ROSE_SUITE_DIR/app/lfric2lfric/file/iodef_lbc.xml - -[file:source_file_lbc.nc] -mode=auto -source=$BIG_DATA_DIR/lfric2lfric/lfric_gal_diagnostics.nc - -[namelist:lfric2lfric] -destination_mesh_name='dynamics' -mode='lbc' -source_file_lbc='source_file_lbc' -source_mesh_name='C12' - -[namelist:time] -timestep_end='2' - -[namelist:timestepping] -dt=64800.0 diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index ea7ab4128..c241d4e99 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric2lfric/vn3.0_t214 +meta=lfric-lfric2lfric/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -201,7 +201,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=0 [!!namelist:damping_layer] @@ -665,11 +664,9 @@ destination_meshfile_prefix='input_mesh_faces' destination_topology='fully_periodic' dst_ancil_directory='' dst_orography_mean_ancil_path='' -mode='ics' origin_domain='global' prepartitioned_meshes=.false. regrid_method='map' -!!source_file_lbc='source_file_lbc' source_geometry='spherical' source_mesh_name='dynamics' source_meshfile_prefix='input_mesh_faces' @@ -678,7 +675,6 @@ src_ancil_directory='' src_orography_mean_ancil_path='' target_domain='global' !!weight_file='weight_file' -!!weight_file_lbc='weight_file_lbc' [namelist:logging] log_to_rank_zero_only=.true. @@ -850,17 +846,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='constant' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -869,7 +865,7 @@ ls_ppn_segment=0 !!smagorinsky_placement='fast' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1282,7 +1278,6 @@ tau_u=0 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='averaged' diff --git a/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml b/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml index fb5ee2571..cfbe24d38 100644 --- a/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml +++ b/rose-stem/app/lfric_atm/file/file_def_diags_oper_nwp_gl.xml @@ -1,5 +1,12 @@ + + + + + + + diff --git a/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml b/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml index c1bca4231..c6ea03cdf 100644 --- a/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml +++ b/rose-stem/app/lfric_atm/file/file_def_initial_diags.xml @@ -1,7 +1,7 @@ - + diff --git a/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml b/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml index b7e6d6824..881c26f5d 100644 --- a/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml +++ b/rose-stem/app/lfric_atm/file/iodef_gal_nwp_oper_hres.xml @@ -36,7 +36,6 @@ - diff --git a/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf b/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf index 3b55fae60..98ba7349e 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf @@ -214,7 +214,6 @@ orog_init_option='none' !!lowest_level='gradient' !!microphysics_placement='slow' !!orographic_drag_placement='slow' -sample_physics_winds_correction=.true. !!spectral_gwd_placement='slow' [namelist:planet] diff --git a/rose-stem/app/lfric_atm/opt/rose-app-climate.conf b/rose-stem/app/lfric_atm/opt/rose-app-climate.conf index 06d90179a..09ba98a0c 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-climate.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-climate.conf @@ -18,7 +18,6 @@ l_ukca_asad_full=.false. [namelist:cosp] l_cosp=.true. -n_cosp_step=1 n_subcol_gen=64 [namelist:energy_correction] diff --git a/rose-stem/app/lfric_atm/opt/rose-app-da.conf b/rose-stem/app/lfric_atm/opt/rose-app-da.conf index bdd892382..cc0635967 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-da.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-da.conf @@ -6,8 +6,8 @@ iau_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_um2lfric_iau_00 sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/seaice_ugrid_postqa_fixed' snow_analysis_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_glu_snow_um2lfric_fixed' sst_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/sst_ugrid_postqa_fixed' -start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/PR202' -start_dump_filename='20210324T0000Z_lfric_ice_dust_t+3' +start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/Ticket354' +start_dump_filename='20210324T0000Z_lfric_ice_t+3' [namelist:iau] iau_ainc_multifile=.false. diff --git a/rose-stem/app/lfric_atm/opt/rose-app-eda.conf b/rose-stem/app/lfric_atm/opt/rose-app-eda.conf index ea7f076b4..0921925c3 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-eda.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-eda.conf @@ -11,8 +11,8 @@ iau_surf_path='$BIG_DATA_DIR/IAU/Global/um2lfric_landda' sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/seaice_ugrid_postqa_fixed' snow_analysis_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_glu_snow_um2lfric_fixed' sst_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/sst_ugrid_postqa_fixed' -start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/PR202' -start_dump_filename='20210324T0000Z_lfric_ice_dust_t+3' +start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/Ticket354' +start_dump_filename='20210324T0000Z_lfric_ice_t+3' [namelist:iau] iau_ainc_multifile=.true. diff --git a/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf b/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf index b0162aeba..3c33f1817 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-eda_jada.conf @@ -7,8 +7,8 @@ iau_pert_path='$BIG_DATA_DIR/IAU/Global/iau_pertinc_start' sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/seaice_ugrid_postqa_fixed' snow_analysis_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_glu_snow_um2lfric_fixed' sst_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/sst_ugrid_postqa_fixed' -start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/PR202' -start_dump_filename='20210324T0000Z_lfric_ice_dust_t+3' +start_dump_directory='$BIG_DATA_DIR/start_dumps/basic-gal/yak/Ticket354' +start_dump_filename='20210324T0000Z_lfric_ice_t+3' [namelist:iau] iau_ainc_multifile=.false. diff --git a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf index 570d397b6..a4a01343d 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf @@ -226,7 +226,6 @@ orog_init_option='none' !!lowest_level='gradient' !!microphysics_placement='slow' !!orographic_drag_placement='slow' -sample_physics_winds_correction=.true. !!spectral_gwd_placement='slow' [namelist:planet] diff --git a/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf b/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf index 854cf77af..ae2cf521c 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-physics_segmentation.conf @@ -1,5 +1,7 @@ [namelist:physics] bl_segment=16 +configure_segments=.true. +conv_gr_segment=16 gw_segment=32 ls_ppn_segment=32 ussp_segment=4 diff --git a/rose-stem/app/lfric_atm/rose-app.conf b/rose-stem/app/lfric_atm/rose-app.conf index f2837c5ad..1f3d8d5dd 100644 --- a/rose-stem/app/lfric_atm/rose-app.conf +++ b/rose-stem/app/lfric_atm/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric_atm/vn3.0_t214 +meta=lfric-lfric_atm/vn3.0_t146 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ @@ -287,7 +287,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -936,17 +935,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 microphysics_placement='slow' orographic_drag_placement='slow' radiation_placement='slow' @@ -956,7 +955,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1370,7 +1369,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.true. adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.true. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf index cb64ade9d..b42304e2b 100644 --- a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf +++ b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric_atm/vn3.0_t214 +meta=lfric-lfric_atm/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -282,7 +282,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=0 [namelist:damping_layer] @@ -926,17 +925,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 microphysics_placement='slow' orographic_drag_placement='slow' radiation_placement='slow' @@ -946,7 +945,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1360,7 +1359,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.true. calculate_detj='upwind' diff --git a/rose-stem/app/linear_model/file/field_def_diags_ls.xml b/rose-stem/app/linear_model/file/field_def_diags_ls.xml deleted file mode 100644 index 8a2c34e54..000000000 --- a/rose-stem/app/linear_model/file/field_def_diags_ls.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_ancil.xml b/rose-stem/app/linear_model/file/file_def_ancil.xml deleted file mode 100644 index 43c9e9e44..000000000 --- a/rose-stem/app/linear_model/file/file_def_ancil.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_check_restart.xml b/rose-stem/app/linear_model/file/file_def_check_restart.xml deleted file mode 100644 index 05ba6dcbc..000000000 --- a/rose-stem/app/linear_model/file/file_def_check_restart.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_diags.xml b/rose-stem/app/linear_model/file/file_def_diags.xml deleted file mode 100644 index c12613f00..000000000 --- a/rose-stem/app/linear_model/file/file_def_diags.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_diags_ls.xml b/rose-stem/app/linear_model/file/file_def_diags_ls.xml deleted file mode 100644 index 0cdd03798..000000000 --- a/rose-stem/app/linear_model/file/file_def_diags_ls.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_initial.xml b/rose-stem/app/linear_model/file/file_def_initial.xml deleted file mode 100644 index 05a68968e..000000000 --- a/rose-stem/app/linear_model/file/file_def_initial.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_ls.xml b/rose-stem/app/linear_model/file/file_def_ls.xml deleted file mode 100644 index a2766a236..000000000 --- a/rose-stem/app/linear_model/file/file_def_ls.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/file_def_read.xml b/rose-stem/app/linear_model/file/file_def_read.xml deleted file mode 100644 index 61cc7f81e..000000000 --- a/rose-stem/app/linear_model/file/file_def_read.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/rose-stem/app/linear_model/file/iodef.xml b/rose-stem/app/linear_model/file/iodef.xml index fb000671f..d9d6303af 100644 --- a/rose-stem/app/linear_model/file/iodef.xml +++ b/rose-stem/app/linear_model/file/iodef.xml @@ -5,59 +5,331 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + processed__tot_col_uv_kinetic_energy + processed__tot_col_w_kinetic_energy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf b/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf index 8bf78b63c..01576bf19 100644 --- a/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf +++ b/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf @@ -62,17 +62,6 @@ fixed_ls=.false. l_stabilise_bl=.false. pert_option='analytic' -[namelist:linear_physics] -!!blevs_m=15 -!!e_folding_levs_m=10 -!!l_0_m=80.0 -l_boundary_layer=.false. -!!log_layer=2 -!!u_land_m=0.4 -!!u_sea_m=0.4 -!!z_land_m=0.05 -!!z_sea_m=0.0005 - [!!namelist:multigrid] chain_mesh_tags='','','','' diff --git a/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf index 864c6a623..4b375741d 100644 --- a/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/linear_model/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' -ls_filename='final_ls_with_land' +ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' +ls_filename='final_ls' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf b/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf index 6daa69cf5..1047582b2 100644 --- a/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf +++ b/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf @@ -63,17 +63,6 @@ fixed_ls=.false. l_stabilise_bl=.false. pert_option='analytic' -[namelist:linear_physics] -!!blevs_m=15 -!!e_folding_levs_m=10 -!!l_0_m=80.0 -l_boundary_layer=.false. -!!log_layer=2 -!!u_land_m=0.4 -!!u_sea_m=0.4 -!!z_land_m=0.05 -!!z_sea_m=0.0005 - [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 @@ -109,6 +98,4 @@ cfl_mol_2d_stab=2.0 cfl_mol_3d_stab=2.0 max_vert_cfl_calc='uniform' runge_kutta_method='ssp4' -scheme=5*1 -splitting=5*1 !!wind_mono_top_depth=0 diff --git a/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf b/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf index 14de51a9a..be23c9c84 100644 --- a/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf +++ b/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf @@ -61,17 +61,6 @@ diagnostic_frequency=20 l_stabilise_bl=.false. pert_option='analytic' -[namelist:linear_physics] -!!blevs_m=15 -!!e_folding_levs_m=10 -!!l_0_m=80.0 -l_boundary_layer=.false. -!!log_layer=2 -!!u_land_m=0.4 -!!u_sea_m=0.4 -!!z_land_m=0.05 -!!z_sea_m=0.0005 - [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 @@ -97,6 +86,4 @@ inner_iterations=2 tau_u=0.5 [namelist:transport] -scheme=5*1 -splitting=5*1 !!wind_mono_top_depth=0 diff --git a/rose-stem/app/linear_model/rose-app.conf b/rose-stem/app/linear_model/rose-app.conf index 47f8bacb6..25669733b 100644 --- a/rose-stem/app/linear_model/rose-app.conf +++ b/rose-stem/app/linear_model/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-linear_model/vn3.0_t108 +meta=lfric-linear_model/vn3.0_t146 [command] default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe @@ -62,7 +62,6 @@ source=(namelist:aerosol) = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear - = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -273,7 +272,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [namelist:damping_layer] @@ -379,7 +377,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -745,23 +743,11 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.false. +l_stabilise_bl=.true. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' -transport_efficiency=.true. - -[namelist:linear_physics] -blevs_m=15 -e_folding_levs_m=10 -l_0_m=80.0 -l_boundary_layer=.true. -log_layer=2 -u_land_m=0.4 -u_sea_m=0.4 -z_land_m=0.05 -z_sea_m=0.0005 [namelist:logging] log_to_rank_zero_only=.true. @@ -942,17 +928,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -962,7 +948,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1376,7 +1362,6 @@ tau_u=0.55 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=30000.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. @@ -1415,11 +1400,11 @@ panel_edge_treatment='none' profile_size=5 reversible=.true.,.true.,.false.,.true.,.true. runge_kutta_method='ssp3' -scheme=5*3 +scheme=5*1 si_outer_transport='none' slice_order='parabola' special_edges_monotone=5*1 -splitting=5*2 +splitting=5*1 substep_transport='off' theta_dispersion_correction=.false. theta_variable='dry' diff --git a/rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf b/rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf deleted file mode 100644 index cf587eab3..000000000 --- a/rose-stem/app/mesh/opt/rose-app-C12_MG_op.conf +++ /dev/null @@ -1,18 +0,0 @@ -[command] -default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml -srun=mkdir -p $MESH_DIR ; srun --ntasks=1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml - -[namelist:cubedsphere_mesh] -edge_cells=12,6,3 - -[namelist:mesh] -mesh_maps='dynamics:multigrid_l1','multigrid_l1:multigrid_l2' -mesh_names='dynamics','multigrid_l1','multigrid_l2' -n_meshes=3 -partition_mesh=.true. - -[namelist:partitions] -generate_inner_halos=.true. -max_stencil_depth=2 -n_partitions=6 -partition_range=0,5 diff --git a/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf b/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf index 01e28da75..8637bea24 100644 --- a/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf +++ b/rose-stem/app/mesh/opt/rose-app-C24_MG_op.conf @@ -1,6 +1,5 @@ [command] default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml -srun=mkdir -p $MESH_DIR ; srun --ntasks=1 $BIN_DIR/cubedsphere_mesh_generator mesh_generation.nml [namelist:cubedsphere_mesh] edge_cells=24,12,6,3 diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf index fcb7c2c22..c246b5d54 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf @@ -4,16 +4,215 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar +[namelist:aerosol] +aclw_file='lut/nml_ac_lw' +acsw_file='lut/nml_ac_sw' +activation_scheme='off' +anlw_file='lut/nml_an_lw' +answ_file='lut/nml_an_sw' +crlw_file='lut/nml_cr_lw' +crsw_file='lut/nml_cr_sw' +l_radaer=.true. +n_radaer_step=1 +prec_file='precalc/RADAER_pcalc.ukca' +sulphuric_strat_column=1.86604e-6 + +[namelist:blayer] +bl_levels=69 +bl_mix_w=.true. +free_atm_mix='free_trop_layer' +interp_local='gradients' +noice_in_turb=.true. +p_unstable=0.5 +relax_sc_over_cu=.true. +sbl_opt='sharpest' +sg_orog_mixing='shear_plus_lambda' + +[namelist:boundaries] +blend_frequency='inner' +blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 +lbc_eos_height=38 +lbc_method='onion_layer' +limited_area=.true. +normal_only=.true. +output_lbcs=.true. +solver_boundary_depth=4 +transport_boundary_depth=4 + +[namelist:chemistry] + +[namelist:cloud] +cld_fsd_hill=.false. +cloud_horizontal_fsd=0.65 +ez_subcrit=.false. +ice_width=0.02 +rh_crit=0.960,0.940,0.920,0.900,0.890,0.880,0.870,0.860,0.850,0.840, + =0.840,0.830,0.820,0.810,56*0.800 +rh_crit_opt='namelist' +scheme='bimodal' +subgrid_qv=.false. +use_fsd_eff_res=.false. + +[namelist:convection] +cape_timescale=1800.0 +cv_scheme='gregory_rowntree' +number_of_convection_substeps=2 + [!!namelist:cubedsphere_mesh] +[namelist:damping_layer] +dl_base=30000.0 + +[namelist:extrusion] +domain_top=40000.0 +method='um_L70_61t_9s_40km' +stretching_height=16641.984 + +[namelist:files] +ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket3510/seuk' +hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop.ugrid' +land_area_ancil_path='land_sea_mask/qrparm.mask.ugrid.fixed' +lbc_directory='$BIG_DATA_DIR/lbcs/proto-ral/Ticket3510/seuk' +lbc_filename='checkpoint_um2lfric_000001_fixedtime_date' +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70.ugrid' +plant_func_ancil_path='qrparm.veg.func.ugrid' +sea_ancil_path='general_sea/GlobColour/qrclim.sea.ugrid' +sea_ice_ancil_path='seaice/hadisst_6190/v4/qrclim.seaice.ugrid' +soil_ancil_path='qrparm.soil_cci.ugrid' +soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' +sst_ancil_path='sst/hadisst_6190/v1/qrclim.sst.ugrid' +start_dump_directory='$BIG_DATA_DIR/start_dumps/proto-ral/Ticket3510/seuk' +start_dump_filename='checkpoint_um2lfric_000001' +surface_frac_ancil_path='qrparm.veg.frac.ugrid' + +[namelist:finite_element] +coord_order=2 +coord_system='xyz' + +[namelist:formulation] +shallow=.false. + +[namelist:initialization] +lbc_option='um2lfric_file' +model_eos_height=38 +read_w2h_wind=.true. +sst_source='start_dump' + +[namelist:jules_nvegparm] +albsnc_nvg_io=0.4,0.06,0.8,0.8 +albsnf_nvg_io=0.18,0.06,-1.0,0.75 +ch_nvg_io=2.8e5,4.18e6,0.0,0.0 + +[namelist:jules_snow] +rho_snow_fresh=170.0 + +[namelist:jules_surface] +l_vary_z0m_soil=.false. + [namelist:mesh] mesh_maps='dynamics:multigrid_l1' mesh_names='dynamics','multigrid_l1' n_meshes=2 topology='non_periodic' +[namelist:microphysics] +droplet_tpr=.true. +fcrit=1.0 +graupel_scheme='modified' +microphysics_casim=.true. +ndrop_surf=10.0e6 +nscalesf=1.0 +nsigmasf=2.82843 +orog_block=.false. +orog_rain=.false. +orog_rime=.false. +prog_tnuc=.false. +shape_rime=.true. +turb_gen_mixph=.false. +z_surf=50.0 + +[namelist:mixed_solver] +fail_on_non_converged=.false. +monitor_convergence=.false. +si_method='prec_only' + +[namelist:mixing] +leonard_kl=2.0 +leonard_term=.true. +method='blend_1dbl_fa' +mix_factor=0.2 +smagorinsky=.true. + +[namelist:multigrid] +n_postsmooth=6 + +[namelist:orographic_drag] + +[namelist:orography] +orog_init_option='start_dump' + +[namelist:partitioning] +partitioner='planar' + +[namelist:physics] +convection_placement='fast' +electric_placement='slow' +orographic_drag_placement='slow' +smagorinsky_placement='fast' +spectral_gwd_placement='slow' + [namelist:planar_mesh] edge_cells_x=32,64 edge_cells_y=32,64 periodic_x=.false. periodic_y=.false. + +[namelist:radiation] +cloud_inhomogeneity='scaling' +cloud_overlap='maximum_random' +cloud_representation='liquid_and_ice' +cloud_vertical_decorr=10000.0 +i_cloud_ice_type_lwinc=11 +i_cloud_ice_type_swinc=11 +i_cloud_liq_type_lwinc=5 +i_cloud_liq_type_swinc=5 +l_inc_radstep=.true. +liu_aparam=0.07 +liu_bparam=-0.14 +n_horiz_ang=16 +n_horiz_layer=1 +n_inc_radstep=5 +n_radstep=15 +scatter_method_lwinc='approx' +spectral_file_lw='spec/sp_lw_ga7' +spectral_file_lwinc='spec/sp_lw_cloud7' +spectral_file_sw='spec/sp_sw_ga7' +spectral_file_swinc='spec/sp_sw_cloud7' +topography='horizon' + +[namelist:section_choice] +aerosol='none' +chemistry='none' +convection='none' +electric='um' +methane_oxidation=.false. +orographic_drag='none' +spectral_gwd='none' + +[namelist:spectral_gwd] +cgw_scale_factor=1.05 + +[namelist:surface] +alb_snocov_max=1.5e-1,1.5e-1,6.0e-1,6.0e-1,4.0e-1 +buddy_sea='Off' +z0hm_ratio_pft=1.00,1.00,0.022,0.022,0.025 +z0v=1.1,1.1,0.1,0.1,0.4 + +[namelist:time] +calendar_origin='2021-07-29 00:00:00' +calendar_start='2021-07-29 00:00:00' + +[namelist:transport] +extended_mesh=.false. diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf index fcb7c2c22..daf0db140 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf @@ -4,16 +4,210 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar +[namelist:aerosol] +activation_scheme='off' +glomap_mode='climatology' +n_radaer_step=4 + +[namelist:blayer] +bl_levels=69 +bl_mix_w=.true. +free_atm_mix='free_trop_layer' +interp_local='gradients' +noice_in_turb=.true. +p_unstable=0.5 +relax_sc_over_cu=.true. +sbl_opt='sharpest' +sg_orog_mixing='shear_plus_lambda' + +[namelist:boundaries] +blend_frequency='inner' +blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 +lbc_eos_height=10 +lbc_method='onion_layer' +limited_area=.true. +normal_only=.true. +output_lbcs=.true. +solver_boundary_depth=4 +transport_boundary_depth=4 + +[namelist:chemistry] + +[namelist:cloud] +cld_fsd_hill=.false. +cloud_horizontal_fsd=0.65 +ez_subcrit=.false. +ice_width=0.02 +rh_crit=0.960,0.940,0.920,0.900,0.890,0.880,0.870,0.860,0.850,0.840, + =0.840,0.830,0.820,0.810,56*0.800 +rh_crit_opt='namelist' +scheme='bimodal' +subgrid_qv=.false. +use_fsd_eff_res=.false. + +[namelist:convection] +cape_timescale=1800.0 +cv_scheme='gregory_rowntree' +number_of_convection_substeps=2 + [!!namelist:cubedsphere_mesh] +[namelist:damping_layer] +dl_base=30000.0 + +[namelist:extrusion] +domain_top=40000.0 +method='um_L70_61t_9s_40km' +stretching_height=16641.984 + +[namelist:files] +aerosols_ancil_path='aerosol_clims/glomap/glomap_clim_n48_v2.ugrid' +ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket3510/uk' +hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop.ugrid' +land_area_ancil_path='land_sea_mask/qrparm.mask.ugrid.fixed' +lbc_directory='$BIG_DATA_DIR/lbcs/proto-ral/Ticket3510/uk_new' +lbc_filename='lbc_fixedtime_000' +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' +ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70.ugrid' +plant_func_ancil_path='qrparm.veg.func.ugrid' +sea_ancil_path='general_sea/GlobColour/qrclim.sea.ugrid' +sea_ice_ancil_path='seaice/hadisst_6190/v4/qrclim.seaice.ugrid' +soil_ancil_path='qrparm.soil_cci.ugrid' +soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' +sst_ancil_path='sst/hadisst_6190/v1/qrclim.sst.ugrid' +start_dump_directory='$BIG_DATA_DIR/start_dumps/proto-ral/Ticket3510/uk_new' +start_dump_filename='checkpoint_um2lfric_000001' +surface_frac_ancil_path='qrparm.veg.frac.ugrid' + +[namelist:finite_element] +coord_order=2 +coord_system='xyz' + +[namelist:formulation] +shallow=.false. + +[namelist:initialization] +lbc_option='um2lfric_file' +model_eos_height=38 +read_w2h_wind=.true. +sst_source='start_dump' + +[namelist:jules_nvegparm] +albsnc_nvg_io=0.4,0.06,0.8,0.8 +albsnf_nvg_io=0.18,0.06,-1.0,0.75 +ch_nvg_io=2.8e5,4.18e6,0.0,0.0 + +[namelist:jules_snow] +rho_snow_fresh=170.0 + +[namelist:jules_surface] +l_vary_z0m_soil=.false. + [namelist:mesh] mesh_maps='dynamics:multigrid_l1' mesh_names='dynamics','multigrid_l1' n_meshes=2 topology='non_periodic' +[namelist:microphysics] +droplet_tpr=.true. +fcrit=1.0 +graupel_scheme='modified' +microphysics_casim=.true. +ndrop_surf=10.0e6 +nscalesf=1.0 +nsigmasf=2.82843 +orog_block=.false. +orog_rain=.false. +orog_rime=.false. +prog_tnuc=.false. +shape_rime=.true. +turb_gen_mixph=.false. +z_surf=50.0 + +[namelist:mixed_solver] +fail_on_non_converged=.false. +monitor_convergence=.false. +si_method='prec_only' + +[namelist:mixing] +leonard_kl=2.0 +leonard_term=.true. +method='blend_1dbl_fa' +mix_factor=0.2 +smagorinsky=.true. + +[namelist:multigrid] +n_postsmooth=6 + +[namelist:orographic_drag] + +[namelist:orography] +orog_init_option='start_dump' + +[namelist:partitioning] +partitioner='planar' + +[namelist:physics] +convection_placement='fast' +electric_placement='slow' +orographic_drag_placement='slow' +smagorinsky_placement='fast' +spectral_gwd_placement='slow' + [namelist:planar_mesh] edge_cells_x=32,64 edge_cells_y=32,64 periodic_x=.false. periodic_y=.false. + +[namelist:radiation] +cloud_inhomogeneity='scaling' +cloud_overlap='maximum_random' +cloud_representation='liquid_and_ice' +cloud_vertical_decorr=10000.0 +i_cloud_ice_type_lwinc=11 +i_cloud_ice_type_swinc=11 +i_cloud_liq_type_lwinc=5 +i_cloud_liq_type_swinc=5 +l_inc_radstep=.true. +liu_aparam=0.07 +liu_bparam=-0.14 +n_horiz_ang=16 +n_horiz_layer=1 +n_inc_radstep=5 +n_radstep=15 +scatter_method_lwinc='approx' +spectral_file_lw='spec/sp_lw_ga7' +spectral_file_lwinc='spec/sp_lw_cloud7' +spectral_file_sw='spec/sp_sw_ga7' +spectral_file_swinc='spec/sp_sw_cloud7' +topography='horizon' + +[namelist:section_choice] +chemistry='none' +convection='none' +electric='um' +methane_oxidation=.false. +orographic_drag='none' +spectral_gwd='none' + +[namelist:spectral_gwd] +cgw_scale_factor=1.05 + +[namelist:subgrid] +dep_pt_stencil_extent=5 + +[namelist:surface] +alb_snocov_max=1.5e-1,1.5e-1,6.0e-1,6.0e-1,4.0e-1 +buddy_sea='Off' +z0hm_ratio_pft=1.00,1.00,0.022,0.022,0.025 +z0v=1.1,1.1,0.1,0.1,0.4 + +[namelist:time] +calendar_origin='2021-07-29 00:00:00' +calendar_start='2021-07-29 00:00:00' + +[namelist:transport] +extended_mesh=.false. diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf index fcb7c2c22..557ac431f 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf @@ -4,16 +4,210 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar +[namelist:aerosol] +activation_scheme='off' +glomap_mode='climatology' +n_radaer_step=4 + +[namelist:blayer] +bl_levels=69 +bl_mix_w=.true. +free_atm_mix='free_trop_layer' +interp_local='gradients' +noice_in_turb=.true. +p_unstable=0.5 +relax_sc_over_cu=.true. +sbl_opt='sharpest' +sg_orog_mixing='shear_plus_lambda' + +[namelist:boundaries] +blend_frequency='inner' +blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 +lbc_eos_height=10 +lbc_method='onion_layer' +limited_area=.true. +normal_only=.true. +output_lbcs=.true. +solver_boundary_depth=4 +transport_boundary_depth=4 + +[namelist:chemistry] + +[namelist:cloud] +cld_fsd_hill=.false. +cloud_horizontal_fsd=0.65 +ez_subcrit=.false. +ice_width=0.02 +rh_crit=0.960,0.940,0.920,0.900,0.890,0.880,0.870,0.860,0.850,0.840, + =0.840,0.830,0.820,0.810,56*0.800 +rh_crit_opt='namelist' +scheme='bimodal' +subgrid_qv=.false. +use_fsd_eff_res=.false. + +[namelist:convection] +cape_timescale=1800.0 +cv_scheme='gregory_rowntree' +number_of_convection_substeps=2 + [!!namelist:cubedsphere_mesh] +[namelist:damping_layer] +dl_base=30000.0 + +[namelist:extrusion] +domain_top=40000.0 +method='um_L70_61t_9s_40km' +stretching_height=16641.984 + +[namelist:files] +aerosols_ancil_path='aerosol_clims/glomap/glomap_clim_n48_v2.ugrid' +ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket4248/var_uk' +hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop.ugrid' +land_area_ancil_path='land_sea_mask/qrparm.mask.ugrid.fixed' +lbc_directory='$BIG_DATA_DIR/lbcs/proto-ral/Ticket4248/var_uk' +lbc_filename='lbc_fixedtime_000' +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog_horizon.ugrid' +orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog_horizon.ugrid' +ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70.ugrid' +plant_func_ancil_path='qrparm.veg.func.ugrid' +sea_ancil_path='general_sea/GlobColour/qrclim.sea.ugrid' +sea_ice_ancil_path='seaice/hadisst_6190/v4/qrclim.seaice.ugrid' +soil_ancil_path='qrparm.soil_cci.ugrid' +soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' +sst_ancil_path='sst/hadisst_6190/v1/qrclim.sst.ugrid' +start_dump_directory='$BIG_DATA_DIR/start_dumps/proto-ral/Ticket4248/var_uk' +start_dump_filename='checkpoint_um2lfric_000001' +surface_frac_ancil_path='qrparm.veg.frac.ugrid' + +[namelist:finite_element] +coord_order=2 +coord_system='xyz' + +[namelist:formulation] +shallow=.false. + +[namelist:initialization] +lbc_option='um2lfric_file' +model_eos_height=38 +read_w2h_wind=.true. +sst_source='start_dump' + +[namelist:jules_nvegparm] +albsnc_nvg_io=0.4,0.06,0.8,0.8 +albsnf_nvg_io=0.18,0.06,-1.0,0.75 +ch_nvg_io=2.8e5,4.18e6,0.0,0.0 + +[namelist:jules_snow] +rho_snow_fresh=170.0 + +[namelist:jules_surface] +l_vary_z0m_soil=.false. + [namelist:mesh] mesh_maps='dynamics:multigrid_l1' mesh_names='dynamics','multigrid_l1' n_meshes=2 topology='non_periodic' +[namelist:microphysics] +droplet_tpr=.true. +fcrit=1.0 +graupel_scheme='modified' +microphysics_casim=.true. +ndrop_surf=10.0e6 +nscalesf=1.0 +nsigmasf=2.82843 +orog_block=.false. +orog_rain=.false. +orog_rime=.false. +prog_tnuc=.false. +shape_rime=.true. +turb_gen_mixph=.false. +z_surf=50.0 + +[namelist:mixed_solver] +fail_on_non_converged=.false. +monitor_convergence=.false. +si_method='prec_only' + +[namelist:mixing] +leonard_kl=2.0 +leonard_term=.true. +method='blend_1dbl_fa' +mix_factor=0.2 +smagorinsky=.true. + +[namelist:multigrid] +n_postsmooth=6 + +[namelist:orographic_drag] + +[namelist:orography] +orog_init_option='start_dump' + +[namelist:partitioning] +partitioner='planar' + +[namelist:physics] +convection_placement='fast' +electric_placement='slow' +orographic_drag_placement='slow' +smagorinsky_placement='fast' +spectral_gwd_placement='slow' + [namelist:planar_mesh] edge_cells_x=32,64 edge_cells_y=32,64 periodic_x=.false. periodic_y=.false. + +[namelist:radiation] +cloud_inhomogeneity='scaling' +cloud_overlap='maximum_random' +cloud_representation='liquid_and_ice' +cloud_vertical_decorr=10000.0 +i_cloud_ice_type_lwinc=11 +i_cloud_ice_type_swinc=11 +i_cloud_liq_type_lwinc=5 +i_cloud_liq_type_swinc=5 +l_inc_radstep=.true. +liu_aparam=0.07 +liu_bparam=-0.14 +n_horiz_ang=16 +n_horiz_layer=1 +n_inc_radstep=5 +n_radstep=15 +scatter_method_lwinc='approx' +spectral_file_lw='spec/sp_lw_ga7' +spectral_file_lwinc='spec/sp_lw_cloud7' +spectral_file_sw='spec/sp_sw_ga7' +spectral_file_swinc='spec/sp_sw_cloud7' +topography='horizon' + +[namelist:section_choice] +chemistry='none' +convection='none' +electric='um' +methane_oxidation=.false. +orographic_drag='none' +spectral_gwd='none' + +[namelist:spectral_gwd] +cgw_scale_factor=1.05 + +[namelist:subgrid] +dep_pt_stencil_extent=5 + +[namelist:surface] +alb_snocov_max=1.5e-1,1.5e-1,6.0e-1,6.0e-1,4.0e-1 +buddy_sea='Off' +z0hm_ratio_pft=1.00,1.00,0.022,0.022,0.025 +z0v=1.1,1.1,0.1,0.1,0.4 + +[namelist:time] +calendar_origin='2021-07-29 00:00:00' +calendar_start='2021-07-29 00:00:00' + +[namelist:transport] +extended_mesh=.false. diff --git a/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf b/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf index 311c21616..3ac0ca473 100644 --- a/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf +++ b/rose-stem/app/mesh/opt/rose-app-seuk_MG.conf @@ -15,13 +15,10 @@ rotate_mesh=.true. topology='non_periodic' [namelist:planar_mesh] -create_lbc_mesh=.true. domain_centre=1.69,-0.97 domain_size=1.28,0.96 edge_cells_x=64,32,16,8 edge_cells_y=64,32,16,8 -lbc_parent_mesh='dynamics' -lbc_rim_depth=4 periodic_x=.false. periodic_y=.false. diff --git a/rose-stem/app/name_transport/rose-app.conf b/rose-stem/app/name_transport/rose-app.conf index e1d674d67..c6059d791 100644 --- a/rose-stem/app/name_transport/rose-app.conf +++ b/rose-stem/app/name_transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-name_transport/vn3.0_t214 +meta=lfric-name_transport/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -241,7 +241,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -899,17 +898,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -919,7 +918,7 @@ ls_ppn_segment=0 !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1333,7 +1332,6 @@ tau_u=0.5 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/app/ngarch/rose-app.conf b/rose-stem/app/ngarch/rose-app.conf index bf6105f54..3d09e49e6 100644 --- a/rose-stem/app/ngarch/rose-app.conf +++ b/rose-stem/app/ngarch/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-ngarch/vn3.0_t214 +meta=lfric-ngarch/vn3.0_t146 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ @@ -270,7 +270,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -961,17 +960,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 limit_drag_incs=.false. lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -981,7 +980,7 @@ sample_physics_winds_correction=.false. !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1413,7 +1412,6 @@ tau_u=0.5 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. ageofair_reset_level=10 broken_w2_projection=.false. diff --git a/rose-stem/app/shallow_water/rose-app.conf b/rose-stem/app/shallow_water/rose-app.conf index f649c3271..6fe8c8944 100644 --- a/rose-stem/app/shallow_water/rose-app.conf +++ b/rose-stem/app/shallow_water/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-shallow_water/vn3.0_t214 +meta=lfric-shallow_water/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -236,7 +236,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -872,17 +871,17 @@ panel_decomposition='auto' partitioner='cubedsphere' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -892,7 +891,7 @@ ls_ppn_segment=0 !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1322,7 +1321,6 @@ tau_u=0.0 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.true. calculate_detj='upwind' diff --git a/rose-stem/app/transport/rose-app.conf b/rose-stem/app/transport/rose-app.conf index fa61064ae..577cab0f2 100644 --- a/rose-stem/app/transport/rose-app.conf +++ b/rose-stem/app/transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-transport/vn3.0_t214 +meta=lfric-transport/vn3.0_t146 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -240,7 +240,6 @@ resdep_precipramp=.false. [namelist:cosp] l_cosp=.false. -!!n_cosp_step=1 !!n_subcol_gen=64 [!!namelist:damping_layer] @@ -895,17 +894,17 @@ panel_decomposition='auto' partitioner='planar' [namelist:physics] -bl_segment=0 +!!bl_segment=0 !!blayer_placement='fast' -configure_segments=.true. -conv_gr_segment=16 +configure_segments=.false. +!!conv_gr_segment=16 !!convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' -gw_segment=0 +!!gw_segment=0 !!limit_drag_incs=.false. !!lowest_level='gradient' -ls_ppn_segment=0 +!!ls_ppn_segment=0 !!microphysics_placement='slow' !!orographic_drag_placement='slow' !!radiation_placement='slow' @@ -915,7 +914,7 @@ ls_ppn_segment=0 !!smagorinsky_placement='end' !!spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' -ussp_segment=0 +!!ussp_segment=0 [namelist:planet] cp=1005.0 @@ -1329,7 +1328,6 @@ tau_u=0.5 [namelist:transport] adjust_theta=.false. !!adjust_theta_above=0.0 -adjust_tracer_equation=.false. adjust_vhv_wind=.false. broken_w2_projection=.false. calculate_detj='upwind' diff --git a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc index b446910a0..17c6843c5 100644 --- a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc +++ b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc @@ -34,47 +34,6 @@ "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", }) %} -{% elif task_ns.conf_name == "baroclinic-C48_MG" %} - - {% do task_dict.update({ - "opt_confs": ["baroclinic"], - "resolution": "C48_MG", - "DT": 3600, - "threads": 4, - "mpi_parts": 6, - "tsteps": 240, - "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", - }) %} -{% elif task_ns.conf_name == "baroclinic-C48_MG-3panel" %} - - {% do task_dict.update({ - "opt_confs": ["baroclinic"], - "resolution": "C48_MG", - "DT": 3600, - "threads": 2, - "mpi_parts": 12, - "panel_decomp": "custom", - "xproc": 2, - "yproc": 3, - "tsteps": 240, - "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", - }) %} - -{% elif task_ns.conf_name == "baroclinic-C48_MG-2panel" %} - - {% do task_dict.update({ - "opt_confs": ["baroclinic"], - "resolution": "C48_MG", - "DT": 3600, - "threads": 1, - "mpi_parts": 27, - "panel_decomp": "custom", - "xproc": 3, - "yproc": 3, - "tsteps": 240, - "plot_str": "baroclinic.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR dcmip dry surface_pressure_temperature", - }) %} - {% elif task_ns.conf_name == "baroclinic-pert-C24_MG" %} {% do task_dict.update({ diff --git a/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc b/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc index 25cf5232d..22c3c0742 100644 --- a/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc +++ b/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc @@ -5,11 +5,12 @@ {# ########################################################################### #} {% do LOG.debug("Entered site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc") %} -{% if task_ns.conf_name == "nwp_gal9-C12_MG" %} +{% if task_ns.conf_name == "nwp_gal9-C12" %} {% do task_dict.update({ - "opt_confs": ["nwp_gal9_c12"], - "resolution": "C12_MG", + "opt_confs": ["nwp_gal9"], + "resolution": "C12", + "ancil_resolution": "C12", "DT": 1800, "tsteps": 12, "mpi_parts": 6, @@ -20,7 +21,7 @@ {% do task_dict.update({ "opt_confs": ["runge-kutta"], "resolution": "C12", - "DT": 1, + "ancil_resolution": "C12", "tsteps": 20, }) %} @@ -60,226 +61,181 @@ "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_forecast_tl_nwp_gal9-C12_MG" %} +{% elif task_ns.conf_name == "tlm_forecast_tl_default-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_forecast_tl", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "id_tlm_tests_nwp_gal9-C12_MG" %} +{% elif task_ns.conf_name == "id_tlm_tests_default-C12" %} {% do task_dict.update({ "app_name": "jedi_id_tlm_tests", - "opt_confs": ["nwp_gal9_c12"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "id_tlm_tests_nwp_gal9-1PE-C12_MG" %} +{% elif task_ns.conf_name == "id_tlm_tests_default-1PE-C12" %} {% do task_dict.update({ "app_name": "jedi_id_tlm_tests", - "opt_confs": ["nwp_gal9_c12"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 1, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-1PE-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-1PE-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 1, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-4OMP-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-4OMP-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG", - "ancil_resolution": "C12", - "DT": 1800, - "tsteps": 13, - "mpi_parts": 6, - "threads": 4, - }) %} - -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG" %} - - {% do task_dict.update({ - "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "real_increment"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 6, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-1PE-4OMP-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-1PE-4OMP-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG", + "opt_confs": ["default"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 1, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-dry-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], - "resolution": "C12_MG", + "opt_confs": ["default", "dry"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 6, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-1PE-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-dry-1PE-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], - "resolution": "C12_MG", + "opt_confs": ["default", "dry"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 1, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-4OMP-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-dry-4OMP-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], - "resolution": "C12_MG", + "opt_confs": ["default", "dry"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 6, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG" %} +{% elif task_ns.conf_name == "tlm_tests_default-dry-1PE-4OMP-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver", "dry"], - "resolution": "C12_MG", + "opt_confs": ["default", "dry"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 1, "threads": 4, }) %} -{% elif task_ns.conf_name == "tlm_forecast_tl_nwp_gal9-C12_MG_op" %} - {% do task_dict.update({ - "app_name": "jedi_tlm_forecast_tl", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG_op", - "ancil_resolution": "C12", - "DT": 1800, - "tsteps": 13, - "mpi_parts": 6, - }) %} -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-C12_MG_op" %} +{% elif task_ns.conf_name == "tlm_tests_default-relaxed_solver-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C12_MG_op", + "opt_confs": ["default", "relaxed_solver"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, + "DT": 3600, "tsteps": 13, "mpi_parts": 6, }) %} - -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG" %} - +{% elif task_ns.conf_name == "tlm_tests_default-relaxed_solver-1PE-C12" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c12", "rrt_equals_dt", "strict_solver"], - "resolution": "C12_MG", + "opt_confs": ["default", "relaxed_solver"], + "resolution": "C12", "ancil_resolution": "C12", - "DT": 1800, - "tsteps": 13, - "mpi_parts": 6, - "threads": 4, - }) %} - -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-4OMP-C224_MG" %} - - {% do task_dict.update({ - "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c224", "rrt_equals_dt", "semi_strict_solver"], - "resolution": "C224_MG", - "ancil_resolution": "C224", - "DT": 1800, + "DT": 3600, "tsteps": 13, - "mpi_parts": 1176, - "threads": 4, + "mpi_parts": 1, }) %} - -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-real_increment-4OMP-C224_MG" %} - +{% elif task_ns.conf_name == "tlm_forecast_tl_default-C12_op" %} {% do task_dict.update({ - "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c224", "rrt_equals_dt", "real_increment", "semi_strict_solver"], - "resolution": "C224_MG", - "ancil_resolution": "C224", + "app_name": "jedi_tlm_forecast_tl", + "opt_confs": ["default"], + "resolution": "C12_op", + "ancil_resolution": "C12", "DT": 1800, "tsteps": 13, - "mpi_parts": 1176, - "threads": 4, + "mpi_parts": 6, }) %} - -{% elif task_ns.conf_name == "tlm_tests_nwp_gal9-strict_solver-4OMP-C224_MG" %} - +{% elif task_ns.conf_name == "tlm_tests_default-C12_op" %} {% do task_dict.update({ "app_name": "jedi_tlm_tests", - "opt_confs": ["nwp_gal9_c224", "rrt_equals_dt", "strict_solver"], - "resolution": "C224_MG", - "ancil_resolution": "C224", - "DT": 1800, + "opt_confs": ["default"], + "resolution": "C12_op", + "ancil_resolution": "C12", + "DT": 3600, "tsteps": 13, - "mpi_parts": 1176, - "threads": 4, + "mpi_parts": 6, }) %} {% elif task_ns.conf_name == "integration_tests" %} @@ -306,22 +262,19 @@ {# List of configuration names that have no kgo #} {% set no_kgo = [ - "id_tlm_tests_nwp_gal9-C12_MG", - "id_tlm_tests_nwp_gal9-1PE-C12_MG", - "tlm_tests_nwp_gal9-C12_MG", - "tlm_tests_nwp_gal9-C12_MG_op", - "tlm_tests_nwp_gal9-1PE-C12_MG", - "tlm_tests_nwp_gal9-4OMP-C12_MG", - "tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG", - "tlm_tests_nwp_gal9-1PE-4OMP-C12_MG", - "tlm_tests_nwp_gal9-dry-C12_MG", - "tlm_tests_nwp_gal9-dry-4OMP-C12_MG", - "tlm_tests_nwp_gal9-dry-1PE-C12_MG", - "tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG", - "tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG", - "tlm_tests_nwp_gal9-4OMP-C224_MG", - "tlm_tests_nwp_gal9-real_increment-4OMP-C224_MG", - "tlm_tests_nwp_gal9-strict_solver-4OMP-C224_MG" + "id_tlm_tests_default-C12", + "id_tlm_tests_default-1PE-C12", + "tlm_tests_default-C12", + "tlm_tests_default-C12_op", + "tlm_tests_default-1PE-C12", + "tlm_tests_default-4OMP-C12", + "tlm_tests_default-1PE-4OMP-C12", + "tlm_tests_default-dry-C12", + "tlm_tests_default-dry-4OMP-C12", + "tlm_tests_default-dry-1PE-C12", + "tlm_tests_default-dry-1PE-4OMP-C12", + "tlm_tests_default-relaxed_solver-C12", + "tlm_tests_default-relaxed_solver-1PE-C12" ] %} {% if task_ns.conf_name not in no_kgo %} diff --git a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc index b68dc1efc..26e8a9af8 100644 --- a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc +++ b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc @@ -102,21 +102,7 @@ "opt_confs": ["clim_gal9_ral_seuk","oasis"], "resolution": "C12_C16_lam", "dst_mesh": "seuk_MG", - "dst_name": "dynamics", - "dst_type": "regional", - "src_mesh": "C24_C12", - "src_name": "C12", - "src_type": "global", - }) %} - -{% elif task_ns.conf_name == "oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc" %} - - {# dst_name will need to change to "dynamics-lbc" when lbc meshes can be read #} - {% do task_dict.update({ - "opt_confs": ["clim_gal9_ral_seuk","oasis","lbc"], - "resolution": "C12_C16_lam", - "dst_mesh": "seuk_MG", - "dst_name": "dynamics-lbc", + "dst_name": "multigrid_l1", "dst_type": "regional", "src_mesh": "C24_C12", "src_name": "C12", diff --git a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc index a49293d58..d24f3d962 100644 --- a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc +++ b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc @@ -245,19 +245,6 @@ "log_level": "error", }) %} -{% elif task_ns.conf_name == "nwp_gal9_ls_and_jedi-C224_MG" %} - - {% do task_dict.update({ - "opt_confs": ["um_dump","ls_and_jedi","june_case"], - "resolution": "C224_MG", - "DT": 720, - "tsteps": 35, - "mpi_parts": 1176, - "wallclock": 10, - "xios_nodes": 4, - "mpi_parts_xios" : 16, - }) %} - {% elif task_ns.conf_name == "nwp_gal9-C896_MG" %} {% do task_dict.update({ @@ -448,31 +435,12 @@ "opt_confs": ["um_dump","no_diags"], "resolution": "C12", "DT": 1800, - "tsteps": 6, + "tsteps": 2, "crun": 2, "mpi_parts": 6, "kgo_checks": ["checksum"], }) %} -{# Share Global Configurations - extended by Performance setups#} -{% elif task_ns.conf_name.startswith("nwp_gal9-C896_MG") %} - - {% do task_dict.update({ - "CXI_MATCH_hybrid": true, - "opt_confs": ["um_dump"], - "resolution": "C896_MG", - "DT": 240, - "tsteps": 120, - "wallclock": 15, - "mpi_parts": 4704, - "xios_nodes": 4, - "mpi_parts_xios" : 128, - "log_level": "info", - "log_to_rank_zero_only": ".true.", - "memory_plot_ex": true, - "plot_str": "plot_map.py $NODAL_DATA_DIR/lfric_diagnostics.nc $PLOT_DIR", - }) %} - {# ###################################################################### #} {# Global Climate jobs #} {# ###################################################################### #} @@ -1191,25 +1159,4 @@ {% endif %} {% endif %} -{# Extensions to the Shared Global Configurations - Performance setups#} -{% if task_ns.conf_name.startswith("nwp_gal9-C896_MG_720t") %} - - {% do task_dict.update({ - "opt_confs": ["um_dump"], - "tsteps": 720, - "wallclock": 60, - "plot_str": "", - "restart_write": false, - }) %} -{% endif %} - -{% if task_ns.conf_name.startswith("nwp_gal9-C896_MG_720t_opDiag") %} - - {% do task_dict.update({ - "opt_confs": ["um_dump","oper_diags_hres"], - }) %} - -{% endif %} - - {% do LOG.debug("Finished in site/common/lfric_atm/tasks_lfric_atm.cylc") %} diff --git a/rose-stem/site/common/linear_model/tasks_linear_model.cylc b/rose-stem/site/common/linear_model/tasks_linear_model.cylc index fb054999f..23b91946c 100644 --- a/rose-stem/site/common/linear_model/tasks_linear_model.cylc +++ b/rose-stem/site/common/linear_model/tasks_linear_model.cylc @@ -13,7 +13,7 @@ "DT": 1800, "tsteps": 12, "mpi_parts": 6, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C12 theta:exner:rho:u_in_w3:v_in_w3:m_v:m_cl:m_r:m_cf 120:0:5", + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C12 theta:exner:rho:u_in_w2h:v_in_w2h:w_in_wth:m_v:m_cl:m_r:m_s 120:0:5", }) %} {% elif task_ns.conf_name == "nwp_gal9-C224_MG" %} @@ -27,8 +27,8 @@ "xios_nodes": 4, "mpi_parts_xios" : 16, "log_level": "debug", - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C224 theta:exner:rho:u_in_w3 120:0:5", "tech-tests_wallclock": 30, + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C224 theta:exner:rho:u_in_w2h 120:0:5", }) %} {% elif task_ns.conf_name == "nwp_gal9_random-C12_MG" %} @@ -39,7 +39,7 @@ "DT": 1800, "tsteps": 12, "mpi_parts": 6, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_random theta:exner:rho:u_in_w3:v_in_w3:m_v:m_cl:m_r:m_cf 120:0:5", + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_random theta:exner:rho:u_in_w2h:v_in_w2h:w_in_wth:m_v:m_cl:m_r:m_s 120:0:5", }) %} {% elif task_ns.conf_name == "nwp_gal9_zero-C12_MG" %} @@ -50,7 +50,6 @@ "DT": 1800, "tsteps": 12, "mpi_parts": 6, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_random theta:exner:rho:m_v:m_cl:m_r:m_cf 120:0:5", }) %} {% elif task_ns.conf_name == "runge-kutta-C12" %} @@ -82,7 +81,7 @@ "DT": 10, "tsteps": 180, "mpi_parts": 12, - "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 10 linear_model-dcmip theta:exner:rho:u_in_w3:v_in_w3 120:0:5" + "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 10 linear_model-dcmip theta:exner:rho:u_in_w2h:v_in_w2h:w_in_wth 120:0:5" }) %} {% elif task_ns.conf_name == "canned" %} diff --git a/rose-stem/site/meto/common/suite_config_ex1a.cylc b/rose-stem/site/meto/common/suite_config_ex1a.cylc index c2ed92455..82cdcf837 100644 --- a/rose-stem/site/meto/common/suite_config_ex1a.cylc +++ b/rose-stem/site/meto/common/suite_config_ex1a.cylc @@ -5,11 +5,7 @@ {# ########################################################################### #} {% do LOG.debug("Entered site/meto/common/suite_config_ex1a.cylc") %} -{% if site_vars.ex_trustzone == "collab" %} -{% set ex1a_base = 'module use /projects/metoff/spackadmin.mon/releases/2025.12.18/ngms' %} -{% else %} {% set ex1a_base = 'module use /common/internal/spack/releases/2025.10.1/ngms' %} -{% endif %} {% set ex1a_compiler_gnu = 'module switch cpe/22.11 cpe/23.05 ; ' ~ 'module load PrgEnv-gnu ; '~ @@ -23,11 +19,11 @@ 'module load cray-mpich/8.1.27 ; '~ 'module load lfric-cray/15.0.0/3.0+ || true ' %} -{% set ex1a_coupled_cce = 'module unload xios/2701 || true ; ' ~ +{% set ex1a_coupled_cce = 'module unload xios/2701-h57fm7d || true ; ' ~ 'module load cray-hdf5-parallel ; ' ~ 'module load cray-netcdf-hdf5parallel ; ' ~ 'module use /data/users/moci/modules_ngms/modules ; '~ - 'module load GC6-PrgEnv/2026-01-lfric_apps_coupled_port-cpe23.05-mpich8.1.27/5889.lua ; ' + 'module load GC4-PrgEnv/2024-01-lfric_apps_coupled_port-cpe23.05/5548.lua ; ' 'module load scitools' %} {% set ex1a_coupled_run = '. $BIG_DATA_DIR/ancils/lfric_coupled/ocean/ocean_ancil_GO8p0_CORE_forcing_eORCA025 ; ' ~ @@ -52,9 +48,6 @@ ROSE_LAUNCHER = 'mpiexec' OMP_STACKSIZE=1g - [[EX1A_WEIGHTS]] - inherit = EX1A_BASE - [[EX1A_BUILD]] [[[environment]]] TRANSMUTE_INCLUDE_METHOD = specify_include @@ -67,9 +60,7 @@ [[EX1A_RUN]] [[[environment]]] {# BIG_DATA_DIR holds ancils and dump files #} -{% if site_vars["ex_trustzone"] == "collab" %} - BIG_DATA_DIR = '/data/users/lfricadmin.mon/data' -{% elif site_vars["host_ex"] == "exz" %} +{% if site_vars["host_ex"] == "exz" %} BIG_DATA_DIR = '/common/internal/lfricdir/data' {% else %} BIG_DATA_DIR = '/data/users/lfricadmin/data' @@ -185,28 +176,11 @@ module list 2>&1 """ - [[EX1A_SCRIPTS]] - inherit = EX1A_TECH - [[EX1A_EXPORT-SOURCE]] inherit=METO_ORIG [[[environment]]] -{% if site_vars["ex_trustzone"] == "collab" %} - PLATFORM_SYNC = false -{% else %} hostname = $(rose host-select {{site_vars.host_ex}}) PLATFORM_SYNC = true -{% endif %} - - [[EX1A_REMOTE_INIT]] - inherit = EX1A_BASE - [[[directives]]] -{% if site_vars["ex_trustzone"] == "collab" %} - -q = collabshared -{% else %} - -q = shared -{% endif %} - -l ncpus=1 [[EX1A_HOUSEKEEPING]] inherit=EX1A_TECH_BASE diff --git a/rose-stem/site/meto/groups/groups_adjoint_tests.cylc b/rose-stem/site/meto/groups/groups_adjoint_tests.cylc index 7cbcc9a12..35ba5c497 100644 --- a/rose-stem/site/meto/groups/groups_adjoint_tests.cylc +++ b/rose-stem/site/meto/groups/groups_adjoint_tests.cylc @@ -8,7 +8,6 @@ {# Azspice Groups #} {% do site_groups.update({ "adjoint_tests_azspice_developer": [ - "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_production-32bit", "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_full-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG-varying_LS_azspice_gnu_fast-debug-64bit-rsolver64", @@ -21,7 +20,7 @@ "adjoint_tests_canned_azspice_gnu_fast-debug-64bit-rsolver64", ], "adjoint_tests_azspice_build": [ - "build_adjoint_tests_azspice_gnu_production-32bit", + "build_adjoint_tests_azspice_gnu_fast-debug-64bit", "build_adjoint_tests_azspice_gnu_full-debug-64bit", ], }) %} @@ -31,7 +30,6 @@ "adjoint_tests_ex1a_developer": [ "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit-rsolver64", - "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_production-32bit", "adjoint_tests_ex1a_canned", ], "adjoint_tests_ex1a": [ @@ -41,7 +39,7 @@ "adjoint_tests_canned_ex1a_gnu_fast-debug-64bit-rsolver64", ], "adjoint_tests_ex1a_build": [ - "build_adjoint_tests_ex1a_gnu_production-32bit", + "build_adjoint_tests_ex1a_gnu_fast-debug-64bit", "build_adjoint_tests_ex1a_gnu_full-debug-64bit", ], }) %} diff --git a/rose-stem/site/meto/groups/groups_gungho_model.cylc b/rose-stem/site/meto/groups/groups_gungho_model.cylc index 0704f11ad..0605786b9 100644 --- a/rose-stem/site/meto/groups/groups_gungho_model.cylc +++ b/rose-stem/site/meto/groups/groups_gungho_model.cylc @@ -10,9 +10,6 @@ "gungho_model_azspice_developer": [ "gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit", - "gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit", - "gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit", - "gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit", "gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit", diff --git a/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc b/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc index 1fbfc565b..c5dbac60d 100644 --- a/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc +++ b/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc @@ -8,7 +8,7 @@ {# Azspice Groups #} {% do site_groups.update({ "jedi_lfric_tests_azspice_developer": [ - "jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit", "jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit", @@ -16,24 +16,24 @@ "jedi_lfric_tests_forecast_pseudo_default-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_azspice_gnu_full-debug-64bit", - "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_nwp_gal9-1PE-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG_azspice_gnu_fast-debug-64bit-rsolver64", + "jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_default-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_default-1PE-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-1PE-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-4OMP-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-1PE-4OMP-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-1PE-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-4OMP-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-1PE-4OMP-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-relaxed_solver-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-relaxed_solver-1PE-C12_azspice_gnu_fast-debug-64bit", "jedi_lfric_tests_azspice_integration_tests", ], "jedi_lfric_tests_op_azspice_developer": [ - "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-C12_op_azspice_gnu_fast-debug-64bit", ], "jedi_lfric_tests_azspice": [ "jedi_lfric_tests_azspice_developer", @@ -44,7 +44,6 @@ ], "jedi_lfric_tests_azspice_build": [ "build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit", - "build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit-rsolver64", "build_jedi_lfric_tests_azspice_gnu_full-debug-64bit", ], }) %} @@ -53,34 +52,29 @@ {# EX1A Groups #} {% do site_groups.update({ "jedi_lfric_tests_ex1a_developer": [ - "jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_default-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_id_tlm_tests_nwp_gal9-1PE-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-real_increment-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-1PE-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-dry-1PE-4OMP-C12_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG_ex1a_cce_fast-debug-64bit-rsolver64", + "jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_default-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_id_tlm_tests_default-1PE-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-1PE-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-4OMP-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-1PE-4OMP-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-1PE-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-4OMP-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-dry-1PE-4OMP-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-relaxed_solver-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-relaxed_solver-1PE-C12_ex1a_cce_fast-debug-64bit", "jedi_lfric_tests_ex1a_integration_tests", ], "jedi_lfric_tests_op_ex1a_developer": [ - "jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit", - ], - "jedi_lfric_tests_ex1a_weekly": [ - "jedi_lfric_tests_tlm_tests_nwp_gal9-4OMP-C224_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-real_increment-4OMP-C224_MG_ex1a_cce_fast-debug-64bit", - "jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C224_MG_ex1a_cce_fast-debug-64bit-rsolver64", + "jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_tlm_tests_default-C12_op_ex1a_cce_fast-debug-64bit", ], "jedi_lfric_tests_ex1a": [ "jedi_lfric_tests_ex1a_developer", @@ -91,7 +85,6 @@ ], "jedi_lfric_tests_ex1a_build": [ "build_jedi_lfric_tests_ex1a_cce_fast-debug-64bit", - "build_jedi_lfric_tests_ex1a_cce_fast-debug-64bit-rsolver64", ], }) %} @@ -103,9 +96,6 @@ "jedi_lfric_tests_ex1a_developer", "jedi_lfric_tests_integration_tests", ], - "jedi_lfric_tests_weekly": [ - "jedi_lfric_tests_ex1a_weekly", - ], "jedi_lfric_tests": [ "jedi_lfric_tests_developer", "jedi_lfric_tests_azspice", diff --git a/rose-stem/site/meto/groups/groups_lfric2lfric.cylc b/rose-stem/site/meto/groups/groups_lfric2lfric.cylc index eca0b1d27..1fb7bbcd6 100644 --- a/rose-stem/site/meto/groups/groups_lfric2lfric.cylc +++ b/rose-stem/site/meto/groups/groups_lfric2lfric.cylc @@ -14,7 +14,6 @@ "lfric2lfric_clim_gal9-C24_C12_azspice_gnu_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9-C24_C12_azspice_gnu_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit", - "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit", "lfric2lfric_azspice_canned", ], "lfric2lfric_azspice_extra": [ @@ -42,7 +41,6 @@ "lfric2lfric_clim_gal9-C24_C12_ex1a_cce_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9-C24_C12_ex1a_cce_fast-debug-64bit", "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit", - "lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit", "lfric2lfric_ex1a_canned", ], "lfric2lfric_ex1a_extra": [ diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index ea319d080..174b5698f 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -27,6 +27,7 @@ "lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit", + "lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit", ], "lfric_atm_nwp_azspice": [ @@ -193,23 +194,12 @@ "lfric_atm_nwp_gal9-C224_MG_ex1a_cce_production-32bit", "lfric_atm_nwp_gal9_oper-C224_MG_ex1a_cce_production-32bit", "lfric_atm_nwp_gal9_debug-C224_MG_ex1a_cce_full-debug-32bit", - "lfric_atm_nwp_gal9_ls_and_jedi-C224_MG_ex1a_cce_production-32bit", "lfric_atm_nwp_gal9-C896_MG_ex1a_cce_production-32bit", "lfric_atm_clim_gal9-C48_MG_ex1a_cce_production-32bit", "lfric_atm_ral_ex1a_weekly", "ex1a_omp_C192_cce", "ex1a_omp_gnu", ], - "lfric_atm_ex1a_performance_check": [ - "lfric_atm_ex1a_weekly", - "lfric_atm_nwp_gal9-C896_MG_720t_perfRun0_ex1a_cce_production-32bit", - ], - "lfric_atm_ex1a_performance_runstats": [ - "lfric_atm_nwp_gal9-C896_MG_720t_perfRun1_ex1a_cce_production-32bit", - "lfric_atm_nwp_gal9-C896_MG_720t_perfRun2_ex1a_cce_production-32bit", - "lfric_atm_nwp_gal9-C896_MG_720t_perfRun3_ex1a_cce_production-32bit", - "lfric_atm_nwp_gal9-C896_MG_720t_perfRun4_ex1a_cce_production-32bit", - ], "lfric_atm_ex1a_threaded": [ "lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit", "lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_production-32bit", diff --git a/rose-stem/site/meto/groups/groups_linear_model.cylc b/rose-stem/site/meto/groups/groups_linear_model.cylc index 062689d42..b584e591e 100644 --- a/rose-stem/site/meto/groups/groups_linear_model.cylc +++ b/rose-stem/site/meto/groups/groups_linear_model.cylc @@ -8,7 +8,6 @@ {# Azspice Groups #} {% do site_groups.update({ "linear_model_azspice_developer": [ - "linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit", "linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit", "linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit", "linear_model_nwp_gal9_zero-C12_MG_azspice_gnu_fast-debug-64bit", @@ -32,21 +31,12 @@ {# EX1A Groups #} {% do site_groups.update({ "linear_model_ex1a_developer": [ + "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit", + "linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit", + "linear_model_nwp_gal9_zero-C12_MG_ex1a_gnu_fast-debug-64bit", "linear_model_runge-kutta-C12_ex1a_gnu_fast-debug-64bit", "linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit", "linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit", - "linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit", - "linear_model_nwp_gal9_zero-C12_MG_ex1a_gnu_fast-debug-64bit", - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit", - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit", - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit", - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit", - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit", - "linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit", - "linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit", - "linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit", - "linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit", - "linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit", "linear_model_ex1a_canned", ], "linear_model_ex1a": [ diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt index 5b6183ebe..02a626e51 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DAA271B80432EF -Inner product checksum theta = 42418E8249EA97F2 -Inner product checksum u = 43F0A73C14A39446 +Inner product checksum rho = 40DAA271B80432F1 +Inner product checksum theta = 42418E8249EA97ED +Inner product checksum u = 43F0A73C14A3943D diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt index 52e45dc2f..ca1a79dc2 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F2B224670998 -Inner product checksum theta = 4210411A3415238B -Inner product checksum u = 4501AC43237805FE +Inner product checksum rho = 40E2F2B2244799D0 +Inner product checksum theta = 4210411A3418E006 +Inner product checksum u = 4501AC432146D718 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index a85080f2f..000000000 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,3 +0,0 @@ -Inner product checksum rho = 4102EEF5FABDC767 -Inner product checksum theta = 423041DD8252C278 -Inner product checksum u = 45017CE3BF147F0A diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index 3c2888420..000000000 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,3 +0,0 @@ -Inner product checksum rho = 4102EEF5FABDC764 -Inner product checksum theta = 423041DD8252C279 -Inner product checksum u = 45017CE3BF147F14 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index 28e631548..000000000 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,3 +0,0 @@ -Inner product checksum rho = 4102EEF5FABDC763 -Inner product checksum theta = 423041DD8252C279 -Inner product checksum u = 45017CE3BF147F13 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt index 849858d0b..1839f3574 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E31B5BE7BD919A -Inner product checksum theta = 4210461DFF525960 -Inner product checksum u = 4500F52EDECFC16C +Inner product checksum rho = 40E31B5B7CB337D5 +Inner product checksum theta = 4210461DE3B34870 +Inner product checksum u = 4500F56A544F1F86 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt index 3b2b948c9..061be97ca 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2EB31AEB4C603 -Inner product checksum theta = 42104262EDCEE39B -Inner product checksum u = 4501DA5CB5DBF453 +Inner product checksum rho = 40E2EB31AEAB0690 +Inner product checksum theta = 42104262EDCF9F78 +Inner product checksum u = 4501DA5CB5DBC24B diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt index 3ed29f993..58c743fce 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F342C08629AD -Inner product checksum theta = 421041C191162823 -Inner product checksum u = 4501D8905F18DD52 +Inner product checksum rho = 40E2F34133893AE6 +Inner product checksum theta = 421041C1BC787C3E +Inner product checksum u = 4501D87B2966270E diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt index 9f18c821b..6ccaf3715 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2E610798110FE -Inner product checksum theta = 4210435EB2DDB675 -Inner product checksum u = 4501348CFD7333AA +Inner product checksum rho = 40E2E61079810D0E +Inner product checksum theta = 4210435EB2DDC0F1 +Inner product checksum u = 4501348CFD77EA40 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt index fd3c666a1..019d1c4bd 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FE89845A99A701 -Inner product checksum theta = 4210F00A9EEFEDA9 -Inner product checksum u = 42EF4B7C9D609EB3 +Inner product checksum rho = 40FE89845A997E06 +Inner product checksum theta = 4210F00A9EEFEDF3 +Inner product checksum u = 42EF4B7C9D6C01D8 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt index 0b0b0c4bd..64287df9b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E8E802280ABD04 -Inner product checksum theta = 4204E59A63CB78B5 -Inner product checksum u = 4391E522B345D96A +Inner product checksum rho = 40E8E802280ABCF8 +Inner product checksum theta = 4204E59A63CB78B4 +Inner product checksum u = 4391E522B368BE24 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt index 2a87de992..0872d11c8 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41094B0D90339E11 -Inner product checksum theta = 4224DF77B226634E -Inner product checksum u = 438852006BBF0069 +Inner product checksum rho = 41094B0D90339E0A +Inner product checksum theta = 4224DF77B2266354 +Inner product checksum u = 438852006BE9E2CD diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt index 90f688cf0..81c9f6506 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3FF37BCAE7397 -Inner product checksum theta = 41EC4ACBE79A8479 -Inner product checksum u = 44176CD1D18E2AF5 +Inner product checksum rho = 40D3FF37BCAE739E +Inner product checksum theta = 41EC4ACBE79A8587 +Inner product checksum u = 44176CD1D18E18FC diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt index 2f2341411..862dd9a4e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EEEF2D423E47A3 -Inner product checksum theta = 42E4D05A8BCEE1DB -Inner product checksum u = 475B46A9C47FB787 +Inner product checksum rho = 40EEEF2D423E478C +Inner product checksum theta = 42E4D05A8BCEE836 +Inner product checksum u = 475B46A9C47FB04E diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt index 41856d806..b151550e6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D56C9EE61BC3C6 -Inner product checksum theta = 42198C1850B2D755 -Inner product checksum u = 44E3B95E1E224412 +Inner product checksum rho = 40D56C9EE61BBD77 +Inner product checksum theta = 42198C1850B2D34C +Inner product checksum u = 44E3B95E1E2FF310 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt index a4e540f2a..703cb92c7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E34359B8C1F51B -Inner product checksum theta = 421168C83D475CC1 -Inner product checksum u = 45082CCFCF94E9A7 +Inner product checksum rho = 40E34359B7C75475 +Inner product checksum theta = 421168C83D5BA43A +Inner product checksum u = 45082CCFC2F9E7D0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt index 8ef5f2873..ef2d843f4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4122BD52DCC8C879 -Inner product checksum theta = 4240B2570BC6116F -Inner product checksum u = 44F9DB80028C7ED8 +Inner product checksum rho = 4122BD52DCC8006A +Inner product checksum theta = 4240B2570BC700C9 +Inner product checksum u = 44F9DB80026D577A diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt index 02c3f9431..3a9e384d6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 41002AB8C8C39016 -Inner product checksum theta = 4204AB102FFEA088 -Inner product checksum u = 42156E16EC9E94D3 -Inner product checksum mr1 = 40474517C0369F04 +Inner product checksum rho = 41002AB9840956BE +Inner product checksum theta = 4204AB102F77F16E +Inner product checksum u = 42156E231FAF40B2 +Inner product checksum mr1 = 4047451938CF964E Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt index fd6edf7b7..072ad5f3b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 410029831ECEAE7E -Inner product checksum theta = 4204AB0A9B9CB929 -Inner product checksum u = 421842DE12830D66 -Inner product checksum mr1 = 4047C514B4591394 +Inner product checksum rho = 410029843CDCD5BA +Inner product checksum theta = 4204AB0A9C94010A +Inner product checksum u = 4218421EDC590CAE +Inner product checksum mr1 = 4047C516C5BD62B3 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt index 2151738ed..f1aede880 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D58C3582FBC -Inner product checksum theta = 42475B42A261EF2F -Inner product checksum u = 456062CEF51C79C2 +Inner product checksum rho = 41030D58C35909BB +Inner product checksum theta = 42475B42A25CA186 +Inner product checksum u = 456062CEF51C1324 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt index cbe07ff1d..231eb15fe 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D6C13704D59 -Inner product checksum theta = 42476BF6F9CA5B22 -Inner product checksum u = 4560B5479772DE2C +Inner product checksum rho = 41030D6C13692114 +Inner product checksum theta = 42476BF6F9CB0DCA +Inner product checksum u = 4560B547977FC8C4 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt index b8bba792e..b1ccd280c 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030F18BA3F41D1 -Inner product checksum theta = 42476C698981F562 -Inner product checksum u = 4560A0F40D52D12B +Inner product checksum rho = 41030F18BC7F8C28 +Inner product checksum theta = 42476C6988C931C5 +Inner product checksum u = 4560A0F426171C4B diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt index 6e530e5ee..ee57adc90 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E316DD570E3D6C -Inner product checksum theta = 420BC551F61B3002 -Inner product checksum u = 44FD3CA2A860113C +Inner product checksum rho = 40E316DD570F220F +Inner product checksum theta = 420BC551F61B38E2 +Inner product checksum u = 44FD3CA2A85DEBBE diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt index daabcd1f5..e429b368a 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E3144534D1406C -Inner product checksum theta = 420BC6A55E4A92B9 -Inner product checksum u = 44FDCE146C254141 +Inner product checksum rho = 40E3144534D19E42 +Inner product checksum theta = 420BC6A55E4A9D00 +Inner product checksum u = 44FDCE146C2777B3 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt index ba4c4efc4..5697a8812 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E1E481066A12D9 -Inner product checksum theta = 421139232C3CED92 -Inner product checksum u = 4393A3C2C776B521 +Inner product checksum rho = 40E1E481066A1517 +Inner product checksum theta = 421139232C3CEFAD +Inner product checksum u = 4393A3C2C7771420 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt index b81805f52..ffb0744c1 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40C1E430BB50B00C -Inner product checksum theta = 41F13953C045587E -Inner product checksum u = 4393B8DB189E7930 +Inner product checksum rho = 40C1E430BB50B842 +Inner product checksum theta = 41F13953C0455668 +Inner product checksum u = 4393B8DB189F0BA8 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt index 3678d4bbe..c420fe8e4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 40A3EC6A14AC655B Inner product checksum theta = 41BEDEE1880FB475 -Inner product checksum u = 4316BFB1C87E4CB4 +Inner product checksum u = 4316BFB1C72C3612 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt index 804176505..a4b7337bc 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 400CE3D8AB9EE6EF -Inner product checksum theta = 426EFB40626338A1 -Inner product checksum u = 46E90B31492B9E29 +Inner product checksum rho = 400CE3D8ABA81BA3 +Inner product checksum theta = 426EFB4062696458 +Inner product checksum u = 46E90B314646D0A4 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt index 8f9469a3e..ffe89fd94 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40CBD086E89B5CB8 -Inner product checksum theta = 41E3A4D10A00A1E5 -Inner product checksum u = 4400A7C1E6141466 +Inner product checksum rho = 40CBD086E89B5CBC +Inner product checksum theta = 41E3A4D10A00A1F3 +Inner product checksum u = 4400A7C1E614149E diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt index f9a3053f9..a9509981a 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1721E2B1BCD4 -Inner product checksum theta = 41F69B200F927E56 -Inner product checksum u = 432D54F6E82B741E +Inner product checksum rho = 40EA1721E2B197EA +Inner product checksum theta = 41F69B200F92D0F4 +Inner product checksum u = 432D54F6E8799F07 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt index b3ad8201a..bc0ca5515 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DA171CE3E1C133 -Inner product checksum theta = 41E69B0DAEB5A2EC -Inner product checksum u = 431CEA80FFBD7029 +Inner product checksum rho = 40DA171CE530F4BE +Inner product checksum theta = 41E69B0DAB767A1C +Inner product checksum u = 431CEA8125082548 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt index e2553efc3..1b24646b6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FA16E969D9ADBC -Inner product checksum theta = 42069BF1BB6B3AAE -Inner product checksum u = 42FFC30F50D36E92 +Inner product checksum rho = 40FA16E969D70AC8 +Inner product checksum theta = 42069BF1BB714707 +Inner product checksum u = 42FFC30F4E941145 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt index 741150fb7..00c69e3b5 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1719B3F807A5 -Inner product checksum theta = 41F69B1F286ED724 -Inner product checksum u = 432E691969346DF4 +Inner product checksum rho = 40EA1719B7A85796 +Inner product checksum theta = 41F69B1F274ACBE8 +Inner product checksum u = 432E6914CA3F2AB7 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt index 6385358bd..34c6e5650 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D4230A14790BDD -Inner product checksum theta = 421AE83CAB1DBD5A -Inner product checksum u = 44D53ED2C725DCD9 +Inner product checksum rho = 40D4230A146F2CC0 +Inner product checksum theta = 421AE83CAB39A57E +Inner product checksum u = 44D53ECE9B74C51B diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt index 35e317f21..8513b3305 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3B0E4F2F3F788 -Inner product checksum theta = 421AFAEA72C368FC -Inner product checksum u = 44D4523A63DCEC15 +Inner product checksum rho = 40D3B0E5F5D41340 +Inner product checksum theta = 421AFAE9E4BE5D88 +Inner product checksum u = 44D4479F148C12A2 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt index 8e80d1ea5..e527b8dfb 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DAA271B80432EF -Inner product checksum theta = 42418E8249EA97F2 -Inner product checksum u = 43F0A73C14A39445 +Inner product checksum rho = 40DAA271B80432F0 +Inner product checksum theta = 42418E8249EA97ED +Inner product checksum u = 43F0A73C14A3943C diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 8c67e23f6..1b949d925 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F2B2246A07FD -Inner product checksum theta = 4210411A34141D34 -Inner product checksum u = 4501AC432220ABA1 +Inner product checksum rho = 40E2F2B22483EA3D +Inner product checksum theta = 4210411A3410C3C7 +Inner product checksum u = 4501AC432284CD82 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt deleted file mode 100644 index 8310a51cf..000000000 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,3 +0,0 @@ -Inner product checksum rho = 4102EEF5FAB1F22F -Inner product checksum theta = 423041DD82543A06 -Inner product checksum u = 45017CE3BDB23B34 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt index 9926f5622..09869fdd8 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E31B57FB56C28B -Inner product checksum theta = 4210461EBD1C09DD -Inner product checksum u = 4500F50E9B2378D6 +Inner product checksum rho = 40E31B4D10BF0DA0 +Inner product checksum theta = 4210461F9BB0AAAE +Inner product checksum u = 4500F4E3AE6CD8D8 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt index 2cadd1d66..6ffb81194 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2EB31AE95DD26 -Inner product checksum theta = 42104262EDD1A3D6 -Inner product checksum u = 4501DA5CB56AC4C4 +Inner product checksum rho = 40E2EB31AEB7AC54 +Inner product checksum theta = 42104262EDCE8094 +Inner product checksum u = 4501DA5CB6E76460 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 70e360c33..dcdf764c4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F344387CD754 -Inner product checksum theta = 421041C0A40ECB7E -Inner product checksum u = 4501D87BC56E88BD +Inner product checksum rho = 40E2F3443865F0C8 +Inner product checksum theta = 421041C0A40F716F +Inner product checksum u = 4501D87BC37CB1BA diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 52c76bceb..4ddcb7e18 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2E6107980FD66 -Inner product checksum theta = 4210435EB2DDA492 -Inner product checksum u = 4501348CFD745E06 +Inner product checksum rho = 40E2E61079810B7E +Inner product checksum theta = 4210435EB2DDAEFC +Inner product checksum u = 4501348CFD711AFA diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt index cf12c4bbc..a33fd4a1b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FE89845A99A702 -Inner product checksum theta = 4210F00A9EEFEDA9 -Inner product checksum u = 42EF4B7C9D609EB4 +Inner product checksum rho = 40FE89845A997E06 +Inner product checksum theta = 4210F00A9EEFEDF3 +Inner product checksum u = 42EF4B7C9D6C01D9 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4a3c842e3..a449fc5d3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E8E802280ABCFD -Inner product checksum theta = 4204E59A63CB78BA -Inner product checksum u = 4391E522B3045453 +Inner product checksum rho = 40E8E802280ABCFA +Inner product checksum theta = 4204E59A63CB78B2 +Inner product checksum u = 4391E522B31489D4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt index 1bc5bbada..a4fa9f025 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41094B0D90339E0A -Inner product checksum theta = 4224DF77B226635A -Inner product checksum u = 438852006C521A1B +Inner product checksum rho = 41094B0D90339E14 +Inner product checksum theta = 4224DF77B226634F +Inner product checksum u = 438852006BFEBBA6 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt index ca4b35a8d..317fe4b7b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3FF37BCAE768E -Inner product checksum theta = 41EC4ACBE79A813C -Inner product checksum u = 44176CD1D18E1F8D +Inner product checksum rho = 40D3FF37BCAE7576 +Inner product checksum theta = 41EC4ACBE79A8562 +Inner product checksum u = 44176CD1D18E1C00 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 5eb77db6e..abd067848 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EEEF2D423E47A6 -Inner product checksum theta = 42E4D05A8BCEDE80 -Inner product checksum u = 475B46A9C47FDD23 +Inner product checksum rho = 40EEEF2D423E47A9 +Inner product checksum theta = 42E4D05A8BCEE302 +Inner product checksum u = 475B46A9C47FC6D6 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 23e2af56b..4ef335a94 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D56C9EE61BC316 -Inner product checksum theta = 42198C1850B2D534 -Inner product checksum u = 44E3B95E1E3659CE +Inner product checksum rho = 40D56C9EE61BC02A +Inner product checksum theta = 42198C1850B2D284 +Inner product checksum u = 44E3B95E1E476DC8 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4c22bf942..75bfdf0cf 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E34359BE60DD69 -Inner product checksum theta = 421168C83C59A6DF -Inner product checksum u = 45082CD01E2731A4 +Inner product checksum rho = 40E34359B80C5804 +Inner product checksum theta = 421168C83D4A79F3 +Inner product checksum u = 45082CCFCECDD575 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt index 56de6557b..9a03afb2d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4122BD52DCC9E6EB -Inner product checksum theta = 4240B2570BC5E580 -Inner product checksum u = 44F9DB8002ADEC3D +Inner product checksum rho = 4122BD52DCC6D87A +Inner product checksum theta = 4240B2570BC5F2DA +Inner product checksum u = 44F9DB8002644CBC diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt index 02c3f9431..3a9e384d6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 41002AB8C8C39016 -Inner product checksum theta = 4204AB102FFEA088 -Inner product checksum u = 42156E16EC9E94D3 -Inner product checksum mr1 = 40474517C0369F04 +Inner product checksum rho = 41002AB9840956BE +Inner product checksum theta = 4204AB102F77F16E +Inner product checksum u = 42156E231FAF40B2 +Inner product checksum mr1 = 4047451938CF964E Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt index fd6edf7b7..072ad5f3b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 410029831ECEAE7E -Inner product checksum theta = 4204AB0A9B9CB929 -Inner product checksum u = 421842DE12830D66 -Inner product checksum mr1 = 4047C514B4591394 +Inner product checksum rho = 410029843CDCD5BA +Inner product checksum theta = 4204AB0A9C94010A +Inner product checksum u = 4218421EDC590CAE +Inner product checksum mr1 = 4047C516C5BD62B3 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt index fa464e671..7e1dfb2bf 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D58C3590812 -Inner product checksum theta = 42475B42A25E97B8 -Inner product checksum u = 456062CEF51D4871 +Inner product checksum rho = 41030D58C358841C +Inner product checksum theta = 42475B42A25BD24C +Inner product checksum u = 456062CEF51ADA01 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt index 75ce9ee29..087fd2fad 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D6C1370FF70 -Inner product checksum theta = 42476BF6F9CAD9BF -Inner product checksum u = 4560B54797698F24 +Inner product checksum rho = 41030D6C136C4726 +Inner product checksum theta = 42476BF6F9C9E065 +Inner product checksum u = 4560B547977B120F diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt index d3d96a110..e42f32057 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030F18BA556EED -Inner product checksum theta = 42476C6985EDD5A2 -Inner product checksum u = 4560A0F4FB952ACD +Inner product checksum rho = 41030F18B9FB67A0 +Inner product checksum theta = 42476C698DF698DD +Inner product checksum u = 4560A0F3DA7365AC diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt index 23aaf00d6..2d5e3b173 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E316DD570E5057 -Inner product checksum theta = 420BC551F61B391B -Inner product checksum u = 44FD3CA2A85EC12A +Inner product checksum rho = 40E316DD570F67E7 +Inner product checksum theta = 420BC551F61B2ADE +Inner product checksum u = 44FD3CA2A85A5D90 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt index 75ecd5a6e..30022c661 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E3144534D209FF -Inner product checksum theta = 420BC6A55E4A954D -Inner product checksum u = 44FDCE146C249D82 +Inner product checksum rho = 40E3144534D22EC1 +Inner product checksum theta = 420BC6A55E4A8238 +Inner product checksum u = 44FDCE146C25FF50 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt index ba4c4efc4..5697a8812 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E1E481066A12D9 -Inner product checksum theta = 421139232C3CED92 -Inner product checksum u = 4393A3C2C776B521 +Inner product checksum rho = 40E1E481066A1517 +Inner product checksum theta = 421139232C3CEFAD +Inner product checksum u = 4393A3C2C7771420 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt index adf57f0b7..41bb50bf2 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40C1E430BB50B1BB -Inner product checksum theta = 41F13953C0455941 -Inner product checksum u = 4393B8DB189EAE30 +Inner product checksum rho = 40C1E430BB50BA06 +Inner product checksum theta = 41F13953C045589C +Inner product checksum u = 4393B8DB189D9133 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt index 92e047db7..9ca596629 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 40A3EC6A14AC655D Inner product checksum theta = 41BEDEE1880FB475 -Inner product checksum u = 4316BFB1C87E4218 +Inner product checksum u = 4316BFB1C7362BEB diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 1251a6b1d..415129215 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 400CE3D8ABA24B4C -Inner product checksum theta = 426EFB406264FDD6 -Inner product checksum u = 46E90B3147CFEAB5 +Inner product checksum rho = 400CE3D8ABB2DD00 +Inner product checksum theta = 426EFB40626F1444 +Inner product checksum u = 46E90B314334D653 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt index 8f9469a3e..ffe89fd94 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40CBD086E89B5CB8 -Inner product checksum theta = 41E3A4D10A00A1E5 -Inner product checksum u = 4400A7C1E6141466 +Inner product checksum rho = 40CBD086E89B5CBC +Inner product checksum theta = 41E3A4D10A00A1F3 +Inner product checksum u = 4400A7C1E614149E diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt index 4c68af9dc..dd7d16fd9 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1721E2B1BCD4 -Inner product checksum theta = 41F69B200F927E57 -Inner product checksum u = 432D54F6E82B741E +Inner product checksum rho = 40EA1721E2B197EB +Inner product checksum theta = 41F69B200F92D0F4 +Inner product checksum u = 432D54F6E8799F07 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt index 7c43065c3..fa2891bb7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DA171CE319AA16 -Inner product checksum theta = 41E69B0DB0A24402 -Inner product checksum u = 431CEA80F2E391C8 +Inner product checksum rho = 40DA171CE5311E97 +Inner product checksum theta = 41E69B0DAB753A8E +Inner product checksum u = 431CEA812598E8B0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt index 64502ae9f..22f2c4445 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FA16E969D78B0B -Inner product checksum theta = 42069BF1BB70B7A9 -Inner product checksum u = 42FFC30F4F0FCDA2 +Inner product checksum rho = 40FA16E969D797DC +Inner product checksum theta = 42069BF1BB703F6A +Inner product checksum u = 42FFC30F4ED2B428 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt index bc0f86a1b..075d391fc 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA171A18307190 -Inner product checksum theta = 41F69B1D66F943A0 -Inner product checksum u = 432E68AADC8D5EF8 +Inner product checksum rho = 40EA171A18309116 +Inner product checksum theta = 41F69B1D66F906CB +Inner product checksum u = 432E68AADCDE17B3 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt index cfaab8a14..0692e4368 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D4230A14ACFCE9 -Inner product checksum theta = 421AE83CAB3C5322 -Inner product checksum u = 44D53ED6B3D6E0DA +Inner product checksum rho = 40D4230A14F81BCE +Inner product checksum theta = 421AE83CAB4D6A4B +Inner product checksum u = 44D53ED7F85D2DAF diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt index 45924fc3e..d7a2154e7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3B0E5979CA91C -Inner product checksum theta = 421AFAEA87B084F6 -Inner product checksum u = 44D456945F0A4E4A +Inner product checksum rho = 40D3B0E614A00984 +Inner product checksum theta = 421AFAEA39674732 +Inner product checksum u = 44D455410D2E2D22 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt index 76a23cf15..9fef2e092 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D12301909313 +Inner product checksum theta = 41F6D123019100F3 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt index 76a23cf15..9fef2e092 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D12301909313 +Inner product checksum theta = 41F6D123019100F3 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index 6dbf85b1b..000000000 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3FA4FD2C7690DC24 -Inner product checksum theta = 415FF4F8712C6491 -Inner product checksum u = 45673B7E0559C62C -Inner product checksum mr1 = 3F35B15D7C0E86A8 -Inner product checksum mr2 = 3EEAD6BF4FDA7F92 -Inner product checksum mr3 = 3EDFF2E76CAF5FF5 -Inner product checksum mr4 = 3EED395DF2372B29 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt index 007c1751c..b17a42b79 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA79A9D0614EEEE -Inner product checksum theta = 4162215D8ED8A125 -Inner product checksum u = 456A083CF999EC55 -Inner product checksum mr1 = 3F36D11B3C65CF3F -Inner product checksum mr2 = 3EEAE32B46C09D7B -Inner product checksum mr3 = 3EDFEC26C0DD3244 -Inner product checksum mr4 = 3EED3B0E06CBD627 +Inner product checksum rho = 3FA7A1197E0CB9A0 +Inner product checksum theta = 4161FFC69BF205C3 +Inner product checksum u = 4569B9484E575B5E +Inner product checksum mr1 = 3F36C0A882D88E66 +Inner product checksum mr2 = 3EEADFD85794EA13 +Inner product checksum mr3 = 3EDFEC0C984D5704 +Inner product checksum mr4 = 3EED3A950512EB1A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt index f718f88ba..df5359de9 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED6D12BBFEDECC -Inner product checksum theta = 4012F2F8A6298AC5 -Inner product checksum u = 42F12DF2D0BF0EFC +Inner product checksum rho = 3EECEB00E275F684 +Inner product checksum theta = 40130622675CC417 +Inner product checksum u = 42EF956998B205D3 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt index f718f88ba..df5359de9 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED6D12BBFEDECC -Inner product checksum theta = 4012F2F8A6298AC5 -Inner product checksum u = 42F12DF2D0BF0EFC +Inner product checksum rho = 3EECEB00E275F684 +Inner product checksum theta = 40130622675CC417 +Inner product checksum u = 42EF956998B205D3 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt index 7d6d62d97..36256062e 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95ACC94441A964 -Inner product checksum theta = 413FD47788AE2B0E -Inner product checksum u = 452CBAADFF659374 -Inner product checksum mr1 = 3F2D499F1DCEDE0B -Inner product checksum mr2 = 3EDF578E9B65451B -Inner product checksum mr3 = 3ED26AFC441BB781 -Inner product checksum mr4 = 3EE00986BD98837B +Inner product checksum rho = 3F95A1DDD2EC7839 +Inner product checksum theta = 414000E886CBFB32 +Inner product checksum u = 452CCCFAA0BBF41E +Inner product checksum mr1 = 3F2D2183BE8E5C80 +Inner product checksum mr2 = 3EDF53A45356ADEA +Inner product checksum mr3 = 3ED26AEF2D8453B5 +Inner product checksum mr4 = 3EE009842E269AF6 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt index fc254a564..5ae16e5aa 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95ACCAC59D64D9 -Inner product checksum theta = 413FD499BD5603B7 -Inner product checksum u = 452CB9ABAE30ABAF -Inner product checksum mr1 = 3F2D49D33C196D4C -Inner product checksum mr2 = 3EDF57AEC293C509 -Inner product checksum mr3 = 3ED26AFB9145F0F5 -Inner product checksum mr4 = 3EE009862BB0DCF3 +Inner product checksum rho = 3F95A1DF1E431E10 +Inner product checksum theta = 41400115CD2072D9 +Inner product checksum u = 452CCC1C9C56D3B6 +Inner product checksum mr1 = 3F2D21B9057A6428 +Inner product checksum mr2 = 3EDF53C45279F22E +Inner product checksum mr3 = 3ED26AEE8FE0B97C +Inner product checksum mr4 = 3EE009839EC7E10F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index abea1a38d..000000000 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 0 -Inner product checksum theta = 0 -Inner product checksum u = 0 -Inner product checksum mr1 = 0 -Inner product checksum mr2 = 0 -Inner product checksum mr3 = 0 -Inner product checksum mr4 = 0 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index abea1a38d..000000000 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 0 -Inner product checksum theta = 0 -Inner product checksum u = 0 -Inner product checksum mr1 = 0 -Inner product checksum mr2 = 0 -Inner product checksum mr3 = 0 -Inner product checksum mr4 = 0 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt index 223d31dbd..d3457f776 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123019048BD +Inner product checksum theta = 41F6D123018FAA92 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt deleted file mode 100644 index 3134a07c3..000000000 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3FA4FD2A13297D96 -Inner product checksum theta = 415FF4F7791418F7 -Inner product checksum u = 45673B7DB19E7072 -Inner product checksum mr1 = 3F35B160CCE25E2C -Inner product checksum mr2 = 3EEAD6BF59DB2878 -Inner product checksum mr3 = 3EDFF2E76569C104 -Inner product checksum mr4 = 3EED395DCB2F649B -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt index 9ba16ef2b..db90ee0d3 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA79A9D24D80B84 -Inner product checksum theta = 4162215D998A790E -Inner product checksum u = 456A083CF563E471 -Inner product checksum mr1 = 3F36D11B19E12F6E -Inner product checksum mr2 = 3EEAE32B48FCBD56 -Inner product checksum mr3 = 3EDFEC26C094A93A -Inner product checksum mr4 = 3EED3B0E07D01F92 +Inner product checksum rho = 3FA7A119D15694EA +Inner product checksum theta = 4161FFC6B41D6C18 +Inner product checksum u = 4569B9484F679FDB +Inner product checksum mr1 = 3F36C0A85083444F +Inner product checksum mr2 = 3EEADFD859B930EE +Inner product checksum mr3 = 3EDFEC0C98392EF7 +Inner product checksum mr4 = 3EED3A95035B479C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt index fb9462c5a..444cc9574 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED6D12BBFEDD01 -Inner product checksum theta = 4012F2F8A6298ACF -Inner product checksum u = 42F12DF2D0BF12C9 +Inner product checksum rho = 3EECEB00E275EB48 +Inner product checksum theta = 40130622675CC45A +Inner product checksum u = 42EF956998B2045E diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt index 50ce4226d..7dfc5de39 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95ACB014DA78D0 -Inner product checksum theta = 413FCBF88C4910CE -Inner product checksum u = 452CBA65B40AFAB8 -Inner product checksum mr1 = 3F2D49E974B2F080 -Inner product checksum mr2 = 3EDF5792D6D2D34E -Inner product checksum mr3 = 3ED26AFD01439F84 -Inner product checksum mr4 = 3EE00984EA466A8E +Inner product checksum rho = 3F95A1C504B6A918 +Inner product checksum theta = 413FF942C2E563C0 +Inner product checksum u = 452CCCF6ABE0865F +Inner product checksum mr1 = 3F2D21C8E6687010 +Inner product checksum mr2 = 3EDF53AD2309BABA +Inner product checksum mr3 = 3ED26AEFEBB2B535 +Inner product checksum mr4 = 3EE00982584FBC51 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt index a8eadce8d..f6ca49a10 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_default-C12_op_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3F95ACCD3EEAC2B8 -Inner product checksum theta = 413FCAAF700BA76A -Inner product checksum u = 452CB8D93BF67253 -Inner product checksum mr1 = 3F2D49E4C797F50E -Inner product checksum mr2 = 3EDF579D1DD1B948 -Inner product checksum mr3 = 3ED26AFC92438788 -Inner product checksum mr4 = 3EE00985A17972EA +Inner product checksum rho = 3F95A1E1F17F7A09 +Inner product checksum theta = 413FF80D6A5F4BE8 +Inner product checksum u = 452CCB73BB6342D4 +Inner product checksum mr1 = 3F2D21C0C423794A +Inner product checksum mr2 = 3EDF53B78E4C3283 +Inner product checksum mr3 = 3ED26AEF7B3222E8 +Inner product checksum mr4 = 3EE00982FE30ACFA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt deleted file mode 100644 index abea1a38d..000000000 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 0 -Inner product checksum theta = 0 -Inner product checksum u = 0 -Inner product checksum mr1 = 0 -Inner product checksum mr2 = 0 -Inner product checksum mr3 = 0 -Inner product checksum mr4 = 0 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt deleted file mode 100644 index abea1a38d..000000000 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 0 -Inner product checksum theta = 0 -Inner product checksum u = 0 -Inner product checksum mr1 = 0 -Inner product checksum mr2 = 0 -Inner product checksum mr3 = 0 -Inner product checksum mr4 = 0 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt deleted file mode 100644 index 9d6d34d3e..000000000 --- a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_azspice_gnu_fast-debug-64bit.txt +++ /dev/null @@ -1,6 +0,0 @@ -Inner product checksum tile_temperature = 41CA233EF9871AE7 -Inner product checksum u10m = 40A6A7AFFBE6DBC3 -Inner product checksum v10m = 40763D213F2E5A8F -Inner product checksum zh = 418925AC5A968D05 -Inner product checksum theta = 423287E5F56B493F -Inner product checksum u_in_w3 = 4141E4EFDFC04911 diff --git a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt index b5cf95aa6..66d133e45 100644 --- a/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric2lfric/azspice/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum zh = 41EA73B073DF7A64 -Inner product checksum rho = 40FFDD7EF4FB2C54 -Inner product checksum theta = 4255803F59E9AFDB +Inner product checksum zh = 41CA60A03DABA9FF +Inner product checksum rho = 40DFDD7E6A34BDAC +Inner product checksum theta = 4235803F52CE127A diff --git a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt deleted file mode 100644 index 12fd87ef2..000000000 --- a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_ex1a_cce_fast-debug-64bit.txt +++ /dev/null @@ -1,6 +0,0 @@ -Inner product checksum tile_temperature = 41CA233EF98718CA -Inner product checksum u10m = 40A6A7AFFBE6DBCE -Inner product checksum v10m = 40763D213F2E5A72 -Inner product checksum zh = 418925AC5A968D44 -Inner product checksum theta = 423287E5F56B4B74 -Inner product checksum u_in_w3 = 4141E4EFDFC04AEB diff --git a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt index 2e94dcd1b..ca344c562 100644 --- a/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric2lfric/ex1a/checksum_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_ex1a_cce_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum zh = 41EA73B073DF7BA9 -Inner product checksum rho = 40FFDD7EF4FB1ED0 -Inner product checksum theta = 4255803F59E9B152 +Inner product checksum zh = 41CA60A03DABAA19 +Inner product checksum rho = 40DFDD7E6A34BE8C +Inner product checksum theta = 4235803F52CE13AE diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt index baad1f3c6..9b9895e08 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 468AD911 -Inner product checksum theta = 4FD68987 -Inner product checksum u = 6A4E39D0 -Inner product checksum mr1 = 3F080026 -Inner product checksum mr2 = 369843BE -Inner product checksum mr3 = 3416CDCB -Inner product checksum mr4 = 36905047 +Inner product checksum rho = 468AD8F2 +Inner product checksum theta = 4FD6898F +Inner product checksum u = 6A4E3AC8 +Inner product checksum mr1 = 3F07FDF4 +Inner product checksum mr2 = 369B4D1C +Inner product checksum mr3 = 3413652A +Inner product checksum mr4 = 368E9398 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt index a8808603d..dac455d15 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 44D95710 +Inner product checksum rho = 44D95711 Inner product checksum theta = 5504FC40 -Inner product checksum u = 74276E1C +Inner product checksum u = 74276DEB diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt index 4b640fd26..ebbf5d1b7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D6671E -Inner product checksum theta = 518E9CC1 -Inner product checksum u = 6AF4B3E5 -Inner product checksum mr1 = 3FD1DD2C -Inner product checksum mr2 = 3744637E -Inner product checksum mr3 = 3533FB34 -Inner product checksum mr4 = 36C1322A +Inner product checksum rho = 46D66411 +Inner product checksum theta = 518E95C2 +Inner product checksum u = 6AF4A509 +Inner product checksum mr1 = 3FD1977C +Inner product checksum mr2 = 375C8794 +Inner product checksum mr3 = 3534A85C +Inner product checksum mr4 = 36B9C166 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt index 0920e465c..208bf5b67 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66653 -Inner product checksum theta = 518E9990 -Inner product checksum u = 6AF43E1A -Inner product checksum mr1 = 3FD1D04B -Inner product checksum mr2 = 3745B69A -Inner product checksum mr3 = 353019A0 -Inner product checksum mr4 = 36BDF494 +Inner product checksum rho = 46D66282 +Inner product checksum theta = 518E9697 +Inner product checksum u = 6AF4EDB0 +Inner product checksum mr1 = 3FD1A816 +Inner product checksum mr2 = 372DA48E +Inner product checksum mr3 = 355FEEE4 +Inner product checksum mr4 = 36BADA78 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt index 53e80d265..28b77bf56 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4798D8B6 -Inner product checksum theta = 5840648C -Inner product checksum u = 79BA7D9D +Inner product checksum rho = 4798D8B7 +Inner product checksum theta = 5840648A +Inner product checksum u = 79BA7DF0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt index 77784af5b..e8298690a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8578E -Inner product checksum theta = 518BD702 -Inner product checksum u = 6A8A9FF5 -Inner product checksum mr1 = 3FCD79BE -Inner product checksum mr2 = 38309A00 -Inner product checksum mr3 = 353B5ACC -Inner product checksum mr4 = 36D670E9 -Inner product checksum mr5 = 2E296A8A -Inner product checksum mr6 = 3534119C +Inner product checksum rho = 46D853A2 +Inner product checksum theta = 518BD97F +Inner product checksum u = 6A8B5D0D +Inner product checksum mr1 = 3FCCB5F5 +Inner product checksum mr2 = 383329FE +Inner product checksum mr3 = 354A12DC +Inner product checksum mr4 = 36D48CC3 +Inner product checksum mr5 = 2C0EBB00 +Inner product checksum mr6 = 354FB8FB diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt index fba375852..575d12f26 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8451F -Inner product checksum theta = 518BD5CF -Inner product checksum u = 6A871C80 -Inner product checksum mr1 = 3FCF8CE1 -Inner product checksum mr2 = 37E92CD1 -Inner product checksum mr3 = 378E0B27 -Inner product checksum mr4 = 378C60AF -Inner product checksum mr5 = 369846E2 +Inner product checksum rho = 46D84776 +Inner product checksum theta = 518BD5CA +Inner product checksum u = 6A876EA4 +Inner product checksum mr1 = 3FCFC573 +Inner product checksum mr2 = 37F982D2 +Inner product checksum mr3 = 378F0686 +Inner product checksum mr4 = 37941390 +Inner product checksum mr5 = 36AD80BB Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt new file mode 100644 index 000000000..689a0c93c --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 46D833DD +Inner product checksum theta = 518BE345 +Inner product checksum u = 6A861A7A +Inner product checksum mr1 = 3FD12CFE +Inner product checksum mr2 = 37EF6FF7 +Inner product checksum mr3 = 377034CF +Inner product checksum mr4 = 37BA8E17 +Inner product checksum mr5 = 3694BA7A +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt index acf51eab2..066b82f4f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D83C03 -Inner product checksum theta = 518BD66C -Inner product checksum u = 6A893E10 -Inner product checksum mr1 = 3FD01810 -Inner product checksum mr2 = 37C7F30E -Inner product checksum mr3 = 35A35CEC -Inner product checksum mr4 = 370161BA +Inner product checksum rho = 46D8395D +Inner product checksum theta = 518BD538 +Inner product checksum u = 6A896534 +Inner product checksum mr1 = 3FD027A8 +Inner product checksum mr2 = 37C25DEC +Inner product checksum mr3 = 35A25CC0 +Inner product checksum mr4 = 371736E2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt index b6e13d25a..b2ad06d13 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40DB07AB9AFC01EF -Inner product checksum theta = 42317ADC8422F866 -Inner product checksum u = 45511E317DB149A5 -Inner product checksum mr1 = 3FF9FFC388F4C713 -Inner product checksum mr2 = 3EFB93018FC96529 -Inner product checksum mr3 = 3EB5CEE201A20BA4 -Inner product checksum mr4 = 3EE600C8EA2D0F0B +Inner product checksum rho = 40DB07687B63446A +Inner product checksum theta = 42317A99CF4E0BC0 +Inner product checksum u = 45512AE8772F7D84 +Inner product checksum mr1 = 3FFA019FB76BA7A3 +Inner product checksum mr2 = 3EF9206AB8DD06F5 +Inner product checksum mr3 = 3EB3C8E43B077FC8 +Inner product checksum mr4 = 3EE4C554CE5D456C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt index 10d9b44ca..4c7eed6cc 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FCF3 -Inner product checksum theta = 5392A6CA -Inner product checksum u = 6A97B62D -Inner product checksum mr1 = 41CD09D2 -Inner product checksum mr2 = 39C5EB06 -Inner product checksum mr3 = 37B3A951 -Inner product checksum mr4 = 395FCEA4 +Inner product checksum rho = 48D7FD32 +Inner product checksum theta = 5392A6D2 +Inner product checksum u = 6A97B8BA +Inner product checksum mr1 = 41CD0576 +Inner product checksum mr2 = 39CBA1DC +Inner product checksum mr3 = 37B5C87C +Inner product checksum mr4 = 39631544 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt index 64760e2f3..f8dff9082 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D812FE -Inner product checksum theta = 51944595 -Inner product checksum u = 6B463661 -Inner product checksum mr1 = 3FC88DAE -Inner product checksum mr2 = 37ABA450 -Inner product checksum mr3 = 35A4CCD4 -Inner product checksum mr4 = 37897CFA +Inner product checksum rho = 46D81310 +Inner product checksum theta = 51944596 +Inner product checksum u = 6B4636E2 +Inner product checksum mr1 = 3FC88E16 +Inner product checksum mr2 = 37A99D46 +Inner product checksum mr3 = 35A2C5C6 +Inner product checksum mr4 = 3788B82C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt index fe9f49f4c..35fdec60e 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FDA1 -Inner product checksum theta = 5392A6E1 -Inner product checksum u = 6A97B426 -Inner product checksum mr1 = 41CD1068 -Inner product checksum mr2 = 39CDCF8E -Inner product checksum mr3 = 37B22A3E -Inner product checksum mr4 = 3960D144 +Inner product checksum rho = 48D7FDBE +Inner product checksum theta = 5392A6F9 +Inner product checksum u = 6A97B9FA +Inner product checksum mr1 = 41CD0CB2 +Inner product checksum mr2 = 39D05B98 +Inner product checksum mr3 = 37AD4C2E +Inner product checksum mr4 = 395E937D Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt index ff1dc8e42..cd579c1cb 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D812FA -Inner product checksum theta = 518BD71C -Inner product checksum u = 6A87CBC7 -Inner product checksum mr1 = 3FD3E175 -Inner product checksum mr2 = 37DDA610 -Inner product checksum mr3 = 35AD9804 -Inner product checksum mr4 = 36E4050E +Inner product checksum rho = 46D81241 +Inner product checksum theta = 518BD644 +Inner product checksum u = 6A870A8B +Inner product checksum mr1 = 3FD3D730 +Inner product checksum mr2 = 37E1345C +Inner product checksum mr3 = 35A0FF9C +Inner product checksum mr4 = 36DC35A2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt index d4dc86bb5..e07f68014 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8045A -Inner product checksum theta = 519522AF -Inner product checksum u = 6AE677C8 -Inner product checksum mr1 = 3FC86195 -Inner product checksum mr2 = 37CC5EDC -Inner product checksum mr3 = 35200AA4 -Inner product checksum mr4 = 36F06583 +Inner product checksum rho = 46D80460 +Inner product checksum theta = 519522B0 +Inner product checksum u = 6AE6775E +Inner product checksum mr1 = 3FC86149 +Inner product checksum mr2 = 37CD2A44 +Inner product checksum mr3 = 351EE925 +Inner product checksum mr4 = 36F072B8 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt index 95689700c..c1993e0b9 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D81494 +Inner product checksum rho = 48D81496 Inner product checksum theta = 53952668 -Inner product checksum u = 6AA4D6DC -Inner product checksum mr1 = 41C8318B -Inner product checksum mr2 = 3999AAE7 -Inner product checksum mr3 = 3778FB0C -Inner product checksum mr4 = 39305110 +Inner product checksum u = 6AA4D6EE +Inner product checksum mr1 = 41C831AC +Inner product checksum mr2 = 399A2744 +Inner product checksum mr3 = 37789C51 +Inner product checksum mr4 = 39300921 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt index 0d92b82da..8f87801d6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8193D -Inner product checksum theta = 518BAFDA -Inner product checksum u = 6A8CB83F -Inner product checksum mr1 = 3FD1216C -Inner product checksum mr2 = 37EA1582 -Inner product checksum mr3 = 35979016 -Inner product checksum mr4 = 36F53919 +Inner product checksum rho = 46D81952 +Inner product checksum theta = 518BAFFF +Inner product checksum u = 6A8C8B79 +Inner product checksum mr1 = 3FD11C39 +Inner product checksum mr2 = 37E724C0 +Inner product checksum mr3 = 359FEF4C +Inner product checksum mr4 = 37074045 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt index c009453d0..a5745eb7b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81432 -Inner product checksum theta = 518BD0DB -Inner product checksum u = 6A88AA11 -Inner product checksum mr1 = 3FD40165 -Inner product checksum mr2 = 37D52121 -Inner product checksum mr3 = 35A5B57C -Inner product checksum mr4 = 36D99E7A +Inner product checksum rho = 46D8137D +Inner product checksum theta = 518BD14C +Inner product checksum u = 6A8868AB +Inner product checksum mr1 = 3FD3A9A6 +Inner product checksum mr2 = 37D9892A +Inner product checksum mr3 = 35B50D72 +Inner product checksum mr4 = 37104F46 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt index 2a9756a9d..60686d791 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D85CAB -Inner product checksum theta = 5193AFF8 -Inner product checksum u = 6A85DAD0 -Inner product checksum mr1 = 3FD03DEE -Inner product checksum mr2 = 37ABF442 -Inner product checksum mr3 = 3538567A -Inner product checksum mr4 = 36E34FE8 +Inner product checksum rho = 46D85CA4 +Inner product checksum theta = 5193AF09 +Inner product checksum u = 6A862FDC +Inner product checksum mr1 = 3FD02F73 +Inner product checksum mr2 = 37B8193F +Inner product checksum mr3 = 355AA397 +Inner product checksum mr4 = 36FA519C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt index b71654b5e..12acd49ab 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D80C8A -Inner product checksum theta = 5194ED92 -Inner product checksum u = 6B085AD5 -Inner product checksum mr1 = 3FC88023 -Inner product checksum mr2 = 37C1A81E -Inner product checksum mr3 = 356CD412 -Inner product checksum mr4 = 372B87CE +Inner product checksum rho = 46D7FBF0 +Inner product checksum theta = 5195577F +Inner product checksum u = 6B246B78 +Inner product checksum mr1 = 3FC85292 +Inner product checksum mr2 = 38201B0A +Inner product checksum mr3 = 356269E7 +Inner product checksum mr4 = 36F6669E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt index 406a369aa..f22aad7e4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997C9 -Inner product checksum theta = 513548FE -Inner product checksum u = 612F5B38 -Inner product checksum mr1 = 4090F631 -Inner product checksum mr2 = 3591CCEA -Inner product checksum mr3 = 2FA57746 -Inner product checksum mr4 = 33F4FD79 -Inner product checksum mr5 = BE7D083 +Inner product checksum rho = 483997CA +Inner product checksum theta = 513548FD +Inner product checksum u = 612F5B34 +Inner product checksum mr1 = 4090F669 +Inner product checksum mr2 = 3589856C +Inner product checksum mr3 = 2FA53E3D +Inner product checksum mr4 = 33F4FD6A +Inner product checksum mr5 = BE7D04E Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt index 5ff558d35..42525bc73 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483999C8 -Inner product checksum theta = 5135485A -Inner product checksum u = 612F6174 -Inner product checksum mr1 = 40916665 -Inner product checksum mr2 = 364416DC -Inner product checksum mr3 = 2FAC1A90 -Inner product checksum mr4 = 33F4FD6C -Inner product checksum mr5 = BF21909 +Inner product checksum rho = 483999D4 +Inner product checksum theta = 51354858 +Inner product checksum u = 612F6179 +Inner product checksum mr1 = 40916617 +Inner product checksum mr2 = 364FE1DF +Inner product checksum mr3 = 2FABFD16 +Inner product checksum mr4 = 33F4FDB5 +Inner product checksum mr5 = BF2197F Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt index 2d266dd37..cb46157c6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48398C6E +Inner product checksum rho = 48398C72 Inner product checksum theta = 513542FA -Inner product checksum u = 612EE1CA -Inner product checksum mr1 = 409102F1 -Inner product checksum mr2 = 3592AEA4 -Inner product checksum mr3 = 30010913 -Inner product checksum mr4 = 3404ABD5 -Inner product checksum mr5 = C145771 +Inner product checksum u = 612EE1BF +Inner product checksum mr1 = 409102F8 +Inner product checksum mr2 = 358C6492 +Inner product checksum mr3 = 300104A8 +Inner product checksum mr4 = 3404ABE7 +Inner product checksum mr5 = C14576D Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt index da0cb3435..c8d190573 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 4830B5EB -Inner product checksum theta = 513FD8CE -Inner product checksum u = 5F74A78A -Inner product checksum mr1 = 4155BE3F -Inner product checksum mr2 = 3A3E0C78 -Inner product checksum mr3 = 30A03718 +Inner product checksum rho = 4830B5EE +Inner product checksum theta = 513FD8B1 +Inner product checksum u = 5F74A875 +Inner product checksum mr1 = 4155D3E1 +Inner product checksum mr2 = 3A38BFC2 +Inner product checksum mr3 = 309DE635 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt index b97fba172..ee291b91a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 486B4A32 -Inner product checksum theta = 51CABF2D -Inner product checksum u = 63C9DB14 +Inner product checksum rho = 486B4A34 +Inner product checksum theta = 51CABF2E +Inner product checksum u = 63C9D90E diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt index 1f49bfe68..9841b6eb9 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 468AD927 -Inner product checksum theta = 4FD68974 -Inner product checksum u = 6A4E3F58 -Inner product checksum mr1 = 3F07FDC4 -Inner product checksum mr2 = 3695CB0F -Inner product checksum mr3 = 3416AF74 -Inner product checksum mr4 = 3688F856 +Inner product checksum rho = 468AD911 +Inner product checksum theta = 4FD68975 +Inner product checksum u = 6A4E3DFF +Inner product checksum mr1 = 3F07F74C +Inner product checksum mr2 = 36946DE4 +Inner product checksum mr3 = 34123713 +Inner product checksum mr4 = 368F7E5D Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt index 5edec3d07..8e17322f7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 44D9577E -Inner product checksum theta = 5504FC04 -Inner product checksum u = 74276D87 +Inner product checksum theta = 5504FC06 +Inner product checksum u = 74276D62 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt index 6b2aee26c..25d91e816 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D6659E -Inner product checksum theta = 518E92B2 -Inner product checksum u = 6AF645B2 -Inner product checksum mr1 = 3FD17BD6 -Inner product checksum mr2 = 374872C0 -Inner product checksum mr3 = 35460093 -Inner product checksum mr4 = 36D513C0 +Inner product checksum rho = 46D66645 +Inner product checksum theta = 518E9258 +Inner product checksum u = 6AF5B934 +Inner product checksum mr1 = 3FD1882C +Inner product checksum mr2 = 372DB77C +Inner product checksum mr3 = 3550CFFF +Inner product checksum mr4 = 36CE2190 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index a8247bf83..dad9cc2fe 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64EB7 -Inner product checksum theta = 51925204 -Inner product checksum u = 6B220318 -Inner product checksum mr1 = 3FCF4E45 -Inner product checksum mr2 = 37351348 -Inner product checksum mr3 = 353C1842 -Inner product checksum mr4 = 369D1690 +Inner product checksum rho = 46D65050 +Inner product checksum theta = 519252CF +Inner product checksum u = 6B21E348 +Inner product checksum mr1 = 3FCF42D1 +Inner product checksum mr2 = 37381DAF +Inner product checksum mr3 = 3540D096 +Inner product checksum mr4 = 368F0E56 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 935dab390..f9432b922 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C71 +Inner product checksum rho = 48D65CA2 Inner product checksum theta = 5399FF3C -Inner product checksum u = 6B12FB2B -Inner product checksum mr1 = 41CC3802 -Inner product checksum mr2 = 3967ECD4 -Inner product checksum mr3 = 37C2B69E -Inner product checksum mr4 = 3941B53E +Inner product checksum u = 6B12FA97 +Inner product checksum mr1 = 41CC37A2 +Inner product checksum mr2 = 39653132 +Inner product checksum mr3 = 37D05F64 +Inner product checksum mr4 = 393DABFB Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 5fff179dc..72bfd583c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64EEF -Inner product checksum theta = 5192521E -Inner product checksum u = 6B22308E -Inner product checksum mr1 = 3FCF4F09 -Inner product checksum mr2 = 3759E9CC -Inner product checksum mr3 = 354E368D -Inner product checksum mr4 = 36A1E498 +Inner product checksum rho = 46D65168 +Inner product checksum theta = 5192527C +Inner product checksum u = 6B222314 +Inner product checksum mr1 = 3FCF2D3A +Inner product checksum mr2 = 37213889 +Inner product checksum mr3 = 35332238 +Inner product checksum mr4 = 369777BC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 5f9dc4d3a..e9c196850 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C63 -Inner product checksum theta = 5399FF3D -Inner product checksum u = 6B12FB74 -Inner product checksum mr1 = 41CC353D -Inner product checksum mr2 = 3961D6B7 -Inner product checksum mr3 = 37C2B434 -Inner product checksum mr4 = 39414ED7 +Inner product checksum rho = 48D65C88 +Inner product checksum theta = 5399FF36 +Inner product checksum u = 6B12FAA8 +Inner product checksum mr1 = 41CC3316 +Inner product checksum mr2 = 3964F6F4 +Inner product checksum mr3 = 37D7B383 +Inner product checksum mr4 = 393DDB1C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 86e53b19c..dc726253f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C66 -Inner product checksum theta = 5399FF39 -Inner product checksum u = 6B12FCF8 -Inner product checksum mr1 = 41CC350C -Inner product checksum mr2 = 39652046 -Inner product checksum mr3 = 37C39FEA -Inner product checksum mr4 = 394124EC +Inner product checksum rho = 48D65C9A +Inner product checksum theta = 5399FF32 +Inner product checksum u = 6B12FB2D +Inner product checksum mr1 = 41CC3064 +Inner product checksum mr2 = 3965037F +Inner product checksum mr3 = 37CA7B1F +Inner product checksum mr4 = 393E5CEB Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt index 1803e212b..33a61afa5 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D665F0 -Inner product checksum theta = 518E903E -Inner product checksum u = 6AF66607 -Inner product checksum mr1 = 3FD1CEB7 -Inner product checksum mr2 = 3750C0F4 -Inner product checksum mr3 = 35308456 -Inner product checksum mr4 = 36C50D71 +Inner product checksum rho = 46D66721 +Inner product checksum theta = 518E9952 +Inner product checksum u = 6AF570FF +Inner product checksum mr1 = 3FD149C8 +Inner product checksum mr2 = 373B0B70 +Inner product checksum mr3 = 3542F26A +Inner product checksum mr4 = 36D60834 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt index cd932b385..897bb2a8a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64E7A -Inner product checksum theta = 51925011 -Inner product checksum u = 6B22BF73 -Inner product checksum mr1 = 3FCF5905 -Inner product checksum mr2 = 37435010 -Inner product checksum mr3 = 3542184C -Inner product checksum mr4 = 36AEB332 +Inner product checksum rho = 46D65158 +Inner product checksum theta = 51925088 +Inner product checksum u = 6B22E36C +Inner product checksum mr1 = 3FCF38CE +Inner product checksum mr2 = 373B43CF +Inner product checksum mr3 = 3538FC26 +Inner product checksum mr4 = 369D3958 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt index 1d9be2526..e16714575 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64DFC -Inner product checksum theta = 51924FF0 -Inner product checksum u = 6B227D3C -Inner product checksum mr1 = 3FCF3F5B -Inner product checksum mr2 = 373A7C56 -Inner product checksum mr3 = 353EAD7B -Inner product checksum mr4 = 36A63314 +Inner product checksum rho = 46D650A6 +Inner product checksum theta = 519250BE +Inner product checksum u = 6B229F64 +Inner product checksum mr1 = 3FCF2FBF +Inner product checksum mr2 = 373591AE +Inner product checksum mr3 = 3535C603 +Inner product checksum mr4 = 36A3BD88 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt index 8bd71eba7..91bb01bc5 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 489A8379 -Inner product checksum theta = 51BA505B -Inner product checksum u = 5F118CC2 -Inner product checksum mr1 = 4187C6A4 -Inner product checksum mr2 = 3AF39B2F -Inner product checksum mr3 = 34D56FED +Inner product checksum rho = 489A8317 +Inner product checksum theta = 51BA5074 +Inner product checksum u = 5F1192E8 +Inner product checksum mr1 = 4187BC72 +Inner product checksum mr2 = 3AF9734F +Inner product checksum mr3 = 34BC1253 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt index 0c8494eec..9c29598f8 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 4798D952 -Inner product checksum theta = 58406A9C -Inner product checksum u = 79BA72A4 +Inner product checksum theta = 58406A9E +Inner product checksum u = 79BA728C diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt index b2f8542fb..7a10b693d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D85C1E -Inner product checksum theta = 518BD68E -Inner product checksum u = 6A8AB4A2 -Inner product checksum mr1 = 3FCD6B98 -Inner product checksum mr2 = 3834A23C -Inner product checksum mr3 = 35462D21 -Inner product checksum mr4 = 36C2FB8E -Inner product checksum mr5 = 2E9A3459 -Inner product checksum mr6 = 355C98F6 +Inner product checksum rho = 46D8579C +Inner product checksum theta = 518BD66C +Inner product checksum u = 6A8B331F +Inner product checksum mr1 = 3FCCAF7B +Inner product checksum mr2 = 3833B901 +Inner product checksum mr3 = 3538B539 +Inner product checksum mr4 = 36CB1792 +Inner product checksum mr5 = 2E91F418 +Inner product checksum mr6 = 3580229C diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt index 8d6f364b6..26acfbf09 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8450A -Inner product checksum theta = 518BD8F0 -Inner product checksum u = 6A87D5CF -Inner product checksum mr1 = 3FCF848A -Inner product checksum mr2 = 37EF578A -Inner product checksum mr3 = 37A268D4 -Inner product checksum mr4 = 37A12861 -Inner product checksum mr5 = 36AF6891 +Inner product checksum rho = 46D8458C +Inner product checksum theta = 518BD62A +Inner product checksum u = 6A87FCF8 +Inner product checksum mr1 = 3FCF951F +Inner product checksum mr2 = 37E6BD02 +Inner product checksum mr3 = 378A7D17 +Inner product checksum mr4 = 3797816D +Inner product checksum mr5 = 36A1EFBC Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt index 528c8a616..86f1a8990 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D832D6 -Inner product checksum theta = 518BE1F6 -Inner product checksum u = 6A86BC76 -Inner product checksum mr1 = 3FD120E6 -Inner product checksum mr2 = 37FAD7AC -Inner product checksum mr3 = 376811C0 -Inner product checksum mr4 = 37BFF8BC -Inner product checksum mr5 = 3697AF6E +Inner product checksum rho = 46D832FB +Inner product checksum theta = 518BE422 +Inner product checksum u = 6A85F6E0 +Inner product checksum mr1 = 3FD14346 +Inner product checksum mr2 = 37F2F57E +Inner product checksum mr3 = 3782C0C7 +Inner product checksum mr4 = 37BAC82C +Inner product checksum mr5 = 368F067F Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt index c17987500..f94eb38a4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8528E -Inner product checksum theta = 518BDFC0 -Inner product checksum u = 6A84BE51 -Inner product checksum mr1 = 3FCE1718 -Inner product checksum mr2 = 37F0E036 -Inner product checksum mr3 = 37746CB5 -Inner product checksum mr4 = 375B7784 -Inner product checksum mr5 = 35F5451D +Inner product checksum rho = 46D85410 +Inner product checksum theta = 518BE004 +Inner product checksum u = 6A85218C +Inner product checksum mr1 = 3FCE9E1F +Inner product checksum mr2 = 37E4C939 +Inner product checksum mr3 = 3788C888 +Inner product checksum mr4 = 3742DF88 +Inner product checksum mr5 = 35FA4066 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt index 3defd3bad..0173068fd 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D83942 -Inner product checksum theta = 518BD198 -Inner product checksum u = 6A8858C5 -Inner product checksum mr1 = 3FD03D69 -Inner product checksum mr2 = 37C68732 -Inner product checksum mr3 = 35A338B2 -Inner product checksum mr4 = 372B63E6 +Inner product checksum rho = 46D83A4C +Inner product checksum theta = 518BD444 +Inner product checksum u = 6A88FD52 +Inner product checksum mr1 = 3FD053A6 +Inner product checksum mr2 = 37C1F342 +Inner product checksum mr3 = 35B0A3F5 +Inner product checksum mr4 = 371EEFC4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt index 1e17cfead..34b7b82b3 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40DB0770E3192095 -Inner product checksum theta = 42317AE3AD158CC4 -Inner product checksum u = 455118036F27A992 -Inner product checksum mr1 = 3FF9FB92A4B6D4E0 -Inner product checksum mr2 = 3EFA9528278A8038 -Inner product checksum mr3 = 3EB5BDCF89E24FCD -Inner product checksum mr4 = 3EE810E99B341094 +Inner product checksum rho = 40DB0757B4BE3749 +Inner product checksum theta = 42317AE8FF170FEB +Inner product checksum u = 45511C298292738C +Inner product checksum mr1 = 3FFA072396A05146 +Inner product checksum mr2 = 3EF7CFE7BA88E481 +Inner product checksum mr3 = 3EB62B4610C1BC12 +Inner product checksum mr4 = 3EE6F10435082B52 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt index 5caec27d7..b890162cf 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FDC2 -Inner product checksum theta = 5392A6CA -Inner product checksum u = 6A97C06C -Inner product checksum mr1 = 41CCFFD6 -Inner product checksum mr2 = 39CB289D -Inner product checksum mr3 = 37B0138E -Inner product checksum mr4 = 3962555F +Inner product checksum rho = 48D7FE18 +Inner product checksum theta = 5392A6A2 +Inner product checksum u = 6A97C089 +Inner product checksum mr1 = 41CD056D +Inner product checksum mr2 = 39CBD9F4 +Inner product checksum mr3 = 37B13018 +Inner product checksum mr4 = 3961993C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt index e3aa91e3c..d7770fd37 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81338 -Inner product checksum theta = 51944576 -Inner product checksum u = 6B463F06 -Inner product checksum mr1 = 3FC88651 -Inner product checksum mr2 = 37A36829 -Inner product checksum mr3 = 35A6D95D -Inner product checksum mr4 = 37887FC4 +Inner product checksum rho = 46D8133C +Inner product checksum theta = 51944574 +Inner product checksum u = 6B464490 +Inner product checksum mr1 = 3FC8853A +Inner product checksum mr2 = 379E8516 +Inner product checksum mr3 = 35A323FA +Inner product checksum mr4 = 3787E04A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index c3a2a6d16..8342a28b3 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F858 -Inner product checksum theta = 518E7E7A -Inner product checksum u = 6B17CC75 -Inner product checksum mr1 = 3FCBD462 -Inner product checksum mr2 = 37AD8A40 -Inner product checksum mr3 = 34B9932D -Inner product checksum mr4 = 36C12B34 +Inner product checksum rho = 46D7F7B0 +Inner product checksum theta = 518E7E70 +Inner product checksum u = 6B17F06C +Inner product checksum mr1 = 3FCBD2DC +Inner product checksum mr2 = 37AA5968 +Inner product checksum mr3 = 34B52578 +Inner product checksum mr4 = 36D010CE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 5caec27d7..b890162cf 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FDC2 -Inner product checksum theta = 5392A6CA -Inner product checksum u = 6A97C06C -Inner product checksum mr1 = 41CCFFD6 -Inner product checksum mr2 = 39CB289D -Inner product checksum mr3 = 37B0138E -Inner product checksum mr4 = 3962555F +Inner product checksum rho = 48D7FE18 +Inner product checksum theta = 5392A6A2 +Inner product checksum u = 6A97C089 +Inner product checksum mr1 = 41CD056D +Inner product checksum mr2 = 39CBD9F4 +Inner product checksum mr3 = 37B13018 +Inner product checksum mr4 = 3961993C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index b3a490ffd..0d4f3ce57 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F7C0 -Inner product checksum theta = 518E7EA0 -Inner product checksum u = 6B17D322 -Inner product checksum mr1 = 3FCBE140 -Inner product checksum mr2 = 37A8EADE -Inner product checksum mr3 = 349D5EB2 -Inner product checksum mr4 = 36BD9099 +Inner product checksum rho = 46D7F7AC +Inner product checksum theta = 518E7EA3 +Inner product checksum u = 6B17BE26 +Inner product checksum mr1 = 3FCBE680 +Inner product checksum mr2 = 37AE7092 +Inner product checksum mr3 = 34A9B6C4 +Inner product checksum mr4 = 36BDA705 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 64f8b7725..29bd868de 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE02 -Inner product checksum theta = 5392A6B8 -Inner product checksum u = 6A97C654 -Inner product checksum mr1 = 41CD029C -Inner product checksum mr2 = 39CE5000 -Inner product checksum mr3 = 37ACA3FB -Inner product checksum mr4 = 396055DE +Inner product checksum rho = 48D7FE2C +Inner product checksum theta = 5392A6D4 +Inner product checksum u = 6A97BEC1 +Inner product checksum mr1 = 41CD0CC7 +Inner product checksum mr2 = 39CB66B4 +Inner product checksum mr3 = 37B1817F +Inner product checksum mr4 = 395EDCEA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt index f9df60826..a0f66c0a6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FCFF -Inner product checksum theta = 5392A6F0 -Inner product checksum u = 6A97B7D3 -Inner product checksum mr1 = 41CD0DDA -Inner product checksum mr2 = 39CD2EE0 -Inner product checksum mr3 = 37B6DDF3 -Inner product checksum mr4 = 3963190E +Inner product checksum rho = 48D7FD0C +Inner product checksum theta = 5392A6D8 +Inner product checksum u = 6A97B91D +Inner product checksum mr1 = 41CD0EA5 +Inner product checksum mr2 = 39CD893A +Inner product checksum mr3 = 37B79510 +Inner product checksum mr4 = 395E278D Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index f05ae48b9..2cc719d5b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FDF2 -Inner product checksum theta = 5392A6C1 -Inner product checksum u = 6A97C07E -Inner product checksum mr1 = 41CD05C2 -Inner product checksum mr2 = 39C9FA29 -Inner product checksum mr3 = 37B66B12 -Inner product checksum mr4 = 39605796 +Inner product checksum rho = 48D7FE10 +Inner product checksum theta = 5392A6B8 +Inner product checksum u = 6A97BB45 +Inner product checksum mr1 = 41CD0AE6 +Inner product checksum mr2 = 39CCBBC2 +Inner product checksum mr3 = 37B00A0F +Inner product checksum mr4 = 3960ED49 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt index 7d15a5c26..d2c7ffcdf 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE88 -Inner product checksum theta = 5392A6C2 -Inner product checksum u = 6A97BFB9 -Inner product checksum mr1 = 41CD0697 -Inner product checksum mr2 = 39C8DC60 -Inner product checksum mr3 = 37B00779 -Inner product checksum mr4 = 395B6E15 +Inner product checksum rho = 48D7FE74 +Inner product checksum theta = 5392A6D4 +Inner product checksum u = 6A97C89A +Inner product checksum mr1 = 41CD0762 +Inner product checksum mr2 = 39CD5F24 +Inner product checksum mr3 = 37BE39B8 +Inner product checksum mr4 = 395CDF2E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt index bbc606f94..4b343c147 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC63 -Inner product checksum theta = 5392A688 -Inner product checksum u = 6A97C7E2 -Inner product checksum mr1 = 41CCE1BA -Inner product checksum mr2 = 39CC1EA5 -Inner product checksum mr3 = 37B52B9E -Inner product checksum mr4 = 3971E51F +Inner product checksum rho = 48D7FC27 +Inner product checksum theta = 5392A690 +Inner product checksum u = 6A97C7C1 +Inner product checksum mr1 = 41CCE6BC +Inner product checksum mr2 = 39CCAB4E +Inner product checksum mr3 = 37AC310A +Inner product checksum mr4 = 397240F4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt index 6fbce5e9f..3c702f837 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FB44 -Inner product checksum theta = 5392A6B6 -Inner product checksum u = 6A97B404 -Inner product checksum mr1 = 41CCE89F -Inner product checksum mr2 = 39CC1B52 -Inner product checksum mr3 = 37AE1DF8 -Inner product checksum mr4 = 397813E2 +Inner product checksum rho = 48D7FB4D +Inner product checksum theta = 5392A6BF +Inner product checksum u = 6A97B4CF +Inner product checksum mr1 = 41CCE4CA +Inner product checksum mr2 = 39D1AFCE +Inner product checksum mr3 = 37B349DC +Inner product checksum mr4 = 3976F722 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt index 4b98b2ae7..478d4fcb5 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81300 -Inner product checksum theta = 518BD591 -Inner product checksum u = 6A86E3C2 -Inner product checksum mr1 = 3FD3C193 -Inner product checksum mr2 = 37E8C1CE -Inner product checksum mr3 = 35B99320 -Inner product checksum mr4 = 36D70E14 +Inner product checksum rho = 46D8134A +Inner product checksum theta = 518BD7B8 +Inner product checksum u = 6A871854 +Inner product checksum mr1 = 3FD3D860 +Inner product checksum mr2 = 37DAB787 +Inner product checksum mr3 = 35B5427A +Inner product checksum mr4 = 36C7CCC3 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt index 6b296c277..72d0bfd81 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8046D +Inner product checksum rho = 46D8046E Inner product checksum theta = 519522B0 -Inner product checksum u = 6AE67712 -Inner product checksum mr1 = 3FC861DE -Inner product checksum mr2 = 37CDBC97 -Inner product checksum mr3 = 352223A1 -Inner product checksum mr4 = 36EFD230 +Inner product checksum u = 6AE676F3 +Inner product checksum mr1 = 3FC861D0 +Inner product checksum mr2 = 37CF9691 +Inner product checksum mr3 = 351F51C6 +Inner product checksum mr4 = 36EFCBFC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt index 4b358888f..52e4cd78a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48D81494 -Inner product checksum theta = 53952667 -Inner product checksum u = 6AA4D6DD -Inner product checksum mr1 = 41C83143 -Inner product checksum mr2 = 399A84AB -Inner product checksum mr3 = 377973DB -Inner product checksum mr4 = 3930117B +Inner product checksum theta = 53952666 +Inner product checksum u = 6AA4D6C3 +Inner product checksum mr1 = 41C830E0 +Inner product checksum mr2 = 399AC878 +Inner product checksum mr3 = 3778FE37 +Inner product checksum mr4 = 39300070 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt index 7a5e3cff4..d7dd1131b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D818B8 -Inner product checksum theta = 518BB117 -Inner product checksum u = 6A8D23A8 -Inner product checksum mr1 = 3FD1137A -Inner product checksum mr2 = 37DB360D -Inner product checksum mr3 = 35A031F6 -Inner product checksum mr4 = 370B3EBC +Inner product checksum rho = 46D815B7 +Inner product checksum theta = 518BB015 +Inner product checksum u = 6A8D3286 +Inner product checksum mr1 = 3FD11C03 +Inner product checksum mr2 = 37EF08A9 +Inner product checksum mr3 = 35947BBC +Inner product checksum mr4 = 3728DBFF Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt index aa2bed702..129ca8373 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D813AE -Inner product checksum theta = 518BD182 -Inner product checksum u = 6A884A33 -Inner product checksum mr1 = 3FD3B2DE -Inner product checksum mr2 = 37DA9C3A -Inner product checksum mr3 = 35940F5E -Inner product checksum mr4 = 3712DD31 +Inner product checksum rho = 46D81532 +Inner product checksum theta = 518BCDE7 +Inner product checksum u = 6A87EBC8 +Inner product checksum mr1 = 3FD3CB55 +Inner product checksum mr2 = 37DAAA72 +Inner product checksum mr3 = 35A92463 +Inner product checksum mr4 = 36DE32C6 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt index 440c859d0..f7a76a6ba 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D85DEA -Inner product checksum theta = 5193AF22 -Inner product checksum u = 6A865782 -Inner product checksum mr1 = 3FD05C10 -Inner product checksum mr2 = 37AECC7C -Inner product checksum mr3 = 35555AD4 -Inner product checksum mr4 = 36CEE5C2 +Inner product checksum rho = 46D85DCF +Inner product checksum theta = 5193AFAC +Inner product checksum u = 6A859D08 +Inner product checksum mr1 = 3FD01F04 +Inner product checksum mr2 = 37A9C60E +Inner product checksum mr3 = 353B3722 +Inner product checksum mr4 = 36F41E2E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt index a9cda3d60..cc50d603f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F53F -Inner product checksum theta = 518E7EF8 -Inner product checksum u = 6B17A164 -Inner product checksum mr1 = 3FCBDDC0 -Inner product checksum mr2 = 37B65076 -Inner product checksum mr3 = 34AF8D37 -Inner product checksum mr4 = 36FD8E6A +Inner product checksum rho = 46D7F5C5 +Inner product checksum theta = 518E7EDA +Inner product checksum u = 6B17A12D +Inner product checksum mr1 = 3FCBC892 +Inner product checksum mr2 = 37A48130 +Inner product checksum mr3 = 34D116D4 +Inner product checksum mr4 = 36EAFBEF Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 2d055cced..5dece7c6a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC49 -Inner product checksum theta = 5392A69F -Inner product checksum u = 6A97BDE8 -Inner product checksum mr1 = 41CCE85E -Inner product checksum mr2 = 39CAFA12 -Inner product checksum mr3 = 37ABD166 -Inner product checksum mr4 = 3973E9E8 +Inner product checksum rho = 48D7FC1C +Inner product checksum theta = 5392A660 +Inner product checksum u = 6A97BEDD +Inner product checksum mr1 = 41CCE8AE +Inner product checksum mr2 = 39CD6F70 +Inner product checksum mr3 = 37AE4ED3 +Inner product checksum mr4 = 39701857 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt index 973d78bb8..1d8d04cdd 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F57C -Inner product checksum theta = 518E7EDE -Inner product checksum u = 6B17A83B -Inner product checksum mr1 = 3FCBE8E8 -Inner product checksum mr2 = 37AA5510 -Inner product checksum mr3 = 34A43776 -Inner product checksum mr4 = 36EB4854 +Inner product checksum rho = 46D7F51F +Inner product checksum theta = 518E7EDD +Inner product checksum u = 6B17AA10 +Inner product checksum mr1 = 3FCBD631 +Inner product checksum mr2 = 37B619D8 +Inner product checksum mr3 = 34B1FB3A +Inner product checksum mr4 = 36F479A2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index a3af9fcda..bb1053b50 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,11 +1,9 @@ - -Inner product checksum rho = 48D7FC5D -Inner product checksum theta = 5392A66D -Inner product checksum u = 6A97C28C -Inner product checksum mr1 = 41CCEB8E -Inner product checksum mr2 = 39CA5305 -Inner product checksum mr3 = 37AD7626 -Inner product checksum mr4 = 39706818 ->>>>>>> upstream/main +Inner product checksum rho = 48D7FC8E +Inner product checksum theta = 5392A65E +Inner product checksum u = 6A97BDC4 +Inner product checksum mr1 = 41CCF31E +Inner product checksum mr2 = 39CB81EA +Inner product checksum mr3 = 37B6099F +Inner product checksum mr4 = 3976DD09 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt index e5354a8b9..77e5ba5ff 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,10 +1,9 @@ -Inner product checksum rho = 48D7FB5E -Inner product checksum theta = 5392A6DE -Inner product checksum u = 6A97B4CC -Inner product checksum mr1 = 41CCEE7C -Inner product checksum mr2 = 39CC8EE4 -Inner product checksum mr3 = 37AE7CC2 -Inner product checksum mr4 = 39706A08 ->>>>>>> upstream/main +Inner product checksum rho = 48D7FB4E +Inner product checksum theta = 5392A6ED +Inner product checksum u = 6A97B55D +Inner product checksum mr1 = 41CCF369 +Inner product checksum mr2 = 39CDEEBC +Inner product checksum mr3 = 37AF72F2 +Inner product checksum mr4 = 3971EA0E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index a9ffceead..619893f28 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC4A -Inner product checksum theta = 5392A66A -Inner product checksum u = 6A97BE23 -Inner product checksum mr1 = 41CCE6A6 -Inner product checksum mr2 = 39CB60DC -Inner product checksum mr3 = 37AF065D -Inner product checksum mr4 = 3973921C +Inner product checksum rho = 48D7FC0D +Inner product checksum theta = 5392A68F +Inner product checksum u = 6A97B9E4 +Inner product checksum mr1 = 41CCE358 +Inner product checksum mr2 = 39C99F2A +Inner product checksum mr3 = 37AF50B0 +Inner product checksum mr4 = 397189F7 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt index 453cf594b..fc875d1dd 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D80CA6 -Inner product checksum theta = 5194ED76 -Inner product checksum u = 6B08591A -Inner product checksum mr1 = 3FC88034 -Inner product checksum mr2 = 37C26C0C -Inner product checksum mr3 = 35767D74 -Inner product checksum mr4 = 372A0F68 +Inner product checksum rho = 46D7FC00 +Inner product checksum theta = 5195576C +Inner product checksum u = 6B246EA5 +Inner product checksum mr1 = 3FC852FF +Inner product checksum mr2 = 381E302C +Inner product checksum mr3 = 35639D20 +Inner product checksum mr4 = 36F6E186 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 317acc6a4..1e9885931 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997DE -Inner product checksum theta = 51354909 -Inner product checksum u = 612F5E11 -Inner product checksum mr1 = 4090F5E4 -Inner product checksum mr2 = 358EB0BA -Inner product checksum mr3 = 2FA519F0 -Inner product checksum mr4 = 33F4FD57 -Inner product checksum mr5 = BE85FEC +Inner product checksum rho = 483997DA +Inner product checksum theta = 5135490A +Inner product checksum u = 612F5E0C +Inner product checksum mr1 = 4090F5EC +Inner product checksum mr2 = 3599E934 +Inner product checksum mr3 = 2FA5315A +Inner product checksum mr4 = 33F4FD4E +Inner product checksum mr5 = BE85FCC Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 7b6d5479c..9f0b2b052 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997E3 -Inner product checksum theta = 51354900 -Inner product checksum u = 612F5EB6 -Inner product checksum mr1 = 40910DBB -Inner product checksum mr2 = 3600A9CC -Inner product checksum mr3 = 2FA77A9F -Inner product checksum mr4 = 33F4FFEC -Inner product checksum mr5 = BE04B21 +Inner product checksum rho = 483997EC +Inner product checksum theta = 513548FD +Inner product checksum u = 612F5EB9 +Inner product checksum mr1 = 40910DEE +Inner product checksum mr2 = 35DE4A2C +Inner product checksum mr3 = 2FA75F15 +Inner product checksum mr4 = 33F4FFD3 +Inner product checksum mr5 = BE04B38 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 24e480b50..b3bf80080 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48398C6A Inner product checksum theta = 51354302 -Inner product checksum u = 612EDCAC -Inner product checksum mr1 = 40910338 -Inner product checksum mr2 = 35876274 -Inner product checksum mr3 = 30010BB7 -Inner product checksum mr4 = 3404AC2D +Inner product checksum u = 612EDCBA +Inner product checksum mr1 = 4091034B +Inner product checksum mr2 = 3592F0C2 +Inner product checksum mr3 = 300105E3 +Inner product checksum mr4 = 3404AC1D Inner product checksum mr5 = C14A22D Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt index d6c9e6e85..9006b2022 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 4830B653 -Inner product checksum theta = 513FD830 -Inner product checksum u = 5F74B058 -Inner product checksum mr1 = 4155BC4A -Inner product checksum mr2 = 3A3F75A2 -Inner product checksum mr3 = 3088CA46 +Inner product checksum rho = 4830B646 +Inner product checksum theta = 513FD832 +Inner product checksum u = 5F74BAEC +Inner product checksum mr1 = 4155B86C +Inner product checksum mr2 = 3A48BCB8 +Inner product checksum mr3 = 30A6CEC1 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt index e78d4e606..490974e84 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 486B4A14 -Inner product checksum theta = 51CABEF1 -Inner product checksum u = 63C9A16C +Inner product checksum rho = 486B4A17 +Inner product checksum theta = 51CABEF0 +Inner product checksum u = 63C9A5FD diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index c3d509995..4503347e9 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B5407F4CE40FD -Inner product checksum theta = 42735B1EDCE5682D -Inner product checksum u = 456F41EDCEE58D54 -Inner product checksum mr1 = 4036855990B99604 -Inner product checksum mr2 = 3F4021291625C39B -Inner product checksum mr3 = 3F00980BB1AF46A0 -Inner product checksum mr4 = 3F368688EE9DBAD2 +Inner product checksum rho = 411B540CBDAAF1E6 +Inner product checksum theta = 42735B1CEA783DEF +Inner product checksum u = 456F419B54DF718C +Inner product checksum mr1 = 403684B192F9B7C8 +Inner product checksum mr2 = 3F3FB9B37223D660 +Inner product checksum mr3 = 3F01A34A33053A49 +Inner product checksum mr4 = 3F3682A9C70300EA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt index 6b4b2fab9..4148368a6 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3F20225948327449 -Inner product checksum theta = 4033068A55E5336A -Inner product checksum u = 433056118E515C60 +Inner product checksum rho = 3F20250B4FE9B9EF +Inner product checksum theta = 403305E848D6E311 +Inner product checksum u = 433053B3FA026478 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt index 48d058c8b..6a7be832b 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA509A05A373B23 -Inner product checksum theta = 41610F1B6ABD09B0 -Inner product checksum u = 45688F5F19933A2F -Inner product checksum mr1 = 3F35BCF4D7DD3124 -Inner product checksum mr2 = 3EEAFF88125CD2E4 -Inner product checksum mr3 = 3EE049CB61EE38FC -Inner product checksum mr4 = 3EED5E034DF58BB4 +Inner product checksum rho = 3FA958F0C1D55513 +Inner product checksum theta = 4161FFBE6B89106C +Inner product checksum u = 456A4D0AF00B4480 +Inner product checksum mr1 = 3F3B888F79EB2E18 +Inner product checksum mr2 = 3EEB3109C670AF3C +Inner product checksum mr3 = 3EDFF31B816930A0 +Inner product checksum mr4 = 3EED42827F73DFDC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt deleted file mode 100644 index 49730ad8f..000000000 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3D284CEE -Inner product checksum theta = 4B087745 -Inner product checksum u = 6B447884 -Inner product checksum mr1 = 39ADE81D -Inner product checksum mr2 = 37580586 -Inner product checksum mr3 = 37024B58 -Inner product checksum mr4 = 376AFC3F -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt index b1f6fd6ff..c19cd8f5f 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40AFD0F64A85F322 -Inner product checksum theta = 43076FC46F15B98E -Inner product checksum u = 4697A257F5DA33B8 -Inner product checksum mr1 = 4087B978652013B5 -Inner product checksum mr2 = 406997D34AFE58E4 -Inner product checksum mr3 = 4069A875F066DF80 -Inner product checksum mr4 = 406986D990E6CEA9 +Inner product checksum rho = 40C2C1694FA30DD0 +Inner product checksum theta = 43076DE653AEC2FE +Inner product checksum u = 4697E3FAA368DE1C +Inner product checksum mr1 = 40A1D167F8ADA142 +Inner product checksum mr2 = 40699AF5BDBC4864 +Inner product checksum mr3 = 4069A3412D88D047 +Inner product checksum mr4 = 40697EB0A557078A Inner product checksum mr5 = 406997D0C9B8EEFB Inner product checksum mr6 = 40699547929283AC diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt index 26185b0b3..f7e9ed399 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED280BC77910C4 -Inner product checksum theta = 4012F415A1A3DFEB -Inner product checksum u = 43A4936A5FD74DF4 +Inner product checksum rho = 3EED280BC778BD3B +Inner product checksum theta = 4012F415A1A3F24B +Inner product checksum u = 43A4936A5FD755CE diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt index 9ea9f30ef..a5449d77a 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3F20225948390658 -Inner product checksum theta = 4033068A55BC3748 -Inner product checksum u = 433056118E328CBC +Inner product checksum rho = 3F20250B300C3D30 +Inner product checksum theta = 403305E8470B6A22 +Inner product checksum u = 433053B3A41C6049 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt deleted file mode 100644 index 5dfff90ae..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3D284C78 -Inner product checksum theta = 4B087863 -Inner product checksum u = 6B447A8E -Inner product checksum mr1 = 39ADE62A -Inner product checksum mr2 = 37581360 -Inner product checksum mr3 = 37025739 -Inner product checksum mr4 = 376B0645 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt deleted file mode 100644 index 06fa02a65..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3FA5099F6003533A -Inner product checksum theta = 41610F1B43DFDDB2 -Inner product checksum u = 45688F5EC2FBF69A -Inner product checksum mr1 = 3F35BCF98E9C5B10 -Inner product checksum mr2 = 3EEAFF88D33E0CFE -Inner product checksum mr3 = 3EE049CB63E270F4 -Inner product checksum mr4 = 3EED5E03840E2812 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt deleted file mode 100644 index d1df98ac3..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3D284AE2 -Inner product checksum theta = 4B0877EC -Inner product checksum u = 6B4479D3 -Inner product checksum mr1 = 39ADE43E -Inner product checksum mr2 = 37581886 -Inner product checksum mr3 = 37024D8F -Inner product checksum mr4 = 376ADB79 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt deleted file mode 100644 index bcfb6e282..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3FA509A35A558386 -Inner product checksum theta = 41610F1C92657C34 -Inner product checksum u = 45688F61E0CB5BE5 -Inner product checksum mr1 = 3F35BCE5306E6416 -Inner product checksum mr2 = 3EEAFF88AFF1C5F2 -Inner product checksum mr3 = 3EE049CB62F1062E -Inner product checksum mr4 = 3EED5E036CB1379F -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt deleted file mode 100644 index 9331aab13..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3D284C91 -Inner product checksum theta = 4B087777 -Inner product checksum u = 6B4478FE -Inner product checksum mr1 = 39ADE81E -Inner product checksum mr2 = 375811AE -Inner product checksum mr3 = 37025154 -Inner product checksum mr4 = 376AFFAE -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt index 5a152f61a..8839d63b9 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA509A19CBF114C -Inner product checksum theta = 41610F1BFEB0E6B6 -Inner product checksum u = 45688F5FDBD474EE -Inner product checksum mr1 = 3F35BCF304716E6C -Inner product checksum mr2 = 3EEAFF885F22B408 -Inner product checksum mr3 = 3EE049CB62D7CD5C -Inner product checksum mr4 = 3EED5E036E5CC8B3 +Inner product checksum rho = 3FA958F09D97D52D +Inner product checksum theta = 4161FFBE7B6B7DE1 +Inner product checksum u = 456A4D0ACAB467CA +Inner product checksum mr1 = 3F3B888D5EA6A45C +Inner product checksum mr2 = 3EEB310977D9678E +Inner product checksum mr3 = 3EDFF31B705B97D8 +Inner product checksum mr4 = 3EED42824B13222B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt deleted file mode 100644 index 9331aab13..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3D284C91 -Inner product checksum theta = 4B087777 -Inner product checksum u = 6B4478FE -Inner product checksum mr1 = 39ADE81E -Inner product checksum mr2 = 375811AE -Inner product checksum mr3 = 37025154 -Inner product checksum mr4 = 376AFFAE -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt deleted file mode 100644 index 5a152f61a..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3FA509A19CBF114C -Inner product checksum theta = 41610F1BFEB0E6B6 -Inner product checksum u = 45688F5FDBD474EE -Inner product checksum mr1 = 3F35BCF304716E6C -Inner product checksum mr2 = 3EEAFF885F22B408 -Inner product checksum mr3 = 3EE049CB62D7CD5C -Inner product checksum mr4 = 3EED5E036E5CC8B3 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt deleted file mode 100644 index b0bf5b685..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3D284D10 -Inner product checksum theta = 4B08771E -Inner product checksum u = 6B447876 -Inner product checksum mr1 = 39ADE4E0 -Inner product checksum mr2 = 3757FB62 -Inner product checksum mr3 = 37024C1A -Inner product checksum mr4 = 376B018E -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt deleted file mode 100644 index 7423a529e..000000000 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 3FA5099CDBEA12B4 -Inner product checksum theta = 41610F1BEE6C742F -Inner product checksum u = 45688F5FC27D3983 -Inner product checksum mr1 = 3F35BCF575283D30 -Inner product checksum mr2 = 3EEAFF88D19CC1C6 -Inner product checksum mr3 = 3EE049CB6313FA43 -Inner product checksum mr4 = 3EED5E03BABE1564 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt index dc566e6c9..1fba69899 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40AFD0F3325D1D83 -Inner product checksum theta = 43076FC470DF7DDF -Inner product checksum u = 4697A257F73F2A4A -Inner product checksum mr1 = 4087B978405AA662 -Inner product checksum mr2 = 406997D34B3FE4CE -Inner product checksum mr3 = 4069A875F075892B -Inner product checksum mr4 = 406986D990BEDA55 +Inner product checksum rho = 40C2C1668AA536C6 +Inner product checksum theta = 43076DE652800BE2 +Inner product checksum u = 4697E3FAA2E5E0C6 +Inner product checksum mr1 = 40A1D167F834C0E0 +Inner product checksum mr2 = 40699AF5BDC7A01E +Inner product checksum mr3 = 4069A3412D91ECF2 +Inner product checksum mr4 = 40697EB0A55E4C2B Inner product checksum mr5 = 406997D0C9B8EEFC Inner product checksum mr6 = 40699547929283AD diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt index f3118f740..3906107bd 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED280BC7788E7C -Inner product checksum theta = 4012F415A1A479C3 -Inner product checksum u = 43A4936A5FDBA963 +Inner product checksum rho = 3EED280BC779365A +Inner product checksum theta = 4012F415A1A375AE +Inner product checksum u = 43A4936A5FD4C67B diff --git a/rose-stem/site/meto/macros/macros_ex1a.cylc b/rose-stem/site/meto/macros/macros_ex1a.cylc index be64728da..d7c8dc02d 100644 --- a/rose-stem/site/meto/macros/macros_ex1a.cylc +++ b/rose-stem/site/meto/macros/macros_ex1a.cylc @@ -74,24 +74,16 @@ {% set lfric_nodes = possible_nodes %} {% endif %} - {% if site_vars["ex_trustzone"] == "collab" %} - -q=collab - {% else %} -q=normal - {% endif %} -l select={{ lfric_nodes + ocean_nodes|int + river_nodes|int + - xios_nodes|int }}:coretype={{site_vars.node_type}}:mem={{site_vars.node_mem}}GB{{site_vars.crayhost}} + xios_nodes|int }}:coretype={{site_vars.node_type}}:mem={{site_vars.node_mem}}GB {% endmacro %} {% macro shared_queue(cores) %} - {% if site_vars["ex_trustzone"] == "collab" %} - -q=collabshared - {% else %} -q=shared - {% endif %} -l ncpus={{ cores }} {% endmacro %} diff --git a/rose-stem/site/meto/suite_config.cylc b/rose-stem/site/meto/suite_config.cylc index e909471e0..a4a5b03d5 100644 --- a/rose-stem/site/meto/suite_config.cylc +++ b/rose-stem/site/meto/suite_config.cylc @@ -6,12 +6,8 @@ {% do LOG.debug("Entered site/meto/suite_config.cylc") %} [[METO_ORIG]] -{% if site_vars["ex_trustzone"] == "collab" %} - inherit = EX1A_SCRIPTS -{% else %} pre-script = "module load scitools" platform = {{ROSE_ORIG_HOST}} -{% endif %} {# Family for lfric_coupled rivers/ocean 1st step builds #} [[METO_FCM_MAKE]] diff --git a/rose-stem/site/meto/variables.cylc b/rose-stem/site/meto/variables.cylc index b3a417fd2..a9cf189f1 100644 --- a/rose-stem/site/meto/variables.cylc +++ b/rose-stem/site/meto/variables.cylc @@ -32,24 +32,9 @@ {% do site_vars.update({"site_platforms": ["ex1a", "azspice"]}) %} -{# Settings for EX Collab Zone #} -{% from "socket" import getfqdn %} -{% set hostname = getfqdn() %} -{% if "collab.sc" in hostname %} - {% do site_vars.update({"ex_trustzone": "collab"}) %} - {% do site_vars.update({"USE_TOKENS": true}) %} -{% else %} - {% do site_vars.update({"ex_trustzone": "research"}) %} -{% endif %} - -{% if site_vars["ex_trustzone"] == "collab" %} - {% do site_vars.update({"launch_platform": "ex1a"}) %} - {% do site_vars.update({"scripts_platform": "ex1a"}) %} -{% else %} - {% do site_vars.update({"launch_platform": "azspice"}) %} - {% do site_vars.update({"scripts_platform": "azspice"}) %} -{% endif %} +{% do site_vars.update({"launch_platform": "azspice"}) %} +{% do site_vars.update({"scripts_platform": "azspice"}) %} {% do site_vars.update({"coupled_fcm_make_platform": "azspice"}) %} {% do site_vars.update({"git_mirror_loc": "/data/users/gitassist/git_mirrors"}) %} @@ -57,12 +42,8 @@ {% do site_vars.update({"mesh_build": {"ex1a": "gnu_fast-debug-64bit", "azspice": "gnu_fast-debug-64bit"} }) %} -{% do site_vars.update({"remote_init_family": {"ex1a": "EX1A_REMOTE_INIT"} }) %} - {# Choose EX Host - default to random ab or cd #} -{% if site_vars["ex_trustzone"] == "collab" %} - {% do site_vars.update({"host_ex" : "ex"}) %} -{% elif USE_EXZ is defined and USE_EXZ %} +{% if USE_EXZ is defined and USE_EXZ %} {% do site_vars.update({"host_ex" : "exz"}) %} {% elif USE_EXAB is defined and USE_EXAB %} {% do site_vars.update({"host_ex": "exab"}) %} @@ -84,12 +65,10 @@ {% do site_vars.update({"node_type": "genoa"}) %} {% do site_vars.update({"node_cores": 192 }) %} {% do site_vars.update({"node_mem": 720}) %} - {% do site_vars.update({"crayhost": ":crayhost=exb"}) %} {% else %} {% do site_vars.update({"node_type": "milan"}) %} {% do site_vars.update({"node_cores": 128 }) %} {% do site_vars.update({"node_mem": 238}) %} - {% do site_vars.update({"crayhost": ""}) %} {% endif %} {% do site_vars.update({"lfricinputs_kgo_base": "$UMDIR/standard_jobs/lfricinputs/kgo"}) %} diff --git a/rose-stem/templates/runtime/generate_runtime_control.cylc b/rose-stem/templates/runtime/generate_runtime_control.cylc index 00a04b699..e900d6d8e 100644 --- a/rose-stem/templates/runtime/generate_runtime_control.cylc +++ b/rose-stem/templates/runtime/generate_runtime_control.cylc @@ -24,7 +24,7 @@ ROSE_TASK_APP = extract_source DEPENDENCIES = {{dependencies}} USE_MIRRORS = {{USE_MIRRORS}} - USE_TOKENS = {{site_vars.get("USE_TOKENS", "false")}} + USE_TOKENS = {{USE_TOKENS}} {% if USE_MIRRORS %} {% if "git_mirror_loc" in site_vars %} GIT_MIRROR_LOC = {{site_vars.git_mirror_loc}} @@ -100,14 +100,8 @@ {% set platform = task.split('_')[1] %} - {% if "remote_init_family" in site_vars and platform in site_vars["remote_init_family"] %} - {% set remote_inherit = "EXPORT-SOURCE, "~site_vars["remote_init_family"][platform]~", CONTROL_TASK_RETRIES" %} - {% else %} - {% set remote_inherit = "EXPORT-SOURCE, "~platform|upper~"_BASE, CONTROL_TASK_RETRIES" %} - {% endif %} - [[{{task}}]] - inherit = {{remote_inherit}} + inherit = EXPORT-SOURCE, {{platform|upper}}_BASE, CONTROL_TASK_RETRIES script = true execution time limit = PT1M diff --git a/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch b/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch index ad1aa671a..a2dd2540b 100644 --- a/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch +++ b/science/adjoint/patches/kernel/adj_dg_matrix_vector_kernel_mod.patch @@ -27,21 +27,3 @@ contains subroutine adj_dg_matrix_vector_code_r_single(cell, nlayers, lhs, x, ncell_3d, matrix, ndf1, undf1, map1, ndf2, undf2, map2) -@@ -56,7 +56,7 @@ - do df1 = ndf1, 1, -1 - i1 = map1(df1) - do idx = i1 + nl, i1, -1 -- lhs(idx) = 0.0 -+ lhs(idx) = 0.0_r_single - enddo - enddo - -@@ -97,7 +97,7 @@ - do df1 = ndf1, 1, -1 - i1 = map1(df1) - do idx = i1 + nl, i1, -1 -- lhs(idx) = 0.0 -+ lhs(idx) = 0.0_r_double - enddo - enddo - diff --git a/science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch b/science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch deleted file mode 100644 index 413969025..000000000 --- a/science/adjoint/patches/kernel/adj_horizontal_mass_flux_kernel_mod.patch +++ /dev/null @@ -1,11 +0,0 @@ -@@ -38,9 +38,7 @@ - real(kind=r_tran) :: direction - real(kind=r_tran), dimension(nfaces) :: v_dot_n - -- v_dot_n(:) = 1.0_r_tran -- v_dot_n(1) = -1.00000000000000 -- v_dot_n(nfaces) = -1.00000000000000 -+ v_dot_n = (/ -1.0_r_tran, 1.0_r_tran, 1.0_r_tran, -1.0_r_tran /) - do df = nfaces, 1, -1 - do k = nlayers - 1, 0, -1 - direction = v_dot_n(df) * wind(k + map_w2(df)) diff --git a/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch b/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch index 766fa6892..8a7e31915 100644 --- a/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch +++ b/science/adjoint/patches/kernel/adj_sci_combine_multidata_field_kernel_mod.patch @@ -34,78 +34,7 @@ contains subroutine adj_combine_multidata_field_code_r_single(nlayers, field_out, n, field1_in, n1, field2_in, n2, ndata_first, ndf, & -@@ -49,15 +49,15 @@ - - if (ndata_first) then - do k = nlayers - 1, 0, -1 -- ij = k * n + map(1) - ij = k * n + n1 + map(1) - do df = n2 - 1, 0, -1 - field2_in(map_2(1) + k * n2 + df) = field2_in(map_2(1) + k * n2 + df) + field_out(ij + df) -- field_out(ij + df) = 0.0 -+ field_out(ij + df) = 0.0_r_single - enddo -+ ij = k * n + map(1) - do df = n1 - 1, 0, -1 - field1_in(map_1(1) + k * n1 + df) = field1_in(map_1(1) + k * n1 + df) + field_out(ij + df) -- field_out(ij + df) = 0.0 -+ field_out(ij + df) = 0.0_r_single - enddo - enddo - else -@@ -65,14 +65,14 @@ - ij = df * nlayers + n1 * nlayers - nlayers + map(1) - do k = nlayers - 1, 0, -1 - field2_in(map_2(1) + (df - 1) * nlayers + k) = field2_in(map_2(1) + (df - 1) * nlayers + k) + field_out(ij + k) -- field_out(ij + k) = 0.0 -+ field_out(ij + k) = 0.0_r_single - enddo - enddo - do df = n1, 1, -1 - ij = df * nlayers - nlayers + map(1) - do k = nlayers - 1, 0, -1 - field1_in(map_1(1) + (df - 1) * nlayers + k) = field1_in(map_1(1) + (df - 1) * nlayers + k) + field_out(ij + k) -- field_out(ij + k) = 0.0 -+ field_out(ij + k) = 0.0_r_single - enddo - enddo - end if -@@ -103,15 +103,15 @@ - - if (ndata_first) then - do k = nlayers - 1, 0, -1 -- ij = k * n + map(1) - ij = k * n + n1 + map(1) - do df = n2 - 1, 0, -1 - field2_in(map_2(1) + k * n2 + df) = field2_in(map_2(1) + k * n2 + df) + field_out(ij + df) -- field_out(ij + df) = 0.0 -+ field_out(ij + df) = 0.0_r_double - enddo -+ ij = k * n + map(1) - do df = n1 - 1, 0, -1 - field1_in(map_1(1) + k * n1 + df) = field1_in(map_1(1) + k * n1 + df) + field_out(ij + df) -- field_out(ij + df) = 0.0 -+ field_out(ij + df) = 0.0_r_double - enddo - enddo - else -@@ -119,18 +119,18 @@ - ij = df * nlayers + n1 * nlayers - nlayers + map(1) - do k = nlayers - 1, 0, -1 - field2_in(map_2(1) + (df - 1) * nlayers + k) = field2_in(map_2(1) + (df - 1) * nlayers + k) + field_out(ij + k) -- field_out(ij + k) = 0.0 -+ field_out(ij + k) = 0.0_r_double - enddo - enddo - do df = n1, 1, -1 - ij = df * nlayers - nlayers + map(1) - do k = nlayers - 1, 0, -1 - field1_in(map_1(1) + (df - 1) * nlayers + k) = field1_in(map_1(1) + (df - 1) * nlayers + k) + field_out(ij + k) -- field_out(ij + k) = 0.0 -+ field_out(ij + k) = 0.0_r_double - enddo - enddo - end if +@@ -133,4 +133,4 @@ end subroutine adj_combine_multidata_field_code_r_double diff --git a/science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch b/science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch deleted file mode 100644 index 350fd6032..000000000 --- a/science/adjoint/patches/kernel/adj_w3v_advective_update_kernel_mod.patch +++ /dev/null @@ -1,42 +0,0 @@ -@@ -45,12 +45,7 @@ - integer(kind=i_def) :: offset - real(kind=r_tran) :: w - real(kind=r_tran) :: dtdz -- real(kind=r_tran) :: t_u -- real(kind=r_tran) :: t_d - -- dtdz = 0.0_r_tran -- t_u = 0.0_r_tran -- t_d = 0.0_r_tran - if (ndf_w2 == 2) then - df = 1 - offset = 0 -@@ -61,23 +56,16 @@ - do k = nlayers - 1, 0, -1 - w = 0.5 * wind(k + map_w2(df)) + 0.5 * wind(k + map_w2(df) + 1) - ik = cell * nlayers + k - nlayers + 1 -- dtdz = dtdz + advective_increment(map_w3(1) + k) * w * REAL(m3_inv(ik,1,1), r_tran) -- t_d = t_d + (-dtdz) -- t_u = t_u + dtdz -- dtdz = 0.0 -+ dtdz = advective_increment(map_w3(1) + k) * w * REAL(m3_inv(ik,1,1), r_tran) - if (w <= 0.0_r_tran .AND. k < nlayers - 1) then -- tracer(map_md(1) + offset + k + 1) = tracer(map_md(1) + offset + k + 1) + t_u -- t_u = 0.0 -+ tracer(map_md(1) + offset + k + 1) = tracer(map_md(1) + offset + k + 1) + dtdz - else -- tracer(map_md(1) + offset + nlayers + k) = tracer(map_md(1) + offset + nlayers + k) + t_u -- t_u = 0.0 -+ tracer(map_md(1) + offset + nlayers + k) = tracer(map_md(1) + offset + nlayers + k) + dtdz - end if - if (w > 0.0_r_tran .AND. k > 0) then -- tracer(map_md(1) + offset + nlayers + k - 1) = tracer(map_md(1) + offset + nlayers + k - 1) + t_d -- t_d = 0.0 -+ tracer(map_md(1) + offset + nlayers + k - 1) = tracer(map_md(1) + offset + nlayers + k - 1) - dtdz - else -- tracer(map_md(1) + offset + k) = tracer(map_md(1) + offset + k) + t_d -- t_d = 0.0 -+ tracer(map_md(1) + offset + k) = tracer(map_md(1) + offset + k) - dtdz - end if - enddo - diff --git a/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch b/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch index aa04ceb40..9e6a07c05 100644 --- a/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_horizontal_mass_flux_kernel_mod.patch @@ -8,7 +8,7 @@ - type, public, extends(kernel_type) :: adj_horizontal_mass_flux_kernel_type + type, public, extends(kernel_type) :: atl_horizontal_mass_flux_kernel_type type(ARG_TYPE) :: META_ARGS(4) = (/ & - arg_type(gh_field, gh_real, gh_read, any_w2), & + arg_type(gh_field, gh_real, gh_inc, any_w2), & arg_type(gh_field, gh_real, gh_read, any_w2), & @@ -11,15 +11,15 @@ arg_type(gh_field, gh_real, gh_read, any_discontinuous_space_1)/) @@ -30,18 +30,7 @@ &undf_md, map_md) integer(kind=i_def), parameter :: nfaces = 4 integer(kind=i_def), intent(in) :: nlayers -@@ -39,9 +39,7 @@ - real(kind=r_def) :: direction - real(kind=r_def), dimension(nfaces) :: v_dot_n - -- v_dot_n(:) = 1.0_r_def -- v_dot_n(1) = -1.00000000000000 -- v_dot_n(nfaces) = -1.00000000000000 -+ v_dot_n = (/ -1.0_r_def, 1.0_r_def, 1.0_r_def, -1.0_r_def /) - do df = nfaces, 1, -1 - do k = nlayers - 1, 0, -1 - direction = ls_wind(k + map_w2(df)) * v_dot_n(df) -@@ -52,6 +50,6 @@ +@@ -53,6 +53,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch b/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch index 7cd2087cd..5f4d873e9 100644 --- a/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_w3v_advective_update_kernel_mod.patch @@ -32,23 +32,8 @@ &undf_w3, map_w3, ndf_md, undf_md, map_md, ndf_w2, undf_w2, map_w2) integer(kind=i_def), intent(in) :: nlayers integer(kind=i_def), intent(in) :: cell -@@ -51,7 +51,6 @@ - real(kind=r_def) :: t_u - real(kind=r_def) :: t_d - -- w = 0.0_r_def - if (ndf_w2 == 2) then - df = 1 - offset = 0 -@@ -73,12 +72,11 @@ - end if - dtdz = -t_d + t_u - ik = cell * nlayers + k - nlayers + 1 -- w = w + dtdz * advective_increment(map_w3(1) + k) * m3_inv(ik,1,1) -+ w = dtdz * advective_increment(map_w3(1) + k) * m3_inv(ik,1,1) - wind(k + map_w2(df)) = wind(k + map_w2(df)) + 0.5 * w - wind(k + map_w2(df) + 1) = wind(k + map_w2(df) + 1) + 0.5 * w -- w = 0.0 +@@ -79,6 +79,6 @@ + w = 0.0 enddo - end subroutine adj_w3v_advective_update_code diff --git a/science/adjoint/rose-meta/lfric-adjoint/versions.py b/science/adjoint/rose-meta/lfric-adjoint/versions.py index 2d3f6a52e..8418438c1 100644 --- a/science/adjoint/rose-meta/lfric-adjoint/versions.py +++ b/science/adjoint/rose-meta/lfric-adjoint/versions.py @@ -126,123 +126,3 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) - - return config, self.reports diff --git a/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 b/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 deleted file mode 100644 index 148ce790f..000000000 --- a/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 +++ /dev/null @@ -1,141 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be brief. -!----------------------------------------------------------------------------- -!> @brief (Adjoint of) given TL state(igh_u) compute TLM boundary layer increment u_bl_inc -module atl_bdy_lyr_alg_mod - - use constants_mod, only: r_def - use field_collection_mod, only: field_collection_type - use integer_field_mod, only: integer_field_type - use driver_modeldb_mod, only: modeldb_type - use sci_geometric_constants_mod, only: get_height_fe, & - get_face_selector_ew, & - get_face_selector_ns - use sci_fem_constants_mod, only: get_rmultiplicity_fe - use field_mod, only: field_type - use linear_physics_config_mod, only: log_layer, & - Blevs_m, & - e_folding_levs_m, & - u_land_m, & - u_sea_m, & - z_land_m, & - z_sea_m, & - L_0_m - use derived_config_mod, only: bundle_size - use field_indices_mod, only: igh_d - use timing_mod, only: start_timing, stop_timing, tik, LPROF - use mesh_mod, only: mesh_type - use fs_continuity_mod, only: W2, W3, Wtheta - use tl_compute_qe_kernel_mod, only: tl_compute_qe_kernel_type - use tl_compute_aubu_kernel_mod, only: tl_compute_aubu_kernel_type - use atl_bl_inc_kernel_mod, only: atl_bl_inc_kernel_type - - implicit none - - private - public :: atl_bdy_lyr_alg - -contains - -!> @brief (Adjoint of) given TL state(igh_u) compute TLM boundary layer increment u_bl_inc -!> @details The stages are: -!> 1. Call tl_compute_qe_kernel_type: from LS, compute coefficients Q, E -!> 2. Call tl_compute_aubu_kernel_type: from Q,E, compute coefficients Auv, Buv_inv -!> 3. Call atl_bl_inc_kernel_type: (adjoint of) from state(igh_u) use coefficients Auv, Buv_inv to compute u_bl_inc -!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, -!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf -!> The original code is at https://wwwspice/~frva/VAR/view/var-2022.12.2/doc/PF_bdy_lyr.html -!> @param[in,out] modeldb Structure containing the model state -!> @param[in,out] u_bl_inc TLM boundary layer increment -!> @param[in,out] u The current TL model prognostic u field, state(igh_u) -!> @param[in] ls_state Lin state for Prognostic model state -!> @param[in] dt The TL model timestep length -subroutine atl_bdy_lyr_alg(modeldb, u_bl_inc, u, ls_state, dt) - - implicit none - - type(modeldb_type), target, intent(inout) :: modeldb - type(field_type), intent(inout) :: u_bl_inc - type(field_type), intent(inout) :: u - type(field_type), target, intent(in) :: ls_state(bundle_size) - real(kind=r_def), intent(in) :: dt - - type(mesh_type), pointer :: mesh - type(field_type), pointer :: height_w2 - type(field_type), pointer :: height_w3 - type(field_type), pointer :: height_wth - type(field_type), pointer :: w2_rmultiplicity - type(integer_field_type), pointer :: face_selector_ew - type(integer_field_type), pointer :: face_selector_ns - - type(field_collection_type), pointer :: ls_fields - type(field_type), pointer :: ls_land_fraction - - ! Coefficients computed from linearisation state - type(field_type) :: Q - type(field_type) :: E - type(field_type) :: auv - type(field_type) :: buv_inv - - integer(kind=tik) :: id - - if (LPROF) call start_timing(id, 'atl_bdy_lyr_alg') - - ls_fields => modeldb%fields%get_field_collection('ls_fields') - call ls_fields%get_field('ls_land_fraction', ls_land_fraction) - - mesh => u%get_mesh() - height_w2 => get_height_fe(W2, mesh%get_id()) - height_w3 => get_height_fe(W3, mesh%get_id()) - height_wth => get_height_fe(Wtheta, mesh%get_id()) - - w2_rmultiplicity => get_rmultiplicity_fe(W2, mesh%get_id()) - - face_selector_ew => get_face_selector_ew(mesh%get_id()) - face_selector_ns => get_face_selector_ns(mesh%get_id()) - - call ls_state(igh_d)%copy_field_properties(Q) - call ls_state(igh_d)%copy_field_properties(E) - - call u%copy_field_properties(auv) - call u%copy_field_properties(buv_inv) - - call invoke(tl_compute_qe_kernel_type(Q, & - E, & - ls_state(igh_d), & - height_w3, & - height_wth, & - ls_land_fraction, & - log_layer, & - Blevs_m, & - e_folding_levs_m, & - u_land_m, & - u_sea_m, & - z_land_m, & - z_sea_m, & - L_0_m)) - - call invoke(tl_compute_aubu_kernel_type(auv, & - buv_inv, & - Q, & - E, & - height_w2, & - w2_rmultiplicity, & - dt, & - Blevs_m)) - - call invoke(atl_bl_inc_kernel_type(u_bl_inc, & - u, & - auv, & - buv_inv, & - face_selector_ew, & - face_selector_ns, & - Blevs_m)) - - if (LPROF) call stop_timing(id, 'atl_bdy_lyr_alg') - -end subroutine atl_bdy_lyr_alg - -end module atl_bdy_lyr_alg_mod diff --git a/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 b/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 deleted file mode 100644 index 5f93c8940..000000000 --- a/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 +++ /dev/null @@ -1,148 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be brief. -!----------------------------------------------------------------------------- -!> @brief Wrapper for adjoint physics code -module atl_physics_alg_mod - - use constants_mod, only: r_def - use driver_modeldb_mod, only: modeldb_type - use field_mod, only: field_type - use derived_config_mod, only: bundle_size - use field_indices_mod, only: igh_u - use timing_mod, only: start_timing, stop_timing, tik, LPROF - use mesh_mod, only: mesh_type - use fs_continuity_mod, only: W2 - use sci_geometric_constants_mod, only: get_da_at_w2 - use sci_fem_constants_mod, only: get_mass_matrix_fe - use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type - use adj_matrix_vector_kernel_mod, only: adj_matrix_vector_kernel_type - use atl_bdy_lyr_alg_mod, only: atl_bdy_lyr_alg - use sci_mass_matrix_solver_alg_mod, only: mass_matrix_solver_alg - use sci_field_bundle_builtins_mod, only: clone_bundle, copy_bundle, set_bundle_scalar - use operator_mod, only: operator_type - - implicit none - - private - public :: atl_physics_alg - -contains - -!> @brief Wrapper for adjoint physics code, currently just atl_bdy_lyr_alg -!> @param[in,out] modeldb Structure containing the model state -!> @param[in,out] u The TL model u field to be incremented -!> @param[in,out] state_star TL model prognostic fields for physics calculations -!> @param[in,out] rhs_phys Residuals -!> @param[in] state The current TL model prognostic fields -!> @param[in] rhs_n Residuals -!> @param[in] rhs_np1 Residuals -!> @param[in] rhs_adv Advective terms -!> @param[in] ls_state Lin state for Prognostic model state -!> @param[in] mesh The current mesh -!> @param[in] dt The TL model timestep length -subroutine atl_physics_alg(modeldb, & - u, & - state_star, & - rhs_phys, & - rhs_np1, & - rhs_n, & - state, & - rhs_adv, & - ls_state, & - mesh, & - dt) - - implicit none - - type(modeldb_type), target, intent(inout) :: modeldb - type(field_type), intent(inout) :: u - type(field_type), intent(inout) :: state_star(bundle_size) - type(field_type), intent(inout) :: rhs_phys(bundle_size) - type(field_type), intent(in) :: state(bundle_size) - type(field_type), intent(in) :: rhs_n(bundle_size) - type(field_type), intent(in) :: rhs_np1(bundle_size) - type(field_type), intent(in) :: rhs_adv(bundle_size) - type(field_type), intent(in) :: ls_state(bundle_size) - type(mesh_type), pointer, intent(in) :: mesh - real(kind=r_def), intent(in) :: dt - - type(field_type) :: u_bl_inc - type(field_type) :: u_bl_inc_flux - type(field_type) :: du - type(field_type) :: u_star - type(field_type) :: u_star_physical - type(field_type) :: rhsu_np1 - - type(operator_type), pointer :: mm_vel - type(field_type), pointer :: dA - - integer(kind=tik) :: id - - if (LPROF) call start_timing(id, 'atl_physics_alg') - - mm_vel => get_mass_matrix_fe(W2, mesh%get_id()) - - call u%copy_field_properties( u_bl_inc ) - call u%copy_field_properties( u_bl_inc_flux ) - call u%copy_field_properties( du ) - call u%copy_field_properties( u_star ) - call u%copy_field_properties( u_star_physical ) - call rhs_adv(igh_u)%copy_field_properties( rhsu_np1 ) - - call du%initialise( rhs_adv(igh_u)%get_function_space() ) - call rhsu_np1%initialise( rhs_adv(igh_u)%get_function_space() ) - - call clone_bundle( state, state_star, bundle_size ) - call copy_bundle( state, state_star, bundle_size ) ! Only state_star(igh_u) is used - call set_bundle_scalar( 0.0_r_def, state_star, bundle_size ) - - dA => get_da_at_w2(mesh%get_id()) - - call invoke( setval_c( u_bl_inc_flux, 0.0_r_def ), & - setval_c( u_bl_inc, 0.0_r_def ), & - setval_c( u_star, 0.0_r_def ), & - setval_c( u_star_physical, 0.0_r_def ), & - setval_c( du, 0.0_r_def ), & - setval_c( rhsu_np1, 0.0_r_def ) ) - - call invoke( enforce_bc_kernel_type( rhs_phys(igh_u) ), & - adj_matrix_vector_kernel_type( rhs_phys(igh_u), u_bl_inc_flux, mm_vel ) ) - - call set_bundle_scalar( 0.0_r_def, rhs_phys, bundle_size ) - - ! Adj of u_bl_inc_flux = u_bl_inc * dA - call invoke( inc_x_times_y( u_bl_inc_flux, dA ), & - inc_x_plus_y( u_bl_inc, u_bl_inc_flux ) ) - - call atl_bdy_lyr_alg( modeldb, u_bl_inc, state_star(igh_u), & - ls_state, dt ) - - ! Adj of state_star(igh_u) <- u_star_physical - call invoke( inc_x_plus_y( u_star_physical, state_star(igh_u) ), & - setval_c( state_star(igh_u), 0.0_r_def ) ) - - ! Adj of u_star_physical = u_star / dA - call invoke( inc_x_divideby_y( u_star_physical, dA ), & - inc_x_plus_y( u_star, u_star_physical ) ) - - ! Adj of u_star = du + state(igh_u) - call invoke( inc_X_plus_Y( du, u_star ), & - inc_X_plus_Y( state(igh_u), u_star ) ) - - ! Adj of call mass_matrix_solver_alg(du, rhsu_np1) - call mass_matrix_solver_alg( rhsu_np1, du ) - - ! Adj of inc_X_plus_Y(rhsu_np1, rhs_adv(igh_u)) - call invoke( inc_X_plus_Y( rhs_adv(igh_u), rhsu_np1 ) ) - - ! Adj of rhsu_np1 <- -rhs_np1(igh_u) + rhs_n(igh_u) - call invoke( inc_X_plus_bY( rhs_np1(igh_u), -1.0_r_def, rhsu_np1 ), & - inc_X_plus_Y( rhs_n(igh_u), rhsu_np1 ) ) - - if (LPROF) call stop_timing(id, 'atl_physics_alg') - -end subroutine atl_physics_alg - -end module atl_physics_alg_mod diff --git a/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 b/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 index 81a16804c..db401b908 100644 --- a/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 @@ -47,7 +47,9 @@ module adj_lookup_table_mod procedure, public :: get_nsets_max procedure, public :: get_nindices procedure, public :: get_ndata + procedure, public :: adj_lookup_table_assign procedure, public :: finalise => adj_lookup_table_finaliser + generic, public :: assignment(=) => adj_lookup_table_assign end type adj_lookup_table_type contains @@ -231,6 +233,26 @@ module adj_lookup_table_mod end function get_ndata + !============================================================================= + !> @brief Assignment operator. + !> @details Implemented to avoid pointer aliasing preventing compiler optimisations. + subroutine adj_lookup_table_assign(dest, source) + + implicit none + + class(adj_lookup_table_type), intent(in) :: source + class(adj_lookup_table_type), intent(out) :: dest + + call source%lookup_field%copy_field_properties(dest%lookup_field) + call source%set_count_field%copy_field_properties(dest%set_count_field) + call invoke( int_setval_X(dest%lookup_field, source%lookup_field), & + int_setval_X(dest%set_count_field, source%set_count_field) ) + dest%nsets_max = source%nsets_max + dest%nindices = source%nindices + dest%ndata = source%ndata + + end subroutine adj_lookup_table_assign + !============================================================================= !> @brief Destructor. !> @param [in,out] self Lookup table diff --git a/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 b/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 index e0aa2d9fa..dc52a9740 100644 --- a/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 @@ -34,7 +34,9 @@ module adj_solver_lookup_cache_mod procedure, public :: initialise => adj_solver_lookup_cache_init procedure, public :: get_lookup_apply_hho + procedure, public :: adj_solver_lookup_cache_assign procedure, public :: finalise => adj_solver_lookup_cache_final + generic, public :: assignment(=) => adj_solver_lookup_cache_assign end type adj_solver_lookup_cache_type @@ -64,7 +66,7 @@ module adj_solver_lookup_cache_mod ! Arguments class(adj_solver_lookup_cache_type), intent(inout) :: self - type(mesh_type), pointer, intent(in) :: mesh + type(mesh_type), pointer, intent(in) :: mesh ! Internal variables type(function_space_type), pointer :: vector_space_w3_ptr @@ -85,19 +87,18 @@ module adj_solver_lookup_cache_mod else self%multigrid_levels=1 end if - ! Extra level needed for coarse operator - allocate(self%lookup_apply_hho(self%multigrid_levels + 1)) + allocate(self%lookup_apply_hho(self%multigrid_levels)) if (l_multigrid) then call multigrid_function_space_chain%set_current(vector_space_w3_ptr%get_id()) end if - do level = 1, self%multigrid_levels + 1 + do level = 1, self%multigrid_levels call vector_x%initialise(vector_space_w3_ptr) call invoke(setval_c(vector_x, 0.0_r_solver)) call create_lookup_apply_helmholtz_op(self%lookup_apply_hho(level), & vector_x) - if((l_multigrid) .and. (level < self%multigrid_levels)) then + if(l_multigrid) then vector_space_w3_ptr => multigrid_function_space_chain%get_next() end if end do @@ -121,22 +122,41 @@ module adj_solver_lookup_cache_mod ! Arguments class(adj_solver_lookup_cache_type), target, intent(in) :: self - integer(kind=i_def), intent(in) :: level + integer(kind=i_def), intent(in) :: level ! Returns - type(adj_lookup_table_type), pointer :: lookup_ptr + type(adj_lookup_table_type), pointer :: lookup_ptr if (.not. self%is_initialised) call log_event("Cannot get lookup: cache is not initialised", LOG_LEVEL_ERROR) - if ((level < 1) .and. (level > self%multigrid_levels + 1)) then - write(log_scratch_space,*) "get_lookup_apply_hho: Requested level must be between 1 and ", & - self%multigrid_levels + 1, "but level = ", level - call log_event(log_scratch_space, LOG_LEVEL_ERROR) - end if nullify(lookup_ptr) lookup_ptr => self%lookup_apply_hho(level) end function get_lookup_apply_hho + !============================================================================= + !> @brief Assignment operator. + !> @details Implemented to avoid pointer aliasing preventing compiler optimisations. + subroutine adj_solver_lookup_cache_assign(dest, source) + + implicit none + + class(adj_solver_lookup_cache_type), intent(in) :: source + class(adj_solver_lookup_cache_type), intent(out) :: dest + + ! Internal variables + integer(kind=i_def) :: level + + if (.not. source%is_initialised) call log_event("Source cache in copy assignment is not initialised", LOG_LEVEL_ERROR) + + dest%multigrid_levels = source%multigrid_levels + allocate(dest%lookup_apply_hho(dest%multigrid_levels)) + do level = 1_i_def, source%multigrid_levels + dest%lookup_apply_hho(level) = source%lookup_apply_hho(level) + end do + dest%is_initialised = .true._l_def + + end subroutine adj_solver_lookup_cache_assign + !============================================================================= !> @brief Destructor. !> @param [in,out] self Lookup table cache @@ -151,7 +171,7 @@ module adj_solver_lookup_cache_mod integer(kind=i_def) :: level if (self%is_initialised) then - do level = 1, self%multigrid_levels + 1 + do level = 1, self%multigrid_levels call self%lookup_apply_hho(level)%finalise() end do if (allocated(self%lookup_apply_hho)) deallocate(self%lookup_apply_hho) diff --git a/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 b/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 index 292671ca9..4b5687b78 100644 --- a/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 @@ -9,8 +9,7 @@ module adj_trans_lookup_cache_mod use adj_lookup_table_mod, only: adj_lookup_table_type use constants_mod, only: i_def, l_def - use fs_continuity_mod, only: W3, Wtheta, & - W2, W2H + use fs_continuity_mod, only: W3, Wtheta use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_ERROR @@ -34,15 +33,11 @@ module adj_trans_lookup_cache_mod type(adj_lookup_table_type) :: lookup_poly_adv_upd !> Lookup table for adj_w3h_advective_update_kernel. - !> First index is on W2, second on W2H. - type(adj_lookup_table_type), allocatable, dimension(:) :: lookup_w3h_adv_upd + type(adj_lookup_table_type) :: lookup_w3h_adv_upd !> Number of function spaces for lookup_poly2d. integer(kind=i_def) :: n_fs_poly2d - !> Number of function spaces for lookup_w3h_adv_upd. - integer(kind=i_def) :: n_fs_w3h_adv_upd - !> Flag to state whether or not cache is initialised logical(kind=l_def) :: is_initialised = .false._l_def @@ -72,6 +67,7 @@ module adj_trans_lookup_cache_mod use constants_mod, only: r_tran use finite_element_config_mod, only: element_order_h, & element_order_v + use fs_continuity_mod, only: W2, W2H use function_space_mod, only: function_space_type use function_space_collection_mod, only: function_space_collection use mesh_mod, only: mesh_type @@ -229,42 +225,32 @@ module adj_trans_lookup_cache_mod ! ========================================================================= ! Creating lookup_w3h_adv_upd ! ========================================================================= - self%n_fs_w3h_adv_upd = 2_i_def - allocate(self%lookup_w3h_adv_upd(self%n_fs_w3h_adv_upd)) m3_inv => get_inverse_mass_matrix_fe(W3, mesh_id) ndata = 6_i_def - do fspace_iterator = 1_i_def, self%n_fs_w3h_adv_upd - if (fspace_iterator == 1_i_def) then - fspace_enum = W2 - else - fspace_enum = W2H - end if + vector_space_w3_md_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. & + ) + vector_space_w3_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3 & + ) + vector_space_w2_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W2 & + ) - vector_space_w3_md_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. & - ) - vector_space_w3_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3 & - ) - vector_space_fs_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, fspace_enum & - ) + call advective%initialise(vector_space=vector_space_w3_ptr, name='advective') + call tracer%initialise(vector_space=vector_space_w3_md_ptr, name='tracer') + call wind%initialise(vector_space=vector_space_w2_ptr, name='wind') - call advective%initialise(vector_space=vector_space_w3_ptr, name='advective') - call tracer%initialise(vector_space=vector_space_w3_md_ptr, name='tracer') - call wind%initialise(vector_space=vector_space_fs_ptr, name='wind') - - call invoke(setval_c(advective, 0.0_r_tran), & - setval_c(tracer, 0.0_r_tran), & - setval_c(wind, 0.0_r_tran)) - call create_lookup_w3h_adv_upd(self%lookup_w3h_adv_upd(fspace_iterator), & - advective, & - tracer, & - wind, & - m3_inv, & - stencil_extent) - end do + call invoke(setval_c(advective, 0.0_r_tran), & + setval_c(tracer, 0.0_r_tran), & + setval_c(wind, 0.0_r_tran)) + call create_lookup_w3h_adv_upd(self%lookup_w3h_adv_upd, & + advective, & + tracer, & + wind, & + m3_inv, & + stencil_extent) self%is_initialised = .true._l_def @@ -352,35 +338,20 @@ module adj_trans_lookup_cache_mod !============================================================================= !> @brief Return a pointer to the w3h_adv_upd lookup table. !> @param [in] self Lookup table cache - !> @param [in] fspace_enum Function space enumerator !> @return lookup_ptr The lookup table - function get_lookup_w3h_adv_upd(self, fspace_enum) result(lookup_ptr) + function get_lookup_w3h_adv_upd(self) result(lookup_ptr) implicit none ! Arguments class(adj_trans_lookup_cache_type), target, intent(in) :: self - integer(kind=i_def), intent(in) :: fspace_enum - - ! Internal variables - integer(kind=i_def) :: fspace_index ! Returns type(adj_lookup_table_type), pointer :: lookup_ptr if (.not. self%is_initialised) call log_event("Cannot get lookup: cache is not initialised", LOG_LEVEL_ERROR) nullify(lookup_ptr) - fspace_index = 0_i_def - select case(fspace_enum) - case (W2) - fspace_index = 1_i_def - case (W2H) - fspace_index = 2_i_def - case default - write(log_scratch_space, *) "Invalid functionspace chosen for get_lookup_w3h_adv_upd, must be W2 or W2H" - call log_event(log_scratch_space, LOG_LEVEL_ERROR) - end select - lookup_ptr => self%lookup_w3h_adv_upd(fspace_index) + lookup_ptr => self%lookup_w3h_adv_upd end function get_lookup_w3h_adv_upd @@ -403,11 +374,8 @@ module adj_trans_lookup_cache_mod call self%lookup_poly2d(fspace_index)%finalise() end do call self%lookup_poly_adv_upd%finalise() - do fspace_index = 1_i_def, self%n_fs_w3h_adv_upd - call self%lookup_w3h_adv_upd(fspace_index)%finalise() - end do + call self%lookup_w3h_adv_upd%finalise() if (allocated(self%lookup_poly2d)) deallocate(self%lookup_poly2d) - if (allocated(self%lookup_w3h_adv_upd)) deallocate(self%lookup_w3h_adv_upd) end if end subroutine adj_trans_lookup_cache_final diff --git a/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 b/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 index 6fae39423..77d04efbf 100644 --- a/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 +++ b/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 @@ -19,7 +19,7 @@ module adj_pressure_operator_alg_mod use base_mesh_config_mod, only: topology, topology_non_periodic use invoke_adj_a_h_o_lookup_kernel_mod, only: invoke_adj_a_h_o_lookup_kernel - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use adj_lookup_table_generators_alg_mod, only: create_lookup_apply_helmholtz_op use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type @@ -35,8 +35,7 @@ module adj_pressure_operator_alg_mod type, public, extends(abstract_hierarchical_linear_operator_type) :: adj_pressure_operator_type private - integer(kind=i_def) :: level - type(adj_solver_lookup_cache_type), pointer :: adj_lookup_table_cache_ptr + integer(kind=i_def) :: level contains procedure, public :: apply => apply_adj_pressure_operator procedure, private :: apply_adj_pressure_operator @@ -54,21 +53,18 @@ module adj_pressure_operator_alg_mod contains !> @brief Construct new instance of type. - !> @param[in] level The mesh level the space is on - !> @param[in] adj_lookup_table_cache The lookup table cache - function adj_pressure_operator_constructor(level, adj_lookup_table_cache) result(self) + !> @param[in] level The mesh level the space is on + function adj_pressure_operator_constructor(level) result(self) implicit none - integer(kind=i_def), intent(in) :: level - type(adj_solver_lookup_cache_type), target, intent(in) :: adj_lookup_table_cache - type(adj_pressure_operator_type) :: self + integer(kind=i_def), intent(in) :: level + type(adj_pressure_operator_type) :: self call log_event( 'Constructing adjoint pressure_operator...', LOG_LEVEL_DEBUG ) ! Temporaries required in operator application self%level = level - self%adj_lookup_table_cache_ptr => adj_lookup_table_cache call log_event( 'done', LOG_LEVEL_DEBUG ) @@ -86,7 +82,6 @@ contains ! Deep copy of the contents of the adj_pressure_operator_type dest%level = source%level - dest%adj_lookup_table_cache_ptr => source%adj_lookup_table_cache_ptr end subroutine adj_pressure_operator_assign @@ -110,10 +105,10 @@ contains logical(kind=l_def) :: lam_mesh ! Lookup table - type(adj_lookup_table_type), pointer :: lookup - type(integer_field_type), pointer :: lookup_field - type(integer_field_type), pointer :: set_counts_field - integer(kind=i_def) :: nindices + type(adj_lookup_table_type) :: lookup + type(integer_field_type), pointer :: lookup_field + type(integer_field_type), pointer :: set_counts_field + integer(kind=i_def) :: nindices integer(tik) :: id @@ -145,7 +140,8 @@ contains setval_c( y_vec, 0.0_r_solver ) ) ! Run adj_apply_helmholtz_operator kernel. - lookup => self%adj_lookup_table_cache_ptr%get_lookup_apply_hho(self%level) + ! Generate adjoint lookup table for stencil operation. Dry run of the TL code, horizontal only. + call create_lookup_apply_helmholtz_op( lookup, x_vec ) lookup_field => lookup%get_lookup_field() set_counts_field => lookup%get_set_count_field() nindices = lookup%get_nindices() @@ -186,7 +182,7 @@ contains class(abstract_hierarchical_linear_operator_type), allocatable, intent(inout) :: coarse_operator allocate( coarse_operator, & - source = adj_pressure_operator_type(self%level + 1, self%adj_lookup_table_cache_ptr) ) + source = adj_pressure_operator_type(self%level + 1) ) end subroutine coarsen_adj_pressure_operator diff --git a/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 b/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 index 3a1f0ee48..93c56ed77 100644 --- a/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 +++ b/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 @@ -25,7 +25,6 @@ module adj_semi_implicit_solver_alg_mod use adj_pressure_precon_alg_mod, only: adj_pressure_preconditioner_type use multigrid_preconditioner_alg_mod, only: multigrid_preconditioner_type use pressure_operator_alg_mod, only: pressure_operator_type - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use adj_pressure_operator_alg_mod, only: adj_pressure_operator_type use sci_null_preconditioner_alg_mod, only: null_preconditioner_type use sci_preconditioner_mod, only: abstract_preconditioner_type @@ -90,11 +89,9 @@ contains !> @details Called by init method of this module, but also by !! adjt_mixed_schur_preconditioner_alg_mod and adjt_mixed_solver_alg_mod !> @param[in] state Prognostic state for the adjoint pressure preconditioner - !> @param[in] adj_lookup_table_cache The lookup table cache !> @param[out] adj_pressure_operator_out Output adjoint (Helmholtz) pressure operator !> @param[out] adj_pressure_preconditioner_out Output adjoint (Helmholtz) pressure preconditioner - subroutine create_adj_pressure_preconditioner( state, adj_lookup_table_cache, & - adj_pressure_operator_out, adj_pressure_preconditioner_out ) + subroutine create_adj_pressure_preconditioner( state, adj_pressure_operator_out, adj_pressure_preconditioner_out ) use helmholtz_solver_config_mod, only: helmholtz_preconditioner => preconditioner, & preconditioner_none, & @@ -105,7 +102,6 @@ contains ! Prognostic fields type(field_type), dimension(bundle_size), intent(in) :: state - type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Output adjoint operator and preconditioner for (Helmholtz) pressure problem type(adj_pressure_operator_type), intent(out) :: adj_pressure_operator_out @@ -114,11 +110,7 @@ contains ! Vertical pressure preconditioner type(adj_pressure_preconditioner_type) :: adj_helmholtz_preconditioner - integer(kind=i_def) :: level - - level = 1_i_def - - adj_pressure_operator_out = adj_pressure_operator_type(level, adj_lookup_table_cache) + adj_pressure_operator_out = adj_pressure_operator_type(level=1_i_def) call log_event( "adj_semi_implicit_solver_type%create_adj_pressure_preconditioner: starting", LOG_LEVEL_INFO ) @@ -264,19 +256,16 @@ contains !> @brief Initialisation procedure for the adjoint semi-implicit solver !> @param[in] state Prognostic state for the solver - subroutine initialise( self, state, adj_lookup_table_cache ) + subroutine initialise( self, state ) implicit none ! Arguments - class(adj_semi_implicit_solver_type), intent(inout) :: self - type(field_type), dimension(bundle_size), intent(in) :: state - type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache - - call create_adj_pressure_preconditioner( state, & - adj_lookup_table_cache, & - self%adj_pressure_operator, & - self%adj_pressure_preconditioner ) + class(adj_semi_implicit_solver_type), intent(inout) :: self + type(field_type), dimension(bundle_size), intent(in) :: state + + self%adj_pressure_operator = adj_pressure_operator_type(level=1_i_def) + call create_adj_pressure_preconditioner( state, self%adj_pressure_operator, self%adj_pressure_preconditioner ) call create_adj_pressure_solver( self%adj_pressure_operator, self%adj_pressure_preconditioner, self%adj_pressure_solver ) call create_adj_mixed_preconditioner( state, self%adj_pressure_solver, self%adj_mixed_preconditioner ) call create_adj_mixed_solver( self%adj_mixed_preconditioner, self%adj_mixed_operator, self%adj_mixed_solver ) diff --git a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 index 679e30c38..66f9894d6 100644 --- a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 +++ b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 @@ -24,7 +24,6 @@ module atl_si_timestep_alg_mod l_stabilise_bl, & n_bl_levels_to_stabilise, & max_bl_stabilisation - use linear_physics_config_mod, only: l_boundary_layer use derived_config_mod, only: bundle_size use boundaries_config_mod, only: limited_area use sci_fem_constants_mod, only: get_mass_matrix_fe, get_qr_fe @@ -45,8 +44,6 @@ module atl_si_timestep_alg_mod use rhs_alg_mod, only: rhs_alg use atl_rhs_alg_mod, only: atl_rhs_alg use gungho_transport_control_alg_mod, only: gungho_transport_control_alg - use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_transport_control_alg_mod, only: atl_transport_control_alg use si_operators_alg_mod, only: compute_si_operators use semi_implicit_solver_alg_mod, only: semi_implicit_solver_alg_step @@ -54,7 +51,6 @@ module atl_si_timestep_alg_mod use derive_exner_from_eos_alg_mod, only: derive_exner_from_eos use atl_derive_exner_from_eos_alg_mod, only: atl_derive_exner_from_eos use update_prognostic_scalars_alg_mod, only: update_prognostic_scalars_alg - use atl_physics_alg_mod, only: atl_physics_alg use mr_indices_mod, only: nummr use moist_dyn_mod, only: num_moist_factors, gas_law use field_indices_mod, only: igh_u, igh_t, igh_d, igh_p @@ -79,7 +75,6 @@ module atl_si_timestep_alg_mod type(field_type), allocatable :: state2(:) type(field_type), allocatable :: state_copy(:) type(field_type), allocatable :: state_n(:) - type(field_type), allocatable :: state_star(:) type(field_type), allocatable :: state_after_slow(:) type(field_type), allocatable :: advected_state(:) type(field_type), allocatable :: mr_n(:) @@ -91,7 +86,6 @@ module atl_si_timestep_alg_mod type(field_type), allocatable :: state_test(:) type(field_type), allocatable :: rhs_np1_test(:) type(field_type), allocatable :: rhs_np1_in(:) - type(field_type), allocatable :: rhs_phys(:) ! Linearisation state type(field_type), allocatable :: ls_state(:) @@ -119,10 +113,6 @@ module atl_si_timestep_alg_mod ! Moisture flag logical(l_def) :: use_moisture - ! Adjoint lookup tables - type(adj_solver_lookup_cache_type) :: adj_solver_lookup_cache - type(adj_trans_lookup_cache_type) :: adj_trans_lookup_cache - contains procedure, public :: initialise @@ -183,7 +173,6 @@ contains allocate(self%state_copy(bundle_size)) allocate(self%state_n(bundle_size)) allocate(self%state_after_slow(bundle_size)) - allocate(self%state_star(bundle_size)) allocate(self%advected_state(bundle_size)) allocate(self%rhs_n(bundle_size)) allocate(self%rhs_np1(bundle_size)) @@ -194,7 +183,6 @@ contains allocate(self%state_test(bundle_size)) allocate(self%rhs_np1_test(bundle_size)) allocate(self%rhs_np1_in(bundle_size)) - allocate(self%rhs_phys(bundle_size)) allocate(self%ls_state(bundle_size)) allocate(self%ls_state_n(bundle_size)) @@ -237,7 +225,6 @@ contains call clone_bundle( self%state, self%state_test, bundle_size ) call clone_bundle( self%state, self%rhs_np1_test, bundle_size ) call clone_bundle( self%state, self%rhs_np1_in, bundle_size ) - call clone_bundle( self%state, self%rhs_phys, bundle_size ) call clone_bundle( self%state, self%ls_state, bundle_size ) call clone_bundle( self%state, self%ls_state_n, bundle_size ) @@ -283,10 +270,7 @@ contains call set_bundle_scalar( 0.0_r_def, self%ls_mr_after_slow, nummr ) end if - call self%adj_solver_lookup_cache%initialise(u%get_mesh()) - call self%adj_trans_lookup_cache%initialise(u%get_mesh()) - - call self%adj_semi_implicit_solver%initialise(self%state, self%adj_solver_lookup_cache) + call self%adj_semi_implicit_solver%initialise(self%state) call log_event( "atl_si_timestep_type%init: initialised timestepping algorithm", LOG_LEVEL_INFO ) @@ -571,7 +555,6 @@ contains call set_bundle_scalar( 0.0_r_def, self%state_initial, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%rhs_n, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%rhs_np1, bundle_size ) - call set_bundle_scalar( 0.0_r_def, self%rhs_phys, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%mr_after_slow, nummr ) call set_bundle_scalar( 0.0_r_def, self%mr_n, nummr ) @@ -661,73 +644,32 @@ contains setval_c( self%rhs_np1(igh_t), 0.0_r_def ) ) end if - if (l_boundary_layer) call add_bundle(self%rhs_phys,self%rhs_np1,self%rhs_phys, bundle_size) call add_bundle( self%rhs_adv, self%rhs_np1, self%rhs_adv, bundle_size ) call add_bundle( self%rhs_n, self%rhs_np1, self%rhs_n, bundle_size ) call bundle_ax( -1.0_r_def, self%rhs_np1, self%rhs_np1, bundle_size ) - if (inner > 1) then - - if (use_wavedynamics) then - - call set_bundle_scalar( 0.0_r_def, self%state1, bundle_size ) - call set_bundle_scalar( 0.0_r_def, self%state2, bundle_size ) + call set_bundle_scalar( 0.0_r_def,self%state1,bundle_size ) + call set_bundle_scalar( 0.0_r_def,self%state2,bundle_size ) - call atl_rhs_alg( self%rhs_np1, & - -varalpha*cast_dt, & - self%state1, & - self%state2, & - moist_dyn, & - self%ls_state_itns(:,ls_outer,ls_inner), & - self%ls_moist_dyn_itns(:,ls_outer,ls_inner), & - .true., & - dlayer_on, & - modeldb%clock ) + call atl_rhs_alg( self%rhs_np1, & + -varalpha*cast_dt, & + self%state1, & + self%state2, & + moist_dyn, & + self%ls_state_itns(:,ls_outer,ls_inner), & + self%ls_moist_dyn_itns(:,ls_outer,ls_inner), & + .true., & + dlayer_on, & + modeldb%clock ) - call add_bundle( self%state, self%state2, self%state, bundle_size ) - call add_bundle( self%state, self%state1, self%state, bundle_size ) - - end if - - end if + call add_bundle( self%state,self%state2 ,self%state, bundle_size ) + call add_bundle( self%state,self%state1 ,self%state, bundle_size ) end do inner_dynamics_loop !------------------------------------------------------------------------- ! End of inner (nonlinear, Coriolis) loop !------------------------------------------------------------------------- - if (l_boundary_layer) then - ! Linear boundary layer scheme is currently the only linear physics scheme - call atl_physics_alg( modeldb, & - u, & - self%state_star, & - self%rhs_phys, & - self%rhs_np1, & - self%rhs_n, & - self%state, & - self%rhs_adv, & - self%ls_state_itns(:,ls_outer,1), & - mesh, & - cast_dt ) - end if ! l_boundary_layer - - call set_bundle_scalar( 0.0_r_def, self%state1, bundle_size ) - call set_bundle_scalar( 0.0_r_def, self%state2, bundle_size ) - - call atl_rhs_alg( self%rhs_np1, & - -varalpha*cast_dt, & - self%state1, & - self%state2, & - moist_dyn, & - self%ls_state_itns(:,ls_outer,1), & - self%ls_moist_dyn_itns(:,ls_outer,1), & - .true., & - dlayer_on, & - modeldb%clock ) - - call add_bundle( self%state, self%state2, self%state, bundle_size ) - call add_bundle( self%state, self%state1, self%state, bundle_size ) - call invoke( setval_c( self%theta_fv_inc, 0.0_r_def ), & adj_dg_inc_matrix_vector_kernel_type( self%rhs_adv(igh_t), & self%theta_fv_inc, mm_wt ), & @@ -744,8 +686,7 @@ contains self%ls_state_n(igh_u), & self%ls_mr_after_slow, & modeldb%clock, & - outer, & - self%adj_trans_lookup_cache ) ! advected_state finished with + outer ) ! advected_state finished with end do outer_dynamics_loop !--------------------------------------------------------------------------- @@ -818,7 +759,6 @@ contains if (allocated(self%state_n)) deallocate(self%state_n) if (allocated(self%state_initial)) deallocate(self%state_initial) if (allocated(self%state_after_slow)) deallocate(self%state_after_slow) - if (allocated(self%state_star)) deallocate(self%state_star) if (allocated(self%advected_state)) deallocate(self%advected_state) if (allocated(self%rhs_n)) deallocate(self%rhs_n) if (allocated(self%rhs_np1)) deallocate(self%rhs_np1) @@ -829,7 +769,6 @@ contains if (allocated(self%state_test)) deallocate(self%state_test) if (allocated(self%rhs_np1_test)) deallocate(self%rhs_np1_test) if (allocated(self%rhs_np1_in)) deallocate(self%rhs_np1_in) - if (allocated(self%rhs_phys)) deallocate(self%rhs_phys) if (allocated(self%ls_state)) deallocate(self%ls_state) if (allocated(self%ls_state_itns)) deallocate(self%ls_state_itns) @@ -846,9 +785,6 @@ contains if (allocated(self%ls_mr_itns)) deallocate(self%ls_mr_itns) if (allocated(self%ls_moist_dyn_itns)) deallocate(self%ls_moist_dyn_itns) - call self%adj_solver_lookup_cache%finalise() - call self%adj_trans_lookup_cache%finalise() - return end subroutine finalise diff --git a/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 b/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 index c12a86c82..59d196f93 100644 --- a/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/common/adj_end_transport_step_alg_mod.x90 @@ -98,14 +98,6 @@ contains hori_flux => transport_counter%get_flux(2) call sum_vert_flux%initialise(w2v_fs) - if (.not. hori_flux%is_initialised() ) then - call hori_flux%initialise(w2h_fs) - call invoke( setval_c( hori_flux, 0.0_r_tran ) ) - end if - if (.not. old_flux%is_initialised() ) then - call old_flux%initialise(w2v_fs) - call invoke( setval_c( old_flux, 0.0_r_tran ) ) - end if call invoke( setval_c( sum_vert_flux, 0.0_r_tran ), & adj_combine_w2_field_kernel_type( sum_flux, hori_flux, & sum_vert_flux, & @@ -113,7 +105,6 @@ contains face_selector_ns ), & inc_X_plus_Y( old_flux, sum_vert_flux ), & inc_X_plus_Y( flux_last_step, sum_vert_flux ), & - setval_c( sum_flux, 0.0_r_tran ), & setval_c( sum_vert_flux, 0.0_r_tran ) ) ! General case for any splitting diff --git a/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 b/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 index a742942de..f5c0dcb86 100644 --- a/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 +++ b/science/adjoint/source/algorithm/transport/common/adj_flux_precomputations_mod.x90 @@ -141,7 +141,7 @@ module adj_flux_precomputations_mod class(flux_precomputations_type), intent(inout) :: flux_pc integer(kind=i_def), intent(in) :: step - type(r_tran_field_type), intent(inout) :: ref_flux + type(r_tran_field_type), intent(in) :: ref_flux ! Local variables integer(kind=i_def) :: splitting diff --git a/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 b/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 index 7f135041b..38ceb3f2c 100644 --- a/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/common/atl_end_transport_step_alg_mod.x90 @@ -36,6 +36,7 @@ module atl_end_transport_step_alg_mod use transport_metadata_mod, only: transport_metadata_type use adj_flux_precomputations_mod, only: adj_initialise_step + implicit none private @@ -220,18 +221,14 @@ contains if (.not. final_split_step) then flux_ptr => transport_counter%get_flux( step ) - call invoke( inc_X_plus_Y( flux, flux_ptr ) ) + call invoke( inc_X_plus_Y( flux, flux_ptr ), & + setval_c( flux_ptr, 0.0_r_tran ) ) end if ! Combine fluxes from each part of the calculation call invoke( inc_X_plus_Y( flux_pert_wind, flux ), & inc_X_plus_Y( flux_ls_wind, flux ) ) - if (.not. final_split_step) then - flux_ptr => transport_counter%get_flux( step ) - call invoke( setval_c( flux_ptr, 0.0_r_tran ) ) - end if - end subroutine atl_end_conservative_step_alg end module atl_end_transport_step_alg_mod diff --git a/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 index 464147193..1f13aa011 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 @@ -15,7 +15,6 @@ module atl_moist_mr_transport_alg_mod use timing_mod, only: start_timing, stop_timing, & tik, LPROF use tl_transport_controller_mod, only: tl_transport_controller_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: equation_form_advective, & equation_form_conservative use atl_transport_field_mod, only: atl_transport_field @@ -31,30 +30,29 @@ contains !============================================================================= !> @brief Central routine for adjoint transport of moisture fields. - !> @param[in,out] mr_out ACTIVE Perturbation to moisture mixing ratios - !> @param[in,out] mr_in ACTIVE Input perturbation state for moisture - !> @param[in] ls_mr_in PASSIVE Lin. state for moisture mixing ratios - !> @param[in] nummr_to_transport Number of moisture species to transport - !> @param[in,out] tl_transport_controller Object controlling transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting these fields - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in,out] mr_out ACTIVE Perturbation to moisture mixing ratios + !> @param[in,out] mr_in ACTIVE Input perturbation state for moisture + !> @param[in] ls_mr_in PASSIVE Lin. state for moisture mixing ratios + !> @param[in] nummr_to_transport Number of moisture species to transport + !> @param[in,out] tl_transport_controller + !! Object controlling transport + !> @param[in,out] transport_metadata + !! Contains the configuration options for + !! transporting these fields subroutine atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, & nummr_to_transport, & tl_transport_controller, & - transport_metadata, & - adj_lookup_table_cache ) + transport_metadata ) implicit none ! Arguments type(field_type), intent(inout) :: mr_out(nummr) type(field_type), intent(inout) :: mr_in(nummr) - type(field_type), intent(in) :: ls_mr_in(nummr) - integer(kind=i_def), intent(in) :: nummr_to_transport + type(field_type), intent(in) :: ls_mr_in(nummr) + integer(kind=i_def), intent(in) :: nummr_to_transport type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: imr @@ -82,8 +80,7 @@ contains ! Simply transport all the mixing ratio fields as they are in Wtheta do imr = nummr_to_transport, 1, -1 call atl_transport_field( mr_out(imr), mr_in(imr), ls_mr_in(imr), & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + tl_transport_controller, transport_metadata ) end do ! ------------------------------------------------------------------------ ! diff --git a/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 deleted file mode 100644 index 1019d840a..000000000 --- a/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 +++ /dev/null @@ -1,338 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Adjoint of the tangent linear version of split_transport - -module atl_split_transport_mod - - use constants_mod, only: i_def, r_tran - use r_tran_field_mod, only: r_tran_field_type - use log_mod, only: log_event, LOG_LEVEL_ERROR - use split_transport_utils_mod, only: get_splitting_direction, & - get_splitting_fraction, & - get_num_split_steps - use split_transport_mod, only: split_transport_field - - ! Transport control infrastructure - use transport_controller_mod, only: transport_controller_type - use tl_transport_controller_mod, only: tl_transport_controller_type - use transport_counter_mod, only: transport_counter_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type - use transport_enumerated_types_mod, only: direction_h, & - direction_v, & - split_method_null, & - split_method_mol, & - split_method_ffsl, & - split_method_sl, & - equation_form_conservative, & - equation_form_advective, & - equation_form_consistent - use transport_metadata_mod, only: transport_metadata_type - - ! Algorithms - use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg, & - end_of_consistent_step_alg, & - end_of_advective_step_alg - use linear_config_mod, only: transport_efficiency - - implicit none - - private - - public :: atl_split_transport_control - public :: atl_split_transport_field - -contains - - !============================================================================= - !> @brief Controls vertical/horizontal split transport. - !> @details Manages the vertical/horizontal splitting of the split transport - !! scheme by choosing the splitting type and calling the individual - !! vertical and horizontal split components. - !> @param[in,out] field_np1 ACTIVE Field to return at end - !> @param[in,out] field_n ACTIVE Field at the start - !> @param[in] ls_field_n PASSIVE LS Field at the start - !> @param[in,out] tl_transport_controller Encapsulating object containing the - !! transport counter and precomputations - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_split_transport_control(field_np1, field_n, ls_field_n, & - tl_transport_controller, adj_lookup_table_cache) - - implicit none - - ! Arguments - type(r_tran_field_type), intent(inout) :: field_np1 - type(r_tran_field_type), target, intent(inout) :: field_n - type(r_tran_field_type), target, intent(in) :: ls_field_n - type(tl_transport_controller_type), intent(inout) :: tl_transport_controller - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache - - ! Internal variables - integer(kind=i_def) :: num_split_steps - integer(kind=i_def) :: split_step_count - type(r_tran_field_type), allocatable :: ls_field_np1(:) - type(r_tran_field_type), target :: field_tmp - type(r_tran_field_type), pointer :: field_ptr - type(transport_counter_type), pointer :: transport_counter - type(transport_counter_type), pointer :: ls_transport_counter - type(transport_metadata_type), pointer :: transport_metadata - type(transport_controller_type), pointer :: pert_transport_controller - type(transport_controller_type), pointer :: ls_transport_controller - real(kind=r_tran) :: dt_substep - integer(kind=i_def) :: num_substeps - - ! ------------------------------------------------------------------------ ! - ! NONLINEAR (LS) - ! ------------------------------------------------------------------------ ! - - ls_transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() - transport_metadata => ls_transport_controller%get_transport_metadata() - ls_transport_counter => ls_transport_controller%get_transport_counter() - - ! Initialise fields - num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) - allocate(ls_field_np1(num_split_steps + 1)) - do split_step_count = 1, num_split_steps + 1 - call field_n%copy_field_properties(ls_field_np1(split_step_count)) - end do - - if ( .not. transport_efficiency ) then - - ! When we have multiple split steps, we need an intermediate field for the - ! field at the start of each substep - ! field_ptr points to the field at the start of each split step - call invoke( setval_X(ls_field_np1(1), ls_field_n) ) - - if (num_split_steps > 1) then - call field_n%copy_field_properties(field_tmp) - call invoke( setval_X(field_tmp, ls_field_n) ) - field_ptr => field_tmp - else - field_ptr => ls_field_n - end if - - do split_step_count = 1, num_split_steps - call split_transport_field( ls_field_np1(split_step_count+1), & - field_ptr, & - ls_transport_controller & - ) - - if (split_step_count < num_split_steps) then - call invoke( setval_X(field_tmp, ls_field_np1(split_step_count+1) ) ) - - ! Increment split step counter - call ls_transport_counter%inc_split_step_counter() - end if - end do - else - do split_step_count = 1, num_split_steps + 1 - call invoke( setval_X(ls_field_np1(split_step_count), ls_field_n) ) - end do - end if - - ! ------------------------------------------------------------------------ ! - ! LINEAR - ! ------------------------------------------------------------------------ ! - pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_metadata => pert_transport_controller%get_transport_metadata() - transport_counter => pert_transport_controller%get_transport_counter() - - dt_substep = transport_counter%get_dt_substep() - num_substeps = transport_counter%get_num_substeps() - call transport_counter%adj_initialise(transport_metadata, dt_substep, num_substeps ) - call ls_transport_counter%adj_initialise(transport_metadata, dt_substep, num_substeps ) - - ! Initialise fields - num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) - - call field_n%copy_field_properties(field_tmp) - - ! Set fields to zero - call invoke( setval_C(field_tmp, 0.0_r_def ) ) - - ! Loop backwards - do split_step_count = num_split_steps, 1, -1 - - if (split_step_count < num_split_steps) then - - ! Increment split step counter - call transport_counter%dec_split_step_counter() - call ls_transport_counter%dec_split_step_counter() - - call invoke( inc_X_plus_Y(field_np1, field_tmp ), & - setval_C(field_tmp, 0.0_r_def ) ) - - end if - - call atl_split_transport_field( & - field_np1, field_tmp, ls_field_np1(split_step_count), & - tl_transport_controller, adj_lookup_table_cache & - ) - call invoke( setval_C(field_np1, 0.0_r_def ) ) - - end do - if (num_split_steps <= 1) then - call invoke( setval_C(field_np1, 0.0_r_def ) ) - end if - call invoke( inc_X_plus_Y(field_n, field_tmp) ) - - deallocate( ls_field_np1 ) - - end subroutine atl_split_transport_control - - !============================================================================= - !> @brief Does either vertical or horizontal transport of a field. - !> @details Performs a vertical or horizontal transport step, solving the - !! transport equation for a (multidata) field. - !> @param[in,out] field_np1 ACTIVE Field to return at end - !> @param[in,out] field_n ACTIVE Field at the start - !> @param[in] ls_field_n PASSIVE Field at the start - !> @param[in,out] tl_transport_controller Encapsulating object containing the - !! transport counter and precomputations - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_split_transport_field(field_np1, field_n, ls_field_n, & - tl_transport_controller, adj_lookup_table_cache) - - use atl_mol_conservative_alg_mod, only: atl_mol_conservative_alg - use atl_mol_advective_alg_mod, only: atl_mol_advective_alg - - implicit none - - ! Arguments - type(r_tran_field_type), intent(inout) :: field_np1 - type(r_tran_field_type), intent(inout) :: field_n - type(r_tran_field_type), intent(in) :: ls_field_n - type(tl_transport_controller_type), intent(inout) :: tl_transport_controller - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache - - ! Internal variables - integer(kind=i_def) :: method, direction - type(transport_counter_type), pointer :: transport_counter - type(transport_metadata_type), pointer :: transport_metadata - type(transport_controller_type), pointer :: pert_transport_controller - - pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_counter => pert_transport_controller%get_transport_counter() - transport_metadata => pert_transport_controller%get_transport_metadata() - - ! -------------------------------------------------------------------------! - ! Set up method based on direction - ! -------------------------------------------------------------------------! - direction = get_splitting_direction( & - transport_metadata%get_splitting(), & - transport_counter%get_split_step_of_substep_counter() & - ) - - select case ( direction ) - case ( direction_h ) - method = transport_metadata%get_horizontal_method() - case ( direction_v ) - method = transport_metadata%get_vertical_method() - case default - call log_event('Split transport direction not recognised', LOG_LEVEL_ERROR) - end select - - ! -------------------------------------------------------------------------! - ! Choose method, and then choose equation - ! -------------------------------------------------------------------------! - select case ( method ) - - ! -------------------------------------------------------------------------! - ! Null step - ! -------------------------------------------------------------------------! - case ( split_method_null ) - call log_event( & - 'ADJ: Split method null not coded', & - LOG_LEVEL_ERROR & - ) - - ! -------------------------------------------------------------------------! - ! Method of Lines step - ! -------------------------------------------------------------------------! - case ( split_method_mol ) - ! Choose form of transport equation - select case ( transport_metadata%get_equation_form() ) - case ( equation_form_conservative ) - call atl_mol_conservative_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & - ) - case ( equation_form_advective ) - call atl_mol_advective_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & - ) - case ( equation_form_consistent ) - call log_event( & - 'ADJ: MoL Consistent not coded yet', & - LOG_LEVEL_ERROR & - ) - case default - call log_event( & - 'Trying to solve unrecognised form of transport equation', & - LOG_LEVEL_ERROR & - ) - - end select - - ! -------------------------------------------------------------------------! - ! Flux-Form Semi-Lagrangian step - ! -------------------------------------------------------------------------! - case ( split_method_ffsl ) - ! All equation forms have the same control method - call log_event( & - 'ADJ: FFSL not coded yet', & - LOG_LEVEL_ERROR & - ) - ! -------------------------------------------------------------------------! - ! Semi-Lagrangian step - ! -------------------------------------------------------------------------! - case ( split_method_sl ) - ! Choose direction - select case ( direction ) - - case ( direction_h ) - ! Horizontal SL only for advective form - if ( transport_metadata%get_equation_form() /= equation_form_advective ) then - call log_event( & - 'Horizontal semi-Lagrangian is only for advective form', & - LOG_LEVEL_ERROR & - ) - end if - call log_event( & - 'ADJ: Horizontal SL not coded yet', & - LOG_LEVEL_ERROR & - ) - - case ( direction_v ) - ! Choose form of transport equation for vertical - select case ( transport_metadata%get_equation_form() ) - - case ( equation_form_conservative ) - call log_event( & - 'TL: Vertical SL conservative not coded yet', & - LOG_LEVEL_ERROR & - ) - case ( equation_form_advective ) - call log_event( & - 'ADJ: Vertical SL advective not coded yet', & - LOG_LEVEL_ERROR & - ) - case default - call log_event( & - 'Trying to solve unrecognised form of transport equation', & - LOG_LEVEL_ERROR & - ) - end select - end select - - case default - call log_event( & - 'Trying to transport with unrecognised scheme', & - LOG_LEVEL_ERROR & - ) - end select - - end subroutine atl_split_transport_field - -end module atl_split_transport_mod diff --git a/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 index 510a17d82..d4e2c7337 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 @@ -16,7 +16,6 @@ module atl_theta_transport_alg_mod theta_variable_dry, & adjust_theta use tl_transport_controller_mod, only: tl_transport_controller_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: equation_form_advective, & equation_form_consistent use transport_metadata_mod, only: transport_metadata_type @@ -31,22 +30,21 @@ contains !============================================================================= !> @brief Adjoint routine for transporting potential temperature field. - !> @param[in,out] theta_out Perturbation: Dry potential temperature - !! after transport - !> @param[in,out] theta_inc Perturbation: Dry potential temperature - !! increment - !> @param[in,out] theta_in Perturbation: Dry potential temperature - !! before transport - !> @param[in] ls_theta_in Linear state: Dry potential temperature - !! before transport - !> @param[in,out] tl_transport_controller Controls transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting the potential temperature - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_theta_transport_alg( theta_out, theta_inc, & - theta_in, ls_theta_in, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + !> @param[in,out] theta_out Perturbation: Dry potential temperature + !! after transport + !> @param[in,out] theta_inc Perturbation: Dry potential temperature + !! increment + !> @param[in,out] theta_in Perturbation: Dry potential temperature + !! before transport + !> @param[in] ls_theta_in Linear state: Dry potential temperature + !! before transport + !> @param[in,out] tl_transport_controller + !! Controls transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting the potential temperature + subroutine atl_theta_transport_alg( theta_out, theta_inc, & + theta_in, ls_theta_in, & + tl_transport_controller, transport_metadata ) implicit none @@ -54,10 +52,9 @@ contains type(field_type), target, intent(inout) :: theta_out type(field_type), intent(inout) :: theta_inc type(field_type), target, intent(inout) :: theta_in - type(field_type), target, intent(in) :: ls_theta_in + type(field_type), target, intent(in) :: ls_theta_in type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables real(kind=r_def) :: one @@ -127,8 +124,7 @@ contains ! Consistent: Transformation to densities and evaluation of fluxes is in ! lowest level algorithms, so just call transport_field call atl_transport_field( theta_out_ptr, theta_in_ptr, ls_theta_in_ptr, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + tl_transport_controller, transport_metadata ) ! ------------------------------------------------------------------------ ! ! Default form of transport equation diff --git a/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 index 73689427d..2ed3d82dc 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 @@ -19,7 +19,6 @@ module atl_transport_control_alg_mod use model_clock_mod, only: model_clock_type use transport_config_mod, only: cheap_update use tl_transport_controller_mod, only: tl_transport_controller_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_controller_mod, only: transport_controller_type use flux_precomputations_alg_mod, only: flux_precomputations_type use wind_precomputations_alg_mod, only: wind_precomputations_type @@ -42,26 +41,25 @@ contains !============================================================================= !> @brief Adjoint of advection of prognostic variables for the tangent linear model. - !> @param[in,out] advection_inc ACTIVE Advection increment of the dynamics - !! prognostics [u, rho, theta, exner] - !> @param[in,out] advected_fields ACTIVE Fields to advect: [u, rho, theta, exner] - !> @param[in,out] wind_np1 ACTIVE End of timestep wind field - !> @param[in,out] wind_n ACTIVE Start of timestep wind field - !> @param[in,out] mr_out ACTIVE Moisture fields after transport - !> @param[in,out] mr_in ACTIVE Moisture fields before transport - !> @param[in] ls_advected_fields PASSIVE Fields to advect: [u, rho, theta, exner] - !> @param[in] ls_wind_np1 PASSIVE End of timestep wind field - !> @param[in] ls_wind_n PASSIVE Start of timestep wind field - !> @param[in] ls_mr_in PASSIVE Moisture fields before transport - !> @param[in] model_clock Time within the model - !> @param[in] outer Outer (advection) iteration number - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in,out] advection_inc ACTIVE Advection increment of the dynamics + !! prognostics [u, rho, theta, exner] + !> @param[in,out] advected_fields ACTIVE Fields to advect: [u, rho, theta, exner] + !> @param[in,out] wind_np1 ACTIVE End of timestep wind field + !> @param[in,out] wind_n ACTIVE Start of timestep wind field + !> @param[in,out] mr_out ACTIVE Moisture fields after transport + !> @param[in,out] mr_in ACTIVE Moisture fields before transport + !> @param[in] ls_advected_fields PASSIVE Fields to advect: [u, rho, theta, exner] + !> @param[in] ls_wind_np1 PASSIVE End of timestep wind field + !> @param[in] ls_wind_n PASSIVE Start of timestep wind field + !> @param[in] ls_mr_in PASSIVE Moisture fields before transport + !> @param[in] model_clock Time within the model + !> @param[in] outer Outer (advection) iteration number !> subroutine atl_transport_control_alg(advection_inc, advected_fields, & wind_np1, wind_n, mr_out, mr_in, & ls_advected_fields, & ls_wind_np1, ls_wind_n, ls_mr_in, & - model_clock, outer, adj_lookup_table_cache ) + model_clock, outer ) use derived_config_mod, only: bundle_size use sci_field_bundle_builtins_mod, only: clone_bundle, set_bundle_scalar @@ -82,19 +80,18 @@ contains implicit none ! Arguments - type(field_type), intent(inout) :: advection_inc(bundle_size) - type(field_type), intent(inout) :: advected_fields(bundle_size) - type(field_type), intent(inout) :: wind_np1 - type(field_type), intent(inout) :: wind_n - type(field_type), intent(in) :: ls_wind_np1 - type(field_type), intent(in) :: ls_wind_n - type(field_type), intent(inout) :: mr_out(nummr) - type(field_type), intent(inout) :: mr_in(nummr) - type(field_type), intent(in) :: ls_advected_fields(bundle_size) - type(field_type), intent(in) :: ls_mr_in(nummr) - class(model_clock_type), intent(in) :: model_clock - integer(kind=i_def), intent(in) :: outer - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(field_type), intent(inout) :: advection_inc(bundle_size) + type(field_type), intent(inout) :: advected_fields(bundle_size) + type(field_type), intent(inout) :: wind_np1 + type(field_type), intent(inout) :: wind_n + type(field_type), intent(in) :: ls_wind_np1 + type(field_type), intent(in) :: ls_wind_n + type(field_type), intent(inout) :: mr_out(nummr) + type(field_type), intent(inout) :: mr_in(nummr) + type(field_type), intent(in) :: ls_advected_fields(bundle_size) + type(field_type), intent(in) :: ls_mr_in(nummr) + class(model_clock_type), intent(in) :: model_clock + integer(kind=i_def), intent(in) :: outer ! Internal variables type(field_type) :: fields_np1(bundle_size) @@ -173,7 +170,7 @@ contains call atl_theta_transport_alg( & fields_np1(igh_t), advection_inc(igh_t), advected_fields(igh_t), & ls_advected_fields(igh_t), tl_transport_controller, & - transport_metadata, adj_lookup_table_cache & + transport_metadata & ) ! ------------------------------------------------------------------------- ! @@ -194,8 +191,7 @@ contains call atl_moist_mr_transport_alg( & mr_out, mr_in, ls_mr_in, nummr_to_transport, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache & + tl_transport_controller, transport_metadata & ) end if @@ -219,7 +215,7 @@ contains call atl_wind_transport_alg( & advection_inc(igh_u), advected_fields(igh_u), & ls_advected_fields(igh_u), tl_transport_controller, & - transport_metadata, adj_lookup_table_cache & + transport_metadata & ) ! We don't change advection_inc(igh_u) as tl_wind_transport_alg ! already returns weak increment @@ -244,7 +240,7 @@ contains call atl_transport_field( & fields_np1(igh_d), advected_fields(igh_d), & ls_advected_fields(igh_d), tl_transport_controller, & - transport_metadata, adj_lookup_table_cache & + transport_metadata & ) ! The precomputation initialisation routines are initially called on diff --git a/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 b/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 index a755b961c..a00c2ee0b 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 +++ b/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 @@ -18,10 +18,8 @@ module atl_transport_field_mod direction_3d, & equation_form_conservative, & equation_form_advective - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_mol_conservative_alg_mod, only: atl_mol_conservative_alg use atl_mol_advective_alg_mod, only: atl_mol_advective_alg - use atl_split_transport_mod, only: atl_split_transport_control use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -36,16 +34,15 @@ module atl_transport_field_mod !============================================================================= !> @brief Adjoint of central routine for transporting fields in tangent-linear field. - !> @param[in,out] field_np1 ACTIVE Field to return at end of transport step - !> @param[in,out] field_n ACTIVE Field at the start of the transport step - !> @param[in] ls_field_n PASSIVE Linear field at the start of step - !> @param[in,out] tl_transport_controller Object controlling transport by perturbed wind - !> @param[in] transport_metadata Contains the configuration options for - !! transporting these fields - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_transport_field(field_np1, field_n, ls_field_n, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache) + !> @param[in,out] field_np1 ACTIVE Field to return at end of transport step + !> @param[in,out] field_n ACTIVE Field at the start of the transport step + !> @param[in] ls_field_n PASSIVE Linear field at the start of step + !> @param[in,out] tl_transport_controller + !! Object controlling transport by perturbed wind + !> @param[in] transport_metadata Contains the configuration options for + !! transporting these fields + subroutine atl_transport_field(field_np1, field_n, ls_field_n, & + tl_transport_controller, transport_metadata) implicit none @@ -55,7 +52,6 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & type(field_type), intent(in) :: ls_field_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(transport_counter_type), pointer :: transport_counter @@ -90,13 +86,13 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & ! Choose form of transport equation select case ( transport_metadata%get_equation_form() ) case ( equation_form_conservative ) - call atl_mol_conservative_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & + call atl_mol_conservative_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller & ) case ( equation_form_advective ) - call atl_mol_advective_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & + call atl_mol_advective_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller & ) case default @@ -116,8 +112,8 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & ! Some split horizontal/vertical transport scheme ! -------------------------------------------------------------------------! case ( scheme_split ) - call atl_split_transport_control(field_np1, field_n, ls_field_n, & - tl_transport_controller, adj_lookup_table_cache) + call log_event('Split transport not implemented for tangent-linear app', & + LOG_LEVEL_ERROR) case default call log_event('Trying to transport with unrecognised scheme', & diff --git a/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 index 6f151b626..5eb9f58c6 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 @@ -33,7 +33,6 @@ module atl_wind_transport_alg_mod use transport_enumerated_types_mod, only: equation_form_advective use transport_config_mod, only: broken_w2_projection use tl_transport_controller_mod, only: tl_transport_controller_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_transport_field_mod, only: atl_transport_field use transport_metadata_mod, only: transport_metadata_type use sci_field_minmax_alg_mod, only: log_field_minmax @@ -48,19 +47,18 @@ contains !============================================================================= !> @brief Central routine for adjoint transport of the wind field. - !> @param[in,out] rhs_u ACTIVE Right-hand-side for weak wind transport - !! equation. In other words, the advective - !! increment to the wind multiplied by the - !! W2 mass matrix. - !> @param[in,out] wind_n ACTIVE Wind field at start of transport step - !> @param[in] ls_wind_n PASSIVE Wind field at start of transport step - !> @param[in,out] tl_transport_controller Object controlling transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting these fields - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + !> @param[in,out] rhs_u ACTIVE Right-hand-side for weak wind transport + !! equation. In other words, the advective + !! increment to the wind multiplied by the + !! W2 mass matrix. + !> @param[in,out] wind_n ACTIVE Wind field at start of transport step + !> @param[in] ls_wind_n PASSIVE Wind field at start of transport step + !> @param[in,out] tl_transport_controller + !! Object controlling transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting these fields + subroutine atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & + tl_transport_controller, transport_metadata ) use sci_dg_convert_hdiv_field_kernel_mod, only: dg_convert_hdiv_field_kernel_type use invoke_adj_cvt_hdiv_field_kernel_mod, only: invoke_adj_convert_hdiv_field_kernel @@ -74,10 +72,9 @@ contains ! Arguments type(field_type), intent(inout) :: rhs_u type(field_type), intent(inout) :: wind_n - type(field_type), intent(in) :: ls_wind_n + type(field_type), intent(in) :: ls_wind_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: dir @@ -200,9 +197,8 @@ contains ! Transport wind components in W3 ! -------------------------------------------------------------------- ! do dir = 3, 1, -1 - call atl_transport_field( u_w3_np1(dir), u_w3_n(dir), ls_u_w3_n(dir), & - tl_transport_controller, transport_metadata, & - adj_lookup_table_cache ) + call atl_transport_field( u_w3_np1(dir), u_w3_n(dir), ls_u_w3_n(dir), & + tl_transport_controller, transport_metadata ) end do ! Perturbation part diff --git a/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 index f81998a06..b0bac45cf 100644 --- a/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 @@ -7,12 +7,14 @@ !> @brief Adjoint reconstruction of a W3 field at W2 points for use in the transport scheme. module adj_reconstruct_w3_field_alg_mod + use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: r_tran, i_def, l_def use r_tran_field_mod, only: r_tran_field_type use invoke_adj_poly1d_recon_lookup_mod, only: invoke_adj_poly1d_recon_lookup use invoke_adj_poly2d_recon_lookup_mod, only: invoke_adj_poly2d_recon_lookup - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type + use adj_lookup_table_generators_alg_mod, only: create_lookup_poly1d, & + create_lookup_poly2d use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type use function_space_mod, only: function_space_type @@ -38,25 +40,23 @@ contains !============================================================================= !> @brief Adjoint of reconstruction of a W3 field in the horizontal component of W2 - !> @param[in,out] field_new The resulting horizontal W2 field - !> @param[in,out] field_old The input W3 field - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in,out] field_new The resulting horizontal W2 field + !> @param[in,out] field_old The input W3 field + !> @param[in] transport_metadata Contains transport configuration options subroutine adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata, adj_lookup_table_cache ) + transport_metadata ) implicit none - type(r_tran_field_type), intent(inout) :: field_new - type(r_tran_field_type), intent(inout) :: field_old - type(transport_metadata_type), intent(in) :: transport_metadata - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(r_tran_field_type), intent(inout) :: field_new + type(r_tran_field_type), intent(inout) :: field_old + type(transport_metadata_type), intent(in) :: transport_metadata - type(mesh_type), pointer :: mesh - integer(kind=i_def) :: mesh_id - integer(kind=i_def) :: stencil_extent - integer(kind=i_def) :: stencil_size - type(r_tran_field_type), pointer :: flux_coeffs + type(mesh_type), pointer :: mesh + integer(kind=i_def) :: mesh_id + integer(kind=i_def) :: stencil_extent + integer(kind=i_def) :: stencil_size + type(r_tran_field_type), pointer :: flux_coeffs type(r_tran_field_type), target :: remap_field, field_old_big_halo type(r_tran_field_type), pointer :: field_ptr @@ -64,14 +64,14 @@ contains logical(kind=l_def) :: monotone integer(kind=i_def) :: remap_depth - type(adj_lookup_table_type), pointer :: lookup_poly - type(integer_field_type), pointer :: lookup_poly_field - type(integer_field_type), pointer :: num_sets_poly_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type) :: lookup_poly + type(integer_field_type), pointer :: lookup_poly_field + type(integer_field_type), pointer :: num_sets_poly_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices nullify(mesh, flux_coeffs, field_ptr, & - lookup_poly, lookup_poly_field, num_sets_poly_field) + lookup_poly_field, num_sets_poly_field) mesh => field_new%get_mesh() mesh_id = mesh%get_id() @@ -90,7 +90,7 @@ contains ! Copy field to a large halo version call field_old_big_halo%initialise( field_old%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth = get_required_stencil_depth() ) call invoke( setval_c( field_old_big_halo, 0.0_r_tran ) ) monotone = (transport_metadata%get_horizontal_monotone() == monotone_koren) @@ -112,7 +112,10 @@ contains else if ( oned_reconstruction ) then ! Use 1d flux reconstruction - lookup_poly => adj_lookup_table_cache%get_lookup_poly1d() + ! Create lookup table for stencil application. Essentially a dry run + ! of the TL kernel. + call create_lookup_poly1d( lookup_poly, field_new, field_ptr, & + flux_coeffs, stencil_extent, fv_horizontal_order ) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() @@ -126,7 +129,10 @@ contains else ! Use 2d flux reconstruction stencil_extent = fv_horizontal_order / 2_i_def - lookup_poly => adj_lookup_table_cache%get_lookup_poly2d(field_new%which_function_space()) + ! Create lookup table for stencil application. Essentially a dry run + ! of the TL kernel. + call create_lookup_poly2d( lookup_poly, field_new, field_old_big_halo, flux_coeffs, & + stencil_size, stencil_extent ) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() diff --git a/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 index 58617ce09..83fa0a54f 100644 --- a/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 @@ -7,6 +7,7 @@ module adj_wt_advective_update_alg_mod + use check_configuration_mod, only : get_required_stencil_depth use constants_mod, only : r_tran, i_def, l_def use r_tran_field_mod, only : r_tran_field_type use finite_element_config_mod, only : element_order_h, & @@ -17,7 +18,9 @@ module adj_wt_advective_update_alg_mod use mesh_mod, only : mesh_type use invoke_adj_poly1d_recon_lookup_mod, only : invoke_adj_poly1d_recon_lookup - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type + use adj_lookup_table_generators_alg_mod, only : create_lookup_poly1d, & + create_lookup_poly2d, & + create_lookup_poly_adv_upd use adj_lookup_table_mod, only : adj_lookup_table_type use integer_field_mod, only : integer_field_type @@ -46,23 +49,20 @@ contains !============================================================================= !> @brief Compute the adjoint of horizontal advective update of a Wtheta field. - !> @param[in,out] u_grad_f Horizontal part of u.grad(f) - !> @param[in] ls_wind Linearisation state wind field - !> @param[in] wind_dir Wind field used to determine direction in kernel - !> @param[in,out] field Wtheta field to advect - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine adj_hori_wt_update_alg( u_grad_f, ls_wind, wind_dir, field, & - transport_metadata, adj_lookup_table_cache ) + !> @param[in,out] u_grad_f Horizontal part of u.grad(f) + !> @param[in] ls_wind Linearisation state wind field + !> @param[in] wind_dir Wind field used to determine direction in kernel + !> @param[in,out] field Wtheta field to advect + !> @param[in] transport_metadata Contains transport configuration options + subroutine adj_hori_wt_update_alg( u_grad_f, ls_wind, wind_dir, field, transport_metadata ) implicit none - type(r_tran_field_type), intent(inout) :: u_grad_f - type(r_tran_field_type), intent(in) :: ls_wind - type(r_tran_field_type), intent(in) :: wind_dir - type(r_tran_field_type), intent(inout) :: field - type(transport_metadata_type), intent(in) :: transport_metadata - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(r_tran_field_type), intent(inout) :: u_grad_f + type(r_tran_field_type), intent(in) :: ls_wind + type(r_tran_field_type), intent(in) :: wind_dir + type(r_tran_field_type), intent(inout) :: field + type(transport_metadata_type), intent(in) :: transport_metadata type(r_tran_field_type) :: h_reconstruction type(r_tran_field_type), pointer :: adv_coeffs @@ -80,16 +80,15 @@ contains logical(kind=l_def) :: monotone integer(kind=i_def) :: remap_depth - type(adj_lookup_table_type), pointer :: lookup_poly - type(adj_lookup_table_type), pointer :: lookup_poly_adv - type(integer_field_type), pointer :: lookup_poly_field - type(integer_field_type), pointer :: num_sets_poly_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type) :: lookup_poly + type(adj_lookup_table_type) :: lookup_poly_adv + type(integer_field_type), pointer :: lookup_poly_field + type(integer_field_type), pointer :: num_sets_poly_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices - nullify(lookup_poly, lookup_poly_adv, & - lookup_poly_field, num_sets_poly_field, & - mesh, field_ptr, multidata_fs, adv_coeffs) + nullify(lookup_poly_field, num_sets_poly_field, mesh, & + field_ptr, multidata_fs, adv_coeffs) mesh => ls_wind%get_mesh() mesh_id = mesh%get_id() @@ -105,7 +104,7 @@ contains ! Copy field to a large halo version call field_big_halo%initialise( field%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth = get_required_stencil_depth() ) ! Compute reconstruction on a Wtheta multidata field ! each Wt point contains 4 values assigned to each edge, @@ -134,7 +133,8 @@ contains stencil_extent = 1_i_def ! Invoke lookup table kernel for adj_poly_adv_update. - lookup_poly_adv => adj_lookup_table_cache%get_lookup_poly_adv_upd() + call create_lookup_poly_adv_upd( lookup_poly_adv, u_grad_f, h_reconstruction, & + ls_wind, stencil_extent ) lookup_poly_field => lookup_poly_adv%get_lookup_field() num_sets_poly_field => lookup_poly_adv%get_set_count_field() nindices = lookup_poly_adv%get_nindices() @@ -151,7 +151,10 @@ contains else if ( oned_reconstruction ) then ! Use 1d reconstruction - lookup_poly => adj_lookup_table_cache%get_lookup_poly1d() + ! create lookup table for stencil application. essentially a dry run + ! of the tl kernel. + call create_lookup_poly1d( lookup_poly, h_reconstruction, field_ptr, & + adv_coeffs, stencil_extent, fv_horizontal_order ) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() @@ -162,7 +165,10 @@ contains stencil_extent) else ! Use 2d reconstruction - lookup_poly => adj_lookup_table_cache%get_lookup_poly2d(h_reconstruction%which_function_space()) + ! Create lookup table for stencil application. Essentially a dry run + ! of the TL kernel. + call create_lookup_poly2d( lookup_poly, h_reconstruction, field_big_halo, & + adv_coeffs, stencil_size, stencil_extent ) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() diff --git a/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 index dcf90b453..942e1d603 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 @@ -26,7 +26,7 @@ module atl_advective_and_flux_alg_mod use vertical_mass_flux_kernel_mod, only: vertical_mass_flux_kernel_type use atl_w3h_advective_update_kernel_mod, only: atl_w3h_advective_update_kernel_type use invoke_adj_w3h_adv_upd_lookup_mod, only: invoke_adj_w3h_adv_upd_lookup_kernel_type - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type + use adj_lookup_table_generators_alg_mod, only: create_lookup_w3h_adv_upd use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type use atl_w3v_advective_update_kernel_mod, only: atl_w3v_advective_update_kernel_type @@ -53,42 +53,39 @@ contains !============================================================================! !> @brief Computes the tangent linear flux F and advective increment !> @details Compute the tangent linear mass flux and advective increment - !> @param[in,out] mass_flux_1 ACTIVE: mass flux to compute from - !! linear wind and perturbation field - !> @param[in,out] mass_flux_2 ACTIVE: mass flux to compute from - !! perturbation wind and linear field - !> @param[in,out] adv_inc ACTIVE: advective increment to compute - !> @param[in,out] density ACTIVE: W3 field to transport - !> @param[in,out] wind ACTIVE: transporting wind field - !> @param[in] ls_density PASSIVE: linearisation transported field - !> @param[in] ls_wind PASSIVE: linearisation transporting wind - !> @param[in] direction Direction of the transport - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - !> @param[in] dt Advection time step - !> @param[in] do_flux Flag to compute mass_flux = wind*density - !> @param[in] do_advective Flag to compute adv_inc = wind.grad(density) - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in,out] mass_flux_1 ACTIVE: mass flux to compute from + !! linear wind and perturbation field + !> @param[in,out] mass_flux_2 ACTIVE: mass flux to compute from + !! perturbation wind and linear field + !> @param[in,out] adv_inc ACTIVE: advective increment to compute + !> @param[in,out] density ACTIVE: W3 field to transport + !> @param[in,out] wind ACTIVE: transporting wind field + !> @param[in] ls_density PASSIVE: linearisation transported field + !> @param[in] ls_wind PASSIVE: linearisation transporting wind + !> @param[in] direction Direction of the transport + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] dt Advection time step + !> @param[in] do_flux Flag to compute mass_flux = wind*density + !> @param[in] do_advective Flag to compute adv_inc = wind.grad(density) subroutine atl_advective_and_flux_alg( mass_flux_1, mass_flux_2, adv_inc, & density, wind, ls_density, ls_wind, & direction, transport_metadata, & final_rk_stage, dt, & - do_flux, do_advective, & - adj_lookup_table_cache ) + do_flux, do_advective ) implicit none - type(field_type), intent(inout) :: mass_flux_1, mass_flux_2 - type(field_type), intent(inout) :: density, wind - type(field_type), intent(in) :: ls_density, ls_wind - type(field_type), intent(inout) :: adv_inc - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage - real(kind=r_def), intent(in) :: dt - logical(kind=l_def), intent(in) :: do_flux - logical(kind=l_def), intent(in) :: do_advective - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(field_type), intent(inout) :: mass_flux_1, mass_flux_2 + type(field_type), intent(inout) :: density, wind + type(field_type), intent(in) :: ls_density, ls_wind + type(field_type), intent(inout) :: adv_inc + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + real(kind=r_def), intent(in) :: dt + logical(kind=l_def), intent(in) :: do_flux + logical(kind=l_def), intent(in) :: do_advective ! Internal variables type(field_type) :: adv_inc_1, adv_inc_2 @@ -105,13 +102,13 @@ contains type(operator_type), pointer :: m3_inv integer(kind=i_def), parameter :: stencil_depth = 1 - type(adj_lookup_table_type), pointer :: lookup_w3h - type(integer_field_type), pointer :: lookup_w3h_field - type(integer_field_type), pointer :: set_count_w3h_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type) :: lookup_w3h + type(integer_field_type), pointer :: lookup_w3h_field + type(integer_field_type), pointer :: set_count_w3h_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices - nullify(mesh, recon_fs, m3_inv, lookup_w3h, lookup_w3h_field, set_count_w3h_field) + nullify(mesh, recon_fs, m3_inv, lookup_w3h_field, set_count_w3h_field) mesh => density%get_mesh() @@ -207,7 +204,10 @@ contains wind, & m3_inv ) ) - lookup_w3h => adj_lookup_table_cache%get_lookup_w3h_adv_upd(ls_wind%which_function_space()) + ! Lookup table adjoint solution. Creation of lookup table is essentially + ! a dry-run of the TL code. + call create_lookup_w3h_adv_upd( lookup_w3h, adv_inc_1, reconstruction_field, & + wind, m3_inv, stencil_depth ) lookup_w3h_field => lookup_w3h%get_lookup_field() set_count_w3h_field => lookup_w3h%get_set_count_field() nindices = lookup_w3h%get_nindices() @@ -246,9 +246,8 @@ contains end if - call atl_reconstruct_w3_field_alg( reconstruction_field, density, ls_density, & - direction, transport_metadata, final_rk_stage, & - adj_lookup_table_cache ) + call atl_reconstruct_w3_field_alg( reconstruction_field, density, ls_density, & + direction, transport_metadata, final_rk_stage ) case ( Wtheta ) if ( do_flux ) then @@ -256,9 +255,8 @@ contains end if if ( do_advective ) then - call atl_wt_advective_update_alg( adv_inc, density, wind, ls_density, ls_wind, & - dt, direction, transport_metadata, final_rk_stage, & - adj_lookup_table_cache ) + call atl_wt_advective_update_alg( adv_inc, density, wind, ls_density, ls_wind, & + dt, direction, transport_metadata, final_rk_stage ) end if case default diff --git a/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 index 802aa9d5e..cec84c386 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 @@ -13,7 +13,6 @@ module atl_mol_advective_alg_mod use mesh_mod, only: mesh_type ! Algorithms and transport code - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use advective_and_flux_alg_mod, only: advective_and_flux_alg use atl_advective_and_flux_alg_mod, only: atl_advective_and_flux_alg use end_of_transport_step_alg_mod, only: end_of_advective_step_alg @@ -28,8 +27,7 @@ module atl_mol_advective_alg_mod use wind_precomputations_alg_mod, only: wind_precomputations_type ! Configuration - use transport_config_mod, only: runge_kutta_method - use linear_config_mod, only: transport_efficiency + use transport_config_mod, only: runge_kutta_method implicit none @@ -39,14 +37,14 @@ contains !============================================================================= !> @brief Adjoint of tangent linear advection of a field with the MOL scheme. - !> @param[in,out] field_np1 ACTIVE Field at the end of the time step - !> @param[in] field ACTIVE Field at the start of the transport step - !> @param[in] ls_field PASSIVE Field at the start of the transport step - !> @param[in] direction Direction of advection (vertical, horizontal, or 3d) - !> @param[in,out] tl_transport_controller Object controlling transport - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in,out] field_np1 ACTIVE Field at the end of the time step + !> @param[in] field ACTIVE Field at the start of the transport step + !> @param[in] ls_field PASSIVE Field at the start of the transport step + !> @param[in] direction Direction of advection (vertical, horizontal, or 3d) + !> @param[in,out] tl_transport_controller + !! Object controlling transport subroutine atl_mol_advective_alg( field_np1, field, ls_field, & - tl_transport_controller, adj_lookup_table_cache ) + tl_transport_controller ) implicit none @@ -54,14 +52,11 @@ contains type(field_type), intent(inout) :: field type(field_type), intent(in) :: ls_field type(tl_transport_controller_type), intent(inout) :: tl_transport_controller - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep - integer(kind=i_def) :: ls_stage, ls_nstage integer(kind=i_def) :: number_substeps - integer(kind=i_def) :: ls_number_substeps, ls_substep integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -76,10 +71,7 @@ contains type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata - type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter - type(transport_counter_type), pointer :: ls_transport_counter - type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller type(wind_precomputations_type), pointer :: ls_wind_precomputations @@ -89,16 +81,10 @@ contains ! Extract transport objects and initialise temporary fields ! ------------------------------------------------------------------------ ! mesh => field%get_mesh() - transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_metadata => pert_transport_controller%get_transport_metadata() - ls_transport_metadata => transport_controller%get_transport_metadata() - transport_counter => pert_transport_controller%get_transport_counter() - ls_transport_counter => transport_controller%get_transport_counter() - ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -116,24 +102,13 @@ contains ) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) - - if (transport_efficiency) then - ls_number_substeps = 1 - ls_nstage =1 - else - ls_number_substeps = number_substeps - ls_nstage = nstage - end if - allocate( rk_field(nstage) ) - allocate( stored_ls_field(ls_number_substeps, ls_nstage) ) + allocate( stored_ls_field(number_substeps, nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - end do - do ls_stage = 1, ls_nstage - do ls_substep = 1, ls_number_substeps - call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) + do substep = 1, number_substeps + call stored_ls_field(substep, stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -160,23 +135,19 @@ contains ! array for each substep and each RK stage to use in the perturbation !--------------------------------------------------------------------------! - if (transport_efficiency) then - call invoke( setval_X(stored_ls_field(1,1), ls_field_np1 )) - else - ! Perform the number of rk-stages and substeps required - do substep = 1, ls_number_substeps + do substep = 1, number_substeps ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - do stage = 1, ls_nstage + do stage = 1, nstage ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state call invoke( setval_X(stored_ls_field(substep, stage), ls_field_np1) ) - final_rk_stage = ( stage == ls_nstage ) + final_rk_stage = ( stage == nstage ) ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) @@ -187,9 +158,9 @@ contains end do ! Compute update: rhs = u.grad(rhs_field) - call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & - ls_advecting_wind, direction, & - ls_transport_metadata, final_rk_stage, & + call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & + ls_advecting_wind, direction, & + transport_metadata, final_rk_stage, & dt_mol_substep, .false., .true. ) ! Update field: f = f^n - dt*rhs @@ -199,12 +170,10 @@ contains end do ! End of step: if necessary enforce min val and overwrite in blending zone - call end_of_advective_step_alg( & - ls_field_np1, ls_field_n, ls_transport_counter, ls_transport_metadata & + call end_of_advective_step_alg( & + ls_field_np1, ls_field_n, transport_counter, transport_metadata & ) - end if - ! -------------------------------------------------------------------------- ! Perturbation ! @@ -230,32 +199,21 @@ contains ! Perform the number of rk-stages and substeps required do substep = number_substeps, 1, -1 - if (transport_efficiency) then - ls_substep = 1 - else - ls_substep = substep - end if - do stage = nstage, 1, -1 - if (transport_efficiency) then - ls_stage = 1 - else - ls_stage = stage - end if - final_rk_stage = ( stage == nstage ) ! Update field: f = f^n - dt_substep*rhs call invoke( inc_X_minus_bY( rhs, dt_mol_substep, field_np1 ), & - inc_X_plus_Y( field_n, field_np1 ) ) + inc_X_plus_Y( field_n, field_np1 ), & + setval_c( field_np1, 0.0_r_def ) ) ! Compute update: rhs = u.grad(rhs_field) call atl_advective_and_flux_alg( & dummy, dummy, rhs, rhs_field, advecting_wind, & - stored_ls_field(ls_substep, ls_stage), ls_advecting_wind, & + stored_ls_field(substep, stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, dt_mol_substep, & - .false., .true., adj_lookup_table_cache & + .false., .true. & ) do s = stage, 1, -1 @@ -264,8 +222,8 @@ contains ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) - call invoke( setval_c( rhs_field, 0.0_r_def ), & - setval_x( field_np1, rk_field(stage) ), & + call invoke( setval_c( rhs_field, 0.0_r_def ), & + inc_X_plus_Y( field_np1, rk_field(stage) ), & setval_c( rk_field(stage), 0.0_r_def ) ) end do ! stage diff --git a/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 index fc9502e2d..2e3c9f65d 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 @@ -19,7 +19,6 @@ module atl_mol_conservative_alg_mod tik, LPROF ! Algorithms and transport code - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use advective_and_flux_alg_mod, only: advective_and_flux_alg use atl_advective_and_flux_alg_mod, only: atl_advective_and_flux_alg use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg @@ -28,7 +27,7 @@ module atl_mol_conservative_alg_mod use runge_kutta_init_mod, only: get_rk_transport_weights use split_transport_utils_mod, only: get_num_split_steps, & get_splitting_direction - use transport_constants_mod, only: get_directional_im3_div_r_tran + use transport_constants_mod, only: get_directional_im3_div use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -42,7 +41,6 @@ module atl_mol_conservative_alg_mod ! Configuration use boundaries_config_mod, only: limited_area use base_mesh_config_mod, only: topology, topology_non_periodic - use linear_config_mod, only: transport_efficiency use transport_config_mod, only: runge_kutta_method, & dry_field_name, & operators, & @@ -56,30 +54,27 @@ module atl_mol_conservative_alg_mod !============================================================================= !> @brief Adjoint of tangent linear transport (conservative-form) with the MOL scheme. - !> @param[in,out] field_np1 ACTIVE Field at the end of the time step - !> @param[in,out] field ACTIVE Field at the start of the transport step - !> @param[in] ls_field PASSIVE Field at the start of the transport step - !> @param[in,out] tl_transport_controller Object controlling transport - !> @param[in] adj_lookup_table_cache Lookup table cache + !> @param[in,out] field_np1 ACTIVE Field at the end of the time step + !> @param[in,out] field ACTIVE Field at the start of the transport step + !> @param[in] ls_field PASSIVE Field at the start of the transport step + !> @param[in,out] tl_transport_controller + !! Object controlling transport subroutine atl_mol_conservative_alg( field_np1, field, ls_field, & - tl_transport_controller, adj_lookup_table_cache ) + tl_transport_controller ) implicit none ! Arguments type(field_type), intent(inout) :: field_np1 type(field_type), intent(inout) :: field - type(field_type), intent(in) :: ls_field + type(field_type), intent(in) :: ls_field type(tl_transport_controller_type), intent(inout) :: tl_transport_controller - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: mesh_id integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep - integer(kind=i_def) :: ls_nstage, ls_substep - integer(kind=i_def) :: ls_stage, number_substeps - integer(kind=i_def) :: ls_number_substeps + integer(kind=i_def) :: number_substeps integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -107,9 +102,7 @@ module atl_mol_conservative_alg_mod type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata - type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter - type(transport_counter_type), pointer :: ls_transport_counter type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller @@ -130,18 +123,11 @@ module atl_mol_conservative_alg_mod transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_metadata => pert_transport_controller%get_transport_metadata() - ls_transport_metadata => transport_controller%get_transport_metadata() - transport_counter => pert_transport_controller%get_transport_counter() - ls_transport_counter => transport_controller%get_transport_counter() - flux_precomputations => transport_controller%get_flux_precomputations() - ls_wind_flux_precomp => ls_transport_controller%get_flux_precomputations() pert_wind_flux_precomp => pert_transport_controller%get_flux_precomputations() - ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -157,27 +143,16 @@ module atl_mol_conservative_alg_mod dt_mol_substep = ls_wind_precomputations%get_dt_mol_substep( & mesh%get_id(), direction, splitting, step & ) - div => get_directional_im3_div_r_tran(mesh_id, direction) + div => get_directional_im3_div(mesh_id, direction) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) - - if (transport_efficiency) then - ls_nstage = 1 - ls_number_substeps = 1 - else - ls_nstage = nstage - ls_number_substeps = number_substeps - end if - allocate( rk_field(nstage) ) - allocate( stored_ls_field(ls_number_substeps,ls_nstage) ) + allocate( stored_ls_field(number_substeps,nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - end do - do ls_stage = 1, ls_nstage - do ls_substep = 1, ls_number_substeps - call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) + do substep = 1, number_substeps + call stored_ls_field(substep, stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -212,24 +187,20 @@ module atl_mol_conservative_alg_mod ! This calculates the values of ls_field. These are stored as an ! array for each substep and each RK stage to use in the perturbation ! ======================================================================== ! - - if ( transport_efficiency ) then - call invoke( setval_X( stored_ls_field(1,1), ls_field_np1 ) ) - else ! ------------------------------------------------------------------------ ! ! Start of substepping loop ! ------------------------------------------------------------------------ ! - ls_substep_loop: do substep = 1, ls_number_substeps + ls_substep_loop: do substep = 1, number_substeps - final_substep = ( substep == ls_number_substeps ) + final_substep = ( substep == number_substeps ) ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - ls_stage_loop: do stage = 1, ls_nstage + ls_stage_loop: do stage = 1, nstage - final_rk_stage = ( stage == ls_nstage ) + final_rk_stage = ( stage == nstage ) ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state @@ -270,7 +241,7 @@ module atl_mol_conservative_alg_mod call advective_and_flux_alg(flux_step, adv_inc, rhs_field, ls_field_n, & ls_advecting_wind, direction, & - ls_transport_metadata, final_rk_stage, & + transport_metadata, final_rk_stage, & dt_mol_substep, do_flux, do_advective) if ( do_flux ) then @@ -313,11 +284,9 @@ module atl_mol_conservative_alg_mod ! increment, and may be adjusted to enforce min value or in blending zone call end_of_conservative_step_alg( & ls_field_np1, ls_field, ls_sum_flux, flux_precomputations, & - ls_transport_counter, ls_transport_metadata & + transport_counter, transport_metadata & ) - end if - ! ======================================================================== ! ! Perturbation ! @@ -355,12 +324,6 @@ module atl_mol_conservative_alg_mod ! ------------------------------------------------------------------------ ! substep_loop: do substep = number_substeps, 1, -1 - if (transport_efficiency) then - ls_substep = 1 - else - ls_substep = substep - end if - final_substep = ( substep == number_substeps ) ! ---------------------------------------------------------------------- ! @@ -377,12 +340,6 @@ module atl_mol_conservative_alg_mod stage_loop: do stage = nstage, 1, -1 - if (transport_efficiency) then - ls_stage = 1 - else - ls_stage = stage - end if - final_rk_stage = ( stage == nstage ) ! -------------------------------------------------------------------- ! @@ -424,15 +381,16 @@ module atl_mol_conservative_alg_mod end if if ( do_advective ) then call invoke( inc_X_minus_bY( adv_inc, dt_mol_substep, field_np1 ), & - inc_X_plus_Y( field_n, field_np1 ) ) + inc_X_plus_Y( field_n, field_np1 ), & + setval_c( field_np1, 0.0_r_def ) ) end if call atl_advective_and_flux_alg( & flux_step_ls_wind, flux_step_pert_wind, adv_inc, & rhs_field, advecting_wind, & - stored_ls_field(ls_substep,ls_stage), ls_advecting_wind, & + stored_ls_field(substep,stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, & - dt_mol_substep, do_flux, do_advective, adj_lookup_table_cache & + dt_mol_substep, do_flux, do_advective & ) do s = stage, 1, -1 @@ -441,8 +399,8 @@ module atl_mol_conservative_alg_mod ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) - call invoke( setval_c( rhs_field, 0.0_r_def ), & - setval_x( field_np1, rk_field(stage) ), & + call invoke( setval_c( rhs_field, 0.0_r_def ), & + inc_X_plus_Y( field_np1, rk_field(stage) ), & setval_c( rk_field(stage), 0.0_r_def ) ) end do stage_loop diff --git a/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 index a4bf5ff64..7aff24650 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 @@ -52,29 +52,24 @@ contains !============================================================================= !> @brief Reconstruct a W3 field at W2 points for adjoint app. - !> @param[in,out] field_new ACTIVE Reconstructed field at W2 points - !> @param[in,out] field_old ACTIVE Initial W3 field - !> @param[in] ls_field_old PASSIVE Initial W3 field - !> @param[in] direction Splitting direction (h, v, or 3d) to - !! compute reconstruction - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & - direction, transport_metadata, final_rk_stage, & - adj_lookup_table_cache ) - - use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type + !> @param[in,out] field_new ACTIVE Reconstructed field at W2 points + !> @param[in,out] field_old ACTIVE Initial W3 field + !> @param[in] ls_field_old PASSIVE Initial W3 field + !> @param[in] direction Splitting direction (h, v, or 3d) to + !! compute reconstruction + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + subroutine atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & + direction, transport_metadata, final_rk_stage ) implicit none - type(field_type), intent(inout) :: field_old - type(field_type), intent(in) :: ls_field_old - type(field_type), intent(inout) :: field_new - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(field_type), intent(inout) :: field_old + type(field_type), intent(in) :: ls_field_old + type(field_type), intent(inout) :: field_new + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage type(mesh_type), pointer :: mesh type(field_type) :: field_new_h, field_new_v @@ -124,11 +119,11 @@ contains ls_field_old, transport_metadata, & final_rk_stage ) call adj_hori_w3_reconstruct_alg( field_new_h, field_old, & - transport_metadata, adj_lookup_table_cache ) + transport_metadata ) case ( direction_h ) call adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata, adj_lookup_table_cache ) + transport_metadata ) case ( direction_v ) call atl_vert_w3_reconstruct_alg( field_new, field_old, & ls_field_old, transport_metadata, & diff --git a/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 index f059c160c..09093efb6 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 @@ -48,23 +48,21 @@ contains !============================================================================= !> @brief Compute advective update of a Wtheta field for adjoint app. - !> @param[in,out] rhs ACTIVE Change in Advective increment - !> @param[in] adv_field ACTIVE Change in Field to advect - !> @param[in] wind ACTIVE Change in Advecting wind field - !> @param[in] ls_adv_field Lin state for Field to advect - !> @param[in] ls_wind Lin state for Advecting wind field - !> @param[in] dt Timestep - !> @param[in] direction Direction of the transport - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - !> @param[in] adj_lookup_table_cache Lookup table cache - subroutine atl_wt_advective_update_alg( rhs, adv_field, wind, & - ls_adv_field, ls_wind, & - dt, direction, & - transport_metadata, final_rk_stage, & - adj_lookup_table_cache ) - - use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type + !> @param[in,out] rhs ACTIVE Change in Advective increment + !> @param[in] adv_field ACTIVE Change in Field to advect + !> @param[in] wind ACTIVE Change in Advecting wind field + !> @param[in] ls_adv_field Lin state for Field to advect + !> @param[in] ls_wind Lin state for Advecting wind field + !> @param[in] dt Timestep + !> @param[in] direction Direction of the transport + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + subroutine atl_wt_advective_update_alg( rhs, adv_field, wind, & + ls_adv_field, ls_wind, & + dt, direction, & + transport_metadata, final_rk_stage ) + + use reference_element_mod, only : reference_element_type use mesh_mod, only : mesh_type use adj_wt_advective_update_alg_mod, only : adj_hori_wt_update_alg @@ -72,14 +70,13 @@ contains implicit none - type(field_type), intent(inout) :: adv_field, wind - type(field_type), intent(in) :: ls_adv_field, ls_wind - type(field_type), intent(inout) :: rhs - real(kind=r_def), intent(in) :: dt - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage - type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + type(field_type), intent(inout) :: adv_field, wind + type(field_type), intent(in) :: ls_adv_field, ls_wind + type(field_type), intent(inout) :: rhs + real(kind=r_def), intent(in) :: dt + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage type(field_type) :: u_grad_f type(field_type) :: wind_v @@ -137,8 +134,7 @@ contains ! Horizontal update call atl_hori_wt_update_alg( u_grad_f, wind_h, ls_wind_h, ls_adv_field, transport_metadata ) - call adj_hori_wt_update_alg( u_grad_f, ls_wind_h, ls_wind_h, adv_field, transport_metadata, & - adj_lookup_table_cache ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind_h, ls_wind_h, adv_field, transport_metadata ) call invoke( adj_split_w2_field_kernel_type(wind_h, wind_v, wind, & face_selector_ew, & @@ -147,8 +143,7 @@ contains case ( direction_h ) call atl_hori_wt_update_alg( u_grad_f, wind, ls_wind, ls_adv_field, transport_metadata ) - call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, adv_field, transport_metadata, & - adj_lookup_table_cache ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, adv_field, transport_metadata ) case ( direction_v ) @@ -175,6 +170,7 @@ contains !> @param[in] transport_metadata Contains transport configuration options subroutine atl_hori_wt_update_alg(u_grad_f, wind, wind_dir, ls_field, transport_metadata) + use check_configuration_mod, only : get_required_stencil_depth use poly1d_reconstruction_kernel_mod, only : poly1d_reconstruction_kernel_type use poly2d_reconstruction_kernel_mod, only : poly2d_reconstruction_kernel_type use polyh_wtheta_koren_kernel_mod, only : polyh_wtheta_koren_kernel_type @@ -227,7 +223,7 @@ contains ! Copy field to a large halo version call ls_field_big_halo%initialise( ls_field%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth = get_required_stencil_depth() ) call invoke( setval_X( ls_field_big_halo, ls_field ) ) ! Compute reconstruction on a Wtheta multidata field diff --git a/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 b/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 deleted file mode 100644 index 797685522..000000000 --- a/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 +++ /dev/null @@ -1,177 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief (Adjoint of) computes u_inc, the change in TLM velocity due to TLM boundary layer processes. -module atl_bl_inc_kernel_mod - - use argument_mod, only : arg_type, & - GH_FIELD, GH_OPERATOR, & - GH_SCALAR, GH_INTEGER, & - GH_READ, GH_INC, & - GH_REAL, CELL_COLUMN, & - ANY_DISCONTINUOUS_SPACE_1 - use constants_mod, only : r_def, i_def, r_um - use fs_continuity_mod, only : W1, W2, W3 - use kernel_mod, only : kernel_type - use reference_element_mod, only : N - - implicit none - - private - - !--------------------------------------------------------------------------- - ! Public types - !--------------------------------------------------------------------------- - - type, public, extends(kernel_type) :: atl_bl_inc_kernel_type - private - type(arg_type) :: meta_args(7) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! u_inc - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! u - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Auv - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Buv_inv - arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew - arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew - arg_type(GH_SCALAR, GH_INTEGER, GH_READ) & ! Blevs_m - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: atl_bl_inc_code - end type - - !--------------------------------------------------------------------------- - ! Contained functions/subroutines - !--------------------------------------------------------------------------- - public :: atl_bl_inc_code - -contains - -!> @brief (Adjoint of) computes u_inc, the change in TLM velocity due to TLM boundary layer processes. -!> @details The algorithm uses coefficients Auv and Buv_inv computed in tl_compute_aubu_kernel_mod. -!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, -!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf -!! @param[in] nlayers Number of layers -!! @param[in,out] u_inc Change in TLM velocity due to TLM boundary layer processes -!! @param[in] u TLM velocity -!! @param[in] nlayers Number of layers -!! @param[in] Auv Coefficient for TLM boundary layer -!! @param[in] Buv_inv Inverse of coefficient for TLM boundary layer -!! @param[in] face_selector_ew 2D field indicating which W/E faces to loop over in this column -!! @param[in] face_selector_ns 2D field indicating which N/S faces to loop over in this column -!! @param[in] Blevs_m Number of levels in momentum boundary layer -!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space -!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space -!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 -!! @param[in] ndf_w3_2d Number of DoFs for 2D W3 per cell -!! @param[in] undf_w3_2d Number of DoFs for this partition for 2D W3 -!! @param[in] map_w3_2d Map for 2D W3 -subroutine atl_bl_inc_code( nlayers, & - u_inc, & - u, & - Auv, & - Buv_inv, & - face_selector_ew, & - face_selector_ns, & - Blevs_m, & - ndf_w2, undf_w2, map_w2, & - ndf_w3_2d, undf_w3_2d, map_w3_2d ) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: nlayers - integer(kind=i_def), intent(in) :: undf_w2 - real(kind=r_def), dimension(undf_w2), intent(inout) :: u_inc - real(kind=r_def), dimension(undf_w2), intent(inout) :: u - integer(kind=i_def), intent(in) :: ndf_w2 - integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 - real(kind=r_def), dimension(undf_w2), intent(in) :: auv - real(kind=r_def), dimension(undf_w2), intent(in) :: buv_inv - integer(kind=i_def), intent(in) :: ndf_w3_2d - integer(kind=i_def), intent(in) :: undf_w3_2d - integer(kind=i_def), dimension(ndf_w3_2d), intent(in) :: map_w3_2d - integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ew - integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ns - integer(kind=i_def), intent(in) :: blevs_m - - ! Internal variables - integer(kind=i_def) :: df - integer(kind=i_def) :: k - integer(kind=i_def) :: j - real(kind=r_def), dimension(blevs_m) :: a0 ! Coefficient - real(kind=r_def), dimension(blevs_m) :: a1 ! Coefficient - real(kind=r_def), dimension(blevs_m) :: a2 ! Coefficient - real(kind=r_def), dimension(blevs_m) :: u_rhs ! Local perturbation velocity variable - real(kind=r_def), dimension(blevs_m) :: u_out ! Local perturbation velocity variable - real(kind=r_def), dimension(blevs_m) :: factor_u - - do j = face_selector_ew(map_w3_2d(1)) + face_selector_ns(map_w3_2d(1)), 1, -1 - - df = j - if (j == 3 .and. face_selector_ns(map_w3_2d(1)) == 2 .and. face_selector_ew(map_w3_2d(1)) == 1) df = n - - u_out = 0.0_r_def - - ! Set up coeffs a0, a1, a2, u_rhs - a0(1) = 1.0_r_def + (Auv(map_w2(df) + 1) + Auv(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) - a1(1) = -Auv(map_w2(df) + 1) / Buv_inv(map_w2(df) + 1) - a2(1) = 0.0_r_def - - do k = 2, BLevs_m - 1 - a0(k) = 1.0_r_def + (Auv(map_w2(df) + k) + Auv(map_w2(df) + k - 1)) / Buv_inv(map_w2(df) + k) - a1(k) = -Auv(map_w2(df) + k) / Buv_inv(map_w2(df) + k) - a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) - end do - - a0(BLevs_m) = 1.0_r_def + Auv(map_w2(df) + BLevs_m - 1) / Buv_inv(map_w2(df) + BLevs_m) - a1(BLevs_m) = 0.0_r_def - a2(BLevs_m) = -Auv(map_w2(df) + BLevs_m - 1) / Buv_inv(map_w2(df) + BLevs_m) - - a0(1) = 1.0_r_def / a0(1) - - do k = 2, BLevs_m - factor_u(k) = a2(k) * a0(k - 1) - a0(k) = 1.0_r_def / (a0(k) - factor_u(k) * a1(k - 1)) - end do - - ! (Adjoint of) solve for u_inc and transform to upper triangular form - do k = 1, blevs_m - 1 - u_out(k) = u_out(k) + u_inc(map_w2(df) + k - 1) - u_inc(map_w2(df) + k - 1) = 0.0_r_def - - u_out(k + 1) = u_out(k + 1) + (-a0(k) * a1(k) * u_out(k)) - u_rhs(k) = a0(k) * u_out(k) - end do - - u_out(blevs_m) = u_out(blevs_m) + u_inc(map_w2(df) + blevs_m - 1) - u_inc(map_w2(df) + blevs_m - 1) = 0.0_r_def - - u_rhs(blevs_m) = a0(blevs_m) * u_out(blevs_m) - - do k = blevs_m, 2, -1 - u_rhs(k - 1) = u_rhs(k - 1) + (-factor_u(k) * u_rhs(k)) - end do - - u(blevs_m + map_w2(df) - 2) = u(blevs_m + map_w2(df) - 2) + & - auv(blevs_m + map_w2(df) - 1) * u_rhs(blevs_m) / buv_inv(blevs_m + map_w2(df)) - u(blevs_m + map_w2(df) - 1) = u(blevs_m + map_w2(df) - 1) - & - auv(blevs_m + map_w2(df) - 1) * u_rhs(blevs_m) / buv_inv(blevs_m + map_w2(df)) - - do k = blevs_m - 1, 2, -1 - u(k + map_w2(df)) = u(k + map_w2(df)) + auv(k + map_w2(df)) * u_rhs(k) / buv_inv(k + map_w2(df)) - u(k + map_w2(df) - 1) = u(k + map_w2(df) - 1) - auv(k + map_w2(df)) * u_rhs(k) / buv_inv(k + map_w2(df)) - u(k + map_w2(df) - 2) = u(k + map_w2(df) - 2) + auv(k + map_w2(df) - 1) * u_rhs(k) / buv_inv(k + map_w2(df)) - u(k + map_w2(df) - 1) = u(k + map_w2(df) - 1) - auv(k + map_w2(df) - 1) * u_rhs(k) / buv_inv(k + map_w2(df)) - end do - - u(map_w2(df) + 1) = u(map_w2(df) + 1) + auv(map_w2(df) + 1) * u_rhs(1) / buv_inv(map_w2(df) + 1) - u(map_w2(df)) = u(map_w2(df)) - auv(map_w2(df) + 1) * u_rhs(1) / buv_inv(map_w2(df) + 1) - u(map_w2(df)) = u(map_w2(df)) - auv(map_w2(df)) * u_rhs(1) / buv_inv(map_w2(df) + 1) - - end do - -end subroutine atl_bl_inc_code - -end module atl_bl_inc_kernel_mod diff --git a/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 b/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 index e330c4bad..d28895016 100644 --- a/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 +++ b/science/adjoint/source/kernel/transport/mol/atl_poly1d_vert_w3_reconstruction_kernel_mod.F90 @@ -129,6 +129,7 @@ subroutine atl_poly1d_vert_w3_reconstruction_code( nlayers, & real(kind=r_def) :: new_tracer real(kind=r_def) :: ls_new_tracer + new_tracer = 0.0_r_def vertical_order = MIN(global_order, nlayers - 1) ij = map_w3(1) if (logspace) then @@ -139,24 +140,26 @@ subroutine atl_poly1d_vert_w3_reconstruction_code( nlayers, & ik = f * global_order + f + k * ndata + p + map_c(1) - 1 ls_new_tracer = ls_new_tracer * MAX(eps, ABS(ls_tracer(ij + stencil(p,k,f)))) ** coeff(ik) end do - new_tracer = ls_new_tracer * reconstruction(map_md(1) + f * nlayers + k) + new_tracer = new_tracer + ls_new_tracer * reconstruction(map_md(1) + f * nlayers + k) reconstruction(map_md(1) + f * nlayers + k) = 0.0_r_def do p = vertical_order + 1, 1, -1 ik = f * global_order + f + k * ndata + p + map_c(1) - 1 tracer(ij + stencil(p,k,f)) = tracer(ij + stencil(p,k,f)) + coeff(ik) * new_tracer / SIGN(MAX(eps, ls_tracer(ij + & &stencil(p,k,f))), ls_tracer(ij + stencil(p,k,f))) enddo + new_tracer = 0.0_r_def enddo enddo else do f = 1, 0, -1 do k = nlayers - 1, 0, -1 - new_tracer = reconstruction(map_md(1) + f * nlayers + k) + new_tracer = new_tracer + reconstruction(map_md(1) + f * nlayers + k) reconstruction(map_md(1) + f * nlayers + k) = 0.0_r_def do p = vertical_order + 1, 1, -1 ik = f * global_order + f + k * ndata + p + map_c(1) - 1 tracer(ij + stencil(p,k,f)) = tracer(ij + stencil(p,k,f)) + coeff(ik) * new_tracer enddo + new_tracer = 0.0_r_def enddo enddo end if diff --git a/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 b/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 index e1a89201b..972aa52d6 100644 --- a/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 +++ b/science/adjoint/source/kernel/transport/mol/atl_poly_adv_update_kernel_mod.F90 @@ -152,7 +152,10 @@ subroutine atl_poly_adv_update_code( nlayers, & real(kind=r_tran) :: ls_dtdy - v_dot_n = (/ -1.0_r_tran, 1.0_r_tran, 1.0_r_tran, -1.0_r_tran /) + uv = 0.0_r_tran + v_dot_n(:) = 1.0_r_tran + v_dot_n(1) = -1.0_r_tran + v_dot_n(nfaces) = -1.0_r_tran opposite(:) = -1 missing_neighbour(:) = .false. @@ -183,7 +186,9 @@ subroutine atl_poly_adv_update_code( nlayers, & uv_dir(1,k) = 0.25_r_tran * wind_dir(k + map_w2(1) - 1) + 0.25_r_tran * wind_dir(k + map_w2(3) - 1) uv_dir(2,k) = 0.25_r_tran * wind_dir(k + map_w2(2) - 1) + 0.25_r_tran * wind_dir(k + map_w2(4) - 1) - direction_dofs(:) = (/ 1, 2, 1, 2 /) + direction_dofs(:) = 1 + direction_dofs(2) = 2 + direction_dofs(4) = 2 do df = 1, nfaces, 1 do k = 0, nlayers, 1 @@ -201,33 +206,39 @@ subroutine atl_poly_adv_update_code( nlayers, & do k = nlayers, 0, -1 ls_dtdx = ls_tracer(e,k) - ls_tracer(w,k) ls_dtdy = ls_tracer(n,k) - ls_tracer(s,k) - uv(1,k) = ls_dtdx * advective(map_wt(1) + k) - uv(2,k) = -ls_dtdy * advective(map_wt(1) + k) + uv(1,k) = uv(1,k) + ls_dtdx * advective(map_wt(1) + k) + uv(2,k) = uv(2,k) - ls_dtdy * advective(map_wt(1) + k) advective(map_wt(1) + k) = 0.0_r_tran enddo k = nlayers wind(k + map_w2(2) - 1) = wind(k + map_w2(2) - 1) + 0.25_r_tran * uv(2,k) wind(k + map_w2(4) - 1) = wind(k + map_w2(4) - 1) + 0.25_r_tran * uv(2,k) + uv(2,k) = 0.0_r_tran wind(k + map_w2(1) - 1) = wind(k + map_w2(1) - 1) + 0.25_r_tran * uv(1,k) wind(k + map_w2(3) - 1) = wind(k + map_w2(3) - 1) + 0.25_r_tran * uv(1,k) + uv(1,k) = 0.0_r_tran do k = nlayers - 1, 1, -1 wind(k + map_w2(2)) = wind(k + map_w2(2)) + 0.25_r_tran * uv(2,k) wind(k + map_w2(4)) = wind(k + map_w2(4)) + 0.25_r_tran * uv(2,k) wind(k + map_w2(2) - 1) = wind(k + map_w2(2) - 1) + 0.25_r_tran * uv(2,k) wind(k + map_w2(4) - 1) = wind(k + map_w2(4) - 1) + 0.25_r_tran * uv(2,k) + uv(2,k) = 0.0_r_tran wind(k + map_w2(1)) = wind(k + map_w2(1)) + 0.25_r_tran * uv(1,k) wind(k + map_w2(3)) = wind(k + map_w2(3)) + 0.25_r_tran * uv(1,k) wind(k + map_w2(1) - 1) = wind(k + map_w2(1) - 1) + 0.25_r_tran * uv(1,k) wind(k + map_w2(3) - 1) = wind(k + map_w2(3) - 1) + 0.25_r_tran * uv(1,k) + uv(1,k) = 0.0_r_tran enddo k = 0 wind(map_w2(2)) = wind(map_w2(2)) + 0.25_r_tran * uv(2,k) wind(map_w2(4)) = wind(map_w2(4)) + 0.25_r_tran * uv(2,k) + uv(2,k) = 0.0_r_tran wind(map_w2(1)) = wind(map_w2(1)) + 0.25_r_tran * uv(1,k) wind(map_w2(3)) = wind(map_w2(3)) + 0.25_r_tran * uv(1,k) + uv(1,k) = 0.0_r_tran end subroutine atl_poly_adv_update_code diff --git a/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 b/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 index 021af5e9d..fca1ec80a 100644 --- a/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 +++ b/science/adjoint/source/kernel/transport/mol/atl_w3h_advective_update_kernel_mod.F90 @@ -165,6 +165,8 @@ subroutine atl_w3h_advective_update_code( cell, & ! so if u.n > 0 then we set the field to be the value on this edge from this cell ! and if u.n < 0 then we set the field to be the value on this edge from a ! neighbouring cell + u = 0.0_r_def + v = 0.0_r_def do k = nlayers - 1, 0, -1 ! u * dt/dx @@ -216,14 +218,16 @@ subroutine atl_w3h_advective_update_code( cell, & dtdy = t_N - t_S ik = 1 + k + (cell-1)*nlayers - u = m3_inv(ik,1,1) * dtdx * advective_increment(map_w3(1)+k) - v = m3_inv(ik,1,1) * dtdy * advective_increment(map_w3(1)+k) + u = u + m3_inv(ik,1,1) * dtdx * advective_increment(map_w3(1)+k) + v = v + m3_inv(ik,1,1) * dtdy * advective_increment(map_w3(1)+k) wind(map_w2(2) + k) = wind(map_w2(2) + k) - 0.5_r_def * v wind(map_w2(4) + k) = wind(map_w2(4) + k) - 0.5_r_def * v + v = 0.0_r_def wind(map_w2(1) + k) = wind(map_w2(1) + k) + 0.5_r_def * u wind(map_w2(3) + k) = wind(map_w2(3) + k) + 0.5_r_def * u + u = 0.0_r_def end do end subroutine atl_w3h_advective_update_code diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 097ef7552..6509e025e 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -19,6 +19,7 @@ program cma_test use, intrinsic :: iso_fortran_env, only : real64 + use check_configuration_mod, only : get_required_stencil_depth use cma_test_algorithm_mod, only : cma_test_init, & test_cma_apply_mass_p, & test_cma_apply_mass_v, & @@ -131,7 +132,7 @@ program cma_test type(namelist_type), pointer :: base_mesh_nml type(namelist_type), pointer :: planet_nml - integer(i_def) :: stencil_depth(1) + integer(i_def) :: stencil_depth character(str_def) :: file_prefix character(str_def) :: prime_mesh_name real(r_def) :: radius @@ -293,7 +294,7 @@ program cma_test domain_height, & scaled_radius ) ) - stencil_depth = 2 + stencil_depth = get_required_stencil_depth() check_partitions = .false. call init_mesh( config, & diff --git a/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf b/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf index 4380951b7..23e80bd51 100644 --- a/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf +++ b/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf @@ -4705,7 +4705,7 @@ ns=namelist/Science [namelist:physics=bl_segment] compulsory=true description=Over-rides bl_segment_size in physics -fail-if=this < 0 ; +fail-if=this <= 0 ; help=Boundary layer segment size. = =Setting bl_segment=0 will trigger the default behaviour @@ -4783,7 +4783,7 @@ values='fast','slow' [namelist:physics=gw_segment] compulsory=true description=Over-rides gw_seg_size in um physics -fail-if=this < 0 ; +fail-if=this <= 0 ; help=Break segments gravity wave. = =Setting gw_segment=0 will trigger the default behaviour @@ -5810,22 +5810,9 @@ sort-key=Panel-A25 trigger= type=real -[namelist:transport=adjust_tracer_equation] -compulsory=true -description=Adjusts the equation form of conservative tracer groups to - =advective form if Watkins algorithm is unable to fix large - =Lipschitz numbers for consistent transport. This will break - =tracer convservation for any time steps this is needed. -fail-if= -help=Must be used with FFSL and SWIFT splittings -!kind=default -sort-key=Panel-A31 -trigger= -type=logical - [namelist:transport=adjust_vhv_wind] compulsory=true -description=Adjusts the first and final vertical winds in a Strang VHV splitting +description=Adujsts the first and final vertical winds in a Strang VHV splitting =to avoid breaking any Lipschitz condition. fail-if= help=Must be used with 3D FFSL and SWIFT splittings diff --git a/science/gungho/rose-meta/lfric-gungho/versions.py b/science/gungho/rose-meta/lfric-gungho/versions.py index 50d1223d6..49f208fd0 100644 --- a/science/gungho/rose-meta/lfric-gungho/versions.py +++ b/science/gungho/rose-meta/lfric-gungho/versions.py @@ -29,6 +29,7 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports @@ -108,47 +109,5 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) return config, self.reports diff --git a/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 b/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 index 8f81cc672..172fd6652 100644 --- a/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 +++ b/science/gungho/source/algorithm/physics/map_fd_to_prognostics_alg_mod.x90 @@ -225,6 +225,7 @@ contains use matrix_vector_kernel_mod, only: matrix_vector_kernel_type use sci_average_w2b_to_w2_kernel_mod, & only: average_w2b_to_w2_kernel_type + use sci_w3_to_w2_average_kernel_mod, only: w3_to_w2_average_kernel_type use sci_w3_to_w2_correction_kernel_mod, & only: w3_to_w2_correction_kernel_type use timing_mod, only: start_timing, stop_timing, & @@ -238,8 +239,6 @@ contains type( field_type ) :: r_u type( field_type ) :: u_broken type( field_type ) :: u_lat_w2, u_lon_w2, u_up_w2 - type( field_type ) :: u_lat_large, u_lon_large - type( field_type ) :: u_correction type( field_type ), pointer :: rmultiplicity_w2 type( field_type ), pointer :: displacement type( field_type ), pointer :: chi(:) @@ -247,7 +246,6 @@ contains type( operator_type ), pointer :: u_lon_map type( operator_type ), pointer :: u_lat_map type( operator_type ), pointer :: u_up_map - type( function_space_type ), pointer :: w2_fs type( function_space_type ), pointer :: w2b_fs type( mesh_type ), pointer :: mesh @@ -257,7 +255,44 @@ contains mesh => u%get_mesh() - if (sample_physics_winds) then + if (sample_physics_winds .and. sample_physics_winds_correction) then + + chi => get_coordinates(mesh%get_id()) + rmultiplicity_w2 => get_rmultiplicity_fv(W2, mesh%get_id()) + panel_id => get_panel_id(mesh%get_id()) + call u_lon_w2%initialise( u%get_function_space() ) + call u_lat_w2%initialise( u%get_function_space() ) + call u_up_w2%initialise( u%get_function_space() ) + + call invoke( setval_c(u_lon_w2, 0.0_r_def), & + setval_c(u_lat_w2, 0.0_r_def), & + setval_c(u_up_w2, 0.0_r_def), & + w3_to_w2_average_kernel_type(u_lon_w2, u_lon, & + rmultiplicity_w2), & + w3_to_w2_average_kernel_type(u_lat_w2, u_lat, & + rmultiplicity_w2), & + w3_to_w2_average_kernel_type(u_up_w2, u_up, & + rmultiplicity_w2) ) + + ! Apply correction + if (geometry == geometry_spherical .and. topology == topology_fully_periodic) then + displacement => get_w3_to_w2_displacement(mesh%get_id()) + ! Correct horizontal winds + ! Vertical wind not needed for horizontal W2 DoFs, so don't correct + call invoke( w3_to_w2_correction_kernel_type(u_lon_w2, u_lon, 1, & + displacement, & + panel_id, 1), & + w3_to_w2_correction_kernel_type(u_lat_w2, u_lat, 1, & + displacement, & + panel_id, 1) ) + end if + + ! Convert from physical wind components into computational wind + call invoke( convert_phys_to_hdiv_kernel_type(u, u_lon_w2, u_lat_w2, & + u_up_w2, chi, panel_id, & + geometry) ) + + else if (sample_physics_winds) then w2b_fs => function_space_collection%get_fs(mesh, 0, 0, W2broken) rmultiplicity_w2 => get_rmultiplicity_fv(W2, mesh%get_id()) @@ -274,44 +309,6 @@ contains dg_inc_matrix_vector_kernel_type(u_broken, u_up, u_up_map), & average_w2b_to_w2_kernel_type(u, u_broken, rmultiplicity_w2) ) - if (sample_physics_winds_correction & - .and. geometry == geometry_spherical & - .and. topology == topology_fully_periodic) then - - w2_fs => u%get_function_space() - call u_lon_w2%initialise( w2_fs ) - call u_lat_w2%initialise( w2_fs ) - call u_up_w2%initialise( w2_fs ) - call u_correction%initialise( w2_fs ) - call u_lon_large%initialise( u_lon%get_function_space(), halo_depth=2 ) - call u_lat_large%initialise( u_lat%get_function_space(), halo_depth=2 ) - - displacement => get_w3_to_w2_displacement(mesh%get_id()) - chi => get_coordinates(mesh%get_id()) - panel_id => get_panel_id(mesh%get_id()) - - call invoke( setval_c(u_lon_w2, 0.0_r_def), & - setval_c(u_lat_w2, 0.0_r_def), & - setval_c(u_up_w2, 0.0_r_def), & - ! Copy u_lon and u_lat to fields with appropriate depth - setval_X(u_lon_large, u_lon), & - setval_X(u_lat_large, u_lat), & - ! Correct horizontal wind components (but not vertical) - w3_to_w2_correction_kernel_type(u_lon_w2, u_lon_large, 1, & - displacement, & - panel_id, 1), & - w3_to_w2_correction_kernel_type(u_lat_w2, u_lat_large, 1, & - displacement, & - panel_id, 1), & - ! Convert components to HDiv field - convert_phys_to_hdiv_kernel_type(u_correction, & - u_lon_w2, u_lat_w2, & - u_up_w2, chi, panel_id, & - geometry), & - ! Increment wind with correction field - inc_X_plus_Y(u, u_correction) ) - end if - else call u%copy_field_properties(r_u) diff --git a/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 b/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 index f6523d797..52a55e1be 100644 --- a/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 +++ b/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 @@ -273,7 +273,7 @@ contains type( field_type ) :: conv_liquid_fraction, conv_frozen_fraction type( field_type ) :: conv_liquid_mmr, conv_frozen_mmr, conv_frozen_number ! ...for JULES & Boundary Layer - type( field_type ) :: recip_l_mo_sea, rhostar + type( field_type ) :: recip_l_mo_sea, rhostar, h_blend_orog type( field_type ) :: t1_sd_2d, q1_sd_2d ! ...for spectral GWD type( field_type ) :: du_spectral_gwd, dv_spectral_gwd @@ -847,14 +847,14 @@ contains turbulence_fields, convection_fields, cloud_fields, & surface_fields, soil_fields, snow_fields, & aerosol_fields, recip_l_mo_sea, rhostar, & - t1_sd_2d, q1_sd_2d) + h_blend_orog, t1_sd_2d, q1_sd_2d) call bl_exp_alg(theta, rho, exner, mr_n, & derived_fields, radiation_fields, & microphysics_fields, dmr_mphys, orography_fields, & turbulence_fields, convection_fields, cloud_fields, & surface_fields, & recip_l_mo_sea, rhostar, & - t1_sd_2d, q1_sd_2d, clock) + h_blend_orog, t1_sd_2d, q1_sd_2d, clock) end if !-------------------------------------------------------------------- diff --git a/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 b/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 index 63faab91c..2c3dd341b 100644 --- a/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 +++ b/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 @@ -116,17 +116,21 @@ contains use limited_area_constants_mod, only: get_mask_r_solver use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type use function_space_mod, only: function_space_type - use fs_continuity_mod, only: W2, W2h, W2v, W3, Wtheta, W2Hbroken + use fs_continuity_mod, only: W2, W2h, W2v, W3, Wtheta use function_space_collection_mod, only: function_space_collection - use apply_mixed_lu_operator_kernel_mod, only: apply_mixed_lu_operator_kernel_type + use apply_mixed_lu_operator_kernel_mod, & + only: apply_mixed_lu_operator_kernel_type + use apply_mixed_operator_kernel_mod, & + only: apply_mixed_operator_kernel_type use apply_elim_mixed_lp_operator_kernel_mod, & - only: apply_elim_mixed_lp_operator_kernel_type - use matrix_vector_kernel_mod, only: matrix_vector_kernel_type - use dg_inc_matrix_vector_kernel_mod, only: dg_inc_matrix_vector_kernel_type - use apply_mixed_u_operator_kernel_mod, only: apply_mixed_u_operator_kernel_type - use apply_mixed_wp_operator_kernel_mod, only: apply_mixed_wp_operator_kernel_type - use assemble_w2h_from_w2hb_kernel_mod, only: assemble_w2h_from_w2hb_kernel_type + only: apply_elim_mixed_lp_operator_kernel_type + use matrix_vector_kernel_mod, & + only: matrix_vector_kernel_type + use dg_inc_matrix_vector_kernel_mod, & + only: dg_inc_matrix_vector_kernel_type + use apply_mixed_operator_kernel_mod, & + only: apply_mixed_operator_kernel_type implicit none @@ -144,8 +148,7 @@ contains m2_diag type(r_solver_field_type) :: x_uvw, y_uvw type(function_space_type), pointer :: u_fs, & - t_fs, & - w2hb_fs + t_fs integer(i_def) :: p_h, p_v type(r_solver_field_type), pointer :: w2_mask, & w3_mask @@ -171,8 +174,6 @@ contains type(integer_field_type), pointer :: face_selector_ns integer(tik) :: id - type(r_solver_field_type) :: y_uv_broken - if ( LPROF ) call start_timing( id, 'mixed_solver.operator' ) ! Extract mesh ID @@ -224,8 +225,6 @@ contains xvec_w => x%get_field_from_position(isol_w) yvec_w => y%get_field_from_position(isol_w) end if - p_h = y%vector(isol_u)%get_element_order_h() - p_v = y%vector(isol_u)%get_element_order_v() ! Check if we can use the optimised operator setup optimised_operator = ( p2theta_vert .and. & @@ -237,6 +236,8 @@ contains if ( .not. optimised_operator ) then ! Create fields in 3D W2 space + p_h = y%vector(isol_u)%get_element_order_h() + p_v = y%vector(isol_u)%get_element_order_v() u_fs => function_space_collection%get_fs( mesh, p_h, p_v, W2 ) call x_uvw%initialise( vector_space = u_fs ) @@ -256,28 +257,13 @@ contains case ( eliminate_variables_discrete ) q32_op => get_eliminated_q32() if ( optimised_operator ) then - ! Compute the lhs of mixed operator in two steps: - ! 1) Compute the horizontal wind lhs (yvec_uv), this is done in the broken W2 - ! space to avoid having to halo exchange the input fields. After computation of - ! the broken W2 lhs the continuous W2 lhs is computed which only requires a single - ! halo exchange. - ! 2) Compute the vertical wind (yvec_w) & pressure (yvec_p) lhs, since these - ! are horizontally discontinuous fields then there are no further halo exchanges required. - - ! Create broken y_uv - w2hb_fs => function_space_collection%get_fs(mesh, p_h, p_v, W2Hbroken) - call y_uv_broken%initialise( w2hb_fs ) - call invoke( name="apply_split_mixed_operator", & - apply_mixed_u_operator_kernel_type( y_uv_broken, & - xvec_uv, xvec_w, xvec_p, & - mm_vel, div_star, m2_diag ), & - setval_c( yvec_uv, 0.0_r_solver ), & - assemble_w2h_from_w2hb_kernel_type(yvec_uv, y_uv_broken), & - apply_mixed_wp_operator_kernel_type( yvec_w, yvec_p, & - xvec_uv, xvec_w, xvec_p, & - ptheta2, mt_lumped_inv, & - mm_vel, p2theta, div_star, m2_diag, & - m3_exner_star, q32_op, p3theta ) ) + call invoke( name="apply_mixed_operator_new", & + setval_c( yvec_uv, 0.0_r_solver ), & + apply_mixed_operator_kernel_type( yvec_uv, yvec_w, yvec_p, & + xvec_uv, xvec_w, xvec_p, & + ptheta2, mt_lumped_inv, & + mm_vel, p2theta, div_star, m2_diag, & + m3_exner_star, q32_op, p3theta ) ) else ! Create theta' field t_fs => function_space_collection%get_fs( mesh, p_h, p_v, Wtheta ) diff --git a/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 b/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 index 70072ae47..7bb9237a3 100644 --- a/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 +++ b/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 @@ -455,7 +455,6 @@ contains exner_inc type(r_solver_field_type), target :: dummy_field - type(r_solver_field_type), target :: uvw_norm integer(tik) :: id if ( LPROF ) call start_timing( id, 'schur_precon.back_sub' ) @@ -480,13 +479,11 @@ contains call dummy_field%initialise( vector_space = self%rhs_u%get_function_space() ) w2_mask => dummy_field end if - call uvw_norm%initialise( vector_space = self%rhs_u%get_function_space() ) call invoke( name = "compute_split_increments", & - X_times_Y(uvw_norm, u_normalisation, Hb_lumped_inv), & setval_c(state_uv, 0.0_r_solver), & schur_backsub_kernel_type( state_uv, state_w, self%rhs_u, & exner_inc, div_star, & - uvw_norm, & + u_normalisation, Hb_lumped_inv, & limited_area, w2_mask ) ) else call u_inc%initialise( vector_space = self%rhs_u%get_function_space() ) diff --git a/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 b/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 index dc382d042..040758fdd 100644 --- a/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/end_of_transport_step_alg_mod.x90 @@ -822,7 +822,6 @@ contains ! General case for any splitting else - call sum_hori_flux%initialise(w2h_fs) call sum_vert_flux%initialise(w2v_fs) diff --git a/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 b/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 index ea01e52fe..528d5b2fd 100644 --- a/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 @@ -16,6 +16,7 @@ module remap_on_extended_mesh_alg_mod use psykal_lite_transport_mod, only: invoke_remap_on_extended_mesh_kernel_type use timing_mod, only: start_timing, stop_timing, tik, LPROF use function_space_mod, only: function_space_type + use check_configuration_mod, only: get_required_stencil_depth use transport_constants_mod, only: get_extended_mesh_weights, & get_extended_mesh_indices, & ext_mesh_stencil_depth @@ -75,7 +76,7 @@ contains ndata = fs%get_ndata() ! Ensure remapping depth is not larger than the halo depth - depth = min( depth_in, mesh%get_halo_depth() ) + depth = min( depth_in, get_required_stencil_depth() ) ! Both the field to be remapped and the remapped field need to be ! created with the full size halo. For the field to be remapped ! this is due to the interpolation parallel to a panel boundary diff --git a/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 b/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 index b40c2cc84..6e7dbe6a6 100644 --- a/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/transport_counter_mod.x90 @@ -40,7 +40,6 @@ module transport_counter_mod contains procedure, public :: initialise - procedure, public :: adj_initialise procedure, public :: get_field_n procedure, public :: set_field_n procedure, public :: get_flux @@ -52,7 +51,6 @@ module transport_counter_mod procedure, public :: get_num_split_steps_per_substep procedure, public :: get_dt_substep procedure, public :: get_outer_iteration - procedure, public :: dec_split_step_counter procedure, public :: inc_split_step_counter procedure, public :: inc_substep_counter procedure, public :: apply_cheap_update @@ -100,69 +98,17 @@ contains self%split_step_of_substep_counter = 1 self%substep_counter = 1 - equation_form = transport_metadata%get_equation_form() - - ! Allocate arrays for dry fields - if (equation_form == equation_form_conservative & - .or. equation_form == equation_form_consistent) then - if ( .not. allocated(self%flux)) then - allocate(self%flux(self%num_split_steps_per_substep-1)) - end if - end if - - end subroutine initialise - - !> @brief Initialises the transport_counter object, allocating flux fields - !! if necessary, ready for the adjoint model simulation - !> @details This is the same as initialise, but it prepares the code to be - !! run in reverse order, with the counter decreasing instead of - !! increasing. - !> @param[in] transport_metadata Object containing metadata describing - !! the options for transporting a variable - !> @param[in] dt_substep The time interval for a single substep - !> @param[in] num_substeps The number of total transport substeps to be - !! performed - !> @param[in] outer Optional, current iteration of the outer - !! loop of the semi-implicit time step - subroutine adj_initialise(self, transport_metadata, dt_substep, num_substeps, outer) - - implicit none - - class(transport_counter_type), intent(inout) :: self - type(transport_metadata_type), intent(in) :: transport_metadata - real(kind=r_tran), intent(in) :: dt_substep - integer(kind=i_def), intent(in) :: num_substeps - integer(kind=i_def), optional, intent(in) :: outer - - integer(kind=i_def) :: equation_form - - self%dt_substep = dt_substep - self%num_substeps = num_substeps - self%num_split_steps_per_substep = get_num_split_steps(transport_metadata%get_splitting()) - self%num_split_steps_per_whole_step = self%num_substeps * self%num_split_steps_per_substep - - if (present(outer)) then - self%outer = outer - else - self%outer = 0 - end if - - ! Initialise step counters to the last values (NOT 1) - self%split_step_of_whole_step_counter = self%num_split_steps_per_whole_step - self%split_step_of_substep_counter = self%num_split_steps_per_substep - self%substep_counter = num_substeps + if (allocated(self%flux)) deallocate(self%flux) equation_form = transport_metadata%get_equation_form() ! Allocate arrays for dry fields if (equation_form == equation_form_conservative & - .or. equation_form == equation_form_consistent) then - if ( .not. allocated(self%flux)) then - allocate(self%flux(self%num_split_steps_per_substep-1)) - end if + .or. equation_form == equation_form_consistent) then + allocate(self%flux(self%num_split_steps_per_substep-1)) end if - end subroutine adj_initialise + end subroutine initialise !> Public finalise method for the transport_counter subroutine finalise(self) @@ -368,18 +314,6 @@ contains ! ============================================================================ ! ! UTILITIES ! ============================================================================ ! - !> @brief Decreases the counter of transport split steps (for adjoint model) - subroutine dec_split_step_counter(self) - - implicit none - - class(transport_counter_type), target, intent(inout) :: self - - self%split_step_of_substep_counter = self%split_step_of_substep_counter - 1 - self%split_step_of_whole_step_counter = self%split_step_of_whole_step_counter - 1 - - end subroutine dec_split_step_counter - !> @brief Increments the counter of transport split steps subroutine inc_split_step_counter(self) diff --git a/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 b/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 index 03026c745..6b0e596f2 100644 --- a/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 +++ b/science/gungho/source/algorithm/transport/common/transport_metadata_mod.F90 @@ -408,11 +408,7 @@ end function get_ffsl_vertical_order !> @param[in] adaptive_splitting Whether to use adaptive splitting. If !! true, sets the splitting to the splitting argument. !> @param[in] splitting The splitting to use if adaptive_splitting is true - !> @param[in] make_tracers_advective Whether to set the equation form to be - !! advective when unable to compute departure points - !! for consistent tracers - subroutine update_metadata(self, outer, adaptive_splitting, splitting, & - make_tracers_advective) + subroutine update_metadata(self, outer, adaptive_splitting, splitting) use timestepping_config_mod, only: outer_iterations use transport_config_mod, only: si_outer_transport, & @@ -423,7 +419,6 @@ subroutine update_metadata(self, outer, adaptive_splitting, splitting, & dry_field_name use transport_enumerated_types_mod, & only: equation_form_advective, & - equation_form_consistent, & split_method_ffsl, & split_method_sl, & monotone_qm_pos, & @@ -436,7 +431,6 @@ subroutine update_metadata(self, outer, adaptive_splitting, splitting, & integer(kind=i_def), intent(in) :: outer logical(kind=l_def), intent(in) :: adaptive_splitting integer(kind=i_def), intent(in) :: splitting - logical(kind=l_def), intent(in) :: make_tracers_advective if (si_outer_transport /= si_outer_transport_none & .and. outer < outer_iterations & @@ -476,12 +470,6 @@ subroutine update_metadata(self, outer, adaptive_splitting, splitting, & self%splitting = splitting end if - if ( make_tracers_advective .and. & - self%equation_form == equation_form_consistent ) then - ! Set equation form to be advective - self%equation_form = equation_form_advective - end if - end subroutine update_metadata !> @brief Reset the metadata to its original values diff --git a/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 b/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 index f5a29f696..6fe09d586 100644 --- a/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 +++ b/science/gungho/source/algorithm/transport/control/transport_controller_mod.x90 @@ -79,7 +79,6 @@ module transport_controller_mod integer(kind=i_def) :: outer logical(kind=l_def) :: cheap_update_step = .false. logical(kind=l_def) :: adaptive_splitting = .false. - logical(kind=l_def) :: make_tracers_advective = .false. integer(kind=i_def) :: reference_splitting = IMDI integer(kind=i_def) :: max_courant_num = 0 logical(kind=l_def) :: dep_stencil_extent_computed = .false. @@ -506,7 +505,6 @@ contains self%outer_set = .false. self%cheap_update_step = .false. self%adaptive_splitting = .false. - self%make_tracers_advective = .false. self%reference_splitting = IMDI self%dep_stencil_extent_computed = .false. call self%counter%finalise() @@ -536,7 +534,6 @@ contains use transport_config_mod, only: ffsl_unity_3d, & adjust_vhv_wind, & - adjust_tracer_equation, & substep_transport, & substep_transport_two, & substep_transport_four, & @@ -663,34 +660,23 @@ contains LOG_LEVEL_WARNING & ) - if (adjust_tracer_equation) then - ! Use advective form for tracer transport instead of consistent form - call log_event( & - 'Reference field for tracer transport is negative, so ' // & - 'making all tracers advective for this step. This will ' // & - 'make tracer transport non-conservative. ', LOG_LEVEL_INFO & - ) - self%make_tracers_advective = .true. - else - ! Fail gracefully - call log_event( & - 'The Watkins algorithm failed to keep all reference fields ' // & - 'positive for the transport of tracers. This makes it ' // & - 'impossible to find sensible departure distances for (Flux ' // & - 'Form) Semi-Lagrangian transport. Stopping now to fail ' // & - 'gracefully.' // NEW_LINE('A') // NEW_LINE('A') // & - 'This is a common way for the model to fail. Most likely ' // & - 'the transporting wind passed to the transport scheme has ' // & - 'some unphysical values, and the corresponding maximum ' // & - 'Lipschitz number exceeds 1 somewhere, so check these ' // & - 'values in the log above, which may also indicate the ' // & - 'geographical location of the issue.' // & - NEW_LINE('A') // NEW_LINE('A') // & - 'If this failure has occurred in the first timestep, it can ' // & - 'signify issues with the initial conditions or ancillaries.', & - LOG_LEVEL_ERROR & - ) - end if + call log_event( & + 'The Watkins algorithm failed to keep all reference fields ' // & + 'positive for the transport of tracers. This makes it ' // & + 'impossible to find sensible departure distances for (Flux ' // & + 'Form) Semi-Lagrangian transport. Stopping now to fail ' // & + 'gracefully.' // NEW_LINE('A') // NEW_LINE('A') // & + 'This is a common way for the model to fail. Most likely the ' // & + 'transporting wind passed to the transport scheme has some ' // & + 'unphysical values, and the corresponding maximum Lipschitz ' // & + 'number exceeds 1 somewhere, so check these values in the log ' // & + 'above, which may also indicate the geographical location of ' // & + 'the issue.' // & + NEW_LINE('A') // NEW_LINE('A') // & + 'If this failure has occurred in the first timestep, it can ' // & + 'signify issues with the initial conditions or ancillaries.', & + LOG_LEVEL_ERROR & + ) end if else @@ -724,8 +710,7 @@ contains ! Initialise counter if (self%outer_set) then call self%metadata%update_metadata( & - self%outer, self%adaptive_splitting, self%reference_splitting, & - self%make_tracers_Advective & + self%outer, self%adaptive_splitting, self%reference_splitting & ) call self%counter%initialise( & self%metadata, self%dt_substep, self%num_substeps, self%outer & diff --git a/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 b/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 index 52b693976..7fc12fc08 100644 --- a/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 @@ -75,7 +75,6 @@ module ffsl_hori_alg_mod transport_overwrite_freq_all use check_configuration_mod, only: check_any_eqn_consistent, & get_required_stencil_depth - use io_config_mod, only: subroutine_timers use transport_config_mod, only: & panel_edge_treatment, & panel_edge_treatment_extended_mesh, & @@ -431,7 +430,7 @@ contains remap_depth) else call field_big_halo%initialise( field_n%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth=get_required_stencil_depth() ) call invoke( setval_x(field_big_halo, field_n) ) end if ! Copy required as PSyclone doesn't allow the same field to be @@ -716,7 +715,7 @@ contains remap_depth) else call field_big_halo%initialise( field_n%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth=get_required_stencil_depth() ) call invoke( setval_x(field_big_halo, field_n) ) end if @@ -1075,8 +1074,8 @@ contains transport_metadata%get_min_value(), & remap_depth) else - call field_x_big_halo%initialise(field_fs, halo_depth=mesh%get_halo_depth()) - call field_y_big_halo%initialise(field_fs, halo_depth=mesh%get_halo_depth()) + call field_x_big_halo%initialise(field_fs, halo_depth=get_required_stencil_depth()) + call field_y_big_halo%initialise(field_fs, halo_depth=get_required_stencil_depth()) call invoke( setval_x(field_x_big_halo, field_x), & setval_x(field_y_big_halo, field_y) ) end if diff --git a/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 b/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 index 6b9b9e537..4134b714c 100644 --- a/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 @@ -18,6 +18,7 @@ !! size as an integer argument. module reconstruct_w3_field_alg_mod + use check_configuration_mod, only: get_required_stencil_depth use sci_combine_multidata_field_kernel_mod, & only: combine_multidata_field_kernel_type use constants_mod, only: r_def, i_def, l_def, str_def @@ -196,7 +197,7 @@ contains ! Copy field to a large halo version call field_old_big_halo%initialise( field_old%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth = get_required_stencil_depth() ) call invoke( setval_X( field_old_big_halo, field_old ) ) monotone = (transport_metadata%get_horizontal_monotone() == monotone_koren) diff --git a/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 b/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 index 46b6b5fbc..fb258b55b 100644 --- a/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 @@ -18,6 +18,7 @@ !! size as an integer argument. module wt_advective_update_alg_mod + use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: r_def, i_def, l_def, str_def, & r_tran use sci_geometric_constants_mod, only: get_coordinates, & @@ -132,7 +133,7 @@ contains ! Copy field to a large halo version call field_big_halo%initialise( field%get_function_space(), & - halo_depth=mesh%get_halo_depth() ) + halo_depth = get_required_stencil_depth() ) call invoke( setval_X( field_big_halo, field ) ) ! Compute reconstruction on a Wtheta multidata field diff --git a/science/gungho/source/configuration/check_configuration_mod.F90 b/science/gungho/source/configuration/check_configuration_mod.F90 index e2a1e8e6e..86252a85a 100644 --- a/science/gungho/source/configuration/check_configuration_mod.F90 +++ b/science/gungho/source/configuration/check_configuration_mod.F90 @@ -6,7 +6,7 @@ module check_configuration_mod - use constants_mod, only: i_def, l_def, str_def + use constants_mod, only: i_def, l_def use mixing_config_mod, only: viscosity, & viscosity_mu use transport_config_mod, only: operators, & @@ -48,7 +48,7 @@ module check_configuration_mod substep_transport, & substep_transport_off, & adjust_vhv_wind, & - ffsl_unity_3d, & + ffsl_unity_3d, & wind_mono_top use transport_enumerated_types_mod, & only: scheme_mol_3d, & @@ -71,9 +71,6 @@ module check_configuration_mod monotone_qm_pos, & ffsl_splitting_swift, & ffsl_splitting_cosmic - use namelist_collection_mod, & - only : namelist_collection_type - use namelist_mod, only : namelist_type implicit none @@ -615,87 +612,31 @@ subroutine check_configuration(modeldb) end subroutine check_configuration - !> @brief Determine required stencil depth for the current configuration, - !! for each mesh. + !> @brief Determine required stencil depth for the current configuration. !> @details Depending on the choice of science schemes the required local !> mesh needs to support the anticipated stencils. This function !> returns required stencil depth that needs to be supported. - !> @param[in,out] stencil_depths Array of stencil depths for each base mesh - !> @param[in] base_mesh_names Array of base mesh names - !> @param[in] configuration The configuration object + !> @return stencil_depth + !> !=========================================================================== - subroutine get_required_stencil_depth(stencil_depths, base_mesh_names, configuration) + function get_required_stencil_depth() result(stencil_depth) implicit none - integer(kind=i_def), intent(inout) :: stencil_depths(:) - character(len=str_def), intent(in) :: base_mesh_names(:) - type(namelist_collection_type), intent(in) :: configuration - - - integer(kind=i_def) :: i - integer(kind=i_def) :: transport_depth, sl_depth - integer(kind=i_def) :: special_edge_pts + integer(kind=i_def) :: stencil_depth + integer(kind=i_def) :: sl_depth, special_edge_pts logical(kind=l_def) :: any_horz_dep_pts - ! Configuration variables - type(namelist_type), pointer :: base_mesh_nml - type(namelist_type), pointer :: formulation_nml - type(namelist_type), pointer :: multires_coupling_nml - type(namelist_type), pointer :: transport_nml - character(len=str_def) :: prime_mesh_name - character(len=str_def) :: aerosol_mesh_name - logical(kind=l_def) :: use_multires_coupling - logical(kind=l_def) :: coarse_aerosol_transport - integer(kind=i_def) :: operators - integer(kind=i_def) :: fv_horizontal_order - integer(kind=i_def) :: panel_edge_treatment - logical(kind=l_def) :: panel_edge_high_order - integer(kind=i_def) :: dep_pt_stencil_extent - integer(kind=i_def) :: ffsl_inner_order - integer(kind=i_def) :: ffsl_outer_order - - ! ------------------------------------------------------------------------ ! - ! Get configuration variables - ! ------------------------------------------------------------------------ ! - - base_mesh_nml => configuration%get_namelist('base_mesh') - formulation_nml => configuration%get_namelist('formulation') - transport_nml => configuration%get_namelist('transport') - - call base_mesh_nml%get_value('prime_mesh_name', prime_mesh_name) - call formulation_nml%get_value('use_multires_coupling', use_multires_coupling) - call transport_nml%get_value('operators', operators) - call transport_nml%get_value('fv_horizontal_order', fv_horizontal_order) - call transport_nml%get_value('panel_edge_treatment', panel_edge_treatment) - call transport_nml%get_value('panel_edge_high_order', panel_edge_high_order) - call transport_nml%get_value('dep_pt_stencil_extent', dep_pt_stencil_extent) - call transport_nml%get_value('ffsl_inner_order', ffsl_inner_order) - call transport_nml%get_value('ffsl_outer_order', ffsl_outer_order) - if (use_multires_coupling) then - multires_coupling_nml => configuration%get_namelist('multires_coupling') - call multires_coupling_nml%get_value('aerosol_mesh_name', aerosol_mesh_name) - call multires_coupling_nml%get_value('coarse_aerosol_transport', coarse_aerosol_transport) - end if - - ! ------------------------------------------------------------------------ ! - ! Set default depth - ! ------------------------------------------------------------------------ ! - - transport_depth = 2 + stencil_depth = 2 if (operators == operators_fv) then ! Need larger halos for fv operators - transport_depth = max( transport_depth, fv_horizontal_order/2 ) + stencil_depth = max( stencil_depth, fv_horizontal_order/2 ) end if - ! ------------------------------------------------------------------------ ! - ! Determine depth when using a semi-Lagrangian scheme - ! ------------------------------------------------------------------------ ! - any_horz_dep_pts = check_horz_dep_pts() - if (any_horz_dep_pts) then + if ( any_horz_dep_pts ) then ! When an SL scheme is used, the halo depth should be large enough to ! encompass the largest anticipated Courant number (effectively the ! departure distance in the SL scheme), plus any extra cells required for @@ -705,8 +646,8 @@ subroutine get_required_stencil_depth(stencil_depths, base_mesh_names, configura ! - the order of reconstruction ! - whether special edge treatment is used (this shifts the stencil by 1) - if (panel_edge_treatment == panel_edge_treatment_special_edges & - .AND. panel_edge_high_order) then + if ( panel_edge_treatment == panel_edge_treatment_special_edges & + .AND. panel_edge_high_order ) then special_edge_pts = 1 else special_edge_pts = 0 @@ -718,39 +659,18 @@ subroutine get_required_stencil_depth(stencil_depths, base_mesh_names, configura + special_edge_pts & ! special edge treatment ) - if (panel_edge_treatment == panel_edge_treatment_remapping) then - if (panel_edge_high_order) then - transport_depth = max( sl_depth, 3 ) + if ( panel_edge_treatment == panel_edge_treatment_remapping ) then + if ( panel_edge_high_order ) then + sl_depth = max( sl_depth, 3 ) else sl_depth = max( sl_depth, 2 ) end if end if - transport_depth = max( transport_depth, sl_depth ) + stencil_depth = max( stencil_depth, sl_depth ) end if - ! ------------------------------------------------------------------------ ! - ! Set depth for each mesh - ! ------------------------------------------------------------------------ ! - - ! Loop through meshes to determine whether transport takes place on it - do i = 1, size(base_mesh_names) - if (trim(base_mesh_names(i)) == trim(prime_mesh_name)) then - ! Assume transport always occurs on prime mesh - stencil_depths(i) = transport_depth - - else if (use_multires_coupling .and. coarse_aerosol_transport .and. & - trim(base_mesh_names(i)) == trim(aerosol_mesh_name)) then - ! Coarse mesh transport for aerosols - stencil_depths(i) = transport_depth - - else - ! No transport on this mesh, so set stencil depth to 2 - stencil_depths(i) = 2 - end if - end do - - end subroutine get_required_stencil_depth + end function get_required_stencil_depth !> @brief Determine whether any of the transport schemes are MoL !> @details Loops through the transport schemes specified for different diff --git a/science/gungho/source/diagnostics/diagnostics_io_mod.x90 b/science/gungho/source/diagnostics/diagnostics_io_mod.x90 index 2b3c5dcec..ad2f7737a 100755 --- a/science/gungho/source/diagnostics/diagnostics_io_mod.x90 +++ b/science/gungho/source/diagnostics/diagnostics_io_mod.x90 @@ -17,7 +17,6 @@ module diagnostics_io_mod scalar_nodal_diagnostic_alg, & scalar_ugrid_diagnostic_alg, & vector_nodal_diagnostic_alg - use initialise_diagnostics_mod, only: diagnostic_to_be_sampled use io_config_mod, only: use_xios_io, write_fluxes use files_config_mod, only: diag_stem_name use function_space_collection_mod, only: function_space_collection @@ -140,13 +139,9 @@ subroutine write_scalar_diagnostic( field_name, field, & ! Check if we need to write an initial field if (clock%is_initialisation()) then - if (diagnostic_to_be_sampled(trim('init_'//field_name))) then - call output_field(1)%write_field(trim('init_'//field_name)) - end if + call output_field(1)%write_field(trim('init_'//field_name)) else - if (diagnostic_to_be_sampled(trim(field_name))) then - call output_field(1)%write_field(trim(field_name)) - end if + call output_field(1)%write_field(trim(field_name)) end if nullify(tmp_write_ptr) @@ -313,47 +308,23 @@ subroutine write_vector_diagnostic( field_name, field, & if (clock%is_initialisation()) then if (field_name == 'u') then - if (diagnostic_to_be_sampled("init_u_in_w2h")) then - call u1_wind%write_field("init_u_in_w2h") - end if - if (diagnostic_to_be_sampled("init_v_in_w2h")) then - call u2_wind%write_field("init_v_in_w2h") - end if - if (diagnostic_to_be_sampled("init_w_in_wth")) then - call u3_wind%write_field("init_w_in_wth") - end if + call u1_wind%write_field("init_u_in_w2h") + call u2_wind%write_field("init_v_in_w2h") + call u3_wind%write_field("init_w_in_wth") else - if (diagnostic_to_be_sampled(trim(field_name)//"1")) then - call u1_wind%write_field("init_"//trim(field_name)//"1") - end if - if (diagnostic_to_be_sampled(trim(field_name)//"2")) then - call u2_wind%write_field("init_"//trim(field_name)//"2") - end if - if (diagnostic_to_be_sampled(trim(field_name)//"3")) then - call u3_wind%write_field("init_"//trim(field_name)//"3") - end if + call u1_wind%write_field("init_"//trim(field_name)//"1") + call u2_wind%write_field("init_"//trim(field_name)//"2") + call u3_wind%write_field("init_"//trim(field_name)//"3") end if else if (field_name == 'u') then - if (diagnostic_to_be_sampled("u_in_w2h")) then - call u1_wind%write_field("u_in_w2h") - end if - if (diagnostic_to_be_sampled("v_in_w2h")) then - call u2_wind%write_field("v_in_w2h") - end if - if (diagnostic_to_be_sampled("w_in_wth")) then - call u3_wind%write_field("w_in_wth") - end if + call u1_wind%write_field("u_in_w2h") + call u2_wind%write_field("v_in_w2h") + call u3_wind%write_field("w_in_wth") else - if (diagnostic_to_be_sampled(trim(field_name)//"1")) then - call u1_wind%write_field(trim(field_name)//"1") - end if - if (diagnostic_to_be_sampled(trim(field_name)//"2")) then - call u2_wind%write_field(trim(field_name)//"2") - end if - if (diagnostic_to_be_sampled(trim(field_name)//"3")) then - call u3_wind%write_field(trim(field_name)//"3") - end if + call u1_wind%write_field(trim(field_name)//"1") + call u2_wind%write_field(trim(field_name)//"2") + call u3_wind%write_field(trim(field_name)//"3") end if end if diff --git a/science/gungho/source/driver/create_physics_prognostics_mod.F90 b/science/gungho/source/driver/create_physics_prognostics_mod.F90 index a7f803c43..649d501bd 100644 --- a/science/gungho/source/driver/create_physics_prognostics_mod.F90 +++ b/science/gungho/source/driver/create_physics_prognostics_mod.F90 @@ -42,7 +42,6 @@ module create_physics_prognostics_mod topography_horizon, & n_horiz_layer, n_horiz_ang, & l_inc_radstep - use cosp_config_mod, only : l_cosp, n_cosp_step use aerosol_config_mod, only : glomap_mode, & glomap_mode_climatology, & glomap_mode_dust_and_clim, & @@ -472,38 +471,6 @@ subroutine process_physics_prognostics(processor) call processor%apply(make_spec('aer_lw_asymmetry', main%radiation, & ckp=checkpoint_flag)) - ! Fields which need checkpointing for time sampling of COSP diagnostics. - ! Checkpoint unless both the first timestep of this run and the - ! first timestep of the next run are COSP timesteps - if (l_cosp) then - checkpoint_flag = & - mod(clock%get_first_step()-1, n_cosp_step) /= 0 .or. & - mod(clock%get_last_step(), n_cosp_step) /= 0 - - if (checkpoint_read .or. init_option == init_option_checkpoint_dump) then - ! If the first timestep of this run IS a COSP timestep, but the - ! first timestep of the next run IS NOT, then checkpoint_flag - ! must be false to allow model to start running, as the COSP - ! prognostics will not be in the initial dump - if (mod(clock%get_first_step()-1, n_cosp_step) == 0 .and. & - mod(clock%get_last_step(), n_cosp_step) /= 0) then - checkpoint_flag = .false. - if (checkpoint_write) then - call log_event('Danger: start of this run is a COSP ' // & - 'timestep, but start of next run is not. ' // & - 'Written dump will be incomplete. Next run ' // & - 'must start with a COSP timestep', & - LOG_LEVEL_WARNING) - end if - endif - end if - else - checkpoint_flag = .false. - end if - - call processor%apply(make_spec('lit_fraction_cosp', main%radiation, & - W3, twod=.true., ckp=checkpoint_flag)) - !======================================================================== ! Fields owned by the microphysics scheme !======================================================================== @@ -1522,7 +1489,7 @@ subroutine process_physics_prognostics(processor) ! Fields owned by the aerosol scheme !======================================================================== - ! Flags for some 2D and 3D fields + ! 2D fields, might need checkpointing if ( aerosol == aerosol_um .and. glomap_mode == glomap_mode_ukca ) then checkpoint_flag = .true. checkpoint_GC3 = (emissions == emissions_GC3) @@ -1534,7 +1501,6 @@ subroutine process_physics_prognostics(processor) checkpoint_GC5 = .false. is_empty = .true. end if - ! 2D fields, might need checkpointing if ( aerosol == aerosol_um .and. & ( glomap_mode == glomap_mode_ukca .or. & glomap_mode == glomap_mode_dust_and_clim ) ) then @@ -1567,11 +1533,15 @@ subroutine process_physics_prognostics(processor) call processor%apply(make_spec('surf_wetness', main%aerosol, & empty=is_empty, ckp=checkpoint_flag)) end if + call processor%apply(make_spec('soil_clay', main%aerosol, & + ckp=checkpoint_flag)) + call processor%apply(make_spec('soil_sand', main%aerosol, & + ckp=checkpoint_flag)) - ! 3D fields, might need checkpointing - flags set above if ( aerosol == aerosol_um .and. & ( glomap_mode == glomap_mode_ukca .or. & glomap_mode == glomap_mode_dust_and_clim ) ) then + ! 3D fields, might need checkpointing call processor%apply(make_spec('emiss_bc_biomass', main%aerosol, & empty=is_empty, ckp=checkpoint_GC3)) call processor%apply(make_spec('emiss_om_biomass', main%aerosol, & @@ -1580,19 +1550,6 @@ subroutine process_physics_prognostics(processor) empty=is_empty, ckp=checkpoint_flag)) end if - ! Flags for more 2D fields - if (aerosol == aerosol_um .and. (glomap_mode == glomap_mode_ukca .or. & - glomap_mode == glomap_mode_dust_and_clim )) then - checkpoint_flag = .true. - else - checkpoint_flag = .false. - end if - - call processor%apply(make_spec('soil_clay', main%aerosol, & - ckp=checkpoint_flag)) - call processor%apply(make_spec('soil_sand', main%aerosol, & - ckp=checkpoint_flag)) - ! 3D fields, might need checkpointing and/or advecting ! Nucleation mode is only used with UKCA if ( aerosol == aerosol_um .and. glomap_mode == glomap_mode_ukca ) then @@ -1819,13 +1776,8 @@ subroutine process_physics_prognostics(processor) end if ! Fields on dust space, might need checkpointing - if (aerosol == aerosol_um .and. (glomap_mode == glomap_mode_ukca .or. & - glomap_mode == glomap_mode_dust_and_clim )) then - checkpoint_flag = .true. - else - checkpoint_flag = .false. - end if - + ! vector_space => function_space_collection%get_fs(twod_mesh, 0, 0, W3, + ! get_ndata_val('dust_divisions')) call processor%apply(make_spec('dust_mrel', main%aerosol, & ckp=checkpoint_flag)) diff --git a/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 b/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 index 1bfca57a2..aff34838f 100644 --- a/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 +++ b/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 @@ -14,14 +14,14 @@ module gungho_diagnostics_driver_mod use constants_mod, only : i_def, r_def, str_def use boundaries_config_mod, only : limited_area, output_lbcs - use diagnostic_alg_mod, only : column_total_diagnostics_alg, & - calc_wbig_diagnostic_alg, & + use diagnostic_alg_mod, only : column_total_diagnostics_alg, & + calc_wbig_diagnostic_alg, & pressure_diag_alg - use diagnostics_io_mod, only : write_scalar_diagnostic, & + use diagnostics_io_mod, only : write_scalar_diagnostic, & write_vector_diagnostic - use diagnostics_calc_mod, only : write_divergence_diagnostic, & - write_hydbal_diagnostic, & - write_vorticity_diagnostic, & + use diagnostics_calc_mod, only : write_divergence_diagnostic, & + write_hydbal_diagnostic, & + write_vorticity_diagnostic, & write_pv_diagnostic use initialise_diagnostics_mod, only : diagnostic_to_be_sampled use field_array_mod, only : field_array_type @@ -32,22 +32,22 @@ module gungho_diagnostics_driver_mod use field_parent_mod, only : field_parent_type, write_interface use io_value_mod, only : io_value_type, get_io_value use lfric_xios_write_mod, only : write_field_generic - use formulation_config_mod, only : use_physics, & - moisture_formulation, & + use formulation_config_mod, only : use_physics, & + moisture_formulation, & moisture_formulation_dry - use fs_continuity_mod, only : W3, Wtheta, W2H, W0 + use fs_continuity_mod, only : W3, Wtheta use integer_field_mod, only : integer_field_type - use initialization_config_mod, only : ls_option, & - ls_option_analytic, & + use initialization_config_mod, only : ls_option, & + ls_option_analytic, & ls_option_file use mesh_mod, only : mesh_type use moist_dyn_mod, only : num_moist_factors use mr_indices_mod, only : nummr, mr_names - use log_mod, only : log_event, & + use log_mod, only : log_event, & LOG_LEVEL_DEBUG - use sci_geometric_constants_mod, & - only : get_panel_id, & - get_height_fe, get_da_msl_proj + use sci_geometric_constants_mod, & + only : get_panel_id, get_height_fe, & + get_height_fv, get_da_msl_proj use io_config_mod, only : use_xios_io, write_fluxes use timer_mod, only : timer use timing_mod, only : start_timing, stop_timing, tik, LPROF @@ -87,56 +87,58 @@ subroutine gungho_diagnostics_driver( modeldb, & type(mesh_type), intent(in), pointer :: twod_mesh logical, intent(in) :: nodal_output_on_w3 - type(field_collection_type), pointer :: prognostic_fields - type(field_collection_type), pointer :: con_tracer_last_outer - type(field_collection_type), pointer :: lbc_fields - type(field_collection_type), pointer :: moisture_fields - type(field_type), pointer :: mr(:) - type(field_type), pointer :: moist_dyn(:) - type(field_collection_type), pointer :: derived_fields - - type(field_type), pointer :: theta - type(field_type), pointer :: u - type(field_type), pointer :: h_u - type(field_type), pointer :: v_u - type(field_type), pointer :: rho - type(field_type), pointer :: exner - type(field_type), pointer :: panel_id - type(field_type), pointer :: height - type(field_type), pointer :: lbc_u - type(field_type), pointer :: lbc_theta - type(field_type), pointer :: lbc_rho - type(field_type), pointer :: lbc_exner - type(field_type), pointer :: lbc_m_v - type(field_type), pointer :: lbc_q - type(field_type), pointer :: u_in_w2h - type(field_type), pointer :: v_in_w2h - type(field_type), pointer :: w_in_wth - type(field_type), pointer :: ageofair - type(field_type), pointer :: exner_in_wth - type(field_type), pointer :: dA - - type(field_array_type), pointer :: mr_array - type(field_array_type), pointer :: moist_dyn_array + type( field_collection_type ), pointer :: prognostic_fields => null() + type( field_collection_type ), pointer :: con_tracer_last_outer + type( field_collection_type ), pointer :: lbc_fields + type( field_collection_type ), pointer :: moisture_fields => null() + type( field_type ), pointer :: mr(:) => null() + type( field_type ), pointer :: moist_dyn(:) => null() + type( field_collection_type ), pointer :: derived_fields + + type( field_type), pointer :: theta => null() + type( field_type), pointer :: u => null() + type( field_type), pointer :: h_u => null() + type( field_type), pointer :: v_u => null() + type( field_type), pointer :: rho => null() + type( field_type), pointer :: exner => null() + type( field_type), pointer :: panel_id => null() + type( field_type), pointer :: height_w3 => null() + type( field_type), pointer :: height_wth => null() + type( field_type), pointer :: lbc_u => null() + type( field_type), pointer :: lbc_theta => null() + type( field_type), pointer :: lbc_rho => null() + type( field_type), pointer :: lbc_exner => null() + type( field_type), pointer :: lbc_m_v=> null() + type( field_type), pointer :: lbc_q=> null() + type( field_type), pointer :: u_in_w2h => null() + type( field_type), pointer :: v_in_w2h => null() + type( field_type), pointer :: w_in_wth => null() + type( field_type), pointer :: ageofair => null() + type( field_type), pointer :: exner_in_wth => null() + type( field_type), pointer :: dA => null() + + type(field_array_type), pointer :: mr_array => null() + type(field_array_type), pointer :: moist_dyn_array => null() ! Iterator for field collection type(field_collection_iterator_type) :: iterator ! A pointer used for retrieving fields from collections ! when iterating over them - class(field_parent_type), pointer :: field_ptr - procedure(write_interface), pointer :: tmp_write_ptr - type(io_value_type), pointer :: temp_corr_io_value + class( field_parent_type ), pointer :: field_ptr => null() - integer(kind=i_def) :: i, fs - integer(kind=tik) :: id - character(len=str_def) :: name, prefix, field_name + type(io_value_type), pointer :: temp_corr_io_value - integer(kind=i_def), allocatable :: fs_ids(:) - character(len=str_def), allocatable :: fs_names(:) + character(str_def) :: name - if ( LPROF ) call start_timing( id, 'gungho_diagnostics_driver' ) + integer :: fs + integer :: element_order_h, element_order_v + + procedure(write_interface), pointer :: tmp_write_ptr => null() + integer :: i + integer(tik) :: id + if ( LPROF ) call start_timing( id, 'gungho_diagnostics_driver' ) call log_event("Gungho: writing diagnostic output", LOG_LEVEL_DEBUG) ! Get pointers to field collections for use downstream @@ -159,6 +161,20 @@ subroutine gungho_diagnostics_driver( modeldb, & call prognostic_fields%get_field('rho', rho) call prognostic_fields%get_field('exner', exner) + ! Get element orders and get the finite element or finite volume height + element_order_h = theta%get_element_order_h() + element_order_v = theta%get_element_order_v() + + if (element_order_h > 0 .or. element_order_v > 0) then + ! Get the finite element height + height_w3 => get_height_fe(W3, mesh%get_id()) + height_wth => get_height_fe(Wtheta, mesh%get_id()) + else + ! Get the finite volume height + height_w3 => get_height_fv(W3, mesh%get_id()) + height_wth => get_height_fv(Wtheta, mesh%get_id()) + end if + ! Scalar fields call write_scalar_diagnostic('rho', rho, & modeldb%clock, mesh, nodal_output_on_w3) @@ -166,31 +182,10 @@ subroutine gungho_diagnostics_driver( modeldb, & modeldb%clock, mesh, nodal_output_on_w3) call write_scalar_diagnostic('exner', exner, & modeldb%clock, mesh, nodal_output_on_w3) - - ! Write out heights of function space DoFs, if requested - allocate(fs_names(4)) - allocate(fs_ids(4)) - fs_names = (/ "w0 ", "w2h", "w3 ", "wth" /) ! Spaces to align lengths - fs_ids = (/ W0, W2H, W3, Wtheta /) - if (use_xios_io) then - if (modeldb%clock%is_initialisation()) then - prefix = "init_" - else - prefix = "" - end if - tmp_write_ptr => write_field_generic - do i = 1, SIZE(fs_names) - field_name = trim(prefix)//"height_"//trim(fs_names(i)) - fs = fs_ids(i) - if (diagnostic_to_be_sampled(trim(field_name))) then - height => get_height_fe(fs, mesh%get_id()) - call height%set_write_behaviour(tmp_write_ptr) - call height%write_field(trim(field_name)) - end if - end do - end if - deallocate(fs_names) - deallocate(fs_ids) + call write_scalar_diagnostic('height_w3', height_w3, & + modeldb%clock, mesh, nodal_output_on_w3) + call write_scalar_diagnostic('height_wth', height_wth, & + modeldb%clock, mesh, nodal_output_on_w3) if (transport_ageofair) then call con_tracer_last_outer%get_field('ageofair',ageofair) @@ -217,25 +212,13 @@ subroutine gungho_diagnostics_driver( modeldb, & call u_in_w2h%set_write_behaviour(tmp_write_ptr) call v_in_w2h%set_write_behaviour(tmp_write_ptr) if (modeldb%clock%is_initialisation()) then - if (diagnostic_to_be_sampled("init_u_in_w2h")) then - call u_in_w2h%write_field("init_u_in_w2h") - end if - if (diagnostic_to_be_sampled("init_v_in_w2h")) then - call v_in_w2h%write_field("init_v_in_w2h") - end if - if (diagnostic_to_be_sampled("init_w_in_wth")) then - call w_in_wth%write_field("init_w_in_wth") - end if + call u_in_w2h%write_field("init_u_in_w2h") + call v_in_w2h%write_field("init_v_in_w2h") + call w_in_wth%write_field("init_w_in_wth") else - if (diagnostic_to_be_sampled("u_in_w2h")) then - call u_in_w2h%write_field("u_in_w2h") - end if - if (diagnostic_to_be_sampled("v_in_w2h")) then - call v_in_w2h%write_field("v_in_w2h") - end if - if (diagnostic_to_be_sampled("w_in_wth")) then - call w_in_wth%write_field("w_in_wth") - end if + call u_in_w2h%write_field("u_in_w2h") + call v_in_w2h%write_field("v_in_w2h") + call w_in_wth%write_field("w_in_wth") end if else call write_vector_diagnostic('u', u, & @@ -250,7 +233,7 @@ subroutine gungho_diagnostics_driver( modeldb, & ! Moisture fields if ( moisture_formulation /= moisture_formulation_dry ) then - do i = 1, nummr + do i=1,nummr call write_scalar_diagnostic( trim(mr_names(i)), mr(i), & modeldb%clock, mesh, nodal_output_on_w3 ) end do @@ -293,12 +276,12 @@ subroutine gungho_diagnostics_driver( modeldb, & modeldb%clock, mesh, nodal_output_on_w3) call write_vector_diagnostic('readlbc_h_u', h_u, & modeldb%clock, mesh, nodal_output_on_w3) - end if - end if + endif + endif ! Derived physics fields (only those on W3 or Wtheta) if (use_physics .and. use_xios_io .and. .not. modeldb%clock%is_initialisation()) then - field_ptr => null() + call iterator%initialise(derived_fields) do if ( .not.iterator%has_next() ) exit diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index 403547fc9..ee30f64fd 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -417,7 +417,6 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) logical(l_def) :: mesh_already_exists integer(i_def) :: i, j, mesh_ctr - integer(i_def), allocatable :: stencil_depths(:) character(str_def), allocatable :: base_mesh_names(:) character(str_def), allocatable :: meshes_to_shift(:) character(str_def), allocatable :: meshes_to_double(:) @@ -446,6 +445,7 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) integer(i_def) :: geometry integer(i_def) :: extrusion_method + integer(i_def) :: stencil_depth real(r_def) :: domain_bottom real(r_def) :: domain_height real(r_def) :: scaled_radius @@ -672,16 +672,14 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) apply_partition_check = .true. end if - allocate(stencil_depths(size(base_mesh_names))) - call get_required_stencil_depth( stencil_depths, base_mesh_names, & - modeldb%configuration ) + stencil_depth = get_required_stencil_depth() call init_mesh( modeldb%config, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & extrusion, & - stencil_depths, & + get_required_stencil_depth(), & apply_partition_check ) @@ -925,7 +923,6 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) chi_inventory, panel_id_inventory, files_init_ptr, & orography_mesh, orography_twod_mesh) deallocate(base_mesh_names) - deallocate(stencil_depths) if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) if (allocated(meshes_to_double)) deallocate(meshes_to_double) diff --git a/science/gungho/source/driver/gungho_step_mod.x90 b/science/gungho/source/driver/gungho_step_mod.x90 index 82b475792..cd5169780 100644 --- a/science/gungho/source/driver/gungho_step_mod.x90 +++ b/science/gungho/source/driver/gungho_step_mod.x90 @@ -122,13 +122,11 @@ module gungho_step_mod '(A,I0)' ) 'Start of timestep ', model_clock%get_step() call log_event( log_scratch_space, LOG_LEVEL_INFO ) - if ( encorr_usage /= encorr_usage_none .or. write_conservation_diag ) then - temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') - call modeldb%values%get_value( 'total_dry_mass', total_dry_mass ) - call modeldb%values%get_value( 'total_energy', total_energy ) - call modeldb%values%get_value( 'total_energy_previous', & - total_energy_previous ) - end if + temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') + call modeldb%values%get_value( 'total_dry_mass', total_dry_mass ) + call modeldb%values%get_value( 'total_energy', total_energy ) + call modeldb%values%get_value( 'total_energy_previous', & + total_energy_previous ) use_moisture = ( moisture_formulation /= moisture_formulation_dry ) diff --git a/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 deleted file mode 100644 index 7c4a6ffe4..000000000 --- a/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 +++ /dev/null @@ -1,95 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Maps a field from W2h broken to W2h. -!> @details Forms a continuous W2h field by adding the components from a -!! broken W2h field on either side of the mesh facets. -module assemble_w2h_from_w2hb_kernel_mod - - use argument_mod, only : arg_type, & - GH_FIELD, GH_REAL, & - GH_READ, GH_INC, & - CELL_COLUMN - use constants_mod, only : r_solver, i_def - use fs_continuity_mod, only : W2h, W2broken - use kernel_mod, only : kernel_type - - implicit none - - private - - !--------------------------------------------------------------------------- - ! Public types - !--------------------------------------------------------------------------- - !> The type declaration for the kernel. Contains the metadata needed by the - !> Psy layer. - !> - type, public, extends(kernel_type) :: assemble_w2h_from_w2hb_kernel_type - private - type(arg_type) :: meta_args(2) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_INC, W2h), & ! field_w2h - arg_type(GH_FIELD, GH_REAL, GH_READ, W2broken) & ! field_w2h_broken - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: assemble_w2h_from_w2hb_code - end type - - !--------------------------------------------------------------------------- - ! Contained functions/subroutines - !--------------------------------------------------------------------------- - public :: assemble_w2h_from_w2hb_code - -contains - -!> @brief Converts a broken W2h field into a continuous W2h field -!> -!> @param[in] nlayers Number of layers in the mesh -!> @param[in,out] field_w2h Field in the W2h space to be returned. -!> @param[in] field_w2h_broken Original field in W2h broken to be used. -!> @param[in] ndf_w2h Number of degrees of freedom per cell for W2h -!> @param[in] undf_w2h Number of (local) unique degrees of freedom for W2h -!> @param[in] map_w2h Dofmap for the cell at the base of the column for W2h -!> @param[in] ndf_w2h_broken Number of degrees of freedom per cell for W2h broken -!> @param[in] undf_w2h_broken Number of (local) unique degrees of freedom for W2h broken -!> @param[in] map_w2h_broken Dofmap for the cell at the base of the column for W2h broken -subroutine assemble_w2h_from_w2hb_code( nlayers, & - field_w2h, & - field_w2h_broken, & - ndf_w2h, & - undf_w2h, & - map_w2h, & - ndf_w2h_broken, & - undf_w2h_broken, & - map_w2h_broken & - ) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: nlayers - integer(kind=i_def), intent(in) :: ndf_w2h_broken, ndf_w2h - integer(kind=i_def), intent(in) :: undf_w2h_broken, undf_w2h - integer(kind=i_def), dimension(ndf_w2h_broken), intent(in) :: map_w2h_broken - integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h - - real(kind=r_solver), dimension(undf_w2h), intent(inout) :: field_w2h - real(kind=r_solver), dimension(undf_w2h_broken), intent(in) :: field_w2h_broken - - ! Internal variables - integer(kind=i_def) :: df, k - - ! Loop over horizontal W2h DoFs - do df = 1, ndf_w2h - ! Loop over layers of mesh - do k = 0, nlayers - 1 - field_w2h(map_w2h(df)+k) = field_w2h(map_w2h(df)+k) & - + field_w2h_broken(map_w2h_broken(df)+k) - end do - end do - -end subroutine assemble_w2h_from_w2hb_code - -end module assemble_w2h_from_w2hb_kernel_mod diff --git a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 index 45f91bcf4..74064b04e 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 @@ -169,9 +169,6 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & real(kind=r_def) :: z real(kind=r_def), dimension(nqp_h,nqp_v) :: dj real(kind=r_def), dimension(3,3,nqp_h,nqp_v) :: jac - real(kind=r_def) :: wt - real(kind=r_def) :: j_v1(3), j_v2(3) - real(kind=r_def) :: factor(ndf_w2) integer(kind=i_def) :: ipanel @@ -183,30 +180,9 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & ndof_vol = 2*element_order_h*(element_order_h+1)*(element_order_v+1) & + (element_order_h+1)*(element_order_h+1)*element_order_v - - ! Only modify dofs corresponding to vertical part of w-basis - ! function (for lowest order: final two dofs). - ! Dofs are ordered: - ! a) Horizontal volume dofs - ! b) Vertical volume dofs - ! c) Horizontal face dofs - ! d) Vertical face dofs - ! So vertical dofs follow one of the two conditions: - ! b) df > ndof_vol_h .and. df <= ndof_vol - ! d) df > ndf_w2 - 2*ndof_face_v - ! So the check is as follows - do df = 1, ndf_w2 - if ( (df > ndf_w2 - 2*ndof_face_v) .or. & - (df > ndof_vol_h .and. df <= ndof_vol) ) then - factor(df) = real(dt, r_def) - else - factor(df) = 0.0_r_def - end if - end do - - ! Loop over layers: Start from 1 as in this loop k is not an offset do k = 1, nlayers + ik = k + (cell-1)*nlayers ! Indirect the chi coord field here do df = 1, ndf_chi chi1_e(df) = chi1(map_chi(df) + k - 1) @@ -216,48 +192,64 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) - ik = k + (cell-1)*nlayers - mm(ik, :, :) = 0.0_r_def ! Only use dofs corresponding to vertical part of basis function - do qp2 = 1, nqp_v - do qp1 = 1, nqp_h - chi1_at_quad = 0.0_r_def - chi2_at_quad = 0.0_r_def - chi3_at_quad = 0.0_r_def - do dfc = 1,ndf_chi - chi1_at_quad = chi1_at_quad + chi1_e(dfc)*basis_chi(1,dfc,qp1,qp2) - chi2_at_quad = chi2_at_quad + chi2_e(dfc)*basis_chi(1,dfc,qp1,qp2) - chi3_at_quad = chi3_at_quad + chi3_e(dfc)*basis_chi(1,dfc,qp1,qp2) - end do - - if (geometry == geometry_spherical) then - - call chi2llr(chi1_at_quad, chi2_at_quad, chi3_at_quad, & - ipanel, long_at_quad, lat_at_quad, r_at_quad) - z = r_at_quad - radius - - if (dl_type == dl_type_latitude) then - mu_at_quad = damping_layer_func(z, dl_strength, & - dl_base_height, domain_height, lat_at_quad) - else - mu_at_quad = damping_layer_func(z, dl_strength, & - dl_base_height, domain_height, 0.0_r_def) - end if - else - mu_at_quad = damping_layer_func(chi3_at_quad, dl_strength, & - dl_base_height, domain_height, 0.0_r_def) - end if - - wt = wqp_h(qp1) * wqp_v(qp2) / dj(qp1,qp2) - do df2 = 1, ndf_w2 - j_v2 = matmul(jac(:,:,qp1,qp2),basis_w2(:,df2,qp1,qp2)) - do df = 1, ndf_w2 ! Mass matrix is not symmetric for damping layer - j_v1 = matmul(jac(:,:,qp1,qp2),basis_w2(:,df,qp1,qp2)) - - integrand = wt * dot_product( j_v1, j_v2 ) - mm(ik,df,df2) = mm(ik,df,df2) & - + (1.0_r_def + factor(df)*mu_at_quad) & - * integrand + do df2 = 1, ndf_w2 + do df = 1, ndf_w2 ! Mass matrix is not symmetric for damping layer + mm(ik,df,df2) = 0.0_r_def + do qp2 = 1, nqp_v + do qp1 = 1, nqp_h + chi1_at_quad = 0.0_r_def + chi2_at_quad = 0.0_r_def + chi3_at_quad = 0.0_r_def + do dfc = 1,ndf_chi + chi1_at_quad = chi1_at_quad + chi1_e(dfc)*basis_chi(1,dfc,qp1,qp2) + chi2_at_quad = chi2_at_quad + chi2_e(dfc)*basis_chi(1,dfc,qp1,qp2) + chi3_at_quad = chi3_at_quad + chi3_e(dfc)*basis_chi(1,dfc,qp1,qp2) + end do + + if (geometry == geometry_spherical) then + + call chi2llr(chi1_at_quad,chi2_at_quad,chi3_at_quad, & + ipanel, long_at_quad,lat_at_quad,r_at_quad) + z=r_at_quad - radius + + if (dl_type == dl_type_latitude) then + mu_at_quad = damping_layer_func(z, dl_strength, & + dl_base_height, domain_height, lat_at_quad) + else + mu_at_quad = damping_layer_func(z, dl_strength, & + dl_base_height, domain_height, 0.0_r_def) + end if + else + mu_at_quad = damping_layer_func(chi3_at_quad, dl_strength, & + dl_base_height, domain_height, 0.0_r_def) + end if + + integrand = wqp_h(qp1) * wqp_v(qp2) * & + dot_product( & + matmul(jac(:,:,qp1,qp2),basis_w2(:,df,qp1,qp2)), & + matmul(jac(:,:,qp1,qp2),basis_w2(:,df2,qp1,qp2)) ) & + /dj(qp1,qp2) + + ! Only modify dofs corresponding to vertical part of w-basis + ! function (for lowest order: final two dofs). + ! Dofs are ordered: + ! a) Horizontal volume dofs + ! b) Vertical volume dofs + ! c) Horizontal face dofs + ! d) Vertical face dofs + ! So vertical dofs follow one of the two conditions: + ! b) df > ndof_vol_h .and. df <= ndof_vol + ! d) df > ndf_w2 - 2*ndof_face_v + ! So the check is as follows + if ( (df > ndf_w2 - 2*ndof_face_v) .or. & + (df > ndof_vol_h .and. df <= ndof_vol) ) then + mm(ik,df,df2) = mm(ik,df,df2) & + + (1.0_r_def + real(dt, r_def)*mu_at_quad) & + * integrand + else + mm(ik,df,df2) = mm(ik,df,df2) + integrand + end if end do end do end do @@ -289,12 +281,12 @@ function damping_layer_func(height, dl_strength, dl_base_height, domain_height, real(kind=r_def) :: height_star ! Latitude over which to reduce damping height from dl_base_height ! chosen to reduce it to approximately dl_base_height/2 - real(kind=r_def), parameter :: taper_lat = 50.0_r_def*degrees_to_radians + real(kind=r_def), parameter :: taper_lat = 50.0_r_def - if (abs(latitude) < taper_lat) then + if (abs(latitude) < taper_lat*degrees_to_radians) then height_star = domain_height + (height-domain_height)*cos(latitude) else - height_star = domain_height + (height-domain_height)*cos(taper_lat) + height_star = domain_height + (height-domain_height)*cos(taper_lat*degrees_to_radians) end if if (height_star >= dl_base_height) then diff --git a/science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 b/science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 deleted file mode 100644 index fb51ad119..000000000 --- a/science/gungho/source/kernel/solver/apply_mixed_u_operator_kernel_mod.F90 +++ /dev/null @@ -1,157 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- - -!> @brief Compute the LHS of the semi-implicit system for the horizontal velocity: -!! lhs_uv = norm_u*(Mu*u - P2t*t - grad*p), -!! with t = -Mt^(-1) * Pt2*u -module apply_mixed_u_operator_kernel_mod - -use argument_mod, only : arg_type, & - GH_FIELD, GH_OPERATOR, & - GH_READ, & - GH_WRITE, & - GH_REAL, CELL_COLUMN -use constants_mod, only : r_solver, i_def -use kernel_mod, only : kernel_type -use fs_continuity_mod, only : W2, W3, W2h, W2v, W2broken - -implicit none -private - -!------------------------------------------------------------------------------- -! Public types -!------------------------------------------------------------------------------- - -type, public, extends(kernel_type) :: apply_mixed_u_operator_kernel_type - private - type(arg_type) :: meta_args(7) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_WRITE, W2broken), & ! lhs_uv - arg_type(GH_FIELD, GH_REAL, GH_READ, W2h), & ! uv' - arg_type(GH_FIELD, GH_REAL, GH_READ, W2v), & ! w' - arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! exner' - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W2), & ! Mu^{c,d} - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W3), & ! grad - arg_type(GH_FIELD, GH_REAL, GH_READ, W2) & ! norm_u - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: apply_mixed_u_operator_code -end type - -!------------------------------------------------------------------------------- -! Contained functions/subroutines -!------------------------------------------------------------------------------- -public :: apply_mixed_u_operator_code - -contains - -!> @brief Compute the LHS of the semi-implicit system -!> @param[in] cell Horizontal cell index -!> @param[in] nlayers Number of layers -!> @param[in,out] lhs_uv Mixed operator applied to the horizontal momentum equation -!> @param[in] wind_uv Horizontal wind field -!> @param[in] wind_w Vertical wind field -!> @param[in] exner Exner pressure field -!> @param[in] ncell1 Total number of cells for the mu_cd operator -!> @param[in] mu_cd Generalised mass matrix for the momentum equation -!> @param[in] ncell2 Total number of cells for the grad operator -!> @param[in] grad Generalised gradient operator for the momentum equation -!> @param[in] norm_u Normalisation field for the momentum equation -!> @param[in] ndf_w2hb number of degrees of freedom per cell for the broken horizontal wind space -!> @param[in] undf_w2hb unique number of degrees of freedom for the broken horizontal wind space -!> @param[in] map_w2hb dofmap for the cell at the base of the column for the broken horizontal wind space -!> @param[in] ndf_w2h number of degrees of freedom per cell for the horizontal wind space -!> @param[in] undf_w2h unique number of degrees of freedom for the horizontal wind space -!> @param[in] map_w2h dofmap for the cell at the base of the column for the horizontal wind space -!> @param[in] ndf_w2v Number of degrees of freedom per cell for the vertical wind space -!> @param[in] undf_w2v Unique number of degrees of freedom for the vertical wind space -!> @param[in] map_w2v Dofmap for the cell at the base of the column for the vertical wind space -!> @param[in] ndf_w3 Norm_umber of degrees of freedom per cell for the pressure space -!> @param[in] ndf_w3 Unique number of degrees of freedom for the pressure space -!> @param[in] map_w3 Dofmap for the cell at the base of the column for the pressure space -!> @param[in] ndf_w2 Number of degrees of freedom per cell for the 3d wind space -!> @param[in] undf_w2 Unique number of degrees of freedom for the 3d wind space -!> @param[in] map_w2 Dofmap for the cell at the base of the column for the 3d wind space - -subroutine apply_mixed_u_operator_code(cell, & - nlayers, & - lhs_uv, & - wind_uv, wind_w, exner, & - ncell1, mu_cd, & - ncell2, grad, & - norm_u, & - ndf_w2hb, undf_w2hb, map_w2hb, & - ndf_w2h, undf_w2h, map_w2h, & - ndf_w2v, undf_w2v, map_w2v, & - ndf_w3, undf_w3, map_w3, & - ndf_w2, undf_w2, map_w2) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: cell, nlayers - integer(kind=i_def), intent(in) :: ncell1, ncell2 - integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 - integer(kind=i_def), intent(in) :: undf_w2h, ndf_w2h - integer(kind=i_def), intent(in) :: undf_w2hb, ndf_w2hb - integer(kind=i_def), intent(in) :: undf_w2v, ndf_w2v - integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 - integer(kind=i_def), dimension(ndf_w2hb), intent(in) :: map_w2hb - integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h - integer(kind=i_def), dimension(ndf_w2v), intent(in) :: map_w2v - integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 - integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 - - ! Fields - real(kind=r_solver), dimension(undf_w2hb), intent(inout) :: lhs_uv - real(kind=r_solver), dimension(undf_w2h), intent(in) :: wind_uv - real(kind=r_solver), dimension(undf_w2v), intent(in) :: wind_w - real(kind=r_solver), dimension(undf_w2), intent(in) :: norm_u - real(kind=r_solver), dimension(undf_w3), intent(in) :: exner - - ! Operators - real(kind=r_solver), dimension(ncell1, ndf_w2, ndf_w2), intent(in) :: mu_cd - real(kind=r_solver), dimension(ncell2, ndf_w2, ndf_w3), intent(in) :: grad - - ! Internal variables - integer(kind=i_def) :: df, df2, ij, & - nm1, iw3, & - iw2, iw2h - - ! Set up some useful shorthands for indices - ij = (cell-1)*nlayers + 1 - nm1 = nlayers-1 - iw3 = map_w3(1) - - ! LHS UV - do df = 1, ndf_w2h - iw2h = map_w2hb(df) - iw2 = map_w2(df) - lhs_uv(iw2h:iw2h+nm1) = - norm_u(iw2:iw2+nm1) & - *grad(ij:ij+nm1, df, 1)*exner(iw3:iw3+nm1) - end do - do df2 = 1, ndf_w2h - do df = 1, ndf_w2h - iw2h = map_w2hb(df) - iw2 = map_w2(df) - lhs_uv(iw2h:iw2h+nm1) = lhs_uv(iw2h:iw2h+nm1) & - + norm_u(iw2:iw2+nm1)* & - mu_cd(ij:ij+nm1, df, df2)*wind_uv(map_w2h(df2):map_w2h(df2)+nm1) - end do - end do - do df2 = 1, ndf_w2v - do df = 1, ndf_w2h - iw2h = map_w2hb(df) - iw2 = map_w2(df) - lhs_uv(iw2h:iw2h+nm1) = lhs_uv(iw2h:iw2h+nm1) & - + norm_u(iw2:iw2+nm1)* & - mu_cd(ij:ij+nm1, df, ndf_w2h+df2)*wind_w(map_w2v(df2):map_w2v(df2)+nm1) - end do - end do - -end subroutine apply_mixed_u_operator_code - -end module apply_mixed_u_operator_kernel_mod diff --git a/science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 b/science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 deleted file mode 100644 index afa1f1f7d..000000000 --- a/science/gungho/source/kernel/solver/apply_mixed_wp_operator_kernel_mod.F90 +++ /dev/null @@ -1,225 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- - -!> @brief Compute the LHS of the semi-implicit system for the -!! vertical velocity and pressure equations: -!! (lhs_w) = norm_u*(Mu*u - P2t*t - grad*p), -!! lhs_p = M3p*p - P3t*t + Q32*u, -!! with t = -Mt^(-1) * Pt2*u -module apply_mixed_wp_operator_kernel_mod - -use argument_mod, only : arg_type, & - GH_FIELD, GH_OPERATOR, & - GH_READ, & - GH_WRITE, & - GH_REAL, CELL_COLUMN -use constants_mod, only : r_solver, i_def -use kernel_mod, only : kernel_type -use fs_continuity_mod, only : W2, W3, Wtheta, W2h, W2v - -implicit none -private - -!------------------------------------------------------------------------------- -! Public types -!------------------------------------------------------------------------------- -type, public, extends(kernel_type) :: apply_mixed_wp_operator_kernel_type - private - type(arg_type) :: meta_args(14) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_WRITE, W2v), & ! lhs_w - arg_type(GH_FIELD, GH_REAL, GH_WRITE, W3), & ! lhs_p - arg_type(GH_FIELD, GH_REAL, GH_READ, W2h), & ! uv' - arg_type(GH_FIELD, GH_REAL, GH_READ, W2v), & ! w' - arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! exner' - arg_type(GH_OPERATOR, GH_REAL, GH_READ, Wtheta, W2), & ! Ptheta2 - arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & ! Mtheta^-1 - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W2), & ! Mu^{c,d} - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, Wtheta), & ! P2theta - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W3), & ! grad - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! norm_u - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W3, W3), & ! m3p - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W3, W2), & ! q32 - arg_type(GH_OPERATOR, GH_REAL, GH_READ, W3, Wtheta) & ! p3t - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: apply_mixed_wp_operator_code -end type - -!------------------------------------------------------------------------------- -! Contained functions/subroutines -!------------------------------------------------------------------------------- -public :: apply_mixed_wp_operator_code - -contains - -!> @brief Compute the LHS of the semi-implicit system -!> @param[in] cell Horizontal cell index -!> @param[in] nlayers Number of layers -!> @param[in,out] lhs_w Mixed operator applied to the vertical momentum equation -!> @param[in,out] lhs_p Mixed operator applied to the equation of state -!> @param[in] wind_uv Horizontal wind field -!> @param[in] wind_w Vertical wind field -!> @param[in] exner Exner pressure field -!> @param[in] ncell0 Total number of cells for the pt2 operator -!> @param[in] pt2 Projection operator from W2 to Wtheta -!> @param[in] mt_lumped_inv Lumped inverse mass matrix for the Wtheta space -!> @param[in] ncell1 Total number of cells for the mu_cd operator -!> @param[in] mu_cd Generalised mass matrix for the momentum equation -!> @param[in] ncell2 Total number of cells for the p2t operator -!> @param[in] p2t Generalised projection matrix from Wtheta to W2 -!> @param[in] ncell3 Total number of cells for the grad operator -!> @param[in] grad Generalised gradient operator for the momentum equation -!> @param[in] norm_u Normalisation field for the momentum equation -!> @param[in] ncell4 Total number of cells for the m3p operator -!> @param[in] m3p Weighted mass matrix for the W3 space -!> @param[in] ncell5 Total number of cells for the q32 operator -!> @param[in] q32 Projection operator from W2 to W3 -!> @param[in] ncell6 Total number of cells for the p3t operator -!> @param[in] p3t Projection operator from W2 to Wtheta -!> @param[in] ndf_w2v Number of degrees of freedom per cell for the vertical wind space -!> @param[in] undf_w2v Unique number of degrees of freedom for the vertical wind space -!> @param[in] map_w2v Dofmap for the cell at the base of the column for the vertical wind space -!> @param[in] ndf_w3 Norm_umber of degrees of freedom per cell for the pressure space -!> @param[in] ndf_w3 Unique number of degrees of freedom for the pressure space -!> @param[in] map_w3 Dofmap for the cell at the base of the column for the pressure space -!> @param[in] ndf_w2h Number of degrees of freedom per cell for the horizontal wind space -!> @param[in] undf_w2h Unique number of degrees of freedom for the horizontal wind space -!> @param[in] map_w2h Dofmap for the cell at the base of the column for the horizontal wind space -!> @param[in] undf_wt Number of degrees of freedom per cell for the potential -!! temperature space -!> @param[in] undf_wt Unique number of degrees of freedom for the potential -!! temperature space -!> @param[in] map_wt Dofmap for the cell at the base of the column for the -!! potential temperature space -!> @param[in] ndf_w2 Number of degrees of freedom per cell for the wind space -!> @param[in] undf_w2 Unique number of degrees of freedom for the wind space -!> @param[in] map_w2 Dofmap for the cell at the base of the column for the wind space -subroutine apply_mixed_wp_operator_code(cell, & - nlayers, & - lhs_w, & - lhs_p, & - wind_uv, wind_w, exner, & - ncell0, pt2, & - mt_lumped_inv, & - ncell1, mu_cd, & - ncell2, P2t, & - ncell3, grad, & - norm_u, & - ncell4, m3p, & - ncell5, q32, & - ncell6, p3t, & - ndf_w2v, undf_w2v, map_w2v, & - ndf_w3, undf_w3, map_w3, & - ndf_w2h, undf_w2h, map_w2h, & - ndf_wt, undf_wt, map_wt, & - ndf_w2, undf_w2, map_w2) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: cell, nlayers - integer(kind=i_def), intent(in) :: ncell0, ncell1, ncell2, ncell3 - integer(kind=i_def), intent(in) :: ncell4, ncell5, ncell6 - integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 - integer(kind=i_def), intent(in) :: undf_w2h, ndf_w2h - integer(kind=i_def), intent(in) :: undf_w2v, ndf_w2v - integer(kind=i_def), intent(in) :: undf_wt, ndf_wt - integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 - integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h - integer(kind=i_def), dimension(ndf_w2v), intent(in) :: map_w2v - integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 - integer(kind=i_def), dimension(ndf_wt), intent(in) :: map_wt - integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 - - ! Fields - real(kind=r_solver), dimension(undf_w2v), intent(inout) :: lhs_w - real(kind=r_solver), dimension(undf_w3), intent(inout) :: lhs_p - real(kind=r_solver), dimension(undf_w2h), intent(in) :: wind_uv - real(kind=r_solver), dimension(undf_w2v), intent(in) :: wind_w - real(kind=r_solver), dimension(undf_w2), intent(in) :: norm_u - real(kind=r_solver), dimension(undf_wt), intent(in) :: mt_lumped_inv - real(kind=r_solver), dimension(undf_w3), intent(in) :: exner - - ! Operators - real(kind=r_solver), dimension(ncell0, ndf_wt, ndf_w2), intent(in) :: pt2 - real(kind=r_solver), dimension(ncell1, ndf_w2, ndf_w2), intent(in) :: mu_cd - real(kind=r_solver), dimension(ncell2, ndf_w2, ndf_wt), intent(in) :: p2t - real(kind=r_solver), dimension(ncell3, ndf_w2, ndf_w3), intent(in) :: grad - real(kind=r_solver), dimension(ncell4, ndf_w3, ndf_w3), intent(in) :: m3p - real(kind=r_solver), dimension(ncell5, ndf_w3, ndf_w2), intent(in) :: q32 - real(kind=r_solver), dimension(ncell6, ndf_w3, ndf_wt), intent(in) :: p3t - - ! Internal variables - integer(kind=i_def) :: df, df2, ij, & - nm1, iw3, iwt, & - iw2, iw2h, iw2v - real(kind=r_solver), dimension(0:nlayers-1,ndf_w2) :: u_e - real(kind=r_solver), dimension(0:nlayers) :: t_col - - ! Set up some useful shorthands for indices - ij = (cell-1)*nlayers + 1 - nm1 = nlayers-1 - iw3 = map_w3(1) - iwt = map_wt(1) - - ! Create the element velocity field - do df = 1, ndf_w2h - iw2h = map_w2h(df) - u_e(:,df) = wind_uv(iw2h:iw2h+nm1) - end do - do df = 1, ndf_w2v - iw2v = map_w2v(df) - u_e(:,ndf_w2h+df) = wind_w(iw2v:iw2v+nm1) - end do - - ! Compute t for the column - t_col(:) = 0.0_r_solver - do df = 1, ndf_w2 - t_col(0:nm1) = t_col(0:nm1) - pt2(ij:ij+nm1, 1, df)*u_e(:,df) - t_col(1:nm1+1) = t_col(1:nm1+1) - pt2(ij:ij+nm1, 2, df)*u_e(:,df) - end do - t_col(:) = t_col(:) * mt_lumped_inv(iwt:iwt+1+nm1) - - ! LHS W - iw2v = map_w2v(1) - lhs_w(iw2v:iw2v+nlayers) = 0.0_r_solver - - do df = 1, ndf_w2v - iw2v = map_w2v(df) - iw2 = map_w2(ndf_w2h+df) - lhs_w(iw2v:iw2v+nm1) = lhs_w(iw2v:iw2v+nm1) & - + norm_u(iw2:iw2+nm1)*( & - - p2t(ij:ij+nm1, ndf_w2h+df, 1)*t_col(0:nm1) & - - p2t(ij:ij+nm1, ndf_w2h+df, 2)*t_col(1:nm1+1) & - - grad(ij:ij+nm1, ndf_w2h+df, 1)*exner(iw3:iw3+nm1)) - - end do - do df2 = 1, ndf_w2 - do df = 1, ndf_w2v - iw2v = map_w2v(df) - iw2 = map_w2(ndf_w2h+df) - lhs_w(iw2v:iw2v+nm1) = lhs_w(iw2v:iw2v+nm1) & - + norm_u(iw2:iw2+nm1)* & - mu_cd(ij:ij+nm1, ndf_w2h+df, df2)*u_e(:,df2) - - end do - end do - ! Set BC for lhs_w - lhs_w(map_w2v(1)) = 0.0_r_solver - lhs_w(map_w2v(2)+nlayers-1) = 0.0_r_solver - - ! LHS P - lhs_p(iw3:iw3+nm1) = m3p(ij:ij+nm1, 1, 1)*exner(iw3:iw3+nm1) & - - p3t(ij:ij+nm1, 1, 1)*t_col(0:nm1) & - - p3t(ij:ij+nm1, 1, 2)*t_col(1:nm1+1) - do df = 1, ndf_w2 - lhs_p(iw3:iw3+nm1) = lhs_p(iw3:iw3+nm1) + q32(ij:ij+nm1, 1, df)*u_e(:,df) - end do - -end subroutine apply_mixed_wp_operator_code - -end module apply_mixed_wp_operator_kernel_mod diff --git a/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 b/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 index 07d975356..84fd4ebcb 100644 --- a/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 +++ b/science/gungho/source/kernel/solver/schur_backsub_kernel_mod.F90 @@ -28,13 +28,14 @@ module schur_backsub_kernel_mod ! Kernel metadata for PSyclone type, public, extends(kernel_type) :: schur_backsub_kernel_type private - type(arg_type) :: meta_args(8) = (/ & + type(arg_type) :: meta_args(9) = (/ & arg_type(GH_FIELD, GH_REAL, GH_INC, W2h), & ! lhs_h arg_type(GH_FIELD, GH_REAL, GH_WRITE, W2v), & ! lhs_v arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! rhs arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! exner_inc arg_type(GH_OPERATOR, GH_REAL, GH_READ, W2, W3), & ! div arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! norm + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Hb_inv arg_type(GH_SCALAR, GH_LOGICAL, GH_READ), & ! lam arg_type(GH_FIELD, GH_REAL, GH_READ, W2) & ! mask /) @@ -89,6 +90,7 @@ subroutine schur_backsub_code(cell, & ncell_3d, & div, & norm, & + Hb_inv, & lam, mask, & ndfh, undfh, maph, & ndfv, undfv, mapv, & @@ -115,6 +117,7 @@ subroutine schur_backsub_code(cell, & real(kind=r_solver), dimension(undfv), intent(inout) :: lhs_v real(kind=r_solver), dimension(ncell_3d,ndf1,ndf2), intent(in) :: div real(kind=r_solver), dimension(undf1), intent(in) :: norm + real(kind=r_solver), dimension(undf1), intent(in) :: Hb_inv real(kind=r_solver), dimension(undf1), intent(in) :: rhs real(kind=r_solver), dimension(undf1), intent(in) :: mask @@ -128,11 +131,10 @@ subroutine schur_backsub_code(cell, & do df = 1, ndfh ih = maph(df) i1 = map1(df) - lhs_h(ih:ih+nl) = lhs_h(ih:ih+nl) + 0.5_r_solver*rhs(i1:i1+nl) do df2 = 1, ndf2 i2 = map2(df2) - lhs_h(ih:ih+nl) = lhs_h(ih:ih+nl) & - + div(ij:ij+nl, df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl) + lhs_h(ih:ih+nl) = lhs_h(ih:ih+nl) + 0.5_r_solver*rhs(i1:i1+nl) & + + div(ij:ij+nl, df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl)*Hb_inv(i1:i1+nl) end do end do @@ -147,7 +149,7 @@ subroutine schur_backsub_code(cell, & do df2 = 1, ndf2 i2 = map2(df2) lhs_v(iv:iv+nl) = lhs_v(iv:iv+nl) & - + div(ij:ij+nl, ndfh + df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl) + + div(ij:ij+nl, ndfh + df, df2)*exner_inc(i2:i2+nl)*norm(i1:i1+nl)*Hb_inv(i1:i1+nl) end do end do diff --git a/science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf b/science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf deleted file mode 100644 index 351b39ba5..000000000 --- a/science/gungho/unit-test/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod_test.pf +++ /dev/null @@ -1,86 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright Met Office. All rights reserved. -! For further details please refer to the file COPYRIGHT.txt -! which you should have received as part of this distribution. -!----------------------------------------------------------------------------- - -!> Test the assembly of a W2h field from a W2hb field -!> -module assemble_w2h_from_w2hb_kernel_mod_test - - use constants_mod, only : i_def, r_solver - use funit - - implicit none - - private - public :: test_all - -contains - - @Test - subroutine test_all( ) - - use assemble_w2h_from_w2hb_kernel_mod, only: assemble_w2h_from_w2hb_code - - implicit none - - real(r_solver), parameter :: tol = 1.0e-6_r_solver - - integer(i_def), parameter :: ncells = 2 - integer(i_def), parameter :: nlayers = 1 - integer(i_def), parameter :: ndf_w2h = 2 - integer(i_def), parameter :: undf_w2h = ndf_w2h*nlayers - integer(i_def), parameter :: ndf_w2hb = 2 - integer(i_def), parameter :: undf_w2hb = ndf_w2hb*nlayers*ncells - - integer(i_def), dimension( ndf_w2h, ncells ) :: map_w2h - integer(i_def), dimension( ndf_w2hb, ncells ) :: map_w2hb - - real(r_solver), dimension( undf_w2h ) :: field_w2h - real(r_solver), dimension( undf_w2hb ) :: field_w2hb - real(r_solver), dimension( undf_w2h ) :: answer - - integer(i_def) :: cell - - ! Assume a biperiodic mesh with two cells - ! Locations of W2 dofs - ! |---|---| - ! 1 2 1 - ! |---|---| - map_w2h(:,1) = (/ 1, nlayers+1 /) - map_w2h(:,2) = (/ nlayers+1, 1 /) - ! - ! Locations of W2b dofs - ! |---|---| - ! |1 2|3 4| - ! |---|---| - map_w2hb(:,1) = (/ 1, nlayers+1 /) - map_w2hb(:,2) = (/ 2*nlayers+1, 3*nlayers+1 /) - - field_w2h = (/ 3.0_r_solver, 4.0_r_solver /) - - field_w2hb = (/ 1.0_r_solver, 2.0_r_solver, 3.0_r_solver, 4.0_r_solver /) - - do cell = 1, ncells - call assemble_w2h_from_w2hb_code( nlayers, & - field_w2h, & - field_w2hb, & - ndf_w2h, & - undf_w2h, & - map_w2h(:,cell), & - ndf_w2hb, & - undf_w2hb, & - map_w2hb(:,cell) & - ) - end do - - ! field_w2h should equal it's initial value plus the two - ! adjacent w2hb values - answer = (/ 8.0_r_solver, 9.0_r_solver /) - - @assertEqual(answer, field_w2h, tol) - - end subroutine test_all - -end module assemble_w2h_from_w2hb_kernel_mod_test diff --git a/science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf deleted file mode 100644 index 111b48817..000000000 --- a/science/gungho/unit-test/kernel/solver/apply_mixed_u_operator_kernel_mod_test.pf +++ /dev/null @@ -1,101 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright Met Office. All rights reserved. -! For further details please refer to the file COPYRIGHT.txt -! which you should have received as part of this distribution. -!----------------------------------------------------------------------------- - -!> Test the mixed operator of the semi-implicit lhs -module apply_mixed_u_operator_kernel_mod_test - - use constants_mod, only : i_def, r_solver - use funit - - implicit none - - private - public :: test_all - -contains - - @test( ) - subroutine test_all( ) - - use apply_mixed_u_operator_kernel_mod, only : apply_mixed_u_operator_code - - implicit none - - real(r_solver), parameter :: tol = 1.0e-6_r_solver - - ! Mesh - integer(i_def), parameter :: nlayers = 1 - integer(i_def), parameter :: cell = 1 - integer(i_def), parameter :: ncell = 1 - - ! Spaces - integer(i_def), parameter :: ndf_w2h = 2 - integer(i_def), parameter :: ndf_w2v = 2 - integer(i_def), parameter :: ndf_w2 = ndf_w2h+ndf_w2v - integer(i_def), parameter :: ndf_w3 = 1 - integer(i_def), parameter :: undf_w2h = ndf_w2h*nlayers - integer(i_def), parameter :: undf_w2v = nlayers + 1 - integer(i_def), parameter :: undf_w2 = undf_w2h + undf_w2v - integer(i_def), parameter :: undf_w3 = ndf_w3*nlayers - - ! Maps - integer(i_def), dimension(ndf_w2h) :: map_w2h - integer(i_def), dimension(ndf_w2v) :: map_w2v - integer(i_def), dimension(ndf_w2) :: map_w2 - integer(i_def), dimension(ndf_w3) :: map_w3 - - ! Operators - real(r_solver), dimension(ndf_w2, ndf_w2, ncell) :: Mu - real(r_solver), dimension(ndf_w2, ndf_w3, ncell) :: Grad - - ! Fields - real(r_solver), dimension(undf_w2) :: Nu, u - real(r_solver), dimension(undf_w2h) :: Luv, uv - real(r_solver), dimension(undf_w2v) :: w - real(r_solver), dimension(undf_w3) :: p - - integer(i_def) :: df - real(r_solver) :: answer - - map_w2h = (/ 1_i_def, 1_i_def + nlayers /) - map_w2v = (/ 1_i_def, 2_i_def /) - map_w2 = (/ 1_i_def, 1_i_def + nlayers, 1_i_def + 2*nlayers, 2_i_def + 2*nlayers /) - map_w3 = (/ 1_i_def /) - - ! Set up operators - Mu = 0.0_r_solver - do df = 1,ndf_w2 - Mu(df,df,1) = real(df,r_solver) - Grad(df,1,1) = (-1.0_r_solver)**df - end do - - ! Set up the fields - uv = (/ 0.0_r_solver, 1.0_r_solver /) - w = (/ 3.0_r_solver, -2.0_r_solver /) - p = (/ 1.2_r_solver /) - Nu = 2.0_r_solver - Luv = 0.0_r_solver - - ! Compute: (L_uv) = Nu*(Mu*u - Grad*p) - call apply_mixed_u_operator_code(cell, & - nlayers, & - Luv, & - uv, w, p, & - ncell, Mu, & - ncell, Grad, & - Nu, & - ndf_w2h, undf_w2h, map_w2h, & - ndf_w2h, undf_w2h, map_w2h, & - ndf_w2v, undf_w2v, map_w2v, & - ndf_w3, undf_w3, map_w3, & - ndf_w2, undf_w2, map_w2) - - @assertEqual(2.4_r_solver, Luv(1), tol) - @assertEqual(1.6_r_solver, Luv(2), tol) - - end subroutine test_all - -end module apply_mixed_u_operator_kernel_mod_test diff --git a/science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf deleted file mode 100644 index a95cbbd6f..000000000 --- a/science/gungho/unit-test/kernel/solver/apply_mixed_wp_operator_kernel_mod_test.pf +++ /dev/null @@ -1,160 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright Met Office. All rights reserved. -! For further details please refer to the file COPYRIGHT.txt -! which you should have received as part of this distribution. -!----------------------------------------------------------------------------- - -!> Test the mixed operator of the semi-implicit lhs -module apply_mixed_wp_operator_kernel_mod_test - - use constants_mod, only : i_def, r_solver - use funit - - implicit none - - private - public :: test_all - -contains - - @test( ) - subroutine test_all( ) - - use apply_mixed_wp_operator_kernel_mod, only : apply_mixed_wp_operator_code - - implicit none - - real(r_solver), parameter :: tol = 1.0e-6_r_solver - - ! Mesh - integer(i_def), parameter :: nlayers = 3 - integer(i_def), parameter :: cell = 1 - integer(i_def), parameter :: ncell = nlayers - - ! Spaces - integer(i_def), parameter :: ndf_w2h = 2 - integer(i_def), parameter :: ndf_w2v = 2 - integer(i_def), parameter :: ndf_w2 = ndf_w2h+ndf_w2v - integer(i_def), parameter :: ndf_wt = 2 - integer(i_def), parameter :: ndf_w3 = 1 - integer(i_def), parameter :: undf_w2h = ndf_w2h*nlayers - integer(i_def), parameter :: undf_w2v = nlayers + 1 - integer(i_def), parameter :: undf_w2 = undf_w2h + undf_w2v - integer(i_def), parameter :: undf_wt = nlayers + 1 - integer(i_def), parameter :: undf_w3 = ndf_w3*nlayers - - ! Maps - integer(i_def), dimension(ndf_w2h) :: map_w2h - integer(i_def), dimension(ndf_w2v) :: map_w2v - integer(i_def), dimension(ndf_w2) :: map_w2 - integer(i_def), dimension(ndf_wt) :: map_wt - integer(i_def), dimension(ndf_w3) :: map_w3 - - ! Operators - real(r_solver), dimension(ncell, ndf_w2, ndf_w2) :: Mu - real(r_solver), dimension(ncell, ndf_w2, ndf_wt) :: P2t - real(r_solver), dimension(ncell, ndf_w2, ndf_w3) :: Grad - real(r_solver), dimension(ncell, ndf_wt, ndf_w2) :: Pt2 - real(r_solver), dimension(ncell, ndf_w3, ndf_w3) :: M3p - real(r_solver), dimension(ncell, ndf_w3, ndf_wt) :: P3t - real(r_solver), dimension(ncell, ndf_w3, ndf_w2) :: Q32 - - ! Fields - real(r_solver), dimension(undf_w2) :: Nu - real(r_solver), dimension(undf_w2h) :: uv - real(r_solver), dimension(undf_w2v) :: Lw, w - real(r_solver), dimension(undf_wt) :: invMt - real(r_solver), dimension(undf_w3) :: p, Lp - - integer(i_def) :: df, k - real(r_solver), dimension(undf_w2v) :: answer - real(r_solver) :: answer_p - - map_w2h = (/ 1_i_def, 1_i_def + nlayers /) - map_w2v = (/ 1_i_def, 2_i_def /) - map_w2 = (/ 1_i_def, 1_i_def + nlayers, 1_i_def + 2*nlayers, 2_i_def + 2*nlayers /) - map_wt = (/ 1_i_def, 2_i_def /) - map_w3 = (/ 1_i_def /) - - ! Set up operators - Mu = 0.0_r_solver - - do df = 1,ndf_w2 - Mu(:,df,df) = real(df,r_solver) - Grad(:,df,1) = (-1.0_r_solver)**df - end do - - P2t(:,:,:) = 0.0_r_solver - P2t(:,3:4,:) = 0.5_r_solver - Pt2 = 0.0_r_solver - Pt2(:,1,3) = 7.0_r_solver - Pt2(:,2,4) = 9.0_r_solver - M3p = 0.5_r_solver - Q32 = 3.0_r_solver - P3t = 5.0_r_solver - - ! Set up the fields - do k = 1, nlayers - uv(k) = 0.0_r_solver - uv(k+nlayers) = 1.0_r_solver - end do - w = (/0.0_r_solver, 3.0_r_solver, -2.0_r_solver, 0.0_r_solver /) - p(:) = 1.2_r_solver - Nu(:) = 2.0_r_solver - invMt(:) = 0.25_r_solver - - ! Compute: (L_uv, L_w) = Nu*(Mu*u - Proj*t - Grad*p) - ! L_p = M3p*p - P3t*t + Q32*u - ! with t = -Mt^-1 * Pt2*u - call apply_mixed_wp_operator_code(cell, & - nlayers, & - Lw, Lp, & - uv, w, p, & - ncell, Pt2, & - invMt, & - ncell, Mu, & - ncell, P2t, & - ncell, Grad, & - Nu, & - ncell, M3p, & - ncell, Q32, & - ncell, P3t, & - ndf_w2v, undf_w2v, map_w2v, & - ndf_w3, undf_w3, map_w3, & - ndf_w2h, undf_w2h, map_w2h, & - ndf_wt, undf_wt, map_wt, & - ndf_w2, undf_w2, map_w2) - - ! The code below can be used to generate the answers required and - ! is kept to here to make altering the unit test following changes in the - ! kernel easier - !t(:) = 0.0_r_solver - !do k = 1, nlayers - ! t(k) = t(k) - Pt2(k,1,3)*w(k) - Pt2(k,1,4)*w(k+1) - ! t(k+1) = t(k+1) - Pt2(k,2,3)*w(k) - Pt2(k,2,4)*w(k+1) - !end do - !t(:) = invMt(:)*t(:) - - !answer(:) = 0.0_r_solver - !do k = 0, nlayers - 1 - ! do dfv = 1,ndf_w2v - ! u = (/ uv(1+k), uv(4+k), w(1+k), w(2+k) /) - ! df = ndf_w2h+dfv - ! answer(map_w2v(dfv)+k) = answer(map_w2v(dfv)+k) & - ! + Nu(map_w2(df)+k)*(sum(Mu(k+1,df,:)*u) & - ! - sum(P2t(k+1,df,:)*t(k+1:k+2)) & - ! - Grad(k+1,df,1)*p(1+k)) - ! end do - !end do - !u = (/ uv(1), uv(4), w(1), w(2) /) - !answer_p = M3p(1,1,1)*p(1) - sum(P3t(1,1,:)*t(1:2)) + sum(Q32(1,1,:)*u(1:4)) - - answer = (/ 0.0_r_solver, 58.0_r_solver, -32.0_r_solver, 0.0_r_solver /) - @assertEqual(answer, Lw, tol) - - answer_p = 72.6_r_solver - @assertEqual(answer_p, Lp(1), tol) - - end subroutine test_all - -end module apply_mixed_wp_operator_kernel_mod_test diff --git a/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf b/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf index 0b5014e38..fcbb75093 100644 --- a/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/solver/schur_backsub_kernel_mod_test.pf @@ -23,7 +23,7 @@ contains implicit none - real(r_solver), parameter :: tol = 1.0e-6_r_solver + real(r_solver), parameter :: tol = 1.0e-12_r_solver ! Mesh integer(i_def), parameter :: nlayers = 1_i_def @@ -50,7 +50,7 @@ contains real(r_solver), dimension(ncell, ndf_w2, ndf_w3) :: Grad ! Fields - real(r_solver), dimension(undf_w2) :: rhs, mask, y + real(r_solver), dimension(undf_w2) :: rhs, mask, z, y real(r_solver), dimension(undf_w2h) :: Luv real(r_solver), dimension(undf_w2v) :: Lw real(r_solver), dimension(undf_w3) :: x @@ -58,8 +58,8 @@ contains ! Logicals logical(l_def), parameter :: lam = .true. - integer(i_def) :: df - real(r_solver), dimension(undf_w2h) :: answer + integer(i_def) :: df + real(r_solver) :: answer map_w2h = (/ 1_i_def, 1_i_def + nlayers /) map_w2v = (/ 1_i_def, 2_i_def /) @@ -73,6 +73,7 @@ contains ! Set up the fields y = (/ 0.0_r_solver, 1.0_r_solver, 3.0_r_solver, -2.0_r_solver /) + z = (/ 2.4_r_solver, 0.4_r_solver, 7.3_r_solver, 1.2_r_solver /) x = (/ 1.2_r_solver /) rhs = (/ 6.3_r_solver, 6.7_r_solver, 4.2_r_solver, 7.5_r_solver /) Luv = 0.0_r_solver @@ -86,17 +87,22 @@ contains ncell, & Grad, & y, & + z, & lam, mask, & ndf_w2h, undf_w2h, map_w2h, & ndf_w2v, undf_w2v, map_w2v, & ndf_w2, undf_w2, map_w2, & ndf_w3, undf_w3, map_w3 ) - answer = (/ 6.3_r_solver, 4.55_r_solver /) - @assertEqual(answer, Luv, tol) + do df = 1, ndf_w2h + answer = mask(df)*( 0.5_r_solver*rhs(df) + y(df)*z(df)*grad(1,df,1)*x(1)) + @assertEqual(answer, Luv(df), tol) + end do - answer = (/ 0.0_r_solver, 0.0_r_solver /) - @assertEqual(answer, Lw, tol) + do df = 1, ndf_w2v + answer = 0.0_r_solver + @assertEqual(answer, Lw(df), tol) + end do end subroutine test_all diff --git a/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf b/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf index bb2dbf1ca..b1fb53e42 100644 --- a/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf +++ b/science/gungho/unit-test/kernel/transport/common/transport_metadata_collection_test.pf @@ -107,7 +107,6 @@ contains wind_mono_top_depth = 0, & adjust_theta = .false., & adjust_theta_above = 0.0_r_def, & - adjust_tracer_equation = .false., & adjust_vhv_wind=.false., & broken_w2_projection = .false., & consistent_metric = .false., & diff --git a/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf index dd681f833..63a8e4996 100644 --- a/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/poly1d_vert_adv_coeffs_kernel_mod_test.pf @@ -80,7 +80,6 @@ contains wind_mono_top_depth = 0, & adjust_theta = .false., & adjust_theta_above = 0.0_r_def, & - adjust_tracer_equation = .false., & adjust_vhv_wind=.false., & dry_field_name='tracer', & profile_size = 1, & diff --git a/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf b/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf index b9e58d149..f714c9b62 100644 --- a/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/transport/mol/polyv_wtheta_koren_kernel_mod_test.pf @@ -72,7 +72,6 @@ contains cap_density_predictor = 0.001_r_def, & adjust_theta = .false., & adjust_theta_above = 0.0_r_def, & - adjust_tracer_equation = .false., & adjust_vhv_wind=.false., & min_val_abs_tol = -1.0e-12_r_def, & min_val_max_iterations = 100, & diff --git a/science/linear/integration-test/nwp_gal9/ReadMe b/science/linear/integration-test/nwp_gal9/ReadMe deleted file mode 100644 index 911e9288f..000000000 --- a/science/linear/integration-test/nwp_gal9/ReadMe +++ /dev/null @@ -1 +0,0 @@ -The nwp_gal9.nml matches the configuration from the default rose-app.conf, in linear_model. diff --git a/science/linear/integration-test/nwp_gal9/iodef.xml b/science/linear/integration-test/nwp_gal9/iodef.xml deleted file mode 100644 index 35ae0ee07..000000000 --- a/science/linear/integration-test/nwp_gal9/iodef.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - performance - 1.0 - - - - true - 50 - true - - - - - diff --git a/science/linear/integration-test/nwp_gal9/nwp_gal9.f90 b/science/linear/integration-test/nwp_gal9/nwp_gal9.f90 deleted file mode 100644 index 7c3aeb90b..000000000 --- a/science/linear/integration-test/nwp_gal9/nwp_gal9.f90 +++ /dev/null @@ -1,146 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- - -!>@brief The top level program for the tangent linear tests. -!>@details The default is to run all available tests - which -!! test whether the linear code is tangent linear to the -!! corresponding nonlinear code. -program nwp_gal9 - - use driver_collections_mod, only: init_collections, final_collections - use driver_time_mod, only: init_time, final_time - use driver_comm_mod, only: init_comm, final_comm - use driver_log_mod, only: init_logger, final_logger - use driver_config_mod, only: init_config, final_config - use driver_modeldb_mod, only: modeldb_type - use lfric_mpi_mod, only: global_mpi - use gungho_mod, only: gungho_required_namelists - use log_mod, only: log_event, & - LOG_LEVEL_ERROR, & - LOG_LEVEL_INFO - use linear_driver_mod, only: initialise, finalise - use tl_test_driver_mod, only: run_timesteps, & - run_transport_control, & - run_semi_imp_alg, & - run_rhs_alg - - implicit none - - ! Model run working data set - type(modeldb_type) :: modeldb - character(*), parameter :: application_name = 'nwp_gal9' - character(:), allocatable :: filename - - ! Variables used for parsing command line arguments - integer :: length, status, nargs - character(len=0) :: dummy - character(len=:), allocatable :: program_name, test_flag - - ! Flags which determine the tests that will be carried out - logical :: do_test_timesteps = .false. - logical :: do_test_transport_control = .false. - logical :: do_test_semi_imp_alg = .false. - logical :: do_test_rhs_alg = .false. - - ! Usage message to print - character(len=256) :: usage_message - - 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) - - call log_event( 'TL testing running ...', LOG_LEVEL_INFO ) - - ! Create the depository, prognostics and diagnostics field collections - call modeldb%fields%add_empty_field_collection("depository", table_len = 100) - call modeldb%fields%add_empty_field_collection("prognostic_fields", & - table_len = 100) - call modeldb%fields%add_empty_field_collection("diagnostic_fields", & - table_len = 100) - call modeldb%fields%add_empty_field_collection("lbc_fields", & - table_len = 100) - call modeldb%fields%add_empty_field_collection("radiation_fields", & - table_len = 100) - call modeldb%fields%add_empty_field_collection("fd_fields", & - table_len = 100) - - - call modeldb%io_contexts%initialise(application_name, 100) - - ! Parse command line parameters - call get_command_argument( 0, dummy, length, status ) - allocate(character(length)::program_name) - call get_command_argument( 0, program_name, length, status ) - nargs = command_argument_count() - - ! Print out usage message if wrong number of arguments is specified - if (nargs /= 2) then - write(usage_message,*) "Usage: ",trim(program_name), & - " " // & - " test_XXX with XXX in { " // & - " timesteps, " // & - " transport_control, " // & - " semi_imp_alg, " // & - " rhs_alg, " // & - " } " - call log_event( trim(usage_message), LOG_LEVEL_ERROR ) - end if - - call get_command_argument( 1, dummy, length, status ) - allocate( character(length) :: filename ) - call get_command_argument( 1, filename, length, status ) - - call get_command_argument( 2, dummy, length, status ) - allocate(character(length)::test_flag) - call get_command_argument( 2, test_flag, length, status ) - - ! Choose test case depending on flag provided in the first command - ! line argument - select case (trim(test_flag)) - case ("test_timesteps") - do_test_timesteps = .true. - case ("test_transport_control") - do_test_transport_control = .true. - case ("test_semi_imp_alg") - do_test_semi_imp_alg = .true. - case ("test_rhs_alg") - do_test_rhs_alg = .true. - case default - call log_event( "Unknown test", LOG_LEVEL_ERROR ) - end select - - call init_comm( application_name, modeldb ) - call init_config( filename, gungho_required_namelists, & - configuration=modeldb%configuration, & - config=modeldb%config ) - call init_logger( modeldb%mpi%get_comm(), application_name ) - call init_collections() - call init_time( modeldb ) - call initialise( application_name, modeldb ) - - if (do_test_timesteps) then - call run_timesteps(modeldb) - endif - if (do_test_transport_control) then - call run_transport_control(modeldb) - endif - if (do_test_rhs_alg) then - call run_rhs_alg(modeldb) - endif - if (do_test_semi_imp_alg) then - call run_semi_imp_alg(modeldb) - endif - - call finalise( application_name, modeldb ) - call final_time( modeldb ) - call final_collections() - call final_logger( application_name ) - call final_config() - call final_comm( modeldb ) - -end program nwp_gal9 diff --git a/science/linear/integration-test/nwp_gal9/nwp_gal9.py b/science/linear/integration-test/nwp_gal9/nwp_gal9.py deleted file mode 100755 index aa1414177..000000000 --- a/science/linear/integration-test/nwp_gal9/nwp_gal9.py +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -############################################################################## -# (c) Crown copyright 2026 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## -''' -Run the linear model integration tests for the default (nwp_gal9) configuration - -''' -import os -import re -import sys - - -from testframework import LFRicLoggingTest, TestEngine, TestFailed - - -class TLTest(LFRicLoggingTest): - ''' - Run the linear model integration tests - ''' - - def __init__(self, flag): - self._flag = flag - if 'MPIEXEC_BROKEN' in os.environ: - TLTest.set_mpiexec_broken() - super(TLTest, self).__init__([sys.argv[1], - 'resources/nwp_gal9_configuration.nml', - 'test_' + self._flag], - processes=1, - name='tl_test.Log') - - def test(self, return_code, out, err): - ''' - Error messages if the test failed to run - ''' - if return_code != 0: - message = 'Test program failed with exit code: {code}' - raise TestFailed(message.format(code=return_code), - stdout=out, stderr=err, - log=self.getLFRicLoggingLog()) - - # "out" becomes self.getLFRicLoggingLog() when PE>1 - if not self.test_passed(out): - message = 'Test {} failed' - raise TestFailed(message.format(self._flag), - stdout=out, stderr=err, - log=self.getLFRicLoggingLog()) - - return 'TL test : '+self._flag - - def test_passed(self, out): - ''' - Examine the output to see if the validity test passed - ''' - success = False - pattern = re.compile(r'\s+test\s+.*?:\s*PASS\s*$') - for line in out.split("\n"): - match = pattern.search(line) - if match: - success = True - return success - -class tl_test_semi_imp_alg(TLTest): - ''' - Test the semi implicit timestep - ''' - def __init__(self): - flag = "semi_imp_alg" - super(tl_test_semi_imp_alg, self).__init__(flag) - - -class tl_test_rhs_alg(TLTest): - ''' - Test the right hand side forcing for the mixed solver - ''' - def __init__(self): - flag = "rhs_alg" - super(tl_test_rhs_alg, self).__init__(flag) - -class tl_test_transport_control(TLTest): - ''' - Test the transport - ''' - def __init__(self): - flag = "transport_control" - super(tl_test_transport_control, self).__init__(flag) - - -class tl_test_timesteps(TLTest): - ''' - Test running over multiple timesteps - ''' - def __init__(self): - flag = "timesteps" - super(tl_test_timesteps, self).__init__(flag) - -if __name__ == '__main__': - TestEngine.run(tl_test_rhs_alg()) - TestEngine.run(tl_test_transport_control()) - TestEngine.run(tl_test_semi_imp_alg()) - TestEngine.run(tl_test_timesteps()) - diff --git a/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml b/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml index a1361ed46..9298f96f7 100644 --- a/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml +++ b/science/linear/integration-test/runge_kutta/resources/runge_kutta_configuration.nml @@ -131,7 +131,7 @@ subroutine_counters=.false., subroutine_timers=.true., use_xios_io=.false., write_conservation_diag=.false., -write_diag=.false., +write_diag=.true., write_dump=.false., write_fluxes=.false., write_minmax_tseries=.false., @@ -139,10 +139,6 @@ write_minmax_tseries=.false., &linear fixed_ls=.false. pert_option='random', -transport_efficiency=.false. -/ -&linear_physics -l_boundary_layer=.false., / &logging run_log_level='info', @@ -198,7 +194,7 @@ tolerance=1.0e-6, / &time calendar='timestep', -timestep_end='6', +timestep_end='1', timestep_start='1', calendar_type='gregorian', calendar_start='2016-01-01 15:00:00', diff --git a/science/linear/integration-test/runge_kutta/runge_kutta.f90 b/science/linear/integration-test/runge_kutta/runge_kutta.f90 index 7de15a664..ac4fae76d 100644 --- a/science/linear/integration-test/runge_kutta/runge_kutta.f90 +++ b/science/linear/integration-test/runge_kutta/runge_kutta.f90 @@ -10,19 +10,21 @@ !! corresponding nonlinear code. program runge_kutta + use configuration_mod, only: read_configuration, final_configuration use driver_collections_mod, only: init_collections, final_collections use driver_time_mod, only: init_time, final_time - use driver_comm_mod, only: init_comm, final_comm - use driver_log_mod, only: init_logger, final_logger - use driver_config_mod, only: init_config, final_config use driver_modeldb_mod, only: modeldb_type - use lfric_mpi_mod, only: global_mpi - use gungho_mod, only: gungho_required_namelists - use log_mod, only: log_event, & + use halo_comms_mod, only: initialise_halo_comms, & + finalise_halo_comms + use lfric_mpi_mod, only: create_comm, destroy_comm, global_mpi, & + lfric_comm_type + use log_mod, only: initialise_logging, finalise_logging, & + log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO - use linear_driver_mod, only: initialise, finalise - use tl_test_driver_mod, only: run_timesteps_random, & + use tl_test_driver_mod, only: initialise, & + finalise, & + run_timesteps, & run_kinetic_energy_gradient, & run_advect_density_field, & run_advect_theta_field, & @@ -37,6 +39,7 @@ program runge_kutta ! Model run working data set type(modeldb_type) :: modeldb character(*), parameter :: application_name = "runge_kutta" + character(:), allocatable :: filename ! Variables used for parsing command line arguments @@ -44,6 +47,8 @@ program runge_kutta character(len=0) :: dummy character(len=:), allocatable :: program_name, test_flag + type(lfric_comm_type) :: communicator + ! Flags which determine the tests that will be carried out logical :: do_test_timesteps = .false. logical :: do_test_kinetic_energy_gradient = .false. @@ -60,9 +65,11 @@ program runge_kutta 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) + call create_comm( communicator ) + call modeldb%mpi%initialise( communicator ) + call initialise_logging( communicator%get_comm_mpi_val(), & + "linear_integration-runge_kutta-test" ) + call initialise_halo_comms( communicator ) call log_event( 'TL testing running ...', LOG_LEVEL_INFO ) @@ -79,7 +86,7 @@ program runge_kutta call modeldb%fields%add_empty_field_collection("fd_fields", & table_len = 100) - call modeldb%io_contexts%initialise(application_name, 100) + call modeldb%io_contexts%initialise(program_name, 100) ! Parse command line parameters call get_command_argument( 0, dummy, length, status ) @@ -138,17 +145,21 @@ program runge_kutta call log_event( "Unknown test", LOG_LEVEL_ERROR ) end select - call init_comm( application_name, modeldb ) - call init_config( filename, gungho_required_namelists, & - configuration=modeldb%configuration, & - config=modeldb%config ) - call init_logger( modeldb%mpi%get_comm(), application_name ) + call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name ) + + call read_configuration( filename, & + configuration=modeldb%configuration, & + config=modeldb%config ) + + deallocate( filename ) + call init_collections() call init_time( modeldb ) - call initialise( application_name, modeldb ) + call initialise( application_name, modeldb, modeldb%calendar ) if (do_test_timesteps) then - call run_timesteps_random(modeldb) + call run_timesteps(modeldb) endif if (do_test_kinetic_energy_gradient) then call run_kinetic_energy_gradient(modeldb) @@ -178,8 +189,9 @@ program runge_kutta call finalise( application_name, modeldb ) call final_time( modeldb ) call final_collections() - call final_logger( application_name ) - call final_config() - call final_comm( modeldb ) + call final_configuration() + call finalise_halo_comms() + call finalise_logging() + call destroy_comm() end program runge_kutta diff --git a/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml b/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml index ae4d3bf12..2b208a451 100644 --- a/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml +++ b/science/linear/integration-test/semi_implicit/resources/semi_implicit_configuration.nml @@ -132,7 +132,7 @@ subroutine_counters=.false., subroutine_timers=.true., use_xios_io=.false., write_conservation_diag=.false., -write_diag=.false., +write_diag=.true., write_dump=.false., write_fluxes=.false., write_minmax_tseries=.false., @@ -140,10 +140,6 @@ write_minmax_tseries=.false., &linear fixed_ls=.false. pert_option='random', -transport_efficiency=.false. -/ -&linear_physics -l_boundary_layer=.false., / &logging run_log_level='info', diff --git a/science/linear/integration-test/semi_implicit/semi_implicit.f90 b/science/linear/integration-test/semi_implicit/semi_implicit.f90 index d02b8fde2..572475e7f 100644 --- a/science/linear/integration-test/semi_implicit/semi_implicit.f90 +++ b/science/linear/integration-test/semi_implicit/semi_implicit.f90 @@ -10,25 +10,35 @@ !! corresponding nonlinear code. program semi_implicit + use configuration_mod, only: read_configuration, final_configuration use driver_collections_mod, only: init_collections, final_collections use driver_time_mod, only: init_time, final_time - use driver_comm_mod, only: init_comm, final_comm - use driver_log_mod, only: init_logger, final_logger - use driver_config_mod, only: init_config, final_config use driver_modeldb_mod, only: modeldb_type - use lfric_mpi_mod, only: global_mpi - use gungho_mod, only: gungho_required_namelists - use log_mod, only: log_event, & + use halo_comms_mod, only: initialise_halo_comms, finalise_halo_comms + use lfric_mpi_mod, only: global_mpi, & + create_comm, destroy_comm, & + lfric_comm_type + use log_mod, only: initialise_logging, finalise_logging, & + log_event, & LOG_LEVEL_ERROR, & LOG_LEVEL_INFO - use linear_driver_mod, only: initialise, finalise - use tl_test_driver_mod, only: run_timesteps_random + use namelist_collection_mod, only: namelist_collection_type + use tl_test_driver_mod, only: initialise, & + finalise, & + run_timesteps, & + run_transport_control, & + run_semi_imp_alg, & + run_rhs_sample_eos, & + run_rhs_project_eos, & + run_rhs_alg implicit none ! Model run working data set type(modeldb_type) :: modeldb + character(*), parameter :: application_name = 'semi_implicit' + character(:), allocatable :: filename ! Variables used for parsing command line arguments @@ -36,17 +46,26 @@ program semi_implicit character(len=0) :: dummy character(len=:), allocatable :: program_name, test_flag + type(lfric_comm_type) :: communicator + ! Flags which determine the tests that will be carried out logical :: do_test_timesteps = .false. + logical :: do_test_transport_control = .false. + logical :: do_test_semi_imp_alg = .false. + logical :: do_test_rhs_alg = .false. + logical :: do_test_rhs_project_eos = .false. + logical :: do_test_rhs_sample_eos = .false. ! Usage message to print character(len=256) :: usage_message 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) + call create_comm( communicator ) + call modeldb%mpi%initialise( communicator ) + call initialise_logging( communicator%get_comm_mpi_val(), & + "linear_interface-semi_implicit-test" ) + call initialise_halo_comms( communicator ) call log_event( 'TL testing running ...', LOG_LEVEL_INFO ) @@ -63,8 +82,7 @@ program semi_implicit call modeldb%fields%add_empty_field_collection("fd_fields", & table_len = 100) - - call modeldb%io_contexts%initialise(application_name, 100) + call modeldb%io_contexts%initialise(program_name, 100) ! Parse command line parameters call get_command_argument( 0, dummy, length, status ) @@ -81,6 +99,8 @@ program semi_implicit " transport_control, " // & " semi_imp_alg, " // & " rhs_alg, " // & + " rhs_project_eos, " // & + " rhs_sample_eos, " // & " } " call log_event( trim(usage_message), LOG_LEVEL_ERROR ) end if @@ -98,28 +118,58 @@ program semi_implicit select case (trim(test_flag)) case ("test_timesteps") do_test_timesteps = .true. + case ("test_transport_control") + do_test_transport_control = .true. + case ("test_semi_imp_alg") + do_test_semi_imp_alg = .true. + case ("test_rhs_alg") + do_test_rhs_alg = .true. + case ("test_rhs_project_eos") + do_test_rhs_project_eos = .true. + case ("test_rhs_sample_eos") + do_test_rhs_sample_eos = .true. case default call log_event( "Unknown test", LOG_LEVEL_ERROR ) end select - call init_comm( application_name, modeldb ) - call init_config( filename, gungho_required_namelists, & - configuration=modeldb%configuration, & - config=modeldb%config ) - call init_logger( modeldb%mpi%get_comm(), application_name ) + call modeldb%configuration%initialise( program_name, table_len=10 ) + call modeldb%config%initialise( program_name) + + call read_configuration( filename, & + configuration=modeldb%configuration, & + config=modeldb%config ) + + deallocate( filename ) + call init_collections() call init_time( modeldb ) - call initialise( application_name, modeldb ) + call initialise( application_name, modeldb, modeldb%calendar ) if (do_test_timesteps) then - call run_timesteps_random(modeldb) + call run_timesteps(modeldb) + endif + if (do_test_transport_control) then + call run_transport_control(modeldb) + endif + if (do_test_rhs_alg) then + call run_rhs_alg(modeldb) + endif + if (do_test_rhs_project_eos) then + call run_rhs_project_eos(modeldb) + endif + if (do_test_rhs_sample_eos) then + call run_rhs_sample_eos(modeldb) + endif + if (do_test_semi_imp_alg) then + call run_semi_imp_alg(modeldb) endif call finalise( application_name, modeldb ) call final_time( modeldb ) call final_collections() - call final_logger( application_name ) - call final_config() - call final_comm( modeldb ) + call final_configuration() + call finalise_halo_comms() + call finalise_logging() + call destroy_comm() end program semi_implicit diff --git a/science/linear/integration-test/semi_implicit/semi_implicit.py b/science/linear/integration-test/semi_implicit/semi_implicit.py index 534eb9897..af210aff1 100755 --- a/science/linear/integration-test/semi_implicit/semi_implicit.py +++ b/science/linear/integration-test/semi_implicit/semi_implicit.py @@ -63,6 +63,43 @@ def test_passed(self, out): success = True return success + +class tl_test_semi_imp_alg(TLTest): + ''' + Test the semi implicit timestep + ''' + def __init__(self): + flag = "semi_imp_alg" + super(tl_test_semi_imp_alg, self).__init__(flag) + + +class tl_test_rhs_alg(TLTest): + ''' + Test the right hand side forcing for the mixed solver + ''' + def __init__(self): + flag = "rhs_alg" + super(tl_test_rhs_alg, self).__init__(flag) + +class tl_test_rhs_sample_eos(TLTest): + def __init__(self): + flag = "rhs_sample_eos" + super(tl_test_rhs_sample_eos, self).__init__(flag) + +class tl_test_rhs_project_eos(TLTest): + def __init__(self): + flag = "rhs_project_eos" + super(tl_test_rhs_project_eos, self).__init__(flag) + +class tl_test_transport_control(TLTest): + ''' + Test the transport + ''' + def __init__(self): + flag = "transport_control" + super(tl_test_transport_control, self).__init__(flag) + + class tl_test_timesteps(TLTest): ''' Test running over multiple timesteps @@ -72,4 +109,9 @@ def __init__(self): super(tl_test_timesteps, self).__init__(flag) if __name__ == '__main__': - TestEngine.run( tl_test_timesteps() ) + TestEngine.run( tl_test_rhs_sample_eos() ) + TestEngine.run( tl_test_rhs_project_eos() ) + TestEngine.run(tl_test_transport_control()) + TestEngine.run( tl_test_semi_imp_alg() ) + TestEngine.run( tl_test_rhs_alg() ) + TestEngine.run(tl_test_timesteps()) diff --git a/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 b/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 index b704f3475..c7ee7136f 100644 --- a/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_advect_density_field_mod.x90 @@ -185,6 +185,7 @@ module tl_test_advect_density_field_mod call invoke( X_minus_Y( diff, n2_advection_inc, n1_advection_inc ), & inc_X_minus_Y( diff, p_advection_inc ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma_u, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 b/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 index 4630bdf10..f712ba304 100644 --- a/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_advect_theta_field_mod.x90 @@ -188,6 +188,8 @@ module tl_test_advect_theta_field_mod inc_X_minus_Y( diff, p_advection_inc ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) + write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ' , gamma_u , ' norm = ' , norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 b/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 index b090ba7fc..a13655df9 100644 --- a/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 +++ b/science/linear/integration-test/tl_test/tl_test_convergence_rate_check.f90 @@ -6,7 +6,7 @@ !>@brief Test the convergence rate (Taylor remainder convergence). module tl_test_convergence_rate_check - use constants_mod, only: r_def, str_def, i_def + use constants_mod, only: r_def, str_def use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_INFO @@ -14,129 +14,17 @@ module tl_test_convergence_rate_check implicit none private - public convergence_pass_string, & - array_convergence_rate_check, & - convergence_rate_check - -contains - - !> @brief Test the convergence rate, with application of square root. - !> @details If the convergence rate is not close to 4, within the - !! specified tolerance, set the pass string to FAIL. - !> @param[in] name Variable or test name - !> @param[in] norm Current norm - !> @param[in] norm_prev Previous norm - !> @param[in,out] pass_str Pass string (either PASS or FAIL) - !> @param[in] tol Tolerance - subroutine convergence_pass_string( name, norm, norm_prev, pass_str, tol ) - implicit none - - real(r_def), intent(in) :: norm, norm_prev - character(len=4), intent(inout) :: pass_str - real(r_def), intent(in) :: tol - character(str_def), intent(in) :: name - - real(r_def) :: conv_rate - - ! Let the error between the nonlinear (N) difference and the linear (L) be - ! E(g) = || N(x + g dx) - N(x) - g Ldx || = O(g^2) - ! where g is a scalar, x and dx are vectors, O is the order - ! and || . || = (x^T x)^1/2 is the L2 norm. - ! - ! Then the ratio - ! E(2g) / E(g) = O(4 g^2) / O(g^2) = 4 - ! i.e. we need to check whether the convergence rate is close to 4. - - ! The norms have not had a square root applied yet. - conv_rate = sqrt(norm_prev / norm) - - if ( abs( conv_rate - 4.0_r_def ) >= tol ) then - pass_str = "FAIL" - else - pass_str = "PASS" - end if - - write( log_scratch_space, '(A, A, A, E16.8, A, E16.8)') & - name, pass_str, " Convergence rate: ", conv_rate, " Tolerance: ", tol - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - end subroutine convergence_pass_string - - !> @brief Test the convergence rate for individual variables and the sum. - !> @details Calculate the convergence rate based on the norms - !> at two different iterations, and compare with the - !> expected value. Print out either PASS or FAIL, which - !> will then be used by the top level integration test. - !> @param[in] array_norm Norm at second iteration - !> @param[in] array_norm_prev Norm at first iteration - !> @param[in] array_names Name of the variable being tested - !> @param[in] n_variables Array lengths (number of variables) - !> @param[in] label Test name - !> @param[in] tol Tolerance value - subroutine array_convergence_rate_check( array_norm, array_norm_prev, array_names, n_variables, label, tol, indiv_tol) - integer(i_def), intent(in) :: n_variables - real(r_def), intent(in) :: array_norm(n_variables) - real(r_def), intent(in) :: array_norm_prev(n_variables) - character(str_def), intent(in) :: array_names(n_variables) - character(str_def), intent(in) :: label - real(r_def), optional, intent(in) :: tol - real(r_def), optional, intent(in) :: indiv_tol - real(r_def) :: tolerance, individual_tolerance - character(len=4) :: pass_str_arr(n_variables) - character(len=4) :: sum_pass_str, pass_str - character(str_def), parameter :: sum_name = "sum" - integer(i_def) :: i - real(r_def) :: sum, sum_prev + public convergence_rate_check - call log_event( "Checking convergence rate", LOG_LEVEL_INFO ) - - if ( present(tol) ) then - tolerance = tol - else - tolerance = 1.0E-8_r_def - end if - - if ( present(indiv_tol) ) then - individual_tolerance = indiv_tol - else - individual_tolerance = 1.0E-8_r_def - end if - - sum = 0.0_r_def - sum_prev = 0.0_r_def - do i= 1, n_variables - ! Check individual convergence rates - call convergence_pass_string( & - array_names(i), array_norm(i), & - array_norm_prev(i), pass_str_arr(i), & - individual_tolerance ) - - ! Weighted sum - sum = sum + array_norm(i) / array_norm_prev(i) - sum_prev = sum_prev + array_norm_prev(i) / array_norm_prev(i) - end do - - call convergence_pass_string( & - sum_name, sum, sum_prev, sum_pass_str, tolerance) - - pass_str = "PASS" - do i= 1, n_variables - if ( pass_str_arr(i) == "FAIL" ) pass_str = "FAIL" - end do - if ( sum_pass_str == "FAIL" ) pass_str = "FAIL" - - write(log_scratch_space,'(" test",A32," : ",A4)') trim(label), pass_str - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - end subroutine array_convergence_rate_check + contains !> @brief Calculate and test the convergence rate. !> @details Calculate the convergence rate based on the norms !> at two different iterations, and compare with the !> expected value. Print out either PASS or FAIL, which !> will then be used by the top level integration test. - !> @param[in] norm_diff Norm at second iteration - !> @param[in] norm_diff_prev Norm at first iteration + !> @param[in] norm_diff Norm at first iteration + !> @param[in] norm_diff_prev Norm at second iteration !> @param[in] label Name of the code being tested !> @param[in] tol Tolerance value subroutine convergence_rate_check( norm_diff, norm_diff_prev, label, tol ) @@ -147,6 +35,7 @@ subroutine convergence_rate_check( norm_diff, norm_diff_prev, label, tol ) character(str_def), intent(in) :: label real(r_def), optional, intent(in) :: tol real(r_def) :: tolerance + real(r_def) :: conv_rate character(len=4) :: pass_str if ( present(tol) ) then @@ -155,8 +44,23 @@ subroutine convergence_rate_check( norm_diff, norm_diff_prev, label, tol ) tolerance = 1.0E-8_r_def end if - call convergence_pass_string( & - label, norm_diff, norm_diff_prev, pass_str, tolerance) + conv_rate = norm_diff_prev/ norm_diff + + + + write( log_scratch_space, '(A)' ) & + "TL Test: " // trim(label) + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + write( log_scratch_space, '(A, E16.8)') & + "Convergence rate: ", conv_rate + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + + if ( abs(conv_rate - 4.0_r_def ) < tolerance ) then + pass_str = "PASS" + else + pass_str = "FAIL" + end if write(log_scratch_space,'(" test",A32," : ",A4)') trim(label), pass_str call log_event( log_scratch_space, LOG_LEVEL_INFO ) diff --git a/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 b/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 index 0d1c7e5ed..b93d850df 100644 --- a/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 +++ b/science/linear/integration-test/tl_test/tl_test_driver_mod.f90 @@ -48,13 +48,13 @@ module tl_test_driver_mod use tl_test_rhs_alg_mod, only : test_rhs_alg use tl_test_semi_imp_alg_mod, only : test_semi_imp_alg use tl_test_timesteps_alg_mod, only : test_timesteps - use tl_test_timesteps_random_alg_mod, only : test_timesteps_random implicit none private - public run_timesteps, & - run_timesteps_random, & + public initialise, & + finalise, & + run_timesteps, & run_kinetic_energy_gradient, & run_advect_density_field, & run_advect_theta_field, & @@ -72,47 +72,109 @@ module tl_test_driver_mod type(mesh_type), pointer :: mesh => null() type(mesh_type), pointer :: twod_mesh => null() + type(mesh_type), pointer :: aerosol_mesh => null() + type(mesh_type), pointer :: aerosol_twod_mesh => null() contains !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !>@brief Tests the tangent linear model for multiple timesteps - !>@param [in,out] modeldb The structure that holds model state - subroutine run_timesteps(modeldb) + !>@brief Sets up the required state in preparation for run. + !>@param [in] program_name An identifier given to the model being run + !>@param [in,out] modeldb The structure that holds model state + !> + subroutine initialise( program_name, modeldb, calendar ) implicit none - type(modeldb_type), intent(inout) :: modeldb + character(*), intent(in) :: program_name + type(modeldb_type), intent(inout) :: modeldb + class(calendar_type), intent(in) :: calendar + + type(gungho_time_axes_type) :: model_axes + type(io_value_type) :: temp_corr_io_value + type(io_value_type) :: random_seed_io_value + integer(i_def) :: random_seed_size + real(r_def), allocatable :: real_array(:) + call modeldb%values%initialise( 'values', 5 ) + + ! Initialise infrastructure and setup constants + ! + call initialise_infrastructure( program_name, modeldb ) + + ! Add a place to store time axes in modeldb + call modeldb%values%add_key_value('model_axes', model_axes) + + ! Get primary and 2D meshes for initialising model data mesh => mesh_collection%get_mesh(prime_mesh_name) twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_timesteps( modeldb, & - mesh, & - twod_mesh, & - modeldb%clock ) - - end subroutine run_timesteps + ! Assume aerosol mesh is the same as dynamics mesh + aerosol_mesh => mesh + aerosol_twod_mesh => twod_mesh + + ! gungho_init_field() expects these values to exist. The dependency of + ! the linear application tests on this procedure will hopefully be resolved + ! in the future, at which point this initialisation may be removed. + ! + call temp_corr_io_value%init('temperature_correction_rate', [0.0_r_def]) + call modeldb%values%add_key_value( 'temperature_correction_io_value', & + temp_corr_io_value ) + call modeldb%values%add_key_value( 'total_dry_mass', 0.0_r_def ) + call modeldb%values%add_key_value( 'total_energy', 0.0_r_def ) + call modeldb%values%add_key_value( 'total_energy_previous', 0.0_r_def ) + if ( stochastic_physics == stochastic_physics_um ) then + ! Random seed for stochastic physics + call random_seed(size = random_seed_size) + allocate(real_array(random_seed_size)) + real_array(1:random_seed_size) = 0.0_r_def + call random_seed_io_value%init("random_seed", real_array) + call modeldb%values%add_key_value( 'random_seed_io_value', & + random_seed_io_value ) + deallocate(real_array) + end if + + ! Instantiate the fields stored in model_data + call create_model_data( modeldb, & + mesh, & + twod_mesh, & + aerosol_mesh, & + aerosol_twod_mesh ) + + ! Instantiate the linearisation state + call linear_create_ls( modeldb, mesh ) + + ! Initialise the fields stored in the model_data prognostics. This needs + ! to be done before initialise_model. + call initialise_model_data( modeldb, mesh, twod_mesh ) + + ! Model configuration initialisation + call initialise_model( mesh, & + modeldb ) + + ! Initialise the linearisation state + call linear_init_ls( mesh, twod_mesh, modeldb ) + + ! Finalise model + call finalise_model(modeldb) + + end subroutine initialise !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !>@brief Tests the tangent linear model for multiple timesteps - !! using prescribed random data for the initial conditions !>@param [in,out] modeldb The structure that holds model state - subroutine run_timesteps_random(modeldb) + subroutine run_timesteps(modeldb) implicit none type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - - call test_timesteps_random( modeldb, & - mesh, & - twod_mesh, & - modeldb%clock ) + call test_timesteps( modeldb, & + mesh, & + twod_mesh, & + modeldb%clock ) - end subroutine run_timesteps_random + end subroutine run_timesteps !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !>@brief Tests the tangent linear model kinetic energy gradient kernel @@ -123,9 +185,6 @@ subroutine run_kinetic_energy_gradient(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_kinetic_energy_gradient( modeldb, & mesh, & twod_mesh ) @@ -141,9 +200,6 @@ subroutine run_advect_density_field(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_advect_density_field( modeldb, & mesh, & twod_mesh ) @@ -159,9 +215,6 @@ subroutine run_advect_theta_field(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_advect_theta_field( modeldb, & mesh, & twod_mesh ) @@ -177,9 +230,6 @@ subroutine run_vorticity_advection(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_vorticity_advection( modeldb, & mesh, & twod_mesh ) @@ -195,9 +245,6 @@ subroutine run_project_eos_pressure(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_project_eos_pressure( modeldb, & mesh, & twod_mesh ) @@ -213,9 +260,6 @@ subroutine run_sample_eos_pressure(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_sample_eos_pressure( modeldb, & mesh, & twod_mesh ) @@ -231,9 +275,6 @@ subroutine run_hydrostatic(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_hydrostatic( modeldb, & mesh, & twod_mesh ) @@ -249,9 +290,6 @@ subroutine run_pressure_gradient_bd(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_pressure_gradient_bd( modeldb, & mesh, & twod_mesh ) @@ -267,8 +305,6 @@ subroutine run_rk_alg(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - call test_rk_alg( modeldb, & mesh) @@ -283,9 +319,6 @@ subroutine run_transport_control(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_transport_control( modeldb, & mesh, & twod_mesh ) @@ -301,9 +334,6 @@ subroutine run_semi_imp_alg(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_semi_imp_alg( modeldb, & mesh, & twod_mesh ) @@ -319,9 +349,6 @@ subroutine run_rhs_alg(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_rhs_alg( modeldb, & mesh, & twod_mesh ) @@ -337,9 +364,6 @@ subroutine run_rhs_project_eos(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_rhs_project_eos( modeldb, & mesh, & twod_mesh ) @@ -355,13 +379,31 @@ subroutine run_rhs_sample_eos(modeldb) type(modeldb_type), intent(inout) :: modeldb - mesh => mesh_collection%get_mesh(prime_mesh_name) - twod_mesh => mesh_collection%get_mesh(mesh, TWOD) - call test_rhs_sample_eos( modeldb, & mesh, & twod_mesh ) end subroutine run_rhs_sample_eos + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !>@brief Tidies up after a run. + !>@param [in] program_name An identifier given to the model being run + !>@param [in,out] modeldb The structure that holds model state + subroutine finalise( program_name, modeldb ) + + implicit none + + character(*), intent(in) :: program_name + type(modeldb_type), intent(inout) :: modeldb + + call log_event( 'Finalising '//program_name//' ...', LOG_LEVEL_ALWAYS ) + + ! Destroy the fields stored in model_data + call finalise_model_data( modeldb ) + + ! Finalise infrastructure and constants + call finalise_infrastructure(modeldb) + + end subroutine finalise + end module tl_test_driver_mod diff --git a/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 b/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 index 5aa4f198b..fbcb7baad 100644 --- a/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_hydrostatic_mod.x90 @@ -189,6 +189,8 @@ module tl_test_hydrostatic_mod inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) + write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 b/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 index f2910b1b3..2138662af 100644 --- a/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_kinetic_energy_gradient_mod.x90 @@ -135,6 +135,7 @@ module tl_test_kinetic_energy_gradient_mod call invoke( X_minus_Y( diff, n2_rhs_u, n1_rhs_u ), & inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 b/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 index 5a9f0210e..8bb6117a3 100644 --- a/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_pressure_grad_bd_mod.x90 @@ -213,6 +213,8 @@ module tl_test_pressure_grad_bd_mod inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) + write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 b/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 index 9fc26e063..01ef9b694 100644 --- a/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_project_eos_pressure_mod.x90 @@ -195,6 +195,7 @@ module tl_test_project_eos_pressure_mod call invoke( X_minus_Y( diff, n2_exner, n1_exner ), & inc_X_minus_Y( diff, p_exner ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma , ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 index 6207afcd8..1c483372f 100644 --- a/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rhs_alg_mod.x90 @@ -18,7 +18,7 @@ module tl_test_rhs_alg_mod use function_space_mod, only: function_space_type use derived_config_mod, only: bundle_size use moist_dyn_mod, only: num_moist_factors - use mr_indices_mod, only: nummr + use sci_assign_field_random_kernel_mod, only: assign_field_random_kernel_type use field_indices_mod, only: igh_u, igh_t, igh_d, igh_p use sci_field_bundle_builtins_mod, only: clone_bundle, & add_bundle, & @@ -29,9 +29,7 @@ module tl_test_rhs_alg_mod use tl_rhs_alg_mod, only: tl_rhs_alg use log_mod, only: log_event, LOG_LEVEL_INFO, & LOG_LEVEL_ERROR - use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg - use tl_moist_dyn_factors_alg_mod, only: tl_moist_dyn_factors_alg - use tl_test_convergence_rate_check, only: array_convergence_rate_check + use tl_test_convergence_rate_check, only: convergence_rate_check implicit none @@ -58,8 +56,8 @@ module tl_test_rhs_alg_mod character(str_def) :: label = "rhs_alg" - type( field_collection_type ), pointer :: ls_fields - type( field_collection_type ), pointer :: prognostic_fields => null() + type(field_collection_type ), pointer :: ls_fields + type( field_type ) :: state(bundle_size) type( field_type ) :: ls_state(bundle_size) @@ -75,62 +73,37 @@ module tl_test_rhs_alg_mod type(field_type), pointer :: ls_theta => null() type(field_type), pointer :: ls_exner => null() type(field_type), pointer :: ls_moist_dyn(:) => null() - type(field_type), pointer :: ls_mr(:) => null() - type(field_type), pointer :: u => null() - type(field_type), pointer :: rho => null() - type(field_type), pointer :: theta => null() - type(field_type), pointer :: exner => null() - type(field_type), pointer :: moist_dyn(:) => null() - type(field_type), pointer :: mr(:) => null() type(field_type), dimension(num_moist_factors) :: p_moist_dyn type(field_type), dimension(num_moist_factors) :: n_moist_dyn type(field_type), dimension(num_moist_factors) :: r_moist_dyn type(field_collection_type), pointer :: moisture_fields => null() - type(field_array_type), pointer :: mr_array => null() - type(field_array_type), pointer :: moist_dyn_array => null() - type(field_array_type), pointer :: ls_mr_array => null() type(field_array_type), pointer :: ls_moist_dyn_array => null() real(r_def) :: gamma_u, gamma_rho, gamma_exner, gamma_theta, & gamma_moist_dyn - real(r_def) :: norm_u, norm_exner - integer(i_def), parameter :: n_variables = 2 - real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) - character(str_def) :: array_names(n_variables) + real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta, norm_moist_dyn + real(r_def) :: norm_moist_dyn_tmp + real(r_def) :: norm_diff, norm_diff_prev - real(r_def), parameter :: tol = 5.e-2_r_def - real(r_def), parameter :: indiv_tol = 5.e-1_r_def + real(r_def), parameter :: tol = 1.e-2_r_def integer :: i, n call log_event( "TL Test: " // trim(label), & LOG_LEVEL_INFO ) - prognostic_fields => modeldb%fields%get_field_collection( & - "prognostic_fields") ls_fields => modeldb%fields%get_field_collection("ls_fields") moisture_fields => modeldb%fields%get_field_collection("moisture_fields") - call moisture_fields%get_field("mr", mr_array) - call moisture_fields%get_field("moist_dyn", moist_dyn_array) - mr => mr_array%bundle - moist_dyn => moist_dyn_array%bundle - call moisture_fields%get_field("ls_mr", ls_mr_array) call moisture_fields%get_field("ls_moist_dyn", ls_moist_dyn_array) - ls_mr => ls_mr_array%bundle ls_moist_dyn => ls_moist_dyn_array%bundle - ! Linearisation state + ! Input call ls_fields%get_field('ls_u', ls_u) call ls_fields%get_field('ls_rho', ls_rho) call ls_fields%get_field('ls_theta', ls_theta) call ls_fields%get_field('ls_exner', ls_exner) - ! Perturbation - call prognostic_fields%get_field('u', u) - call prognostic_fields%get_field('rho', rho) - call prognostic_fields%get_field('theta', theta) - call prognostic_fields%get_field('exner', exner) call ls_state(igh_u)%initialise( vector_space = ls_u%get_function_space() ) call ls_state(igh_t)%initialise( vector_space = ls_theta%get_function_space() ) @@ -154,27 +127,24 @@ module tl_test_rhs_alg_mod setval_X(ls_state(igh_d), ls_rho ), & setval_X(ls_state(igh_p), ls_exner) ) - call moist_dyn_factors_alg(ls_moist_dyn, ls_mr) - - ! Set the 'random data' to be the perturbation - call invoke( name = "copy_fields_to_state", & - setval_X(random(igh_u), u ), & - setval_X(random(igh_p), exner ), & - setval_X(random(igh_t), theta), & - setval_X(random(igh_d), rho ) ) + call invoke( assign_field_random_kernel_type( random(igh_u), 1.0_r_def ) , & + assign_field_random_kernel_type( random(igh_d), 1.0_r_def ) , & + assign_field_random_kernel_type( random(igh_t), 1.0_r_def ) , & + assign_field_random_kernel_type( random(igh_p), 1.0_r_def ) ) - call tl_moist_dyn_factors_alg(r_moist_dyn, mr ) + do i = 1, num_moist_factors + call invoke( assign_field_random_kernel_type( r_moist_dyn(i), 1.0_r_def ) ) + enddo - gamma_u = 1.0_r_def - gamma_theta = 1.0_r_def - gamma_rho = 1.0_r_def - gamma_exner = 1.0_r_def - gamma_moist_dyn = 1.0_r_def + gamma_u = 1.e2_r_def + gamma_theta = 1.e2_r_def + gamma_rho = 1.e2_r_def + gamma_exner = 1.e1_r_def + gamma_moist_dyn = 1.e-1_r_def call set_bundle_scalar( 0.0_r_def, n1_rhs, bundle_size ) call rhs_alg( n1_rhs, dt, ls_state, ls_state, ls_moist_dyn, & - compute_eos=.true., compute_rhs_t_d=.true., & - dlayer_rhs=.true., model_clock=modeldb%clock ) + .true., .true., .false., modeldb%clock ) do n=1,2 gamma_u = gamma_u / 2.0_r_def @@ -196,45 +166,42 @@ module tl_test_rhs_alg_mod do i = 1, num_moist_factors call invoke( & a_times_X( p_moist_dyn(i), gamma_moist_dyn, r_moist_dyn(i) ), & - setval_X( n_moist_dyn(i), ls_moist_dyn(i) ), & + setval_X( n_moist_dyn(i), ls_moist_dyn(i) ), & inc_X_plus_Y( n_moist_dyn(i), p_moist_dyn(i) ) ) enddo call rhs_alg( n2_rhs, dt, state, state, n_moist_dyn, & - compute_eos=.true., compute_rhs_t_d=.true., & - dlayer_rhs=.true., model_clock=modeldb%clock ) + .true., .true., .false., modeldb%clock ) call tl_rhs_alg(p_rhs, dt, p_state, p_state, p_moist_dyn, & ls_state, ls_moist_dyn, & - compute_eos=.true., dlayer_rhs=.true., & - model_clock=modeldb%clock) + .true., .false., modeldb%clock) ! diff = n2_rhs - n1_rhs call minus_bundle( n2_rhs, n1_rhs, diff, bundle_size ) call invoke( & inc_X_minus_Y( diff(igh_u), p_rhs(igh_u) ), & + inc_X_minus_Y( diff(igh_t), p_rhs(igh_t) ), & + inc_X_minus_Y( diff(igh_d), p_rhs(igh_d) ), & inc_X_minus_Y( diff(igh_p), p_rhs(igh_p) ) ) call invoke( X_innerproduct_X( norm_u, diff(igh_u) ) , & + X_innerproduct_X( norm_rho, diff(igh_d) ) , & + X_innerproduct_X( norm_theta, diff(igh_t) ) , & X_innerproduct_X( norm_exner, diff(igh_p) ) ) - ! The equations for rho and theta are already linear - ! so only evaluate u and exner - array_norm(1) = norm_u - array_norm(2) = norm_exner - array_names(1) = 'norm_u' - array_names(2) = 'norm_exner' + print*, norm_u, norm_rho, norm_theta, norm_exner + norm_diff = norm_u + norm_rho + norm_theta + norm_exner + norm_diff = sqrt(norm_diff) + print*,'norm', norm_diff if (n == 2) then - call array_convergence_rate_check( & - array_norm, array_norm_prev, & - array_names, n_variables, label, tol=tol, & - indiv_tol=indiv_tol ) - end if - - array_norm_prev = array_norm + call convergence_rate_check( norm_diff, norm_diff_prev, & + label, tol=tol ) + endif + norm_diff_prev = norm_diff enddo end subroutine test_rhs_alg diff --git a/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 index 8b39ecb51..9504122f7 100644 --- a/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rhs_project_eos_mod.x90 @@ -209,6 +209,7 @@ contains call invoke( X_minus_Y( diff, n2_rhs, n1_rhs ), & inc_X_minus_Y( diff, p_rhs ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) if (n == 2) then call convergence_rate_check( norm_diff, norm_diff_prev, & diff --git a/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 index 0d1cd26d1..49d69273f 100644 --- a/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rhs_sample_eos_mod.x90 @@ -195,6 +195,7 @@ contains call invoke( X_minus_Y( diff, n2_rhs, n1_rhs ), & inc_X_minus_Y( diff, p_rhs ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) if (n == 2) then call convergence_rate_check( norm_diff, norm_diff_prev, & diff --git a/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 index d16f4c14c..9b99f0fc8 100644 --- a/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_rk_alg_mod.x90 @@ -251,7 +251,6 @@ module tl_test_rk_alg_mod ! Evolve the perturbation fields with the linear timestep. This ! gives p_x=L(gamma r_x) - call tl_rk_alg_final() call tl_rk_alg_init(mesh, p_u, p_rho, p_theta, p_exner, & ls_u, ls_rho, ls_theta, ls_exner) @@ -301,6 +300,7 @@ module tl_test_rk_alg_mod call log_event( log_scratch_space, LOG_LEVEL_INFO ) norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_moist_dyn + norm_diff = sqrt(norm_diff) if (n == 2) then ! Compare results from first and second iteration diff --git a/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 b/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 index 1915214ca..b6f56addf 100644 --- a/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_sample_eos_pressure_mod.x90 @@ -175,6 +175,7 @@ module tl_test_sample_eos_pressure_mod call invoke( X_minus_Y( diff, n2_exner, n1_exner ), & inc_X_minus_Y( diff, p_exner ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma , ' norm = ', norm_diff diff --git a/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 index 30bf004ec..2b060eac1 100644 --- a/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_semi_imp_alg_mod.x90 @@ -10,6 +10,8 @@ !! implicit algorithm, using the Taylor remainder convergence test. module tl_test_semi_imp_alg_mod + use sci_assign_field_random_kernel_mod, & + only: assign_field_random_kernel_type use constants_mod, only: i_def, r_def, str_def use field_array_mod, only: field_array_type use field_mod, only: field_type @@ -37,7 +39,7 @@ module tl_test_semi_imp_alg_mod use timestep_method_mod, only: timestep_method_type use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg use tl_moist_dyn_factors_alg_mod, only: tl_moist_dyn_factors_alg - use tl_test_convergence_rate_check, only: array_convergence_rate_check + use tl_test_convergence_rate_check, only: convergence_rate_check implicit none @@ -126,12 +128,9 @@ module tl_test_semi_imp_alg_mod real(r_def) :: gamma_mr real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta real(r_def) :: norm_mr, norm_mr_tmp - integer(i_def), parameter :: n_variables = 5 - real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) - character(str_def) :: array_names(n_variables) + real(r_def) :: norm_diff, norm_diff_prev - real(r_def), parameter :: tol = 5.e-2_r_def - real(r_def), parameter :: indiv_tol = 5.e-1_r_def + real(r_def), parameter :: tol = 5.e-1_r_def real(r_def), parameter :: dtemp_encorr = 0.0_r_def integer :: n, i @@ -174,14 +173,12 @@ module tl_test_semi_imp_alg_mod aerosol_fields => modeldb%fields%get_field_collection("aerosol_fields") stph_fields => modeldb%fields%get_field_collection("stph_fields") lbc_fields => modeldb%fields%get_field_collection("lbc_fields") - - ! Linearisation State + ! Input call ls_fields%get_field('ls_u', ls_u) call ls_fields%get_field('ls_rho', ls_rho) call ls_fields%get_field('ls_theta', ls_theta) call ls_fields%get_field('ls_exner', ls_exner) - ! Perturbation call prognostic_fields%get_field('u', u) call prognostic_fields%get_field('rho', rho) call prognostic_fields%get_field('theta', theta) @@ -231,29 +228,15 @@ module tl_test_semi_imp_alg_mod call clone_bundle(mr, b_mr, nummr) call clone_bundle(mr, diff_mr, nummr) - ! Set the 'random data' to be the perturbation - call invoke( name = "copy_fields_to_state", & - setval_X(r_u, u ), & - setval_X(r_exner, exner ), & - setval_X(r_theta, theta), & - setval_X(r_rho, rho ) ) - - ! Overwrite the moisture fields with potential temperature - ! - ! Note: The perturbation fields are read in from file. However the - ! moisture perturbation fields have values close to zero (especially - ! at upper levels) and this gives an inaccurate linearisation test. Using - ! potential temperature is an easy fix to create a realistic 'random' - ! field using real data that has mostly non-zero values. + call invoke( assign_field_random_kernel_type( r_u, 1.0_r_def ) , & + assign_field_random_kernel_type( r_rho, 1.0_r_def ) , & + assign_field_random_kernel_type( r_theta, 1.0_r_def ) , & + assign_field_random_kernel_type( r_exner, 1.0_r_def ) ) + do i = 1, nummr - call invoke( & - setval_X( r_mr(i), theta ), & - inc_a_times_X( 0.000001_r_def, r_mr(i) ), & - setval_X( ls_mr(i), ls_theta ), & - inc_a_times_X( 0.000001_r_def, ls_mr(i) )) + call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) end do - ! Set the prognostic fields to be the linearisation state call invoke( setval_X( u, ls_u ), & setval_X( theta, ls_theta ), & setval_X( rho, ls_rho ), & @@ -264,9 +247,7 @@ module tl_test_semi_imp_alg_mod end do do i = 1, nummr call invoke( setval_X( mr(i), ls_mr(i) ) ) - end do - - call moist_dyn_factors_alg(moist_dyn, mr) + end do ! Clean up solvers left over from previous tests, as semi-implicit ! method will create new solvers which cause double-allocates @@ -293,15 +274,15 @@ module tl_test_semi_imp_alg_mod call invoke( setval_X( b_mr(i), mr(i) ) ) end do - gamma_u = 6.5_r_def - gamma_theta = 6.5_r_def - gamma_rho = 6.5_r_def - gamma_exner = 6.5_r_def + gamma_u = 1.e4_r_def + gamma_theta = 1.e2_r_def + gamma_rho = 8.0e-1_r_def + gamma_exner = 6.5e-1_r_def if ( moisture_formulation == moisture_formulation_dry ) then gamma_mr = 0.0_r_def else - gamma_mr = 6.5_r_def + gamma_mr = 1.e-2_r_def end if do n=1,2 @@ -347,8 +328,6 @@ module tl_test_semi_imp_alg_mod ! Evolve the perturbation fields with the linear timestep. This ! gives p_x=L(gamma r_x) - call final_si_operators() - call tl_semi_implicit_alg_final() call tl_semi_implicit_alg_init(mesh, p_u, p_rho, p_theta, p_exner, & p_mr, ls_u, ls_rho, ls_theta, ls_exner, & ls_mr, ls_moist_dyn) @@ -386,24 +365,35 @@ module tl_test_semi_imp_alg_mod norm_mr = norm_mr + norm_mr_tmp end do - array_norm(1) = norm_u - array_norm(2) = norm_rho - array_norm(3) = norm_theta - array_norm(4) = norm_mr - array_norm(5) = norm_exner - array_names(1) = 'norm_u' - array_names(2) = 'norm_rho' - array_names(3) = 'norm_theta' - array_names(4) = 'norm_mr' - array_names(5) = 'norm_exner' + write( log_scratch_space, & + '(A, E32.12, A, E32.12 )' ) & + ' norm_u = ' , norm_u, & + ' norm_rho = ' , norm_rho + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12 )' ) & + ' norm_mr = ' , norm_mr, & + ' norm_exner = ' , norm_exner + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12 )' ) & + ' norm_theta = ' , norm_theta + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_mr + norm_diff = sqrt(norm_diff) if (n == 2) then - call array_convergence_rate_check( array_norm, array_norm_prev, & - array_names, n_variables, label, tol=tol, indiv_tol=indiv_tol ) + call convergence_rate_check( norm_diff, norm_diff_prev, & + label, tol=tol ) end if - array_norm_prev = array_norm - + norm_diff_prev = norm_diff end do end subroutine test_semi_imp_alg diff --git a/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 index 686e0cad9..65759abf9 100644 --- a/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_timesteps_alg_mod.x90 @@ -44,7 +44,7 @@ module tl_test_timesteps_alg_mod method, & method_rk use time_config_mod, only: timestep_start, timestep_end - use tl_test_convergence_rate_check, only: array_convergence_rate_check + use tl_test_convergence_rate_check, only: convergence_rate_check use validity_test_config_mod, only: number_gamma_values, & update_ls_frequency use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg @@ -52,6 +52,7 @@ module tl_test_timesteps_alg_mod implicit none + private convergence_pass_string public test_timesteps contains @@ -119,12 +120,8 @@ module tl_test_timesteps_alg_mod real(r_def) :: denom_u, denom_rho, denom_exner, denom_theta, denom_mr real(r_def) :: denom_mr_tmp real(r_def) :: denom_total - integer(i_def), parameter :: n_variables = 5 - real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) - character(str_def) :: array_names(n_variables) - real(r_def), parameter :: tol = 3.e-1_r_def - real(r_def), parameter :: indiv_tol = 1.2_r_def + real(r_def), parameter :: tol = 9.e-1_r_def integer(i_def) :: n, i, t character(len=4) :: pass_str @@ -215,32 +212,24 @@ module tl_test_timesteps_alg_mod function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) call clone_bundle(mr, diff_mr, nummr) - ! Set the 'random data' to be the perturbation - call invoke( name = "copy_fields_to_state", & - setval_X(r_u, u ), & - setval_X(r_exner, exner ), & - setval_X(r_theta, theta), & - setval_X(r_rho, rho ) ) + call invoke( assign_field_random_kernel_type( r_u, 1.0_r_def ) , & + assign_field_random_kernel_type( r_rho, 1.0_r_def ) , & + assign_field_random_kernel_type( r_theta, 1.0_r_def ) , & + assign_field_random_kernel_type( r_exner, 1.0_r_def ) ) - ! Overwrite the moisture fields with potential temperature do i = 1, nummr - call invoke( & - setval_X( r_mr(i), theta ), & - inc_a_times_X( 0.000001_r_def, r_mr(i) ), & - setval_X( ls_mr(i), ls_theta ), & - inc_a_times_X( 0.000001_r_def, ls_mr(i) )) + call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) end do - call moist_dyn_factors_alg( ls_moist_dyn, ls_mr ) - gamma_u = 6.5_r_def - gamma_theta = 6.5_r_def - gamma_rho = 6.5_r_def - gamma_exner = 6.5_r_def + gamma_u = 1.e4_r_def + gamma_theta = 1.e2_r_def + gamma_rho = 1.e0_r_def + gamma_exner = 6.5e-1_r_def - if ( use_moisture ) then - gamma_mr = 6.5_r_def + if ( use_moisture ) then + gamma_mr = 1.e-1_r_def else - gamma_mr = 0._r_def + gamma_mr = 0.0_r_def end if do n = 1, number_gamma_values @@ -288,10 +277,6 @@ module tl_test_timesteps_alg_mod !------------------------------------------------------------------------ ! Nonlinear model run with perturbed state !------------------------------------------------------------------------ - write(log_scratch_space,'(A, I2)') & - "Perturbed Nonlinear, timestep: ", t - call log_event(log_scratch_space, LOG_LEVEL_INFO) - call invoke( setval_X( u, n1_u ), & setval_X( theta, n1_theta ), & setval_X( rho, n1_rho ), & @@ -329,10 +314,6 @@ module tl_test_timesteps_alg_mod !------------------------------------------------------------------------ ! Linear model run !------------------------------------------------------------------------ - write(log_scratch_space,'(A, I2)') & - "Linear, timestep: ", t - call log_event(log_scratch_space, LOG_LEVEL_INFO) - call invoke( setval_X( u, p_u ), & setval_X( theta, p_theta ), & setval_X( rho, p_rho ), & @@ -356,7 +337,6 @@ module tl_test_timesteps_alg_mod call moist_dyn_factors_alg( ls_moist_dyn, ls_mr ) endif - call finalise_linear_model() call initialise_linear_model( mesh, & modeldb ) @@ -379,10 +359,6 @@ module tl_test_timesteps_alg_mod !------------------------------------------------------------------------ ! Nonlinear model run with un-perturbed state !------------------------------------------------------------------------ - write(log_scratch_space,'(A, I2)') & - "Unperturbed NonLinear, timestep: ", t - call log_event(log_scratch_space, LOG_LEVEL_INFO) - call invoke( setval_X( u, n2_u ), & setval_X( theta, n2_theta ), & setval_X( rho, n2_rho ), & @@ -410,10 +386,6 @@ module tl_test_timesteps_alg_mod setval_X( n2_rho, rho ), & setval_X( n2_exner, exner ) ) - do i = 1, nummr - call invoke( setval_X( n2_mr(i), mr(i) ) ) - end do - do i = 1, nummr call invoke( setval_X( ls_mr(i), mr(i) ) ) end do @@ -445,67 +417,160 @@ module tl_test_timesteps_alg_mod norm_mr = norm_mr + norm_mr_tmp end do - array_norm(1) = norm_u - array_norm(2) = norm_rho - array_norm(3) = norm_theta - array_norm(4) = norm_mr - array_norm(5) = norm_exner - array_names(1) = 'norm_u' - array_names(2) = 'norm_rho' - array_names(3) = 'norm_theta' - array_names(4) = 'norm_mr' - array_names(5) = 'norm_exner' + norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_mr + norm_diff = sqrt( norm_diff ) + norm_u = sqrt( norm_u ) + norm_rho= sqrt( norm_rho ) + norm_theta = sqrt( norm_theta ) + norm_exner = sqrt( norm_exner ) + norm_mr = sqrt( norm_mr ) - if (n == 2) then - call array_convergence_rate_check( array_norm, array_norm_prev, & - array_names, n_variables, label, tol=tol, indiv_tol=indiv_tol ) - end if + call invoke( X_innerproduct_X( denom_u, p_u ) ) + call invoke( X_innerproduct_X( denom_rho, p_rho ) ) + call invoke( X_innerproduct_X( denom_exner, p_exner ) ) + call invoke( X_innerproduct_X( denom_theta, p_theta ) ) + + denom_mr=0.0_r_def + do i = 1, nummr + call invoke( & + X_innerproduct_X( denom_mr_tmp, p_mr(i) ) ) + denom_mr = denom_mr + denom_mr_tmp + end do - array_norm_prev = array_norm + denom_total = denom_rho + denom_theta + denom_exner + denom_u + denom_mr + denom_total = sqrt( denom_total ) + denom_u = sqrt( denom_u ) + denom_rho = sqrt( denom_rho ) + denom_theta = sqrt( denom_theta ) + denom_exner = sqrt( denom_exner ) + denom_mr = sqrt( denom_mr ) !---------------------------------------------------------------------------- ! Print values out to enable plotting a graph !---------------------------------------------------------------------------- + write( log_scratch_space, & + '( A, E32.12, A, E32.12 )' ) & + ' gamma_total = ' , gamma_u, & + ' norm = ' , norm_diff / denom_total + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_rho = ' , gamma_rho, & - ' norm = ' , norm_rho + ' gamma_rho = ' , gamma_u, & + ' norm = ' , norm_rho / denom_rho call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_exner = ' , gamma_exner, & - ' norm = ' , norm_exner + ' gamma_exner = ' , gamma_u, & + ' norm = ' , norm_exner / denom_exner call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_theta = ' , gamma_theta, & - ' norm = ' , norm_theta + ' gamma_theta = ' , gamma_u, & + ' norm = ' , norm_theta / denom_theta call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & ' gamma_u = ' , gamma_u, & - ' norm = ' , norm_u + ' norm = ' , norm_u / denom_u call log_event( log_scratch_space, LOG_LEVEL_INFO ) write( log_scratch_space, & '(A, E32.12, A, E32.12)' ) & - ' gamma_mr = ' , gamma_mr, & - ' norm = ' , norm_mr + ' gamma_mr = ' , gamma_u, & + ' norm = ' , norm_mr / denom_mr call log_event( log_scratch_space, LOG_LEVEL_INFO ) +!---------------------------------------------------------------------------- +! Test that gives a PASS or FAIL +!---------------------------------------------------------------------------- + if (n == 2) then + + pass_str = "PASS" + + write( log_scratch_space, '(A)' ) & + "TL Test: " // trim(label) + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, '(A)' ) "Total " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "Theta " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_theta, norm_theta_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "Rho " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_rho, norm_rho_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "Exner " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_exner, norm_exner_prev, pass_str, tol ) + + write( log_scratch_space, '(A)' ) "u " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_u, norm_u_prev, pass_str, tol ) + + if ( use_moisture ) then + write( log_scratch_space, '(A)' ) "mr " + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + call convergence_pass_string( norm_mr, norm_mr_prev, pass_str, tol ) + end if + + write( log_scratch_space,'(" test",A32," : ",A4)' ) trim(label), pass_str + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + end if + + norm_diff_prev = norm_diff + norm_rho_prev = norm_rho + norm_theta_prev = norm_theta + norm_exner_prev = norm_exner + norm_u_prev = norm_u + norm_mr_prev = norm_mr + end do ! Loop over values of gamma end subroutine test_timesteps + !> @brief Test the convergence rate. + !> @details If the convergence rate is not close to 4, within the + !! specified tolerance, then change the pass string to FAIL. + !> @param[in] norm_diff Current norm + !> @param[in] norm_diff_prev Previous norm + !> @param[inout] pass_str Pass string (either PASS or FAIL) + !> @param[in] tol Test Tolerance + subroutine convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) + implicit none + + real(r_def), intent(in) :: norm_diff, norm_diff_prev + character(len=4), intent(inout) :: pass_str + real(r_def), intent(in) :: tol + + real(r_def) :: conv_rate + conv_rate = norm_diff_prev / norm_diff + + conv_rate = norm_diff_prev / norm_diff + write( log_scratch_space, '(A, E16.8)') & + "Convergence rate: ", conv_rate + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + if ( abs( conv_rate - 4.0_r_def ) >= tol ) then + pass_str = "FAIL" + endif + + end subroutine convergence_pass_string + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> Converts a string to a timestep number. !> diff --git a/science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 b/science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 deleted file mode 100644 index 6ea6ff295..000000000 --- a/science/linear/integration-test/tl_test/tl_test_timesteps_random_alg_mod.x90 +++ /dev/null @@ -1,597 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- - -!>@brief The tangent linear test for multiple timesteps -!! (Taylor remainder convergence). -!>@details Test whether the tangent linear code is tangent linear -!! to the corresponding nonlinear code, for multiple timesteps, -!! using the Taylor remainder convergence test. -module tl_test_timesteps_random_alg_mod - use sci_assign_field_random_kernel_mod, & - only: assign_field_random_kernel_type - use constants_mod, only: i_timestep, i_def, r_def, l_def, & - str_def - use field_array_mod, only: field_array_type - use field_mod, only: field_type - use sci_field_bundle_builtins_mod, only: clone_bundle - use field_collection_mod, only: field_collection_type - use finite_element_config_mod, only: element_order_h, element_order_v - use formulation_config_mod, only: moisture_formulation, & - moisture_formulation_dry - use fs_continuity_mod, only: W2, W3, Wtheta - use function_space_collection_mod, only: function_space_collection - use gungho_step_mod, only: gungho_step - use gungho_model_mod, only: initialise_model, & - finalise_model - use driver_modeldb_mod, only: modeldb_type - use log_mod, only: log_event, & - log_scratch_space, & - LOG_LEVEL_INFO, & - LOG_LEVEL_ERROR - use linear_step_mod, only: linear_step - use linear_model_mod, only: initialise_linear_model, & - finalise_linear_model - use mesh_mod, only: mesh_type - use model_clock_mod, only: model_clock_type - use moist_dyn_mod, only: num_moist_factors - use mr_indices_mod, only: nummr - use semi_implicit_solver_alg_mod, only: semi_implicit_solver_alg_final - use si_operators_alg_mod, only: final_si_operators - use timestepping_config_mod, only: dt, & - method, & - method_rk - use time_config_mod, only: timestep_start, timestep_end - use tl_test_convergence_rate_check, only: convergence_rate_check - use validity_test_config_mod, only: number_gamma_values, & - update_ls_frequency - use moist_dyn_factors_alg_mod, only: moist_dyn_factors_alg - use tl_moist_dyn_factors_alg_mod, only: tl_moist_dyn_factors_alg - - implicit none - - private convergence_pass_string - public test_timesteps_random - - contains - - !> @brief Test the tangent linear runge-kutta algorithm. - !> @param[in] modeldb The working data set for a model run - !> @param[in] mesh The current 3d mesh - !> @param[in] twod_mesh The current 2d mesh - !> @param[in] model_clock Time within the model. - !> - subroutine test_timesteps_random( modeldb, & - mesh, & - twod_mesh, & - model_clock ) - - implicit none - - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(mesh_type), pointer, intent(in) :: twod_mesh - class(model_clock_type), intent(in) :: model_clock - - character(str_def) :: label = "timesteps" - - type(field_collection_type), pointer :: prognostic_fields - type(field_collection_type), pointer :: ls_fields - - type(field_type), pointer :: ls_u - type(field_type), pointer :: ls_rho - type(field_type), pointer :: ls_theta - type(field_type), pointer :: ls_exner - type(field_type), pointer :: ls_moist_dyn(:) - type(field_type), pointer :: ls_mr(:) - - type(field_type), pointer :: u - type(field_type), pointer :: rho - type(field_type), pointer :: theta - type(field_type), pointer :: exner - type(field_type), pointer :: moist_dyn(:) - type(field_type), pointer :: mr(:) - - type(field_type), dimension(nummr) :: p_mr - type(field_type), dimension(nummr) :: n1_mr - type(field_type), dimension(nummr) :: n2_mr - type(field_type), dimension(nummr) :: r_mr - type(field_type), dimension(nummr) :: diff_mr - type(field_type) :: p_u, p_rho, p_theta, p_exner - type(field_type) :: n1_u, n1_rho, n1_theta, n1_exner - type(field_type) :: n2_u, n2_rho, n2_theta, n2_exner - type(field_type) :: r_u, r_rho, r_theta, r_exner - type(field_type) :: diff_u, diff_rho, diff_theta, diff_exner - - type(field_collection_type), pointer :: moisture_fields - type(field_array_type), pointer :: mr_array - type(field_array_type), pointer :: moist_dyn_array - type(field_array_type), pointer :: ls_mr_array - type(field_array_type), pointer :: ls_moist_dyn_array - - real(r_def) :: gamma_u, gamma_rho, gamma_exner, gamma_theta, gamma_mr - real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta, norm_mr - real(r_def) :: norm_mr_tmp - real(r_def) :: norm_diff, norm_diff_prev - real(r_def) :: norm_u_prev, norm_rho_prev, norm_exner_prev - real(r_def) :: norm_theta_prev, norm_mr_prev - - real(r_def), parameter :: tol = 9.e-1_r_def - - integer(i_def) :: n, i, t - character(len=4) :: pass_str - logical(l_def) :: use_moisture - - call log_event( "TL Test: " // trim(label), & - LOG_LEVEL_INFO ) - - use_moisture = ( moisture_formulation /= moisture_formulation_dry ) - - if ( method == method_rk .and. use_moisture ) then - call log_event( & - 'Not possible to use Runge Kutta time stepping with moisture', & - log_level_error ) - end if - - prognostic_fields => modeldb%fields%get_field_collection( & - "prognostic_fields") - ls_fields => modeldb%fields%get_field_collection("ls_fields") - moisture_fields => modeldb%fields%get_field_collection("moisture_fields") - call moisture_fields%get_field("mr", mr_array) - call moisture_fields%get_field("moist_dyn", moist_dyn_array) - mr => mr_array%bundle - moist_dyn => moist_dyn_array%bundle - call moisture_fields%get_field("ls_mr", ls_mr_array) - call moisture_fields%get_field("ls_moist_dyn", ls_moist_dyn_array) - ls_mr => ls_mr_array%bundle - ls_moist_dyn => ls_moist_dyn_array%bundle - - ! Input - call ls_fields%get_field('ls_u', ls_u) - call ls_fields%get_field('ls_rho', ls_rho) - call ls_fields%get_field('ls_theta', ls_theta) - call ls_fields%get_field('ls_exner', ls_exner) - - call prognostic_fields%get_field('u', u) - call prognostic_fields%get_field('rho', rho) - call prognostic_fields%get_field('theta', theta) - call prognostic_fields%get_field('exner', exner) - - call r_u%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) - call r_rho%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call r_exner%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call r_theta%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) - call clone_bundle(mr, r_mr, nummr) - - call p_u%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) - call p_rho%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call p_exner%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call p_theta%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) - call clone_bundle(mr, p_mr, nummr) - - call n1_u%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) - call n1_rho%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call n1_exner%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call n1_theta%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) - call clone_bundle(mr, n1_mr, nummr) - - call n2_u%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) - call n2_rho%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call n2_exner%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call n2_theta%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) - call clone_bundle(mr, n2_mr, nummr) - - call diff_u%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W2) ) - call diff_rho%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call diff_exner%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, W3) ) - call diff_theta%initialise( vector_space = & - function_space_collection%get_fs(mesh, element_order_h, element_order_v, Wtheta) ) - call clone_bundle(mr, diff_mr, nummr) - - call invoke( assign_field_random_kernel_type( r_u, 1.0_r_def ) , & - assign_field_random_kernel_type( r_rho, 1.0_r_def ) , & - assign_field_random_kernel_type( r_theta, 1.0_r_def ) , & - assign_field_random_kernel_type( r_exner, 1.0_r_def ) ) - - do i = 1, nummr - call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) - end do - - gamma_u = 1.e4_r_def - gamma_theta = 1.0_r_def - gamma_rho = 1.e0_r_def - gamma_exner = 6.5e-1_r_def - - if ( use_moisture ) then - gamma_mr = 1.e-3_r_def - else - gamma_mr = 0.0_r_def - end if - - gamma_u = gamma_u /24.0_r_def - gamma_theta = gamma_theta / 24.0_r_def - gamma_rho = gamma_rho / 24.0_r_def - gamma_exner = gamma_exner / 24.0_r_def - gamma_mr = gamma_mr / 24.0_r_def - - do n = 1, number_gamma_values - gamma_u = gamma_u / 2.0_r_def - gamma_theta = gamma_theta / 2.0_r_def - gamma_rho = gamma_rho / 2.0_r_def - gamma_exner = gamma_exner / 2.0_r_def - gamma_mr = gamma_mr / 2.0_r_def - - ! Initial conditions for nonlinear perturbed - call invoke( aX_plus_Y( n1_u, gamma_u, r_u, ls_u ), & - aX_plus_Y( n1_theta, gamma_theta, r_theta, ls_theta ), & - aX_plus_Y( n1_rho, gamma_rho, r_rho, ls_rho ), & - aX_plus_Y( n1_exner, gamma_exner, r_exner, ls_exner ) ) - - do i = 1, nummr - call invoke( aX_plus_Y( n1_mr(i), gamma_mr, & - r_mr(i), ls_mr(i) ) ) - end do - - ! Initial conditions for nonlinear unperturbed - call invoke( setval_X( n2_u, ls_u ), & - setval_X( n2_theta, ls_theta ), & - setval_X( n2_rho, ls_rho ), & - setval_X( n2_exner, ls_exner ) ) - - do i = 1, nummr - call invoke( setval_X( n2_mr(i), ls_mr(i) ) ) - end do - - ! Initial conditions for the linear - call invoke( a_times_X( p_u, gamma_u, r_u ), & - a_times_X( p_theta, gamma_theta, r_theta ), & - a_times_X( p_rho, gamma_rho, r_rho ), & - a_times_X( p_exner, gamma_exner, r_exner ) ) - - do i = 1, nummr - call invoke( a_times_X( p_mr(i), gamma_mr, & - r_mr(i) ) ) - end do - - ! Multiple timesteps - do t = parse_instance(timestep_start), parse_instance(timestep_end) - -!------------------------------------------------------------------------ -! Nonlinear model run with perturbed state -!------------------------------------------------------------------------ - call invoke( setval_X( u, n1_u ), & - setval_X( theta, n1_theta ), & - setval_X( rho, n1_rho ), & - setval_X( exner, n1_exner ) ) - do i = 1, nummr - call invoke( setval_X( mr(i), n1_mr(i) ) ) - enddo - call moist_dyn_factors_alg( moist_dyn, mr ) - - ! Clean up solvers and timestep method left over from running - ! the model to set up model state and linear state - call final_si_operators() - call semi_implicit_solver_alg_final() - call finalise_model(modeldb) - - call initialise_model( mesh, & - modeldb ) - - call gungho_step( mesh, & - twod_mesh, & - modeldb, & - model_clock ) - - call finalise_model(modeldb) - - call invoke( setval_X( n1_u, u ), & - setval_X( n1_theta, theta ), & - setval_X( n1_rho, rho ), & - setval_X( n1_exner, exner) ) - - do i = 1, nummr - call invoke( setval_X( n1_mr(i), mr(i) ) ) - end do - -!------------------------------------------------------------------------ -! Linear model run -!------------------------------------------------------------------------ - call invoke( setval_X( u, p_u ), & - setval_X( theta, p_theta ), & - setval_X( rho, p_rho ), & - setval_X( exner, p_exner) ) - do i = 1, nummr - call invoke( setval_X( mr(i), p_mr(i) ) ) - end do - call tl_moist_dyn_factors_alg( moist_dyn, mr ) - - ! Set the linearisation state - ! The linearisation state is copied from the nonlinear run, - ! every few timesteps. - if ( mod(t, update_ls_frequency) == 0 ) then - call invoke( setval_X( ls_u, n2_u ), & - setval_X( ls_theta, n2_theta ), & - setval_X( ls_rho, n2_rho ), & - setval_X( ls_exner, n2_exner) ) - do i = 1, nummr - call invoke( setval_X( ls_mr(i), n2_mr(i) ) ) - enddo - call moist_dyn_factors_alg( ls_moist_dyn, ls_mr ) - endif - - call finalise_linear_model() - call initialise_linear_model( mesh, & - modeldb ) - - call linear_step( mesh, & - twod_mesh, & - modeldb, & - model_clock ) - - call finalise_linear_model() - - - call invoke( setval_X( p_u, u ), & - setval_X( p_theta, theta ), & - setval_X( p_rho, rho ), & - setval_X( p_exner, exner) ) - do i = 1, nummr - call invoke( setval_X( p_mr(i), mr(i) ) ) - enddo - -!------------------------------------------------------------------------ -! Nonlinear model run with un-perturbed state -!------------------------------------------------------------------------ - call invoke( setval_X( u, n2_u ), & - setval_X( theta, n2_theta ), & - setval_X( rho, n2_rho ), & - setval_X( exner, n2_exner ) ) - - do i = 1, nummr - call invoke( setval_X( mr(i), n2_mr(i) ) ) - end do - - call moist_dyn_factors_alg( moist_dyn, mr ) - - - call initialise_model( mesh, & - modeldb ) - - call gungho_step( mesh, & - twod_mesh, & - modeldb, & - model_clock ) - - call finalise_model(modeldb) - - call invoke( setval_X( n2_u, u ), & - setval_X( n2_theta, theta ), & - setval_X( n2_rho, rho ), & - setval_X( n2_exner, exner ) ) - - do i = 1, nummr - call invoke( setval_X( n2_mr(i), mr(i) ) ) - call invoke( setval_X( ls_mr(i), mr(i) ) ) - end do - - end do ! timesteps loop - -!------------------------------------------------------------------------ -! Calculate norms -!------------------------------------------------------------------------ - call invoke( X_minus_Y( diff_u, n1_u, n2_u ), & - inc_X_minus_Y( diff_u, p_u ), & - X_innerproduct_X( norm_u, diff_u ) ) - call invoke( X_minus_Y( diff_rho, n1_rho, n2_rho ), & - inc_X_minus_Y( diff_rho, p_rho ), & - X_innerproduct_X( norm_rho, diff_rho ) ) - call invoke( X_minus_Y( diff_exner, n1_exner, n2_exner ), & - inc_X_minus_Y( diff_exner, p_exner ), & - X_innerproduct_X( norm_exner, diff_exner ) ) - call invoke( X_minus_Y( diff_theta, n1_theta, n2_theta ), & - inc_X_minus_Y( diff_theta, p_theta ), & - X_innerproduct_X( norm_theta, diff_theta ) ) - - norm_mr=0.0_r_def - do i = 1, nummr - call invoke( & - X_minus_Y( diff_mr(i), n1_mr(i), n2_mr(i) ), & - inc_X_minus_Y( diff_mr(i), p_mr(i) ), & - X_innerproduct_X( norm_mr_tmp, diff_mr(i) ) ) - norm_mr = norm_mr + norm_mr_tmp - end do - - norm_diff = norm_rho + norm_theta + norm_exner + norm_u + norm_mr - -!---------------------------------------------------------------------------- -! Print values out to enable plotting a graph -!---------------------------------------------------------------------------- - write( log_scratch_space, & - '( A, E32.12, A, E32.12 )' ) & - ' gamma_total = ' , gamma_u, & - ' norm = ' , norm_diff - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12)' ) & - ' gamma_rho = ' , gamma_u, & - ' norm = ' , norm_rho - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12)' ) & - ' gamma_exner = ' , gamma_u, & - ' norm = ' , norm_exner - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12)' ) & - ' gamma_theta = ' , gamma_u, & - ' norm = ' , norm_theta - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12)' ) & - ' gamma_u = ' , gamma_u, & - ' norm = ' , norm_u - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, & - '(A, E32.12, A, E32.12)' ) & - ' gamma_mr = ' , gamma_u, & - ' norm = ' , norm_mr - - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - -!---------------------------------------------------------------------------- -! Test that gives a PASS or FAIL -!---------------------------------------------------------------------------- - if (n == 2) then - - pass_str = "PASS" - - write( log_scratch_space, '(A)' ) & - "TL Test: " // trim(label) - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - write( log_scratch_space, '(A)' ) "Total " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "Theta " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_theta, norm_theta_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "Rho " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_rho, norm_rho_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "Exner " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_exner, norm_exner_prev, pass_str, tol ) - - write( log_scratch_space, '(A)' ) "u " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_u, norm_u_prev, pass_str, tol ) - - if ( use_moisture ) then - write( log_scratch_space, '(A)' ) "mr " - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - call convergence_pass_string( norm_mr, norm_mr_prev, pass_str, tol ) - end if - - write( log_scratch_space,'(" test",A32," : ",A4)' ) trim(label), pass_str - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - end if - - norm_diff_prev = norm_diff - norm_rho_prev = norm_rho - norm_theta_prev = norm_theta - norm_exner_prev = norm_exner - norm_u_prev = norm_u - norm_mr_prev = norm_mr - - end do ! Loop over values of gamma - - end subroutine test_timesteps_random - - !> @brief Test the convergence rate. - !> @details If the convergence rate is not close to 4, within the - !! specified tolerance, then change the pass string to FAIL. - !! This is a special routine for this particular test, to allow - !! for norms that have already had the square root applied. - !> @param[in] norm_diff Current norm - !> @param[in] norm_diff_prev Previous norm - !> @param[inout] pass_str Pass string (either PASS or FAIL) - !> @param[in] tol Test Tolerance - subroutine convergence_pass_string( norm_diff, norm_diff_prev, pass_str, tol ) - implicit none - - real(r_def), intent(in) :: norm_diff, norm_diff_prev - character(len=4), intent(inout) :: pass_str - real(r_def), intent(in) :: tol - - real(r_def) :: conv_rate - conv_rate = norm_diff_prev / norm_diff - - conv_rate = norm_diff_prev / norm_diff - write( log_scratch_space, '(A, E16.8)') & - "Convergence rate: ", conv_rate - call log_event( log_scratch_space, LOG_LEVEL_INFO ) - - if ( abs( conv_rate - 4.0_r_def ) >= tol ) then - pass_str = "FAIL" - endif - - end subroutine convergence_pass_string - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !> Converts a string to a timestep number. - !> - !> @param[in] string Correctly formatted timestep number. - !> @return Timestep number. - !> - function parse_instance( string ) result(instance) - - implicit none - - character(*), intent(in) :: string - integer(i_timestep) :: instance - - integer :: string_size - integer :: format_size - integer :: status - character(:), allocatable :: fmt - - ! The "I0" formatting string does not work for input. Instead the exact - ! number of digits to be read must be requested. Thus we need to construct - ! a format string from the size of the string. - ! - string_size = len(string) - format_size = string_size + 3 - allocate( character(format_size) :: fmt, stat=status ) - if ( status /= 0 ) then - call log_event( & - 'TL test parse_instance: Unable to allocate format', & - log_level_error ) - end if - write( fmt, '("(I", I0, ")")' ) string_size - read( string, fmt ) instance - deallocate( fmt ) - - if ( instance < 0 ) then - call log_event( & - 'TL test parse_instance: Instances may not be negative', & - log_level_error ) - end if - - end function parse_instance - -end module tl_test_timesteps_random_alg_mod diff --git a/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 b/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 index d74fd3dfb..02d96d2ea 100644 --- a/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_transport_control_mod.x90 @@ -21,6 +21,7 @@ module tl_test_transport_control_mod use function_space_collection_mod, only: function_space_collection use derived_config_mod, only: bundle_size use driver_modeldb_mod, only: modeldb_type + use moist_dyn_mod, only: num_moist_factors use mr_indices_mod, only: nummr use log_mod, only: log_event, & log_scratch_space, & @@ -30,7 +31,7 @@ module tl_test_transport_control_mod only: gungho_transport_control_alg_init, & gungho_transport_control_alg use tl_transport_control_alg_mod, only: tl_transport_control_alg - use tl_test_convergence_rate_check, only: array_convergence_rate_check + use tl_test_convergence_rate_check, only: convergence_rate_check implicit none @@ -60,11 +61,10 @@ module tl_test_transport_control_mod type(field_type), pointer :: ls_u => null() type(field_type), pointer :: ls_rho => null() type(field_type), pointer :: ls_theta => null() - type(field_type), pointer :: ls_mr(:) => null() type(field_type), pointer :: ls_exner => null() - type(field_type), pointer :: u => null() - type(field_type), pointer :: rho => null() - type(field_type), pointer :: theta => null() + type(field_type), pointer :: ls_moist_dyn(:) => null() + type(field_type), pointer :: ls_mr(:) => null() + type(field_type), pointer :: moist_dyn(:) => null() type(field_type), pointer :: mr(:) => null() type(field_type) :: state(bundle_size) @@ -75,7 +75,10 @@ module tl_test_transport_control_mod type(field_type) :: n1_rhs(bundle_size) type(field_type) :: n2_rhs(bundle_size) type(field_type) :: diff(bundle_size) - + type(field_type), dimension(num_moist_factors) :: p_moist_dyn + type(field_type), dimension(num_moist_factors) :: n_moist_dyn + type(field_type), dimension(num_moist_factors) :: r_moist_dyn + type(field_type), dimension(num_moist_factors) :: diff_moist_dyn type(field_type), dimension(nummr) :: p_mr_in type(field_type), dimension(nummr) :: n_mr_in type(field_type), dimension(nummr) :: ls_mr_out @@ -88,32 +91,36 @@ module tl_test_transport_control_mod type(field_collection_type), pointer :: moisture_fields => null() type(field_array_type), pointer :: mr_array => null() + type(field_array_type), pointer :: moist_dyn_array => null() type(field_array_type), pointer :: ls_mr_array => null() + type(field_array_type), pointer :: ls_moist_dyn_array => null() + + real(r_def) :: gamma_u, gamma_rho, gamma_exner, gamma_theta + real(r_def) :: gamma_moist_dyn, gamma_mr + real(r_def) :: norm_u, norm_rho, norm_exner, norm_theta + real(r_def) :: norm_moist_dyn, norm_mr + real(r_def) :: norm_diff, norm_diff_prev + real(r_def) :: norm_moist_dyn_tmp, norm_mr_tmp - real(r_def) :: gamma_u, gamma_rho, gamma_theta - real(r_def) :: gamma_mr - real(r_def) :: norm_u, norm_rho, norm_theta - real(r_def) :: norm_mr - real(r_def) :: norm_mr_tmp - integer(i_def), parameter :: n_variables = 4 - real(r_def) :: array_norm(n_variables), array_norm_prev(n_variables) - character(str_def) :: array_names(n_variables) - real(r_def), parameter :: tol = 5.e-2_r_def - real(r_def), parameter :: indiv_tol = 5.e-1_r_def + real(r_def), parameter :: tol = 1.e-2_r_def integer :: n, outer, i call log_event( "TL Test: " // trim(label), & - LOG_LEVEL_INFO ) + LOG_LEVEL_INFO ) prognostic_fields => modeldb%fields%get_field_collection( & "prognostic_fields") ls_fields => modeldb%fields%get_field_collection("ls_fields") moisture_fields => modeldb%fields%get_field_collection("moisture_fields") call moisture_fields%get_field("mr", mr_array) + call moisture_fields%get_field("moist_dyn", moist_dyn_array) mr => mr_array%bundle + moist_dyn => moist_dyn_array%bundle call moisture_fields%get_field("ls_mr", ls_mr_array) + call moisture_fields%get_field("ls_moist_dyn", ls_moist_dyn_array) ls_mr => ls_mr_array%bundle + ls_moist_dyn => ls_moist_dyn_array%bundle ! Input call ls_fields%get_field('ls_u', ls_u) @@ -121,12 +128,6 @@ module tl_test_transport_control_mod call ls_fields%get_field('ls_theta', ls_theta) call ls_fields%get_field('ls_exner', ls_exner) - ! Overwrite the moisture fields with potential temperature - do i = 1, nummr - call invoke( & - setval_X( ls_mr(i), ls_theta)) - end do - call ls_state(igh_u)%initialise( vector_space = ls_u%get_function_space() ) call ls_state(igh_t)%initialise( vector_space = ls_theta%get_function_space() ) call ls_state(igh_d)%initialise( vector_space = ls_rho%get_function_space() ) @@ -143,6 +144,11 @@ module tl_test_transport_control_mod call clone_bundle(ls_state, n2_rhs, bundle_size) call clone_bundle(ls_state, diff, bundle_size) + call clone_bundle(moist_dyn, p_moist_dyn, num_moist_factors) + call clone_bundle(moist_dyn, r_moist_dyn, num_moist_factors) + call clone_bundle(moist_dyn, n_moist_dyn, num_moist_factors) + call clone_bundle(moist_dyn, diff_moist_dyn, num_moist_factors) + call clone_bundle(mr, r_mr, nummr) call clone_bundle(mr, p_mr_in, nummr) call clone_bundle(mr, n_mr_in, nummr) @@ -155,36 +161,23 @@ module tl_test_transport_control_mod setval_X(ls_state(igh_u), ls_u ), & setval_X(ls_state(igh_t), ls_theta), & setval_X(ls_state(igh_d), ls_rho ), & - setval_X(ls_state(igh_p), ls_exner ), & + setval_X(ls_state(igh_p), ls_exner), & setval_X(ls_advected_u, ls_u ) ) call gungho_transport_control_alg_init( mesh ) - ! Perturbation - call prognostic_fields%get_field('u', u) - call prognostic_fields%get_field('rho', rho) - call prognostic_fields%get_field('theta', theta) - - ! Set the 'random perturbation as the ls_state plus pert' - call invoke( name = "copy_fields_to_state", & - setval_X(random(igh_u), ls_u ), & - setval_X(random(igh_t), ls_theta), & - setval_X(random(igh_d), ls_rho ) ) - - do i = 1, nummr - call invoke( & - setval_X( r_mr(i), ls_mr(i) )) - end do + call invoke( assign_field_random_kernel_type( random(igh_u), 1.0_r_def ) , & + assign_field_random_kernel_type( random(igh_d), 1.0_r_def ) , & + assign_field_random_kernel_type( random(igh_t), 1.0_r_def ) , & + assign_field_random_kernel_type( random(igh_p), 1.0_r_def ) ) - call invoke( name = "inc", & - inc_X_plus_Y(random(igh_u), u ), & - inc_X_plus_Y(random(igh_t), theta), & - inc_X_plus_Y(random(igh_d), rho ) ) + do i = 1, num_moist_factors + call invoke( assign_field_random_kernel_type( r_moist_dyn(i), 1.0_r_def ) ) + enddo do i = 1, nummr - call invoke( & - inc_X_plus_Y( r_mr(i), theta )) - end do + call invoke( assign_field_random_kernel_type( r_mr(i), 1.0_r_def ) ) + enddo call set_bundle_scalar( 0.0_r_def, n1_rhs, bundle_size ) @@ -199,15 +192,19 @@ module tl_test_transport_control_mod outer, & cheap_update = .false.) - gamma_u = 1._r_def - gamma_theta = 1._r_def - gamma_rho = 1._r_def - gamma_mr = 1._r_def + gamma_u = 7.e8_r_def + gamma_theta = 1.e5_r_def + gamma_rho = 1.e5_r_def + gamma_exner = 1.e5_r_def + gamma_moist_dyn=1.e0_r_def + gamma_mr = 1.e0_r_def do n=1,2 gamma_u = gamma_u/2.0_r_def gamma_theta = gamma_theta/2.0_r_def gamma_rho = gamma_rho/2.0_r_def + gamma_exner = gamma_exner/2.0_r_def + gamma_moist_dyn = gamma_moist_dyn/2.0_r_def gamma_mr = gamma_mr/2.0_r_def call set_bundle_scalar( 0.0_r_def, n2_rhs, bundle_size ) @@ -215,7 +212,7 @@ module tl_test_transport_control_mod call invoke( a_times_X( p_state(igh_u), gamma_u, random(igh_u) ), & a_times_X( p_state(igh_t), gamma_theta, random(igh_t) ), & a_times_X( p_state(igh_d), gamma_rho, random(igh_d) ), & - setval_c( p_state(igh_p), 0.0_r_def ), & + a_times_X( p_state(igh_p), gamma_exner, random(igh_p) ), & a_times_X( p_advected_u, gamma_u, random(igh_u) ) ) ! state = ls_state + p_state @@ -224,6 +221,13 @@ module tl_test_transport_control_mod call invoke( setval_X( n_advected_u, ls_advected_u), & inc_X_plus_Y(n_advected_u, p_advected_u ) ) + do i = 1, num_moist_factors + call invoke( & + a_times_X( p_moist_dyn(i), gamma_moist_dyn, r_moist_dyn(i) ), & + setval_X( n_moist_dyn(i), ls_moist_dyn(i) ), & + inc_X_plus_Y( n_moist_dyn(i), p_moist_dyn(i) ) ) + end do + do i = 1, nummr call invoke( & a_times_X( p_mr_in(i), gamma_mr, r_mr(i) ), & @@ -259,43 +263,63 @@ module tl_test_transport_control_mod call invoke( & inc_X_minus_Y( diff(igh_u), p_rhs(igh_u) ), & inc_X_minus_Y( diff(igh_t), p_rhs(igh_t) ), & - inc_X_minus_Y( diff(igh_d), p_rhs(igh_d) ) ) + inc_X_minus_Y( diff(igh_d), p_rhs(igh_d) ), & + inc_X_minus_Y( diff(igh_p), p_rhs(igh_p) ) ) - call invoke( & - X_innerproduct_X( norm_u, diff(igh_u) ) , & + call invoke( X_innerproduct_X( norm_u, diff(igh_u) ) , & X_innerproduct_X( norm_rho, diff(igh_d) ) , & - X_innerproduct_X( norm_theta, diff(igh_t) ) ) + X_innerproduct_X( norm_theta, diff(igh_t) ) , & + X_innerproduct_X( norm_exner, diff(igh_p) ) ) - - do i = 1, nummr + norm_moist_dyn=0.0_r_def + do i = 1, num_moist_factors call invoke( & - X_minus_Y( diff_mr(i), n_mr_out(i), ls_mr_out(i) ), & - inc_X_minus_Y( diff_mr(i), p_mr_out(i) ) ) + X_minus_Y( diff_moist_dyn(i), n_moist_dyn(i), moist_dyn(i) ), & + inc_X_minus_Y( diff_moist_dyn(i), p_moist_dyn(i) ), & + X_innerproduct_X( norm_moist_dyn_tmp, diff_moist_dyn(i) ) ) + norm_moist_dyn = norm_moist_dyn + norm_moist_dyn_tmp end do norm_mr=0.0_r_def do i = 1, nummr - call invoke( & + call invoke( & + X_minus_Y( diff_mr(i), n_mr_out(i), ls_mr_out(i) ), & + inc_X_minus_Y( diff_mr(i), p_mr_out(i) ), & X_innerproduct_X( norm_mr_tmp, diff_mr(i) ) ) norm_mr = norm_mr + norm_mr_tmp end do - array_norm(1) = norm_u - array_norm(2) = norm_rho - array_norm(3) = norm_theta - array_norm(4) = norm_mr - array_names(1) = 'norm_u' - array_names(2) = 'norm_rho' - array_names(3) = 'norm_theta' - array_names(4) = 'norm_mr' + write( log_scratch_space, & + '(A, E32.12, A, E32.12 )' ) & + ' norm_u = ' , norm_u, & + ' norm_rho = ' , norm_rho + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12 )' ) & + ' norm_theta = ' , norm_theta, & + ' norm_moist_dyn = ' , norm_moist_dyn + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + write( log_scratch_space, & + '(A, E32.12, A, E32.12 )' ) & + ' norm_exner = ' , norm_exner, & + ' norm_mr = ' , norm_mr + + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + + norm_diff = norm_rho + norm_theta + norm_exner + norm_u & + + norm_moist_dyn + norm_mr + norm_diff = sqrt(norm_diff) if (n == 2) then - call array_convergence_rate_check( array_norm, array_norm_prev, & - array_names, n_variables, label, tol=tol, indiv_tol=indiv_tol) + call convergence_rate_check( norm_diff, norm_diff_prev, & + label, tol=tol ) end if - array_norm_prev = array_norm - + norm_diff_prev = norm_diff end do end subroutine test_transport_control diff --git a/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 b/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 index c129dd3f2..47e5cdfc0 100644 --- a/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 +++ b/science/linear/integration-test/tl_test/tl_test_vorticity_mod.x90 @@ -203,6 +203,8 @@ module tl_test_vorticity_mod inc_X_minus_Y( diff, p_rhs_u ), & X_innerproduct_X( norm_diff, diff ) ) + norm_diff = sqrt(norm_diff) + write( log_scratch_space, '(A, E32.12, A, E32.12)' ) & 'gamma = ', gamma, ' norm = ', norm_diff diff --git a/science/linear/plot_convergence/plot_convergence.sh b/science/linear/plot_convergence/plot_convergence.sh deleted file mode 100755 index 8b60e5331..000000000 --- a/science/linear/plot_convergence/plot_convergence.sh +++ /dev/null @@ -1,118 +0,0 @@ -############################################################################## -# (c) Crown copyright 2022 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## - -#---------------------------------------------------------------------- -# Plots the convergence rate of the tangent linear model. -#---------------------------------------------------------------------- - -# INSTRUCTIONS TO RUN -# 1. Specify the config_list -# 2. Run using . plot_convergence.sh, from the plot_convergence directory - -# SCIENCE DETAILS -# The relative linearisation error is -# E = || N(x+ gamma x') - N(x) - L(x) gamma x' || / || L(x) gamma x' || -# where N=nonlinear model, L=linear model, x=linearisation state -# x'=perturbation, gamma=scalar. -# From the Taylor series expansion, E(gamma) = O(gamma) i.e. of the order gamma -# So the relative error should be a linear function of gamma - -# SCRIPT STEPS -# 1. Build the model -# 2. Produce the data: The integration test tl_test_timesteps is extended by -# running over 10 values of gamma, rather than 2 values of gamma. -# 3. Plot the data: The data is plotted for each prognostic variable. - -# EXTENSION -# The plot_configuration.nml can also be extended to other configurations e.g -# * increase the number of timesteps (timesteps_end) -# * increase the number of timesteps between updating the linearisation state -# (update_ls_frequency) - -#-------------------------------------------------------------------------- - -######################## Functions ########################################## -build(){ - echo $CONFIG " Building the executable" - - # Integration tests executable name - exe=$Linear_dir/test/$CONFIG/$CONFIG - - # Build the integration tests, unless that has already been completed - if [ -f $exe ] ; then - echo "Do not need to build the executable as $exe exists" - else - echo "$exe does not exist, so now building the executable" - cd $Root_dir/build - python3 local_build.py linear -t integration-tests - - if [$? -ne 0 ]; then - echo "Error building the executable" - return - fi - fi -} - -integration_test(){ - # Setup the configuration - to test with 10 values of gamma - echo $CONFIG " Setting up the configuration" - cd $Linear_dir/integration-test/$CONFIG/resources/ - cp ${CONFIG}_configuration.nml plot_configuration.nml - sed -i 's/number_gamma_values=2/number_gamma_values=10/g' plot_configuration.nml - if [ $? -ne 0 ]; then - echo "Error in creating plot_configuration.nml" - return - else - echo "plot_configuration.nml created in " $PWD - fi - - # Run the tl_test_timesteps integration test - echo $CONFIG " Running the integration test" - cd $Linear_dir/integration-test/$CONFIG - echo $PWD - $exe resources/plot_configuration.nml test_timesteps > outfile - if [ $? -ne 0 ]; then - echo "Error in creating outfile data" - return - else - echo "Data created successfully" - fi -} - -plot(){ - # Plot the data, together with the expected gradient - echo $CONFIG " Plotting the data" - cd $Linear_dir/integration-test/$CONFIG - python $Linear_dir/plot_convergence/plot_convergence.py -} - -#################### MAIN PROGRAM ################################################# - -# Modules -module purge -module use /home/users/lfricadmin/lmod -module load lfric/vn3.0 -module load scitools - -config_list=(nwp_gal9 semi_implicit runge_kutta) - -# Directory of this script -SCRIPT_DIR="$(dirname "$(realpath "$BASH_SOURCE")")" -# And parent directories -export Linear_dir="$(dirname $SCRIPT_DIR)" -export Parent_dir="$(dirname $Linear_dir)" -export Root_dir="$(dirname $Parent_dir)" -echo "Linear_dir" $Linear_dir -echo "Root_dir" $Root_dir - -for configuration in "${config_list[@]}"; do - echo $configuration - export CONFIG="$configuration" - - build - integration_test - plot -done diff --git a/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf b/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf index 4091f0aa2..98a373e47 100644 --- a/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf +++ b/science/linear/rose-meta/lfric-linear/HEAD/rose-meta.conf @@ -4,7 +4,7 @@ import=lfric-gungho/HEAD compulsory=true description=Provides extra information for the tangent linear model. help= -ns=namelist/Linear +ns=namelist/Linear/Initial sort-key=Section-A07 title=Linear @@ -13,7 +13,6 @@ compulsory=true description=Do not update the linearisation state during the timestep. help=The linearisation state is the same for every outer and inner loop. !kind=default -ns=namelist/Linear/Efficiency type=logical [namelist:linear=l_stabilise_bl] @@ -21,7 +20,7 @@ compulsory=true description=?????? help=If true then turn on boundary layer stabilisation in linear model !kind=default -ns=namelist/Linear/BoundaryLayer +ns=namelist/Job/Timestepping/semi-implicit type=logical [namelist:linear=ls_read_w2h] @@ -31,7 +30,7 @@ description=For the linearisation state, read winds on a W2h space =from a file. help=Horizontal winds are read in on a W2h space from the ls file. If =false, then cell-centres (W3), co-located winds are assumed. -ns=namelist/Linear/Data +sort-key=Panel-A07a type=logical [namelist:linear=max_bl_stabilisation] @@ -40,7 +39,7 @@ description=?????? fail-if=this < 0.0 help=Maximum boundary layer stabilisation scalar in linear model !kind=default -ns=namelist/Linear/BoundaryLayer +ns=namelist/Job/Timestepping/semi-implicit range=0.0: type=real @@ -50,7 +49,7 @@ description=?????? fail-if=this < 1 ; help=Number of boundary layers levels to stabilise in linear model !kind=default -ns=namelist/Linear/BoundaryLayer +ns=namelist/Job/Timestepping/semi-implicit range=1: type=integer @@ -62,130 +61,20 @@ help=This can be an analytical perturbation, random data or from a file. =The analytical perturbation is based on the DCMIP gravity wave test. =The random data is generated with the Fortran intrinsic function 'random_number'. =The file contains data produced from LFRic with horizontal winds in W2. -ns=namelist/Linear/Data +ns=namelist/Linear/Initial +sort-key=Panel-A07a value-titles=analytic, =random, =file, =zero values='analytic', 'random', 'file', 'zero' -[namelist:linear=transport_efficiency] -compulsory=true -description=Do not update the linearisation state during the transport step. -help=The linearisation state remains fixed. -!kind=default -ns=namelist/Linear/Efficiency -type=logical - -[namelist:linear_physics] -compulsory=true -description=Settings for TLM physics schemes. -ns=namelist/Linear/Physics -sort-key=Section-A07 -title=Linear Physics - -[namelist:linear_physics=blevs_m] -compulsory=true -description=Number of momentum boundary layer levels in TLM boundary layer scheme. -fail-if=this < 1 ; -help=Determines levels from surface upwards over which tl_bdy_lyr_alg is applied. -!kind=default -ns=namelist/Linear/Physics -range=1: -type=integer - -[namelist:linear_physics=e_folding_levs_m] -compulsory=true -description=e-folding level in TLM boundary layer scheme. -fail-if=this < 1 ; -help=Number of e-folding levels in exchange coefficient for momentum. -!kind=default -ns=namelist/Linear/Physics -range=1: -type=integer - -[namelist:linear_physics=l_0_m] -compulsory=true -description=Height parameter for TLM boundary layer scheme. -fail-if=this < 0.0 -help=Mixing length for momentum. -!kind=default -ns=namelist/Linear/Physics -range=0.0: -type=real - -[namelist:linear_physics=l_boundary_layer] -compulsory=true -description=Logical switch for TLM boundary layer scheme. -help=If true then turn on boundary layer in linear model and adjoint. -!kind=default -ns=namelist/Linear/Physics -sort-key=Panel-A00 -trigger=namelist:linear_physics=blevs_m: .true. ; - =namelist:linear_physics=l_0_m: .true. ; - =namelist:linear_physics=e_folding_levs_m: .true. ; - =namelist:linear_physics=log_layer: .true. ; - =namelist:linear_physics=u_land_m: .true. ; - =namelist:linear_physics=u_sea_m: .true. ; - =namelist:linear_physics=z_land_m: .true. ; - =namelist:linear_physics=z_sea_m: .true. ; -type=logical - -[namelist:linear_physics=log_layer] -compulsory=true -description=Number of levels in log layer in TLM boundary layer scheme. -fail-if=this < 1 ; -help=Number of levels in log layer in TLM boundary layer scheme. -!kind=default -ns=namelist/Linear/Physics -range=1: -type=integer - -[namelist:linear_physics=u_land_m] -compulsory=true -description=Land friction velocity in TLM boundary layer scheme. -fail-if=this < 0.0 -help=Friction velocity for momentum over land. -!kind=default -ns=namelist/Linear/Physics -range=0.0: -type=real - -[namelist:linear_physics=u_sea_m] -compulsory=true -description=Sea friction velocity in TLM boundary layer scheme. -fail-if=this < 0.0 -help=Friction velocity for momentum over sea. -!kind=default -ns=namelist/Linear/Physics -range=0.0: -type=real - -[namelist:linear_physics=z_land_m] -compulsory=true -description=Friction height over land in TLM boundary layer scheme. -fail-if=this < 0.0 -help=Effective roughness length for momentum over land. -!kind=default -ns=namelist/Linear/Physics -range=0.0: -type=real - -[namelist:linear_physics=z_sea_m] -compulsory=true -description=Friction height over sea in TLM boundary layer scheme. -fail-if=this < 0.0 -help=Effective roughness length for momentum over sea. -!kind=default -ns=namelist/Linear/Physics -range=0.0: -type=real - [namelist:validity_test] compulsory=true description=Provides settings for the tangent linear validity tests. help=The validity tests are performed using the integration test framework. ns=namelist/Linear/ValidityTest +sort-key=Section-A07 title=Validity Tests [namelist:validity_test=number_gamma_values] @@ -198,6 +87,7 @@ help=Gamma is the size of the perturbation used in the validity test. !kind=default ns=namelist/Linear/ValidityTest range=0: +sort-key=Panel-A07b type=integer [namelist:validity_test=update_ls_frequency] @@ -212,4 +102,5 @@ help=In the integration tests, when running over multiple timesteps, !kind=default ns=namelist/Linear/ValidityTest range=0: +sort-key=Panel-A07c type=integer diff --git a/science/linear/rose-meta/lfric-linear/versions.py b/science/linear/rose-meta/lfric-linear/versions.py index 1f13f98f0..8418438c1 100644 --- a/science/linear/rose-meta/lfric-linear/versions.py +++ b/science/linear/rose-meta/lfric-linear/versions.py @@ -21,10 +21,13 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -41,6 +44,7 @@ def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm """Set segmentation size for Gregory-Rowntree convection kernel""" self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports @@ -120,119 +124,5 @@ def upgrade(self, config, meta_config=None): self.add_setting( config, ["namelist:jules_surface", "l_point_data"], ".false." ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - return config, self.reports - - -class vn30_t182(MacroUpgrade): - """Upgrade macro for ticket #182 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t182" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - """Add linear boundary layer physics scheme""" - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".false.", - ) - else: - self.add_setting( - config, - ["namelist:linear_physics", "l_boundary_layer"], - ".true.", - ) - self.add_setting( - config, ["namelist:linear_physics", "Blevs_m"], "15" - ) - self.add_setting( - config, ["namelist:linear_physics", "e_folding_levs_m"], "10" - ) - self.add_setting( - config, ["namelist:linear_physics", "l_0_m"], "80.0" - ) - self.add_setting( - config, ["namelist:linear_physics", "log_layer"], "2" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_land_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "u_sea_m"], "0.4" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_land_m"], "0.05" - ) - self.add_setting( - config, ["namelist:linear_physics", "z_sea_m"], "0.0005" - ) return config, self.reports diff --git a/science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 b/science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 deleted file mode 100644 index f11d3a2b7..000000000 --- a/science/linear/source/algorithm/linear_physics/tl_bdy_lyr_alg.x90 +++ /dev/null @@ -1,144 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be brief. -!----------------------------------------------------------------------------- -!> @brief Given TL state(igh_u) compute TLM boundary layer increment u_bl_inc -module tl_bdy_lyr_alg_mod - - use constants_mod, only: r_def - use field_collection_mod, only: field_collection_type - use integer_field_mod, only: integer_field_type - use driver_modeldb_mod, only: modeldb_type - use sci_geometric_constants_mod, only: get_height_fe, & - get_face_selector_ew, & - get_face_selector_ns - use sci_fem_constants_mod, only: get_rmultiplicity_fe - use field_mod, only: field_type - use linear_physics_config_mod, only: log_layer, & - Blevs_m, & - e_folding_levs_m, & - u_land_m, & - u_sea_m, & - z_land_m, & - z_sea_m, & - L_0_m - use derived_config_mod, only: bundle_size - use field_indices_mod, only: igh_d - use timing_mod, only: start_timing, stop_timing, tik, LPROF - use mesh_mod, only: mesh_type - use fs_continuity_mod, only: W2, W3, Wtheta - use tl_compute_qe_kernel_mod, only: tl_compute_qe_kernel_type - use tl_compute_aubu_kernel_mod, only: tl_compute_aubu_kernel_type - use tl_bl_inc_kernel_mod, only: tl_bl_inc_kernel_type - - implicit none - - private - public :: tl_bdy_lyr_alg - -contains - -!> @brief Given TL state(igh_u) compute TLM boundary layer increment u_bl_inc -!> @details The stages are: -!> 1. Call tl_compute_qe_kernel_type: from LS, compute coefficients Q, E -!> 2. Call tl_compute_aubu_kernel_type: from Q,E, compute coefficients Auv, Buv_inv -!> 3. Call tl_bl_inc_kernel_type: from state(igh_u) use coefficients Auv, Buv_inv to compute u_bl_inc -!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, -!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf -!> The original code is at https://wwwspice/~frva/VAR/view/var-2022.12.2/doc/PF_bdy_lyr.html -!> @param[in,out] modeldb Structure containing the model state -!> @param[in,out] u_bl_inc TLM boundary layer increment -!> @param[in,out] u The current TL model prognostic u field, state(igh_u) -!> @param[in] ls_state Lin state for Prognostic model state -!> @param[in] dt The TL model timestep length -subroutine tl_bdy_lyr_alg(modeldb, u_bl_inc, u, ls_state, dt) - - implicit none - - type(modeldb_type), target, intent(inout) :: modeldb - type(field_type), intent(inout) :: u_bl_inc - type(field_type), intent(inout) :: u - type(field_type), target, intent(in) :: ls_state(bundle_size) - real(kind=r_def), intent(in) :: dt - - type(mesh_type), pointer :: mesh - type(field_type), pointer :: height_w2 - type(field_type), pointer :: height_w3 - type(field_type), pointer :: height_wth - type(field_type), pointer :: w2_rmultiplicity - type(integer_field_type), pointer :: face_selector_ew - type(integer_field_type), pointer :: face_selector_ns - - type(field_collection_type), pointer :: ls_fields - type(field_type), pointer :: ls_land_fraction - - ! Coefficients computed from linearisation state - type(field_type) :: Q - type(field_type) :: E - type(field_type) :: auv - type(field_type) :: buv_inv - - integer(kind=tik) :: id - - if (LPROF) call start_timing(id, 'tl_bdy_lyr_alg') - - ls_fields => modeldb%fields%get_field_collection('ls_fields') - call ls_fields%get_field('ls_land_fraction', ls_land_fraction) - - mesh => u%get_mesh() - height_w2 => get_height_fe(W2, mesh%get_id()) - height_w3 => get_height_fe(W3, mesh%get_id()) - height_wth => get_height_fe(Wtheta, mesh%get_id()) - - w2_rmultiplicity => get_rmultiplicity_fe(W2, mesh%get_id()) - - face_selector_ew => get_face_selector_ew(mesh%get_id()) - face_selector_ns => get_face_selector_ns(mesh%get_id()) - - call u%copy_field_properties(u_bl_inc) - call invoke(setval_c(u_bl_inc, 0.0_r_def)) - - call ls_state(igh_d)%copy_field_properties(Q) - call ls_state(igh_d)%copy_field_properties(E) - - call u%copy_field_properties(auv) - call u%copy_field_properties(buv_inv) - - call invoke(tl_compute_qe_kernel_type(Q, & - E, & - ls_state(igh_d), & - height_w3, & - height_wth, & - ls_land_fraction, & - log_layer, & - Blevs_m, & - e_folding_levs_m, & - u_land_m, & - u_sea_m, & - z_land_m, & - z_sea_m, & - L_0_m)) - - call invoke(tl_compute_aubu_kernel_type(auv, & - buv_inv, & - Q, & - E, & - height_w2, & - w2_rmultiplicity, & - dt, & - Blevs_m)) - - call invoke(tl_bl_inc_kernel_type(u_bl_inc, & - u, & - auv, & - buv_inv, & - face_selector_ew, & - face_selector_ns, & - Blevs_m)) - - if (LPROF) call stop_timing(id, 'tl_bdy_lyr_alg') - -end subroutine tl_bdy_lyr_alg - -end module tl_bdy_lyr_alg_mod diff --git a/science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 b/science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 deleted file mode 100644 index 5289776ec..000000000 --- a/science/linear/source/algorithm/linear_physics/tl_physics_alg.x90 +++ /dev/null @@ -1,135 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be brief. -!----------------------------------------------------------------------------- -!> @brief Wrapper for tangent linear physics code -module tl_physics_alg_mod - - use constants_mod, only: r_def - use driver_modeldb_mod, only: modeldb_type - use field_mod, only: field_type - use derived_config_mod, only: bundle_size - use field_indices_mod, only: igh_u - use timing_mod, only: start_timing, stop_timing, tik, LPROF - use mesh_mod, only: mesh_type - use fs_continuity_mod, only: W2 - use sci_geometric_constants_mod, only: get_da_at_w2 - use sci_fem_constants_mod, only: get_mass_matrix_fe - use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type - use matrix_vector_kernel_mod, only: matrix_vector_kernel_type - use tl_bdy_lyr_alg_mod, only: tl_bdy_lyr_alg - use sci_mass_matrix_solver_alg_mod, only: mass_matrix_solver_alg - use sci_field_bundle_builtins_mod, only: clone_bundle, copy_bundle, set_bundle_scalar - use operator_mod, only: operator_type - - implicit none - - private - public :: tl_physics_alg - -contains - -!> @brief Wrapper for tangent linear physics code, currently just tl_bdy_lyr_alg -!> @param[in,out] modeldb Structure containing the model state -!> @param[in,out] u The TL model u field to be incremented -!> @param[in,out] state_star TL model prognostic fields for physics calculations -!> @param[in,out] rhs_phys Residuals -!> @param[in] state The current TL model prognostic fields -!> @param[in] rhs_n Residuals -!> @param[in] rhs_np1 Residuals -!> @param[in] rhs_adv Advective terms -!> @param[in] ls_state Lin state for Prognostic model state -!> @param[in] mesh The current mesh -!> @param[in] dt The TL model timestep length -subroutine tl_physics_alg(modeldb, & - u, & - state_star, & - rhs_phys, & - rhs_np1, & - rhs_n, & - state, & - rhs_adv, & - ls_state, & - mesh, & - dt) - - implicit none - - type(modeldb_type), target, intent(inout) :: modeldb - type(field_type), intent(inout) :: u - type(field_type), intent(inout) :: state_star(bundle_size) - type(field_type), intent(inout) :: rhs_phys(bundle_size) - type(field_type), intent(in) :: state(bundle_size) - type(field_type), intent(in) :: rhs_n(bundle_size) - type(field_type), intent(in) :: rhs_np1(bundle_size) - type(field_type), intent(in) :: rhs_adv(bundle_size) - type(field_type), intent(in) :: ls_state(bundle_size) - type(mesh_type), pointer, intent(in) :: mesh - real(kind=r_def), intent(in) :: dt - - type(field_type) :: u_bl_inc - type(field_type) :: u_bl_inc_flux - type(field_type) :: du - type(field_type) :: u_star - type(field_type) :: u_star_physical - type(field_type) :: rhsu_np1 - - type(operator_type), pointer :: mm_vel - type(field_type), pointer :: dA - - integer(kind=tik) :: id - - if (LPROF) call start_timing(id, 'tl_physics_alg') - - mm_vel => get_mass_matrix_fe(W2, mesh%get_id()) - - ! Run linear boundary layer scheme to compute increment to u perturbation - - call u%copy_field_properties( u_bl_inc ) - call u%copy_field_properties( u_bl_inc_flux ) - call u%copy_field_properties( du ) - call u%copy_field_properties( u_star ) - call u%copy_field_properties( u_star_physical ) - call rhs_adv(igh_u)%copy_field_properties( rhsu_np1 ) - - ! Compute u_star = u_np1 + du - ! where du = M^-1(-rhs_np1 + rhs_n + rhs_a) - ! This mirrors the calc_phys_predictors_alg in gungho - call du%initialise( rhs_adv(igh_u)%get_function_space() ) - call rhsu_np1%initialise( rhs_adv(igh_u)%get_function_space() ) - call invoke( setval_c( du, 0.0_r_def ), & - aX_plus_Y( rhsu_np1, -1.0_r_def, rhs_np1(igh_u), rhs_n(igh_u) ), & - inc_X_plus_Y( rhsu_np1, rhs_adv(igh_u) ) ) - - call mass_matrix_solver_alg( du, rhsu_np1 ) - - call invoke( X_plus_Y( u_star, du, state(igh_u) ) ) - - ! u_star_physical = u_star / dA - ! i.e., divide u_star from boundary layer by dA to transform from flux to velocity - dA => get_da_at_w2(mesh%get_id()) - call invoke( x_divideby_y ( u_star_physical, u_star, dA ) ) - - ! For convenience place u_star_physical as igh_u component of state_star - call clone_bundle( state,state_star, bundle_size ) - call copy_bundle( state, state_star, bundle_size ) - call invoke( setval_x( state_star(igh_u), u_star_physical ) ) - - ! u_bl_inc computed from state_star(igh_u) - call tl_bdy_lyr_alg( modeldb, u_bl_inc, state_star(igh_u), ls_state, dt ) - - ! u_bl_inc_flux = u_bl_inc * dA - ! i.e., multiply by cell face area dA to transform from velocity to flux - call invoke( x_times_y( u_bl_inc_flux, u_bl_inc, dA ) ) - - call set_bundle_scalar( 0.0_r_def, rhs_phys, bundle_size ) - call invoke( name="update_rhs_phys_from_fast_physics", & - matrix_vector_kernel_type( rhs_phys(igh_u), u_bl_inc_flux, mm_vel ), & - enforce_bc_kernel_type( rhs_phys(igh_u) ) ) - - if (LPROF) call stop_timing(id, 'tl_physics_alg') - -end subroutine tl_physics_alg - -end module tl_physics_alg_mod diff --git a/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 b/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 index d912604f0..bfb52ec01 100644 --- a/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 +++ b/science/linear/source/algorithm/timestepping/tl_si_timestep_alg_mod.x90 @@ -30,7 +30,6 @@ module tl_si_timestep_alg_mod l_stabilise_bl, & n_bl_levels_to_stabilise, & max_bl_stabilisation - use linear_physics_config_mod, only: l_boundary_layer use mixed_solver_config_mod, only: guess_np1, & reference_reset_time use timestepping_config_mod, only: alpha, & @@ -96,8 +95,6 @@ module tl_si_timestep_alg_mod use map_physics_fields_alg_mod, only: map_physics_fields_alg - use tl_physics_alg_mod, only: tl_physics_alg - ! Moisture species use mr_indices_mod, only: nummr, imr_v, imr_cl use moist_dyn_mod, only: num_moist_factors, gas_law @@ -124,7 +121,6 @@ module tl_si_timestep_alg_mod type( field_type ), allocatable :: state_initial(:) type( field_type ), allocatable :: state_n(:) type( field_type ), allocatable :: state_after_slow(:) - type( field_type ), allocatable :: state_star(:) type( field_type ), allocatable :: advected_state(:) type( field_type ), allocatable :: mr_n(:) type( field_type ), allocatable :: mr_inc(:) @@ -132,7 +128,6 @@ module tl_si_timestep_alg_mod type( field_type ), allocatable :: rhs_n(:) type( field_type ), allocatable :: rhs_np1(:) type( field_type ), allocatable :: rhs_adv(:) - type( field_type ), allocatable :: rhs_phys(:) ! Linearisation state type( field_type ), allocatable :: ls_state(:) @@ -223,12 +218,10 @@ contains allocate(state_initial(bundle_size)) allocate(state_n(bundle_size)) allocate(state_after_slow(bundle_size)) - allocate(state_star(bundle_size)) allocate(advected_state(bundle_size)) allocate(rhs_n(bundle_size)) allocate(rhs_np1(bundle_size)) allocate(rhs_adv(bundle_size)) - allocate(rhs_phys(bundle_size)) allocate(mr_n(nummr)) allocate(mr_after_slow(nummr)) allocate(mr_inc(nummr)) @@ -278,7 +271,6 @@ contains call clone_bundle(state, rhs_n, bundle_size) call clone_bundle(state, rhs_np1, bundle_size) call clone_bundle(state, rhs_adv, bundle_size) - call clone_bundle(state, rhs_phys, bundle_size) call clone_bundle(state, ls_state, bundle_size) call clone_bundle(state, ls_state_n, bundle_size) @@ -704,8 +696,6 @@ contains moist_dyn, ls_state_n, ls_moist_dyn_itns(:, 1,1), & .false., .false., model_clock=modeldb%clock ) - call invoke(setval_c( rhs_np1(igh_u), 0.0_r_def )) - call copy_bundle(state_after_slow, advected_state, bundle_size) if ( .not. si_momentum_equation ) then ! Predictor of the wind field (u-beta*dt*rhs) to be advected if using @@ -748,38 +738,6 @@ contains dg_inc_matrix_vector_kernel_type(rhs_adv(igh_t), & theta_fv_inc, mm_wt) ) - ! Previously tl_rhs_alg was called within each inner loop. - ! It still is called there for inner_iterations > 1. - ! For the first inner loop, it needs to be called before entering. - ! This is because rhs_np1 is used to calculate u_star in tl_bdy_lyr_alg. - if (use_wavedynamics) then - call tl_rhs_alg( rhs_np1, & - -varalpha*cast_dt, & - state, & - state, & - moist_dyn, & - ls_state_itns( :, ls_outer, 1 ), & - ls_moist_dyn_itns( :, ls_outer, 1 ), & - .true., & - dlayer_on, & - modeldb%clock ) - end if - - if (l_boundary_layer) then - ! Linear boundary layer scheme is currently the only linear physics scheme - call tl_physics_alg( modeldb, & - u, & - state_star, & - rhs_phys, & - rhs_np1, & - rhs_n, & - state, & - rhs_adv, & - ls_state_itns(:,ls_outer,1), & - mesh, & - cast_dt ) - end if ! l_boundary_layer - if (use_wavedynamics) then ! Use advective update to guess n+1 level scalar fieldsgv . @@ -803,19 +761,16 @@ contains !-------------------------------------------------------------------- ! Compute the time-level n+1 dynamics terms !-------------------------------------------------------------------- - ! Only call tl_rhs_alg if inner > 1 as for inner===1 it is already called early (see comment above) - if (inner > 1) then - call tl_rhs_alg(rhs_np1, & - -varalpha*cast_dt, & - state, & - state, & - moist_dyn, & - ls_state_itns(:, ls_outer, ls_inner), & - ls_moist_dyn_itns(:, ls_outer, ls_inner), & - .true., & - dlayer_on, & - modeldb%clock) - end if + call tl_rhs_alg(rhs_np1, & + -varalpha*cast_dt, & + state, & + state, & + moist_dyn, & + ls_state_itns(:, ls_outer, ls_inner), & + ls_moist_dyn_itns(:, ls_outer, ls_inner), & + .true., & + dlayer_on, & + modeldb%clock) !-------------------------------------------------------------------- ! Compute the LAM LBCs and RHS @@ -832,7 +787,6 @@ contains !-------------------------------------------------------------------- call bundle_axpy(-1.0_r_def, rhs_np1, rhs_n, rhs_np1, bundle_size) call add_bundle(rhs_np1, rhs_adv, rhs_np1, bundle_size) - if (l_boundary_layer) call add_bundle(rhs_np1, rhs_phys, rhs_np1, bundle_size) if ( limited_area ) then call log_event( "No limited area for Tangent linear", LOG_LEVEL_ERROR ) @@ -955,12 +909,10 @@ contains if (allocated(state_initial)) deallocate(state_initial) if (allocated(state_n)) deallocate(state_n) if (allocated(state_after_slow)) deallocate(state_after_slow) - if (allocated(state_star)) deallocate(state_star) if (allocated(advected_state)) deallocate(advected_state) if (allocated(rhs_n)) deallocate(rhs_n) if (allocated(rhs_np1)) deallocate(rhs_np1) if (allocated(rhs_adv)) deallocate(rhs_adv) - if (allocated(rhs_phys)) deallocate(rhs_phys) if (allocated(mr_n)) deallocate(mr_n) if (allocated(mr_after_slow)) deallocate(mr_after_slow) if (allocated(mr_inc)) deallocate(mr_inc) diff --git a/science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 b/science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 deleted file mode 100644 index 779dd5b5a..000000000 --- a/science/linear/source/algorithm/transport/control/tl_split_transport_mod.x90 +++ /dev/null @@ -1,333 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Tangent linear version of split_transport - -module tl_split_transport_mod - - use constants_mod, only: i_def, r_tran - use r_tran_field_mod, only: r_tran_field_type - use log_mod, only: log_event, LOG_LEVEL_ERROR - use split_transport_utils_mod, only: get_splitting_direction, & - get_splitting_fraction, & - get_num_split_steps - use split_transport_mod, only: split_transport_field - - ! Transport control infrastructure - use transport_controller_mod, only: transport_controller_type - use tl_transport_controller_mod, only: tl_transport_controller_type - use transport_counter_mod, only: transport_counter_type - use transport_enumerated_types_mod, only: direction_h, & - direction_v, & - split_method_null, & - split_method_mol, & - split_method_ffsl, & - split_method_sl, & - equation_form_conservative, & - equation_form_advective, & - equation_form_consistent - use transport_metadata_mod, only: transport_metadata_type - - ! Algorithms - use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg, & - end_of_consistent_step_alg, & - end_of_advective_step_alg - use linear_config_mod, only: transport_efficiency - - implicit none - - private - - public :: tl_split_transport_control - public :: tl_split_transport_field - -contains - - !============================================================================= - !> @brief Controls vertical/horizontal split transport. - !> @details Manages the vertical/horizontal splitting of the split transport - !! scheme by choosing the splitting type and calling the individual - !! vertical and horizontal split components. - !> @param[in,out] field_np1 ACTIVE Field to return at end - !> @param[in] field_n ACTIVE Field at the start - !> @param[in] ls_field_n PASSIVE LS Field at the start - !> @param[in,out] tl_transport_controller - !! Encapsulating object containing the - !! transport counter and precomputations - subroutine tl_split_transport_control(field_np1, field_n, ls_field_n, & - tl_transport_controller) - - implicit none - - ! Arguments - type(r_tran_field_type), intent(inout) :: field_np1 - type(r_tran_field_type), target, intent(in) :: field_n - type(r_tran_field_type), target, intent(in) :: ls_field_n - type(tl_transport_controller_type), intent(inout) :: tl_transport_controller - - ! Internal variables - integer(kind=i_def) :: num_split_steps - integer(kind=i_def) :: split_step_count - type(r_tran_field_type), allocatable :: ls_field_np1(:) - type(r_tran_field_type), target :: field_tmp - type(r_tran_field_type), pointer :: field_ptr - type(transport_counter_type), pointer :: transport_counter - type(transport_counter_type), pointer :: ls_transport_counter - type(transport_metadata_type), pointer :: transport_metadata - type(transport_controller_type), pointer :: pert_transport_controller - type(transport_controller_type), pointer :: ls_transport_controller - real(kind=r_tran) :: dt_substep - integer(kind=i_def) :: num_substeps - - ! ------------------------------------------------------------------------ ! - ! NONLINEAR (LS) - ! ------------------------------------------------------------------------ ! - - ls_transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() - transport_metadata => ls_transport_controller%get_transport_metadata() - ls_transport_counter => ls_transport_controller%get_transport_counter() - - ! Initialise fields - num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) - allocate(ls_field_np1(num_split_steps + 1)) - do split_step_count = 1, num_split_steps + 1 - call field_n%copy_field_properties(ls_field_np1(split_step_count)) - end do - - if ( .not. transport_efficiency ) then - - ! When we have multiple split steps, we need an intermediate field for the - ! field at the start of each substep - ! field_ptr points to the field at the start of each split step - call invoke( setval_X(ls_field_np1(1), ls_field_n) ) - - if (num_split_steps > 1) then - call field_n%copy_field_properties(field_tmp) - call invoke( setval_X(field_tmp, ls_field_n) ) - field_ptr => field_tmp - else - field_ptr => ls_field_n - end if - - do split_step_count = 1, num_split_steps - call split_transport_field( ls_field_np1(split_step_count+1), & - field_ptr, & - ls_transport_controller & - ) - - if (split_step_count < num_split_steps) then - call invoke( setval_X(field_tmp, ls_field_np1(split_step_count+1) ) ) - - ! Increment split step counter - call ls_transport_counter%inc_split_step_counter() - end if - end do - - else - ! Assume that the linearisation state does not evolve during the split transport - do split_step_count = 1, num_split_steps + 1 - call invoke( setval_X(ls_field_np1(split_step_count), ls_field_n) ) - end do - end if - - dt_substep = ls_transport_counter%get_dt_substep() - num_substeps = ls_transport_counter%get_num_substeps() - call ls_transport_counter%initialise(transport_metadata, dt_substep, num_substeps ) - - ! ------------------------------------------------------------------------ ! - ! LINEAR - ! ------------------------------------------------------------------------ ! - - pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_metadata => pert_transport_controller%get_transport_metadata() - transport_counter => pert_transport_controller%get_transport_counter() - - ! Initialise fields - num_split_steps = get_num_split_steps(transport_metadata%get_splitting()) - - ! When we have multiple split steps, we need an intermediate field for the - ! field at the start of each substeps - ! field_ptr points to the field at the start of each split step - if (num_split_steps > 1) then - call field_n%copy_field_properties(field_tmp) - call invoke( setval_X(field_tmp, field_n) ) - field_ptr => field_tmp - else - field_ptr => field_n - end if - - do split_step_count = 1, num_split_steps - - call tl_split_transport_field( & - field_np1, field_ptr, ls_field_np1(split_step_count), & - tl_transport_controller & - ) - - if (split_step_count < num_split_steps) then - call invoke( setval_X(field_tmp, field_np1 ) ) - - ! Increment split step counter - call transport_counter%inc_split_step_counter() - call ls_transport_counter%inc_split_step_counter() - end if - - end do - - deallocate( ls_field_np1 ) - - end subroutine tl_split_transport_control - - !============================================================================= - !> @brief Does either vertical or horizontal transport of a field. - !> @details Performs a vertical or horizontal transport step, solving the - !! transport equation for a (multidata) field. - !> @param[in,out] field_np1 ACTIVE Field to return at end - !> @param[in] field_n ACTIVE Field at the start - !> @param[in] ls_field_n PASSIVE Field at the start - !> @param[in,out] tl_transport_controller - !! Encapsulating object containing the - !! transport counter and precomputations - subroutine tl_split_transport_field(field_np1, field_n, ls_field_n, tl_transport_controller) - - use tl_mol_conservative_alg_mod, only: tl_mol_conservative_alg - use tl_mol_advective_alg_mod, only: tl_mol_advective_alg - - implicit none - - ! Arguments - type(r_tran_field_type), intent(inout) :: field_np1 - type(r_tran_field_type), intent(in) :: field_n - type(r_tran_field_type), intent(in) :: ls_field_n - type(tl_transport_controller_type), intent(inout) :: tl_transport_controller - - ! Internal variables - integer(kind=i_def) :: method, direction - type(transport_counter_type), pointer :: transport_counter - type(transport_metadata_type), pointer :: transport_metadata - type(transport_controller_type), pointer :: pert_transport_controller - - pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_counter => pert_transport_controller%get_transport_counter() - transport_metadata => pert_transport_controller%get_transport_metadata() - - ! -------------------------------------------------------------------------! - ! Set up method based on direction - ! -------------------------------------------------------------------------! - direction = get_splitting_direction( & - transport_metadata%get_splitting(), & - transport_counter%get_split_step_of_substep_counter() & - ) - - select case ( direction ) - case ( direction_h ) - method = transport_metadata%get_horizontal_method() - case ( direction_v ) - method = transport_metadata%get_vertical_method() - case default - call log_event('Split transport direction not recognised', LOG_LEVEL_ERROR) - end select - - ! -------------------------------------------------------------------------! - ! Choose method, and then choose equation - ! -------------------------------------------------------------------------! - select case ( method ) - - ! -------------------------------------------------------------------------! - ! Null step - ! -------------------------------------------------------------------------! - case ( split_method_null ) - call log_event( & - 'TL: Split method null not coded', & - LOG_LEVEL_ERROR & - ) - - ! -------------------------------------------------------------------------! - ! Method of Lines step - ! -------------------------------------------------------------------------! - case ( split_method_mol ) - ! Choose form of transport equation - select case ( transport_metadata%get_equation_form() ) - case ( equation_form_conservative ) - call tl_mol_conservative_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & - ) - case ( equation_form_advective ) - call tl_mol_advective_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & - ) - case ( equation_form_consistent ) - call log_event( & - 'TL: MoL Consistent not coded yet', & - LOG_LEVEL_ERROR & - ) - case default - call log_event( & - 'Trying to solve unrecognised form of transport equation', & - LOG_LEVEL_ERROR & - ) - - end select - - ! -------------------------------------------------------------------------! - ! Flux-Form Semi-Lagrangian step - ! -------------------------------------------------------------------------! - case ( split_method_ffsl ) - ! All equation forms have the same control method - call log_event( & - 'TL: FFSL not coded yet', & - LOG_LEVEL_ERROR & - ) - ! -------------------------------------------------------------------------! - ! Semi-Lagrangian step - ! -------------------------------------------------------------------------! - case ( split_method_sl ) - ! Choose direction - select case ( direction ) - - case ( direction_h ) - ! Horizontal SL only for advective form - if ( transport_metadata%get_equation_form() /= equation_form_advective ) then - call log_event( & - 'Horizontal semi-Lagrangian is only for advective form', & - LOG_LEVEL_ERROR & - ) - end if - call log_event( & - 'TL: Horizontal SL not coded yet', & - LOG_LEVEL_ERROR & - ) - - case ( direction_v ) - ! Choose form of transport equation for vertical - select case ( transport_metadata%get_equation_form() ) - - case ( equation_form_conservative ) - call log_event( & - 'TL: Vertical SL conservative not coded yet', & - LOG_LEVEL_ERROR & - ) - case ( equation_form_advective ) - call log_event( & - 'TL: Vertical SL advective not coded yet', & - LOG_LEVEL_ERROR & - ) - case default - call log_event( & - 'Trying to solve unrecognised form of transport equation', & - LOG_LEVEL_ERROR & - ) - end select - end select - - case default - call log_event( & - 'Trying to transport with unrecognised scheme', & - LOG_LEVEL_ERROR & - ) - end select - - end subroutine tl_split_transport_field - -end module tl_split_transport_mod diff --git a/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 b/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 index 5fd0a5b02..17016206a 100644 --- a/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 +++ b/science/linear/source/algorithm/transport/control/tl_transport_field_mod.f90 @@ -21,7 +21,6 @@ module tl_transport_field_mod equation_form_advective use tl_mol_conservative_alg_mod, only: tl_mol_conservative_alg use tl_mol_advective_alg_mod, only: tl_mol_advective_alg - use tl_split_transport_mod, only: tl_split_transport_control use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -122,8 +121,10 @@ subroutine tl_transport_field(field_np1, field_n, ls_field_n, & ! Some split horizontal/vertical transport scheme ! -------------------------------------------------------------------------! case ( scheme_split ) - call tl_split_transport_control(field_np1, field_n, ls_field_n, & - tl_transport_controller) + call log_event( & + 'Split transport not implemented for tangent-linear app', & + LOG_LEVEL_ERROR & + ) case default call log_event( & diff --git a/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 b/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 index e85d71036..a1a34919f 100644 --- a/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 +++ b/science/linear/source/algorithm/transport/mol/tl_mol_advective_alg_mod.x90 @@ -28,7 +28,6 @@ module tl_mol_advective_alg_mod ! Configuration use transport_config_mod, only: runge_kutta_method - use linear_config_mod, only: transport_efficiency implicit none @@ -59,9 +58,7 @@ contains ! Internal variables integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep - integer(kind=i_def) :: ls_nstage, ls_substep integer(kind=i_def) :: number_substeps - integer(kind=i_def) :: ls_stage, ls_number_substeps integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -76,10 +73,7 @@ contains type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata - type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter - type(transport_counter_type), pointer :: ls_transport_counter - type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller type(wind_precomputations_type), pointer :: ls_wind_precomputations @@ -89,17 +83,10 @@ contains ! Extract transport objects and initialise temporary fields ! ------------------------------------------------------------------------ ! mesh => field%get_mesh() - - transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_metadata => pert_transport_controller%get_transport_metadata() - ls_transport_metadata => transport_controller%get_transport_metadata() - transport_counter => pert_transport_controller%get_transport_counter() - ls_transport_counter => transport_controller%get_transport_counter() - ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -120,23 +107,13 @@ contains call field_n%initialise(field%get_function_space()) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) - - if (transport_efficiency) then - ls_number_substeps = 1 - ls_nstage =1 - else - ls_number_substeps = number_substeps - ls_nstage = nstage - end if allocate( rk_field(nstage) ) - allocate( stored_ls_field(ls_number_substeps, ls_nstage) ) + allocate( stored_ls_field(number_substeps, nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - end do - do ls_stage = 1, ls_nstage - do ls_substep = 1, ls_number_substeps - call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) + do substep = 1, number_substeps + call stored_ls_field(substep, stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -153,23 +130,19 @@ contains ! array for each substep and each RK stage to use in the perturbation !--------------------------------------------------------------------------! - if (transport_efficiency) then - call invoke( setval_X( stored_ls_field(1,1), ls_field_np1)) - else - ! Perform the number of rk-stages and substeps required - do substep = 1, ls_number_substeps + do substep = 1, number_substeps ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - do stage = 1, ls_nstage + do stage = 1, nstage ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state call invoke( setval_X(stored_ls_field(substep, stage), ls_field_np1) ) - final_rk_stage = ( stage == ls_nstage ) + final_rk_stage = ( stage == nstage ) ! Compute the field for this stage: ! rhs_field = sum(s=1,stage): a(stage,s)*field^(s) @@ -180,9 +153,9 @@ contains end do ! Compute update: rhs = u.grad(rhs_field) - call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & - ls_advecting_wind, direction, & - ls_transport_metadata, final_rk_stage, & + call advective_and_flux_alg(dummy, rhs, rhs_field, ls_field_n, & + ls_advecting_wind, direction, & + transport_metadata, final_rk_stage, & dt_mol_substep, .false., .true. ) ! Update field: f = f^n - dt*rhs @@ -192,12 +165,10 @@ contains end do ! End of step: if necessary enforce min val and overwrite in blending zone - call end_of_advective_step_alg( & - ls_field_np1, ls_field_n, ls_transport_counter, ls_transport_metadata & + call end_of_advective_step_alg( & + ls_field_np1, ls_field_n, transport_counter, transport_metadata & ) - end if - ! -------------------------------------------------------------------------- ! Perturbation ! @@ -206,28 +177,15 @@ contains ! linearisation stage stage !--------------------------------------------------------------------------- - ! Perform the number of rk-stages and substeps required do substep = 1, number_substeps - if (transport_efficiency) then - ls_substep = 1 - else - ls_substep = substep - end if - ! Reset field_n ready for the this substep call field_np1%copy_field_properties(field_n) call invoke( setval_X(field_n, field_np1) ) do stage = 1, nstage - if (transport_efficiency) then - ls_stage = 1 - else - ls_stage = stage - end if - final_rk_stage = ( stage == nstage ) ! Compute the field for this stage: @@ -241,7 +199,7 @@ contains ! Compute update: rhs = u.grad(rhs_field) call tl_advective_and_flux_alg( & dummy, dummy, rhs, rhs_field, advecting_wind, & - stored_ls_field(ls_substep, ls_stage), ls_advecting_wind, & + stored_ls_field(substep, stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, dt_mol_substep, & .false., .true. & ) diff --git a/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 b/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 index 2b83dbe30..f3a247f10 100644 --- a/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 +++ b/science/linear/source/algorithm/transport/mol/tl_mol_conservative_alg_mod.x90 @@ -28,7 +28,7 @@ module tl_mol_conservative_alg_mod use runge_kutta_init_mod, only: get_rk_transport_weights use split_transport_utils_mod, only: get_num_split_steps, & get_splitting_direction - use transport_constants_mod, only: get_directional_im3_div_r_tran + use transport_constants_mod, only: get_directional_im3_div use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type @@ -43,7 +43,6 @@ module tl_mol_conservative_alg_mod ! Configuration use boundaries_config_mod, only: limited_area use base_mesh_config_mod, only: topology, topology_non_periodic - use linear_config_mod, only: transport_efficiency use transport_config_mod, only: runge_kutta_method, & dry_field_name, & operators, & @@ -80,8 +79,6 @@ module tl_mol_conservative_alg_mod integer(kind=i_def) :: stage, s, direction integer(kind=i_def) :: nstage, substep integer(kind=i_def) :: number_substeps - integer(kind=i_def) :: ls_nstage, ls_substep - integer(kind=i_def) :: ls_stage, ls_number_substeps integer(kind=i_def) :: step integer(kind=i_def) :: splitting real(kind=r_def) :: dt_mol_substep @@ -109,9 +106,7 @@ module tl_mol_conservative_alg_mod type(field_type), allocatable :: rk_field(:) real(kind=r_def), allocatable :: rk_weights(:,:) type(transport_metadata_type), pointer :: transport_metadata - type(transport_metadata_type), pointer :: ls_transport_metadata type(transport_counter_type), pointer :: transport_counter - type(transport_counter_type), pointer :: ls_transport_counter type(transport_controller_type), pointer :: transport_controller type(transport_controller_type), pointer :: ls_transport_controller type(transport_controller_type), pointer :: pert_transport_controller @@ -132,18 +127,11 @@ module tl_mol_conservative_alg_mod transport_controller => tl_transport_controller%get_ls_wind_ls_rho_controller() ls_transport_controller => tl_transport_controller%get_ls_wind_pert_rho_controller() pert_transport_controller => tl_transport_controller%get_pert_wind_ls_rho_controller() - transport_metadata => pert_transport_controller%get_transport_metadata() - ls_transport_metadata => transport_controller%get_transport_metadata() - transport_counter => pert_transport_controller%get_transport_counter() - ls_transport_counter => transport_controller%get_transport_counter() - flux_precomputations => transport_controller%get_flux_precomputations() - ls_wind_flux_precomp => ls_transport_controller%get_flux_precomputations() pert_wind_flux_precomp => pert_transport_controller%get_flux_precomputations() - ls_wind_precomputations => ls_transport_controller%get_wind_precomputations() pert_wind_precomputations => pert_transport_controller%get_wind_precomputations() @@ -159,27 +147,16 @@ module tl_mol_conservative_alg_mod dt_mol_substep = ls_wind_precomputations%get_dt_mol_substep( & mesh%get_id(), direction, splitting, step & ) - div => get_directional_im3_div_r_tran(mesh_id, direction) + div => get_directional_im3_div(mesh_id, direction) call get_rk_transport_weights(nstage, rk_weights, runge_kutta_method) - - if (transport_efficiency) then - ls_number_substeps = 1 - ls_nstage = 1 - else - ls_number_substeps = number_substeps - ls_nstage = nstage - end if - allocate( rk_field(nstage) ) - allocate( stored_ls_field(ls_number_substeps,ls_nstage) ) + allocate( stored_ls_field(number_substeps,nstage) ) do stage = 1, nstage call rk_field(stage)%initialise(field%get_function_space()) - end do - do ls_stage = 1, ls_nstage - do ls_substep = 1, ls_number_substeps - call stored_ls_field(ls_substep, ls_stage)%initialise(field%get_function_space()) + do substep = 1, number_substeps + call stored_ls_field(substep, stage)%initialise(field%get_function_space()) end do end do call rhs_field%initialise( field%get_function_space() ) @@ -218,23 +195,20 @@ module tl_mol_conservative_alg_mod ! array for each substep and each RK stage to use in the perturbation ! ======================================================================== ! - if (transport_efficiency) then - call invoke( setval_X( stored_ls_field(1,1), ls_field_np1 ) ) - else ! ------------------------------------------------------------------------ ! ! Start of substepping loop ! ------------------------------------------------------------------------ ! - ls_substep_loop: do substep = 1, ls_number_substeps + ls_substep_loop: do substep = 1, number_substeps - final_substep = ( substep == ls_number_substeps ) + final_substep = ( substep == number_substeps ) ! Reset field_n ready for the this substep call ls_field_np1%copy_field_properties(ls_field_n) call invoke( setval_X(ls_field_n, ls_field_np1) ) - ls_stage_loop: do stage = 1, ls_nstage + ls_stage_loop: do stage = 1, nstage - final_rk_stage = ( stage == ls_nstage ) + final_rk_stage = ( stage == nstage ) ! Store values for use in the perturbation code. This is done before ! advecting so as to pick up the correct linearisation state @@ -275,7 +249,7 @@ module tl_mol_conservative_alg_mod call advective_and_flux_alg(flux_step, adv_inc, rhs_field, ls_field_n, & ls_advecting_wind, direction, & - ls_transport_metadata, final_rk_stage, & + transport_metadata, final_rk_stage, & dt_mol_substep, do_flux, do_advective) if ( do_flux ) then @@ -318,11 +292,9 @@ module tl_mol_conservative_alg_mod ! increment, and may be adjusted to enforce min value or in blending zone call end_of_conservative_step_alg( & ls_field_np1, ls_field, ls_sum_flux, flux_precomputations, & - ls_transport_counter, ls_transport_metadata & + transport_counter, transport_metadata & ) - end if - ! ======================================================================== ! ! Perturbation ! @@ -336,12 +308,6 @@ module tl_mol_conservative_alg_mod ! ------------------------------------------------------------------------ ! substep_loop: do substep = 1, number_substeps - if (transport_efficiency) then - ls_substep = 1 - else - ls_substep = substep - end if - final_substep = ( substep == number_substeps ) ! Reset field_n ready for the this substep @@ -350,12 +316,6 @@ module tl_mol_conservative_alg_mod stage_loop: do stage = 1, nstage - if (transport_efficiency) then - ls_stage = 1 - else - ls_stage = stage - end if - final_rk_stage = ( stage == nstage ) ! Compute the field for this stage: @@ -393,7 +353,7 @@ module tl_mol_conservative_alg_mod call tl_advective_and_flux_alg( & flux_step_ls_wind, flux_step_pert_wind, adv_inc, & rhs_field, advecting_wind, & - stored_ls_field(ls_substep,ls_stage), ls_advecting_wind, & + stored_ls_field(substep,stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, & dt_mol_substep, do_flux, do_advective & ) diff --git a/science/linear/source/driver/linear_driver_mod.f90 b/science/linear/source/driver/linear_driver_mod.f90 index c7ac56319..662faea60 100644 --- a/science/linear/source/driver/linear_driver_mod.f90 +++ b/science/linear/source/driver/linear_driver_mod.f90 @@ -174,7 +174,7 @@ subroutine initialise( program_name, modeldb ) end if ! Instantiate the linearisation state - call linear_create_ls( modeldb, mesh, twod_mesh) + call linear_create_ls( modeldb, mesh ) ! Initialise the fields stored in the model_data if ( init_option == init_option_fd_start_dump ) then diff --git a/science/linear/source/driver/linear_model_data_mod.f90 b/science/linear/source/driver/linear_model_data_mod.f90 index 00c78d8ff..95befc39f 100644 --- a/science/linear/source/driver/linear_model_data_mod.f90 +++ b/science/linear/source/driver/linear_model_data_mod.f90 @@ -39,7 +39,6 @@ module linear_model_data_mod pert_option_file, & pert_option_zero, & ls_read_w2h - use linear_physics_config_mod, only : l_boundary_layer use linked_list_mod, only : linked_list_type use log_mod, only : log_event, & log_scratch_space, & @@ -72,24 +71,23 @@ module linear_model_data_mod !> @param[inout] modeldb The working data set for a model run !> @param[in] mesh The current 3d mesh !> - subroutine linear_create_ls( modeldb, mesh, twod_mesh ) + subroutine linear_create_ls( modeldb, mesh ) implicit none type( modeldb_type ), target, intent(inout) :: modeldb type( mesh_type ), pointer, intent(in) :: mesh - type( mesh_type ), pointer, intent(in) :: twod_mesh select case( ls_option ) case( ls_option_analytic ) - call linear_create_ls_analytic( modeldb, mesh, twod_mesh ) + call linear_create_ls_analytic( modeldb, mesh ) case( ls_option_file ) - call linear_create_ls_file( modeldb, mesh, twod_mesh ) + call linear_create_ls_file( modeldb, mesh ) case default @@ -108,14 +106,13 @@ end subroutine linear_create_ls !> @param[inout] modeldb The working data set for a model run !> @param[in] mesh The current 3d mesh !> - subroutine linear_create_ls_analytic( modeldb, mesh, twod_mesh ) + subroutine linear_create_ls_analytic( modeldb, mesh ) implicit none type( modeldb_type ), target, intent(inout) :: modeldb type( mesh_type ), pointer, intent(in) :: mesh - type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), pointer :: depository type( field_collection_type ), pointer :: prognostics @@ -173,10 +170,6 @@ subroutine linear_create_ls_analytic( modeldb, mesh, twod_mesh ) imr=imr ) end do - if (l_boundary_layer) & - call setup_field( ls_fields, depository, prognostics, "ls_land_fraction", W3, & - twod_mesh, checkpoint_restart_flag ) - end subroutine linear_create_ls_analytic !> @brief Create the fields in the ls fields field collection to be setup @@ -187,14 +180,13 @@ end subroutine linear_create_ls_analytic !> @param[inout] modeldb The working data set for a model run !> @param[in] mesh The current 3d mesh !> - subroutine linear_create_ls_file( modeldb, mesh, twod_mesh ) + subroutine linear_create_ls_file( modeldb, mesh ) implicit none type( modeldb_type ), target, intent(inout) :: modeldb type( mesh_type ), pointer, intent(in) :: mesh - type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), pointer :: depository type( field_collection_type ), pointer :: prognostics @@ -251,10 +243,6 @@ subroutine linear_create_ls_file( modeldb, mesh, twod_mesh ) call setup_field( ls_fields, depository, prognostics, "ls_theta", Wtheta, & mesh, checkpoint_restart_flag, time_axis=ls_time_axis ) - if (l_boundary_layer) & - call setup_field( ls_fields, depository, prognostics, "ls_land_fraction", W3, & - twod_mesh, checkpoint_restart_flag, time_axis=ls_time_axis ) - if ( ls_read_w2h ) then call setup_field( ls_fields, depository, prognostics, "ls_h_u", W2h, & mesh, checkpoint_restart_flag, time_axis=ls_time_axis ) @@ -466,4 +454,4 @@ subroutine linear_init_pert( mesh, twod_mesh, modeldb ) end subroutine linear_init_pert -end module linear_model_data_mod +end module linear_model_data_mod \ No newline at end of file diff --git a/science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 b/science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 deleted file mode 100644 index 9141565c8..000000000 --- a/science/linear/source/kernel/linear_physics/tl_bl_inc_kernel_mod.F90 +++ /dev/null @@ -1,165 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Computes u_inc, the change in TLM velocity due to TLM boundary layer processes. -module tl_bl_inc_kernel_mod - - use argument_mod, only : arg_type, & - GH_FIELD, GH_OPERATOR, & - GH_SCALAR, GH_INTEGER, & - GH_READ, GH_INC, & - GH_REAL, CELL_COLUMN, & - ANY_DISCONTINUOUS_SPACE_1 - use constants_mod, only : r_def, i_def, r_um - use fs_continuity_mod, only : W1, W2, W3 - use kernel_mod, only : kernel_type - use reference_element_mod, only : N - - implicit none - - private - - !--------------------------------------------------------------------------- - ! Public types - !--------------------------------------------------------------------------- - - type, public, extends(kernel_type) :: tl_bl_inc_kernel_type - private - type(arg_type) :: meta_args(7) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! u_inc - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! u - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Auv - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Buv_inv - arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew - arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ns - arg_type(GH_SCALAR, GH_INTEGER, GH_READ ) & ! Blevs_m - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: tl_bl_inc_code - end type - - !--------------------------------------------------------------------------- - ! Contained functions/subroutines - !--------------------------------------------------------------------------- - public :: tl_bl_inc_code - -contains - -!> @brief Computes u_inc, the change in TLM velocity due to TLM boundary layer processes. -!> @details The algorithm uses coefficients Auv and Buv_inv computed in tl_compute_aubu_kernel_mod. -!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, -!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf -!! @param[in] nlayers Number of layers -!! @param[in,out] u_inc Change in TLM velocity due to TLM boundary layer processes -!! @param[in] u TLM velocity -!! @param[in] nlayers Number of layers -!! @param[in] Auv Coefficient for TLM boundary layer -!! @param[in] Buv_inv Inverse of coefficient for TLM boundary layer -!! @param[in] face_selector_ew 2D field indicating which W/E faces to loop over in this column -!! @param[in] face_selector_ns 2D field indicating which N/S faces to loop over in this column -!! @param[in] Blevs_m Number of levels in momentum boundary layer -!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space -!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space -!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 -!! @param[in] ndf_w3_2d Number of DoFs for 2D W3 per cell -!! @param[in] undf_w3_2d Number of DoFs for this partition for 2D W3 -!! @param[in] map_w3_2d Map for 2D W3 -subroutine tl_bl_inc_code( nlayers, & - u_inc, & - u, & - Auv, & - Buv_inv, & - face_selector_ew, & - face_selector_ns, & - Blevs_m, & - ndf_w2, undf_w2, map_w2, & - ndf_w3_2d, undf_w3_2d, map_w3_2d ) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: nlayers - integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 - real(kind=r_def), dimension(undf_w2), intent(inout) :: u_inc - integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 - real(kind=r_def), dimension(undf_w2), intent(in) :: u - real(kind=r_def), dimension(undf_w2), intent(in) :: Auv - real(kind=r_def), dimension(undf_w2), intent(in) :: Buv_inv - integer(kind=i_def), intent(in) :: ndf_w3_2d, undf_w3_2d - integer(kind=i_def), dimension(ndf_w3_2d), intent(in) :: map_w3_2d - integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ew - integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ns - integer(kind=i_def), intent(in) :: Blevs_m - - ! Internal variables - integer(kind=i_def) :: df, k, j - real(kind=r_def) :: a0(1:BLevs_m) ! Coefficient - real(kind=r_def) :: a1(1:BLevs_m) ! Coefficient - real(kind=r_def) :: a2(1:BLevs_m) ! Coefficient - real(kind=r_def) :: u_rhs(1:BLevs_m) ! Local perturbation velocity variable - real(kind=r_def) :: u_out(1:BLevs_m) ! Local perturbation velocity variable - real(kind=r_def) :: factor_u(1:BLevs_m) - - ! Loop over horizontal W2 DoFs whilst minimising double counting. - ! (Looping over all dofs would mean that faces are visited twice – for the cells on both sides. - ! So here the loop is only for a specific selection of dofs.) - do j = 1, face_selector_ew(map_w3_2d(1)) + face_selector_ns(map_w3_2d(1)) - - df = j - if (j == 3 .and. face_selector_ns(map_w3_2d(1)) == 2 .and. face_selector_ew(map_w3_2d(1)) == 1) df = N - - a0 = 0.0_r_def - a1 = 0.0_r_def - a2 = 0.0_r_def - u_rhs = 0.0_r_def - u_out = 0.0_r_def - factor_u = 0.0_r_def - - ! Set up coeffs a0, a1, a2, u_rhs - do k = 1, BLevs_m - if (k == 1) then - a0(1) = 1.0_r_def + (Auv(map_w2(df) + 1) + Auv(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) - a1(k) = -Auv(map_w2(df) + 1) / Buv_inv(map_w2(df) + 1) - u_rhs(1) = (Auv(map_w2(df) + 1) & - * (u(map_w2(df) + 1) - u(map_w2(df) + 0)) - Auv(map_w2(df) + 0) * u(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) - else if (k > 1 .and. k < BLevs_m) then - a0(k) = 1.0_r_def + (Auv(map_w2(df) + k) + Auv(map_w2(df) + k - 1)) / Buv_inv(map_w2(df) + k) - a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) - a1(k) = -Auv(map_w2(df) + k) / Buv_inv(map_w2(df) + k) - u_rhs(k) = (Auv(map_w2(df) + k) & - * (u(map_w2(df) + k) - u(map_w2(df) + k - 1)) & - - Auv(map_w2(df) + k - 1) * (u(map_w2(df) + k - 1) - u(map_w2(df) + k - 2))) / Buv_inv(map_w2(df) + k) - else - a0(k) = 1.0_r_def + Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) - a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) - u_rhs(k) = -(Auv(map_w2(df) + k - 1) * (u(map_w2(df) + k - 1) - u(map_w2(df) + k - 2))) / Buv_inv(map_w2(df) + k) - end if - end do - - ! Transform to upper triangular form - do k = 1, BLevs_m - if (k == 1) then - a0(1) = 1.0_r_def / a0(1) - else - factor_u(k) = a2(k) * a0(k - 1) - a0(k) = 1.0_r_def / (a0(k) - factor_u(k) * a1(k - 1)) - u_rhs(k) = u_rhs(k) - factor_u(k) * u_rhs(k - 1) - end if - end do - - ! Solve for u_inc - u_out(BLevs_m) = a0(BLevs_m) * u_rhs(BLevs_m) - u_inc(map_w2(df) + BLevs_m - 1) = u_out(BLevs_m) - do k = BLevs_m - 1, 1, -1 - u_out(k) = a0(k) * (u_rhs(k) - a1(k) * u_out(k + 1)) - u_inc(map_w2(df) + k - 1) = u_out(k) - end do - - end do ! Loop over horizontal W2 DoFs - -end subroutine tl_bl_inc_code - -end module tl_bl_inc_kernel_mod diff --git a/science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 b/science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 deleted file mode 100644 index 1f16f4b81..000000000 --- a/science/linear/source/kernel/linear_physics/tl_compute_aubu_kernel_mod.F90 +++ /dev/null @@ -1,117 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Computes coefficients Auv and Buv_inv used in the TLM boundary layer scheme for momentum. -module tl_compute_aubu_kernel_mod - - use argument_mod, only : arg_type, func_type, & - GH_FIELD, GH_OPERATOR, & - GH_SCALAR, GH_INTEGER, & - GH_READ, GH_INC, GH_READWRITE, & - GH_REAL, CELL_COLUMN, GH_BASIS, GH_EVALUATOR, & - ANY_DISCONTINUOUS_SPACE_1 - use constants_mod, only : r_def, i_def, r_um - use fs_continuity_mod, only : W1, W2, W3 - use kernel_mod, only : kernel_type - - implicit none - - private - - !--------------------------------------------------------------------------- - ! Public types - !--------------------------------------------------------------------------- - type, public, extends(kernel_type) :: tl_compute_aubu_kernel_type - private - type(arg_type) :: meta_args(8) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! Auv - arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! Buv_inv - arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! Q - arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! E - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! height_w2 - arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! w2_rmultiplicity - arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! dt - arg_type(GH_SCALAR, GH_INTEGER, GH_READ ) & ! Blevs_m - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: tl_compute_aubu_code - end type - - !--------------------------------------------------------------------------- - ! Contained functions/subroutines - !--------------------------------------------------------------------------- - public :: tl_compute_aubu_code - -contains - -!> @brief Computes coefficients Auv and Buv_inv used in the TLM boundary layer scheme for momentum. -!> @details Auv and Buv_inv are derived from coefficients Q and E which are computed in tl_compute_qe_kernel_mod. -!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, -!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf -!! @param[in] nlayers Number of layers -!! @param[in,out] Auv Coefficient for TLM boundary layer -!! @param[in,out] Buv_inv Inverse of coefficient for TLM boundary layer -!! @param[in] Q Coefficient for TLM boundary layer -!! @param[in] E Coefficient for TLM boundary layer -!! @param[in] height_w2 Height of w2 space levels above the surface -!! @param[in] w2_rmultiplicity Reciprocal of multiplicity for W2 -!! @param[in] dt TLM time step -!! @param[in] Blevs_m Number of levels in momentum boundary layer -!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space -!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space -!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 -!! @param[in] ndf_w3 Number of degrees of freedom per cell for w3 space -!! @param[in] undf_w3 Number of unique degrees of freedom for w3 space -!! @param[in] map_w3 Dofmap for the cell at column base for w3 -subroutine tl_compute_aubu_code( nlayers, & - Auv, & - Buv_inv, & - Q, & - E, & - height_w2, & - w2_rmultiplicity, & - dt, & - Blevs_m, & - ndf_w2, undf_w2, map_w2, & - ndf_w3, undf_w3, map_w3) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: nlayers - integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 - integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 - integer(kind=i_def), intent(in) :: undf_w2, ndf_w2 - integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 - real(kind=r_def), dimension(undf_w2), intent(in) :: w2_rmultiplicity - real(kind=r_def), dimension(undf_w2), intent(inout) :: Auv !(0:BLevs_m) - real(kind=r_def), dimension(undf_w2), intent(inout) :: Buv_inv ! Use inverse of Buv as this is what is averaged - real(kind=r_def), dimension(undf_w3), intent(in) :: Q ! (0:BLevs_m) - real(kind=r_def), dimension(undf_w3), intent(in) :: E ! (BLevs_m) - real(kind=r_def), dimension(undf_w2), intent(in) :: height_w2 - real(kind=r_def), intent(in) :: dt - integer(kind=i_def), intent(in) :: Blevs_m - - ! Internal variables - integer(kind=i_def) :: df, df3, k - - df3 = 1 - - do df = 1, 4 - do k = 0, BLevs_m - if (k == 0) then - Auv(map_w2(df) + k) = w2_rmultiplicity(map_w2(df)) * Q(map_w3(df3)) - else ! 1 <= k <= BLevs_m - Auv(map_w2(df) + k) = & - w2_rmultiplicity(map_w2(df) + k) * Q(map_w3(df3) + k) / (height_w2(map_w2(df) + k) - height_w2(map_w2(df) + k - 1)) - Buv_inv(map_w2(df) + k) = ( w2_rmultiplicity(map_w2(df) + k) * E(map_w3(df3) + k) ) / dt - end if - end do ! k = 0, BLevs_m - end do ! df = 1, 4 - -end subroutine tl_compute_aubu_code - -end module tl_compute_aubu_kernel_mod diff --git a/science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 b/science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 deleted file mode 100644 index 89c6a7710..000000000 --- a/science/linear/source/kernel/linear_physics/tl_compute_qe_kernel_mod.F90 +++ /dev/null @@ -1,179 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2026 Met Office. All rights reserved. -! The file LICENCE, distributed with this code, contains details of the terms -! under which the code may be used. -!----------------------------------------------------------------------------- -!> @brief Computes coefficients Q and E used in the TLM boundary layer scheme for momentum. -module tl_compute_qe_kernel_mod - - use argument_mod, only : arg_type, func_type, & - GH_FIELD, GH_OPERATOR, & - GH_SCALAR, GH_INTEGER, & - GH_READ, GH_INC, GH_READWRITE, & - GH_REAL, CELL_COLUMN, GH_BASIS, GH_EVALUATOR, & - ANY_DISCONTINUOUS_SPACE_1 - use constants_mod, only : r_def, i_def, r_um - use fs_continuity_mod, only : W1, W2, W3, Wtheta - use kernel_mod, only : kernel_type - - implicit none - - private - - !--------------------------------------------------------------------------- - ! Public types - !--------------------------------------------------------------------------- - type, public, extends(kernel_type) :: tl_compute_qe_kernel_type - private - type(arg_type) :: meta_args(14) = (/ & - arg_type(GH_FIELD, GH_REAL, GH_READWRITE, W3), & ! Q - arg_type(GH_FIELD, GH_REAL, GH_READWRITE, W3), & ! E - arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! ls_rho - arg_type(GH_FIELD, GH_REAL, GH_READ, W3), & ! height_w3 - arg_type(GH_FIELD, GH_REAL, GH_READ, Wtheta), & ! height_wth - arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1 ), & ! ls_land_fraction - arg_type(GH_SCALAR, GH_INTEGER, GH_READ ), & ! log_layer - arg_type(GH_SCALAR, GH_INTEGER, GH_READ ), & ! Blevs_m - arg_type(GH_SCALAR, GH_INTEGER, GH_READ ), & ! e_folding_levs_m - arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! u_land_m - arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! u_sea_m - arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! z_land_m - arg_type(GH_SCALAR, GH_REAL, GH_READ ), & ! z_sea_m - arg_type(GH_SCALAR, GH_REAL, GH_READ ) & ! L_0_m - /) - integer :: operates_on = CELL_COLUMN - contains - procedure, nopass :: tl_compute_qe_code - end type - - !--------------------------------------------------------------------------- - ! Contained functions/subroutines - !--------------------------------------------------------------------------- - public :: tl_compute_qe_code - -contains - -!> @brief Computes coefficients Q and E used in the TLM boundary layer scheme for momentum. -!> @details The TLM BL scheme is described in Var Scientific Documentation Paper 55, -!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf -!! @param[in] nlayers Number of layers -!! @param[in,out] Q Coefficient for TLM boundary layer -!! @param[in,out] E Coefficient for TLM boundary layer -!! @param[in] ls_rho Linearisation state for density -!! @param[in] height_w3 Height of w3 space levels above the surface -!! @param[in] height_wth Height of wth space levels above surface -!! @param[in] ls_land_fraction Land area fraction -!! @param[in] log_layer Number of levels in log layer -!! @param[in] Blevs_m Number of levels in momentum boundary layer -!! @param[in] e_folding_levs_m e-folding level in exchange coefficient for momemtum -!! @param[in] z_land_m Effective roughness length for momemtum over land -!! @param[in] z_sea_m Effective roughness length for momemtum over sea -!! @param[in] u_land_m Friction velocity for momemtum over land -!! @param[in] u_sea_m Friction velocity for momemtum over sea -!! @param[in] L_0_m Mixing length for momemtum -!! @param[in] ndf_w3 Number of degrees of freedom per cell for w3 space -!! @param[in] undf_w3 Number of unique degrees of freedom for w3 space -!! @param[in] map_w3 Dofmap for the cell at column base for w3 -!! @param[in] ndf_wtheta Number of degrees of freedom per cell for wtheta space -!! @param[in] undf_wtheta Number of unique degrees of freedom for wtheta space -!! @param[in] map_wtheta Dofmap for the cell at the base of the column for wtheta -!! @param[in] ndf_2d Number of degrees of freedom per cell for 2D field -!! @param[in] undf_2d Number of unique degrees of freedom for 2D field -!! @param[in] map_2d Dofmap for 2D field -subroutine tl_compute_qe_code( nlayers, & - Q, & - E, & - ls_rho, & - height_w3, & - height_wth, & - ls_land_fraction, & - log_layer, & - Blevs_m, & - e_folding_levs_m, & - u_land_m, & - u_sea_m, & - z_land_m, & - z_sea_m, & - L_0_m, & - ndf_w3, undf_w3, map_w3, & - ndf_wtheta, undf_wtheta, map_wtheta, & - ndf_2d, undf_2d, map_2d ) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: nlayers - integer(kind=i_def), intent(in) :: undf_w3, ndf_w3 - integer(kind=i_def), dimension(ndf_w3), intent(in) :: map_w3 - integer(kind=i_def), intent(in) :: undf_wtheta, ndf_wtheta - integer(kind=i_def), dimension(ndf_wtheta), intent(in) :: map_wtheta - integer(kind=i_def), intent(in) :: undf_2d, ndf_2d - integer(kind=i_def), dimension(ndf_2d), intent(in) :: map_2d - real(kind=r_def), dimension(undf_w3), intent(inout) :: Q ! (0:BLevs_m) - real(kind=r_def), dimension(undf_w3), intent(inout) :: E ! (BLevs_m) - real(kind=r_def), dimension(undf_w3), intent(in) :: ls_rho - real(kind=r_def), dimension(undf_w3), intent(in) :: height_w3 - real(kind=r_def), dimension(undf_wtheta), intent(in) :: height_wth - real(kind=r_def), dimension(undf_2d), intent(in) :: ls_land_fraction - integer(kind=i_def), intent(in) :: log_layer,Blevs_m,e_folding_levs_m - real(kind=r_def), intent(in) :: u_land_m, u_sea_m, z_land_m, z_sea_m, L_0_m - - ! Internal variables - integer(kind=i_def) :: df, k - real(kind=r_def) :: roughness_length_m - real(kind=r_def), parameter :: Von_Karman = 0.4_r_def - real(kind=r_def) :: L_diff_m(1:BLevs_m) - real(kind=r_def) :: u1 - real(kind=r_def) :: num - real(kind=r_def) :: denom - - df = 1 ! map_w3 only has range 1:1, map_wtheta has range 1:2 with 1 being lower face of cell - roughness_length_m = z_land_m * ls_land_fraction(map_2d(df)) + z_sea_m * (1.0_r_def - ls_land_fraction(map_2d(df))) - - ! Define the mixing length, L_diff - ! L_diff is on centre of horizontal faces - for convenience indexed by centre of cell above. - ! Vertical numbering (k index) matches that in old Var schemePF_bdy_lyr.f90 (see link above), - ! in which centre of lowest cell is rho level 1 (allowing for the fact that the PF model is for New Dynamics, - ! which has an extra rho level which means that W3 k=0 in LFRic is equivalent to rho levels k=1 in VAR). - ! L_diff_m(k) defined for 1 <= k <= BLevs_m. - do k = 1, BLevs_m - if (k <= Log_layer) then - ! num and denom to take log of - num = height_w3(map_w3(df) + k) - height_wth(map_wtheta(df)) + roughness_length_m - denom = height_w3(map_w3(df) + k - 1) - height_wth(map_wtheta(df)) + roughness_length_m - ! num and denom of final expression - denom = log(num / denom) + Von_Karman * (height_w3(map_w3(df) + k) - height_w3(map_w3(df) + k - 1)) / L_0_m - num = (height_w3(map_w3(df) + k) - height_w3(map_w3(df) + k - 1)) - else - num = height_wth(map_wtheta(df) + k) - height_wth(map_wtheta(df)) + roughness_length_m - denom = 1.0_r_def + (height_wth(map_wtheta(df) + k) - height_wth(map_wtheta(df)) + roughness_length_m) / L_0_m - end if - L_diff_m(k) = Von_Karman * num / denom - end do - - ! Define Q and E - ! E is on cell centres - ! Q is on centre of horizontal faces - for convenience indexed by centre of cell above - ! Q(k) defined for 0 <= k <= BLevs_m - ! E(k) defined for 1 <= k <= BLevs_m - u1 = u_land_m * ls_land_fraction(map_2d(df)) + u_sea_m * (1.0_r_def - ls_land_fraction(map_2d(df))) - do k = 0, BLevs_m - if (k == 0) then - ! num and denom to take log of - num = height_w3(map_w3(df) + 0) - height_wth(map_wtheta(df) + 0) + roughness_length_m - denom = roughness_length_m - ! num and denom of final expression - denom = log(num / denom) - num = Von_Karman * u1 - Q(map_w3(df) + k) = num / denom - else ! i.e., k >= 1 - num = height_wth(map_wtheta(df)) - height_wth(map_wtheta(df) + k) - denom = height_wth(map_wtheta(df) + e_folding_levs_m) - height_wth(map_wtheta(df)) - Q(map_w3(df) + k) = L_diff_m(k) * u1 * exp(num / denom) - E(map_w3(df) + k) = ls_rho(map_w3(df) + k - 1) * (height_wth(map_wtheta(df) + k) - height_wth(map_wtheta(df) + k - 1)) - end if - end do - -end subroutine tl_compute_qe_code - -end module tl_compute_qe_kernel_mod diff --git a/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 b/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 index 557125c8a..af0136c06 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 @@ -46,7 +46,7 @@ subroutine bdy_expl2 ( & ! in cloud/moisture data : cf_bulk,q,qcf,qcl,t,qw,tl, & ! in everything not covered so far : - rad_hr,micro_tends,fb_surf,u_s,pstar,tstar, & + rad_hr,micro_tends,fb_surf,u_s,pstar,tstar,h_blend_orog, & zh_prev,zhpar,z_lcl,ho2r2_orog,sd_orog,wtrac_as, & ! 2 in 3 INOUT for Smagorinsky delta_smag, max_diff, rneutml_sq, visc_m, visc_h, & @@ -77,11 +77,11 @@ subroutine bdy_expl2 ( & off, max_t_grad, a_grad_adj, sg_orog_mixing, l_use_surf_in_ri, & h_scale, t_drain, idyndiag, DynDiag_ZL, l_noice_in_turb, & DynDiag_ZL_corrn, DynDiag_ZL_CuOnly, DynDiag_Ribased, & - RiCrit_sharp, zhloc_depth_fac, non_local_bl, on, & + RiCrit_sharp, zhloc_depth_fac, non_local_bl, on, l_full_lambdas, & nl_bl_levels, local_fa, free_trop_layers, to_sharp_across_1km, & sbl_op, equilibrium_sbl, one_third, two_thirds, blending_option, & blend_except_cu, blend_cth_shcu_only, sg_shear, sg_shear_enh_lambda, & - max_tke, tke_diag_fac, & + max_tke, var_diags_opt, original_vars, split_tke_and_inv, tke_diag_fac, & i_interp_local, i_interp_local_gradients, i_interp_local_cf_dbdz, & shallow_cu_maxtop, sc_cftol, near_neut_z_on_l, zero, one, one_half use cloud_inputs_mod, only: i_rhcpt, forced_cu, i_cld_vn, i_pc2_init_method, & @@ -257,6 +257,9 @@ subroutine bdy_expl2 ( & ! in Surface pressure (Pascals). tstar(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & ! in Surface temperature (K). + h_blend_orog(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & + ! in Blending height used as part + ! of effective roughness scheme zh_prev(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & ! in boundary layer height from ! previous timestep @@ -805,9 +808,12 @@ subroutine bdy_expl2 ( & real(kind=r_bl), parameter :: max_abs_obkhov = 1.0e6_r_bl ! Maximum permitted magnitude of the Obukhov ! length (m). +real(kind=r_bl), parameter :: small_sh = 0.01_r_bl + ! Minimum value of sh used in + ! original_vars variance diagnostics real(kind=r_bl), parameter :: small_tke = 1.0e-6_r_bl ! Minimum required value of TKE before - ! variance diagnostics are calculated + ! split_tke_and_inv variance diagnostics are calculated real(kind=r_bl), parameter :: max_ri = 0.01_r_bl*sqrt(huge(one)) ! Maximum (absolute) Richardson number which ensures that ! the stability functions (~ri^2) remain real-valued at @@ -951,10 +957,11 @@ subroutine bdy_expl2 ( & ! heterogeneous land surface this is poorly defined and we can't use Rib ! from the surface scheme as vertically averaging Ri is numerically ! unstable. So, over land, only the average temperature gradient is used -if (.not. l_use_surf_in_ri) then +if ( .not. l_use_surf_in_ri .and. (var_diags_opt > original_vars .or. & + i_interp_local == i_interp_local_cf_dbdz ) ) then ! if not using surface variables in Ri (l_use_surf_in_ri=false) we - ! extrapolate dbdz itself from level 2, with the sl and qw gradients being - ! used in the variance calculations and with i_interp_local_cf_dbdz + ! extrapolate dbdz itself from level 2, but the sl and qw gradients are + ! used in the newer variance calculations and with i_interp_local_cf_dbdz ! so extrapolate them here !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end @@ -1995,10 +2002,11 @@ subroutine bdy_expl2 ( & !----------------------------------------------------------------------- call ex_coef ( & ! in levels/logicals - bl_levels,k_log_layr,BL_diag, & + bl_levels,k_log_layr,nSCMDpkgs,L_SCMDiags,BL_diag, & ! in fields - sigma_h,flandg,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m_eff_gb,zhpar,ntpar, & - ntml_nl,ntdsc,nbdsc,l_shallow_cth,rmlmax2,rneutml_sq,delta_smag, & + sigma_h,flandg,dbdz,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m_eff_gb, & + h_blend_orog,zhpar,ntpar,ntml_nl,ntdsc,nbdsc,u_p,v_p,u_s,fb_surf, & + qw,tl,l_shallow_cth,rmlmax2, rneutml_sq, delta_smag, & ! in/out fields cumulus,weight_1dbl, & ! out fields @@ -2059,6 +2067,27 @@ subroutine bdy_expl2 ( & ! Include mixing length, ELH, in RHOKH. ! Code moved from EX_COEF to avoid interpolation !------------------------------------------------------------ + if ( k >= ntml_local(i,j)+2 .and. l_full_lambdas .and. & + local_fa == to_sharp_across_1km ) then + ! Assuming only LOCAL_FA = "to_sharp_across_1km" option + ! will have L_FULL_LAMBDAS. + ! If other LOCAL_FA options are coded here then + ! changes must be included in section 2.1 of ex_coef + if (l_rp2) then + lambdah = max ( lambda_min , & + par_mezcla_rp(rp_idx)*zh_local(i,j) ) + else + lambdah = max ( lambda_min , 0.15_r_bl*zh_local(i,j) ) + end if + z_scale = 1000.0_r_bl + weight1 = one_half*( one - & + tanh(3.0_r_bl*((z_uv(i,j,k)/z_scale )-one) ) ) + lambdah = lambdah * weight1 & + + lambda_min*( one - weight1) + ! no need to do log profile correction as klog_layr eq 2 + vkz = vkman * ( z_uv(i,j,k) + z0m_eff_gb(i,j) ) + elh_rho(i,j,k) = vkz / (one + vkz/lambdah ) + end if ! Reinstate UKV drainage flow bug here, where lambdah was not ! enhanced as intended (and as was done in ex_coef)! if (sg_orog_mixing == sg_shear_enh_lambda) then @@ -2068,7 +2097,7 @@ subroutine bdy_expl2 ( & else lambdah = max ( lambda_min , 0.15_r_bl*zh_local(i,j) ) end if - if (k >= ntml_local(i,j)+2) then + if (k >= ntml_local(i,j)+2 .and. .not. l_full_lambdas) then lambdah = lambda_min end if if (k <= k_log_layr) then @@ -2197,37 +2226,65 @@ subroutine bdy_expl2 ( & ! function of ustar, wstar) but is currently just set to zero if (BL_diag%l_tke) then - ! Combine the, separately calculated, local and non-local TKE diagnostics + if (var_diags_opt == original_vars) then + ! BL_diag%tke currently contains (the reciprocal of) the non-local + ! (SML and DSC) mixed layer timescale, calculated in excf_nl + +!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & +!$OMP SHARED(BL_diag, rho_wet_tq, rhokm, dbdz, bl_levels, pdims) & +!$OMP private(i, j, k, recip_time_sbl, recip_time_cbl) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + + ! stable timescale + recip_time_sbl = sqrt( max(dbdz(i,j,k),1.0e-5_r_bl) )/0.7_r_bl + recip_time_cbl = BL_diag%tke(i,j,k) + + ! TKE diagnostic - taking 5 m2/s2 as a suitable maximum + BL_diag%tke(i,j,k)= min( max_tke, & + ( rhokm(i,j,k) / rho_wet_tq(i,j,k-1) )*( & + recip_time_cbl + recip_time_sbl ) ) + + end do + end do + end do +!$OMP end PARALLEL do + + else if (var_diags_opt == split_tke_and_inv) then + ! Combine the, separately calculated, local and non-local TKE diagnostics !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & !$OMP SHARED(BL_diag, tke_nl, tke_loc, rho_wet_tq, weight_1dbl, & !$OMP tke_diag_fac, bl_levels, pdims) & !$OMP private(i, j, k) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end - ! TKE diagnostic - ! Currently tke_nl is strictly rho*sigma_w^2 while tke_loc is TKE - ! Assume isotropic turb so TKE_nl = 3/2 sigma_w^2 - tke_nl(i,j,k) = weight_1dbl(i,j,k) * 1.5_r_bl * & - tke_nl(i,j,k)/rho_wet_tq(i,j,k-1) - BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,k) ) + ! TKE diagnostic + ! Currently tke_nl is strictly rho*sigma_w^2 while tke_loc is TKE + ! Assume isotropic turb so TKE_nl = 3/2 sigma_w^2 + tke_nl(i,j,k) = weight_1dbl(i,j,k) * 1.5_r_bl * & + tke_nl(i,j,k)/rho_wet_tq(i,j,k-1) + BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,k) ) - ! Multiply by tuning factor - BL_diag%tke(i,j,k) = tke_diag_fac * BL_diag%tke(i,j,k) + ! Multiply by tuning factor + BL_diag%tke(i,j,k) = tke_diag_fac * BL_diag%tke(i,j,k) - ! Keep TKE below a sensible max value of max_tke - BL_diag%tke(i,j,k) = min( max_tke, BL_diag%tke(i,j,k) ) - ! Applying this limit can occasionally cause the length-scale - ! Km / sqrt(w_var) to become unrealistically large, since no - ! equivalent limiting is done on Km. + ! Keep TKE below a sensible max value of max_tke + BL_diag%tke(i,j,k) = min( max_tke, BL_diag%tke(i,j,k) ) + ! Applying this limit can occasionally cause the length-scale + ! Km / sqrt(w_var) to become unrealistically large, since no + ! equivalent limiting is done on Km. + end do end do end do - end do !$OMP end PARALLEL do + end if ! var_diags_opt + if ( i_bm_ez_opt == i_bm_ez_entpar ) then ! Calculate mixing-length to pass to bimodal cloud scheme, ! using Km and TKE. @@ -2305,7 +2362,7 @@ subroutine bdy_expl2 ( & ! to the microphysics turbulence call !$OMP PARALLEL DEFAULT(none) private(k,j,i) & -!$OMP SHARED(tdims, bl_levels,pdims,BL_diag,bl_w_var) +!$OMP SHARED(tdims, bl_levels,pdims,BL_diag,bl_w_var,var_diags_opt) !$OMP do SCHEDULE(STATIC) do k = 2, tdims%k_end+1 @@ -2317,41 +2374,73 @@ subroutine bdy_expl2 ( & end do !$OMP end do - ! w_var = 2/3 TKE + if (var_diags_opt == original_vars) then + ! Original version: w_var = TKE !$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if (BL_diag%tke(i,j,k) > 1.0e-12_r_bl) then - bl_w_var(i,j,k) = two_thirds * BL_diag%tke(i,j,k) - end if + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (BL_diag%tke(i,j,k) > 1.0e-12_r_bl) then + bl_w_var(i,j,k) = BL_diag%tke(i,j,k) + end if + end do + end do + end do +!$OMP end do + else if (var_diags_opt == split_tke_and_inv) then + ! Improved version: w_var = 2/3 TKE +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (BL_diag%tke(i,j,k) > 1.0e-12_r_bl) then + bl_w_var(i,j,k) = two_thirds * BL_diag%tke(i,j,k) + end if + end do end do end do - end do !$OMP end do + end if ! test on var_diags_opt !$OMP end PARALLEL end if ! l_subgrid_qcl_mp .or. l_wvar_for_conv - ! At this point, tke_nl really contained 1.5*sigma_w^2. To make it look - ! a bit more like TKE near the surface, we will keep it constant below - ! the max of rhokm_surf (here we find the first local maximum in case there - ! is a larger rhokmz in a resolved inversion + if (var_diags_opt == original_vars) then + ! at this point, BL_diag%tke really contains 1.5*sigma_w^2. To make it look + ! a bit more like TKE near the surface, we will keep it constant below + ! the max of rhokm_surf +!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & +!$OMP SHARED( pdims, rhokmz, BL_diag ) private(i, j, k, kmax ) + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + kmax = maxloc(rhokmz(i,j,:), dim=1) + do k = 2, kmax + BL_diag%tke(i,j,k) = BL_diag%tke(i,j,kmax) + end do + end do + end do +!$OMP end PARALLEL do + else if (var_diags_opt == split_tke_and_inv) then + ! at this point, tke_nl really contained 1.5*sigma_w^2. To make it look + ! a bit more like TKE near the surface, we will keep it constant below + ! the max of rhokm_surf (here we find the first local maximum in case there + ! is a larger rhokmz in a resolved inversion !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & !$OMP SHARED( pdims, bl_levels, rhokmz, BL_diag, tke_loc, tke_nl ) & !$OMP private(i, j, k, kp) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - kp=2 - do while ( rhokmz(i,j,kp+1) > rhokmz(i,j,kp) .and. kp < bl_levels ) - kp = kp +1 - end do - do k = 2, kp-1 - BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,kp) ) + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + kp=2 + do while ( rhokmz(i,j,kp+1) > rhokmz(i,j,kp) .and. kp < bl_levels ) + kp = kp +1 + end do + do k = 2, kp-1 + BL_diag%tke(i,j,k) = max( tke_loc(i,j,k), tke_nl(i,j,kp) ) + end do end do end do - end do !$OMP end PARALLEL do + end if ! test on var_diags_opt end if ! BL_diag%L_tke @@ -2826,6 +2915,14 @@ subroutine bdy_expl2 ( & ! slvar,qwvar,slqw are on theta-level K ! tke is on theta-level K-1 ! exner is on theta-level K-1 + + ! For var_diags_opt = original_vars we use the following variables: + ! dsldzm is on theta-level K-1 + ! dqwdzm is on theta-level K-1 + ! elm is on theta-level K-1 + ! rhokh is on rho-level K + + ! For var_diags_opt = split_tke_and_inv ! dsldz is on rho-level K ! dqwdz is on rho-level K ! ftl is on rho-level k @@ -2846,47 +2943,85 @@ subroutine bdy_expl2 ( & call qsat_wat(qsw_arr,tl(:,j,k-1),p_theta_levels(:,j,k-1),tdims%i_len) end if - do i = tdims%i_start, tdims%i_end - ! calculate the variance - sl_var = zero - qw_var = zero - sl_qw = zero - if ( BL_diag%tke(i,j,k) > small_tke ) then - ! vertical interpolation weights - weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) - weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) - weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) - ! var_fac=b2*L/sqrt(TKE) - var_fac = b2 * rhokm(i,j,k) / ( weight1 * BL_diag%tke(i,j,k) * & - rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1) ) - ! Note that flux*gradient can be negative so the absolute values - ! are used - qw_var= abs( -var_fac*( weight2 * fqw(i,j,k) * dqwdz(i,j,k) + & - weight3 * fqw(i,j,k-1)* dqwdz(i,j,k-1) ) ) - sl_var= abs( -var_fac*( weight2 * ftl(i,j,k) * dsldz(i,j,k) + & - weight3 * ftl(i,j,k-1)* dsldz(i,j,k-1) ) ) - sl_qw = - one_half * var_fac*( & - weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & - weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& - ) + if (var_diags_opt == original_vars) then + + do i = tdims%i_start, tdims%i_end + ! calculate sh, don't interpolate with the surface flux or divide by 0 + if ( BL_diag%tke(i,j,k) > 1.0e-10_r_bl ) then + sh = rhokh(i,j,k) & + / ( rho_wet_tq(i,j,k-1) * elm(i,j,k) & + * sqrt( 2.0_r_bl * BL_diag%tke(i,j,k) ) ) + else + sh = small_sh + end if + if ( sh < small_sh ) sh = small_sh + ! calculate exner + exner = ( p_theta_levels(i,j,k-1) / pref )**kappa + ! calculate the variance, use gradient interpolated between levs 1 and 2 + sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * b2 * sh & + * elm(i,j,k)**2 * dsldz(i,j,k)**2 & + + a_qs(i,j,k-1)**2 * b2 * sh & + * elm(i,j,k)**2 * dqwdz(i,j,k)**2 & + - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * b2 & + * sh * elm(i,j,k)**2 * dsldz(i,j,k) * dqwdz(i,j,k) if (BL_diag%l_slvar) then - BL_diag%slvar(i,j,k-1) = sl_var + BL_diag%slvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldz(i,j,k)**2 end if if (BL_diag%l_qwvar) then - BL_diag%qwvar(i,j,k-1) = qw_var + BL_diag%qwvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dqwdz(i,j,k)**2 end if if (BL_diag%l_slqw) then - BL_diag%slqw(i,j,k-1) = sl_qw + BL_diag%slqw(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldz(i,j,k) & + * dqwdz(i,j,k) end if - end if - exner = ( p_theta_levels(i,j,k-1) / pref )**kappa - sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & - + a_qs(i,j,k-1)**2 * qw_var & - - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw - ! do this for safety, not sure if it's really needed - sgm(i) = sqrt ( max( sgm(i), zero ) ) + ! do this for safety, not sure if it's really needed + sgm(i) = sqrt ( max( sgm(i), zero ) ) + end do - end do !i + else ! var_diags_opt + + do i = tdims%i_start, tdims%i_end + ! calculate the variance + sl_var = zero + qw_var = zero + sl_qw = zero + if ( BL_diag%tke(i,j,k) > small_tke ) then + ! vertical interpolation weights + weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) + weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) + weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) + ! var_fac=b2*L/sqrt(TKE) + var_fac = b2 * rhokm(i,j,k) / ( weight1 * BL_diag%tke(i,j,k) * & + rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1) ) + ! Note that flux*gradient can be negative so the absolute values + ! are used + qw_var= abs( -var_fac*( weight2 * fqw(i,j,k) * dqwdz(i,j,k) + & + weight3 * fqw(i,j,k-1)* dqwdz(i,j,k-1) ) ) + sl_var= abs( -var_fac*( weight2 * ftl(i,j,k) * dsldz(i,j,k) + & + weight3 * ftl(i,j,k-1)* dsldz(i,j,k-1) ) ) + sl_qw = - one_half * var_fac*( & + weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & + weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& + ) + if (BL_diag%l_slvar) then + BL_diag%slvar(i,j,k-1) = sl_var + end if + if (BL_diag%l_qwvar) then + BL_diag%qwvar(i,j,k-1) = qw_var + end if + if (BL_diag%l_slqw) then + BL_diag%slqw(i,j,k-1) = sl_qw + end if + end if + exner = ( p_theta_levels(i,j,k-1) / pref )**kappa + sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & + + a_qs(i,j,k-1)**2 * qw_var & + - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw + ! do this for safety, not sure if it's really needed + sgm(i) = sqrt ( max( sgm(i), zero ) ) + + end do !i + end if ! var_diags_opt if (i_rhcpt == rhcpt_tke_based) then do i = tdims%i_start, tdims%i_end @@ -2922,61 +3057,110 @@ subroutine bdy_expl2 ( & call qsat_wat(qsw_arr,tl(:,j,k-1),p_theta_levels(:,j,k-1),tdims%i_len) end if - do i = tdims%i_start, tdims%i_end - ! calculate the variance - sl_var = zero - qw_var = zero - sl_qw = zero - if ( BL_diag%tke(i,j,k) > small_tke ) then - ! vertical interpolation weights - weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) - weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) - weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) - var_fac = b2 * rhokm(i,j,k) / ( weight1*BL_diag%tke(i,j,k) * & - rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1)) - kp=k - km=k-1 - ! Don't use level ntml (or ntdsc) if disc_inv=2 as this indicates - ! the inversion has just risen and the gradients between ntml and - ! ntml-1 are likely to give excessive variances - if ( (kp == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & - (kp == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) kp = km - if ( (km == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & - (km == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) km = kp - ! Note that flux*gradient can be negative so the absolute values - ! are used - qw_var= abs( -var_fac*( weight2 * fqw(i,j,kp) * dqwdz(i,j,kp) + & - weight3 * fqw(i,j,km) * dqwdz(i,j,km) ) ) - sl_var= abs( -var_fac*( weight2 * ftl(i,j,kp) * dsldz(i,j,kp) + & - weight3 * ftl(i,j,km) * dsldz(i,j,km) ) ) - sl_qw = - one_half * var_fac*( & - weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & - weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& - ) + if (var_diags_opt == original_vars) then + + do i = tdims%i_start, tdims%i_end + ! calculate sh, don't divide by 0 + if ( BL_diag%tke(i,j,k) > 1.0e-10_r_bl ) then + weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) + weight2 = r_theta_levels(i,j,k-1)-r_rho_levels(i,j,k-1) + weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) + sh = ( weight2 * rhokh(i,j,k) + weight3 * rhokh(i,j,k-1) ) & + / ( weight1 * rho_wet_tq(i,j,k-1) * elm(i,j,k) & + * sqrt( 2.0_r_bl * BL_diag%tke(i,j,k) ) ) + else + sh = small_sh + end if + if ( sh < small_sh ) sh = small_sh + ! calculate exner + exner = ( p_theta_levels(i,j,k-1) / pref )**kappa + ! calculate the variance + sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * b2 * sh & + * elm(i,j,k)**2 * dsldzm(i,j,k)**2 & + + a_qs(i,j,k-1)**2 * b2 * sh & + * elm(i,j,k)**2 * dqwdzm(i,j,k)**2 & + - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * b2 & + * sh * elm(i,j,k)**2 * dsldzm(i,j,k) * dqwdzm(i,j,k) if (BL_diag%l_slvar) then - BL_diag%slvar(i,j,k-1) = sl_var + BL_diag%slvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldz(i,j,k)**2 end if if (BL_diag%l_qwvar) then - BL_diag%qwvar(i,j,k-1) = qw_var + BL_diag%qwvar(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dqwdz(i,j,k)**2 end if if (BL_diag%l_slqw) then - BL_diag%slqw(i,j,k-1) = sl_qw + BL_diag%slqw(i,j,k-1) = b2 * sh * elm(i,j,k)**2 * dsldzm(i,j,k) & + * dqwdz(i,j,k) end if + end do !i + if (i_rhcpt == rhcpt_tke_based) then + do i = tdims%i_start, tdims%i_end + ! do this for safety, not sure if it's really needed + sgm(i) = sqrt ( max( sgm(i), zero ) ) + ! calculate rhcrit, with appropriate limits + rhcpt(i,j,k-1) = min( max_rhcpt(i,j), max( min_rhcpt(i,j), & + one - root6 * sgm(i) / (a_qs(i,j,k-1) * qsw_arr(i)))) + end do !i end if - exner = ( p_theta_levels(i,j,k-1) / pref )**kappa - sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & - + a_qs(i,j,k-1)**2 * qw_var & - - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw - end do !i - if (i_rhcpt == rhcpt_tke_based) then + + else ! var_diags_opt + do i = tdims%i_start, tdims%i_end - ! do this for safety, not sure if it's really needed - sgm(i) = sqrt ( max( sgm(i), zero ) ) - ! calculate rhcrit, with appropriate limits - rhcpt(i,j,k-1) = min( max_rhcpt(i,j), max( min_rhcpt(i,j), & - one - root6 * sgm(i) / (a_qs(i,j,k-1) * qsw_arr(i)))) + ! calculate the variance + sl_var = zero + qw_var = zero + sl_qw = zero + if ( BL_diag%tke(i,j,k) > small_tke ) then + ! vertical interpolation weights + weight1 = r_rho_levels(i,j,k) - r_rho_levels(i,j,k-1) + weight2 = r_theta_levels(i,j,k-1) - r_rho_levels(i,j,k-1) + weight3 = r_rho_levels(i,j,k) - r_theta_levels(i,j,k-1) + var_fac = b2 * rhokm(i,j,k) / ( weight1*BL_diag%tke(i,j,k) * & + rho_wet_tq(i,j,k-1) * rho_mix_tq(i,j,k-1)) + kp=k + km=k-1 + ! Don't use level ntml (or ntdsc) if disc_inv=2 as this indicates + ! the inversion has just risen and the gradients between ntml and + ! ntml-1 are likely to give excessive variances + if ( (kp == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & + (kp == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) kp = km + if ( (km == ntml(i,j) .and. sml_disc_inv(i,j) == 2) .or. & + (km == ntdsc(i,j) .and. dsc_disc_inv(i,j) == 2) ) km = kp + ! Note that flux*gradient can be negative so the absolute values + ! are used + qw_var= abs( -var_fac*( weight2 * fqw(i,j,kp) * dqwdz(i,j,kp) + & + weight3 * fqw(i,j,km) * dqwdz(i,j,km) ) ) + sl_var= abs( -var_fac*( weight2 * ftl(i,j,kp) * dsldz(i,j,kp) + & + weight3 * ftl(i,j,km) * dsldz(i,j,km) ) ) + sl_qw = - one_half * var_fac*( & + weight2*( ftl(i,j,k)*dqwdz(i,j,k) + fqw(i,j,k)*dsldz(i,j,k) ) + & + weight3*( ftl(i,j,k-1)*dqwdz(i,j,k-1) + fqw(i,j,k-1)*dsldz(i,j,k-1))& + ) + if (BL_diag%l_slvar) then + BL_diag%slvar(i,j,k-1) = sl_var + end if + if (BL_diag%l_qwvar) then + BL_diag%qwvar(i,j,k-1) = qw_var + end if + if (BL_diag%l_slqw) then + BL_diag%slqw(i,j,k-1) = sl_qw + end if + end if + exner = ( p_theta_levels(i,j,k-1) / pref )**kappa + sgm(i) = a_dqsdt(i,j,k-1)**2 * exner**2 * sl_var & + + a_qs(i,j,k-1)**2 * qw_var & + - 2.0_r_bl * a_qs(i,j,k-1) * a_dqsdt(i,j,k-1) * exner * sl_qw end do !i - end if + if (i_rhcpt == rhcpt_tke_based) then + do i = tdims%i_start, tdims%i_end + ! do this for safety, not sure if it's really needed + sgm(i) = sqrt ( max( sgm(i), zero ) ) + ! calculate rhcrit, with appropriate limits + rhcpt(i,j,k-1) = min( max_rhcpt(i,j), max( min_rhcpt(i,j), & + one - root6 * sgm(i) / (a_qs(i,j,k-1) * qsw_arr(i)))) + end do !i + end if + + end if ! var_diags_opt end do !j !$OMP end do NOWAIT diff --git a/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 b/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 index c18f9f550..0a7ca2b94 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_impl3.F90 @@ -51,7 +51,7 @@ subroutine bdy_impl3 ( & use yomhook, only: lhook, dr_hook use parkind1, only: jprb, jpim -!$ use omp_lib, only: omp_get_max_threads +!$ use omp_lib, only: omp_get_num_threads implicit none @@ -317,15 +317,12 @@ subroutine bdy_impl3 ( & ! Loop counter (horizontal field index). k, & ! Loop counter (vertical index). - tdims_omp_block, & + omp_block, & ! omp block length - tdims_seg_block, & - ! omp segment length - ii, & + jj, & ! omp block loop counter - l, & + l ! vector counter - max_threads integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -336,16 +333,9 @@ subroutine bdy_impl3 ( & if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) -blm1 = bl_levels-1 - -max_threads = 1 -!$ max_threads = omp_get_max_threads() -tdims_omp_block = ceiling(real(tdims%i_len)/max_threads) -tdims_seg_block = min(tdims_omp_block, tdims%i_len) - -!$OMP PARALLEL DEFAULT(none) SHARED(tdims_seg_block,l_correct,bl_levels, & -!$OMP blm1,tdims, dqw_nt,dtl_nt,q_latest,qcl_latest,dtrdz_v,dtrdz_u,udims, & -!$OMP rdz_v,gamma1,q,qcl,qcf,t_latest,t,ftl,rhokh,dtl,rdz_charney_grid,dqw, & +!$OMP PARALLEL DEFAULT(none) SHARED(l_correct,bl_levels,tdims, & +!$OMP dqw_nt,dtl_nt,q_latest,qcl_latest, dtrdz_v,dtrdz_u,udims, rdz_v, & +!$OMP gamma1,q,qcl,qcf,t_latest,t,ftl,rhokh,dtl,rdz_charney_grid,dqw, & !$OMP tau_x,rhokm_u,du,rdz_u,vdims,tau_y,dv, qcf_latest, & !$OMP qw,tl,r_theta_levels,r_theta_u,r_theta_v,r_rho_levels,fqw, & !$OMP dtrdz_charney_grid,gamma2,ct_ctq,dqw1,dtl1,ctctq1,model_type, & @@ -354,7 +344,7 @@ subroutine bdy_impl3 ( & !$OMP ct_prod, cu_prod, cv_prod,k_blend_tq,k_blend_u,k_blend_v, & !$OMP gamma_in,cq_cm_u,cq_cm_v,du_nt,dv_nt,rhokm_v,lcrcp,lsrcp) & !$OMP private(k,j,i,r_sq,rbt,temp,temp_u,temp_v,l,temp_out,temp_u_out, & -!$OMP temp_v_out,at,am,rbm,rr_sq,ii,gamma1_uv,gamma2_uv) +!$OMP temp_v_out,at,blm1,am,rbm,rr_sq,jj,omp_block,gamma1_uv,gamma2_uv) if ( l_correct ) then @@ -412,6 +402,8 @@ subroutine bdy_impl3 ( & end if ! l_correct +blm1 = bl_levels-1 + !----------------------------------------------------------------------- ! 1.0 Interpolate r_theta_levels to U,V columns !----------------------------------------------------------------------- @@ -451,12 +443,15 @@ subroutine bdy_impl3 ( & end do !$OMP end do +omp_block = tdims%j_end +!$ omp_block = ceiling(tdims%j_end/real(omp_get_num_threads())) + !$OMP do SCHEDULE(STATIC) -do ii = tdims%i_start, tdims%i_end, tdims_seg_block +do jj = tdims%j_start, tdims%j_end, omp_block do k = blm1, 2, -1 l = 0 - do j = tdims%j_start, tdims%j_end - do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) + do j = jj, min(jj+omp_block-1, tdims%j_end) + do i = tdims%i_start, tdims%i_end r_sq = r_rho_levels(i,j,k)*r_rho_levels(i,j,k) rr_sq = r_rho_levels(i,j,k+1)*r_rho_levels(i,j,k+1) dqw(i,j,k) = ( -dtrdz_charney_grid(i,j,k)* & @@ -481,8 +476,8 @@ subroutine bdy_impl3 ( & call oneover_v(l, temp, temp_out) l = 0 - do j = tdims%j_start, tdims%j_end - do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) + do j = jj, min(jj+omp_block-1, tdims%j_end) + do i = tdims%i_start, tdims%i_end l = l + 1 dqw(i,j,k) = temp_out(l) * dqw(i,j,k) dtl(i,j,k) = temp_out(l) * dtl(i,j,k) @@ -539,11 +534,11 @@ subroutine bdy_impl3 ( & !$OMP end do !$OMP do SCHEDULE(STATIC) - do ii = tdims%i_start, tdims%i_end, tdims_seg_block + do jj = tdims%j_start, tdims%j_end, omp_block do k = blm1, 2, -1 l = 0 - do j = tdims%j_start, tdims%j_end - do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) + do j = jj, min(jj+omp_block-1, tdims%j_end) + do i = tdims%i_start, tdims%i_end r_sq = r_rho_levels(i,j,k)*r_rho_levels(i,j,k) rr_sq = r_rho_levels(i,j,k+1)*r_rho_levels(i,j,k+1) dqw1(i,j,k) = -dtrdz_charney_grid(i,j,k) * & @@ -565,8 +560,8 @@ subroutine bdy_impl3 ( & call oneover_v(l, temp, temp_out) l = 0 - do j = tdims%j_start, tdims%j_end - do i = ii, min(ii+tdims_seg_block -1, tdims%i_end) + do j = jj, min(jj+omp_block-1, tdims%j_end) + do i = tdims%i_start, tdims%i_end l = l + 1 dqw1(i,j,k) = temp_out(l) * dqw1(i,j,k) dtl1(i,j,k) = temp_out(l) * dtl1(i,j,k) diff --git a/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 b/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 index d482b53d9..088653df1 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_impl4.F90 @@ -41,7 +41,7 @@ subroutine bdy_impl4 ( & use atm_fields_bounds_mod, only: & udims, vdims, udims_s, vdims_s, tdims, pdims, tdims_l use bl_diags_mod, only: strnewbldiag -use tuning_segments_mod, only: bl_segment_size + use model_domain_mod, only: model_type, mt_single_column use planet_constants_mod, only: cp => cp_bl use yomhook, only: lhook, dr_hook @@ -196,7 +196,7 @@ subroutine bdy_impl4 ( & ! LOCAL Loop counter (horizontal field index). k ! LOCAL Loop counter (vertical level index). -integer :: ii, tdims_omp_block, tdims_seg_block ! omp blocking variables +integer :: jj, j_block ! omp blocking variables integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -206,10 +206,9 @@ subroutine bdy_impl4 ( & if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) -tdims_omp_block = bl_segment_size -tdims_seg_block = min(tdims_omp_block, tdims%i_len) +j_block = 4 -!$OMP PARALLEL DEFAULT(SHARED) private(i,j,k,ii,at,rbt,gamma1_uv, & +!$OMP PARALLEL DEFAULT(SHARED) private(i,j,k,jj,at,rbt,gamma1_uv, & !$OMP gamma2_uv,r_sq) if ( .not. l_correct ) then ! 1st stage: predictor @@ -267,10 +266,10 @@ subroutine bdy_impl4 ( & !$OMP end do !$OMP do SCHEDULE(STATIC) -do ii = tdims%j_start, tdims%i_end, tdims_seg_block +do jj = tdims%j_start, tdims%j_end, j_block do k = 2, bl_levels - do j = tdims%j_start, tdims%j_end - do i = ii, min(ii+tdims_seg_block-1,tdims%i_end) + do j = jj, min(jj+j_block-1,tdims%j_end) + do i = tdims%i_start, tdims%i_end dtl(i,j,k) = dtl(i,j,k) - ct_ctq(i,j,k)*dtl(i,j,k-1) tl(i,j,k) = tl(i,j,k) + dtl(i,j,k) dqw(i,j,k) = dqw(i,j,k) - ct_ctq(i,j,k)*dqw(i,j,k-1) diff --git a/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 b/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 index faaa5a96a..d6fccca90 100644 --- a/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 +++ b/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 @@ -64,7 +64,7 @@ module bl_option_mod integer, parameter :: sharp_sea_long_land = 2 integer, parameter :: mes_tails = 3 integer, parameter :: louis_tails = 4 -integer, parameter :: depth_based = 5 ! not available in LFRic +integer, parameter :: depth_based = 5 integer, parameter :: sharp_sea_mes_land = 6 integer, parameter :: lem_stability = 7 integer, parameter :: sharp_sea_louis_land = 8 @@ -291,6 +291,11 @@ module bl_option_mod ! 13 Improved method to calculate cloud-top radiative flux jump logical :: l_new_kcloudtop = .false. +! 14 Switch for alternative TKE and variance diagnostics +integer :: var_diags_opt = imdi +integer, parameter :: original_vars = 0 +integer, parameter :: split_tke_and_inv = 1 + ! 15 Multiplicative tuning factor in TKE diagnosis, usually 1.0 real(kind=r_bl) :: tke_diag_fac = rmdi @@ -498,6 +503,12 @@ module bl_option_mod ! Switch for coupled gradient method in Equilibrium SBL model logical, parameter :: L_SBLco = .true. +! LambdaM=2*LambdaH (operational setting) +logical, parameter :: l_lambdam2 = .false. + +! Lambdas not reduced above NTML_LOCAL+1 +logical, parameter :: l_full_lambdas = .false. + ! logical for whether to skip calculations based on start of timestep ! quantities when using semi-lagrangian cycling with Endgame ! This is set to true in dynamics_input_mod as Endgame always uses it, @@ -520,7 +531,7 @@ module bl_option_mod l_use_surf_in_ri, lambda_min_nml, ritrans, c_gust, & dzrad_disc_opt, num_sweeps_bflux, l_converge_ga, & local_fa, Keep_Ri_FA, l_bl_mix_qcf, l_conv_tke, l_use_var_fixes, & - l_reset_neg_q, tke_diag_fac, i_interp_local, & + l_reset_neg_q, var_diags_opt, tke_diag_fac, i_interp_local, & sg_orog_mixing, fric_heating, calc_prob_of_vis, z_nl_bl_levels, & idyndiag, zhloc_depth_fac, flux_grad, entr_smooth_dec, & sc_diag_opt, kprof_cu, bl_res_inv, blending_option, & @@ -621,6 +632,8 @@ subroutine print_nlist_run_bl() call umprint(linebuffer,src='bl_option_mod') write(linebuffer,'(A,L1)') 'l_converge_ga = ',l_converge_ga call umprint(linebuffer,src='bl_option_mod') +write(linebuffer,'(A,I4)') 'var_diags_opt = ',var_diags_opt +call umprint(linebuffer,src='bl_option_mod') write(linebuffer,'(A,L1)') 'l_use_var_fixes = ',l_use_var_fixes call umprint(linebuffer,src='bl_option_mod') write(linebuffer,'(A,ES12.4)') 'tke_diag_fac = ',tke_diag_fac diff --git a/science/physics_schemes/source/boundary_layer/ex_coef.F90 b/science/physics_schemes/source/boundary_layer/ex_coef.F90 index 01164c314..fd9ffe3e1 100644 --- a/science/physics_schemes/source/boundary_layer/ex_coef.F90 +++ b/science/physics_schemes/source/boundary_layer/ex_coef.F90 @@ -24,10 +24,11 @@ module ex_coef_mod subroutine ex_coef ( & ! in levels/logicals - bl_levels, k_log_layr, BL_diag, & + bl_levels,k_log_layr,nSCMDpkgs,L_SCMDiags, BL_diag, & ! in fields - sigma_h,flandg,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m,zhpar,ntpar, & - ntml_nl,ntdsc,nbdsc,l_shallow_cth,rmlmax2,rneutml_sq, delta_smag, & + sigma_h,flandg,dbdz,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m,h_blend,zhpar, & + ntpar,ntml_nl,ntdsc,nbdsc,u_p,v_p,v_s,fb_surf,qw,tl,l_shallow_cth,rmlmax2, & + rneutml_sq, delta_smag, & ! in/out fields cumulus,weight_1dbl, & ! out fields @@ -38,17 +39,18 @@ subroutine ex_coef ( & use atm_fields_bounds_mod, only: pdims, tdims, pdims_s use bl_diags_mod, only: strnewbldiag use bl_option_mod, only: WeightLouisToLong, Variable_RiC, cbl_op, & - sg_orog_mixing, ricrit_sharp, pr_max, & + sg_orog_mixing, ricrit_sharp, pr_max, l_lambdam2, l_full_lambdas, & local_fa,Prandtl,ishear_bl,L_SBLco,Muw_SBL,Mwt_SBL,sbl_op, & - LockMailhot2004, lem_stability, lem_std, lem_conven, & + LockMailhot2004, depth_based, lem_stability, lem_std, lem_conven, & lem_adjust, cbl_mix_fac_nml, & off, on, sharpest, sharp_sea_long_land, sharp_sea_mes_land, & louis_tails, sharp_sea_louis_land, long_tails, mes_tails, ritrans, & - neut_cbl, lambda_min_nml, lambda_max_nml, & + neut_cbl, equilibrium_sbl, lambda_min_nml, lambda_max_nml, & lambda_fac, beta_bl, beta_fa, rlinfac, linear0, & to_sharp_across_1km, ntml_level_corrn, free_trop_layers, two_thirds, & blending_option, blend_except_cu, blend_gridindep_fa, blend_cth_shcu_only, & - extended_tail, zero, one, one_half + extended_tail, sg_shear_enh_lambda, l_use_var_fixes, var_diags_opt, & + split_tke_and_inv, zero, one, one_half use conversions_mod, only: pi => pi_bl use gen_phys_inputs_mod, only: l_mr_physics @@ -61,6 +63,8 @@ subroutine ex_coef ( & use turb_diff_mod, only: l_subfilter_vert, l_subfilter_horiz use model_domain_mod, only: model_type, mt_single_column +use s_scmop_mod, only: default_streams, & + t_avg, d_sl, scmdiag_bl use yomhook, only: lhook, dr_hook use parkind1, only: jprb, jpim @@ -94,6 +98,20 @@ subroutine ex_coef ( & bl_levels), & ! in density on theta levels; ! used in RHOKM so wet density + dbdz(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end, & + 2:bl_levels), & + ! in Buoyancy gradient across lower + ! interface of layer. + u_p(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & + ! in Westerly wind component horizontally + ! interpolated to P-grid. (m/s) + v_p(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & + ! in Southerly wind component horizontally + ! interpolated to P-grid. (m/s) + qw(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & + ! in Total water content (kg per kg air). + tl(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & + ! in Liquid/frozen water temperature (K). rmlmax2(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & ! in Square of asymptotic mixing length for Smagorinsky scheme z_uv(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels+1), & @@ -105,11 +123,18 @@ subroutine ex_coef ( & ! in Height of top of initial parcel ascent z0m(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! in Roughness length for momentum (m). + h_blend(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! in Blending height for effective + ! roughness length scheme dvdzm(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end, & 2:bl_levels), & ! in Modulus of wind shear. ri(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,2:bl_levels), & ! in Local Richardson number. + v_s(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! in Surface friction velocity (m/s) + fb_surf(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! in Surface buoyancy flux over density (m^2/s^3). flandg(pdims_s%i_start:pdims_s%i_end,pdims_s%j_start:pdims_s%j_end), & ! in Land fraction on all tiles. rneutml_sq(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & @@ -121,6 +146,13 @@ subroutine ex_coef ( & l_shallow_cth(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) ! in Flag to indicate shallow convection based on cl-top +! Additional variables for SCM diagnostics which are dummy in full UM +integer, intent(in) :: & + nSCMDpkgs ! in No of SCM diagnostics packages + +logical, intent(in) :: & + L_SCMDiags(nSCMDpkgs) ! Logicals for SCM diagnostics packages + ! Declaration of new BL diagnostics. type (strnewbldiag), intent(in out) :: BL_diag @@ -184,7 +216,7 @@ subroutine ex_coef ( & character(len=*), parameter :: RoutineName = 'EX_COEF' -real(kind=r_bl) :: eh,em,g0,dh,dm,r_c_tke +real(kind=r_bl) :: eh,em,g0,dh,dm,a_lambda,r_c_tke real(kind=r_bl) :: subbmin,subbmax,subcmin,subcmax real(kind=r_bl) :: a_ri,b_ri @@ -193,6 +225,8 @@ subroutine ex_coef ( & ! Used in calc of stability function FH. em=4.0_r_bl, & ! Used in calc of stability function FM. + a_lambda=2.0_r_bl, & + ! used in calc of LAMBDA_EFF r_c_tke=one/0.41_r_bl & ! used in calc of TKE (1/stress-energy ratio, see UMDP25) ) @@ -212,6 +246,20 @@ subroutine ex_coef ( & ! Used in calc of unstability function FM. ) +! Equilibrium SBL model constants +real(kind=r_bl) :: RtestMin +integer :: gn,NGz,kMINh +parameter ( & + RtestMin=zero, & + ! Threshold for Rtest + gn=19, & + ! Size of "G"-tables (No. HonL values) + NGz=90, & + ! No. z/h steps in each "G" integration + kMINh=2 & + ! Level of minimum SBL height (>=2) +) + ! Define local storage. real(kind=r_bl) :: & ricrit(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & @@ -220,6 +268,21 @@ subroutine ex_coef ( & ! 2D variable for SBL stabiliy function options sharp(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! 2D variable for SHARP stabiliy function + invMOsurf(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! Inverse of sfce M-O length + ! Note: Inverse is used so that neutral conditions + ! can be handled (M-O length --> infinity) + zh_esbl(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! Ht of equilib SBL (sub-grid + HLtab(gn), & + ! Lookup tables (Gx calcs + GHsav(gn,NGz),gmsav(gn,NGz), & + ! in equilib SBL scheme) + THv_TQ(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end, & + bl_levels), & + ! Virtual potential temperature on theta levels + THv(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end,bl_levels), & + ! THv_TQ interpolated to U,V levels prandtl_number(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! = KM/KH (currently only calculated for stable) BL_weight(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end, & @@ -233,6 +296,10 @@ subroutine ex_coef ( & weight_bltop(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) ! weight_1dbl at the top of the PBL +integer :: & + ntml_esbl(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) + ! No. UV-levels inside equilibrium SBL + logical :: & topbl(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) ! Flag for having reached the @@ -252,12 +319,25 @@ subroutine ex_coef ( & ! z/sigma_h rpr ! !/Pr +! Variables for boundary layer depth based formulation +real(kind=r_bl) :: & + h_tkeb(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! TKE budget based BL depth + MOsurf(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! surface Obukhov length + diff_min(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) real(kind=r_bl) :: & + h_est, & + rifb, & + ! Bulk flux Richardson number pr_n, & ! neutral Prandtl number - r_pr_n + r_pr_n, & ! 1 / neutral Prandtl number + m_tau,m_buoy, & + ! Indices for implied stress and buoyancy flux profs + ind,diff real(kind=r_bl) :: & subb, subc, subg, ric, ricinv, rifac @@ -293,7 +373,12 @@ subroutine ex_coef ( & ! top of boundary layer mixing zfa, & ! height to use beta_fa in blendin - zz + lambda_eff ! Effective mixing length used with effective + ! roughness length scheme. + +!Equilibrium SBL model temporary real scalar variables +real(kind=r_bl) :: & + km, u1, zz integer :: & i,j, & @@ -303,15 +388,38 @@ subroutine ex_coef ( & kb, kt ! Base and top level of unstable Ri layers +!Equilibrium SBL model temporary integer scalar variables +integer :: & + kZtop,kZbot,gk,kG0, & + ! Temporary loop counters + iERRSBL ! SBLequil error status + +!Equilibrium SBL model logical variables logical :: & - subcrit ! flag for being in a subcritical ri layer + GcalcDone, & + ! Calculation of Gx values has been performed + subcrit, & + ! flag for being in a subcritical ri layer + subgrid ! Will perform subgrid SBL depth calculation + +!Switch to enable subgrid SBL depth diagnosis +logical :: sg_enabled +parameter (sg_enabled=.true.) + +!Equilibrium SBL model SAVED variables +save HLtab,GHsav,gmsav,GcalcDone + +!Equilibrium SBL model data statements +data HLtab /0.0001_r_bl,0.001_r_bl,0.002_r_bl,0.005_r_bl,0.01_r_bl,0.02_r_bl, & + 0.05_r_bl,0.1_r_bl,0.2_r_bl,one_half,one,2.0_r_bl,5.0_r_bl, & + 10.0_r_bl,20.0_r_bl,50.0_r_bl,100.0_r_bl,200.0_r_bl,500.0_r_bl/ +data GcalcDone /.false./ integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 real(kind=jprb) :: zhook_handle if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) - !----------------------------------------------------------------------- ! if stochastic physics random parameters is used set the parameter ! used to vary the stability function to a perturbed value, if not @@ -335,6 +443,7 @@ subroutine ex_coef ( & !--------------------------------------------------------------- pr_n = one if (Prandtl == LockMailhot2004) pr_n = 0.7_r_bl +if (sbl_op == depth_based) pr_n = 0.7_r_bl ! Use pr_n=0.7 if any LEM stability function selected if (sbl_op == lem_stability .or. cbl_op == lem_std & .or. cbl_op == lem_conven & @@ -387,7 +496,7 @@ subroutine ex_coef ( & ricinv = one/ric rlambda_fac=one/lambda_fac -!$OMP PARALLEL DEFAULT(SHARED) private ( i, j ) +!$OMP PARALLEL DEFAULT(SHARED) private ( i, j, k, z_scale, zpr ) !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end @@ -395,6 +504,7 @@ subroutine ex_coef ( & ! 0. Initialise flag for having reached top of turbulently mixed layer !----------------------------------------------------------------------- topbl(i,j) = .false. + prandtl_number(i,j) = pr_n ! initialise blending weight at top of BL to one weight_bltop(i,j) = one @@ -402,6 +512,97 @@ subroutine ex_coef ( & end do !$OMP end do NOWAIT !----------------------------------------------------------------------- +! Set-up a BL weighting function, =1 near the ground (ie in the BL) +! =0 in the free troposphere +! Rate and height at which transition occurs varys depending on choices: +!----------------------------------------------------------------------- +!$OMP do SCHEDULE(STATIC) +do k = 1, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + BL_weight(i,j,k) = one + end do + end do +end do +!$OMP end do + +if (local_fa == to_sharp_across_1km) then + !--------------------------------------------------------- + ! Additional code to allow the local Ri scheme to use + ! SHARPEST in the free atmosphere, ie above the BL top, + ! regardless of the tail option selected above. + ! Set Z_SCALE to 1km to mimic old value of BL_LEVELS, + ! gives BL_weight~0 by 2km, ~0.95 at 500m + !--------------------------------------------------------- + z_scale = 1000.0_r_bl +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + zpr = z_tq(i,j,k-1)/z_scale + BL_weight(i,j,k) = one_half*(one - tanh(3.0_r_bl*(zpr-one) ) ) + end do + end do + end do +!$OMP end do NOWAIT +end if + +if (sg_orog_mixing /= off) then + !----------------------------------------------------------------- + ! Subgrid orographic height dependence for SBL tail (option 1) + ! or orographic dependence of mixing lengths, lambdam,h (opt 2) + ! Gives BL_weight~[1,0.95,0.5,0] at ZPR=[0,0.6,1,1.7] + !---------------------------------------------------------------- +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (sigma_h(i,j) > one ) then + zpr = z_tq(i,j,k-1)/sigma_h(i,j) + BL_weight(i,j,k) = one_half*( one - & + tanh(4.0_r_bl*(zpr-one) ) ) + end if + end do + end do + end do +!$OMP end do NOWAIT +end if + +if (l_use_var_fixes) then +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + turb_length(i,j,k) = lambda_min*rlambda_fac + end do + end do + end do +!$OMP end do NOWAIT + if (blending_option == blend_cth_shcu_only) then + ! use Smag mixing length as background length scale if smaller + ! than lambda_min (ie ignore lambda_min for high res simulations) +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + turb_length(i,j,k) = min( turb_length(i,j,k), sqrt(rmlmax2(i,j,k)) ) + end do + end do + end do +!$OMP end do NOWAIT + end if +else +!$OMP do SCHEDULE(STATIC) + do k = 2, bl_levels + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + turb_length(i,j,k)=lambda_min + end do + end do + end do +!$OMP end do NOWAIT +end if +!----------------------------------------------------------------------- ! Set critical Richardson number !----------------------------------------------------------------------- if (l_rp2) then @@ -498,18 +699,20 @@ subroutine ex_coef ( & end if !----------------------------------------------------------------------- -! 1.1 Use Richardson number profile to calculate BL depth, zh +! 1.1 Loop over levels calculating Richardson numbers. !----------------------------------------------------------------------- + !$OMP PARALLEL DEFAULT(none) private(k,j,i) & !$OMP SHARED(bl_levels,pdims,topbl,ri,ricrit,local_fa,ntml_local,zh_local,z_uv) do k = 2, bl_levels !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end + !------------------------------------------------------------------ - ! If either a stable layer (Ri>RiCrit) or the maximum BL - ! height has been reached, set boundary layer height (ZH_LOCAL) to - ! the height of the lower boundary of the current layer + ! 1.2 If either a stable layer (Ri>RiCrit) or the maximum BL + ! height has been reached, set boundary layer height (ZH_LOCAL) to + ! the height of the lower boundary of the current layer !------------------------------------------------------------------ if ( .not. topbl(i,j) .and. & (ri(i,j,k) > ricrit(i,j) .or. k == bl_levels) ) then @@ -538,17 +741,18 @@ subroutine ex_coef ( & end if !----------------------------------------------------------------------- -! 1.2 In CUMULUS layers the local scheme is capped at the LCL (given in -! this case by NTML_NL). -! If NTML_LOCAL is greater than the top of the parcel ascent (NTPAR) -! for a cumulus-capped layer, shear driven mixing is allowed to -! dominate (if ISHEAR_BL=1 selected) +! In CUMULUS layers the local scheme is capped at the LCL (given in +! this case by NTML_NL). Save local BL depth as SCM diagnostic. +!----------------------------------------------------------------------- +!----------------------------------------------------------------------- +! If NTML_LOCAL is greater than the top of the parcel ascent (NTPAR) +! for a cumulus-capped layer, shear driven mixing is allowed to +! dominate (if ISHEAR_BL=1 selected) !----------------------------------------------------------------------- !$OMP PARALLEL DEFAULT(none) & -!$OMP SHARED( pdims, ishear_bl, ntml_local, ntpar, cumulus, & -!$OMP bl_levels, lambda_min, rlambda_fac, & -!$OMP turb_length, blending_option, rmlmax2) & -!$OMP private( i, j, k ) +!$OMP SHARED( pdims, ishear_bl, l_use_var_fixes, ntml_local, ntpar, cumulus, & +!$OMP ntml_nl, zh_local, z_uv ) & +!$OMP private( i, j ) !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end @@ -558,37 +762,30 @@ subroutine ex_coef ( & end do end do !$OMP end do -!----------------------------------------------------------------------- -! 1.3 Search for sub-critical layers above the PBL and set the -! mixing length to scale with these layer depths -!----------------------------------------------------------------------- + +if ( .not. l_use_var_fixes ) then + ! Use sub-cloud layer as local PBL depth (as for non-local). + ! Found to give large TKE and variances with new diagnostics + ! and isn't particularly justifiable !$OMP do SCHEDULE(STATIC) -do k = 2, bl_levels do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - turb_length(i,j,k) = lambda_min*rlambda_fac - end do - end do -end do -!$OMP end do NOWAIT -if (blending_option == blend_cth_shcu_only) then - ! use Smag mixing length as background length scale if smaller - ! than lambda_min (ie ignore lambda_min for high res simulations) -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - turb_length(i,j,k) = min( turb_length(i,j,k), sqrt(rmlmax2(i,j,k)) ) - end do + if ( cumulus(i,j) ) then + ntml_local(i,j) = ntml_nl(i,j) + zh_local(i,j) = z_uv(i,j,ntml_local(i,j)+1) + end if end do end do -!$OMP end do NOWAIT +!$OMP end do end if !$OMP end PARALLEL - +!----------------------------------------------------------------------- +! 1.3 Search for sub-critical layers above the PBL and set the +! mixing length to scale with these layer depths +!----------------------------------------------------------------------- if (local_fa == free_trop_layers) then !$OMP PARALLEL do DEFAULT(none) SCHEDULE(STATIC) & -!$OMP SHARED( pdims, bl_levels, ntml_local, ri, ricrit, z_uv, & +!$OMP SHARED( pdims, bl_levels, ntml_local, ri, ricrit, z_uv, l_use_var_fixes, & !$OMP turb_length, rlambda_fac, lambda_min ) & !$OMP private( i, j, k, subcrit, kb, kt, kl, turb_length_layer ) do j = pdims%j_start, pdims%j_end @@ -609,10 +806,17 @@ subroutine ex_coef ( & ! turb_length(k) is held, with Ri(k), on th-level(k-1) !--------------------------------------------------------- turb_length_layer = z_uv(i,j,kt) - z_uv(i,j,kb-1) - do kl = kb, kt - turb_length(i,j,kl) = max( turb_length(i,j,kl), & - min(turb_length_layer,lambda_max_nml*rlambda_fac) ) - end do + if (l_use_var_fixes) then + do kl = kb, kt + turb_length(i,j,kl) = max( turb_length(i,j,kl), & + min(turb_length_layer,lambda_max_nml*rlambda_fac) ) + end do + else + do kl = kb, kt + turb_length(i,j,kl) = max( lambda_min*rlambda_fac, & + min(turb_length_layer,lambda_max_nml*rlambda_fac) ) + end do + end if end if end do @@ -647,255 +851,94 @@ subroutine ex_coef ( & !$OMP end PARALLEL do end if !----------------------------------------------------------------------- -! 2.0 Loop over levels; calculate the mixing lengths +! 2. Richardson Number based local mixing scheme !----------------------------------------------------------------------- -do k = 2, bl_levels -!$OMP PARALLEL DEFAULT(none) & -!$OMP PRIVATE(z_scale,j,i,lambdam,lambdah, & -!$OMP lambdah_rho,vkz,f_log,zz,zht,zfa,beta) & -!$OMP SHARED(k,pdims,ri,ricrit,flandg,ntml_local,ntml_nl,z_tq, & -!$OMP l_rp2,lambda_min,par_mezcla_rp,zh_local,turb_length,k_log_layr, & -!$OMP z_uv,z0m,elm,elh,elh_rho,blending_option,cumulus,l_shallow_cth,zhpar, & -!$OMP ntdsc,weight_1dbl,weight_bltop,delta_smag,rneutml_sq,BL_diag,local_fa) - !----------------------------------------------------------------- - ! 2.1 Calculate asymptotic mixing lengths LAMBDAM and LAMBDAH - !----------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if (l_rp2) then - lambdam = max ( lambda_min , par_mezcla_rp(rp_idx)*zh_local(i,j) ) - else - lambdam = max ( lambda_min , lambda_fac*zh_local(i,j) ) - end if - !----------------------------------------------------------------- - ! Reduce mixing lengths above BL - !----------------------------------------------------------------- - if (k >= ntml_local(i,j)+2) then - lambdam = lambda_min - end if +! 2.0 Loop round "boundary" levels; calculate the stability- +! dependent turbulent mixing coefficients. +!----------------------------------------------------------------------- +! TKE budget based depth diagnosis - lambdah = lambdam - lambdah_rho = lambdah +! Starting with the definition of the flux Richardson +! number, assuming similarity profiles for +! stress and buoyancy flux, and vertically integrating +! gives an expression for the stable boundary layer +! depth which is based just on surface fluxes and +! the wind speed change across the boundary layer. +! ---------------------------------------------------- - if ( local_fa == free_trop_layers ) then - lambdam = max( lambdam, lambda_fac*turb_length(i,j,k) ) - lambdah = max( lambdah, lambda_fac*turb_length(i,j,k) ) - ! lambdah_rho does not need to be recalculated under - ! local_fa option "free_trop_layers" as the full KH profile - ! will be interpolated in bdy_expl2 - end if - !----------------------------------------------------------------------- - ! 2.2 Calculate mixing lengths ELH, ELM coincident with RI(K) and so - ! at Z_TQ(K-1) - !----------------------------------------------------------------------- - ! Incorporate log profile corrections to the vertical finite - ! differences into the definitions of ELM and ELH. - ! Note that ELH_RHO is calculated (on rho levels) for direct inclusion - ! in RHOKH and also (as elh) on theta levels for the unstable - ! stability functions and inclusion in RHOKH before interpolation - ! (under local_fa option "free_trop_layers"). - ! To save computing logarithms for all K, the values of ELM and ELH - ! are unchanged for K > K_LOG_LAYR. +if (sbl_op == depth_based) then - if (k <= k_log_layr) then - vkz = vkman * ( z_uv(i,j,k) - z_uv(i,j,k-1) ) - f_log = log( ( z_uv(i,j,k) + z0m(i,j) ) / & - ( z_uv(i,j,k-1) + z0m(i,j) ) ) - elm(i,j,k) = vkz / ( f_log + vkz/lambdam ) - elh(i,j,k) = vkz / ( f_log + vkz/lambdah ) - vkz = vkman * ( z_tq(i,j,k) - z_tq(i,j,k-1) ) - f_log = log( ( z_tq(i,j,k) + z0m(i,j) ) / & - ( z_tq(i,j,k-1) + z0m(i,j) ) ) - elh_rho(i,j,k) = vkz / ( f_log + vkz/lambdah_rho ) - else - vkz = vkman * ( z_tq(i,j,k-1) + z0m(i,j) ) - elm(i,j,k) = vkz / (one + vkz/lambdam ) - elh(i,j,k) = vkz / (one + vkz/lambdah ) - vkz = vkman * ( z_uv(i,j,k) + z0m(i,j) ) - elh_rho(i,j,k) = vkz / (one + vkz/lambdah_rho ) - end if - end do - end do -!$OMP end do -!---------------------------------------------------------------- -! 2.3 Blend mixing lengths between 1D and 3D Smagorinsky -!---------------------------------------------------------------- - if (blending_option /= off) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end + ! Index for assumed buoyancy profile + m_buoy=one - zz = z_tq(i,j,k-1) ! height of rhokm(k) - ! turb_length is the greater of the local and non-local - ! BL depths up to that bl top - z_scale = max( zz, turb_length(i,j,k) ) - ! zht = interface between BL and FA - zht = max( z_uv(i,j,ntml_nl(i,j)+1) , zh_local(i,j) ) - ! Relevant scale in cumulus layers can be cloud top height, zhpar - if ( cumulus(i,j) .and. ( blending_option /= blend_cth_shcu_only .or. & - l_shallow_cth(i,j) ) ) then - z_scale = max( z_scale, zhpar(i,j) ) - zht = max( zht, zhpar(i,j) ) - end if - ! BL top includes decoupled stratocu layer, if it exists - if (ntdsc(i,j) > 0) zht = max( zht, z_uv(i,j,ntdsc(i,j)+1) ) - ! Need to restrict z_scale to dsc depth within a dsc layer - ! (given by turb_length) and to distance from dsc top below the - ! dsc layer - if ( k-1 <= ntdsc(i,j) ) then - z_scale = min( z_scale, & - max( turb_length(i,j,k), z_uv(i,j,ntdsc(i,j)+1)-zz ) ) - end if + ! Index for assumed stress profile + m_tau=one - ! Finally calculate 1D BL weighting factor - if ( blending_option == blend_except_cu .and. & - cumulus(i,j) .and. ntdsc(i,j) == 0) then - ! pure cumulus layer so revert to 1D BL scheme - weight_1dbl(i,j,k) = one - else + ! Effective bulk flux Richardson number + rifb=0.3_r_bl - if ( blending_option == blend_gridindep_fa .or. & - blending_option == blend_cth_shcu_only ) then - if (zz <= zht) then - weight_1dbl(i,j,k) = & - one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & - max( zero, & - min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) - weight_bltop(i,j) = weight_1dbl(i,j,k) - else ! above PBL - ! Above the PBL top (at zht) increase weight to one smoothly - ! between zht and zfa in order to default to 1D BL when not - ! turbulent. There is some arbitrariness here but: - ! a) we want to use a physical height, to avoid grid dependence - ! b) for shallow PBLs at high resolution it seems sensible to - ! get well (a PBL depth) above the resolved PBL before - ! reverting to 1D - ! c) for deep PBLs we still want to revert to 1D reasonably - ! quickly, hence within at most 1km of zht - zfa=min( 2.0_r_bl*zht, zht+1000.0_r_bl ) - if (zz <= zfa ) then - weight_1dbl(i,j,k) = one + one_half * & - (weight_bltop(i,j) - one) * & - ( one + cos(pi*(zz-zht)/(zfa-zht)) ) - else - weight_1dbl(i,j,k) = one - end if - if ( local_fa == free_trop_layers .and. & - ri(i,j,k) < ricrit(i,j) ) then - ! Except in an elevated turbulent layer where we still use - ! the standard blending weight - z_scale = turb_length(i,j,k) - weight_1dbl(i,j,k) = & - one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & - max( zero, & - min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + ind=m_buoy-m_tau+one - end if - end if ! test on zz < zht - else - zfa=zht+1000.0_r_bl - if (zz <= zht) then - beta=beta_bl - else if (zz <= zfa) then - beta = beta_bl*(zfa-zz)/(zfa-zht) + & - beta_fa*(zz-zht)/(zfa-zht) - else - beta=beta_fa - end if - weight_1dbl(i,j,k) = & - one - tanh( beta*z_scale/delta_smag(i,j)) * max( zero, & - min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) - end if - end if - - elm(i,j,k) = elm(i,j,k)*weight_1dbl(i,j,k) + & - sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) - elh(i,j,k) = elh(i,j,k)*weight_1dbl(i,j,k) + & - sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) - end do - end do -!$OMP end do - end if ! test on blending_option -!$OMP end PARALLEL -end do ! loop over levels -!---------------------------------------------------------------- -! 3.0 Calculate stability functions -!---------------------------------------------------------------- -! 3.1 Set-up a BL weighting function, =1 near the ground (ie in the BL) -! =0 in the free troposphere -! Rate and height at which transition occurs varys depending on choices -!----------------------------------------------------------------------- -!$OMP PARALLEL DEFAULT(none) private( i, j, k, z_scale, zpr) & -!$OMP SHARED( pdims, bl_levels, BL_weight, local_fa, z_tq, sg_orog_mixing, & -!$OMP sigma_h) -!$OMP do SCHEDULE(STATIC) -do k = 1, bl_levels do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - BL_weight(i,j,k) = one - end do - end do -end do -!$OMP end do -if (local_fa == to_sharp_across_1km) then - !--------------------------------------------------------- - ! Additional code to allow the local Ri scheme to use - ! SHARPEST in the free atmosphere, ie above the BL top, - ! regardless of the tail option selected above. - ! Set Z_SCALE to 1km to mimic old value of BL_LEVELS, - ! gives BL_weight~0 by 2km, ~0.95 at 500m - !--------------------------------------------------------- - z_scale = 1000.0_r_bl -!$OMP do SCHEDULE(STATIC) - do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - zpr = z_tq(i,j,k-1)/z_scale - BL_weight(i,j,k) = one_half*(one - tanh(3.0_r_bl*(zpr-one) ) ) - end do + ! Set diff_min to a large initial value + diff_min(i,j)=1000.0_r_bl + + ! Surface Obukhov length + MOsurf(i,j)= -v_s(i,j)*v_s(i,j)*v_s(i,j) & + /(vkman*fb_surf(i,j)) end do end do -!$OMP end do NOWAIT -end if -if (sg_orog_mixing /= off) then - !----------------------------------------------------------------- - ! Subgrid orographic height dependence for SBL tail (option 1) - ! or orographic dependence of mixing lengths, lambdam,h (opt 2) - ! Gives BL_weight~[1,0.95,0.5,0] at ZPR=[0,0.6,1,1.7] - !---------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) do k = 2, bl_levels do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end - if (sigma_h(i,j) > one ) then - zpr = z_tq(i,j,k-1)/sigma_h(i,j) - BL_weight(i,j,k) = one_half*( one - tanh(4.0_r_bl*(zpr-one) ) ) + + ! The wind speed change from level k to the surface + u1=sqrt(u_p(i,j,k)*u_p(i,j,k)+v_p(i,j,k)*v_p(i,j,k)) + + ! h_est is the estimate of the stable boundary layer + ! depth using the TKE based formula + h_est=vkman*MOsurf(i,j)*ind*rifb*u1/v_s(i,j) + + ! Absolute difference between height and estimate + diff=abs(z_uv(i,j,k)-h_est) + + ! If h_est is closer than the previous closest value + ! (diff_min) reset the h_tkeb to h_est + + if (diff < diff_min(i,j)) then + diff_min(i,j)=diff + h_tkeb(i,j)=h_est end if + end do end do end do -!$OMP end do NOWAIT -end if -!$OMP end PARALLEL -! ---------------------------------------------------------------- -! 3.2 calculating stable stability function + +end if ! SBL_OP = Depth_based + ! ---------------------------------------------------------------- -! Load up 2D array FUNC with selected stability function for Ri>=0 -! -! SBL_OP Option -! -! Long_tails Long tails -! Sharpest SHARPEST function -! Sharp_sea_long_land SHARPEST over sea ; Long tails over land -! Mes_tails MESOSCALE model: Louis/SHARPEST blend -! Louis_tails Louis function -! Sharp_sea_mes_land SHARP over sea; Mes over land -! Sharp_sea_Louis_land SHARP over sea; Louis over land +! Main loop over levels ! ---------------------------------------------------------------- + do k = 2, bl_levels + ! ---------------------------------------------------------------- + ! Load up 2D array FUNC with selected stability function for Ri>=0 + + ! SBL_OP Option + + ! Long_tails Long tails + ! Sharpest SHARPEST function + ! Sharp_sea_long_land SHARPEST over sea ; Long tails over land + ! Mes_tails MESOSCALE model: Louis/SHARPEST blend + ! Louis_tails Louis function + ! Depth_based Boundary layer depth based formulation + ! Sharp_sea_mes_land SHARP over sea; Mes over land + ! Sharp_sea_Louis_land SHARP over sea; Louis over land + ! ---------------------------------------------------------------- + select case (sbl_op) !-------------------------------------------- @@ -1018,6 +1061,19 @@ subroutine ex_coef ( & end do end do + !-------------------------------------------- + ! long TAILS FOR use WITH DEPTH BASED SCHEME + !-------------------------------------------- + case (depth_based) + ! long TAILS + do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (ri(i,j,k) >= zero) then + func(i,j)=one / ( one + g0 * ri(i,j,k) ) + end if + end do + end do + !-------------------------------------------- ! SHARP TAILS OVER SEA; MES TAILS OVER LAND !-------------------------------------------- @@ -1096,8 +1152,9 @@ subroutine ex_coef ( & end select ! SBL_OP !------------------------------------------------------------------ - ! Additional option to use SHARPEST in the free atmosphere, ie above - ! the BL top, regardless of the tail option selected above. + ! Additional code to allow the local Ri scheme to use + ! SHARPEST in the free atmosphere, ie above the BL top, + ! regardless of the tail option selected above. !------------------------------------------------------------------ if (local_fa == to_sharp_across_1km) then @@ -1157,7 +1214,7 @@ subroutine ex_coef ( & end if !--------------------------------------------------------------- - ! 3.3 Set stable Prandtl number (=KM/KH) + ! Set stable Prandtl number (=KM/KH) !--------------------------------------------------------------- if (sbl_op == lem_stability) then !$OMP PARALLEL do DEFAULT(none) SCHEDULE(STATIC) & @@ -1187,20 +1244,223 @@ subroutine ex_coef ( & end do !$OMP end PARALLEL do end if -!---------------------------------------------------------------- -! 3.4 Calculate (values of) stability functions FH, FM. -!---------------------------------------------------------------- -!$OMP PARALLEL DEFAULT(none) & -!$OMP SHARED( k, pdims,BL_diag,elm,elh,ri,func,prandtl_number,cbl_op,r_pr_n, & -!$OMP l_subfilter_vert,l_subfilter_horiz,fm_3d,fh_3d,rhokm,rhokh, & -!$OMP rho_wet_tq,dvdzm,l_mr_physics,local_fa,tke_loc,subb,subc,g0,dm, & -!$OMP dh ) & -!$OMP PRIVATE( i, j, fm, fh, rtmri, rpr ) -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end + +!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(none) & +!$OMP private(z_scale,fm,j,i,lambdam,lambdah,lambda_eff, & +!$OMP lambdah_rho,vkz,f_log,zz,zht,zfa,beta,fh,rtmri,km,rpr) & +!$OMP SHARED(k,sbl_op,var_diags_opt,bl_levels,pdims,g0,ri,ricrit, & +!$OMP flandg,ntml_local,ntml_nl,subb,dh,z_tq, & +!$OMP BL_weight,sg_orog_mixing,sigma_h,pr_n, & +!$OMP l_rp2,lambda_min,par_mezcla_rp,zh_local, & +!$OMP h_blend,turb_length,k_log_layr, & +!$OMP z_uv,z0m,elm,elh,elh_rho,blending_option,cumulus,l_shallow_cth,zhpar, & +!$OMP ntdsc,weight_1dbl,weight_bltop,delta_smag,rneutml_sq,BL_diag, & +!$OMP r_pr_n,cbl_op,subc,dm,h_tkeb,v_s,MOsurf,rho_wet_tq, & +!$OMP l_subfilter_vert,l_subfilter_horiz,fm_3d,fh_3d,rhokm,tke_loc, & +!$OMP dvdzm,l_mr_physics,rhokh,local_fa,fb_surf,func,prandtl_number) + do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end + !----------------------------------------------------------------- + ! 2.1 Calculate asymptotic mixing lengths LAMBDAM and LAMBDAH + ! (may be equal or LambdaM=2*LambdaH (operational setting)). + !----------------------------------------------------------------- + if (l_lambdam2) then + if (l_rp2) then + lambdam = max (lambda_min , 2*par_mezcla_rp(rp_idx)*zh_local(i,j)) + lambdah = max (lambda_min , par_mezcla_rp(rp_idx)*zh_local(i,j)) + else + lambdam = max (lambda_min , 0.30_r_bl*zh_local(i,j)) + lambdah = max (lambda_min , 0.15_r_bl*zh_local(i,j)) + end if + else + if (l_rp2) then + lambdam = max ( lambda_min , par_mezcla_rp(rp_idx)*zh_local(i,j) ) + else + lambdam = max ( lambda_min , lambda_fac*zh_local(i,j) ) + end if + lambdah = lambdam + end if + + if (sg_orog_mixing == sg_shear_enh_lambda) then + !-------------------------------------------------------------- + ! Use orographic mixing length for heat too, and reduce both + ! above sigma_h smoothly + ! NOTE: THIS CODE WILL not ENHANCE LAMBDAH because it only + ! gets used in bdy_expl2 where the calculation is redone as + ! standard - this was a mistake but is now operational in + ! the UKV! + !-------------------------------------------------------------- + if (k >= ntml_local(i,j)+2) then + lambdam = lambda_min + lambdah = lambda_min + end if + lambdah = max (lambdah, & + BL_weight(i,j,k)*a_lambda*h_blend(i,j) ) + lambda_eff = max (lambdam, & + BL_weight(i,j,k)*a_lambda*h_blend(i,j) ) + else + lambda_eff = max (lambdam, a_lambda*h_blend(i,j) ) + !------------------------------------------------------------ + ! Optionally reduce mixing length above local BL top + !------------------------------------------------------------ + if (k >= ntml_local(i,j)+2 .and. .not. l_full_lambdas) then + lambdam = lambda_min + lambdah = lambda_min + if (z_tq(i,j,k-1) > a_lambda*h_blend(i,j)) & + lambda_eff=lambda_min + end if + if ( k >= ntml_local(i,j)+2 .and. l_full_lambdas .and. & + local_fa == to_sharp_across_1km ) then + ! Weight lambda to lambda_min with height + ! Assuming only local_fa == to_sharp_across_1km will have + ! L_FULL_LAMBDAS. If other LOCAL_FA options are coded here + ! then changes must be included in section 5.3 of bdy_expl2 + + lambda_eff = lambda_eff * BL_weight(i,j,k) & + + lambda_min*( one - BL_weight(i,j,k) ) + lambdah = lambdah * BL_weight(i,j,k) & + + lambda_min*( one - BL_weight(i,j,k) ) + end if + end if + + lambdah_rho = lambdah + + if ( local_fa == free_trop_layers ) then + lambda_eff = max( lambda_eff, lambda_fac*turb_length(i,j,k) ) + lambdah = max( lambdah, lambda_fac*turb_length(i,j,k) ) + ! lambdah_rho does not need to be recalculated under + ! local_fa option "free_trop_layers" as the full KH profile + ! will be interpolated in bdy_expl2 + end if + !----------------------------------------------------------------------- + ! 2.2 Calculate mixing lengths ELH, ELM coincident with RI(K) and so + ! at Z_TQ(K-1) + !----------------------------------------------------------------------- + ! Incorporate log profile corrections to the vertical finite + ! differences into the definitions of ELM and ELH. + ! Note that ELH_RHO is calculated (on rho levels) for direct inclusion + ! in RHOKH and also (as elh) on theta levels for the unstable + ! stability functions and inclusion in RHOKH before interpolation + ! (under local_fa option "free_trop_layers"). + ! To save computing logarithms for all K, the values of ELM and ELH + ! are unchanged for K > K_LOG_LAYR. + + if (k <= k_log_layr) then + vkz = vkman * ( z_uv(i,j,k) - z_uv(i,j,k-1) ) + f_log = log( ( z_uv(i,j,k) + z0m(i,j) ) / & + ( z_uv(i,j,k-1) + z0m(i,j) ) ) + elm(i,j,k) = vkz / ( f_log + vkz/lambda_eff ) + elh(i,j,k) = vkz / ( f_log + vkz/lambdah ) + vkz = vkman * ( z_tq(i,j,k) - z_tq(i,j,k-1) ) + f_log = log( ( z_tq(i,j,k) + z0m(i,j) ) / & + ( z_tq(i,j,k-1) + z0m(i,j) ) ) + elh_rho(i,j,k) = vkz / ( f_log + vkz/lambdah_rho ) + else + vkz = vkman * ( z_tq(i,j,k-1) + z0m(i,j) ) + elm(i,j,k) = vkz / (one + vkz/lambda_eff ) + elh(i,j,k) = vkz / (one + vkz/lambdah ) + vkz = vkman * ( z_uv(i,j,k) + z0m(i,j) ) + elh_rho(i,j,k) = vkz / (one + vkz/lambdah_rho ) + end if + + if (blending_option /= off) then + + zz = z_tq(i,j,k-1) ! height of rhokm(k) + ! turb_length is the greater of the local and non-local + ! BL depths up to that bl top + z_scale = max( zz, turb_length(i,j,k) ) + ! zht = interface between BL and FA + zht = max( z_uv(i,j,ntml_nl(i,j)+1) , zh_local(i,j) ) + ! Relevant scale in cumulus layers can be cloud top height, zhpar + if ( cumulus(i,j) .and. ( blending_option /= blend_cth_shcu_only .or. & + l_shallow_cth(i,j) ) ) then + z_scale = max( z_scale, zhpar(i,j) ) + zht = max( zht, zhpar(i,j) ) + end if + ! BL top includes decoupled stratocu layer, if it exists + if (ntdsc(i,j) > 0) zht = max( zht, z_uv(i,j,ntdsc(i,j)+1) ) + ! Need to restrict z_scale to dsc depth within a dsc layer + ! (given by turb_length) and to distance from dsc top below the + ! dsc layer + if ( k-1 <= ntdsc(i,j) ) then + z_scale = min( z_scale, & + max( turb_length(i,j,k), z_uv(i,j,ntdsc(i,j)+1)-zz ) ) + end if + + ! Finally calculate 1D BL weighting factor + if ( blending_option == blend_except_cu .and. & + cumulus(i,j) .and. ntdsc(i,j) == 0) then + ! pure cumulus layer so revert to 1D BL scheme + weight_1dbl(i,j,k) = one + else + + if ( blending_option == blend_gridindep_fa .or. & + blending_option == blend_cth_shcu_only ) then + if (zz <= zht) then + weight_1dbl(i,j,k) = & + one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & + max( zero, & + min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + weight_bltop(i,j) = weight_1dbl(i,j,k) + else ! above PBL + ! Above the PBL top (at zht) increase weight to one smoothly + ! between zht and zfa in order to default to 1D BL when not + ! turbulent. There is some arbitrariness here but: + ! a) we want to use a physical height, to avoid grid dependence + ! b) for shallow PBLs at high resolution it seems sensible to + ! get well (a PBL depth) above the resolved PBL before + ! reverting to 1D + ! c) for deep PBLs we still want to revert to 1D reasonably + ! quickly, hence within at most 1km of zht + zfa=min( 2.0_r_bl*zht, zht+1000.0_r_bl ) + if (zz <= zfa ) then + weight_1dbl(i,j,k) = one + one_half * & + (weight_bltop(i,j) - one) * & + ( one + cos(pi*(zz-zht)/(zfa-zht)) ) + else + weight_1dbl(i,j,k) = one + end if + if ( local_fa == free_trop_layers .and. & + ri(i,j,k) < ricrit(i,j) ) then + ! Except in an elevated turbulent layer where we still use + ! the standard blending weight + z_scale = turb_length(i,j,k) + weight_1dbl(i,j,k) = & + one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & + max( zero, & + min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + + end if + end if ! test on zz < zht + else + zfa=zht+1000.0_r_bl + if (zz <= zht) then + beta=beta_bl + else if (zz <= zfa) then + beta = beta_bl*(zfa-zz)/(zfa-zht) + & + beta_fa*(zz-zht)/(zfa-zht) + else + beta=beta_fa + end if + weight_1dbl(i,j,k) = & + one - tanh( beta*z_scale/delta_smag(i,j)) * max( zero, & + min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) + end if + end if + + elm(i,j,k) = elm(i,j,k)*weight_1dbl(i,j,k) + & + sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) + elh(i,j,k) = elh(i,j,k)*weight_1dbl(i,j,k) + & + sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) + + end if ! test on blending_option if (BL_diag%l_elm3d) BL_diag%elm3d(i,j,k)=elm(i,j,k) + + !---------------------------------------------------------------- + ! 2.4 Calculate (values of) stability functions FH, FM. + !---------------------------------------------------------------- + if (ri(i,j,k) >= zero) then !----------------------------------------------------------- ! Note that we choose to include the Pr dependence such that @@ -1229,7 +1489,7 @@ subroutine ex_coef ( & end if !------------------------------------------------------------------ - ! 4.0 Calculate exchange coefficients RHO*KM(K), RHO*KH(K) + ! 2.5_r_bl Calculate exchange coefficients RHO*KM(K), RHO*KH(K) ! both on TH-level K-1 at this stage (RHOKH will be interpolated ! onto uv-levels and then be multiplied by ELH in BDY_EXPL2 if ! local_fa is not "free_trop_layers") @@ -1257,7 +1517,7 @@ subroutine ex_coef ( & if (local_fa == free_trop_layers) & rhokh(i,j,k) = rhokh(i,j,k) * elh(i,j,k) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then rpr = fh / max(fm, tiny(one) ) tke_loc(i,j,k) = ( r_c_tke*elm(i,j,k)*dvdzm(i,j,k)*dvdzm(i,j,k) & *(rhokm(i,j,k)/rho_wet_tq(i,j,k-1)) & @@ -1265,13 +1525,47 @@ subroutine ex_coef ( & one - ri(i,j,k)*rpr ) ) & )**two_thirds end if + ! ------------------------------------------- + ! Boundary layer depth based formulation + ! ------------------------------------------- + + if (sbl_op == depth_based .and. & + fb_surf(i,j) <= zero) then + if (z_tq(i,j,k-1) < h_tkeb(i,j)) then + + ! Formula for diffusion coefficient + ! see Beare et al 2006, Boundary layer Met. + + km = v_s(i,j) * vkman * z_tq(i,j,k-1) * & + ( (one-z_tq(i,j,k-1)/h_tkeb(i,j))**(1.5_r_bl) ) & + / (one + 4.7_r_bl*z_tq(i,j,k-1)/MOsurf(i,j)) + rhokm(i,j,k)= rho_wet_tq(i,j,k-1) * km + if (l_mr_physics) then + ! Note "RHO" here is always wet density (RHO_WET_TQ) so + ! save multiplication of RHOKH to after interpolation + rhokh(i,j,k)= km*r_pr_n / elm(i,j,k) + else + rhokh(i,j,k) = rho_wet_tq(i,j,k-1)*km*r_pr_n /elm(i,j,k) + end if + else + rhokm(i,j,k)=zero + rhokh(i,j,k)=zero + end if - end do !i + end if !SBL_OP == Depth_based + + end do !I end do !j -!$OMP end do -!$OMP end PARALLEL +!$OMP end PARALLEL do end do ! bl_levels +!----------------------------------------------------------------------- +! 3. Equilibrium Stable Boundary Layer (SBL) model. +!----------------------------------------------------------------------- +!----------------------------------------------------------------------- +! Finish up +!----------------------------------------------------------------------- + if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_out,zhook_handle) return end subroutine ex_coef diff --git a/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 b/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 index a708083c2..4525be05d 100644 --- a/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/excf_nl_9c.F90 @@ -56,7 +56,7 @@ subroutine excf_nl_9c ( & flux_grad, Locketal2000, HoltBov1993, LockWhelan2006, entr_smooth_dec, & entr_taper_zh, kprof_cu, klcl_entr, buoy_integ, buoy_integ_low, & max_cu_depth, bl_res_inv, a_ent_shr_nml, a_ent_2, one_third, two_thirds, & - l_reset_dec_thres, & + l_reset_dec_thres, var_diags_opt, original_vars, split_tke_and_inv, & l_use_var_fixes, dzrad_disc_opt, dzrad_ntm1, dzrad_1p5dz, & num_sweeps_bflux, l_converge_ga, l_use_sml_dsc_fixes, zero, one, one_half use model_domain_mod, only: model_type, mt_single_column @@ -2990,7 +2990,7 @@ subroutine excf_nl_9c ( & ( (max(one - km_sct_factor(i,j)*z_pr/zh_pr, zero))**0.8_r_bl ) & * z_pr * z_pr / zh_pr ! PRANDTL=0.75 - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k)=rhokm_top(i,j,k)*c_tke*v_top(i,j)/zh(i,j) end if @@ -3054,13 +3054,26 @@ subroutine excf_nl_9c ( & 0.75_r_bl*rho_wet_tq(i,j,k-1)*v_top_dsc(i,j)*g1*vkman* & ( (max(one - km_dsct_factor(i,j)*z_pr/zh_pr,zero))**0.8_r_bl ) & * z_pr * z_pr / zh_pr - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm_dsct*c_tke*v_top_dsc(i,j)/dscdepth(i,j) end if rhokm_top(i,j,k) = rhokm_top(i,j,k) + rhokm_dsct end if + if (BL_diag%l_tke .and. var_diags_opt == original_vars) then + ! save 1/timescale for TKE diag, completed in bdy_expl2 + if ( zk_tq < zsml_top(i,j) .and. & + zk_tq > zsml_base(i,j) ) then + BL_diag%tke(i,j,k) = c_tke*v_top(i,j)/zh(i,j) + end if + if ( zk_tq < zhsc(i,j) .and. & + zk_tq > zdsc_base(i,j) ) then + ! save 1/timescale for TKE diag, completed in bdy_expl2 + BL_diag%tke(i,j,k) = max( BL_diag%tke(i,j,k), & + c_tke*v_top_dsc(i,j)/dscdepth(i,j) ) + end if + end if end do end do @@ -3170,12 +3183,19 @@ subroutine excf_nl_9c ( & ( one - ( zk_tq / zh(i,j) ) ) * & ( one - ( zk_tq / zh(i,j) ) ) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm(i,j,k)*c_tke*w_m_tq/zh(i,j) end if end if + if (BL_diag%l_tke .and. var_diags_opt == original_vars) then + ! save 1/timescale for TKE diag, completed in bdy_expl2 + if ( zk_tq < zsml_top(i,j) ) then + BL_diag%tke(i,j,k) = max( BL_diag%tke(i,j,k), & + c_tke*w_m_tq/zh(i,j) ) + end if + end if end if end do end do @@ -3313,7 +3333,7 @@ subroutine excf_nl_9c ( & ( one - km_top_factor(i,j) * ( zk_tq / zh(i,j) ) ) * & ( one - km_top_factor(i,j) * ( zk_tq / zh(i,j) ) ) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm(i,j,k)*c_tke*w_m_tq/zh(i,j) @@ -3325,13 +3345,20 @@ subroutine excf_nl_9c ( & rhokm(i,j,k) = prandtl_top(i,j) * rhokh_lcl(i,j) * & exp(-(zk_tq-zh(i,j))/cu_depth_scale(i,j)) * & (one-(zk_tq-zh(i,j))/(zsml_top(i,j)-zh(i,j))) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt==split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,k) = tke_nl(i,j,k) + & rhokm(i,j,k)*c_tke*w_m_tq/zh(i,j) end if end if end if + if (BL_diag%l_tke .and. var_diags_opt == original_vars) then + ! save 1/timescale for TKE diag, completed in bdy_expl2 + if ( zk_tq < zsml_top(i,j) ) then + BL_diag%tke(i,j,k) = max( BL_diag%tke(i,j,k), & + c_tke*w_m_tq/zh(i,j) ) + end if + end if end if end do diff --git a/science/physics_schemes/source/boundary_layer/imp_mix.F90 b/science/physics_schemes/source/boundary_layer/imp_mix.F90 index 3d5916f32..622a181f4 100644 --- a/science/physics_schemes/source/boundary_layer/imp_mix.F90 +++ b/science/physics_schemes/source/boundary_layer/imp_mix.F90 @@ -32,7 +32,7 @@ subroutine imp_mix ( & use atm_fields_bounds_mod, only: pdims, array_dims use yomhook, only: lhook, dr_hook use parkind1, only: jprb, jpim -!$ use omp_lib, only: omp_get_max_threads +!$ use omp_lib, only: omp_get_num_threads implicit none ! Inputs :- @@ -109,13 +109,10 @@ subroutine imp_mix ( & ! K minus 1. kp1, & ! K plus 1. - ii, & + jj, & ! omp blocking counter - pdims_omp_block, & + omp_block ! omp block size - pdims_seg_block, & - ! omp segment length - max_threads integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -127,15 +124,14 @@ subroutine imp_mix ( & blm1 = bl_levels-1 -max_threads = 1 -!$ max_threads = omp_get_max_threads() -pdims_omp_block = ceiling(real(pdims%i_end)/max_threads) -pdims_seg_block = min(pdims_omp_block, pdims%i_len) +omp_block = pdims%j_len -!$OMP PARALLEL DEFAULT(none) SHARED(pdims_seg_block, f_field, dtrdz, field, pdims, & +!$OMP PARALLEL DEFAULT(none) SHARED(f_field, dtrdz, field, pdims, & !$OMP gamma_rhokh_rdz, r_rho_levels, surf_dep_flux, d_field, af, & !$OMP r_theta_levels, gamma_rhok_dep, bl_levels, blm1) & -!$OMP private(r_sq, cf, rbf, kp1, km1, ii, k, j, i, rr_sq) +!$OMP private(r_sq, cf, rbf, kp1, km1, jj, k, j, i, rr_sq, omp_block) + +!$ omp_block = ceiling(real(pdims%j_len)/ omp_get_num_threads()) ! ---------------------------------------------------------------------- ! (A) Calculations on P-grid. @@ -195,12 +191,12 @@ subroutine imp_mix ( & !----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) -do ii = pdims%i_start, pdims%i_end, pdims_seg_block +do jj = pdims%j_start, pdims%j_end, omp_block do k = 2, blm1 kp1 = k+1 km1 = k-1 - do j = pdims%j_start, pdims%j_end - do i = ii, min(ii+pdims_seg_block-1, pdims%i_end) + do j = jj, min(jj+omp_block-1, pdims%j_end) + do i = pdims%i_start, pdims%i_end ! "Explicit" flux divergence across layer giving explicit FIELD ! increment due to mixing @@ -249,10 +245,10 @@ subroutine imp_mix ( & !----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) -do ii = pdims%i_start, pdims%i_end, pdims_seg_block +do jj = pdims%j_start, pdims%j_end, omp_block do k = blm1, 1, -1 - do j = pdims%j_start, pdims%j_end - do i = ii, min(ii+pdims_seg_block-1,pdims%i_end) + do j = jj, min(jj+omp_block-1,pdims%j_end) + do i = pdims%i_start, pdims%i_end d_field(i,j,k) = d_field(i,j,k) - & af(i,j,k)*d_field(i,j,k+1) field(i,j,k) = field(i,j,k) + d_field(i,j,k) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 32fb1559c..24008fac1 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -57,7 +57,8 @@ subroutine kmkhz_9c ( & a_grad_adj, max_t_grad, flux_grad, Locketal2000, & HoltBov1993, LockWhelan2006, entr_smooth_dec, entr_taper_zh, & kprof_cu, l_use_sml_dsc_fixes, l_converge_ga, & - bl_res_inv, cosine_inv_flux, target_inv_profile, pr_max, l_noice_in_turb, & + bl_res_inv, cosine_inv_flux, target_inv_profile, pr_max, var_diags_opt, & + split_tke_and_inv, l_noice_in_turb, & one_third, two_thirds, zero, one, one_half use conversions_mod, only: pi => pi_bl use cv_run_mod, only: l_param_conv @@ -4164,7 +4165,7 @@ subroutine kmkhz_9c ( & if (res_inv(i,j) == 1) then Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & pr_max ) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! need velocity scale for TKE diagnostic w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third @@ -4188,7 +4189,7 @@ subroutine kmkhz_9c ( & * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) end if @@ -4236,7 +4237,7 @@ subroutine kmkhz_9c ( & * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke) then + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! save Km/timescale for TKE diag, completed in bdy_expl2 tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) end if @@ -4701,7 +4702,7 @@ subroutine kmkhz_9c ( & ! Estimate turbulent w-variance scale at discontinuous inversions !----------------------------------------------------------------------- -if (BL_diag%l_tke) then +if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then !$OMP do SCHEDULE(STATIC) do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end