Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5f2397d
Add new files - testing via cylc
ss421 Apr 27, 2026
39e5714
Add EMPTY file for testing
ss421 Apr 27, 2026
7c1de4b
Updates to include UM PHYSICS and make curent test run, forecast still
ss421 Apr 27, 2026
ac34472
Add lfric_atm iodef configuration files
ss421 Apr 27, 2026
b7d0d14
Add cray fortran mk files...
ss421 Apr 27, 2026
4439335
Physics integration: enable NL physics in jedi_forecast and lfric_atm…
ss421 Apr 28, 2026
360f031
Update to include physics and code fixes - local build and run of
ss421 Apr 28, 2026
e9a2500
Fix config dump issue and remove intergration test
ss421 Apr 29, 2026
fcb4823
Align with lfric_atm.
ss421 Apr 29, 2026
8093dc9
Tidy and allign with lfric_atm
ss421 May 1, 2026
a8c22ee
tidy the rose configs
ss421 May 5, 2026
4cab4e3
Rename tests
ss421 May 5, 2026
8cd5bd7
Update the kgos - rname and update the values
ss421 May 5, 2026
bb50c19
Add C48 tests case
ss421 May 5, 2026
116741a
Add JEDI_C48 to read a C48 file
ss421 May 5, 2026
d40ba28
Add checksums for spice.... cce has odd error...
ss421 May 5, 2026
44c2a01
Add cce checkum
ss421 May 5, 2026
4acc910
Code tidy and add C48 inc previous commits..
ss421 May 6, 2026
79e1bc7
Code tidy
ss421 May 6, 2026
a732ba7
Fix code style task
ss421 May 6, 2026
24da1ab
Merge branch 'main' into update_forecast_config_HEAD
ss421 May 7, 2026
59cb341
Fix issue post merge to HEAD
ss421 May 7, 2026
aee1c85
ADD da verion of the configuration
ss421 May 13, 2026
c6bc12d
Add the updated iodef file
ss421 May 13, 2026
a6e1a5b
Update kgos - ex still failing. Fresh build...
ss421 May 13, 2026
142c658
Add da KGO
ss421 May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 71 additions & 25 deletions applications/jedi_lfric_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ export EXTRA_ROSE_META = jules
export META_DIR = $(WORKING_DIR)/../rose-meta
export ROSE_META_DIRS = $(APPS_ROOT_DIR)/rose-meta $(META_DIR)

# Note - socrates_interface must come before jules_interface as there are dependencies on each other.
export INTERNAL_DEPENDENCIES = $(CORE_ROOT_DIR)/infrastructure \
$(CORE_ROOT_DIR)/components/driver \
$(CORE_ROOT_DIR)/components/science \
$(CORE_ROOT_DIR)/components/inventory \
$(APPS_ROOT_DIR)/interfaces/jedi_lfric_interface \
$(CORE_ROOT_DIR)/components/lfric-xios \
$(APPS_ROOT_DIR)/science/shared \
$(APPS_ROOT_DIR)/interfaces/socrates_interface \
$(APPS_ROOT_DIR)/interfaces/jules_interface \
$(APPS_ROOT_DIR)/interfaces/physics_schemes_interface \
$(APPS_ROOT_DIR)/science/gungho \
$(APPS_ROOT_DIR)/science/linear \
$(APPS_ROOT_DIR)/science/adjoint
Expand All @@ -46,7 +51,7 @@ ifneq ("$(PSYCLONE_TRANSFORMATION)","none")
endif

.PHONY: default
default: build integration-tests
default: build
$(Q)echo > /dev/null

.PHONY: documentation doc docs
Expand All @@ -56,7 +61,12 @@ documentation doc docs: document-uml document-latex document-api
include $(APPS_ROOT_DIR)/build/extract/extract_meta.mk
include $(CORE_ROOT_DIR)/infrastructure/build/lfric.mk
include $(INTERNAL_DEPENDENCIES:=/build/import.mk)
-include $(PROJECT_DIR)/build/project.mk
include build/project.mk

# Include transmute list only if not using minimum or no transformations
ifeq ($(filter "$(PSYCLONE_TRANSFORMATION)", "none" "minimum"),)
include build/psyclone_transmute_file_list.mk
endif

