Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
42c51b7
Add ifdef UM_PHYS, linear_model example runs
cjohnson-pi May 12, 2026
3f79afc
retry copying optimisation from lfric_atm]
cjohnson-pi May 13, 2026
f6f1a06
linear_model and lfric_atm run
cjohnson-pi May 13, 2026
0f9e2be
clearwhitespace
cjohnson-pi May 13, 2026
9bf79cb
removing PHYSICS_ROOT change
cjohnson-pi May 13, 2026
5f68c17
increase build wallclock
cjohnson-pi May 13, 2026
70c1ce1
Merge remote-tracking branch 'upstream/stable' into ifdefphys
cjohnson-pi May 14, 2026
0efabc0
use_physics false
cjohnson-pi May 15, 2026
23a5abb
correct for validate_rose-meta. Test suite completes.
cjohnson-pi May 15, 2026
fa5e41d
Adding updates from my HEAD branch...
ss421 May 15, 2026
eaaba2a
use lfric_atm optimisation options
cjohnson-pi May 18, 2026
3d3e72e
tidy
cjohnson-pi May 18, 2026
bcad2f5
revert jedi changes
cjohnson-pi May 18, 2026
db5d9a2
whitespace
cjohnson-pi May 18, 2026
ab70eb4
Merge remote-tracking branch 'cjohnson-pi/ifdefphys' into update_fore…
ss421 May 18, 2026
339b0b0
update build
cjohnson-pi May 18, 2026
b9da623
Make switch less strict, for jedi tests
cjohnson-pi May 20, 2026
6f79e5b
Merge remote-tracking branch 'cjohnson-pi/ifdefphys' into update_fore…
ss421 May 20, 2026
f0261b9
Merge remote-tracking branch 'cjohnson-pi/ifdefphys' into update_fore…
ss421 May 20, 2026
f3090de
Fix rose validate - need to use upgrade macro
ss421 May 20, 2026
80831af
Fix/add KGOs
ss421 May 20, 2026
f039571
Relabeled the name of the chcksum
ss421 May 20, 2026
d240f12
Code tidy
ss421 May 20, 2026
09d22e1
Update to fix rose validate correctly
ss421 May 21, 2026
d5a18cd
Update the forecast configuration
ss421 May 22, 2026
fc48bb0
Merge branch 'main' into ifdefphys
james-bruten-mo Jun 2, 2026
58011c4
Fix indentation for extracting external metadata message
james-bruten-mo Jun 2, 2026
89c3bba
Update to revert previous change as noted by reviewer.
ss421 Jun 3, 2026
c51c69c
Remove file that is no longer used.
ss421 Jun 4, 2026
1c0df0e
Copy build options from lfric_atm
cjohnson-pi Jun 8, 2026
1c551e7
Updates since merge from main
cjohnson-pi Jun 9, 2026
7d4cfe5
Merge remote-tracking branch 'origin/main' into ifdefphys
james-bruten-mo Jun 19, 2026
cd62e53
Merge remote-tracking branch 'cjohnson-pi/ifdefphys' into update_fore…
ss421 Jun 19, 2026
c25d655
Merge branch 'main' into update_forecast_config_ifdefphys
ss421 Jun 19, 2026
8da365b
Fix validate_rose_meta after merge due to update in da opt
ss421 Jun 22, 2026
8f8ee99
Merge branch 'main' into update_forecast_config_ifdefphys
ss421 Jun 24, 2026
f1ee397
Fix tests after merege to head of main.
ss421 Jun 25, 2026
5cee5ee
Replace lfric_atm example with smaller gh based configuration
ss421 Jul 2, 2026
0cca8c7
Re-add the README file.
ss421 Jul 2, 2026
79fac20
Merge branch 'main' into update_forecast_config_ifdefphys
ss421 Jul 2, 2026
08cc8b5
Fix the versions.py file
ss421 Jul 2, 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
92 changes: 69 additions & 23 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 @@ -58,6 +63,11 @@ include $(CORE_ROOT_DIR)/infrastructure/build/lfric.mk
include $(INTERNAL_DEPENDENCIES:=/build/import.mk)
-include $(PROJECT_DIR)/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,7 +112,7 @@ 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

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,========================================)
Comment thread
MatthewHambley marked this conversation as resolved.
$(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,========================================)
Comment thread
MatthewHambley marked this conversation as resolved.
$(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
Comment thread
MatthewHambley marked this conversation as resolved.

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
Comment thread
MatthewHambley marked this conversation as resolved.
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
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
# ==========================================================================
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
40 changes: 40 additions & 0 deletions applications/jedi_lfric_tests/build/fortran/gfortran.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
##############################################################################
# (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 GNU Fortran compiler.
##############################################################################

$(info Project specials for GNU compiler)

export FFLAGS_UM_PHYSICS = -fdefault-real-8 -fdefault-double-8
# Most lfric_atm dependencies contain code with implicit lossy conversions and
# unused variables.
# We reset the FFLAGS_WARNINGS variable here in order to prevent
# -Werror induced build failures.
FFLAGS_WARNINGS = -Wall -Werror=character-truncation -Werror=unused-value \
-Werror=tabs
# But, we can apply some more lfric infrastructure checking to socrates
FFLAGS_SOCRATES_WARNINGS = -Werror=unused-variable

science/src/socrates/%.o science/src/socrates/%.mod: private FFLAGS_EXTRA = $(FFLAGS_SOCRATES_WARNINGS)

# We remove bounds checking (applied by -fcheck=all) and underflow checking. The
# latter is due to regular permitting of exponents going to zero for small numbers
# to imply total extinction of radiation passing through a medium
FFLAGS_RUNTIME = -fcheck=all,no-bounds -ffpe-trap=invalid,zero,overflow

# The lfric_atm app defines an extra set of debug flags for
# fast-debug which are the same as the full-debug settings
# except for some platforms
ifdef CRAY_ENVIRONMENT
# On the EXZ these options are switched off for fast-debug
# due to an unexpected FPE in the NetCDF library
FFLAGS_FASTD_INIT =
FFLAGS_FASTD_RUNTIME =
else
# Otherwise, use the same as the default full-debug settings
FFLAGS_FASTD_INIT = $(FFLAGS_INIT)
FFLAGS_FASTD_RUNTIME = $(FFLAGS_RUNTIME)
endif
Loading
Loading