diff --git a/applications/jedi_lfric_tests/Makefile b/applications/jedi_lfric_tests/Makefile index 2324011cc..d342f30c1 100644 --- a/applications/jedi_lfric_tests/Makefile +++ b/applications/jedi_lfric_tests/Makefile @@ -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 @@ -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 @@ -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 @@ -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" @@ -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 \ @@ -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,=========================================================) @@ -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 diff --git a/applications/jedi_lfric_tests/build/compile_options.mk b/applications/jedi_lfric_tests/build/compile_options.mk new file mode 100644 index 000000000..d9d1e0540 --- /dev/null +++ b/applications/jedi_lfric_tests/build/compile_options.mk @@ -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) diff --git a/applications/jedi_lfric_tests/build/fortran/crayftn.mk b/applications/jedi_lfric_tests/build/fortran/crayftn.mk new file mode 100644 index 000000000..f70b99e21 --- /dev/null +++ b/applications/jedi_lfric_tests/build/fortran/crayftn.mk @@ -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 diff --git a/applications/jedi_lfric_tests/build/fortran/crayftn/fast-debug.mk b/applications/jedi_lfric_tests/build/fortran/crayftn/fast-debug.mk new file mode 100644 index 000000000..5530bd016 --- /dev/null +++ b/applications/jedi_lfric_tests/build/fortran/crayftn/fast-debug.mk @@ -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 diff --git a/applications/jedi_lfric_tests/build/fortran/crayftn/full-debug.mk b/applications/jedi_lfric_tests/build/fortran/crayftn/full-debug.mk new file mode 100644 index 000000000..b556c200a --- /dev/null +++ b/applications/jedi_lfric_tests/build/fortran/crayftn/full-debug.mk @@ -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 +# ========================================================================== diff --git a/applications/jedi_lfric_tests/build/fortran/crayftn/production.mk b/applications/jedi_lfric_tests/build/fortran/crayftn/production.mk new file mode 100644 index 000000000..f82e56866 --- /dev/null +++ b/applications/jedi_lfric_tests/build/fortran/crayftn/production.mk @@ -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 diff --git a/applications/jedi_lfric_tests/build/fortran/gfortran.mk b/applications/jedi_lfric_tests/build/fortran/gfortran.mk new file mode 100644 index 000000000..797618aeb --- /dev/null +++ b/applications/jedi_lfric_tests/build/fortran/gfortran.mk @@ -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 diff --git a/applications/jedi_lfric_tests/build/project.mk b/applications/jedi_lfric_tests/build/project.mk index d99171780..527597e32 100644 --- a/applications/jedi_lfric_tests/build/project.mk +++ b/applications/jedi_lfric_tests/build/project.mk @@ -4,7 +4,12 @@ # under which the code may be used. ############################################################################## -# This file is for any project specific build settings to be applied -# via the Makefile. +$(info UM physics project specials) -$(info JEDI-LFRic test miniapp) +export PRE_PROCESS_INCLUDE_DIRS = \ + $(WORKING_DIR)/atmosphere_service/include \ + $(WORKING_DIR)/boundary_layer/include \ + $(WORKING_DIR)/large_scale_precipitation/include \ + $(WORKING_DIR)/free_tracers/include + +export PRE_PROCESS_MACROS += UM_PHYSICS LFRIC USSPPREC_32B LSPREC_32B UM_JULES diff --git a/applications/jedi_lfric_tests/build/psyclone_transmute_file_list.mk b/applications/jedi_lfric_tests/build/psyclone_transmute_file_list.mk new file mode 100644 index 000000000..f69100102 --- /dev/null +++ b/applications/jedi_lfric_tests/build/psyclone_transmute_file_list.mk @@ -0,0 +1,42 @@ +############################################################################## +# (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. +############################################################################## + +# File lists provided will use the transmute PSyclone method. +# https://code.metoffice.gov.uk/trac/lfric_apps/ticket/724 + + +##### TRANSMUTE_INCLUDE_METHOD specify_include ##### +# For CPU OMP, we want to choose which files get run through PSyclone, +# and preserve existing hand coded optimisations. + +# Choose which files to Pre-proccess and PSyclone from physics_schemes / other +# physics source (e.g. UKCA) + +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. +# All files in these directories will be run through PSyclone using the +# transmute method. +# Also provide an optional exception list. +# These files will be filtered, and will NOT be run through PSyclone. + +# Directories to psyclone +export PSYCLONE_DIRECTORIES = + +# A general file exception list +export PSYCLONE_PHYSICS_EXCEPTION = + +##### TRANSMUTE_INCLUDE_METHOD specify_exclude ##### diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 deleted file mode 100644 index 278a94ff0..000000000 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ /dev/null @@ -1,231 +0,0 @@ -!----------------------------------------------------------------------------- -! (C) Crown copyright 2023 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 da dev algorithm -!! integration tests. -!>@details Sets up and runs the integration tests specified in -!! algorithms_test.py. Currently only -!! jedi_lfric_increment_alg_mod.x90 is tested, this algorithm -!! takes a real field and adds one to its value. -program algorithm_test - - use add_mesh_map_mod, only: assign_mesh_maps - 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, & - test_algorithm_initialise, & - test_jedi_lfric_increment_alg - use driver_collections_mod, only: init_collections, final_collections - use driver_mesh_mod, only: init_mesh - use extrusion_mod, only: extrusion_type, & - uniform_extrusion_type, & - PRIME_EXTRUSION, TWOD - 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: log_event, & - initialise_logging, & - finalise_logging, & - LOG_LEVEL_ERROR, & - LOG_LEVEL_INFO - - use base_mesh_config_mod, only: GEOMETRY_SPHERICAL, & - GEOMETRY_PLANAR - - implicit none - - ! MPI communicator - type(lfric_comm_type) :: comm - - ! Number of processes and local rank - integer(i_def) :: total_ranks, local_rank - - character(:), allocatable :: filename - - type(config_type), save :: config - - ! 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_jedi_lfric_increment_alg_mod = .false. - - class(extrusion_type), allocatable :: extrusion - type(uniform_extrusion_type), allocatable :: extrusion_2d - - character(str_def) :: prime_mesh_name - - logical(l_def) :: apply_partition_check - - integer(i_def) :: geometry - integer(i_def) :: stencil_depth(1) - integer(i_def) :: method - integer(i_def) :: number_of_layers - real(r_def) :: domain_bottom - real(r_def) :: domain_height - real(r_def) :: scaled_radius - - integer(i_def) :: i - integer(i_def), parameter :: one_layer = 1_i_def - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! Setup for all tests - ! Usage message to print - character(len=256) :: usage_message - - character(str_def) :: base_mesh_names(1) - character(str_def), allocatable :: twod_names(:) - real(r_def), parameter :: tolerance = 1.0e-3_r_def - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! Communicators and Logging Setup - ! Initialise MPI communicatios and get a valid communicator - call create_comm(comm) - - ! Save the communicator for later use - call global_mpi%initialise(comm) - - ! Initialise halo functionality - call initialise_halo_comms(comm) - - total_ranks = global_mpi%get_comm_size() - local_rank = global_mpi%get_comm_rank() - - call initialise_logging( comm%get_comm_mpi_val(), 'jedi_lfric_test_alg' ) - - call log_event( 'da dev alg testing running ...', LOG_LEVEL_INFO ) - - ! 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 { " // & - " jedi_lfric_increment_alg_mod, " // & - " } " - 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_jedi_lfric_increment_alg_mod") - do_test_jedi_lfric_increment_alg_mod = .true. - case default - call log_event( "Unknown test", LOG_LEVEL_ERROR ) - end select - - ! Setup configuration, mesh, and fem - call config%initialise( program_name ) - call read_configuration( filename, config=config ) - call init_collections() - - !-------------------------------------- - ! 0.0 Extract namelist variables - !-------------------------------------- - 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 - !-------------------------------------- - base_mesh_names(1) = prime_mesh_name - allocate( twod_names, source=base_mesh_names ) - - !-------------------------------------- - ! 1.1 Create the required extrusions - !-------------------------------------- - select case (geometry) - case (geometry_planar) - domain_bottom = 0.0_r_def - case (geometry_spherical) - domain_bottom = scaled_radius - case default - call log_event("Invalid geometry for mesh initialisation", LOG_LEVEL_ERROR) - end select - allocate( extrusion, source=create_extrusion( method, & - domain_height, & - domain_bottom, & - number_of_layers, & - PRIME_EXTRUSION ) ) - - extrusion_2d = uniform_extrusion_type( domain_height, & - domain_bottom, & - one_layer, TWOD ) - - !------------------------------------------------------------------------- - ! 1.2 Create the required meshes - !------------------------------------------------------------------------- - stencil_depth = 1 - apply_partition_check = .false. - call init_mesh( config, local_rank, total_ranks, & - base_mesh_names, extrusion, stencil_depth, & - apply_partition_check ) - - do i=1, size(twod_names) - twod_names(i) = trim(twod_names(i))//'_2d' - end do - call create_mesh( base_mesh_names, extrusion_2d, & - alt_name=twod_names ) - call assign_mesh_maps(twod_names) - - - !------------------------------------------------------------------------- - ! Tests - !------------------------------------------------------------------------- - call test_algorithm_initialise(prime_mesh_name) ! fem - - if ( do_test_jedi_lfric_increment_alg_mod ) then - call test_jedi_lfric_increment_alg(tolerance) - endif - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! Finalise and close down - - call test_algorithm_finalise() - - if (allocated(program_name)) deallocate(program_name) - if (allocated(filename)) deallocate(filename) - if (allocated(test_flag)) deallocate(test_flag) - - call log_event( 'da dev alg functional testing completed ...', LOG_LEVEL_INFO ) - - ! (note that the order of the calls of the following finalisers matters) - - call final_collections() - call final_configuration() - - call finalise_halo_comms() - call global_mpi%finalise() - call destroy_comm() - - call finalise_logging() - -end program algorithm_test diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.py b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.py deleted file mode 100755 index 6b324ad6d..000000000 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -############################################################################## -# (C) Crown copyright 2023 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 jedi_lfric integration tests -''' - -import os -import re -import sys - -from testframework import LFRicLoggingTest, TestEngine, TestFailed - - -class JediLfricTest(LFRicLoggingTest): - ''' - Run the jedi_lfric integration tests - ''' - - def __init__(self, flag: str) -> None: - self._flag = flag - if 'MPIEXEC_BROKEN' in os.environ: - JediLfricTest.set_mpiexec_broken() - super().__init__([sys.argv[1], - 'resources/algorithm_test_configuration.nml', - 'test_' + self._flag], - processes=1, - name='JediLfricTest.Log') - - def test(self, return_code: int, out: str, err: str) -> str: - ''' - 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 'da dev test : '+self._flag - - @staticmethod - def test_passed(out: str) -> bool: - ''' - Examine the output to see if the validity test passed - ''' - success = False - pattern = re.compile(r'test\s*PASS\s*$') - for line in out.split("\n"): - match = pattern.search(line) - if match: - success = True - return success - - -class jedi_lfric_increment_alg(JediLfricTest): - ''' - Test running the jedi_lfric_increment_alg_mod.x90 algorithm - ''' - - def __init__(self): - flag = "jedi_lfric_increment_alg_mod" - super().__init__(flag) - - -if __name__ == '__main__': - TestEngine.run(jedi_lfric_increment_alg()) diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml b/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml deleted file mode 100644 index 87fc3b7fd..000000000 --- a/applications/jedi_lfric_tests/integration-test/algorithm/resources/algorithm_test_configuration.nml +++ /dev/null @@ -1,37 +0,0 @@ -&base_mesh -f_lat_deg=45.0, -file_prefix='resources/mesh_C12', -fplane=.false., -geometry='spherical', -prepartitioned=.false., -prime_mesh_name='dynamics', -topology='fully_periodic', -/ - -&extrusion -planet_radius=6371229.0, -domain_height=1000.0, -method='uniform', -number_of_layers=70, -stretching_method='linear', -/ - -&finite_element -cellshape='quadrilateral', -element_order_h=0, -element_order_v=0, -rehabilitate=.true., -coord_order=1 -coord_order_nonprime=1, -coord_space='Wchi', -coord_system='native' -/ - -&partitioning - partitioner='cubedsphere', - panel_decomposition = 'auto', -/ - -&planet - scaling_factor=125.0, -/ diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/resources/mesh_C12.nc b/applications/jedi_lfric_tests/integration-test/algorithm/resources/mesh_C12.nc deleted file mode 100644 index 6637522a3..000000000 Binary files a/applications/jedi_lfric_tests/integration-test/algorithm/resources/mesh_C12.nc and /dev/null differ diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/test_algorithm_mod.x90 b/applications/jedi_lfric_tests/integration-test/algorithm/test_algorithm_mod.x90 deleted file mode 100644 index dac52dea5..000000000 --- a/applications/jedi_lfric_tests/integration-test/algorithm/test_algorithm_mod.x90 +++ /dev/null @@ -1,104 +0,0 @@ -!----------------------------------------------------------------------------- -! (c) Crown copyright 2023 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 Drives the execution of the da dev algorithms tests -module test_algorithm_mod - - use constants_mod, only : i_def, r_def, str_def - use driver_fem_mod, only : init_fem, final_fem - use field_mod, only : field_type, field_proxy_type - use fs_continuity_mod, only : Wtheta - use function_space_collection_mod, only : function_space_collection - use function_space_mod, only : function_space_type - use inventory_by_mesh_mod, only : inventory_by_mesh_type - use log_mod, only : log_event, & - LOG_LEVEL_INFO - use mesh_mod, only : mesh_type - use mesh_collection_mod, only : mesh_collection - - implicit none - - private - public test_algorithm_initialise, & - test_algorithm_finalise, & - test_jedi_lfric_increment_alg - - character(len=128) :: output - - ! Coordinate field - type(inventory_by_mesh_type) :: chi_inventory - type(inventory_by_mesh_type) :: panel_id_inventory - type(function_space_type), pointer :: wtheta_fs => null() - integer(i_def), parameter :: element_order_h = 0 - integer(i_def), parameter :: element_order_v = 0 - -contains - - !> @brief Initialise module. - !> @details Initialises the fem & function space wtheta_fs - !> @param[in] mesh Mesh to be used - subroutine test_algorithm_initialise( mesh_name ) - - implicit none - - character(str_def), intent(in) :: mesh_name - type(mesh_type), pointer :: mesh => null() - - call init_fem( mesh_collection, chi_inventory, panel_id_inventory ) - mesh => mesh_collection%get_mesh(mesh_name) - wtheta_fs => function_space_collection%get_fs( mesh, & - element_order_h, & - element_order_v, & - Wtheta ) - - end subroutine test_algorithm_initialise - - !> @brief Finalises the fem & function space - subroutine test_algorithm_finalise() - - implicit none - - call final_fem() - nullify(wtheta_fs) - - end subroutine test_algorithm_finalise - - !> @brief Tests jedi_lfric_increment_alg - !> @param[in] tolerance Tolerance - subroutine test_jedi_lfric_increment_alg( tolerance ) - - use jedi_lfric_increment_alg_mod, only : jedi_lfric_increment_alg - - implicit none - - real(r_def), intent(in) :: tolerance - - type(field_type), target :: test_field - type(field_proxy_type) :: field_proxy - - ! Initialise test field and get proxy - call test_field%initialise( wtheta_fs, name='test_field' ) - field_proxy = test_field%get_proxy() - ! Set first dof to nominal value - call invoke( setval_c(test_field, 1.0_r_def) ) - - call jedi_lfric_increment_alg(test_field) - - write ( output, '("Returned Field Values =", ES15.8)' ) field_proxy%data(1) - - ! Test if value is correct - if ( all( abs(field_proxy%data(:) - 2.0_r_def) <= tolerance ) ) then - call log_event( 'test PASS', LOG_LEVEL_INFO ) - call log_event( output, LOG_LEVEL_INFO ) - else - call log_event( 'test FAIL', LOG_LEVEL_INFO ) - call log_event( 'Expected Field Values = 2.00000000E+00', LOG_LEVEL_INFO ) - call log_event( output, LOG_LEVEL_INFO ) - end if - - end subroutine test_jedi_lfric_increment_alg - -end module test_algorithm_mod \ No newline at end of file diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/HEAD/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/HEAD/rose-meta.conf index 06cec7ef7..489521ec5 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/HEAD/rose-meta.conf +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/HEAD/rose-meta.conf @@ -1,4 +1,81 @@ -import=jedi_common/HEAD +import=lfric-gungho/HEAD + +#============================================================================== +# Geometry for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_geometry] +compulsory=true +description=JEDI-LFRIC emulator geometry configuration +help=Configuration options for JEDI-LFRIC emulator geometry object. +ns=namelist/JEDI-LFRIC-setup/jedi_geometry +title=jedi_geometry + +[namelist:jedi_geometry=io_calender_start] +compulsory=true +description=The IO clock start date +help=Format: yyyy-mm-ddThh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_geometry=io_path_state_read] +compulsory=true +description=Path to the file to be read +help=This is the lfric_diag.nc file which stores a test trajectory (set of states) +!kind=default +sort-key= +type=character + +[namelist:jedi_geometry=io_path_state_write] +compulsory=true +description=Path to the file that will be written +help=This is the file that will be written to +!kind=default +sort-key= +type=character + +[namelist:jedi_geometry=io_time_step] +compulsory=true +description=The time step duration +help=Format: PdDThHmMsS where d=day, h=hours, m=minutes and s=seconds +!kind=default +sort-key= +type=character + +#============================================================================== +# Setup for the JEDI-LFRIC Emulator application +#============================================================================== +[namelist:jedi_lfric_settings] +compulsory=true +description=JEDI-LFRIC emulator application configuration +help=Configuration option for JEDI-LFRIC emulator. +ns=namelist/JEDI-LFRIC-setup +title=JEDI-LFRIC Setings + +[namelist:jedi_lfric_settings=forecast_length] +compulsory=true +description=The forecast duration +help=Format: PdDThHmMsS where d=day, h=hours, m=minutes and s=seconds +!kind=default +sort-key= +type=character + +#============================================================================== +# jedi_lfric_tests for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_lfric_tests] +compulsory=true +description= +ns=namelist/jedi_lfric_tests +title=jedi_lfric_tests + +[namelist:jedi_lfric_tests=test_field] +compulsory=true +description=Which field to apply the algorithm to +help=One of the jedi_lfric_tests fields should contain distinct data for test purposes +!kind=default +sort-key= +type=character #============================================================================== # Model for the JEDI-LFRIC Emulator @@ -16,3 +93,40 @@ help=Format PdDThHmMsS where d=day, h=hours, m=minutes and s=seconds !kind=default sort-key= type=character + +#============================================================================== +# State for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_state] +compulsory=true +description=JEDI-LFRIC emulator state configuration +help=Configuration options for JEDI-LFRIC emulator state object. +ns=namelist/JEDI-LFRIC-setup/jedi_state +title=jedi_state + +[namelist:jedi_state=state_time] +compulsory=true +description=The validity date of the state +help=Format: yyyy-mm-dd hh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_state=use_pseudo_model] +compulsory=true +description=A logical that defines how the state should be setup +help=A logical that when true sets the state up to be used + =with the pseudo model. This means NL model modeldb + =is not instantiated +!kind=default +sort-key= +type=logical + +[namelist:jedi_state=variables] +compulsory=true +description=List of variables to be instantiated +help=Add a comma separted list of variables to instantiate + =format: 'theta', 'rho', ... +length=: +sort-key= +type=character diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_model_mod.f90 index f6d9b608b..3ab72c285 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_model_mod.f90 @@ -102,19 +102,6 @@ subroutine model_step(self, state) class( jedi_model_type ), target, intent(inout) :: self type( jedi_state_type ), intent(inout) :: state - ! Local - logical :: clock_running - - ! check the clock - clock_running = state%modeldb%clock%tick() - ! If the clock has finished then it will just get the - ! data at the end of the file - this prevents that - if ( .not. clock_running ) then - write ( log_scratch_space, '(A)' ) & - "Model::model_step::The LFRic clock has stopped." - call log_event( log_scratch_space, LOG_LEVEL_ERROR ) - endif - ! step gungho call step_nl( state%modeldb ) diff --git a/applications/jedi_lfric_tests/source/jedi_forecast.f90 b/applications/jedi_lfric_tests/source/jedi_forecast.f90 index 267d3516d..bc801a3ac 100644 --- a/applications/jedi_lfric_tests/source/jedi_forecast.f90 +++ b/applications/jedi_lfric_tests/source/jedi_forecast.f90 @@ -35,6 +35,8 @@ program jedi_forecast use jedi_model_mod, only : jedi_model_type use jedi_post_processor_empty_mod, only : jedi_post_processor_empty_type + use nl_physics_config_mod, only: use_nl_physics + implicit none ! Emulator objects @@ -56,6 +58,9 @@ program jedi_forecast character(*), parameter :: program_name = "jedi_forecast" + ! Set use_nl_physics=true to avoid the hacked-out code + use_nl_physics = .true. + ! Infrastructure config call parse_command_line( filename ) diff --git a/applications/lfric_atm/source/lfric_atm.f90 b/applications/lfric_atm/source/lfric_atm.f90 index ec60fa9d7..9f829377f 100644 --- a/applications/lfric_atm/source/lfric_atm.f90 +++ b/applications/lfric_atm/source/lfric_atm.f90 @@ -31,6 +31,7 @@ program lfric_atm use timing_mod, only: init_timing, final_timing, & start_timing, stop_timing, & tik, LPROF + use nl_physics_config_mod, only: use_nl_physics implicit none @@ -44,6 +45,9 @@ program lfric_atm character(str_max_filename) :: timer_output_path logical(l_def) :: subroutine_timers + ! Set use_nl_physics=true to avoid the hacked-out code + use_nl_physics = .true. + call parse_command_line( filename ) modeldb%mpi => global_mpi diff --git a/rose-stem/app/check_global_variables/file/dirtylist.txt b/rose-stem/app/check_global_variables/file/dirtylist.txt index 7281913c9..121df53ed 100644 --- a/rose-stem/app/check_global_variables/file/dirtylist.txt +++ b/rose-stem/app/check_global_variables/file/dirtylist.txt @@ -160,4 +160,4 @@ science/physics_schemes/source/diffusion_and_filtering/leonard_incs_mod.F90 science/physics_schemes/source/diffusion_and_filtering/turb_diff_mod.F90 science/physics_schemes/source/gravity_wave_drag/gw_ussp_prec_mod.F90 science/physics_schemes/source/gravity_wave_drag/g_wave_input_mod.F90 - +science/gungho/source/driver/nl_physics_config_mod.F90 diff --git a/rose-stem/app/jedi_forecast/file/axis_def_plev.xml b/rose-stem/app/jedi_forecast/file/axis_def_plev.xml new file mode 100644 index 000000000..b1f446983 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/axis_def_plev.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_ancil_gal.xml b/rose-stem/app/jedi_forecast/file/file_def_ancil_gal.xml new file mode 100644 index 000000000..6bcb984da --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_ancil_gal.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_ancil_hadisst.xml b/rose-stem/app/jedi_forecast/file/file_def_ancil_hadisst.xml new file mode 100644 index 000000000..043e2911f --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_ancil_hadisst.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_ancil_main.xml b/rose-stem/app/jedi_forecast/file/file_def_ancil_main.xml new file mode 100644 index 000000000..b48fa864a --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_ancil_main.xml @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_ancil_surf.xml b/rose-stem/app/jedi_forecast/file/file_def_ancil_surf.xml new file mode 100644 index 000000000..7553e3709 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_ancil_surf.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_check_restart.xml b/rose-stem/app/jedi_forecast/file/file_def_check_restart.xml new file mode 100644 index 000000000..05ba6dcbc --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_check_restart.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_diags_gal_nwp.xml b/rose-stem/app/jedi_forecast/file/file_def_diags_gal_nwp.xml new file mode 100644 index 000000000..6b88af04e --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_diags_gal_nwp.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_diags_idealised.xml b/rose-stem/app/jedi_forecast/file/file_def_diags_idealised.xml new file mode 100644 index 000000000..76e92d218 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_diags_idealised.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_diags_name.xml b/rose-stem/app/jedi_forecast/file/file_def_diags_name.xml new file mode 100644 index 000000000..fbe16d0e1 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_diags_name.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_diags_var_ops.xml b/rose-stem/app/jedi_forecast/file/file_def_diags_var_ops.xml new file mode 100644 index 000000000..4d49c665b --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_diags_var_ops.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_diags_ver.xml b/rose-stem/app/jedi_forecast/file/file_def_diags_ver.xml new file mode 100644 index 000000000..5e28ad32e --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_diags_ver.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_iau.xml b/rose-stem/app/jedi_forecast/file/file_def_iau.xml new file mode 100644 index 000000000..92f2e15f1 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_iau.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/file_def_initial_diags.xml b/rose-stem/app/jedi_forecast/file/file_def_initial_diags.xml new file mode 100644 index 000000000..c1bca4231 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/file_def_initial_diags.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/rose-stem/app/jedi_forecast/file/iodef_gal_nwp.xml b/rose-stem/app/jedi_forecast/file/iodef_gal_nwp.xml new file mode 100644 index 000000000..1f3b8c677 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/iodef_gal_nwp.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + performance + 1.0 + + + + true + 50 + true + + + + + diff --git a/rose-stem/app/jedi_forecast/file/iodef_gal_nwp_cycling.xml b/rose-stem/app/jedi_forecast/file/iodef_gal_nwp_cycling.xml new file mode 100644 index 000000000..2449235a0 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/iodef_gal_nwp_cycling.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + performance + 1.0 + + + + true + 50 + true + + + + + diff --git a/rose-stem/app/jedi_forecast/file/iodef_test.xml b/rose-stem/app/jedi_forecast/file/iodef_test.xml new file mode 100644 index 000000000..39a1cd009 --- /dev/null +++ b/rose-stem/app/jedi_forecast/file/iodef_test.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + performance + 1.0 + + + + true + 50 + true + + + + + diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-C12.conf b/rose-stem/app/jedi_forecast/opt/rose-app-C12.conf index 1ffc83787..d44221c5e 100644 --- a/rose-stem/app/jedi_forecast/opt/rose-app-C12.conf +++ b/rose-stem/app/jedi_forecast/opt/rose-app-C12.conf @@ -3,4 +3,17 @@ mode=auto source=$MESH_DIR/mesh_C12.nc [namelist:base_mesh] +!!f_lat_deg= file_prefix='mesh_C12' +!!fplane= + +[namelist:formulation] +l_multigrid=.false. + +[namelist:helmholtz_solver] +fail_on_non_converged=.true. +method='bicgstab' +monitor_convergence=.true. +preconditioner='tridiagonal' + +[!!namelist:multigrid] diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-C48_MG.conf b/rose-stem/app/jedi_forecast/opt/rose-app-C48_MG.conf new file mode 100644 index 000000000..19a7bfee9 --- /dev/null +++ b/rose-stem/app/jedi_forecast/opt/rose-app-C48_MG.conf @@ -0,0 +1,8 @@ +[file:mesh_C48_MG.nc] +mode=auto +source=$MESH_DIR/mesh_C48_MG.nc + +[namelist:base_mesh] +!!f_lat_deg= +file_prefix='mesh_C48_MG' +!!fplane= diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-JEDI_C48.conf b/rose-stem/app/jedi_forecast/opt/rose-app-JEDI_C48.conf new file mode 100644 index 000000000..e43344f87 --- /dev/null +++ b/rose-stem/app/jedi_forecast/opt/rose-app-JEDI_C48.conf @@ -0,0 +1,2 @@ +[namelist:jedi_geometry] +io_path_state_read='/home/users/darth/srv/mobb-data/lfric-jedi/lfric-diag/lfric_bg_mi-be607_C48_20210602_la354' diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-da.conf b/rose-stem/app/jedi_forecast/opt/rose-app-da.conf new file mode 100644 index 000000000..677c6f10e --- /dev/null +++ b/rose-stem/app/jedi_forecast/opt/rose-app-da.conf @@ -0,0 +1,34 @@ +[file:iodef.xml] +source=$ROSE_SUITE_DIR/app/jedi_forecast/file/iodef_gal_nwp_cycling.xml + +[namelist:files] +iau_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/20210324T0600Z_um2lfric_iau_000001' +sea_ice_ancil_path='$BIG_DATA_DIR/start_dumps/basic-gal/yak/glu_ice' +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' + +[namelist:iau] +iau_ainc_multifile=.false. +iau_mode='instantaneous' +iau_pc2=.true. +iau_tendency_ainc=.false. +iau_use_addinf=.false. +iau_use_bcorr=.false. +iau_use_level_one_temp=.false. +iau_wet_density=.true. + +[namelist:initialization] +init_option='checkpoint_dump' +!!model_eos_height=100 +sea_ice_source='surf' +snow_source='surf' +sst_source='surf' + +[namelist:section_choice] +iau=.true. + +[namelist:time] +calendar_origin='2021-03-24 06:00:00' +calendar_start='2021-03-24 03:00:00' 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 deleted file mode 100644 index c25ab8db7..000000000 --- a/rose-stem/app/jedi_forecast/opt/rose-app-gh-si-for-linear.conf +++ /dev/null @@ -1,82 +0,0 @@ -[!!namelist:damping_layer] - -[namelist:extrusion] -domain_height=10000.0 -method='uniform' -!!stretching_height=17500.0 -stretching_method='linear' - -[namelist:formulation] -dlayer_on=.false. -dry_static_adjust=.false. -exner_from_eos=.true. -lagged_orog=.false. -moisture_formulation='dry' -!!theta_moist_source=.false. -use_physics=.false. - -[namelist:helmholtz_solver] -fail_on_non_converged=.true. -gcrk=18 -method='bicgstab' -monitor_convergence=.true. -si_pressure_a_tol=1.0e-6 -si_pressure_maximum_iterations=800 - -[namelist:initial_pressure] -method='sampled' - -[namelist:initial_temperature] -pert_centre=120.0 - -[namelist:linear] -fixed_ls=.false. -transport_efficiency=.false. - -[namelist:mixed_solver] -gcrk=6 -mixed_solver_a_tol=1.0e-6 -reference_reset_time=90. -si_tolerance=1.0e-3 - -[namelist:physics] -!!limit_drag_incs=.false. -!!sample_physics_scalars=.true. -!!sample_physics_winds=.true. -!!sample_physics_winds_correction=.false. - -[namelist:planet] -scaling_factor=125.0 - -[namelist:section_choice] -!!aerosol='none' -!!boundary_layer='none' -!!chemistry='none' -!!cloud='none' -!!methane_oxidation=.false. -!!orographic_drag='none' -!!radiation='none' -!!spectral_gwd='none' -!!stochastic_physics='none' -!!surface='none' - -[namelist:solver] -maximum_iterations=13 - -[namelist:time] -timestep_end='3' -timestep_start='1' - -[namelist:timestepping] -alpha=0.5 -tau_t=0.5 -tau_u=0.5 - -[namelist:transport] -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=5*.false. -runge_kutta_method='ssp5' diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-test_diags.conf b/rose-stem/app/jedi_forecast/opt/rose-app-test_diags.conf new file mode 100644 index 000000000..cd1c163e7 --- /dev/null +++ b/rose-stem/app/jedi_forecast/opt/rose-app-test_diags.conf @@ -0,0 +1,2 @@ +[file:iodef.xml] +source=$ROSE_SUITE_DIR/app/jedi_forecast/file/iodef_test.xml diff --git a/rose-stem/app/jedi_forecast/opt/rose-app-um_dump.conf b/rose-stem/app/jedi_forecast/opt/rose-app-um_dump.conf new file mode 100644 index 000000000..fb7cc9d98 --- /dev/null +++ b/rose-stem/app/jedi_forecast/opt/rose-app-um_dump.conf @@ -0,0 +1,2 @@ +[namelist:initialization] +zero_w2v_wind=.true. diff --git a/rose-stem/app/jedi_forecast/rose-app.conf b/rose-stem/app/jedi_forecast/rose-app.conf index bccb37550..5fa0f8285 100644 --- a/rose-stem/app/jedi_forecast/rose-app.conf +++ b/rose-stem/app/jedi_forecast/rose-app.conf @@ -1,7 +1,7 @@ meta=jedi_forecast/vn3.1_t443 [command] -default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ +default=$CORE_ROOT_DIR/bin/tweak_iodef; \ =$LAUNCH_SCRIPT/launch-exe [env] @@ -17,20 +17,24 @@ mode=mkdir [file:configuration.nml] mode=auto -source=namelist:adjoint - =namelist:jedi_lfric_tests +source=namelist:jedi_lfric_tests = namelist:jedi_geometry = namelist:jedi_state = 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 +45,7 @@ source=namelist:adjoint = (namelist:iau_addinf_io(:)) = (namelist:iau_ainc_io(:)) = (namelist:iau_bcorr_io(:)) + = (namelist:iau) = (namelist:idealised) = (namelist:ideal_surface) = namelist:initialization @@ -62,79 +67,94 @@ source=namelist:adjoint = (namelist:jules_surface_types) = (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 = namelist:timestepping = namelist:transport - = namelist:validity_test = (namelist:vapour_forcing) = (namelist:vertadvect) = (namelist:wind_forcing) -[namelist:adjoint] -l_compute_annexed_dofs=.true. - -[!!namelist:aerosol] -!!aclw_file='' -!!acsw_file='' -!!activation_scheme='off' -!!anlw_file='' -!!answ_file='' -!!crlw_file='' -!!crsw_file='' +[file:iodef.xml] +mode=auto +source=$ROSE_SUITE_DIR/app/jedi_forecast/file/iodef_gal_nwp.xml + +[file:lut] +mode=symlink+ +source=$BIG_DATA_DIR/um_aux/UKCA/radaer/ga7_1 + +[file:precalc] +mode=symlink+ +source=$BIG_DATA_DIR/um_aux/spectral/ga7_1 + +[file:spec] +mode=symlink+ +source=$SOURCE_ROOT/socrates/data/spectra/ga9 + +[namelist:aerosol] +aclw_file='lut/nml_ac_lw' +acsw_file='lut/nml_ac_sw' +activation_scheme='jones' +anlw_file='lut/nml_an_lw' +answ_file='lut/nml_an_sw' +crlw_file='lut/nml_cr_lw' +crsw_file='lut/nml_cr_sw' easyaerosol_cdnc=.false. easyaerosol_lw=.false. easyaerosol_sw=.false. !!emissions='GC5' -glomap_mode='off' -!!horiz_d=2.25 -!!l_radaer=.false. +glomap_mode='dust_and_clim' +horiz_d=2.25 +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. -!!sulphuric_strat_column=1.86604e-6 +n_radaer_step=1 +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 +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. prime_mesh_name='dynamics' topology='fully_periodic' -[!!namelist:blayer] +[namelist:blayer] a_ent_2=0.056 a_ent_shr=1.6 bl_levels=50 @@ -190,7 +210,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. @@ -210,64 +230,64 @@ 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 +[namelist:cloud] +cff_spread_rate=1.0e-5 cld_fsd_hill=.true. cloud_call_b4_conv=.false. !!cloud_horizontal_ice_fsd=0.0 !!cloud_horizontal_liq_fsd=0.75 cloud_pc2_tol=0.005 cloud_pc2_tol_2=0.001 -!!dbsdtbs_turb_0=1.5E-4 +dbsdtbs_turb_0=1.5E-4 !!ent_coef_bm=0.2 -!!ez_max=400.0 +ez_max=400.0 falliceshear_method='real' filter_optical_depth=.true. -!!fsd_conv_const=2.81 -!!fsd_min_conv_frac=0.0 -!!fsd_nonconv_ice_const=1.14 -!!fsd_nonconv_liq_const=1.14 -!!i_bm_ez_opt='subcrit' -!!i_pc2_erosion_numerics='implicit' -!!ice_width=0.02 -!!l_bm_sigma_s_grad=.false. -!!l_bm_tweaks=.false. -!!max_sigmas=3.0 -!!min_sigx_ft=0.0 +fsd_conv_const=3.5 +fsd_min_conv_frac=0.0 +fsd_nonconv_ice_const=0.75 +fsd_nonconv_liq_const=1.0 +i_bm_ez_opt='subcrit' +i_pc2_erosion_numerics='implicit' +ice_width=0.02 +l_bm_sigma_s_grad=.false. +l_bm_tweaks=.false. +max_sigmas=3.0 +min_sigx_ft=0.0 !!mphys_erosion=.false. -!!opt_depth_thresh=0.01 +opt_depth_thresh=0.01 pc2_init_logic='original' pc2ini='bimodal' rh_crit=0.920,0.918,0.916,0.912,0.908,0.903,64*0.9 rh_crit_opt='tke' scheme='pc2' subgrid_qv=.true. -!!turb_var_fac_bm=1.0 -two_d_fsd_factor=1.65 +turb_var_fac_bm=1.0 +two_d_fsd_factor=1.6 use_fsd_eff_res=.true. [namelist:convection] -!!cape_timescale=1800.0 -!!cv_scheme='gregory_rowntree' +cape_timescale=1800.0 +cv_scheme='gregory_rowntree' dx_ref=50000.0 -!!efrac=1.0 +efrac=1.0 l_cvdiag_ctop_qmax=.false. llcs_first_outer=.false. -!!number_of_convection_substeps=2 -!!orig_mdet_fac=1.0 +number_of_convection_substeps=2 +orig_mdet_fac=1.5 !!par_gen_mass_fac=0.25 !!par_gen_rhpert=0.05 !!par_radius_ppn_max=3.5e-4 -!!prog_ent_min=0.5 +prog_ent_min=0.3 qlmin=4.0e-4 resdep_precipramp=.false. @@ -279,7 +299,7 @@ l_cosp=.false. [namelist:damping_layer] dl_base=40000.0 dl_str=0.05 -dl_type='latitude' +dl_type='standard' [namelist:departure_points] horizontal_limit='cap' @@ -321,14 +341,14 @@ stretching_height=17507.0 stretching_method='smooth' [namelist:files] -!!aerosols_ancil_path='' +aerosols_ancil_path='aerosol_clims/glomap/qrclim.aerosols70.fixed' !!albedo_nir_ancil_path='' !!albedo_vis_ancil_path='' -ancil_directory='' -checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartGungho_$ROSE_TASK_NAME' +ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${RESOLUTION}' +checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartLfricAtm_$ROSE_TASK_NAME' !!cloud_drop_no_conc_ancil_path='' -!!coarse_ancil_directory='' -!!diag_stem_name='' +!!coarse_ancil_directory='$BIG_DATA_DIR/ancils/basic-gal/yak/${RESOLUTION}' +diag_stem_name='diagLfricAtm' !!dms_conc_ocean_ancil_path='' !!ea_ancil_directory='' !!easy_absorption_lw_ancil_path='' @@ -368,7 +388,7 @@ checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartGungho_$ROSE_TASK_NAME' !!gas_mmr_ancil_path='' !!h2o2_limit_ancil_path='' !!ho2_ancil_path='' -!!hydtop_ancil_path='' +hydtop_ancil_path='hydrol_lsh/hydrosheds/qrparm.hydtop' !!iau_addinf_path='' !!iau_bcorr_path='' !!iau_path='' @@ -376,7 +396,7 @@ checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartGungho_$ROSE_TASK_NAME' !!iau_sst_path='' !!iau_surf_path='' !!internal_flux_ancil_path='' -!!land_area_ancil_path='' +land_area_ancil_path='land_sea_mask/etop01/qrparm.landfrac' !!lbc_directory='' !!lbc_filename='' !!ls_directory='' @@ -384,20 +404,20 @@ checkpoint_stem_name='$CYLC_SUITE_SHARE_DIR/data/restartGungho_$ROSE_TASK_NAME' !!no3_ancil_path='' !!o3_ancil_path='' !!oh_ancil_path='' -!!orography_mean_ancil_path='' -!!orography_subgrid_ancil_path='' -!!ozone_ancil_path='' -!!plant_func_ancil_path='' -!!sea_ancil_path='' -!!sea_ice_ancil_path='' +orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog' +orography_subgrid_ancil_path='orography/gmted_ramp2/qrparm.orog' +ozone_ancil_path='ozone/sparc/1994-2005/qrclim.ozone_L70_O70' +plant_func_ancil_path='vegetation/func_type_modis/qrparm.veg.func.fixed' +sea_ancil_path='general_sea/GlobColour/qrclim.sea' +sea_ice_ancil_path='sstice/hadisst_6190/qrclim.sstice_ice' !!snow_analysis_ancil_path='' -!!soil_ancil_path='' -!!soil_dust_ancil_path='' -!!soil_rough_ancil_path='' -!!sst_ancil_path='' -start_dump_directory='' -start_dump_filename='' -!!surface_frac_ancil_path='' +soil_ancil_path='soil_parameters/hwsd_vg/qrparm.soil.fixed' +soil_dust_ancil_path='soil_dust/hwsd/qrparm.soil.dust.one_mrel' +soil_rough_ancil_path='soil_roughness/prigent12/qrparm.soil_roughness' +sst_ancil_path='sstice/hadisst_6190/qrclim.sstice_sst' +start_dump_directory='$BIG_DATA_DIR/start_dumps/nwp-gal9/apps1.1' +start_dump_filename='nwp-gal9_N320L70_${RESOLUTION}L70' +surface_frac_ancil_path='vegetation/fractions_cci/qrparm.veg.frac.fixed' !!urban_ancil_path='' [namelist:finite_element] @@ -416,10 +436,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=.true. +horizontal_transport_predictor=.true. init_exner_bt=.true. -l_multigrid=.false. +l_multigrid=.true. lagged_orog=.true. moisture_formulation='traditional' moisture_in_solver=.true. @@ -427,7 +447,7 @@ p2theta_vert=.true. rotating=.true. shallow=.true. si_momentum_equation=.false. -theta_moist_source=.false. +theta_moist_source=.true. use_multires_coupling=.false. use_physics=.true. use_wavedynamics=.true. @@ -449,7 +469,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 @@ -457,14 +477,12 @@ si_pressure_tolerance=1.0e-4 [namelist:iau] !!iau_ainc_multifile=.false. !!iau_mode='instantaneous' -iau_path='' !!iau_pc2=.false. -iau_surf_path='' !!iau_tendency_addinf=.true. !!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. @@ -516,15 +534,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 @@ -536,22 +554,22 @@ surface_pressure=1000.0e2 [namelist:initial_temperature] bvf_square=0.0001 -pert_centre=-60.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 @@ -561,49 +579,49 @@ 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 [namelist:initialization] -ancil_option='none' +ancil_option='fixed' 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='none' -!!model_eos_height=100 +model_eos_height=100 n_orog_smooth=0 read_w2h_wind=.false. sea_ice_source='ancillary' snow_source='start_dump' -!!sst_source='ancillary' +sst_source='ancillary' w0_orography_mapping=.false. zero_w2v_wind=.false. [namelist:io] -checkpoint_read=.false. -!!checkpoint_times= -checkpoint_write=.false. +checkpoint_read=$RESTART_READ +checkpoint_times= +checkpoint_write=$RESTART_WRITE counter_output_suffix='counter.txt' diag_active_files='lfric_diag' diag_always_on_sampling=.false. -!!diagnostic_frequency=3 -!!end_of_run_checkpoint=.true. +diagnostic_frequency=1 +end_of_run_checkpoint=.true. file_convention='UGRID' multifile_io=.false. -!!nodal_output_on_w3=.true. +!!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. +write_minmax_tseries=.false. [namelist:jedi_geometry] io_calender_start='2018-04-14T21:00:00' @@ -614,7 +632,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] @@ -623,24 +640,19 @@ test_field='theta' [namelist:jedi_model] time_step='P0DT1H0M0S' -[namelist:jedi_pseudo_model] -initial_time='2018-04-14T21:00:00' -number_of_steps=9 -time_step='P0DT1H0M0S' - [namelist:jedi_state] state_time='2018-04-14 21:00:00' use_pseudo_model=.false. variables='theta','rho','exner' -[!!namelist:jules_hydrology] +[namelist:jules_hydrology] l_hydrology=.true. -!!l_var_rainfrac=.true. +l_var_rainfrac=.true. -[!!namelist:jules_model_environment_lfric] +[namelist:jules_model_environment_lfric] l_jules_parent='lfric' -[!!namelist:jules_nvegparm] +[namelist:jules_nvegparm] albsnc_nvg_io=0.4,0.8,0.8,0.8 albsnf_nvg_io=0.18,0.12,-1.0,0.75 !!albsnf_nvgl_io=0.05,0.06,0.03,0.75 @@ -654,7 +666,7 @@ vf_nvg_io=1.0,1.0,0.0,0.0 z0_nvg_io=1.0,1.0e-4,1.0e-3,5.0e-4 z0hm_nvg_io=1.0e-7,2.5e-1,2.0e-1,2.0e-1 -[!!namelist:jules_pftparm] +[namelist:jules_pftparm] albsnc_max_io=2.5e-1,2.5e-1,6.0e-1,6.0e-1,4.0e-1 alnir_io=0.341,0.272,0.369,0.368,0.395 alpar_io=0.057,0.041,0.071,0.083,0.074 @@ -665,28 +677,28 @@ 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 -!!z0v_io=1.1,1.1,0.22,0.22,1.0 +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] +[namelist:jules_radiation] !!fixed_sea_albedo=0.06 i_sea_alb_method='jin' l_albedo_obs=.false. l_hapke_soil=.true. -!!l_niso_direct=.true. +l_niso_direct=.true. l_partition_albsoil=.true. -!!l_sea_alb_var_chl=.true. +l_sea_alb_var_chl=.true. l_spec_alb_bs=.false. -!!ratio_albsoil=2.0 -!!swdn_frac_albsoil=0.5 +ratio_albsoil=2.0 +swdn_frac_albsoil=0.5 -[!!namelist:jules_sea_seaice] +[namelist:jules_sea_seaice] alpham=0.72 amip_ice_thick=.false. beta_evap=1.0 buddy_sea='On' -!!cdn_hw_sea=0.002 -!!cdn_max_sea=0.003 +cdn_hw_sea=0.002 +cdn_max_sea=0.003 dtice=2.0 emis_sea=0.985 emis_sice=0.976 @@ -699,15 +711,15 @@ kappai_snow=0.256 l_10m_neut=.true. l_iceformdrag_lupkes=.true. l_sice_heatflux=.true. -!!l_stability_lupkes=.true. +l_stability_lupkes=.true. 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 +u_cdn_hw=55.0 +u_cdn_max=33.0 +!!z0h_specified=0.0 +!!z0m_specified=0.0 -[!!namelist:jules_snow] +[namelist:jules_snow] can_clump=8.0,4.0,1.0,1.0,1.0 cansnowpft=.true.,.true.,.false.,.false.,.false. i_basal_melting_opt='instant' @@ -717,21 +729,21 @@ n_lai_exposed=5*1.0 rho_snow_fresh=109.0 unload_rate_u=2.31e-6,2.31e-6,0.0,0.0,0.0 -[!!namelist:jules_soil] +[namelist:jules_soil] l_dpsids_dsdz=.true. l_soil_sat_down=.true. l_vg_soil=.false. -[!!namelist:jules_surface] +[namelist:jules_surface] all_tiles='off' !!anthrop_heat_mean=20.0 !!anthrop_heat_option='dukes' beta1=0.83 beta2=0.93 -!!beta_cnv_bl=0.04 +beta_cnv_bl=0.04 cor_mo_iter='improved' -!!fd_hill_option='capped_lowhill' -!!fd_stability_dep='none' +fd_hill_option='capped_lowhill' +fd_stability_dep='none' formdrag='dist_drag' fwe_c3=0.5 fwe_c4=20000.0 @@ -748,11 +760,11 @@ l_land_ice_imp=.true. l_mo_buoyancy_calc=.true. !!l_point_data=.false. l_urban2t=.false. -l_vary_z0m_soil=.false. -!!orog_drag_param=0.15 +l_vary_z0m_soil=.true. +orog_drag_param=0.15 srf_ex_cnv_gust=.true. -[!!namelist:jules_surface_types] +[namelist:jules_surface_types] brd_leaf=1 c3_grass=3 c4_grass=4 @@ -763,7 +775,7 @@ nnvg=4 npft=5 shrub=5 soil=8 -!!urban=6 +urban=6 !!urban_canyon=0 !!urban_roof=0 @@ -775,58 +787,40 @@ l_moruses_rough=.false. l_moruses_storage=.false. !!l_moruses_storage_thin=.false. -[!!namelist:jules_vegetation] +[namelist:jules_vegetation] can_rad_mod='six' l_limit_canhc=.true. l_spec_veg_z0=.true. -[namelist:linear] -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. run_log_level='info' -[!!namelist:microphysics] -!!a_ratio_exp=-0.2707 -!!a_ratio_fac=0.0517 -!!c_r_correl=0.9 +[namelist:microphysics] +a_ratio_exp=-0.2707 +a_ratio_fac=0.0517 +c_r_correl=0.9 !!casim_cdnc_opt='fixed' ci_input=14.3 cic_input=1024.0 droplet_tpr=.false. -!!fcrit=1.0 -!!graupel_scheme='none' +fcrit=1.0 +graupel_scheme='none' heavy_rain_evap_fac=0.0 !!i_update_precfrac='homog' -!!l_mcr_precfrac=.false. -!!l_proc_fluxes=.false. +l_mcr_precfrac=.false. +l_proc_fluxes=.false. microphysics_casim=.false. -!!mp_dz_scal=2.0 +mp_dz_scal=2.0 !!ndrop_surf=50.0e6 -!!nscalesf=1.0 -!!nsigmasf=2.82843 -!!orog_block=.true. -!!orog_rain=.true. -!!orog_rime=.true. -!!prog_tnuc=.false. -!!qcl_rime=1.0e-4 -!!shape_rime=.false. +nscalesf=1.0 +nsigmasf=2.82843 +orog_block=.true. +orog_rain=.true. +orog_rime=.true. +prog_tnuc=.true. +qcl_rime=1.0e-4 +shape_rime=.true. turb_gen_mixph=.true. !!z_surf=50.0 @@ -839,7 +833,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' @@ -849,15 +843,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 @@ -865,11 +859,19 @@ 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. - -[!!namelist:orbit] +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 !!arg_periapsis_inc=0.0 !!eccentricity=1.6710222E-02 @@ -890,19 +892,19 @@ observer_lon=0.0 !!semimajor_axis_inc=0.0 spin='earth_day' -[!!namelist:orographic_drag] +[namelist:orographic_drag] cd_flow_blocking=4.0 fr_crit_gwd=4.0 fr_sat_gwd=0.25 gwd_scaling=0.7 include_moisture='lowmoist' -mountain_height_scaling=2.6 +mountain_height_scaling=3.1 orographic_blocking_heating=.true. orographic_gwd_heating=.true. vertical_smoothing=.true. [namelist:orography] -orog_init_option='none' +orog_init_option='ancil' !!profile='none' [!!namelist:orography_agnesi_cartesian] @@ -962,7 +964,7 @@ 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 @@ -970,26 +972,26 @@ partitioner='cubedsphere' [namelist:physics] bl_segment=0 -!!blayer_placement='fast' +blayer_placement='fast' configure_segments=.true. conv_gr_segment=16 -!!convection_placement='fast' +convection_placement='fast' !!electric_placement='slow' !!evap_condense_placement='fast' gw_segment=0 limit_drag_incs=.false. -!!lowest_level='gradient' +lowest_level='gradient' ls_ppn_segment=0 lw_segment_limit=32 -!!microphysics_placement='slow' -!!orographic_drag_placement='slow' +microphysics_placement='slow' +orographic_drag_placement='slow' pmsl_halo_calcs=.true. -!!radiation_placement='slow' +radiation_placement='slow' sample_physics_scalars=.true. sample_physics_winds=.true. sample_physics_winds_correction=.false. !!smagorinsky_placement='end' -!!spectral_gwd_placement='slow' +spectral_gwd_placement='slow' !!stochastic_physics_placement='fast' sw_segment_limit=32 ussp_segment=0 @@ -1002,14 +1004,14 @@ p_zero=100000.0 rd=287.05 scaling_factor=1.0 -[!!namelist:radiation] +[namelist:radiation] !!cloud_entrapment='zero' -!!cloud_inhomogeneity='mcica' -!!cloud_overlap='exponential_random' +cloud_inhomogeneity='mcica' +cloud_overlap='exponential_random' cloud_representation='combined' -!!cloud_vertical_decorr=10000.0 +cloud_vertical_decorr=4500.0 !!constant_droplet_effective_radius=7.0E-6 -!!droplet_effective_radius='liu' +droplet_effective_radius='liu' i_cloud_ice_type_lw=11 !!i_cloud_ice_type_lwinc=11 i_cloud_ice_type_sw=11 @@ -1022,8 +1024,8 @@ l_inc_radstep=.false. l_planet_grey_surface=.false. l_rayleigh_sw=.true. l_trans_zen_correction=.true. -!!liu_aparam=0.077 -!!liu_bparam=-0.1365 +liu_aparam=0.077 +liu_bparam=-0.1365 mcica_data_file='spec/mcica_data' !!n_horiz_ang=16 !!n_horiz_layer=1 @@ -1031,12 +1033,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] @@ -1050,26 +1052,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 @@ -1141,8 +1143,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 @@ -1159,8 +1161,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 @@ -1169,7 +1171,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 @@ -1196,32 +1198,32 @@ tio_rad_opt='off' vo_rad_opt='off' [namelist:section_choice] -aerosol='none' -boundary_layer='none' +aerosol='um' +boundary_layer='um' chemistry='none' -cloud='none' -!!convection='none' +cloud='um' +convection='um' dynamics='gungho' -!!electric='none' +electric='none' external_forcing=.false. iau=.false. iau_sst=.false. iau_surf=.false. -methane_oxidation=.false. -!!microphysics='none' -orographic_drag='none' -radiation='none' -spectral_gwd='none' +methane_oxidation=.true. +microphysics='um' +orographic_drag='um' +radiation='socrates' +spectral_gwd='um' stochastic_physics='none' -surface='none' +surface='jules' [namelist:solver] -fail_on_non_converged=.false. +!!fail_on_non_converged=.false. gcrk=18 !!jacobi_relaxation=0.5 maximum_iterations=7 method='chebyshev' -monitor_convergence=.true. +monitor_convergence=.false. preconditioner='diagonal' tolerance=1.0e-6 @@ -1249,14 +1251,14 @@ tolerance=1.0e-6 !!time_units='seconds' !!time_units_sst='seconds' -[!!namelist:spectral_gwd] -add_cgw=.false. -!!cgw_scale_factor=1.0 +[namelist:spectral_gwd] +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] +[namelist:star] stellar_constant=1361.0 stellar_radius=6.957e8 @@ -1306,9 +1308,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= @@ -1353,13 +1355,13 @@ 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. use_spt=.false. -[!!namelist:surface] +[namelist:surface] !!check_soilm_negatives=.true. emis_method_sea='fixed' emis_method_soil='fixed' @@ -1384,8 +1386,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-03-24 00:00:00' +calendar_start='2021-03-24 00:00:00' calendar_type='gregorian' timestep_end='$RESTART_STOP' timestep_start='$RESTART_START' @@ -1398,16 +1400,16 @@ method='semi_implicit' outer_iterations=2 runge_kutta_method='forward_euler' spinup_alpha=.false. -!!spinup_period=0 +!!spinup_period=0.0 tau_r=1.0 tau_t=1.0 tau_u=0.55 [namelist:transport] -adjust_theta=.false. -!!adjust_theta_above=30000.0 +adjust_theta=.true. +adjust_theta_above=30000.0 adjust_tracer_equation=.false. -adjust_vhv_wind=.false. +adjust_vhv_wind=.true. ageofair_reset_level=10 broken_w2_projection=.false. calculate_detj='upwind' @@ -1417,54 +1419,50 @@ cfl_mol_2d_stab=1.0 cfl_mol_3d_stab=1.0 cheap_update=.false. consistent_metric=.false. -dep_pt_stencil_extent=3 +dep_pt_stencil_extent=7 dry_field_name='density' -enforce_min_value=5*.false. -equation_form=1,2,2,2,2 +enforce_min_value=.false.,.false.,.false.,.true.,.true.,.true. +equation_form=1,3,2,3,3,3 ffsl_inner_order=0 ffsl_outer_order=1 -ffsl_splitting=5*1 -ffsl_unity_3d=.false. -ffsl_vertical_order=2,2,1,2,2 +ffsl_splitting=6*1 +ffsl_unity_3d=.true. +ffsl_vertical_order=2,2,1,2,2,2 field_names='density','potential_temperature','wind','moisture', - ='con_tracer' + ='adv_tracer','con_tracer' fv_horizontal_order=2 fv_vertical_order=2 -horizontal_method=5*1 -horizontal_monotone=5*1 -log_space=.true.,.true.,.false.,.false.,.false. +horizontal_method=6*2 +horizontal_monotone=1,5,1,5,5,5 +log_space=.true.,.true.,.false.,.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 +!!min_val_abs_tol=-1e-9 +!!min_val_max_iterations=10 +min_val_method='clipping' +min_value=0.0,0.0,-99999999.0,0.0,0.0,0.0 oned_reconstruction=.false. operators='fv' panel_edge_high_order=.true. -panel_edge_treatment='none' -profile_size=5 -reversible=.true.,.true.,.false.,.true.,.true. +panel_edge_treatment='special_edges' +profile_size=6 +reversible=.true.,.true.,.false.,.true.,.true.,.true. runge_kutta_method='ssp3' -scheme=5*1 -si_outer_transport='none' +scheme=6*3 +si_outer_transport='horizontal_sl' slice_order='parabola' -special_edges_monotone=5*1 -splitting=5*1 -substep_transport='off' -theta_dispersion_correction=.false. -theta_variable='dry' +special_edges_monotone=0,0,0,1,1,1 +splitting=6*2 +substep_transport='adaptive' +theta_dispersion_correction=.true. +theta_variable='virtual_dry' transport_ageofair=.false. use_density_predictor=.false. -vertical_method=5*1 -vertical_monotone=5*1 -vertical_monotone_order=5*3 +vertical_method=6*2 +vertical_monotone=1,5,1,5,5,5 +vertical_monotone_order=6*3 vertical_sl_order='cubic' -wind_mono_top=.false. -!!wind_mono_top_depth=5 - -[namelist:validity_test] -number_gamma_values=2 -update_ls_frequency=1 +wind_mono_top=.true. +wind_mono_top_depth=5 [!!namelist:vapour_forcing] coordinate='height' diff --git a/rose-stem/flow.cylc b/rose-stem/flow.cylc index acb509174..6bc562960 100644 --- a/rose-stem/flow.cylc +++ b/rose-stem/flow.cylc @@ -92,7 +92,8 @@ {% if "lfric_atm" in requested_applications or "jules" in requested_applications or "ngarch" in requested_applications - or "lfric_coupled" in requested_applications %} + or "lfric_coupled" in requested_applications + or "jedi_lfric_tests" in requested_applications %} {% do LOG.debug("Running Physics Schemes") %} @@ -139,7 +140,7 @@ [runtime] [[root]] env-script = "eval $(rose task-env)" - script = "rose task-run" + script = "rose task-run -v" [[[environment]]] SOURCE_ROOT = $CYLC_WORKFLOW_SHARE_DIR/source 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..d8e6d7b72 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 @@ -24,18 +24,43 @@ "tsteps": 20, }) %} -{% elif task_ns.conf_name == "forecast_gh-si-for-linear-C12" %} +{% elif task_ns.conf_name == "forecast_nwp_gal9-C12" %} + # This is based on the lfric_atm: nwp_gal9-C12 configuration + {% do task_dict.update({ + "app_name": "jedi_forecast", + "opt_confs": ["um_dump"], + "resolution": "C12", + "ancil_resolution": "C12", + "DT": 1800, + "tsteps": 13, + "mpi_parts": 6, + }) %} +{% elif task_ns.conf_name == "forecast_nwp_gal9_da-C12" %} + # This is based on the lfric_atm: nwp_gal9-C12_da configuration + # This includes the IAU {% do task_dict.update({ "app_name": "jedi_forecast", - "opt_confs": ["gh-si-for-linear"], + "opt_confs": ["da"], "resolution": "C12", "ancil_resolution": "C12", - "DT": 90, + "DT": 1800, "tsteps": 13, "mpi_parts": 6, }) %} +{% elif task_ns.conf_name == "forecast_nwp_gal9-C48_MG" %} + # This is based on the lfric_atm: nwp_gal9-C48_MG configuration + {% do task_dict.update({ + "app_name": "jedi_forecast", + "opt_confs": ["um_dump","JEDI_C48","test_diags"], + "resolution": "C48_MG", + "ancil_resolution": "C48", + "DT": 1800, + "tsteps": 13, + "mpi_parts": 24, + }) %} + {% elif task_ns.conf_name == "forecast_pseudo_default-C12" %} {% do task_dict.update({ @@ -282,12 +307,6 @@ "threads": 4, }) %} -{% elif task_ns.conf_name == "integration_tests" %} - - {% do task_dict.update({ - "placeholder": true, - }) %} - {% elif task.startswith("build") %} {% do task_dict.update({ 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 8286ed16d..303428a94 100644 --- a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc +++ b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc @@ -25,9 +25,9 @@ }) %} {% elif task_ns.conf_name == "nwp_gal9-C48_MG" %} - +## ,"ls_and_jedi"... {% do task_dict.update({ - "opt_confs": ["um_dump","test_diags"], + "opt_confs": ["um_dump","ls_and_jedi"], "resolution": "C48_MG", "DT": 1800, "tsteps": 36, diff --git a/rose-stem/site/meto/common/default_directives.cylc b/rose-stem/site/meto/common/default_directives.cylc index f861939eb..f5243ca0f 100644 --- a/rose-stem/site/meto/common/default_directives.cylc +++ b/rose-stem/site/meto/common/default_directives.cylc @@ -24,6 +24,9 @@ "ngarch": { "build_wallclock": 45, }, + "jedi_lfric_tests": { + "build_wallclock": 45, + }, "mesh": { "mesh_wallclock": 20, "mesh_memory": [6, "GB"], @@ -51,6 +54,9 @@ "ngarch": { "build_wallclock": 45, }, + "jedi_lfric_tests": { + "build_wallclock": 45, + }, "mesh": { "mesh_wallclock": 20, "mesh_memory": [6, "GB"], 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..14be80e6c 100644 --- a/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc +++ b/rose-stem/site/meto/groups/groups_jedi_lfric_tests.cylc @@ -11,8 +11,12 @@ "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", - "jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_full-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_full-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_full-debug-64bit", "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", @@ -29,7 +33,6 @@ "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_nwp_gal9-C12_MG_op_azspice_gnu_fast-debug-64bit", @@ -39,9 +42,6 @@ "jedi_lfric_tests_azspice_developer", "jedi_lfric_tests_op_azspice_developer" ], - "jedi_lfric_tests_azspice_integration_tests": [ - "jedi_lfric_tests_integration_tests_azspice_gnu_64bit", - ], "jedi_lfric_tests_azspice_build": [ "build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit", "build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit-rsolver64", @@ -55,7 +55,9 @@ "jedi_lfric_tests_ex1a_developer": [ "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_nwp_gal9-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9_da-C12_ex1a_cce_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C48_MG_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", @@ -71,7 +73,6 @@ "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_nwp_gal9-C12_MG_op_ex1a_cce_fast-debug-64bit", @@ -86,9 +87,7 @@ "jedi_lfric_tests_ex1a_developer", "jedi_lfric_tests_op_ex1a_developer" ], - "jedi_lfric_tests_ex1a_integration_tests": [ - "jedi_lfric_tests_integration_tests_ex1a_cce_fast-debug-64bit", - ], + "jedi_lfric_tests_ex1a_build": [ "build_jedi_lfric_tests_ex1a_cce_fast-debug-64bit", "build_jedi_lfric_tests_ex1a_cce_fast-debug-64bit-rsolver64", @@ -101,7 +100,6 @@ "scripts", "jedi_lfric_tests_azspice_developer", "jedi_lfric_tests_ex1a_developer", - "jedi_lfric_tests_integration_tests", ], "jedi_lfric_tests_weekly": [ "jedi_lfric_tests_ex1a_weekly", @@ -111,10 +109,6 @@ "jedi_lfric_tests_azspice", "jedi_lfric_tests_ex1a", ], - "jedi_lfric_tests_integration_tests": [ - "jedi_lfric_tests_azspice_integration_tests", - "jedi_lfric_tests_ex1a_integration_tests", - ], "jedi_lfric_tests_build": [ "jedi_lfric_tests_azspice_build", "jedi_lfric_tests_ex1a_build", @@ -124,19 +118,16 @@ {# Platform Generic Extends #} {% do site_groups.developer.extend(site_groups.jedi_lfric_tests_developer) %} {% do site_groups.all.extend(site_groups.jedi_lfric_tests) %} -{% do site_groups.integration_tests.extend(site_groups.jedi_lfric_tests_integration_tests) %} {% do site_groups.build.extend(site_groups.jedi_lfric_tests_build) %} {# Azspice Extends #} {% do site_groups.azspice_developer.extend(site_groups.jedi_lfric_tests_azspice_developer) %} {% do site_groups.azspice.extend(site_groups.jedi_lfric_tests_azspice) %} -{% do site_groups.azspice_integration_tests.extend(site_groups.jedi_lfric_tests_azspice_integration_tests) %} {% do site_groups.azspice_build.extend(site_groups.jedi_lfric_tests_azspice_build) %} {# EX1A Extends #} {% do site_groups.ex1a_developer.extend(site_groups.jedi_lfric_tests_ex1a_developer) %} {% do site_groups.ex1a.extend(site_groups.jedi_lfric_tests_ex1a) %} -{% do site_groups.ex1a_integration_tests.extend(site_groups.jedi_lfric_tests_ex1a_integration_tests) %} {% do site_groups.ex1a_build.extend(site_groups.jedi_lfric_tests_ex1a_build) %} {% do LOG.debug("Finished in site/meto/groups/groups_jedi_lfric_tests.cylc") %} diff --git a/rose-stem/site/meto/jedi_lfric_tests/tasks_jedi_lfric_tests_ex1a.cylc b/rose-stem/site/meto/jedi_lfric_tests/tasks_jedi_lfric_tests_ex1a.cylc index 0e1d21dc2..bb675e869 100644 --- a/rose-stem/site/meto/jedi_lfric_tests/tasks_jedi_lfric_tests_ex1a.cylc +++ b/rose-stem/site/meto/jedi_lfric_tests/tasks_jedi_lfric_tests_ex1a.cylc @@ -5,4 +5,11 @@ {# ########################################################################### #} {% do LOG.debug("Entered site/meto/jedi_lfric_tests/tasks_jedi_lfric_tests_ex1a.cylc") %} +{% if task_ns.conf_name == "forecast_nwp_gal9-C48_MG" %} + {% do task_dict.update({ + "memory": [40, "GB"], + }) %} + +{% endif %} + {% do LOG.debug("Finised in site/meto/jedi_lfric_tests/tasks_jedi_lfric_tests_ex1a.cylc") %} 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 deleted file mode 100644 index 9697adba8..000000000 --- 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 +++ /dev/null @@ -1 +0,0 @@ -Inner product checksum theta = 41F6D1230191A574 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 deleted file mode 100644 index 9697adba8..000000000 --- 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 +++ /dev/null @@ -1 +0,0 @@ -Inner product checksum theta = 41F6D1230191A574 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..1026d3bea --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 42329DA6E8DF0DE4 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_full-debug-64bit.txt new file mode 100644 index 000000000..1026d3bea --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_full-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 42329DA6E8DF0DE4 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..c179e5aa2 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 42729F54951824E9 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_full-debug-64bit.txt new file mode 100644 index 000000000..c179e5aa2 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_full-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 42729F54951824E9 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_fast-debug-64bit.txt new file mode 100644 index 000000000..508439c31 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_fast-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 423279EDF80A725F diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_full-debug-64bit.txt new file mode 100644 index 000000000..508439c31 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_full-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 423279EDF80A725F 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 deleted file mode 100644 index f0d5ac34b..000000000 --- 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 +++ /dev/null @@ -1 +0,0 @@ -Inner product checksum theta = 41F6D123018FD8A4 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..bcc7a11c6 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 42329DA6F445ECB0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..1e02f64ea --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 42729F54A00B4DD8 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_ex1a_cce_fast-debug-64bit.txt new file mode 100644 index 000000000..36d9de1f2 --- /dev/null +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_nwp_gal9_da-C12_ex1a_cce_fast-debug-64bit.txt @@ -0,0 +1 @@ +Inner product checksum theta = 423279EDF0F39374 diff --git a/rose-stem/site/nci/groups/groups_jedi_lfric_tests.cylc b/rose-stem/site/nci/groups/groups_jedi_lfric_tests.cylc index 49084f2ed..d41e365b9 100644 --- a/rose-stem/site/nci/groups/groups_jedi_lfric_tests.cylc +++ b/rose-stem/site/nci/groups/groups_jedi_lfric_tests.cylc @@ -10,7 +10,9 @@ "jedi_lfric_tests_gadi_developer": [ "jedi_lfric_tests_nwp_gal9-C12_gadi_intel_fast-debug-64bit", "jedi_lfric_tests_runge-kutta-C12_gadi_intel_fast-debug-64bit", - "jedi_lfric_tests_forecast_gh-si-for-linear-C12_gadi_intel_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C12_gadi_intel_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9_da-C12_gadi_intel_fast-debug-64bit", + "jedi_lfric_tests_forecast_nwp_gal9-C48_MG_gadi_intel_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_default-C12_gadi_intel_fast-debug-64bit", "jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_gadi_intel_fast-debug-64bit", "jedi_lfric_tests_tlm_forecast_tl_default-C12_gadi_intel_fast-debug-64bit", @@ -20,14 +22,10 @@ "jedi_lfric_tests_tlm_tests_default-1PE-C12_gadi_intel_fast-debug-64bit", "jedi_lfric_tests_tlm_tests_default-dry-C12_gadi_intel_fast-debug-64bit", "jedi_lfric_tests_tlm_tests_default-dry-1PE-C12_gadi_intel_fast-debug-64bit", - "jedi_lfric_tests_gadi_integration_tests", ], "jedi_lfric_tests_gadi": [ "jedi_lfric_tests_gadi_developer" ], - "jedi_lfric_tests_gadi_integration_tests": [ - "jedi_lfric_tests_integration_tests_gadi_intel_64bit", - ], "jedi_lfric_tests_gadi_build": [ "build_jedi_lfric_tests_gadi_intel_fast-debug-64bit", ], @@ -38,15 +36,11 @@ "jedi_lfric_tests_developer": [ "scripts", "jedi_lfric_tests_gadi_developer", - "jedi_lfric_tests_integration_tests", ], "jedi_lfric_tests": [ "jedi_lfric_tests_developer", "jedi_lfric_tests_gadi", ], - "jedi_lfric_tests_integration_tests": [ - "jedi_lfric_tests_gadi_integration_tests", - ], "jedi_lfric_tests_build": [ "jedi_lfric_tests_gadi_build", ], @@ -55,13 +49,11 @@ {# Platform Generic Extends #} {% do site_groups.developer.extend(site_groups.jedi_lfric_tests_developer) %} {% do site_groups.all.extend(site_groups.jedi_lfric_tests) %} -{% do site_groups.integration_tests.extend(site_groups.jedi_lfric_tests_integration_tests) %} {% do site_groups.build.extend(site_groups.jedi_lfric_tests_build) %} {# gadi Extends #} {% do site_groups.gadi_developer.extend(site_groups.jedi_lfric_tests_gadi_developer) %} {% do site_groups.gadi.extend(site_groups.jedi_lfric_tests_gadi) %} -{% do site_groups.gadi_integration_tests.extend(site_groups.jedi_lfric_tests_gadi_integration_tests) %} {% do site_groups.gadi_build.extend(site_groups.jedi_lfric_tests_gadi_build) %} {% do LOG.debug("Finished iin site/meto/groups/groups_jedi_lfric_tests.cylc") %} diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index b9e507f15..a99408759 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -22,7 +22,7 @@ {# Generate the script command #} {% set script_str = namespace(name="") %} {% set script_str.name = "$CYLC_WORKFLOW_RUN_DIR/bin/application_results_setup.sh ; " %} -{% set script_str.name = script_str.name~"rose task-run --app-key="~task_values["app_name"] %} +{% set script_str.name = script_str.name~"rose task-run -v --app-key="~task_values["app_name"] %} {% if task_values["app_name"] == "canned_test" %} {% set script_str.name = script_str.name~" --command-key=$RUN_METHOD" %} {% else %} diff --git a/rose-stem/templates/runtime/generate_runtime_build.cylc b/rose-stem/templates/runtime/generate_runtime_build.cylc index cb778677e..ade0490ea 100644 --- a/rose-stem/templates/runtime/generate_runtime_build.cylc +++ b/rose-stem/templates/runtime/generate_runtime_build.cylc @@ -35,7 +35,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = 'if command -v module > /dev/null 2>&1; then module list; fi; rose task-run --app-key=compile' + script = 'if command -v module > /dev/null 2>&1; then module list; fi; rose task-run -v --app-key=compile' execution time limit = PT{{task_values["build_wallclock"]}}M [[[environment]]] SOURCE_DIRECTORY = $SOURCE_ROOT/{{src_path}} diff --git a/rose-stem/templates/runtime/generate_runtime_check.cylc b/rose-stem/templates/runtime/generate_runtime_check.cylc index 2b10119cd..c4a812814 100644 --- a/rose-stem/templates/runtime/generate_runtime_check.cylc +++ b/rose-stem/templates/runtime/generate_runtime_check.cylc @@ -47,7 +47,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = 'rose task-run --app-key=check_kgo' + script = 'rose task-run -v --app-key=check_kgo' execution time limit = PT{{task_values["tech-tests_wallclock"]}}M [[[environment]]] CURRENT_KGO = {{current_kgo}} @@ -82,7 +82,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = rose task-run --app-key=phystest + script = rose task-run -v --app-key=phystest execution time limit = PT{{task_values["tech-tests_wallclock"]}}M [[[environment]]] PHYSTEST_DIR = {{task_output_dir}} @@ -102,7 +102,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = 'rose task-run --app-key=perturbation_compare' + script = 'rose task-run -v --app-key=perturbation_compare' execution time limit = PT{{task_values["tech-tests_wallclock"]}}M [[[environment]]] PERT_ON_TASK = {{perturb_output}} diff --git a/rose-stem/templates/runtime/generate_runtime_control.cylc b/rose-stem/templates/runtime/generate_runtime_control.cylc index 00a04b699..19e9f93ad 100644 --- a/rose-stem/templates/runtime/generate_runtime_control.cylc +++ b/rose-stem/templates/runtime/generate_runtime_control.cylc @@ -92,7 +92,7 @@ [[{{task}}]] inherit = HOUSEKEEPING, {{platform|upper}}_HOUSEKEEPING execution time limit = PT5M - script = rose task-run --app-key=housekeeping + script = rose task-run -v --app-key=housekeeping [[[directives]]] {{ set_task_resources(1, [1, "GB"]) }} diff --git a/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc b/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc index 48c0df047..fc6a2947e 100644 --- a/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc +++ b/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc @@ -15,9 +15,9 @@ inherit = GENERATE_WEIGHTS, \ {{site_vars["scripts_platform"]|upper}}_WEIGHTS {% if task_ns.application == "lfric2lfric" %} - script = rose task-run --app-key=generate_weights -O lfric2lfric + script = rose task-run -v --app-key=generate_weights -O lfric2lfric {% else %} - script = rose task-run --app-key=generate_weights + script = rose task-run -v --app-key=generate_weights {% endif %} [[[environment]]] MPIRUN_N_JOBS = {{task_values["gen_weights_tasks"]}} diff --git a/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc b/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc index 51ce6a276..56bd384bd 100644 --- a/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc +++ b/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc @@ -21,7 +21,7 @@ [[{{task}}]] {% endif %} inherit=BUILD_{{task_ns.application|upper}}_{{task_ns.platform|upper}},{{task_ns.platform|upper}}_BUILD_COUPLED_CCE - script = rose task-run + script = rose task-run -v [[[environment]]] ROSE_TASK_APP = {{task_app}} [[[directives]]] @@ -36,7 +36,7 @@ [[{{task}}]] {% endif %} inherit=BUILD_{{task_ns.application|upper}}_{{task_ns.platform|upper}}, {{SITE|upper}}_FCM_MAKE - script = rose task-run + script = rose task-run -v execution time limit = PT10M [[[environment]]] ROSE_TASK_APP = {{task_app}} diff --git a/rose-stem/templates/runtime/generate_runtime_mesh.cylc b/rose-stem/templates/runtime/generate_runtime_mesh.cylc index 69f8093fa..e6b902af9 100644 --- a/rose-stem/templates/runtime/generate_runtime_mesh.cylc +++ b/rose-stem/templates/runtime/generate_runtime_mesh.cylc @@ -14,7 +14,7 @@ {% set inherit.str = inherit.str~","~family|upper %} {% endfor %} -{% set script_str = "rose task-run --app-key=mesh --opt-conf-key="~task_ns.conf_name %} +{% set script_str = "rose task-run -v --app-key=mesh --opt-conf-key="~task_ns.conf_name %} [[{{task}}]] inherit={{inherit.str|upper}} diff --git a/rose-stem/templates/runtime/generate_runtime_other.cylc b/rose-stem/templates/runtime/generate_runtime_other.cylc index f55df4e5a..172dd1afd 100644 --- a/rose-stem/templates/runtime/generate_runtime_other.cylc +++ b/rose-stem/templates/runtime/generate_runtime_other.cylc @@ -29,7 +29,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = rose task-run --app-key=perftools_export + script = rose task-run -v --app-key=perftools_export execution time limit = PT{{task_values["tech-tests_wallclock"]}}M [[[environment]]] PREVIOUS_JOB={{previous_job}} diff --git a/rose-stem/templates/runtime/generate_runtime_plot.cylc b/rose-stem/templates/runtime/generate_runtime_plot.cylc index c7341cfb0..a9ce8f45f 100644 --- a/rose-stem/templates/runtime/generate_runtime_plot.cylc +++ b/rose-stem/templates/runtime/generate_runtime_plot.cylc @@ -20,7 +20,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = 'rose task-run --app-key=plot' + script = 'rose task-run -v --app-key=plot' execution time limit = PT{{task_values["tech-tests_wallclock"]}}M [[[environment]]] NODAL_DATA_DIR = {{task_output_dir}}/results @@ -41,7 +41,7 @@ [[{{task}}]] inherit={{inherit.str|upper}} - script = 'rose task-run --app-key=memory_profile' + script = 'rose task-run -v --app-key=memory_profile' [[[environment]]] PLOT_DIR = {{task_output_dir}}/plots TASK_LOG_DIR = {{log_dir}} diff --git a/rose-stem/templates/runtime/generate_runtime_scripts.cylc b/rose-stem/templates/runtime/generate_runtime_scripts.cylc index 9a127471e..e2fb39731 100644 --- a/rose-stem/templates/runtime/generate_runtime_scripts.cylc +++ b/rose-stem/templates/runtime/generate_runtime_scripts.cylc @@ -36,12 +36,12 @@ {% if "config_dump_checker" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=check_config_dump" + script="rose task-run -v --app-key=check_config_dump" {% elif "style_checker" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=check_style" + script="rose task-run -v --app-key=check_style" {% elif "fortitude_linter" in task %} @@ -51,41 +51,41 @@ {% elif "extract_checker" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=extract_list_checker" + script="rose task-run -v --app-key=extract_list_checker" {% elif "site_validator" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=site_validator" + script="rose task-run -v --app-key=site_validator" {% elif "rose-stem_lint_checker" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=rose-stem_lint_check" + script="rose task-run -v --app-key=rose-stem_lint_check" {% elif "test_launch-exe" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=test_launch-exe" + script="rose task-run -v --app-key=test_launch-exe" [[[environment]]] launch_exe_meto_path = $CYLC_WORKFLOW_RUN_DIR/site/meto/common/bin/launch-exe {% elif "macro_chains_checker" in task %} inherit=SCRIPTS,{{site_vars["scripts_platform"]|upper}}_PLOT - script="rose task-run --app-key=check_macro_chains" + script="rose task-run -v --app-key=check_macro_chains" {% elif "validate_rose_meta" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=validate_rose_meta" + script="rose task-run -v --app-key=validate_rose_meta" [[[environment]]] ROSE_PYTHONPATH = $PYTHONPATH {% elif "kgo_groups_checker" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=check_kgo_groups" + script="rose task-run -v --app-key=check_kgo_groups" {% set group_str = RUN_NAMES|join(",") %} [[[environment]]] SUITE_SITE = {{SITE}} @@ -94,12 +94,12 @@ {% elif "global_variables_checker" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=check_global_variables" + script="rose task-run -v --app-key=check_global_variables" {% elif "python_unit_tests" in task %} inherit={{inherit.str|upper}} - script="rose task-run --app-key=python_unit_tests" + script="rose task-run -v --app-key=python_unit_tests" {% elif "local_build_test" in task %} {# Test the local_build script by building solver #} diff --git a/science/gungho/source/algorithm/initialisation/init_physics_prognostics_alg_mod.X90 b/science/gungho/source/algorithm/initialisation/init_physics_prognostics_alg_mod.X90 index f43c0e5a0..f62377da7 100644 --- a/science/gungho/source/algorithm/initialisation/init_physics_prognostics_alg_mod.X90 +++ b/science/gungho/source/algorithm/initialisation/init_physics_prognostics_alg_mod.X90 @@ -33,6 +33,7 @@ module init_physics_prognostics_alg_mod #endif use log_mod, only : log_event, & LOG_LEVEL_INFO + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -87,6 +88,7 @@ contains #ifdef UM_PHYSICS +if (use_nl_physics) then ! Only actually initialise the fields if we're using the external code ! Most things need calling regardless of whether the scheme is on, ! because we initialise fields used by other schemes if the scheme @@ -118,7 +120,7 @@ contains call init_stph_fields_alg(stph_fields) call log_event( 'Physics field collections initialised', LOG_LEVEL_INFO ) - +endif! (use_nl_physics) then #endif end subroutine init_physics_prognostics_alg diff --git a/science/gungho/source/algorithm/physics/external_forcing_alg_mod.X90 b/science/gungho/source/algorithm/physics/external_forcing_alg_mod.X90 index a5dc88e87..a833ed2d6 100644 --- a/science/gungho/source/algorithm/physics/external_forcing_alg_mod.X90 +++ b/science/gungho/source/algorithm/physics/external_forcing_alg_mod.X90 @@ -80,6 +80,7 @@ module external_forcing_alg_mod use w2_filter_alg_mod, only: w2_filter_alg use external_forcing_diagnostics_mod, only: write_forcing_diagnostics + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -401,12 +402,21 @@ contains end if #ifdef UM_PHYSICS +if (use_nl_physics) then if ( .not. vapour_forcing_done ) then call dmv_forcing%initialise( vector_space = theta%get_function_space() ) call invoke( setval_c(dmv_forcing, 0.0_r_def) ) call dmcl_forcing%initialise( vector_space = theta%get_function_space() ) call invoke( setval_c(dmcl_forcing, 0.0_r_def) ) end if +else! (use_nl_physics) then + if (vapour_forcing /= vapour_forcing_none .and. .not. vapour_forcing_done ) then + call dmv_forcing%initialise( vector_space = theta%get_function_space() ) + call invoke( setval_c(dmv_forcing, 0.0_r_def) ) + call dmcl_forcing%initialise( vector_space = theta%get_function_space() ) + call invoke( setval_c(dmcl_forcing, 0.0_r_def) ) + end if +endif! (use_nl_physics) then #else if (vapour_forcing /= vapour_forcing_none .and. .not. vapour_forcing_done ) then call dmv_forcing%initialise( vector_space = theta%get_function_space() ) @@ -436,6 +446,7 @@ contains end if #ifdef UM_PHYSICS +if (use_nl_physics) then if ( theta_forcing_done .or. vapour_forcing_done ) then ! pc2 response to forcing if requested if (cloud == cloud_um .and. scheme == scheme_pc2 .and. & @@ -449,6 +460,7 @@ contains end if end if +endif! (use_nl_physics) then #endif if ( LPROF ) call stop_timing( id, 'external_forcing' ) diff --git a/science/gungho/source/algorithm/physics/fast_physics_alg_mod.X90 b/science/gungho/source/algorithm/physics/fast_physics_alg_mod.X90 index 6b94d4449..1b8c5e940 100644 --- a/science/gungho/source/algorithm/physics/fast_physics_alg_mod.X90 +++ b/science/gungho/source/algorithm/physics/fast_physics_alg_mod.X90 @@ -84,6 +84,7 @@ module fast_physics_alg_mod use stph_main_alg_mod, only: stph_main_alg use blpert_main_alg_mod, only: blpert_main_alg #endif + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -235,6 +236,7 @@ contains setval_X(u_latest, u_star) ) #ifdef UM_PHYSICS +if (use_nl_physics) then !-------------------------------------------------------------------- ! UM implicit boundary layer !-------------------------------------------------------------------- @@ -406,6 +408,7 @@ contains end if end if +endif! (use_nl_physics) then #endif !-------------------------------------------------------------------- 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 328856e70..fc8702aac 100644 --- a/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 +++ b/science/gungho/source/algorithm/physics/slow_physics_alg_mod.X90 @@ -158,6 +158,7 @@ module slow_physics_alg_mod only: aerosol_mesh_name, & coarse_rad_aerosol use initialization_config_mod, only: coarse_aerosol_ancil + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -438,7 +439,7 @@ contains end if #ifdef UM_PHYSICS - +if (use_nl_physics) then if ( microphysics == microphysics_um .or. & radiation == radiation_socrates ) then @@ -936,6 +937,7 @@ contains if (murk_prognostic) then call murk_alg(aerosol_fields, derived_fields, turbulence_fields) end if +endif! (use_nl_physics) then #endif if (evap_condense_placement == evap_condense_placement_slow .and. & @@ -1068,6 +1070,7 @@ contains end if #ifdef UM_PHYSICS +if (use_nl_physics) then !-------------------------------------------------------------------- ! PC2 checking of current state and preparation for advection !-------------------------------------------------------------------- @@ -1211,6 +1214,7 @@ contains end if end if ! slow bl end if ! bl +endif! (use_nl_physics) then #endif call print_field_stats_alg(dtheta, LOG_LEVEL_INFO, printmin=-20.0_r_def, & diff --git a/science/gungho/source/algorithm/runtime_constants/physics_constants_mod.X90 b/science/gungho/source/algorithm/runtime_constants/physics_constants_mod.X90 index 94a95dcf1..b07244161 100644 --- a/science/gungho/source/algorithm/runtime_constants/physics_constants_mod.X90 +++ b/science/gungho/source/algorithm/runtime_constants/physics_constants_mod.X90 @@ -33,6 +33,7 @@ module physics_constants_mod use model_clock_mod, only: model_clock_type use timing_mod, only: start_timing, stop_timing, & tik, LPROF + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -411,6 +412,7 @@ contains logical(kind=l_def) :: constant_exists integer(tik) :: id +if (use_nl_physics) then ! Check inventory is initialised if (.not. Pnm_star_inventory%is_initialised()) then call Pnm_star_inventory%initialise(name='Pnm_star') @@ -439,6 +441,7 @@ contains call Pnm_star_inventory%get_field(local_mesh, Pnm_star) +endif! (use_nl_physics) then end function get_Pnm_star #endif @@ -456,7 +459,9 @@ contains call rdz_w3_inventory%clear() call max_diff_wtheta_inventory%clear() #ifdef UM_PHYSICS +if (use_nl_physics) then call Pnm_star_inventory%clear() +endif! (use_nl_physics) then #endif end subroutine final_physics_constants 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 4067259c5..8f4d8f66c 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 @@ -154,6 +154,7 @@ module semi_implicit_timestep_alg_mod use timing_mod, only: start_timing, stop_timing, tik, LPROF use ageofair_alg_mod, only: ageofair_update + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -350,6 +351,7 @@ contains dtemp_encorr = dt * temp_corr_io_value%data(1) #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_spt) then ! Get spectral coefficients and power law from the model database call get_stph_values(modeldb, spt_array_names, spt_spectral_coeffc, & @@ -360,6 +362,7 @@ contains call get_stph_values(modeldb, skeb_array_names, skeb_spectral_coeffc, & skeb_spectral_coeffs, skeb_power_law) end if +endif! (use_nl_physics) then #endif ! Run the timestep @@ -383,6 +386,7 @@ contains mesh, twod_mesh) #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_spt) then ! Put spectral coefficients and power law back into model database call put_stph_values(modeldb, spt_array_names, spt_spectral_coeffc, & @@ -394,6 +398,7 @@ contains call put_stph_values(modeldb, skeb_array_names, skeb_spectral_coeffc, & skeb_spectral_coeffs, skeb_power_law) end if +endif! (use_nl_physics) then #endif nullify( model_clock, mesh, & @@ -1156,6 +1161,7 @@ contains ! changes are applied from the solver. ! ---------------------------------------------------------------------- #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_physics .and. cloud == cloud_um ) then call cld_alg( self%dtheta_cld, mr, & self%state(igh_t), self%state(igh_p), self%state(igh_d), & @@ -1170,6 +1176,7 @@ contains convection_fields, initialise=.false. ) end if ! microphysics_casim end if +endif! (use_nl_physics) then #endif ! Update derived variables for time level n+1 @@ -1186,6 +1193,7 @@ contains ! Call UKCA for GLOMAP-mode prognostic aerosol updates !-------------------------------------------------------------------- #ifdef UM_PHYSICS +if (use_nl_physics) then if ( aerosol == aerosol_um .and. & ( glomap_mode == glomap_mode_ukca .or. & glomap_mode == glomap_mode_dust_and_clim ) ) then @@ -1196,6 +1204,7 @@ contains surface_fields, soil_fields, & self%state, mr, model_clock ) end if +endif! (use_nl_physics) then #endif ! Write diagnostic output diff --git a/science/gungho/source/diagnostics/diagnostics_calc_mod.F90 b/science/gungho/source/diagnostics/diagnostics_calc_mod.F90 index f1787a8bf..c60e55c9a 100755 --- a/science/gungho/source/diagnostics/diagnostics_calc_mod.F90 +++ b/science/gungho/source/diagnostics/diagnostics_calc_mod.F90 @@ -44,6 +44,7 @@ module diagnostics_calc_mod use sci_geometric_constants_mod, only: get_coordinates, & get_panel_id + use nl_physics_config_mod, only : use_nl_physics implicit none private public :: write_divergence_diagnostic, & @@ -180,7 +181,12 @@ subroutine write_vorticity_diagnostic(u_field, exner, clock) diagnostic_to_be_sampled('init_xi3') #ifdef UM_PHYSICS +!!! this is the logic I should use.... +if (use_nl_physics) then plev_xi3_flag = init_diag(plev_xi3, 'plev__xi3') +else + plev_xi3_flag = .false. +endif! (use_nl_physics) then #else plev_xi3_flag = .false. #endif @@ -201,9 +207,12 @@ subroutine write_vorticity_diagnostic(u_field, exner, clock) call project_output( vorticity, projected_field, chi, panel_id, W3 ) #ifdef UM_PHYSICS + +if (use_nl_physics) then if (plev_xi3_flag) then call pres_lev_field_alg(projected_field(3), exner, plev_xi3, xi3_axis) end if +endif! (use_nl_physics) then #endif if (xi_modlev_flag) then @@ -242,6 +251,7 @@ subroutine write_vorticity_diagnostic(u_field, exner, clock) end subroutine write_vorticity_diagnostic #ifdef UM_PHYSICS +!! I assume we just dont need to do anything in this case? !------------------------------------------------------------------------------- !> @brief Potential vorticity diagnostic processing and output. !> @details Optionally calculate and output both model level and pressure @@ -270,6 +280,8 @@ subroutine write_pv_diagnostic(u_field, theta, rho, exner, clock) logical(l_def), parameter :: xi3_axis = .false. logical(l_def), parameter :: add_W3_version = .false. +if (use_nl_physics) then + pv_modlev_flag = diagnostic_to_be_sampled('potential_vorticity') .or. & diagnostic_to_be_sampled('init_potential_vorticity') @@ -287,7 +299,7 @@ subroutine write_pv_diagnostic(u_field, theta, rho, exner, clock) end if end if - +endif! (use_nl_physics) then end subroutine write_pv_diagnostic #else !------------------------------------------------------------------------------- diff --git a/science/gungho/source/driver/create_iau_fields_mod.F90 b/science/gungho/source/driver/create_iau_fields_mod.F90 index 1071826b5..4d7ea9777 100755 --- a/science/gungho/source/driver/create_iau_fields_mod.F90 +++ b/science/gungho/source/driver/create_iau_fields_mod.F90 @@ -34,6 +34,7 @@ module create_iau_fields_mod use jules_physics_init_mod, only : snow_lev_tile #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -108,6 +109,8 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & read_behaviour=read_behaviour ) #ifdef UM_PHYSICS + +if (use_nl_physics) then if ( iau_wet_density ) then call setup_field( iau_fields, depository, prognostic_fields, & "rho_r2_inc", W3, mesh, checkpoint_restart_flag, & @@ -117,6 +120,7 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & "rho_inc", W3, mesh, checkpoint_restart_flag, & read_behaviour=read_behaviour ) end if +endif! (use_nl_physics) then #endif call setup_field( iau_fields, depository, prognostic_fields, & @@ -128,6 +132,8 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & read_behaviour=read_behaviour ) #ifdef UM_PHYSICS + +if (use_nl_physics) then ! IAU control-pert pert increment fields if ( iau_use_pertinc ) then call log_event( 'Create IAU pert fields', LOG_LEVEL_INFO ) @@ -176,6 +182,7 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & "exner_pert_inc", W3, mesh, checkpoint_restart_flag, & read_behaviour=read_behaviour ) end if ! ( iau_use_pertinc ) +endif! (use_nl_physics) then #endif if (iau_surf) then @@ -189,6 +196,8 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & read_behaviour => read_field_generic #ifdef UM_PHYSICS + +if (use_nl_physics) then call setup_field( iau_surf_fields, depository, prognostic_fields, & "soil_temperature_inc", W3, mesh, checkpoint_restart_flag, & twod_mesh, read_behaviour=read_behaviour, twod=.true., ndata=sm_levels ) @@ -204,6 +213,7 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & call setup_field( iau_surf_fields, depository, prognostic_fields, & "tile_temperature_inc", W3, mesh, checkpoint_restart_flag, & twod_mesh, read_behaviour=read_behaviour, twod=.true., ndata=n_land_tile ) +endif! (use_nl_physics) then #endif end if @@ -226,6 +236,8 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & nullify( iau_fields, iau_surf_fields ) #ifdef UM_PHYSICS + +if (use_nl_physics) then ! Set up name of density increments if ( iau_wet_density ) then rho_inc_name = "rho_r2_inc" @@ -263,11 +275,13 @@ subroutine create_iau_fields( mesh, twod_mesh, depository, & "q_tot_inc", "qcl_tot_inc", & "qcf_tot_inc", "theta_tot_inc", & "exner_tot_inc", rho_inc_name ) +endif! (use_nl_physics) then #endif end subroutine create_iau_fields #ifdef UM_PHYSICS +!! nothing need here.... !> @brief Create additional types of iau increment fields. !> @details Create IAU field collection for additional increment !> types associated with additive inflation and the aggregated @@ -323,6 +337,8 @@ subroutine create_iau_additional_fields( mesh, modeldb, iau_incs, & procedure(read_interface), pointer :: tmp_read_ptr +if (use_nl_physics) then + call modeldb%fields%add_empty_field_collection(iau_incs) iau_inc_fields => modeldb%fields%get_field_collection(iau_incs) @@ -380,6 +396,8 @@ subroutine create_iau_additional_fields( mesh, modeldb, iau_incs, & call rho_inc%set_read_behaviour(tmp_read_ptr) call iau_inc_fields%add_field(rho_inc) +endif! (use_nl_physics) then + end subroutine create_iau_additional_fields #endif diff --git a/science/gungho/source/driver/create_physics_prognostics_mod.F90 b/science/gungho/source/driver/create_physics_prognostics_mod.F90 index 6e6545f72..c65b20534 100644 --- a/science/gungho/source/driver/create_physics_prognostics_mod.F90 +++ b/science/gungho/source/driver/create_physics_prognostics_mod.F90 @@ -123,7 +123,7 @@ module create_physics_prognostics_mod use initialization_config_mod, only : init_option, & init_option_checkpoint_dump #endif - + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -209,6 +209,8 @@ subroutine process_physics_prognostics(processor) end if #ifdef UM_PHYSICS + +if (use_nl_physics) then !======================================================================== ! Fields owned by the radiation scheme !======================================================================== @@ -1882,6 +1884,7 @@ subroutine process_physics_prognostics(processor) twod=.true., is_int=.true., ckp=checkpoint_flag, empty=is_empty)) end if +endif! (use_nl_physics) then #endif diff --git a/science/gungho/source/driver/field_maker_mod.F90 b/science/gungho/source/driver/field_maker_mod.F90 index a468e8335..92da8aa3a 100644 --- a/science/gungho/source/driver/field_maker_mod.F90 +++ b/science/gungho/source/driver/field_maker_mod.F90 @@ -55,6 +55,7 @@ module field_maker_mod get_ndata_val => get_multidata_field_dimension #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -157,7 +158,12 @@ subroutine field_maker_apply(self, spec) real(r_second), allocatable :: all_checkpoint_times(:) #ifdef UM_PHYSICS + + if (use_nl_physics) then ndata = get_ndata_val(spec%mult) + else + ndata = 1 + end if #else ndata = 1 #endif diff --git a/science/gungho/source/driver/field_mapper_mod.F90 b/science/gungho/source/driver/field_mapper_mod.F90 index 8cec69f3d..11d50fc66 100644 --- a/science/gungho/source/driver/field_mapper_mod.F90 +++ b/science/gungho/source/driver/field_mapper_mod.F90 @@ -24,6 +24,7 @@ module field_mapper_mod use gungho_time_axes_mod, only : gungho_time_axes_type use lfric_xios_time_axis_mod, only : time_axis_type + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -223,6 +224,10 @@ subroutine init(self, & ! Create collection of fields to be advected #ifdef UM_PHYSICS + + if (use_nl_physics) then + + end if #endif call gungho_axes%initialise() diff --git a/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 b/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 index 1bfca57a2..96d641ea4 100644 --- a/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 +++ b/science/gungho/source/driver/gungho_diagnostics_driver_mod.F90 @@ -61,6 +61,7 @@ module gungho_diagnostics_driver_mod use freeze_lev_alg_mod, only : freeze_lev_alg #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -243,7 +244,14 @@ subroutine gungho_diagnostics_driver( modeldb, & end if call write_vorticity_diagnostic( u, exner, modeldb%clock ) #ifdef UM_PHYSICS +if (use_nl_physics) then call write_pv_diagnostic( u, theta, rho, exner, modeldb%clock ) +else + print*, "I dont think this is required to make it work...." + ! The issue is there are two methods and one is #ifdef out + ! so will need to fix this issue later + !!call write_pv_diagnostic( u, theta, rho, modeldb%clock ) +endif! (use_nl_physics) then #else call write_pv_diagnostic( u, theta, rho, modeldb%clock ) #endif @@ -327,6 +335,8 @@ subroutine gungho_diagnostics_driver( modeldb, & call pressure_diag_alg(exner_in_wth) #ifdef UM_PHYSICS + +if (use_nl_physics) then ! RH diagnostics call rh_diag_alg(exner_in_wth, theta, mr) ! Call PMSL algorithm @@ -335,6 +345,7 @@ subroutine gungho_diagnostics_driver( modeldb, & call pres_lev_diags_alg(derived_fields, theta, exner, mr, moist_dyn) ! Wet bulb freezing level call freeze_lev_alg(theta, mr, moist_dyn, exner_in_wth) +endif! (use_nl_physics) then #endif temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') diff --git a/science/gungho/source/driver/gungho_driver_mod.F90 b/science/gungho/source/driver/gungho_driver_mod.F90 index 716442e75..8bb477267 100644 --- a/science/gungho/source/driver/gungho_driver_mod.F90 +++ b/science/gungho/source/driver/gungho_driver_mod.F90 @@ -111,6 +111,7 @@ module gungho_driver_mod use process_send_fields_2d_mod, only : save_sea_ice_frac_previous #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -199,6 +200,7 @@ subroutine initialise( program_name, modeldb ) random_seed_io_value ) deallocate(real_array) #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_spt) then allocate(real_array(stph_spectral_dim)) real_array = 0.0_r_def @@ -219,6 +221,7 @@ subroutine initialise( program_name, modeldb ) end do deallocate(real_array) end if +endif! (use_nl_physics) then #endif end if @@ -251,6 +254,8 @@ subroutine initialise( program_name, modeldb ) #endif #ifdef UM_PHYSICS + +if (use_nl_physics) then ! If IAU is active and increments need to be added instantaneously, to the initial ! state, then do this now. The IAU should not be activated at this stage in ! the case of a checkpoint-restart. @@ -308,6 +313,7 @@ subroutine initialise( program_name, modeldb ) flux_bc_opt == flux_bc_opt_specified_scalars_tstar ) then call flux_calc_init( modeldb ) end if +endif! (use_nl_physics) then #endif nullify(mesh, twod_mesh, aerosol_mesh, aerosol_twod_mesh) @@ -357,6 +363,8 @@ subroutine step( modeldb ) end if end if #ifdef UM_PHYSICS + +if (use_nl_physics) then nullify( surface_fields, ancil_fields ) regrid_operation => map_scalar_intermesh @@ -372,6 +380,7 @@ subroutine step( modeldb ) call setup_step_multifile_io( io_context_name, modeldb ) end if +endif! (use_nl_physics) then #endif ! Get model_axes out of modeldb model_axes => get_time_axes_from_collection(modeldb%values, "model_axes" ) @@ -381,6 +390,8 @@ subroutine step( modeldb ) twod_mesh => mesh_collection%get_mesh(mesh, TWOD) #ifdef UM_PHYSICS + +if (use_nl_physics) then ! Specified sensible and latent heat fluxes if ( flux_bc_opt == flux_bc_opt_specified_scalars .or. & flux_bc_opt == flux_bc_opt_specified_scalars_tstar ) then @@ -393,6 +404,7 @@ subroutine step( modeldb ) call update_tile_temperature_alg ( modeldb%clock, & surface_fields ) end if +endif! (use_nl_physics) then #endif lbc_fields => modeldb%fields%get_field_collection("lbc_fields") @@ -425,6 +437,8 @@ subroutine step( modeldb ) endif #ifdef UM_PHYSICS + +if (use_nl_physics) then ! If IAU is active and increments need to be added over a time window, then do this ! at the start of every ts within the required time window if ( iau ) then @@ -436,6 +450,7 @@ subroutine step( modeldb ) use_random_parameters ) then call stph_rp_main_alg( modeldb ) end if +endif! (use_nl_physics) then #endif ! Perform a timestep @@ -453,6 +468,8 @@ subroutine step( modeldb ) end if #ifdef UM_PHYSICS + +if (use_nl_physics) then ! Update time-varying ancillaries ! This is done last in the timestep, because the time data of the ! ancillaries needs to be that of the start of timestep, but the @@ -474,6 +491,7 @@ subroutine step( modeldb ) ! Update the time varying trace gases call gas_calc_all() +endif! (use_nl_physics) then #endif ! Write out the model state diff --git a/science/gungho/source/driver/gungho_init_fields_mod.X90 b/science/gungho/source/driver/gungho_init_fields_mod.X90 index 88646fc7a..421f9a881 100644 --- a/science/gungho/source/driver/gungho_init_fields_mod.X90 +++ b/science/gungho/source/driver/gungho_init_fields_mod.X90 @@ -140,6 +140,7 @@ module gungho_init_fields_mod use section_choice_config_mod, only : aerosol, aerosol_um use dust_transform_kernel_mod, only: dust_transform_kernel_type #endif + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -512,6 +513,7 @@ subroutine create_model_data( modeldb, & modeldb%clock ) #ifdef UM_PHYSICS +if (use_nl_physics) then ! Create FD prognostic fields select case ( prognostic_init_choice ) case ( init_option_fd_start_dump ) @@ -534,6 +536,7 @@ subroutine create_model_data( modeldb, & ancil_fields, & mesh, twod_mesh ) end select +endif! (use_nl_physics) then #endif end if @@ -700,6 +703,7 @@ subroutine create_model_data( modeldb, & call random_seed_io_value%set_checkpoint_write_behaviour(io_op_write_ptr) #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_spt) then do i = 1, spt_array_count stph_io_value => get_io_value(modeldb%values, trim(spt_array_names(i))) @@ -714,6 +718,7 @@ subroutine create_model_data( modeldb, & call stph_io_value%set_checkpoint_write_behaviour(io_op_write_ptr) end do end if +endif! (use_nl_physics) then #endif end if ! Initialise prognostic fields appropriately @@ -760,6 +765,7 @@ subroutine create_model_data( modeldb, & fd_fields ) ! Transform UM 2-bin dust to UKCA LFRIC 2-mode dust #ifdef UM_PHYSICS +if (use_nl_physics) then if ( aerosol == aerosol_um .and. & glomap_mode == glomap_mode_dust_and_clim ) then @@ -784,6 +790,7 @@ subroutine create_model_data( modeldb, & call depository%remove_field("dust2_mmr") end if +endif! (use_nl_physics) then #endif else call log_event("Gungho: Prognostic initialisation from an FD dump not valid "// & @@ -860,6 +867,7 @@ subroutine create_model_data( modeldb, & derived_fields) #ifdef UM_PHYSICS +if (use_nl_physics) then ! Initialise Casim numbers if they aren't coming from an LFRic dump if (microphysics_casim .and. & ( prognostic_init_choice /= init_option_checkpoint_dump ) ) then @@ -870,6 +878,7 @@ subroutine create_model_data( modeldb, & convection_fields, & initialise=.true.) end if +endif! (use_nl_physics) then #endif ! Initialise ancillary fields @@ -877,6 +886,8 @@ subroutine create_model_data( modeldb, & case ( ancil_option_none ) call log_event( "Gungho: No ancillaries to be read for this run.", LOG_LEVEL_INFO ) #ifdef UM_PHYSICS +!!! Im going to assume these options are just not called.... +!!! cant really uise: if (use_nl_physics) then ... case ( ancil_option_start_dump ) call log_event( "Gungho: Ancillaries are being read from start dump ", LOG_LEVEL_INFO ) ! Update the tiled surface temperature with the calculated tstar @@ -1019,6 +1030,7 @@ subroutine create_model_data( modeldb, & ranseed(1:random_seed_size) = 0 #ifdef UM_PHYSICS +if (use_nl_physics) then if ( .not. checkpoint_read .or. use_random_parameters ) then if ( use_spt .or. use_skeb .or. use_random_parameters ) then ! Random seed will depend on ensemble member number @@ -1035,6 +1047,7 @@ subroutine create_model_data( modeldb, & call stph_rp_init_alg( modeldb ) end if end if +endif! (use_nl_physics) then #endif if ( checkpoint_read ) then ! Read the checkpointed random seed @@ -1046,6 +1059,7 @@ subroutine create_model_data( modeldb, & end do #ifdef UM_PHYSICS +if (use_nl_physics) then ! Read arrays for SPT and SKEB schemes if (use_spt) then do i = 1, spt_array_count @@ -1074,6 +1088,7 @@ subroutine create_model_data( modeldb, & stph_io_value%data = power_law deallocate(power_law) end if +endif! (use_nl_physics) then #endif end if @@ -1099,11 +1114,13 @@ subroutine create_model_data( modeldb, & field_collection_ptr => modeldb%fields%get_field_collection("iau_fields") call read_state( field_collection_ptr ) #ifdef UM_PHYSICS +if (use_nl_physics) then if ( iau_use_pertinc ) then call log_event( 'IAU: read pertinc file in initialise', LOG_LEVEL_INFO ) field_collection_ptr => modeldb%fields%get_field_collection("iau_pert_fields") call read_state( field_collection_ptr ) end if +endif! (use_nl_physics) then #endif end if @@ -1301,10 +1318,12 @@ subroutine create_model_data( modeldb, & end if #ifdef UM_PHYSICS +if (use_nl_physics) then if ( iau_use_pertinc ) then field_collection_ptr => modeldb%fields%get_field_collection("iau_pert_fields") call field_collection_ptr%clear() end if +endif! (use_nl_physics) then #endif lbc_fields => modeldb%fields%get_field_collection("lbc_fields") diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index 8f9dbd0c0..e08280e9c 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -118,6 +118,7 @@ module gungho_model_mod #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -286,6 +287,7 @@ subroutine before_context_close(clock) mode=CHECKPOINTING, operation="once", & id_as_name=.true.) #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_spt) then do i = 1, spt_array_count call add_field( persistor%ckp_out, spt_array_names(i), & @@ -300,6 +302,7 @@ subroutine before_context_close(clock) id_as_name=.true.) end do end if +endif! (use_nl_physics) then #endif end if end if @@ -314,6 +317,7 @@ subroutine before_context_close(clock) mode=RESTARTING, operation="once", & id_as_name=.true.) #ifdef UM_PHYSICS +if (use_nl_physics) then if (use_spt) then do i = 1, spt_array_count call add_field( persistor%ckp_inp, spt_array_names(i), & @@ -328,6 +332,7 @@ subroutine before_context_close(clock) id_as_name=.true.) end do end if +endif! (use_nl_physics) then #endif end if end if @@ -897,6 +902,8 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) call create_runtime_constants() #ifdef UM_PHYSICS + +if (use_nl_physics) then if ( use_physics ) then ! Initialise time-varying trace gases call gas_calc_all() @@ -911,6 +918,7 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) ! Initialisation of UM variables related to the mesh call um_domain_init(mesh) end if +endif! (use_nl_physics) then #endif if ( perturb_init ) then @@ -1066,11 +1074,14 @@ subroutine initialise_model( mesh, modeldb ) call log_event( log_scratch_space, LOG_LEVEL_WARNING ) #ifdef UM_PHYSICS case( method_jules ) ! jules +!!! prob not needed... +if (use_nl_physics) then ! Initialise the jules timestep method allocate( timestep_method, source=jules_timestep_type(modeldb) ) ! Add to the model database call modeldb%values%add_key_value('timestep_method', & timestep_method) +endif! (use_nl_physics) then #endif case default call log_event("Gungho: Incorrect time stepping option chosen, "// & diff --git a/science/gungho/source/driver/gungho_setup_io_mod.F90 b/science/gungho/source/driver/gungho_setup_io_mod.F90 index 0ca0c2c16..6fe4599ec 100644 --- a/science/gungho/source/driver/gungho_setup_io_mod.F90 +++ b/science/gungho/source/driver/gungho_setup_io_mod.F90 @@ -166,6 +166,7 @@ module gungho_setup_io_mod use iau_config_mod, only: iau_use_pertinc #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -268,6 +269,8 @@ subroutine init_gungho_files( files_list, modeldb ) end if #ifdef UM_PHYSICS + +if (use_nl_physics) then ! Setup ancillary files if( ancil_option == ancil_option_fixed .or. & ancil_option == ancil_option_updating ) then @@ -750,6 +753,7 @@ subroutine init_gungho_files( files_list, modeldb ) xios_id="int_flux_ancil", & io_mode=FILE_MODE_READ ) ) end if +endif! (use_nl_physics) then #endif ! Setup orography ancillary file @@ -777,12 +781,15 @@ subroutine init_gungho_files( files_list, modeldb ) xios_id="iau", & io_mode=FILE_MODE_READ )) #ifdef UM_PHYSICS + +if (use_nl_physics) then ! Setup the IAU pert increments file if ( iau_use_pertinc ) then call files_list%insert_item( lfric_xios_file_type( trim(iau_pert_path), & xios_id="iau_pert", & io_mode=FILE_MODE_READ )) end if +endif! (use_nl_physics) then #endif end if diff --git a/science/gungho/source/driver/iau_multifile_io/iau_multifile_io_mod.F90 b/science/gungho/source/driver/iau_multifile_io/iau_multifile_io_mod.F90 index b223fbc54..2ba559980 100644 --- a/science/gungho/source/driver/iau_multifile_io/iau_multifile_io_mod.F90 +++ b/science/gungho/source/driver/iau_multifile_io/iau_multifile_io_mod.F90 @@ -46,6 +46,7 @@ module iau_multifile_io_mod use namelist_mod, only: namelist_type use step_calendar_mod, only: step_calendar_type + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -87,6 +88,7 @@ subroutine init_multifile_io(io_context_name, modeldb) character(str_def) :: iau_incs integer(i_def) :: iau_time +if (use_nl_physics) then if ( iau_use_addinf ) then iau_incs = 'iau_addinf_fields' call iau_incs_firstfile_io ( io_context_name, & @@ -140,7 +142,7 @@ subroutine init_multifile_io(io_context_name, modeldb) iau_time, name, filename ) end do end if - +endif! (use_nl_physics) then #endif end subroutine init_multifile_io @@ -207,6 +209,7 @@ subroutine setup_step_multifile_io( io_context_name, modeldb ) character(str_def) :: name +if (use_nl_physics) then if ( iau_use_addinf ) then call iter_addinf%initialise(modeldb%config%iau_addinf_io) do while (iter_addinf%has_next()) @@ -235,6 +238,7 @@ subroutine setup_step_multifile_io( io_context_name, modeldb ) call step_multifile_io(io_context_name, modeldb, name) end do end if +endif! (use_nl_physics) then #endif end subroutine setup_step_multifile_io diff --git a/science/gungho/source/driver/iau_time_control_mod.F90 b/science/gungho/source/driver/iau_time_control_mod.F90 index 420e58fe7..cdb45c86b 100644 --- a/science/gungho/source/driver/iau_time_control_mod.F90 +++ b/science/gungho/source/driver/iau_time_control_mod.F90 @@ -22,6 +22,7 @@ module iau_time_control_mod iau_mode_instantaneous #endif + use nl_physics_config_mod, only : use_nl_physics implicit none public :: calc_iau_ts_end, & @@ -51,6 +52,8 @@ function calc_iau_ts_num( model_clock, iau_time ) result( timestep_index ) dt = 0.0_r_def timestep_index = 0.0_i_def #ifdef UM_PHYSICS + +if (use_nl_physics) then dt = real(model_clock%get_seconds_per_step(), r_def) if ( dt <= 0.0_r_def ) then @@ -59,6 +62,7 @@ function calc_iau_ts_num( model_clock, iau_time ) result( timestep_index ) end if timestep_index = nint( iau_time / dt ) + 1.0_i_def +endif! (use_nl_physics) then #endif end function calc_iau_ts_num @@ -82,9 +86,12 @@ function calc_iau_ts_end( model_clock ) result( iau_ts_end ) iau_ts_num = 0.0_i_def iau_ts_end = 0.0_i_def #ifdef UM_PHYSICS + +if (use_nl_physics) then iau_time = iau_window_length iau_ts_num = calc_iau_ts_num( model_clock, iau_time ) iau_ts_end = iau_ts_start + iau_ts_num - 1.0_r_def +endif! (use_nl_physics) then #endif end function calc_iau_ts_end @@ -113,6 +120,8 @@ function calc_iau_weight( model_clock, iau_tendency ) result( iau_weight ) iau_ts_num = 0.0_i_def iau_weight = 0.0_r_def #ifdef UM_PHYSICS + +if (use_nl_physics) then if (iau_mode == iau_mode_instantaneous) then iau_weight = 1.0_r_def else if ( iau_tendency ) then @@ -122,6 +131,7 @@ function calc_iau_weight( model_clock, iau_tendency ) result( iau_weight ) iau_ts_num = calc_iau_ts_num( model_clock, iau_time ) iau_weight = 1.0_r_def / real( iau_ts_num, r_def ) end if +endif! (use_nl_physics) then #endif end function calc_iau_weight diff --git a/science/gungho/source/driver/nl_physics_config_mod.F90 b/science/gungho/source/driver/nl_physics_config_mod.F90 new file mode 100644 index 000000000..c9160e010 --- /dev/null +++ b/science/gungho/source/driver/nl_physics_config_mod.F90 @@ -0,0 +1,17 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2024 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 Global flag controlling whether NL physics is active. +!> @details Provides a single module-level logical that all gungho driver +!> modules use to conditionally execute UM physics code paths. +!> Set to .false. by default; set to .true. to activate full NL +!> physics (e.g. for an lfric_atm configuration). +module nl_physics_config_mod + + implicit none + + logical, public, save :: use_nl_physics = .false. + +end module nl_physics_config_mod diff --git a/science/gungho/source/physics/multidata_field_dimensions_mod.F90 b/science/gungho/source/physics/multidata_field_dimensions_mod.F90 index 35d4df533..5fc220bb3 100644 --- a/science/gungho/source/physics/multidata_field_dimensions_mod.F90 +++ b/science/gungho/source/physics/multidata_field_dimensions_mod.F90 @@ -20,6 +20,7 @@ module multidata_field_dimensions_mod urban, & urban_canyon #endif + use nl_physics_config_mod, only : use_nl_physics implicit none @@ -78,6 +79,7 @@ subroutine sync_multidata_field_dimensions() #ifdef UM_PHYSICS logical(l_def), parameter :: tolerate_missing_axes = .true. integer(i_def) :: i +if (use_nl_physics) then do i=1,size(multidata_items) call set_axis_dimension( & multidata_items(i), & @@ -122,7 +124,7 @@ subroutine sync_multidata_field_dimensions() 1, & tolerate_missing_axes) end if - +endif! (use_nl_physics) then #endif end subroutine sync_multidata_field_dimensions @@ -177,9 +179,11 @@ function get_multidata_field_dimension(multidata_item) result (dim) character(*), intent(in) :: multidata_item integer(kind=i_def) :: dim - - select case (multidata_item) +!!!! BIT of a mess bit I think this should work... #ifdef UM_PHYSICS +if (use_nl_physics) then + select case (multidata_item) +!#ifdef UM_PHYSICS case ('plant_func_types') dim = npft case ('sea_ice_categories') @@ -279,7 +283,7 @@ function get_multidata_field_dimension(multidata_item) result (dim) end if case ('') dim = 1 ! ordinary (non-multidata) field -#endif +!!!!!#endif case default if (use_xios_io) then ! attempt to get it from XIOS metadata @@ -291,6 +295,30 @@ function get_multidata_field_dimension(multidata_item) result (dim) call log_event(log_scratch_space, LOG_LEVEL_ERROR) end if end select +else! (use_nl_physics) then + if (use_xios_io) then + ! attempt to get it from XIOS metadata + dim = get_axis_dimension(multidata_item) + else + dim = 1 ! silence compiler warning + write(log_scratch_space, '(A, A)') & + 'Unexpected multidata item: ', multidata_item + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end if +endif! (use_nl_physics) then + +#else + if (use_xios_io) then + ! attempt to get it from XIOS metadata + dim = get_axis_dimension(multidata_item) + else + dim = 1 ! silence compiler warning + write(log_scratch_space, '(A, A)') & + 'Unexpected multidata item: ', multidata_item + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end if +#endif + end function get_multidata_field_dimension diff --git a/science/gungho/source/physics/time_dimensions_mod.F90 b/science/gungho/source/physics/time_dimensions_mod.F90 index 7a37fe969..05f765a85 100644 --- a/science/gungho/source/physics/time_dimensions_mod.F90 +++ b/science/gungho/source/physics/time_dimensions_mod.F90 @@ -49,6 +49,7 @@ module time_dimensions_mod use chemistry_config_mod, only: chem_scheme, chem_scheme_strattrop, & chem_scheme_strat_test #endif + use nl_physics_config_mod, only : use_nl_physics implicit none private @@ -189,12 +190,15 @@ function get_reynolds_dim() result(tdim) integer(i_def) :: tdim tdim = 0 #ifdef UM_PHYSICS + +if (use_nl_physics) then if(ancil_option == ancil_option_fixed .or. & ancil_option == ancil_option_updating ) then if (.not. get_ancil_dim(ancil_dir, sst_ancil_path, tdim)) return end if +endif! (use_nl_physics) then #endif end function get_reynolds_dim @@ -209,6 +213,8 @@ function get_emiss_dim() result(tdim) integer(i_def) :: tdim tdim = 0 #ifdef UM_PHYSICS + +if (use_nl_physics) then ! conditions and list of emiss files from gungho_setup_io_mod; ! to be safe, we try them all in sequence if (glomap_mode == glomap_mode_ukca .and. & @@ -226,6 +232,7 @@ function get_emiss_dim() result(tdim) if (get_ancil_dim(ancil_dir, emiss_so2_high_ancil_path, tdim)) return end if +endif! (use_nl_physics) then #endif end function get_emiss_dim