##############################################################################
# Documentation
Expand Down Expand Up @@ -102,13 +112,13 @@ build: export BIN_DIR ?= $(PROJECT_DIR)/bin
build: export LIB_DIR ?= $(PROJECT_DIR)/lib
build: export MOD_DIR ?= $(PROJECT_DIR)/mod
build: export CXX_LINK = TRUE
build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print)))
build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -exec egrep -l "^\s*program" {} \;)))
build: export PROJECT = $(PROJECT_NAME)
build: export WORKING_DIR := $(WORKING_DIR)/jedi_lfric_tests

build: export LDFLAGS_GROUPS = OPENMP
ifeq "$(PROFILE)" "full-debug"
build: export FFLAG_GROUPS = OPENMP DEBUG WARNINGS INIT RUNTIME NO_OPTIMISATION FORTRAN_STANDARD
build: export FFLAG_GROUPS = OPENMP DEBUG WARNINGS INIT RUNTIME NO_OPTIMISATION
else ifeq "$(PROFILE)" "fast-debug"
build: export FFLAG_GROUPS = OPENMP DEBUG WARNINGS SAFE_OPTIMISATION FORTRAN_STANDARD
else ifeq "$(PROFILE)" "production"
Expand All @@ -123,6 +133,20 @@ build: ALWAYS
$(Q)for SUBPROJECT in $(INTERNAL_DEPENDENCIES) ; do \
$(MAKE) $(QUIET_ARG) -f $$SUBPROJECT/build/import.mk ; done
$(call MESSAGE,========================================)
$(call MESSAGE,Extracting coupled_interface component)
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/coupled_interface/source
$(call MESSAGE,========================================)
$(call MESSAGE,Extracting Gungho dynamical core)
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/science/gungho/source
$(call MESSAGE,========================================)
$(call MESSAGE,Extracting UM physics)
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/build/extract/extract_physics.mk
$(call MESSAGE,========================================)
$(call MESSAGE,Extracting $(PROJECT_NAME))
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \
Expand All @@ -136,16 +160,54 @@ build: ALWAYS
$(call MESSAGE,Generating $(PROJECT) namelist loaders)
$(call MESSAGE,=========================================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/configuration.mk \
PROJECT=$(PROJECT) \
SOURCE_DIR=source \
WORKING_DIR=$(WORKING_DIR) \
SOURCE_DIR=$(APPS_ROOT_DIR)/science/gungho/source \
META_FILE_DIR=$(META_FILE_DIR)
$(call MESSAGE,========================================)
$(call MESSAGE,PSycloning interface components)
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/coupled_interface/source \
OPTIMISATION_PATH=$(OPTIMISATION_PATH)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/jules_interface/source \
OPTIMISATION_PATH=$(OPTIMISATION_PATH)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/socrates_interface/source \
OPTIMISATION_PATH=$(OPTIMISATION_PATH)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/physics_schemes_interface/source \
OPTIMISATION_PATH=$(OPTIMISATION_PATH)
$(call MESSAGE,========================================)
$(call MESSAGE,PSycloning Gungho dynamical core)
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \
SOURCE_DIR=$(APPS_ROOT_DIR)/science/gungho/source \
OPTIMISATION_PATH=$(OPTIMISATION_PATH)
$(call MESSAGE,========================================)
$(call MESSAGE,PSycloning $(PROJECT_NAME))
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \
SOURCE_DIR=source \
OPTIMISATION_PATH=$(OPTIMISATION_PATH)
$(call MESSAGE,========================================)
$(call MESSAGE,Preprocess and PSyclone Transmute)
$(call MESSAGE,========================================)
$Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/interfaces/build/pre_process_phys.mk \
SOURCE_DIR=$(WORKING_DIR) \
PSYCLONE_PHYSICS_FILES="$(PSYCLONE_PHYSICS_FILES)" \
PSYCLONE_DIRECTORIES="$(PSYCLONE_DIRECTORIES)" \
PSYCLONE_PHYSICS_EXCEPTION="$(PSYCLONE_PHYSICS_EXCEPTION)"
$Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/interfaces/build/psyclone_transmute_pass.mk \
SOURCE_DIR=$(WORKING_DIR) \
OPTIMISATION_PATH_PSY=$(APPS_ROOT_DIR)/applications/$(PROJECT)/$(OPTIMISATION_PATH) \
PSYCLONE_PASS_NO_SCRIPT="$(PSYCLONE_PASS_NO_SCRIPT)"
$Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/interfaces/build/psyclone_transmute.mk \
SOURCE_DIR=$(WORKING_DIR) \
OPTIMISATION_PATH_PSY=$(APPS_ROOT_DIR)/applications/$(PROJECT)/$(OPTIMISATION_PATH) \
PSYCLONE_PHYSICS_FILES="$(PSYCLONE_PHYSICS_FILES)" \
PSYCLONE_PASS_NO_SCRIPT="$(PSYCLONE_PASS_NO_SCRIPT)" \
PSYCLONE_DIRECTORIES="$(PSYCLONE_DIRECTORIES)" \
PSYCLONE_PHYSICS_EXCEPTION="$(PSYCLONE_PHYSICS_EXCEPTION)"
$(call MESSAGE,=========================================================)
$(call MESSAGE,Analysing $(PROJECT) build dependencies)
$(call MESSAGE,=========================================================)
Expand Down Expand Up @@ -190,24 +252,8 @@ unit-tests/build: extract_meta unit-tests/build
##############################################################################
# Integration tests
#
integration-tests/%: export BIN_DIR ?= $(PROJECT_DIR)/test
integration-tests/%: export FFLAGS += -DINT_TEST
integration-tests/%: export IMPORT_PARTS = $(CORE_ROOT_DIR)/infrastructure \
$(CORE_ROOT_DIR)/components/science \
$(CORE_ROOT_DIR)/components/driver \
$(CORE_ROOT_DIR)/components/inventory \
$(CORE_ROOT_DIR)/components/lfric-xios \
$(APPS_ROOT_DIR)/interfaces/jedi_lfric_interface \
$(APPS_ROOT_DIR)/science/gungho \
$(APPS_ROOT_DIR)/science/linear \
$(APPS_ROOT_DIR)/science/adjoint
integration-tests/%: export META_FILE_DIR = rose-meta/jedi_lfric_tests/HEAD
integration-tests/%: export PROJECT = $(PROJECT_NAME)
integration-tests/%: export SOURCE_DIR = source
integration-tests/%: export TEST_DIR = integration-test
integration-tests/%: export WORKING_DIR := $(WORKING_DIR)/integration-tests
integration-tests: extract_meta integration-tests/run
integration-tests/build: extract_meta integration-tests/build
integration-tests:
$(call MESSAGE,Testing,"There are no integration tests.")

##############################################################################
# Clean
Expand Down
46 changes: 46 additions & 0 deletions applications/jedi_lfric_tests/build/compile_options.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
##############################################################################
# (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.
##############################################################################

# NOTE: Import of compile options from LFRic infrastructure is temporarily
# suspended here as a workaround for #2340 in which application of the
# -qoverride-limits option was preventing compilation of a UKCA module.
# include $(LFRIC_BUILD)/compile_options.mk

$(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)
jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
AC_assimilation/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
aerosols/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
atmosphere_service/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
boundary_layer/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
carbon/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
convection/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
diffusion_and_filtering/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
dynamics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
dynamics_advection/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
electric/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
free_tracers/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
gravity_wave_drag/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
idealised/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
large_scale_cloud/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
large_scale_precipitation/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
physics_diagnostics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
PWS_diagnostics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
radiation_control/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
stochastic_physics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
tracer_advection/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS)
%/limited_area_constants_mod.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_FIX_ARG)

$(info Disable warnings-turned-error caused by undeclared external functions - see ifort.mk)
%mpi_mod.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_EXTERNALS)
socrates/src/radiance_core/%.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_EXTERNALS)
socrates/src/interface_core/%.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_EXTERNALS)
13 changes: 13 additions & 0 deletions applications/jedi_lfric_tests/build/fortran/crayftn.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
##############################################################################
# (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.
##############################################################################
# Various things specific to the Cray Fortran compiler.
##############################################################################

$(info Project specials for Cray compiler)

export FFLAGS_UM_PHYSICS = -s real64

include $(PROJECT_DIR)/build/fortran/crayftn/$(PROFILE).mk
55 changes: 55 additions & 0 deletions applications/jedi_lfric_tests/build/fortran/crayftn/fast-debug.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
##############################################################################
# (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.
##############################################################################
##############################################################################
# Various things specific to fast-debug lfric_atm when using the
# Cray Fortran compiler.
# To override flags specified in LFRic Core, use
# FFLAGS_SAFE_OPTIMISATION, to add an additional flag to what is specified
# in Core, use FFLAGS_EXTRA. If you need to add debugging flags to a module,
# modify FFLAGS_DEBUG for the target module.
# All flag modification should be `private` so they are not inherited by
# submodules.
##############################################################################

# ==========================================================================
# NON-DEBUG FLAGS
# ==========================================================================
# UKCA
%ukca_emiss_mode_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%ukca_step_control_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0

# UM
%parcel_ascent_5a.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -hvector0

# LFRic Apps
%aerosol_ukca_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%bl_exp_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%bl_imp_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%conv_comorph_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%conv_comorph_kernel_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%conv_gr_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%gungho_model_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%init_aerosol_fields_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0
%jules_extra_kernel_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0
large_scale_precipitation/%.o: private FFLAGS_SAFE_OPTIMISATION = -O2 -hfp0 -hflex_mp=strict

# ==========================================================================
# DEBUG FLAGS
# ==========================================================================
# UKCA
%ukca_emiss_mode_mod.o: private FFLAGS_DEBUG = -G0
%ukca_step_control_mod.o: private FFLAGS_DEBUG = -G0

# LFRic Apps
%aerosol_ukca_alg_mod_psy.o: private FFLAGS_DEBUG = -G0
%bl_exp_alg_mod_psy.o: private FFLAGS_DEBUG = -G0
%bl_imp_alg_mod_psy.o: private FFLAGS_DEBUG = -G0
%conv_comorph_alg_mod_psy.o: private FFLAGS_DEBUG = -G0
%conv_comorph_kernel_mod.o: private FFLAGS_DEBUG = -G0
%conv_gr_alg_mod_psy.o: private FFLAGS_DEBUG = -G0
%gungho_model_mod.o: private FFLAGS_DEBUG = -G0
%init_aerosol_fields_alg_mod_psy.o: private FFLAGS_DEBUG = -G0
%jules_extra_kernel_mod.o: private FFLAGS_DEBUG = -G0
17 changes: 17 additions & 0 deletions applications/jedi_lfric_tests/build/fortran/crayftn/full-debug.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##############################################################################
# (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.
##############################################################################
##############################################################################
# Various things specific to full-debug lfric_atm when using the
# Cray Fortran compiler.
##############################################################################

# ==========================================================================
# NON-DEBUG FLAGS
# ==========================================================================

# ==========================================================================
# DEBUG FLAGS
# ==========================================================================
36 changes: 36 additions & 0 deletions applications/jedi_lfric_tests/build/fortran/crayftn/production.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
##############################################################################
# (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.
##############################################################################
##############################################################################
# Various things specific to production lfric_atm when using the
# Cray Fortran compiler.
##############################################################################

# ==========================================================================
# DIRECTORIES
# ==========================================================================
gravity_wave_drag/%.o: private FFLAGS_RISKY_OPTIMISATION = -O2 -hflex_mp=strict

# ==========================================================================
# MODULES
# ==========================================================================
# UKCA
%ukca_emiss_mode_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%ukca_step_control_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0

# UM
%parcel_ascent_5a.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -hvector0

# LFRic Apps
%aerosol_ukca_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%bl_exp_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%bl_imp_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%conv_comorph_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%conv_comorph_kernel_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%conv_gr_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%gungho_model_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%init_aerosol_fields_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0
%jules_extra_kernel_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0
large_scale_precipitation/%.o: private FFLAGS_SAFE_OPTIMISATION = -O3 -hipa3 -hflex_mp=conservative
Loading