From 01e1ea772a5db7c478983647d254f0a360d8fd14 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:15:58 +0000 Subject: [PATCH 1/7] Lfric apps rose stem (#20) --- .global_ignores | 6 - .local_ignores | 6 - .../psykal/algorithm/checksum_alg_mod.py | 2 +- .../optimisation/nci-gadi/psykal/global.py | 2 +- applications/lfric_atm/Makefile | 2 +- applications/lfric_coupled/Makefile | 3 +- applications/ngarch/Makefile | 2 +- build/extract/extract.cfg | 386 ------------------ build/extract/extract.yaml | 363 ++++++++++++++++ build/extract/extract_physics.mk | 8 +- build/extract/extract_science.py | 135 ++++++ build/local_build.py | 116 +++--- dependencies.yaml | 54 +++ interfaces/jules_interface/build/extract.cfg | 250 ------------ interfaces/jules_interface/build/extract.yaml | 224 ++++++++++ interfaces/jules_interface/build/import.mk | 5 +- .../socrates_interface/build/extract.cfg | 54 --- .../socrates_interface/build/extract.yaml | 46 +++ interfaces/socrates_interface/build/import.mk | 5 +- rose-stem/Jinja2Filters/determine_source.py | 65 --- rose-stem/Jinja2Filters/get_precision.py | 1 - rose-stem/app/check_config_dump/rose-app.conf | 2 +- .../app/check_global_variables/rose-app.conf | 2 +- .../app/check_macro_chains/rose-app.conf | 2 +- rose-stem/app/check_style/rose-app.conf | 2 +- rose-stem/app/configurate/bin/configurate.sh | 2 +- .../bin/script_updater.sh | 36 -- .../app/export_simsys_scripts/rose-app.conf | 2 - .../app/export_source/bin/export_source.py | 73 ---- .../app/export_source/file/ctldata_list.txt | 29 -- rose-stem/app/export_source/rose-app.conf | 2 - rose-stem/app/extract_source/rose-app.conf | 13 + .../app/fcm_make_lfric2um/file/fcm-make.cfg | 5 - rose-stem/app/fcm_make_lfric2um/rose-app.conf | 8 - .../app/fcm_make_river/file/fcm-make.cfg | 2 +- rose-stem/app/fcm_make_river/rose-app.conf | 4 +- .../app/fcm_make_scintelapi/file/fcm-make.cfg | 4 - .../app/fcm_make_scintelapi/rose-app.conf | 7 - .../app/fcm_make_um2lfric/file/fcm-make.cfg | 5 - rose-stem/app/fcm_make_um2lfric/rose-app.conf | 8 - rose-stem/app/jules/rose-app.conf | 6 +- .../opt/rose-app-camembert_case3_gj1214b.conf | 2 +- .../app/lfric_atm/opt/rose-app-chemistry.conf | 4 + .../app/lfric_atm/opt/rose-app-hd209458b.conf | 2 +- .../app/lfric_atm/opt/rose-app-thai.conf | 2 +- rose-stem/app/lfric_atm/rose-app.conf | 10 +- .../lfric_coupled_atmosphere/rose-app.conf | 6 +- .../app/mesh/opt/rose-app-ral3_seuk.conf | 6 - rose-stem/app/mesh/opt/rose-app-ral3_uk.conf | 6 - rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf | 6 - .../app/rose-stem_lint_check/rose-app.conf | 2 +- rose-stem/app/rose_ana_lfric2um/rose-app.conf | 3 +- .../app/validate_rose_meta/rose-app.conf | 2 +- rose-stem/bin/extract_checker.py | 2 +- rose-stem/bin/rose-stem_lint_check.py | 2 +- rose-stem/bin/site_validator.py | 7 +- rose-stem/bin/update_branch_kgos.py | 2 +- rose-stem/flow.cylc | 71 +++- rose-stem/lib/python/read_sources.py | 66 +++ rose-stem/lib/python/utils.py | 20 + rose-stem/rose-suite.conf | 9 +- .../lfric_atm/tasks_lfric_atm_sandbox.cylc | 2 +- .../site/common/adjoint/tasks_adjoint.cylc | 2 +- .../adjoint_tests/tasks_adjoint_tests.cylc | 4 +- .../tasks_coupled_interface.cylc | 4 +- .../gravity_wave/tasks_gravity_wave.cylc | 2 +- .../site/common/gungho/tasks_gungho.cylc | 4 +- .../gungho_model/tasks_gungho_model.cylc | 2 +- .../tasks_jedi_lfric_interface.cylc | 4 +- .../tasks_jedi_lfric_tests.cylc | 2 +- rose-stem/site/common/jules/tasks_jules.cylc | 4 +- .../common/lfric2lfric/tasks_lfric2lfric.cylc | 2 +- .../common/lfric_atm/tasks_lfric_atm.cylc | 5 +- .../lfric_coupled/tasks_lfric_coupled.cylc | 4 +- .../common/lfricinputs/tasks_lfricinputs.cylc | 2 +- .../site/common/linear/tasks_linear.cylc | 4 +- .../linear_model/tasks_linear_model.cylc | 3 +- .../name_transport/tasks_name_transport.cylc | 2 +- .../site/common/ngarch/tasks_ngarch.cylc | 4 +- .../tasks_physics_schemes_interface.cylc | 4 +- .../shallow_water/tasks_shallow_water.cylc | 6 +- .../tasks_socrates_interface.cylc | 4 +- .../site/common/solver/tasks_solver.cylc | 2 +- .../common/transport/tasks_transport.cylc | 2 +- .../site/meto/groups/groups_linear_model.cylc | 7 +- .../tasks_shallow_water_azspice.cylc | 21 - .../tasks_shallow_water_ex1a.cylc | 22 - rose-stem/site/meto/variables.cylc | 10 +- .../site/nci/common/suite_config_gadi.cylc | 8 +- .../nci/common/suite_config_lfricinputs.cylc | 4 - rose-stem/templates/graph/generate_graph.cylc | 5 - .../graph/populate_graph_lfric_coupled.cylc | 10 +- .../graph/populate_graph_scripts.cylc | 8 - .../templates/populate_task_definitions.cylc | 4 +- .../runtime/generate_runtime_application.cylc | 6 +- .../runtime/generate_runtime_build.cylc | 5 +- .../runtime/generate_runtime_check.cylc | 4 +- .../runtime/generate_runtime_control.cylc | 25 +- .../generate_runtime_lfric_coupled.cylc | 13 +- .../runtime/generate_runtime_lfricinputs.cylc | 81 ---- .../runtime/generate_runtime_scripts.cylc | 17 +- .../generate_runtime_technical-tests.cylc | 9 +- 102 files changed, 1173 insertions(+), 1339 deletions(-) delete mode 100644 .global_ignores delete mode 100644 .local_ignores delete mode 100644 build/extract/extract.cfg create mode 100644 build/extract/extract.yaml create mode 100755 build/extract/extract_science.py create mode 100644 dependencies.yaml delete mode 100644 interfaces/jules_interface/build/extract.cfg create mode 100644 interfaces/jules_interface/build/extract.yaml delete mode 100644 interfaces/socrates_interface/build/extract.cfg create mode 100644 interfaces/socrates_interface/build/extract.yaml delete mode 100644 rose-stem/Jinja2Filters/determine_source.py delete mode 100755 rose-stem/app/export_simsys_scripts/bin/script_updater.sh delete mode 100644 rose-stem/app/export_simsys_scripts/rose-app.conf delete mode 100755 rose-stem/app/export_source/bin/export_source.py delete mode 100644 rose-stem/app/export_source/file/ctldata_list.txt delete mode 100644 rose-stem/app/export_source/rose-app.conf create mode 100644 rose-stem/app/extract_source/rose-app.conf delete mode 100644 rose-stem/app/fcm_make_lfric2um/file/fcm-make.cfg delete mode 100644 rose-stem/app/fcm_make_lfric2um/rose-app.conf delete mode 100644 rose-stem/app/fcm_make_scintelapi/file/fcm-make.cfg delete mode 100644 rose-stem/app/fcm_make_scintelapi/rose-app.conf delete mode 100644 rose-stem/app/fcm_make_um2lfric/file/fcm-make.cfg delete mode 100644 rose-stem/app/fcm_make_um2lfric/rose-app.conf create mode 100644 rose-stem/lib/python/read_sources.py create mode 100644 rose-stem/lib/python/utils.py delete mode 100644 rose-stem/templates/runtime/generate_runtime_lfricinputs.cylc diff --git a/.global_ignores b/.global_ignores deleted file mode 100644 index 3ccc0bc94..000000000 --- a/.global_ignores +++ /dev/null @@ -1,6 +0,0 @@ -# Global Ignore List -- svn propset svn:global-ignores -F .global_ignores . -__pycache__ -.vscode -.idea -*.pyc -.pytest_cache diff --git a/.local_ignores b/.local_ignores deleted file mode 100644 index c7cdcf359..000000000 --- a/.local_ignores +++ /dev/null @@ -1,6 +0,0 @@ -# Local Ignore List -- svn propset svn:ignore -F .local_ignores ./Directory/to/Apply -bin -working -documentation -lsp -test diff --git a/applications/jules/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py b/applications/jules/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py index 47eaa4dd3..c9f9f6502 120000 --- a/applications/jules/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py +++ b/applications/jules/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py @@ -1 +1 @@ -./../../../meto-xc40/psykal/algorithm/checksum_alg_mod.py \ No newline at end of file +../../../meto-ex1a/psykal/algorithm/checksum_alg_mod.py \ No newline at end of file diff --git a/applications/jules/optimisation/nci-gadi/psykal/global.py b/applications/jules/optimisation/nci-gadi/psykal/global.py index 02c220077..982b2e0cb 120000 --- a/applications/jules/optimisation/nci-gadi/psykal/global.py +++ b/applications/jules/optimisation/nci-gadi/psykal/global.py @@ -1 +1 @@ -./../../meto-xc40/psykal/global.py \ No newline at end of file +../../meto-ex1a/psykal/global.py \ No newline at end of file diff --git a/applications/lfric_atm/Makefile b/applications/lfric_atm/Makefile index 8342bfb62..98f689dee 100644 --- a/applications/lfric_atm/Makefile +++ b/applications/lfric_atm/Makefile @@ -75,7 +75,7 @@ build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = YES build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -exec egrep -l "^\s*program" {} \;))) build: export PROJECT = lfric_atm -build: export SCRATCH_DIR := $(WORKING_DIR)/../um-scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch build: export WORKING_DIR := $(WORKING_DIR) build: export LDFLAGS_GROUPS = OPENMP diff --git a/applications/lfric_coupled/Makefile b/applications/lfric_coupled/Makefile index 4b9597cb6..bf65bb5d7 100644 --- a/applications/lfric_coupled/Makefile +++ b/applications/lfric_coupled/Makefile @@ -102,7 +102,7 @@ document-api: api-documentation build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = TRUE build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) -build: export SCRATCH_DIR := $(WORKING_DIR)/../um-scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR)/$(PROJECT_NAME) @@ -139,7 +139,6 @@ build: ALWAYS $(call MESSAGE,========================================) $(call MESSAGE,Extracting $(PROJECT_NAME)) $(call MESSAGE,========================================) - $Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/build/extract/extract_physics.mk $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ SOURCE_DIR=source $(call MESSAGE,=========================================================) diff --git a/applications/ngarch/Makefile b/applications/ngarch/Makefile index 00c5bbb73..9fa685560 100644 --- a/applications/ngarch/Makefile +++ b/applications/ngarch/Makefile @@ -100,7 +100,7 @@ document-api: api-documentation build: export BIN_DIR ?= $(PROJECT_DIR)/bin build: export CXX_LINK = TRUE build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) -build: export SCRATCH_DIR := $(WORKING_DIR)/../um-scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/../physics_scratch build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR) diff --git a/build/extract/extract.cfg b/build/extract/extract.cfg deleted file mode 100644 index faccb193e..000000000 --- a/build/extract/extract.cfg +++ /dev/null @@ -1,386 +0,0 @@ -############################################################################## -# (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. -############################################################################## - -steps = extract - -extract.ns = casim ukca - -# There are two reasons for choosing to override the UM's configs to restrict -# how much of the project sources are extracted. -# -# The UM code base is large and much of it is not needed by LFRic, so we -# can save on a bit of resource and time by only taking what we need. -# -# The UM code base also contains a lot of code that is incompatible with -# LFRic; so we must be careful what is extracted to avoid compilation failures. -# -# If you find yourself needing 3 or more files from a directory it is fair to -# pull in the whole directory. However be careful of the situation where there -# are multiple implementations of a module. Make sure you only pull in versions -# of modules that are compatible with the lfric_atm build. - -extract.location{primary}[casim] = fcm:casim.xm -extract.location[casim] = trunk@$casim_rev -extract.location{diff}[casim] = $casim_sources -extract.path-excl[casim] = / # everything -extract.path-incl[casim] = \ - src/accretion.F90 \ - src/activation.F90 \ - src/adjust_deposition.F90 \ - src/aerosol_routines.F90 \ - src/aggregation.F90 \ - src/autoconversion.F90 \ - src/breakup.F90 \ - src/casim_moments_mod.F90 \ - src/casim_parent.F90 \ - src/casim_reflec_mod.F90 \ - src/casim_runtime.F90 \ - src/casim_stph.F90 \ - src/cloud_fraction_dummy.F90 \ - src/condensation.F90 \ - src/derived_constants.F90 \ - src/distributions.F90 \ - src/evaporation.F90 \ - src/gauss_4A_func.F90 \ - src/generic_diagnostic_variables.F90 \ - src/graupel_embryo.F90 \ - src/graupel_wetgrowth.F90 \ - src/homogeneous_freezing.F90 \ - src/ice_accretion.F90 \ - src/ice_deposition.F90 \ - src/ice_melting.F90 \ - src/ice_multiplication.F90 \ - src/ice_nucleation.F90 \ - src/initialize.F90 \ - src/lognormal_funcs.F90 \ - src/lookup.F90 \ - src/m3_incs.F90 \ - src/micro_main.F90 \ - src/mphys_constants.F90 \ - src/mphys_parameters.F90 \ - src/mphys_switches.F90 \ - src/mphys_tidy.F90 \ - src/passive_fields.F90 \ - src/precision.F90 \ - src/preconditioning.F90 \ - src/process_routines.F90 \ - src/qsat_casim_func.F90 \ - src/sedimentation.F90 \ - src/shipway_activation/shipway_activation_mod.F90 \ - src/shipway_activation/shipway_constants.F90 \ - src/shipway_activation/shipway_lookup.F90 \ - src/shipway_activation/shipway_parameters.F90 \ - src/snow_autoconversion.F90 \ - src/special.F90 \ - src/sum_procs.F90 \ - src/sweepout_rate.F90 \ - src/thresholds.F90 \ - src/type_aerosol.F90 \ - src/type_process.F90 \ - src/variable_precision.F90 \ - src/ventfac.F90 \ - src/which_mode_to_use.F90 - -extract.location{primary}[ukca] = fcm:ukca.xm -extract.location[ukca] = trunk@$ukca_rev -extract.location{diff}[ukca] = $ukca_sources -extract.path-excl[ukca] = / # everything -extract.path-incl[ukca] = \ - src/control/core/diagnostics/asad_chem_flux_diags.F90 \ - src/control/core/diagnostics/asad_diags_output_ctl_mod.F90 \ - src/control/core/diagnostics/asad_flux_dat.F90 \ - src/control/core/diagnostics/get_nmvoc_mod.F90 \ - src/control/core/diagnostics/get_noy_mod.F90 \ - src/control/core/diagnostics/ukca_diags_output_ctl_mod.F90 \ - src/control/core/diagnostics/ukca_emdiags_struct_mod.F90 \ - src/control/core/diagnostics/ukca_emiss_diags_mod.F90 \ - src/control/core/diagnostics/ukca_emiss_diags_mode_mod.F90 \ - src/control/core/diagnostics/ukca_mode_diags_mod.F90 \ - src/control/core/diagnostics/ukca_offline_oxidants_diags_mod.F90 \ - src/control/core/diagnostics/ukca_pm_diags_mod.F90 \ - src/control/core/diagnostics/ukca_raq_diags_mod.F90 \ - src/control/core/diagnostics/ukca_tracer_vars.F90 \ - src/control/core/diagnostics/ukca_update_emdiagstruct_mod.F90 \ - src/control/core/interface/common_mode_setup_interface_mod.F90 \ - src/control/core/interface/glomap_clim_mode_setup_interface_mod.F90 \ - src/control/core/interface/ukca_api_mod.F90 \ - src/control/core/interface/ukca_config_specification_mod.F90 \ - src/control/core/interface/ukca_config_constants_mod.F90 \ - src/control/core/interface/ukca_constants_setup_mod.F90 \ - src/control/core/interface/ukca_diagnostics_init_mod.F90 \ - src/control/core/interface/ukca_diagnostics_master_mod.F90 \ - src/control/core/interface/ukca_diagnostics_output_mod.F90 \ - src/control/core/interface/ukca_diagnostics_requests_mod.F90 \ - src/control/core/interface/ukca_diagnostics_set_ptrs_mod.F90 \ - src/control/core/interface/ukca_diagnostics_type_mod.F90 \ - src/control/core/interface/ukca_environment_diags_mod.F90 \ - src/control/core/interface/ukca_emiss_api_mod.F90 \ - src/control/core/interface/ukca_environment_check_mod.F90 \ - src/control/core/interface/ukca_environment_fields_mod.F90 \ - src/control/core/interface/ukca_environment_mod.F90 \ - src/control/core/interface/ukca_environment_rdim_mod.F90 \ - src/control/core/interface/ukca_environment_req_mod.F90 \ - src/control/core/interface/ukca_fieldname_mod.F90 \ - src/control/core/interface/ukca_mode_setup_interface_mod.F90 \ - src/control/core/interface/ukca_ntp_mod.F90 \ - src/control/core/interface/ukca_pr_inputs_mod.F90 \ - src/control/core/interface/ukca_tracers_mod.F90 \ - src/control/core/misc/ukca_missing_data_mod.F90 \ - src/control/core/misc/ukca_types_mod.F90 \ - src/control/core/top_level/ukca_age_air_mod.F90 \ - src/control/core/top_level/ukca_config_defs_mod.F90 \ - src/control/core/top_level/ukca_humidity_mod.F90 \ - src/control/core/top_level/ukca_iniasad.F90 \ - src/control/core/top_level/ukca_init.F90 \ - src/control/core/top_level/ukca_main1-ukca_main1.F90 \ - src/control/core/top_level/ukca_setup_mod.F90 \ - src/control/core/top_level/ukca_solang.F90 \ - src/control/core/top_level/ukca_step_control_mod.F90 \ - src/control/core/top_level/ukca_step_mod.F90 \ - src/control/core/top_level/ukca_time_mod.F90 \ - src/control/core/top_level/ukca_tropopause.F90 \ - src/control/glomap_clim/interface/glomap_clim_interface_mod.F90 \ - src/control/photolysis/interface/photol_api_mod.F90 \ - src/control/photolysis/interface/photol_calc_ozonecol_mod.F90 \ - src/control/photolysis/interface/photol_check_environment_mod.F90 \ - src/control/photolysis/interface/photol_config_specification_mod.F90 \ - src/control/photolysis/interface/photol_constants_mod.F90 \ - src/control/photolysis/interface/photol_ctl_mod.F90 \ - src/control/photolysis/interface/photol_environment_mod.F90 \ - src/control/photolysis/interface/photol_fieldname_mod.F90 \ - src/control/photolysis/interface/photol_setup_mod.F90 \ - src/control/photolysis/interface/photol_step_control.F90 \ - src/control/shared/ukca_error_mod.F90 \ - src/science/core/aerosols/activation/ukca_abdulrazzak_ghan.F90 \ - src/science/core/aerosols/activation/ukca_activ_mod.F90 \ - src/science/core/aerosols/activation/ukca_activate.F90 \ - src/science/core/aerosols/activation/ukca_cdnc_jones_mod.F90 \ - src/science/core/aerosols/activation/ukca_cloudproc.F90 \ - src/science/core/aerosols/activation/ukca_fixeds.F90 \ - src/science/core/aerosols/deposition/ukca_dcoff_par_av_k.F90 \ - src/science/core/aerosols/deposition/ukca_ddepaer_coeff_mod.F90 \ - src/science/core/aerosols/deposition/ukca_ddepaer_incl_sedi_mod.F90 \ - src/science/core/aerosols/deposition/ukca_ddepaer_mod.F90 \ - src/science/core/aerosols/deposition/ukca_impc_scav.F90 \ - src/science/core/aerosols/deposition/ukca_impc_scav_dust_mod.F90 \ - src/science/core/aerosols/deposition/ukca_rainout.F90 \ - src/science/core/aerosols/deposition/ukca_vgrav_av_k.F90 \ - src/science/core/aerosols/glomap/ukca_aero_ctl.F90 \ - src/science/core/aerosols/glomap/ukca_aero_step.F90 \ - src/science/core/aerosols/glomap/ukca_ageing.F90 \ - src/science/core/aerosols/glomap/ukca_binapara_mod.F90 \ - src/science/core/aerosols/glomap/ukca_calc_coag_kernel.F90 \ - src/science/core/aerosols/glomap/ukca_calc_drydiam.F90 \ - src/science/core/aerosols/glomap/ukca_calcminmaxgc.F90 \ - src/science/core/aerosols/glomap/ukca_calcminmaxndmdt.F90 \ - src/science/core/aerosols/glomap/ukca_calcnucrate.F90 \ - src/science/core/aerosols/glomap/ukca_check_md_nd.F90 \ - src/science/core/aerosols/glomap/ukca_check_radaer_coupling_mod.F90 \ - src/science/core/aerosols/glomap/ukca_coag_coff_v.F90 \ - src/science/core/aerosols/glomap/ukca_coagwithnucl.F90 \ - src/science/core/aerosols/glomap/ukca_coarse_no3_mod.F90 \ - src/science/core/aerosols/glomap/ukca_cond_coff_v.F90 \ - src/science/core/aerosols/glomap/ukca_conden.F90 \ - src/science/core/aerosols/glomap/ukca_drydiam_field_mod.F90 \ - src/science/core/aerosols/glomap/ukca_fine_no3_mod.F90 \ - src/science/core/aerosols/glomap/ukca_mode_check_artefacts_mod.F90 \ - src/science/core/aerosols/glomap/ukca_mode_setup.F90 \ - src/science/core/aerosols/glomap/ukca_mode_tracer_maps_mod.F90 \ - src/science/core/aerosols/glomap/ukca_mode_verbose_mod.F90 \ - src/science/core/aerosols/glomap/ukca_remode.F90 \ - src/science/core/aerosols/glomap/ukca_setup_indices.F90 \ - src/science/core/aerosols/glomap/ukca_solvecoagnucl_v.F90 \ - src/science/core/aerosols/glomap/ukca_vapour.F90 \ - src/science/core/aerosols/glomap/ukca_volume_mode.F90 \ - src/science/core/aerosols/glomap/ukca_water_content_v.F90 \ - src/science/core/aerosols/glomap/ukca_wetox.F90 \ - src/science/core/chemistry/asad/asad_bedriv.F90 \ - src/science/core/chemistry/asad/asad_bimol.F90 \ - src/science/core/chemistry/asad/asad_cdrive.F90 \ - src/science/core/chemistry/asad/asad_cinit.F90 \ - src/science/core/chemistry/asad/asad_diffun.F90 \ - src/science/core/chemistry/asad/asad_findreaction.F90 \ - src/science/core/chemistry/asad/asad_ftoy.F90 \ - src/science/core/chemistry/asad/asad_fuljac.F90 \ - src/science/core/chemistry/asad/asad_fyfixr.F90 \ - src/science/core/chemistry/asad/asad_fyinit.F90 \ - src/science/core/chemistry/asad/asad_fyself.F90 \ - src/science/core/chemistry/asad/asad_hetero.F90 \ - src/science/core/chemistry/asad/asad_impact.F90 \ - src/science/core/chemistry/asad/asad_inicnt.F90 \ - src/science/core/chemistry/asad/asad_inicnt_col_mod.F90 \ - src/science/core/chemistry/asad/asad_inijac.F90 \ - src/science/core/chemistry/asad/asad_inimpct.F90 \ - src/science/core/chemistry/asad/asad_inix.F90 \ - src/science/core/chemistry/asad/asad_inrats.F90 \ - src/science/core/chemistry/asad/asad_jac.F90 \ - src/science/core/chemistry/asad/asad_mod.F90 \ - src/science/core/chemistry/asad/asad_posthet.F90 \ - src/science/core/chemistry/asad/asad_prls.F90 \ - src/science/core/chemistry/asad/asad_setsteady.F90 \ - src/science/core/chemistry/asad/asad_sparse_vars.F90 \ - src/science/core/chemistry/asad/asad_spimpmjp.F90 \ - src/science/core/chemistry/asad/asad_spmjpdriv.F90 \ - src/science/core/chemistry/asad/asad_steady.F90 \ - src/science/core/chemistry/asad/asad_totnud.F90 \ - src/science/core/chemistry/asad/asad_trimol.F90 \ - src/science/core/chemistry/asad/ukca_drydep.F90 \ - src/science/core/chemistry/asad/ukca_inddep.F90 \ - src/science/core/chemistry/asad/ukca_inwdep.F90 \ - src/science/core/chemistry/asad/ukca_photol.F90 \ - src/science/core/chemistry/asad/ukca_wetdep.F90 \ - src/science/core/chemistry/deposition/ukca_aerod.F90 \ - src/science/core/chemistry/deposition/ukca_be_drydep.F90 \ - src/science/core/chemistry/deposition/ukca_be_wetdep.F90 \ - src/science/core/chemistry/deposition/ukca_ddcalc.F90 \ - src/science/core/chemistry/deposition/ukca_ddepctl.F90 \ - src/science/core/chemistry/deposition/ukca_ddepo3_ocean_mod.F90 \ - src/science/core/chemistry/deposition/ukca_ddeprt.F90 \ - src/science/core/chemistry/deposition/ukca_surfddr.F90 \ - src/science/core/chemistry/deposition/ukca_wdeprt.F90 \ - src/science/core/chemistry/get_molmass_mod.F90 \ - src/science/core/chemistry/ukca_calc_cloud_ph_mod.F90 \ - src/science/core/chemistry/ukca_ch4_stratloss.F90 \ - src/science/core/chemistry/ukca_chem1_dat.F90 \ - src/science/core/chemistry/ukca_chem_aer.F90 \ - src/science/core/chemistry/ukca_chem_defs_mod.F90 \ - src/science/core/chemistry/ukca_chem_diags_mod.F90 \ - src/science/core/chemistry/ukca_chem_master.F90 \ - src/science/core/chemistry/ukca_chem_offline.F90 \ - src/science/core/chemistry/ukca_chem_raq.F90 \ - src/science/core/chemistry/ukca_chem_raqaero_mod.F90 \ - src/science/core/chemistry/ukca_chemco.F90 \ - src/science/core/chemistry/ukca_chemco_raq.F90 \ - src/science/core/chemistry/ukca_chemco_raq_init_mod.F90 \ - src/science/core/chemistry/ukca_chemistry_ctl.F90 \ - src/science/core/chemistry/ukca_chemistry_ctl_BE_mod.F90 \ - src/science/core/chemistry/ukca_chemistry_ctl_col_mod.F90 \ - src/science/core/chemistry/ukca_chemistry_ctl_tropraq_mod.F90 \ - src/science/core/chemistry/ukca_chemistry_ctl_full_mod.F90 \ - src/science/core/chemistry/ukca_chemistry_setup.F90 \ - src/science/core/chemistry/ukca_chemistry_cleanup.F90 \ - src/science/core/chemistry/ukca_conserve_mod.F90 \ - src/science/core/chemistry/ukca_constants.F90 \ - src/science/core/chemistry/ukca_cspecies.F90 \ - src/science/core/chemistry/ukca_deriv.F90 \ - src/science/core/chemistry/ukca_deriv_aero.F90 \ - src/science/core/chemistry/ukca_deriv_raq.F90 \ - src/science/core/chemistry/ukca_deriv_raqaero_mod.F90 \ - src/science/core/chemistry/ukca_diurnal_oxidant.F90 \ - src/science/core/chemistry/ukca_fdiss.F90 \ - src/science/core/chemistry/ukca_fdiss_constant_mod.F90 \ - src/science/core/chemistry/ukca_fracdiss.F90 \ - src/science/core/chemistry/ukca_hetero_mod.F90 \ - src/science/core/chemistry/ukca_sediment.F90 \ - src/science/core/chemistry/ukca_setup_chem_mod.F90 \ - src/science/core/chemistry/ukca_stratf.F90 \ - src/science/core/chemistry/ukca_top_boundary.F90 \ - src/science/core/chemistry/ukca_transform_halogen.F90 \ - src/science/core/chemistry/ukca_trop_hetchem.F90 \ - src/science/core/emissions/ukca_add_emiss_mod.F90 \ - src/science/core/emissions/ukca_aer_no3_mod.F90 \ - src/science/core/emissions/ukca_calc_rho_mod.F90 \ - src/science/core/emissions/ukca_day_of_week_mod.F90 \ - src/science/core/emissions/ukca_diurnal_isop_ems.F90 \ - src/science/core/emissions/ukca_dms_flux_mod.F90 \ - src/science/core/emissions/ukca_emiss_ctl_mod.F90 \ - src/science/core/emissions/ukca_emiss_factors.F90 \ - src/science/core/emissions/ukca_emiss_mod.F90 \ - src/science/core/emissions/ukca_emiss_mode_mod.F90 \ - src/science/core/emissions/ukca_emiss_struct_mod.F90 \ - src/science/core/emissions/ukca_ingridg.F90 \ - src/science/core/emissions/ukca_light.F90 \ - src/science/core/emissions/ukca_light_ctl.F90 \ - src/science/core/emissions/ukca_prim_du_mod.F90 \ - src/science/core/emissions/ukca_prim_moc.F90 \ - src/science/core/emissions/ukca_prim_ss.F90 \ - src/science/core/emissions/ukca_prod_no3_mod.F90 \ - src/science/core/emissions/ukca_scenario_common.F90 \ - src/science/core/emissions/ukca_scenario_ctl_mod.F90 \ - src/science/core/emissions/ukca_scenario_prescribed.F90 \ - src/science/core/emissions/ukca_scenario_wmoa1.F90 \ - src/science/glomap_clim/get_gc_aerosol_fields_1d_mod.F90 \ - src/science/glomap_clim/glomap_clim_calc_aird_mod.F90 \ - src/science/glomap_clim/glomap_clim_calc_md_mdt_nd_mod.F90 \ - src/science/glomap_clim/glomap_clim_calc_rh_frac_clear_mod.F90 \ - src/science/glomap_clim/glomap_clim_pop_md_mdt_nd_mod.F90 \ - src/science/photolysis/fastjx/fastjx_data.F90 \ - src/science/photolysis/fastjx/fastjx_extral.F90 \ - src/science/photolysis/fastjx/fastjx_jratet.F90 \ - src/science/photolysis/fastjx/fastjx_miesct.F90 \ - src/science/photolysis/fastjx/fastjx_opmie.F90 \ - src/science/photolysis/fastjx/fastjx_photoj.F90 \ - src/science/photolysis/fastjx/fastjx_read_ascii.F90 \ - src/science/photolysis/fastjx/fastjx_set_aer.F90 \ - src/science/photolysis/fastjx/fastjx_solar2.F90 \ - src/science/photolysis/fastjx/fastjx_sphere.F90 \ - src/science/photolysis/fastjx/photol_solflux_mod.F90 \ - src/science/photolysis/fastjx/ukca_fastjx.F90 \ - src/science/photolysis/stratospheric/photolib/acsbrcl_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsccl4_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acscnit_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acscos_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acscs2_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsdbrm_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsf11_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsf12_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsf22_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsh2o2_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsh2so4_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acshno3_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsmc_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsmena_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsn2o5_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsn2o_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsno2_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsno_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acso3_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acso3w_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acsso3_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acssr_mod.F90 \ - src/science/photolysis/stratospheric/photolib/acssrw_mod.F90 \ - src/science/photolysis/stratospheric/photolib/calcjs_mod.F90 \ - src/science/photolysis/stratospheric/photolib/cso2o3_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ei1_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ei2_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ei3_mod.F90 \ - src/science/photolysis/stratospheric/photolib/fill_spectra_mod.F90 \ - src/science/photolysis/stratospheric/photolib/inijtab_mod.F90 \ - src/science/photolysis/stratospheric/photolib/invert_mod.F90 \ - src/science/photolysis/stratospheric/photolib/isrchfgt_mod.F90 \ - src/science/photolysis/stratospheric/photolib/lubksb_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ludcmp_mod.F90 \ - src/science/photolysis/stratospheric/photolib/lymana_mod.F90 \ - src/science/photolysis/stratospheric/photolib/quanto12_mod.F90 \ - src/science/photolysis/stratospheric/photolib/quanto1d_mod.F90 \ - src/science/photolysis/stratospheric/photolib/scatcs_mod.F90 \ - src/science/photolysis/stratospheric/photolib/settab_mod.F90 \ - src/science/photolysis/stratospheric/photolib/setzen_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ukca_crossec_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ukca_parpho_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ukca_stdto3_mod.F90 \ - src/science/photolysis/stratospheric/photolib/ukca_tbjs_mod.F90 \ - src/science/photolysis/stratospheric/ukca_um_dissoc_mod.F90 \ - src/science/photolysis/stratospheric/ukca_um_strat_photol_mod.F90 \ - src/science/photolysis/tropospheric/photol_curve_mod.F90 \ - src/science/photolysis/tropospheric/ukca_flupj.F90 \ - src/science/photolysis/tropospheric/ukca_phot2d.F90 \ - src/science/plumeria/plumeria_FindT.F90 \ - src/science/plumeria/plumeria_cashkarp.F90 \ - src/science/plumeria/plumeria_derivs.F90 \ - src/science/plumeria/plumeria_functions.F90 \ - src/science/plumeria/plumeria_main.F90 \ - src/science/plumeria/plumeria_param.F90 \ - src/science/radaer/def_ukca_radaer_presc.F90 \ - src/science/radaer/spcrg3a_mod.F90 \ - src/science/radaer/ukca_radaer_band_average.F90 \ - src/science/radaer/ukca_radaer_compute_aod.F90 \ - src/science/radaer/ukca_radaer_lut_mod.F90 \ - src/science/radaer/ukca_radaer_populate_lut_mod.F90 \ - src/science/radaer/ukca_radaer_precalc_mod.F90 \ - src/science/radaer/ukca_radaer_prepare.F90 \ - src/science/radaer/ukca_radaer_ri_calc_mod.F90 \ - src/science/radaer/ukca_radaer_tlut_mod.F90 diff --git a/build/extract/extract.yaml b/build/extract/extract.yaml new file mode 100644 index 000000000..d5fdeebee --- /dev/null +++ b/build/extract/extract.yaml @@ -0,0 +1,363 @@ +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +# The key for each section should be a repository in the dependencies.yaml file +# It then expects a list of files and directories + +casim: + - src/accretion.F90 + - src/activation.F90 + - src/adjust_deposition.F90 + - src/aerosol_routines.F90 + - src/aggregation.F90 + - src/autoconversion.F90 + - src/breakup.F90 + - src/casim_moments_mod.F90 + - src/casim_parent.F90 + - src/casim_reflec_mod.F90 + - src/casim_runtime.F90 + - src/casim_stph.F90 + - src/cloud_fraction_dummy.F90 + - src/condensation.F90 + - src/derived_constants.F90 + - src/distributions.F90 + - src/evaporation.F90 + - src/gauss_4A_func.F90 + - src/generic_diagnostic_variables.F90 + - src/graupel_embryo.F90 + - src/graupel_wetgrowth.F90 + - src/homogeneous_freezing.F90 + - src/ice_accretion.F90 + - src/ice_deposition.F90 + - src/ice_melting.F90 + - src/ice_multiplication.F90 + - src/ice_nucleation.F90 + - src/initialize.F90 + - src/lognormal_funcs.F90 + - src/lookup.F90 + - src/m3_incs.F90 + - src/micro_main.F90 + - src/mphys_constants.F90 + - src/mphys_parameters.F90 + - src/mphys_switches.F90 + - src/mphys_tidy.F90 + - src/passive_fields.F90 + - src/precision.F90 + - src/preconditioning.F90 + - src/process_routines.F90 + - src/qsat_casim_func.F90 + - src/sedimentation.F90 + - src/shipway_activation/shipway_activation_mod.F90 + - src/shipway_activation/shipway_constants.F90 + - src/shipway_activation/shipway_lookup.F90 + - src/shipway_activation/shipway_parameters.F90 + - src/snow_autoconversion.F90 + - src/special.F90 + - src/sum_procs.F90 + - src/sweepout_rate.F90 + - src/thresholds.F90 + - src/type_aerosol.F90 + - src/type_process.F90 + - src/variable_precision.F90 + - src/ventfac.F90 + - src/which_mode_to_use.F90 + +ukca: + - src/control/core/diagnostics/asad_chem_flux_diags.F90 + - src/control/core/diagnostics/asad_diags_output_ctl_mod.F90 + - src/control/core/diagnostics/asad_flux_dat.F90 + - src/control/core/diagnostics/get_nmvoc_mod.F90 + - src/control/core/diagnostics/get_noy_mod.F90 + - src/control/core/diagnostics/ukca_diags_output_ctl_mod.F90 + - src/control/core/diagnostics/ukca_emdiags_struct_mod.F90 + - src/control/core/diagnostics/ukca_emiss_diags_mod.F90 + - src/control/core/diagnostics/ukca_emiss_diags_mode_mod.F90 + - src/control/core/diagnostics/ukca_mode_diags_mod.F90 + - src/control/core/diagnostics/ukca_offline_oxidants_diags_mod.F90 + - src/control/core/diagnostics/ukca_pm_diags_mod.F90 + - src/control/core/diagnostics/ukca_raq_diags_mod.F90 + - src/control/core/diagnostics/ukca_tracer_vars.F90 + - src/control/core/diagnostics/ukca_update_emdiagstruct_mod.F90 + - src/control/core/interface/common_mode_setup_interface_mod.F90 + - src/control/core/interface/glomap_clim_mode_setup_interface_mod.F90 + - src/control/core/interface/ukca_api_mod.F90 + - src/control/core/interface/ukca_config_specification_mod.F90 + - src/control/core/interface/ukca_config_constants_mod.F90 + - src/control/core/interface/ukca_constants_setup_mod.F90 + - src/control/core/interface/ukca_diagnostics_init_mod.F90 + - src/control/core/interface/ukca_diagnostics_master_mod.F90 + - src/control/core/interface/ukca_diagnostics_output_mod.F90 + - src/control/core/interface/ukca_diagnostics_requests_mod.F90 + - src/control/core/interface/ukca_diagnostics_set_ptrs_mod.F90 + - src/control/core/interface/ukca_diagnostics_type_mod.F90 + - src/control/core/interface/ukca_environment_diags_mod.F90 + - src/control/core/interface/ukca_emiss_api_mod.F90 + - src/control/core/interface/ukca_environment_check_mod.F90 + - src/control/core/interface/ukca_environment_fields_mod.F90 + - src/control/core/interface/ukca_environment_mod.F90 + - src/control/core/interface/ukca_environment_rdim_mod.F90 + - src/control/core/interface/ukca_environment_req_mod.F90 + - src/control/core/interface/ukca_fieldname_mod.F90 + - src/control/core/interface/ukca_mode_setup_interface_mod.F90 + - src/control/core/interface/ukca_ntp_mod.F90 + - src/control/core/interface/ukca_pr_inputs_mod.F90 + - src/control/core/interface/ukca_tracers_mod.F90 + - src/control/core/misc/ukca_missing_data_mod.F90 + - src/control/core/misc/ukca_types_mod.F90 + - src/control/core/top_level/ukca_age_air_mod.F90 + - src/control/core/top_level/ukca_config_defs_mod.F90 + - src/control/core/top_level/ukca_humidity_mod.F90 + - src/control/core/top_level/ukca_iniasad.F90 + - src/control/core/top_level/ukca_init.F90 + - src/control/core/top_level/ukca_main1-ukca_main1.F90 + - src/control/core/top_level/ukca_setup_mod.F90 + - src/control/core/top_level/ukca_solang.F90 + - src/control/core/top_level/ukca_step_control_mod.F90 + - src/control/core/top_level/ukca_step_mod.F90 + - src/control/core/top_level/ukca_time_mod.F90 + - src/control/core/top_level/ukca_tropopause.F90 + - src/control/glomap_clim/interface/glomap_clim_interface_mod.F90 + - src/control/photolysis/interface/photol_api_mod.F90 + - src/control/photolysis/interface/photol_calc_ozonecol_mod.F90 + - src/control/photolysis/interface/photol_check_environment_mod.F90 + - src/control/photolysis/interface/photol_config_specification_mod.F90 + - src/control/photolysis/interface/photol_constants_mod.F90 + - src/control/photolysis/interface/photol_ctl_mod.F90 + - src/control/photolysis/interface/photol_environment_mod.F90 + - src/control/photolysis/interface/photol_fieldname_mod.F90 + - src/control/photolysis/interface/photol_setup_mod.F90 + - src/control/photolysis/interface/photol_step_control.F90 + - src/control/shared/ukca_error_mod.F90 + - src/science/core/aerosols/activation/ukca_abdulrazzak_ghan.F90 + - src/science/core/aerosols/activation/ukca_activ_mod.F90 + - src/science/core/aerosols/activation/ukca_activate.F90 + - src/science/core/aerosols/activation/ukca_cdnc_jones_mod.F90 + - src/science/core/aerosols/activation/ukca_cloudproc.F90 + - src/science/core/aerosols/activation/ukca_fixeds.F90 + - src/science/core/aerosols/deposition/ukca_dcoff_par_av_k.F90 + - src/science/core/aerosols/deposition/ukca_ddepaer_coeff_mod.F90 + - src/science/core/aerosols/deposition/ukca_ddepaer_incl_sedi_mod.F90 + - src/science/core/aerosols/deposition/ukca_ddepaer_mod.F90 + - src/science/core/aerosols/deposition/ukca_impc_scav.F90 + - src/science/core/aerosols/deposition/ukca_impc_scav_dust_mod.F90 + - src/science/core/aerosols/deposition/ukca_rainout.F90 + - src/science/core/aerosols/deposition/ukca_vgrav_av_k.F90 + - src/science/core/aerosols/glomap/ukca_aero_ctl.F90 + - src/science/core/aerosols/glomap/ukca_aero_step.F90 + - src/science/core/aerosols/glomap/ukca_ageing.F90 + - src/science/core/aerosols/glomap/ukca_binapara_mod.F90 + - src/science/core/aerosols/glomap/ukca_calc_coag_kernel.F90 + - src/science/core/aerosols/glomap/ukca_calc_drydiam.F90 + - src/science/core/aerosols/glomap/ukca_calcminmaxgc.F90 + - src/science/core/aerosols/glomap/ukca_calcminmaxndmdt.F90 + - src/science/core/aerosols/glomap/ukca_calcnucrate.F90 + - src/science/core/aerosols/glomap/ukca_check_md_nd.F90 + - src/science/core/aerosols/glomap/ukca_check_radaer_coupling_mod.F90 + - src/science/core/aerosols/glomap/ukca_coag_coff_v.F90 + - src/science/core/aerosols/glomap/ukca_coagwithnucl.F90 + - src/science/core/aerosols/glomap/ukca_coarse_no3_mod.F90 + - src/science/core/aerosols/glomap/ukca_cond_coff_v.F90 + - src/science/core/aerosols/glomap/ukca_conden.F90 + - src/science/core/aerosols/glomap/ukca_drydiam_field_mod.F90 + - src/science/core/aerosols/glomap/ukca_fine_no3_mod.F90 + - src/science/core/aerosols/glomap/ukca_mode_check_artefacts_mod.F90 + - src/science/core/aerosols/glomap/ukca_mode_setup.F90 + - src/science/core/aerosols/glomap/ukca_mode_tracer_maps_mod.F90 + - src/science/core/aerosols/glomap/ukca_mode_verbose_mod.F90 + - src/science/core/aerosols/glomap/ukca_remode.F90 + - src/science/core/aerosols/glomap/ukca_setup_indices.F90 + - src/science/core/aerosols/glomap/ukca_solvecoagnucl_v.F90 + - src/science/core/aerosols/glomap/ukca_vapour.F90 + - src/science/core/aerosols/glomap/ukca_volume_mode.F90 + - src/science/core/aerosols/glomap/ukca_water_content_v.F90 + - src/science/core/aerosols/glomap/ukca_wetox.F90 + - src/science/core/chemistry/asad/asad_bedriv.F90 + - src/science/core/chemistry/asad/asad_bimol.F90 + - src/science/core/chemistry/asad/asad_cdrive.F90 + - src/science/core/chemistry/asad/asad_cinit.F90 + - src/science/core/chemistry/asad/asad_diffun.F90 + - src/science/core/chemistry/asad/asad_findreaction.F90 + - src/science/core/chemistry/asad/asad_ftoy.F90 + - src/science/core/chemistry/asad/asad_fuljac.F90 + - src/science/core/chemistry/asad/asad_fyfixr.F90 + - src/science/core/chemistry/asad/asad_fyinit.F90 + - src/science/core/chemistry/asad/asad_fyself.F90 + - src/science/core/chemistry/asad/asad_hetero.F90 + - src/science/core/chemistry/asad/asad_impact.F90 + - src/science/core/chemistry/asad/asad_inicnt.F90 + - src/science/core/chemistry/asad/asad_inicnt_col_mod.F90 + - src/science/core/chemistry/asad/asad_inijac.F90 + - src/science/core/chemistry/asad/asad_inimpct.F90 + - src/science/core/chemistry/asad/asad_inix.F90 + - src/science/core/chemistry/asad/asad_inrats.F90 + - src/science/core/chemistry/asad/asad_jac.F90 + - src/science/core/chemistry/asad/asad_mod.F90 + - src/science/core/chemistry/asad/asad_posthet.F90 + - src/science/core/chemistry/asad/asad_prls.F90 + - src/science/core/chemistry/asad/asad_setsteady.F90 + - src/science/core/chemistry/asad/asad_sparse_vars.F90 + - src/science/core/chemistry/asad/asad_spimpmjp.F90 + - src/science/core/chemistry/asad/asad_spmjpdriv.F90 + - src/science/core/chemistry/asad/asad_steady.F90 + - src/science/core/chemistry/asad/asad_totnud.F90 + - src/science/core/chemistry/asad/asad_trimol.F90 + - src/science/core/chemistry/asad/ukca_drydep.F90 + - src/science/core/chemistry/asad/ukca_inddep.F90 + - src/science/core/chemistry/asad/ukca_inwdep.F90 + - src/science/core/chemistry/asad/ukca_photol.F90 + - src/science/core/chemistry/asad/ukca_wetdep.F90 + - src/science/core/chemistry/deposition/ukca_aerod.F90 + - src/science/core/chemistry/deposition/ukca_be_drydep.F90 + - src/science/core/chemistry/deposition/ukca_be_wetdep.F90 + - src/science/core/chemistry/deposition/ukca_ddcalc.F90 + - src/science/core/chemistry/deposition/ukca_ddepctl.F90 + - src/science/core/chemistry/deposition/ukca_ddepo3_ocean_mod.F90 + - src/science/core/chemistry/deposition/ukca_ddeprt.F90 + - src/science/core/chemistry/deposition/ukca_surfddr.F90 + - src/science/core/chemistry/deposition/ukca_wdeprt.F90 + - src/science/core/chemistry/get_molmass_mod.F90 + - src/science/core/chemistry/ukca_calc_cloud_ph_mod.F90 + - src/science/core/chemistry/ukca_ch4_stratloss.F90 + - src/science/core/chemistry/ukca_chem1_dat.F90 + - src/science/core/chemistry/ukca_chem_aer.F90 + - src/science/core/chemistry/ukca_chem_defs_mod.F90 + - src/science/core/chemistry/ukca_chem_diags_mod.F90 + - src/science/core/chemistry/ukca_chem_master.F90 + - src/science/core/chemistry/ukca_chem_offline.F90 + - src/science/core/chemistry/ukca_chem_raq.F90 + - src/science/core/chemistry/ukca_chem_raqaero_mod.F90 + - src/science/core/chemistry/ukca_chemco.F90 + - src/science/core/chemistry/ukca_chemco_raq.F90 + - src/science/core/chemistry/ukca_chemco_raq_init_mod.F90 + - src/science/core/chemistry/ukca_chemistry_ctl.F90 + - src/science/core/chemistry/ukca_chemistry_ctl_BE_mod.F90 + - src/science/core/chemistry/ukca_chemistry_ctl_col_mod.F90 + - src/science/core/chemistry/ukca_chemistry_ctl_tropraq_mod.F90 + - src/science/core/chemistry/ukca_chemistry_ctl_full_mod.F90 + - src/science/core/chemistry/ukca_chemistry_setup.F90 + - src/science/core/chemistry/ukca_chemistry_cleanup.F90 + - src/science/core/chemistry/ukca_conserve_mod.F90 + - src/science/core/chemistry/ukca_constants.F90 + - src/science/core/chemistry/ukca_cspecies.F90 + - src/science/core/chemistry/ukca_deriv.F90 + - src/science/core/chemistry/ukca_deriv_aero.F90 + - src/science/core/chemistry/ukca_deriv_raq.F90 + - src/science/core/chemistry/ukca_deriv_raqaero_mod.F90 + - src/science/core/chemistry/ukca_diurnal_oxidant.F90 + - src/science/core/chemistry/ukca_fdiss.F90 + - src/science/core/chemistry/ukca_fdiss_constant_mod.F90 + - src/science/core/chemistry/ukca_fracdiss.F90 + - src/science/core/chemistry/ukca_hetero_mod.F90 + - src/science/core/chemistry/ukca_sediment.F90 + - src/science/core/chemistry/ukca_setup_chem_mod.F90 + - src/science/core/chemistry/ukca_stratf.F90 + - src/science/core/chemistry/ukca_top_boundary.F90 + - src/science/core/chemistry/ukca_transform_halogen.F90 + - src/science/core/chemistry/ukca_trop_hetchem.F90 + - src/science/core/emissions/ukca_add_emiss_mod.F90 + - src/science/core/emissions/ukca_aer_no3_mod.F90 + - src/science/core/emissions/ukca_calc_rho_mod.F90 + - src/science/core/emissions/ukca_day_of_week_mod.F90 + - src/science/core/emissions/ukca_diurnal_isop_ems.F90 + - src/science/core/emissions/ukca_dms_flux_mod.F90 + - src/science/core/emissions/ukca_emiss_ctl_mod.F90 + - src/science/core/emissions/ukca_emiss_factors.F90 + - src/science/core/emissions/ukca_emiss_mod.F90 + - src/science/core/emissions/ukca_emiss_mode_mod.F90 + - src/science/core/emissions/ukca_emiss_struct_mod.F90 + - src/science/core/emissions/ukca_ingridg.F90 + - src/science/core/emissions/ukca_light.F90 + - src/science/core/emissions/ukca_light_ctl.F90 + - src/science/core/emissions/ukca_prim_du_mod.F90 + - src/science/core/emissions/ukca_prim_moc.F90 + - src/science/core/emissions/ukca_prim_ss.F90 + - src/science/core/emissions/ukca_prod_no3_mod.F90 + - src/science/core/emissions/ukca_scenario_common.F90 + - src/science/core/emissions/ukca_scenario_ctl_mod.F90 + - src/science/core/emissions/ukca_scenario_prescribed.F90 + - src/science/core/emissions/ukca_scenario_wmoa1.F90 + - src/science/glomap_clim/get_gc_aerosol_fields_1d_mod.F90 + - src/science/glomap_clim/glomap_clim_calc_aird_mod.F90 + - src/science/glomap_clim/glomap_clim_calc_md_mdt_nd_mod.F90 + - src/science/glomap_clim/glomap_clim_calc_rh_frac_clear_mod.F90 + - src/science/glomap_clim/glomap_clim_pop_md_mdt_nd_mod.F90 + - src/science/photolysis/fastjx/fastjx_data.F90 + - src/science/photolysis/fastjx/fastjx_extral.F90 + - src/science/photolysis/fastjx/fastjx_jratet.F90 + - src/science/photolysis/fastjx/fastjx_miesct.F90 + - src/science/photolysis/fastjx/fastjx_opmie.F90 + - src/science/photolysis/fastjx/fastjx_photoj.F90 + - src/science/photolysis/fastjx/fastjx_read_ascii.F90 + - src/science/photolysis/fastjx/fastjx_set_aer.F90 + - src/science/photolysis/fastjx/fastjx_solar2.F90 + - src/science/photolysis/fastjx/fastjx_sphere.F90 + - src/science/photolysis/fastjx/photol_solflux_mod.F90 + - src/science/photolysis/fastjx/ukca_fastjx.F90 + - src/science/photolysis/stratospheric/photolib/acsbrcl_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsccl4_mod.F90 + - src/science/photolysis/stratospheric/photolib/acscnit_mod.F90 + - src/science/photolysis/stratospheric/photolib/acscos_mod.F90 + - src/science/photolysis/stratospheric/photolib/acscs2_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsdbrm_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsf11_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsf12_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsf22_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsh2o2_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsh2so4_mod.F90 + - src/science/photolysis/stratospheric/photolib/acshno3_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsmc_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsmena_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsn2o5_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsn2o_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsno2_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsno_mod.F90 + - src/science/photolysis/stratospheric/photolib/acso3_mod.F90 + - src/science/photolysis/stratospheric/photolib/acso3w_mod.F90 + - src/science/photolysis/stratospheric/photolib/acsso3_mod.F90 + - src/science/photolysis/stratospheric/photolib/acssr_mod.F90 + - src/science/photolysis/stratospheric/photolib/acssrw_mod.F90 + - src/science/photolysis/stratospheric/photolib/calcjs_mod.F90 + - src/science/photolysis/stratospheric/photolib/cso2o3_mod.F90 + - src/science/photolysis/stratospheric/photolib/ei1_mod.F90 + - src/science/photolysis/stratospheric/photolib/ei2_mod.F90 + - src/science/photolysis/stratospheric/photolib/ei3_mod.F90 + - src/science/photolysis/stratospheric/photolib/fill_spectra_mod.F90 + - src/science/photolysis/stratospheric/photolib/inijtab_mod.F90 + - src/science/photolysis/stratospheric/photolib/invert_mod.F90 + - src/science/photolysis/stratospheric/photolib/isrchfgt_mod.F90 + - src/science/photolysis/stratospheric/photolib/lubksb_mod.F90 + - src/science/photolysis/stratospheric/photolib/ludcmp_mod.F90 + - src/science/photolysis/stratospheric/photolib/lymana_mod.F90 + - src/science/photolysis/stratospheric/photolib/quanto12_mod.F90 + - src/science/photolysis/stratospheric/photolib/quanto1d_mod.F90 + - src/science/photolysis/stratospheric/photolib/scatcs_mod.F90 + - src/science/photolysis/stratospheric/photolib/settab_mod.F90 + - src/science/photolysis/stratospheric/photolib/setzen_mod.F90 + - src/science/photolysis/stratospheric/photolib/ukca_crossec_mod.F90 + - src/science/photolysis/stratospheric/photolib/ukca_parpho_mod.F90 + - src/science/photolysis/stratospheric/photolib/ukca_stdto3_mod.F90 + - src/science/photolysis/stratospheric/photolib/ukca_tbjs_mod.F90 + - src/science/photolysis/stratospheric/ukca_um_dissoc_mod.F90 + - src/science/photolysis/stratospheric/ukca_um_strat_photol_mod.F90 + - src/science/photolysis/tropospheric/photol_curve_mod.F90 + - src/science/photolysis/tropospheric/ukca_flupj.F90 + - src/science/photolysis/tropospheric/ukca_phot2d.F90 + - src/science/plumeria/plumeria_FindT.F90 + - src/science/plumeria/plumeria_cashkarp.F90 + - src/science/plumeria/plumeria_derivs.F90 + - src/science/plumeria/plumeria_functions.F90 + - src/science/plumeria/plumeria_main.F90 + - src/science/plumeria/plumeria_param.F90 + - src/science/radaer/def_ukca_radaer_presc.F90 + - src/science/radaer/spcrg3a_mod.F90 + - src/science/radaer/ukca_radaer_band_average.F90 + - src/science/radaer/ukca_radaer_compute_aod.F90 + - src/science/radaer/ukca_radaer_lut_mod.F90 + - src/science/radaer/ukca_radaer_populate_lut_mod.F90 + - src/science/radaer/ukca_radaer_precalc_mod.F90 + - src/science/radaer/ukca_radaer_prepare.F90 + - src/science/radaer/ukca_radaer_ri_calc_mod.F90 + - src/science/radaer/ukca_radaer_tlut_mod.F90 diff --git a/build/extract/extract_physics.mk b/build/extract/extract_physics.mk index 0fc95fa82..a4df2535b 100644 --- a/build/extract/extract_physics.mk +++ b/build/extract/extract_physics.mk @@ -20,9 +20,7 @@ extract: # Retrieve and preprocess the UKCA and CASIM code - $Q. $(APPS_ROOT_DIR)/dependencies.sh \ - && fcm make -C $(SCRATCH_DIR) -f $(APPS_ROOT_DIR)/build/extract/extract.cfg - # Note that if wanting to modify UM source this should be done via the - # UM repository either through a working copy or branch - $Qrsync -acvz $(SCRATCH_DIR)/extract/ $(WORKING_DIR)/science/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/build/extract/extract.yaml + $Qrsync -acvz $(SCRATCH_DIR)/ukca $(WORKING_DIR)/science/ + $Qrsync -acvz $(SCRATCH_DIR)/casim $(WORKING_DIR)/science/ diff --git a/build/extract/extract_science.py b/build/extract/extract_science.py new file mode 100755 index 000000000..042fe6f32 --- /dev/null +++ b/build/extract/extract_science.py @@ -0,0 +1,135 @@ +import argparse +import subprocess +import os +import tempfile +import yaml +from shutil import rmtree +from pathlib import Path +from typing import Dict, List + + +def run_command(command): + """ + Run a subprocess command and check output + Inputs: + - command, str with command to run + """ + command = command.split() + result = subprocess.run( + command, + capture_output=True, + text=True, + timeout=120, + shell=False, + check=False, + ) + if result.returncode: + raise RuntimeError( + f"The command '{command}' failed with error:\n\n{result.stderr}" + ) + + +def load_yaml(fpath: Path) -> Dict: + """ + Read in the dependencies.yaml file + """ + + with open(fpath) as stream: + sources = yaml.safe_load(stream) + + return sources + + +def clone_dependency(values: Dict, temp_dep: Path) -> None: + """ + Clone the physics dependencies into a temporary directory + """ + + source = values["source"] + ref = values["ref"] + + commands = ( + f"git -C {temp_dep} init", + f"git -C {temp_dep} remote add origin {source}", + f"git -C {temp_dep} fetch origin {ref}", + f"git -C {temp_dep} checkout FETCH_HEAD" + ) + for command in commands: + run_command(command) + + +def extract_files(dependency: str, values: Dict, files: List[str], working: Path): + """ + Clone the dependency to a temporary location + Then copy the desired files to the working directory + Then delete the temporary directory + """ + + tempdir = Path(tempfile.mkdtemp()) + if ( + "PHYSICS_ROOT" not in os.environ + or not Path(os.environ["PHYSICS_ROOT"]).exists() + ): + temp_dep = tempdir / dependency + temp_dep.mkdir(parents=True) + clone_dependency(values, temp_dep) + else: + temp_dep = Path(os.environ["PHYSICS_ROOT"]) / dependency + + working_dep = working / dependency + + # make the working directory location + working_dep.mkdir(parents=True) + + for extract_file in files: + source_file = temp_dep / extract_file + dest_file = working_dep / extract_file + run_command(f"mkdir -p {dest_file.parents[0]}") + copy_command = f"cp -r {source_file} {dest_file}" + run_command(copy_command) + + rmtree(tempdir) + + +def parse_args() -> argparse.Namespace: + """ + Read command line args + """ + + parser = argparse.ArgumentParser("Extract physics code for LFRic Builds.") + parser.add_argument( + "-d", + "--dependencies", + default="./dependencies.yaml", + help="The dependencies file for the apps working copy.", + ) + parser.add_argument( + "-w", "--working", default=".", help="Location to perform extract steps in." + ) + parser.add_argument( + "-e", + "--extract", + default="./extract.yaml", + help="Path to file containing extract lists", + ) + return parser.parse_args() + + +def main(): + args: argparse.Namespace = parse_args() + + extract_lists: Dict = load_yaml(args.extract) + dependencies: Dict = load_yaml(args.dependencies) + + for dependency in dependencies: + if dependency in extract_lists: + extract_files( + dependency, + dependencies[dependency], + extract_lists[dependency], + Path(args.working), + ) + + +if __name__ == "__main__": + main() diff --git a/build/local_build.py b/build/local_build.py index 3c32acbfe..2c9d445e4 100755 --- a/build/local_build.py +++ b/build/local_build.py @@ -9,13 +9,14 @@ Wrapper script for makefiles when doing a local build Will export a copy of lfric_core using a defined source and rsync it to a working dir so that incremental builds can occur. -It then runs the makefile for the application being made. +It then runs the makefile for the project being made. """ import os import sys import subprocess import argparse +import yaml def subprocess_run(command): @@ -55,60 +56,65 @@ def determine_core_source(root_dir): # Read through the dependencies file and populate revision and source # variables for requested repo - with open(os.path.join(root_dir, "dependencies.sh"), "r") as dep_file: - for line in dep_file: - line = line.strip() - if line.startswith("export lfric_core_rev"): - rev = line.split("=")[1].strip() - if line.startswith("export lfric_core_sources"): - source = line.split("=")[1].strip() - # If source not set then default to trunk - if not source: - source = "fcm:lfric.xm_tr" - # If a revision set then append to source - # Defaults to the head of the source - if rev: - source = f"{source}@{rev}" - return source - - -def determine_application_path(application, root_dir): + with open(os.path.join(root_dir, "dependencies.yaml"), "r") as stream: + dependencies = yaml.safe_load(stream) + return dependencies["lfric_core"] + + +def determine_project_path(project, root_dir): """ - Determine the path to the makefile for the lfric_apps application being + Determine the path to the makefile for the lfric_apps project being built. Defaults to the makefile in the top level if none provided. Returns a relative path from this file to the makefile directory """ - # Find the application in either science/ interfaces/ or applications/ + # Find the project in either science/ interfaces/ or applications/ for drc in ["science/", "interfaces/", "applications/"]: path = os.path.join(root_dir, drc) for item in os.listdir(path): item_path = os.path.join(path, item) - if item_path and item == application: + if item_path and item == project: return item_path sys.exit( - f"The application {application} could not be found in either the " + f"The project {project} could not be found in either the " "science/ or applications/ directories in this working copy." ) +def clone_dependency(values, temp_dep): + """ + Clone the physics dependencies into a temporary directory + """ + + source = values["source"] + ref = values["ref"] + + commands = ( + f"git -C {temp_dep} init", + f"git -C {temp_dep} remote add origin {source}", + f"git -C {temp_dep} fetch origin {ref}", + f"git -C {temp_dep} checkout FETCH_HEAD" + ) + for command in commands: + subprocess_run(command) + + def get_lfric_core(core_source, working_dir): """ - Export the lfric_core source if the source is an fcm url + Clone the lfric_core source if the source is a git url rsync this export into the working dir as the lfric_core source - done so incremental builds can still be used. If core_source is a local working copy just rsync from there. """ - if core_source.startswith("fcm:"): - print(f"Exporting lfric_core source from {core_source}") + if core_source["source"].endswith(".git"): + print("Cloning LFRic Core from Github") lfric_core_loc = f"{working_dir}/scratch/core" - export_command = f"fcm export --force -q {core_source} {lfric_core_loc}" - subprocess_run(export_command) + clone_dependency(core_source["source"], core_source["ref"], lfric_core_loc) print("rsyncing the exported lfric_core source") else: - lfric_core_loc = core_source + lfric_core_loc = core_source["source"] print("rsyncing the local lfric_core source") rsync_command = f"rsync -acvzq {lfric_core_loc}/ {working_dir}/lfric_core" @@ -117,8 +123,8 @@ def get_lfric_core(core_source, working_dir): def build_makefile( root_dir, - application_path, - application, + project_path, + project, working_dir, ncores, target, @@ -128,17 +134,17 @@ def build_makefile( verbose, ): """ - Call the make command to build lfric_apps application + Call the make command to build lfric_apps project """ if target == "clean": working_path = working_dir else: - working_path = os.path.join(working_dir, f"{target}_{application}") + working_path = os.path.join(working_dir, f"{target}_{project}") - print(f"Calling make command for makefile at {application_path}") + print(f"Calling make command for makefile at {project_path}") make_command = ( - f"make {target} -C {application_path} -j {ncores} " + f"make {target} -C {project_path} -j {ncores} " f"WORKING_DIR={working_path} " f"CORE_ROOT_DIR={working_dir}/lfric_core " f"APPS_ROOT_DIR={root_dir} " @@ -150,7 +156,7 @@ def build_makefile( if um_fcm_platform: make_command += f"UM_FCM_TARGET_PLATFORM={um_fcm_platform} " if verbose: - make_command += f"VERBOSE=1 " + make_command += "VERBOSE=1 " subprocess_run(make_command) @@ -163,25 +169,22 @@ def main(): parser = argparse.ArgumentParser( description="Wrapper for build makefiles for lfric_apps." ) + parser.add_argument( + "project", + help="project to build. Will search in both " + "science and projects dirs.", + ) parser.add_argument( "-c", "--core_source", default=None, - help="Source for lfric_core. Defaults to looking in " - "dependencies file.", - ) - parser.add_argument( - "-a", - "--application", - required=True, - help="Application to build. Will search in both " - "science and applications dirs.", + help="Source for lfric_core. Defaults to looking in " "dependencies file.", ) parser.add_argument( "-w", "--working_dir", default=None, - help="Working directory where builds occur. Default to the application " + help="Working directory where builds occur. Default to the project " "directory in the working copy.", ) parser.add_argument( @@ -194,8 +197,7 @@ def main(): "-t", "--target", default="build", - help="The makefile target, eg. unit-tests, clean, etc. Default " - "of build.", + help="The makefile target, eg. unit-tests, clean, etc. Default " "of build.", ) parser.add_argument( "-o", @@ -222,7 +224,7 @@ def main(): parser.add_argument( "-v", "--verbose", - action='store_true', + action="store_true", help="Request verbose output from the makefile ", ) args = parser.parse_args() @@ -231,11 +233,11 @@ def main(): root_dir = get_root_path() # Work out path for the makefile that we are building - application_path = determine_application_path(args.application, root_dir) + project_path = determine_project_path(args.project, root_dir) - # Set the working dir default of the application directory + # Set the working dir default of the project directory if not args.working_dir: - args.working_dir = os.path.join(application_path, "working") + args.working_dir = os.path.join(project_path, "working") else: # If the working dir doesn't end in working, set that here if not args.working_dir.strip("/").endswith("working"): @@ -247,16 +249,18 @@ def main(): # Determine the core source if not provided if args.core_source is None: - args.core_source = determine_core_source(root_dir) + core_source = determine_core_source(root_dir) + else: + core_source = {"source": args.core_source} # Export and rsync the lfric_core source - get_lfric_core(args.core_source, args.working_dir) + get_lfric_core(core_source, args.working_dir) # Build the makefile build_makefile( root_dir, - application_path, - args.application, + project_path, + args.project, args.working_dir, args.ncores, args.target, diff --git a/dependencies.yaml b/dependencies.yaml new file mode 100644 index 000000000..989720bc6 --- /dev/null +++ b/dependencies.yaml @@ -0,0 +1,54 @@ +############################################################################## +# (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. +############################################################################## + +# This file contains a list of all linked external repositories containing code +# and data required to build lfric applications and run the entire test suite +# +# Each section is the name of the repository +# source: Is either the url to the repository (the upstream or +# a fork) or a path to a local clone with format `host:/path/to/clone` +# ref: Is a valid git reference. This can either be a commit hash, a tag or a +# branch name +# +# The entry for this repository will have blank values for both source and ref +# by default, which will cause the test suite to use the source code from the +# local clone. These can be filled to set a different source if desired. + +casim: + source: git@github.com:MetOffice/casim.git + ref: 2ba0206692232f77729564b1202c4cdfbc6ccfef + +jules: + source: git@github.com:MetOffice/jules.git + ref: 486cb11e0a50c19d9ebca142a58eef625365216a + +lfric_apps: + source: + ref: + +lfric_core: + source: git@github.com:MetOffice/lfric_core.git + ref: 224c1cc82271261803fcc82a454894ea471d4378 + +moci: + source: git@github.com:MetOffice/moci.git + ref: trunk + +SimSys_Scripts: + source: git@github.com:MetOffice/SimSys_Scripts.git + ref: main + +socrates: + source: git@github.com:MetOffice/socrates.git + ref: 1ca8a94091dde17b37fceba188f97fbbef229246 + +socrates-spectral: + source: git@github.com:MetOffice/socrates-spectral.git + ref: main + +ukca: + source: git@github.com:MetOffice/ukca.git + ref: d0fe6eeb09d38828093ca2f339252e3a823ce749 diff --git a/interfaces/jules_interface/build/extract.cfg b/interfaces/jules_interface/build/extract.cfg deleted file mode 100644 index 40f73b6ca..000000000 --- a/interfaces/jules_interface/build/extract.cfg +++ /dev/null @@ -1,250 +0,0 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## - -steps = extract - -extract.ns = jules - -extract.location{primary}[jules] = fcm:jules.xm -extract.location[jules] = trunk@$jules_rev -extract.location{diff}[jules] = $jules_sources -extract.path-excl[jules] = / # everything -extract.path-incl[jules] = \ - src/control/cable/cable_land/radiation/alloc_rad_albedo_vars_cbl.F90 \ - src/control/cable/cable_land/radiation/cable_land_albedo_mod_cbl.F90 \ - src/control/cable/interface/radiation/rad_driver_cbl.F90 \ - src/control/cable/interface/radiation/rad_unpack_cbl.F90 \ - src/control/cable/shared/LAI_canopy_height_cbl.F90 \ - src/control/cable/shared/cable_fields_mod.F90 \ - src/control/cable/shared/cable_surface_types_mod.F90 \ - src/control/cable/shared/params_io_cbl.F90 \ - src/control/cable/shared/progs_cbl_vars_mod.F90 \ - src/control/cable/shared/work_vars_mod_cbl.F90 \ - src/control/cable/util/activeTile_mask_cbl.F90 \ - src/control/cable/util/pack_mod_cbl.F90 \ - src/control/lfric/check_unavailable_options_mod.F90 \ - src/control/shared/CN_utils_mod.F90 \ - src/control/shared/aero.F90 \ - src/control/shared/ancil_info.F90 \ - src/control/shared/c_elevate.F90 \ - src/control/shared/calc_c_comps_triffid_mod.F90 \ - src/control/shared/coastal.F90 \ - src/control/shared/crop_utils_mod.F90 \ - src/control/shared/crop_vars_mod.F90 \ - src/control/shared/fire_vars_mod.F90 \ - src/control/shared/fluxes.F90 \ - src/control/shared/jules_chemvars_mod.F90 \ - src/control/shared/jules_deposition_mod.F90 \ - src/control/shared/jules_forcing_mod.F90 \ - src/control/shared/jules_hydrology_mod.F90 \ - src/control/shared/jules_irrig_mod.F90 \ - src/control/shared/jules_mod.F90 \ - src/control/shared/jules_model_environment_mod.F90 \ - src/control/shared/jules_print_mgr.F90 \ - src/control/shared/jules_radiation_mod.F90 \ - src/control/shared/jules_rivers_mod.F90 \ - src/control/shared/jules_science_fixes_mod.F90 \ - src/control/shared/jules_sea_seaice_mod.F90 \ - src/control/shared/jules_snow_mod.F90 \ - src/control/shared/jules_soil_biogeochem_mod.F90 \ - src/control/shared/jules_soil_mod.F90 \ - src/control/shared/jules_surface_mod.F90 \ - src/control/shared/jules_surface_types_mod.F90 \ - src/control/shared/jules_urban_mod.F90 \ - src/control/shared/jules_vegetation_mod.F90 \ - src/control/shared/jules_water_resources_mod.F90 \ - src/control/shared/jules_water_tracers_mod.F90 \ - src/control/shared/jules_wtrac_type_mod.F90 \ - src/control/shared/lake_mod.F90 \ - src/control/shared/land_tile_ids_mod.F90 \ - src/control/shared/max_dimensions.F90 \ - src/control/shared/overbank_inundation_mod.F90 \ - src/control/shared/p_s_parms.F90 \ - src/control/shared/prognostics.F90 \ - src/control/shared/soil_ecosse_vars_mod.F90 \ - src/control/shared/surf_couple_explicit_mod.F90 \ - src/control/shared/surf_couple_extra_mod.F90 \ - src/control/shared/surf_couple_implicit_mod.F90 \ - src/control/shared/surf_couple_radiation_mod.F90 \ - src/control/shared/switches.F90 \ - src/control/shared/tilepts_jls.F90 \ - src/control/shared/top_pdm.F90 \ - src/control/shared/trif_vars_mod.F90 \ - src/control/shared/trifctl.F90 \ - src/control/shared/veg3_field_mod.F90 \ - src/control/shared/water_resources_vars_mod.F90 \ - src/control/shared/wtrac_checks_jls_mod.F90 \ - src/control/shared/wtrac_correct_jls_mod.F90 \ - src/control/shared/wtrac_extra_mod.F90 \ - src/initialisation/shared/calc_urban_aero_fields_mod.F90 \ - src/initialisation/shared/check_compatible_options_mod.F90 \ - src/initialisation/shared/freeze_soil.F90 \ - src/initialisation/shared/wtrac_check_options_mod.F90 \ - src/params/cable/cable_maths_constants_mod.F90 \ - src/params/cable/cable_other_constants_mod.F90 \ - src/params/cable/cable_phys_constants_mod.F90 \ - src/params/cable/grid_constants_cbl.F90 \ - src/science/deposition/deposition_check_species_mod.F90 \ - src/science/deposition/deposition_from_surf_couple_extra_mod.F90 \ - src/science/deposition/deposition_from_ukca_chemistry_mod.F90 \ - src/science/deposition/deposition_initialisation_aerod_mod.F90 \ - src/science/deposition/deposition_initialisation_surfddr_mod.F90 \ - src/science/deposition/deposition_jules_aerod_mod.F90 \ - src/science/deposition/deposition_jules_ddcalc_mod.F90 \ - src/science/deposition/deposition_jules_ddepctl_mod.F90 \ - src/science/deposition/deposition_jules_surfddr_mod.F90 \ - src/science/deposition/deposition_output_arrays_mod.F90 \ - src/science/deposition/deposition_ukca_ddepo3_ocean_mod.F90 \ - src/science/deposition/deposition_ukca_h2dd_soil.F90 \ - src/science/deposition/deposition_ukca_surfddr_mod.F90 \ - src/science/deposition/deposition_ukca_var_mod.F90 \ - src/science/params/blend_h_mod.F90 \ - src/science/params/c_bvoc_mod.F90 \ - src/science/params/c_kappai_mod.F90 \ - src/science/params/c_rmol_mod.F90 \ - src/science/params/c_sicehc_mod.F90 \ - src/science/params/c_surf_mod.F90 \ - src/science/params/c_topog_mod.F90 \ - src/science/params/c_z0h_z0m_mod.F90 \ - src/science/params/ccarbon_mod.F90 \ - src/science/params/cropparm_mod.F90 \ - src/science/params/csigma_mod.F90 \ - src/science/params/deposition_species_mod.F90 \ - src/science/params/dust_param_mod.F90 \ - src/science/params/nvegparm_mod.F90 \ - src/science/params/pftparm_mod.F90 \ - src/science/params/red_io_mod.F90 \ - src/science/params/theta_field_sizes_mod.F90 \ - src/science/params/trif_mod.F90 \ - src/science/params/urban_param_mod.F90 \ - src/science/params/veg3_param_mod.F90 \ - src/science/params/veg_param_mod.F90 \ - src/science/radiation/Jin11_osa_mod.F90 \ - src/science/radiation/albpft_jls_mod.F90 \ - src/science/radiation/albsnow_jls_mod.F90 \ - src/science/radiation/albsnow_ts_jls_mod.F90 \ - src/science/radiation/calc_direct_albsoil_mod.F90 \ - src/science/radiation/canyonalb_mod.F90 \ - src/science/radiation/jules_land_albedo_jls_mod.F90 \ - src/science/radiation/jules_ssi_albedo_jls_mod.F90 \ - src/science/radiation/matinv_mod.F90 \ - src/science/radiation/set_soil_alb_components.F90 \ - src/science/radiation/urbanemis_mod.F90 \ - src/science/snow/canopysnow_mod.F90 \ - src/science/snow/compactsnow_mod.F90 \ - src/science/snow/layersnow_mod.F90 \ - src/science/snow/relayersnow_mod.F90 \ - src/science/snow/snow_mod.F90 \ - src/science/snow/snowgrain_mod.F90 \ - src/science/snow/snowpack_mod.F90 \ - src/science/snow/snowtherm_mod.F90 \ - src/science/snow/tridag_mod.F90 \ - src/science/snow/wtrac_snow_mod.F90 \ - src/science/soil/bedrock_jls_mod.F90 \ - src/science/soil/calc_baseflow_jules_mod.F90 \ - src/science/soil/calc_fsat_mod.F90 \ - src/science/soil/calc_zw_inund_jls_mod.F90 \ - src/science/soil/calc_zw_jls_mod.F90 \ - src/science/soil/ch4_microbe_mod.F90 \ - src/science/soil/ch4_tdep_jls_mod.F90 \ - src/science/soil/ch4_tdep_layers_jls_mod.F90 \ - src/science/soil/ch4_wetl_jls_mod.F90 \ - src/science/soil/darcy_ch_mod.F90 \ - src/science/soil/darcy_ic_mod.F90 \ - src/science/soil/darcy_vg_jls_mod.F90 \ - src/science/soil/elev_htc_jls_mod.F90 \ - src/science/soil/frunoff_jls_mod.F90 \ - src/science/soil/gauss_jls_mod.F90 \ - src/science/soil/heat_con_jls_mod.F90 \ - src/science/soil/hyd_con_ch_mod.F90 \ - src/science/soil/hyd_con_ic_mod.F90 \ - src/science/soil/hyd_con_vg_jls_mod.F90 \ - src/science/soil/hyd_psi_mod.F90 \ - src/science/soil/hydrol_jls_mod.F90 \ - src/science/soil/ice_htc_jls_mod.F90 \ - src/science/soil/infiltration_rate_mod.F90 \ - src/science/soil/n_leach_mod.F90 \ - src/science/soil/pdm_jls_mod.F90 \ - src/science/soil/sieve_jls_mod.F90 \ - src/science/soil/soil_htc_jls_mod.F90 \ - src/science/soil/soil_htc_wtrac_mod.F90 \ - src/science/soil/soil_hyd_jls_mod.F90 \ - src/science/soil/soil_hyd_update_mod.F90 \ - src/science/soil/soil_hyd_wt_mod.F90 \ - src/science/soil/soil_hyd_wtrac_mod.F90 \ - src/science/soil/soilmc_jls_mod.F90 \ - src/science/soil/soilt_jls_mod.F90 \ - src/science/soil/surf_hyd_jls_mod.F90 \ - src/science/soil/wtrac_hyd_mod.F90 \ - src/science/surface/bvoc_emissions_mod.F90 \ - src/science/surface/calc_air_dens_jls_mod.F90 \ - src/science/surface/can_drag_mod.F90 \ - src/science/surface/cancap_jls.F90 \ - src/science/surface/dewpnt_jls.F90 \ - src/science/surface/dustresb_jls.F90 \ - src/science/surface/elevate.F90 \ - src/science/surface/fcdch.F90 \ - src/science/surface/generate_anthrop_heat_jls_mod.F90 \ - src/science/surface/get_us.F90 \ - src/science/surface/ice_formdrag_lupkes_mod.F90 \ - src/science/surface/im_sf_pt2_jls.F90 \ - src/science/surface/jules_grid_update_implicit_jls.F90 \ - src/science/surface/jules_griddiag_sf_explicit_jls.F90 \ - src/science/surface/jules_griddiag_sf_implicit_jls.F90 \ - src/science/surface/jules_gridinit_sf_explicit_jls.F90 \ - src/science/surface/jules_land_sf_explicit_jls.F90 \ - src/science/surface/jules_land_sf_implicit.jls.F90 \ - src/science/surface/jules_ssi_sf_explicit_jls.F90 \ - src/science/surface/jules_ssi_sf_implicit.jls.F90 \ - src/science/surface/leaf_jls_mod.F90 \ - src/science/surface/leaf_limits_mod.F90 \ - src/science/surface/leaf_lit_jls.F90 \ - src/science/surface/leaf_processes_sox_mod.F90 \ - src/science/surface/microbe_jls.F90 \ - src/science/surface/phi_m_h.F90 \ - src/science/surface/phi_m_h_vol.F90 \ - src/science/surface/physiol_jls_mod.F90 \ - src/science/surface/raero_jls.F90 \ - src/science/surface/root_frac_jls_mod.F90 \ - src/science/surface/screen_tq_jls.F90 \ - src/science/surface/sea_rough_int.F90 \ - src/science/surface/sf_aero.F90 \ - src/science/surface/sf_diags_mod.F90 \ - src/science/surface/sf_evap_jls.F90 \ - src/science/surface/sf_evap_srce_frac_mod.F90 \ - src/science/surface/sf_flux_land_wtrac_mod.F90 \ - src/science/surface/sf_flux_ssi_wtrac_mod.F90 \ - src/science/surface/sf_land_imp_wtrac_mod.F90 \ - src/science/surface/sf_flux_mod.F90 \ - src/science/surface/sf_melt_jls.F90 \ - src/science/surface/sf_orog_gb_jls.F90 \ - src/science/surface/sf_orog_jls.F90 \ - src/science/surface/sf_resist_jls.F90 \ - src/science/surface/sf_resist_wtrac_mod.F90 \ - src/science/surface/sf_rib.F90 \ - src/science/surface/sf_ssi_imp_wtrac_mod.F90 \ - src/science/surface/sf_stom_jls_mod.F90 \ - src/science/surface/sfl_int_mod.F90 \ - src/science/surface/sice_htf_jls.F90 \ - src/science/surface/smc_ext_jls_mod.F90 \ - src/science/surface/soil_evap_jls.F90 \ - src/science/surface/sugar_mod.F90 \ - src/science/surface/stdev1.F90 \ - src/science/surface/urbanz0.F90 \ - src/science/surface/vgrav_jls.F90 \ - src/science/vegetation/nvg_sparm_jls_mod.F90 \ - src/science/vegetation/pft_sparm_jls_mod.F90 \ - src/science/vegetation/sparm_jls_mod.F90 \ - src/science_cable/albedo/cbl_albedo.F90 \ - src/science_cable/albedo/cbl_snow_albedo.F90 \ - src/science_cable/radiation/cbl_init_radiation.F90 \ - src/science_cable/radiation/cbl_rhoch.F90 \ - src/science_cable/radiation/cbl_spitter.F90 \ - src/science_cable/roughness/roughnessHGT_effLAI_cbl.F90 \ - src/util/cable/map_veg_parameters_cbl.F90 \ - src/util/cable/masks_cbl.F90 \ - src/util/shared/gridbox_mean_mod.F90 \ - src/util/shared/metstats/metstats_mod.F90 diff --git a/interfaces/jules_interface/build/extract.yaml b/interfaces/jules_interface/build/extract.yaml new file mode 100644 index 000000000..41128cc14 --- /dev/null +++ b/interfaces/jules_interface/build/extract.yaml @@ -0,0 +1,224 @@ +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +jules: + - src/control/cable/cable_land/radiation/cable_land_albedo_mod_cbl.F90 + - src/control/cable/shared/cable_fields_mod.F90 + - src/control/cable/shared/cable_surface_types_mod.F90 + - src/control/cable/shared/progs_cbl_vars_mod.F90 + - src/control/cable/shared/params_io_cbl.F90 + - src/control/cable/shared/work_vars_mod_cbl.F90 + - src/control/lfric/check_unavailable_options_mod.F90 + - src/control/shared/CN_utils_mod.F90 + - src/control/shared/aero.F90 + - src/control/shared/ancil_info.F90 + - src/control/shared/c_elevate.F90 + - src/control/shared/calc_c_comps_triffid_mod.F90 + - src/control/shared/coastal.F90 + - src/control/shared/crop_utils_mod.F90 + - src/control/shared/crop_vars_mod.F90 + - src/control/shared/fire_vars_mod.F90 + - src/control/shared/fluxes.F90 + - src/control/shared/jules_chemvars_mod.F90 + - src/control/shared/jules_deposition_mod.F90 + - src/control/shared/jules_forcing_mod.F90 + - src/control/shared/jules_hydrology_mod.F90 + - src/control/shared/jules_irrig_mod.F90 + - src/control/shared/jules_mod.F90 + - src/control/shared/jules_model_environment_mod.F90 + - src/control/shared/jules_print_mgr.F90 + - src/control/shared/jules_radiation_mod.F90 + - src/control/shared/jules_rivers_mod.F90 + - src/control/shared/jules_science_fixes_mod.F90 + - src/control/shared/jules_sea_seaice_mod.F90 + - src/control/shared/jules_snow_mod.F90 + - src/control/shared/jules_soil_biogeochem_mod.F90 + - src/control/shared/jules_soil_mod.F90 + - src/control/shared/jules_surface_mod.F90 + - src/control/shared/jules_surface_types_mod.F90 + - src/control/shared/jules_urban_mod.F90 + - src/control/shared/jules_vegetation_mod.F90 + - src/control/shared/jules_water_resources_mod.F90 + - src/control/shared/jules_water_tracers_mod.F90 + - src/control/shared/jules_wtrac_type_mod.F90 + - src/control/shared/lake_mod.F90 + - src/control/shared/land_tile_ids_mod.F90 + - src/control/shared/max_dimensions.F90 + - src/control/shared/overbank_inundation_mod.F90 + - src/control/shared/p_s_parms.F90 + - src/control/shared/prognostics.F90 + - src/control/shared/soil_ecosse_vars_mod.F90 + - src/control/shared/surf_couple_explicit_mod.F90 + - src/control/shared/surf_couple_extra_mod.F90 + - src/control/shared/surf_couple_implicit_mod.F90 + - src/control/shared/surf_couple_radiation_mod.F90 + - src/control/shared/switches.F90 + - src/control/shared/tilepts_jls.F90 + - src/control/shared/top_pdm.F90 + - src/control/shared/trif_vars_mod.F90 + - src/control/shared/trifctl.F90 + - src/control/shared/veg3_field_mod.F90 + - src/control/shared/water_resources_vars_mod.F90 + - src/control/shared/wtrac_checks_jls_mod.F90 + - src/control/shared/wtrac_correct_jls_mod.F90 + - src/control/shared/wtrac_extra_mod.F90 + - src/initialisation/shared/calc_urban_aero_fields_mod.F90 + - src/initialisation/shared/check_compatible_options_mod.F90 + - src/initialisation/shared/freeze_soil.F90 + - src/initialisation/shared/wtrac_check_options_mod.F90 + - src/science/deposition/deposition_check_species_mod.F90 + - src/science/deposition/deposition_from_surf_couple_extra_mod.F90 + - src/science/deposition/deposition_from_ukca_chemistry_mod.F90 + - src/science/deposition/deposition_initialisation_aerod_mod.F90 + - src/science/deposition/deposition_initialisation_surfddr_mod.F90 + - src/science/deposition/deposition_jules_aerod_mod.F90 + - src/science/deposition/deposition_jules_ddcalc_mod.F90 + - src/science/deposition/deposition_jules_ddepctl_mod.F90 + - src/science/deposition/deposition_jules_surfddr_mod.F90 + - src/science/deposition/deposition_output_arrays_mod.F90 + - src/science/deposition/deposition_ukca_ddepo3_ocean_mod.F90 + - src/science/deposition/deposition_ukca_h2dd_soil.F90 + - src/science/deposition/deposition_ukca_surfddr_mod.F90 + - src/science/deposition/deposition_ukca_var_mod.F90 + - src/science/params/blend_h_mod.F90 + - src/science/params/c_bvoc_mod.F90 + - src/science/params/c_kappai_mod.F90 + - src/science/params/c_rmol_mod.F90 + - src/science/params/c_sicehc_mod.F90 + - src/science/params/c_surf_mod.F90 + - src/science/params/c_topog_mod.F90 + - src/science/params/c_z0h_z0m_mod.F90 + - src/science/params/ccarbon_mod.F90 + - src/science/params/cropparm_mod.F90 + - src/science/params/csigma_mod.F90 + - src/science/params/deposition_species_mod.F90 + - src/science/params/dust_param_mod.F90 + - src/science/params/nvegparm_mod.F90 + - src/science/params/pftparm_mod.F90 + - src/science/params/red_io_mod.F90 + - src/science/params/theta_field_sizes_mod.F90 + - src/science/params/trif_mod.F90 + - src/science/params/urban_param_mod.F90 + - src/science/params/veg3_param_mod.F90 + - src/science/params/veg_param_mod.F90 + - src/science/radiation/Jin11_osa_mod.F90 + - src/science/radiation/albpft_jls_mod.F90 + - src/science/radiation/albsnow_jls_mod.F90 + - src/science/radiation/albsnow_ts_jls_mod.F90 + - src/science/radiation/calc_direct_albsoil_mod.F90 + - src/science/radiation/canyonalb_mod.F90 + - src/science/radiation/jules_land_albedo_jls_mod.F90 + - src/science/radiation/jules_ssi_albedo_jls_mod.F90 + - src/science/radiation/matinv_mod.F90 + - src/science/radiation/set_soil_alb_components.F90 + - src/science/radiation/urbanemis_mod.F90 + - src/science/snow/canopysnow_mod.F90 + - src/science/snow/compactsnow_mod.F90 + - src/science/snow/layersnow_mod.F90 + - src/science/snow/relayersnow_mod.F90 + - src/science/snow/snow_mod.F90 + - src/science/snow/snowgrain_mod.F90 + - src/science/snow/snowpack_mod.F90 + - src/science/snow/snowtherm_mod.F90 + - src/science/snow/tridag_mod.F90 + - src/science/snow/wtrac_snow_mod.F90 + - src/science/soil/bedrock_jls_mod.F90 + - src/science/soil/calc_baseflow_jules_mod.F90 + - src/science/soil/calc_fsat_mod.F90 + - src/science/soil/calc_zw_inund_jls_mod.F90 + - src/science/soil/calc_zw_jls_mod.F90 + - src/science/soil/ch4_microbe_mod.F90 + - src/science/soil/ch4_tdep_jls_mod.F90 + - src/science/soil/ch4_tdep_layers_jls_mod.F90 + - src/science/soil/ch4_wetl_jls_mod.F90 + - src/science/soil/darcy_ch_mod.F90 + - src/science/soil/darcy_ic_mod.F90 + - src/science/soil/darcy_vg_jls_mod.F90 + - src/science/soil/elev_htc_jls_mod.F90 + - src/science/soil/frunoff_jls_mod.F90 + - src/science/soil/gauss_jls_mod.F90 + - src/science/soil/heat_con_jls_mod.F90 + - src/science/soil/hyd_con_ch_mod.F90 + - src/science/soil/hyd_con_ic_mod.F90 + - src/science/soil/hyd_con_vg_jls_mod.F90 + - src/science/soil/hyd_psi_mod.F90 + - src/science/soil/hydrol_jls_mod.F90 + - src/science/soil/ice_htc_jls_mod.F90 + - src/science/soil/infiltration_rate_mod.F90 + - src/science/soil/n_leach_mod.F90 + - src/science/soil/pdm_jls_mod.F90 + - src/science/soil/sieve_jls_mod.F90 + - src/science/soil/soil_htc_jls_mod.F90 + - src/science/soil/soil_htc_wtrac_mod.F90 + - src/science/soil/soil_hyd_jls_mod.F90 + - src/science/soil/soil_hyd_update_mod.F90 + - src/science/soil/soil_hyd_wt_mod.F90 + - src/science/soil/soil_hyd_wtrac_mod.F90 + - src/science/soil/soilmc_jls_mod.F90 + - src/science/soil/soilt_jls_mod.F90 + - src/science/soil/surf_hyd_jls_mod.F90 + - src/science/soil/wtrac_hyd_mod.F90 + - src/science/surface/bvoc_emissions_mod.F90 + - src/science/surface/calc_air_dens_jls_mod.F90 + - src/science/surface/can_drag_mod.F90 + - src/science/surface/cancap_jls.F90 + - src/science/surface/dewpnt_jls.F90 + - src/science/surface/dustresb_jls.F90 + - src/science/surface/elevate.F90 + - src/science/surface/fcdch.F90 + - src/science/surface/generate_anthrop_heat_jls_mod.F90 + - src/science/surface/get_us.F90 + - src/science/surface/ice_formdrag_lupkes_mod.F90 + - src/science/surface/im_sf_pt2_jls.F90 + - src/science/surface/jules_grid_update_implicit_jls.F90 + - src/science/surface/jules_griddiag_sf_explicit_jls.F90 + - src/science/surface/jules_griddiag_sf_implicit_jls.F90 + - src/science/surface/jules_gridinit_sf_explicit_jls.F90 + - src/science/surface/jules_land_sf_explicit_jls.F90 + - src/science/surface/jules_land_sf_implicit.jls.F90 + - src/science/surface/jules_ssi_sf_explicit_jls.F90 + - src/science/surface/jules_ssi_sf_implicit.jls.F90 + - src/science/surface/leaf_jls_mod.F90 + - src/science/surface/leaf_limits_mod.F90 + - src/science/surface/leaf_lit_jls.F90 + - src/science/surface/leaf_processes_sox_mod.F90 + - src/science/surface/microbe_jls.F90 + - src/science/surface/phi_m_h.F90 + - src/science/surface/phi_m_h_vol.F90 + - src/science/surface/physiol_jls_mod.F90 + - src/science/surface/raero_jls.F90 + - src/science/surface/root_frac_jls_mod.F90 + - src/science/surface/screen_tq_jls.F90 + - src/science/surface/sea_rough_int.F90 + - src/science/surface/sf_aero.F90 + - src/science/surface/sf_diags_mod.F90 + - src/science/surface/sf_evap_jls.F90 + - src/science/surface/sf_evap_srce_frac_mod.F90 + - src/science/surface/sf_flux_land_wtrac_mod.F90 + - src/science/surface/sf_flux_ssi_wtrac_mod.F90 + - src/science/surface/sf_land_imp_wtrac_mod.F90 + - src/science/surface/sf_flux_mod.F90 + - src/science/surface/sf_melt_jls.F90 + - src/science/surface/sf_orog_gb_jls.F90 + - src/science/surface/sf_orog_jls.F90 + - src/science/surface/sf_resist_jls.F90 + - src/science/surface/sf_resist_wtrac_mod.F90 + - src/science/surface/sf_rib.F90 + - src/science/surface/sf_ssi_imp_wtrac_mod.F90 + - src/science/surface/sf_stom_jls_mod.F90 + - src/science/surface/sfl_int_mod.F90 + - src/science/surface/sice_htf_jls.F90 + - src/science/surface/smc_ext_jls_mod.F90 + - src/science/surface/soil_evap_jls.F90 + - src/science/surface/sugar_mod.F90 + - src/science/surface/stdev1.F90 + - src/science/surface/urbanz0.F90 + - src/science/surface/vgrav_jls.F90 + - src/science/vegetation/nvg_sparm_jls_mod.F90 + - src/science/vegetation/pft_sparm_jls_mod.F90 + - src/science/vegetation/sparm_jls_mod.F90 + - src/util/shared/gridbox_mean_mod.F90 + - src/util/shared/metstats/metstats_mod.F90 diff --git a/interfaces/jules_interface/build/import.mk b/interfaces/jules_interface/build/import.mk index 144b5c8f8..bb1c8870b 100644 --- a/interfaces/jules_interface/build/import.mk +++ b/interfaces/jules_interface/build/import.mk @@ -8,9 +8,8 @@ export PROJECT_SOURCE = $(APPS_ROOT_DIR)/interfaces/jules_interface/source .PHONY: import-jules_interface import-jules_interface: # Get a copy of the source code from the JULES repository - $Q. $(APPS_ROOT_DIR)/dependencies.sh \ - && fcm make -C $(SCRATCH_DIR)/jules -f $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.cfg - $Qrsync -acvz $(SCRATCH_DIR)/jules/extract/ $(WORKING_DIR)/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.yaml + $Qrsync -acvz $(SCRATCH_DIR)/jules $(WORKING_DIR)/ # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/socrates_interface/build/extract.cfg b/interfaces/socrates_interface/build/extract.cfg deleted file mode 100644 index 3b4f55faa..000000000 --- a/interfaces/socrates_interface/build/extract.cfg +++ /dev/null @@ -1,54 +0,0 @@ -############################################################################## -# (c) Crown copyright 2025 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## - -steps = extract - -extract.ns = socrates - -extract.location{primary}[socrates] = fcm:socrates.xm -extract.location[socrates] = trunk@$socrates_rev -extract.location{diff}[socrates] = $socrates_sources -extract.path-excl[socrates] = / # everything -extract.path-incl[socrates] = \ - src/cosp_control/cosp_constants_mod.F90 \ - src/cosp_control/cosp_def_diag.F90 \ - src/cosp_control/cosp_diagnostics_mod.F90 \ - src/cosp_control/cosp_input_mod.F90 \ - src/cosp_control/cosp_mod.F90 \ - src/cosp_control/cosp_radiation_mod.F90 \ - src/cosp_control/cosp_types_mod.F90 \ - src/cosp_github/driver/src/cosp2_io.f90 \ - src/cosp_github/model-interface/cosp_errorHandling.F90 \ - src/cosp_github/model-interface/cosp_kinds.F90 \ - src/cosp_github/src \ - src/cosp_github/subsample_and_optics_example/optics/cosp_optics.F90 \ - src/cosp_github/subsample_and_optics_example/optics/quickbeam_optics \ - src/illumination/astro_constants_mod.F90 \ - src/illumination/def_orbit.F90 \ - src/illumination/orbprm_mod.F90 \ - src/illumination/socrates_illuminate.F90 \ - src/illumination/solang_mod.F90 \ - src/illumination/solinc_mod.F90 \ - src/illumination/solpos_mod.F90 \ - src/interface_core/socrates_bones.F90 \ - src/interface_core/socrates_cloud_abs_diag.F90 \ - src/interface_core/socrates_cloud_ext_diag.F90 \ - src/interface_core/socrates_cloud_gen.F90 \ - src/interface_core/socrates_cloud_level_diag.F90 \ - src/interface_core/socrates_def_diag.F90 \ - src/interface_core/socrates_runes.F90 \ - src/interface_core/socrates_set_aer.F90 \ - src/interface_core/socrates_set_atm.F90 \ - src/interface_core/socrates_set_bound.F90 \ - src/interface_core/socrates_set_cld.F90 \ - src/interface_core/socrates_set_cld_dim.F90 \ - src/interface_core/socrates_set_cld_mcica.F90 \ - src/interface_core/socrates_set_control.F90 \ - src/interface_core/socrates_set_diag.F90 \ - src/interface_core/socrates_set_dimen.F90 \ - src/interface_core/socrates_set_spectrum.F90 \ - src/interface_core/socrates_set_topography.F90 \ - src/radiance_core \ No newline at end of file diff --git a/interfaces/socrates_interface/build/extract.yaml b/interfaces/socrates_interface/build/extract.yaml new file mode 100644 index 000000000..08f39fcc3 --- /dev/null +++ b/interfaces/socrates_interface/build/extract.yaml @@ -0,0 +1,46 @@ +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +socrates: + - src/cosp_control/cosp_constants_mod.F90 + - src/cosp_control/cosp_def_diag.F90 + - src/cosp_control/cosp_diagnostics_mod.F90 + - src/cosp_control/cosp_input_mod.F90 + - src/cosp_control/cosp_mod.F90 + - src/cosp_control/cosp_radiation_mod.F90 + - src/cosp_control/cosp_types_mod.F90 + - src/cosp_github/driver/src/cosp2_io.f90 + - src/cosp_github/model-interface/cosp_errorHandling.F90 + - src/cosp_github/model-interface/cosp_kinds.F90 + - src/cosp_github/src + - src/cosp_github/subsample_and_optics_example/optics/cosp_optics.F90 + - src/cosp_github/subsample_and_optics_example/optics/quickbeam_optics + - src/illumination/astro_constants_mod.F90 + - src/illumination/def_orbit.F90 + - src/illumination/orbprm_mod.F90 + - src/illumination/socrates_illuminate.F90 + - src/illumination/solang_mod.F90 + - src/illumination/solinc_mod.F90 + - src/illumination/solpos_mod.F90 + - src/interface_core/socrates_bones.F90 + - src/interface_core/socrates_cloud_abs_diag.F90 + - src/interface_core/socrates_cloud_ext_diag.F90 + - src/interface_core/socrates_cloud_gen.F90 + - src/interface_core/socrates_cloud_level_diag.F90 + - src/interface_core/socrates_def_diag.F90 + - src/interface_core/socrates_runes.F90 + - src/interface_core/socrates_set_aer.F90 + - src/interface_core/socrates_set_atm.F90 + - src/interface_core/socrates_set_bound.F90 + - src/interface_core/socrates_set_cld.F90 + - src/interface_core/socrates_set_cld_dim.F90 + - src/interface_core/socrates_set_cld_mcica.F90 + - src/interface_core/socrates_set_control.F90 + - src/interface_core/socrates_set_diag.F90 + - src/interface_core/socrates_set_dimen.F90 + - src/interface_core/socrates_set_spectrum.F90 + - src/interface_core/socrates_set_topography.F90 + - src/radiance_core diff --git a/interfaces/socrates_interface/build/import.mk b/interfaces/socrates_interface/build/import.mk index e2c097e6c..35e5a09b3 100644 --- a/interfaces/socrates_interface/build/import.mk +++ b/interfaces/socrates_interface/build/import.mk @@ -8,9 +8,8 @@ export PROJECT_SOURCE = $(APPS_ROOT_DIR)/interfaces/socrates_interface/source .PHONY: import-socrates_interface import-socrates_interface: # Get a copy of the source code from the SCORATES repository - $Q. $(APPS_ROOT_DIR)/dependencies.sh \ - && fcm make -C $(SCRATCH_DIR)/socrates -f $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.cfg - $Qrsync -acvz $(SCRATCH_DIR)/socrates/extract/ $(WORKING_DIR)/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(SCRATCH_DIR) -e $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.yaml + $Qrsync -acvz $(SCRATCH_DIR)/socrates $(WORKING_DIR)/ # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/rose-stem/Jinja2Filters/determine_source.py b/rose-stem/Jinja2Filters/determine_source.py deleted file mode 100644 index 30c82cbf4..000000000 --- a/rose-stem/Jinja2Filters/determine_source.py +++ /dev/null @@ -1,65 +0,0 @@ -############################################################################## -# (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. -############################################################################## -''' -Function to read through the dependencies.sh in an lfric_apps working copy and -determine the specified source for the argument, repo. Uses a subprocess ssh -command as working copy may be remote when this needs to be run by cylc. -Intended as a Jinja2 Custom Filter -''' - -import os -import subprocess - -def determine_source(wc_loc, repo): - ''' - Main function for Jinja2 Custom Filter - Get a source for a particular repo from the dependencies.sh file in the - source for this rose-stem. - ''' - # Determine the host and the path to the dependencies file, and populate the - # subprocess command - try: - host, path = wc_loc.split(":") - path = os.path.join(path, "dependencies.sh") - cat_command = f"ssh -o StrictHostKeyChecking=no {host} cat {path}" - except ValueError: - path = os.path.join(wc_loc, "dependencies.sh") - cat_command = f"cat {path}" - # Run the subprocess command and read the stdout - result = subprocess.run( - cat_command.split(), capture_output=True, text=True - ) - # Raise an error if the returncode is positive - if result.returncode: - raise RuntimeError( - f"An error occured while running the command '{cat_command}' " - "in order to read the dependencies file. The error message is:\n\n" - f"'{result.stderr}'" - ) - dependencies_file = result.stdout.split("\n") - source = '' - rev = '' - - # Read through the dependencies file and populate revision and source - # variables for requested repo - for line in dependencies_file: - line = line.strip() - if line.startswith(f"export {repo}_rev"): - rev = line.split("=")[1] - if line.startswith(f"export {repo}_sources"): - source = line.split("=")[1] - # If source not set then default to trunk - if source == '': - # lfric_core doesn't match the url - if repo == "lfric_core": - source = "fcm:lfric.xm_tr" - else: - source = f"fcm:{repo}.xm_tr" - # If a revision set then append to source - # Defaults to the head of the source - if rev != '': - source = f"{source}@{rev}" - return source diff --git a/rose-stem/Jinja2Filters/get_precision.py b/rose-stem/Jinja2Filters/get_precision.py index 3f23fe17c..40ee58e38 100644 --- a/rose-stem/Jinja2Filters/get_precision.py +++ b/rose-stem/Jinja2Filters/get_precision.py @@ -56,7 +56,6 @@ def get_precision(build_string): # Construct the output string defining the precision # Potentially change the default such that it is the most common # This ensures that all tasks with the same build get the same build string - values_list = list(precisions.values()) precision_string = f"{default}bit" for precision_type in types: num = precisions[precision_type[0]] diff --git a/rose-stem/app/check_config_dump/rose-app.conf b/rose-stem/app/check_config_dump/rose-app.conf index 317118db5..c7e608d2d 100644 --- a/rose-stem/app/check_config_dump/rose-app.conf +++ b/rose-stem/app/check_config_dump/rose-app.conf @@ -1,2 +1,2 @@ [command] -default=$CYLC_WORKFLOW_RUN_DIR/bin/check_config_dump.py -s $SOURCE_ROOT/apps +default=$CYLC_WORKFLOW_RUN_DIR/bin/check_config_dump.py -s $SOURCE_ROOT/lfric_apps diff --git a/rose-stem/app/check_global_variables/rose-app.conf b/rose-stem/app/check_global_variables/rose-app.conf index ee9d21779..1495ff98a 100644 --- a/rose-stem/app/check_global_variables/rose-app.conf +++ b/rose-stem/app/check_global_variables/rose-app.conf @@ -1,2 +1,2 @@ [command] -default=$CYLC_WORKFLOW_RUN_DIR/bin/occupyfortran -directory $SOURCE_ROOT/apps -dirtylist dirtylist.txt source +default=$CYLC_WORKFLOW_RUN_DIR/bin/occupyfortran -directory $SOURCE_ROOT/lfric_apps -dirtylist dirtylist.txt source diff --git a/rose-stem/app/check_macro_chains/rose-app.conf b/rose-stem/app/check_macro_chains/rose-app.conf index a417652b8..0a98cbc26 100644 --- a/rose-stem/app/check_macro_chains/rose-app.conf +++ b/rose-stem/app/check_macro_chains/rose-app.conf @@ -1,2 +1,2 @@ [command] -default=python3 $CYLC_WORKFLOW_SHARE_DIR/imported_github_scripts/lfric_macros/check_macro_chains.py +default=python3 $CYLC_WORKFLOW_SHARE_DIR/source/SimSys_Scripts/lfric_macros/check_macro_chains.py diff --git a/rose-stem/app/check_style/rose-app.conf b/rose-stem/app/check_style/rose-app.conf index 88a3caac9..f584e7c61 100644 --- a/rose-stem/app/check_style/rose-app.conf +++ b/rose-stem/app/check_style/rose-app.conf @@ -1,2 +1,2 @@ [command] -default=$CYLC_WORKFLOW_RUN_DIR/bin/stylist_launcher.py -s $SOURCE_ROOT/apps +default=$CYLC_WORKFLOW_RUN_DIR/bin/stylist_launcher.py -s $SOURCE_ROOT/lfric_apps diff --git a/rose-stem/app/configurate/bin/configurate.sh b/rose-stem/app/configurate/bin/configurate.sh index 02e3715b5..1de59b29c 100755 --- a/rose-stem/app/configurate/bin/configurate.sh +++ b/rose-stem/app/configurate/bin/configurate.sh @@ -10,7 +10,7 @@ set -e TOOLS_DIR=$LFRIC_CORE_DIR/infrastructure/build/tools # Run rose_picker to generate rose-meta.json and config_namelists.txt -rose_picker $SOURCE_ROOT/apps/rose-meta/lfric-gungho/HEAD/rose-meta.conf -include_dirs $SOURCE_ROOT/apps/rose-meta -include_dirs $SOURCE_ROOT/core/rose-meta +rose_picker $SOURCE_ROOT/lfric_apps/rose-meta/lfric-gungho/HEAD/rose-meta.conf -include_dirs $SOURCE_ROOT/lfric_apps/rose-meta -include_dirs $SOURCE_ROOT/lfric_core/rose-meta # Run "GenerateNamelist". This takes a rose-meta.json. This produces the *_config_mod.F90 files echo $TOOLS_DIR/GenerateNamelist rose-meta.json -directory LFRIC_CORE_DIR diff --git a/rose-stem/app/export_simsys_scripts/bin/script_updater.sh b/rose-stem/app/export_simsys_scripts/bin/script_updater.sh deleted file mode 100755 index 58080ed9c..000000000 --- a/rose-stem/app/export_simsys_scripts/bin/script_updater.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# *****************************COPYRIGHT******************************* -# (C) Crown copyright 2024 Met Office. All rights reserved. -# For further details please refer to the file COPYRIGHT.txt -# which you should have received as part of this distribution. -# *****************************COPYRIGHT******************************* - -github_url=${github_url:-"https://github.com/MetOffice/SimSys_Scripts.git"} -github_branch=${github_branch:-"main"} - -echo "Git-scripts updater has started running" - -rm -rf "${CYLC_WORKFLOW_SHARE_DIR}/imported_github_scripts" -if [[ $? != 0 ]]; then - echo "Couldn't remove specified folder. Try checking permissions" - exit 1 - else - echo "Successfully removed old SimSys_Scripts git directory" -fi - -git clone -b "$github_branch" --single-branch "$github_url" \ - "${CYLC_WORKFLOW_SHARE_DIR}/imported_github_scripts" 2>&1 -if [[ $? != 0 ]]; then - echo "Unable to clone remote git repo into specified location." - echo "Check git branch, git url, destination path, permissions and git access" - exit 1 - else - echo "Git repo successfully cloned" -fi - -echo "Copying suite_report and fcm_bdiff to cylc-run/bin" -cp "${CYLC_WORKFLOW_SHARE_DIR}/imported_github_scripts/suite_report.py" "${CYLC_WORKFLOW_RUN_DIR}/bin" -cp "${CYLC_WORKFLOW_SHARE_DIR}/imported_github_scripts/fcm_bdiff.py" "${CYLC_WORKFLOW_RUN_DIR}/bin" - -echo "Github scripts updated" diff --git a/rose-stem/app/export_simsys_scripts/rose-app.conf b/rose-stem/app/export_simsys_scripts/rose-app.conf deleted file mode 100644 index 444610436..000000000 --- a/rose-stem/app/export_simsys_scripts/rose-app.conf +++ /dev/null @@ -1,2 +0,0 @@ -[command] -default=script_updater.sh diff --git a/rose-stem/app/export_source/bin/export_source.py b/rose-stem/app/export_source/bin/export_source.py deleted file mode 100755 index 8aa20e0c1..000000000 --- a/rose-stem/app/export_source/bin/export_source.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python3 -############################################################################## -# (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. -############################################################################## - -import os -import subprocess - -def run_command(command): - """ - Run a subprocess command and return the result object - Inputs: - - command, str with command to run - """ - result = subprocess.run( - command.split(), - capture_output=True, - text=True, - timeout=600, - shell=False, - check=False, - ) - print(result.stdout) - if result.returncode: - raise RuntimeError( - f"The command '{command}' failed with error:\n\n{result.stderr}" - ) - -# Read paths and sources from environment variables -source_root = os.environ["SOURCE_ROOT"] -apps_source = os.environ["SOURCE_LFRIC_APPS"] -apps_path = os.path.join(source_root, "apps") -core_source = os.environ["SOURCE_LFRIC_CORE"] -core_path = os.path.join(source_root, "core") -ctldata_path = os.path.join(source_root, "ctldata") - -print(f"\n[INFO] LFRic Apps Source: {apps_source}") -print(f"[INFO] LFRic Core Source: {core_source}\n") - -# Create directories for the different sources -mkdir_command = f"mkdir -p " -run_command(f"{mkdir_command}{apps_path}") -run_command(f"{mkdir_command}{core_path}") -run_command(f"{mkdir_command}{ctldata_path}") - -# Export entire apps and core directories -run_command(f"fcm export --force {apps_source} {apps_path}") -run_command(f"fcm export --force {core_source} {core_path}") - -# Read through the file defining ctldata sources -# For each source, export into ctldata directory -dests = [] -ctldata_file = "ctldata_list.txt" -with open(ctldata_file) as f: - for line in f: - line = line.strip() - line = line.strip("\n") - if line.startswith("#") or len(line) == 0: - continue - source, dest = line.split() - if dest in dests: - raise RuntimeError( - "Two sources in the ctldata_list.txt file share the same " - f"destination: {dest}. Please deduplicate these." - ) - dests.append(dest) - print(f"[INFO] Source: {source} Dest: {dest}") - run_command( - f"fcm export --force {source} {os.path.join(ctldata_path, dest)}" - ) - diff --git a/rose-stem/app/export_source/file/ctldata_list.txt b/rose-stem/app/export_source/file/ctldata_list.txt deleted file mode 100644 index 9f014b420..000000000 --- a/rose-stem/app/export_source/file/ctldata_list.txt +++ /dev/null @@ -1,29 +0,0 @@ -# List of ctldata required for the lfric_apps test suite. -# File installs from fcm mirrors should be done centrally through this file -# instead of through rose-app.conf files to avoid network connection issues. -# Each line should be of format: -# -# -# -# Files will be installed to CYLC_WORKFLOW_DIR/share/source/ctldata/ -# -# rose-app.conf entries should be of format: -# -# [file:spec] -# mode=symlink+ -# source=$SOURCE_ROOT/ctldata/ - -#FastJX spectral files -fcm:um_aux.xm/trunk/ctldata/UKCA/fastj@vn1.24 fastj - -# lut files -fcm:um_aux.xm/trunk/ctldata/UKCA/radaer/ga7_1@vn1.24 lut - -# precalc files -fcm:um_aux.xm/branches/dev/cameronmcerlich/vn1.24_microplastic_um_aux/ctldata/spectral/ga7_1@129330 precalc - -# spec files -fcm:socrates.xm_tr/data/spectra/ga9@um13.7 spec_ga9 -fcm:spectral.xm_tr/gj1214b@um13.7 spec_gj1214b -fcm:spectral.xm_tr/thai@um13.7 spec_thai -fcm:spectral.xm_tr/hd209458b@1736 spec_hd209458b diff --git a/rose-stem/app/export_source/rose-app.conf b/rose-stem/app/export_source/rose-app.conf deleted file mode 100644 index 42141f058..000000000 --- a/rose-stem/app/export_source/rose-app.conf +++ /dev/null @@ -1,2 +0,0 @@ -[command] -default=export_source.py diff --git a/rose-stem/app/extract_source/rose-app.conf b/rose-stem/app/extract_source/rose-app.conf new file mode 100644 index 000000000..ae08952f0 --- /dev/null +++ b/rose-stem/app/extract_source/rose-app.conf @@ -0,0 +1,13 @@ +[command] +default=python3 rose_stem_extract_source.py + =cp $SOURCE_ROOT/lfric_apps/dependencies.yaml $CYLC_WORKFLOW_RUN_DIR + =cp $SOURCE_ROOT/SimSys_Scripts/github_scripts/suite_report_git.py $CYLC_WORKFLOW_RUN_DIR/bin + =cp $SOURCE_ROOT/SimSys_Scripts/github_scripts/suite_data.py $CYLC_WORKFLOW_RUN_DIR/bin + =cp $SOURCE_ROOT/SimSys_Scripts/github_scripts/git_bdiff.py $CYLC_WORKFLOW_RUN_DIR/bin + =cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/get_git_sources.py $CYLC_WORKFLOW_RUN_DIR/bin + +[file:get_git_sources.py] +source=git:https://github.com/MetOffice/SimSys_Scripts.git::github_scripts/get_git_sources.py::main + +[file:rose_stem_extract_source.py] +source=git:https://github.com/MetOffice/SimSys_Scripts.git::github_scripts/rose_stem_extract_source.py::main diff --git a/rose-stem/app/fcm_make_lfric2um/file/fcm-make.cfg b/rose-stem/app/fcm_make_lfric2um/file/fcm-make.cfg deleted file mode 100644 index 9b1927852..000000000 --- a/rose-stem/app/fcm_make_lfric2um/file/fcm-make.cfg +++ /dev/null @@ -1,5 +0,0 @@ -include=$HOST_SOURCE_LFRIC_APPS/applications/lfricinputs/fcm-make/$CONFIG/$CONFIG.cfg$SOURCE_LFRIC_APPS_REV - -extract.location{diff}[lfric_apps] = $lfric_apps_sources -extract.location{diff}[lfric_core] = $lfric_core_sources -extract.location{diff}[shumlib] = $shumlib_sources diff --git a/rose-stem/app/fcm_make_lfric2um/rose-app.conf b/rose-stem/app/fcm_make_lfric2um/rose-app.conf deleted file mode 100644 index ca8a88cf5..000000000 --- a/rose-stem/app/fcm_make_lfric2um/rose-app.conf +++ /dev/null @@ -1,8 +0,0 @@ -[env] -CONFIG=$CONFIG -level=$LEVEL -lfric_apps_rev=$SOURCE_LFRIC_APPS_REV -lfric_apps_sources=$HOST_SOURCE_LFRIC_APPS -lfric_core_sources=$SOURCE_LFRIC_CORE -lfricinputs_util=lfric2um -shumlib_sources=$SOURCE_SHUMLIB diff --git a/rose-stem/app/fcm_make_river/file/fcm-make.cfg b/rose-stem/app/fcm_make_river/file/fcm-make.cfg index e0a8cc5de..ffe3b1c99 100644 --- a/rose-stem/app/fcm_make_river/file/fcm-make.cfg +++ b/rose-stem/app/fcm_make_river/file/fcm-make.cfg @@ -1,4 +1,4 @@ $fpp_defs=RIVERS_ONLY RIVER_CPL # Just include the FCM make file in the given JULES source directory -include = $JULES_SOURCE/etc/fcm-make/make-river.cfg$JULES_SOURCE_VN +include = $JULES_EXTRACTED/etc/fcm-make/make-river.cfg diff --git a/rose-stem/app/fcm_make_river/rose-app.conf b/rose-stem/app/fcm_make_river/rose-app.conf index 668795530..bfc23d180 100644 --- a/rose-stem/app/fcm_make_river/rose-app.conf +++ b/rose-stem/app/fcm_make_river/rose-app.conf @@ -3,9 +3,9 @@ meta=jules-fcm-make/vn7.2 # This is deliberately left empty to allow setting of environment variables # from the rose-stem suite [env] -HOST_SOURCE_JULES_BASE=fcm:jules.xm_tr JULES_BUILD=normal JULES_COUPLER=oasis +JULES_EXTRACTED=$SOURCE_ROOT/jules JULES_FFLAGS_EXTRA= JULES_LDFLAGS_EXTRA= JULES_MPI=mpi @@ -13,7 +13,5 @@ JULES_NETCDF=netcdf JULES_OMP=noomp JULES_PLATFORM=meto-ex1a-cce JULES_REMOTE=local -JULES_SOURCE=$JULES_SOURCE -JULES_SOURCE_VN=$JULES_REV SOURCE_PATH_PREFIX=river VN= diff --git a/rose-stem/app/fcm_make_scintelapi/file/fcm-make.cfg b/rose-stem/app/fcm_make_scintelapi/file/fcm-make.cfg deleted file mode 100644 index 1e3742787..000000000 --- a/rose-stem/app/fcm_make_scintelapi/file/fcm-make.cfg +++ /dev/null @@ -1,4 +0,0 @@ -include=$HOST_SOURCE_LFRIC_APPS/applications/lfricinputs/fcm-make/$CONFIG/$CONFIG.cfg$SOURCE_LFRIC_APPS_REV - -extract.location{diff}[lfric_apps] = $lfric_apps_sources -extract.location{diff}[lfric_core] = $lfric_core_sources diff --git a/rose-stem/app/fcm_make_scintelapi/rose-app.conf b/rose-stem/app/fcm_make_scintelapi/rose-app.conf deleted file mode 100644 index 1383a2bae..000000000 --- a/rose-stem/app/fcm_make_scintelapi/rose-app.conf +++ /dev/null @@ -1,7 +0,0 @@ -[env] -CONFIG=$CONFIG -level=$LEVEL -lfric_apps_rev=$SOURCE_LFRIC_APPS_REV -lfric_apps_sources=$HOST_SOURCE_LFRIC_APPS -lfric_core_sources=$SOURCE_LFRIC_CORE -lfricinputs_util=scintelapi diff --git a/rose-stem/app/fcm_make_um2lfric/file/fcm-make.cfg b/rose-stem/app/fcm_make_um2lfric/file/fcm-make.cfg deleted file mode 100644 index 9b1927852..000000000 --- a/rose-stem/app/fcm_make_um2lfric/file/fcm-make.cfg +++ /dev/null @@ -1,5 +0,0 @@ -include=$HOST_SOURCE_LFRIC_APPS/applications/lfricinputs/fcm-make/$CONFIG/$CONFIG.cfg$SOURCE_LFRIC_APPS_REV - -extract.location{diff}[lfric_apps] = $lfric_apps_sources -extract.location{diff}[lfric_core] = $lfric_core_sources -extract.location{diff}[shumlib] = $shumlib_sources diff --git a/rose-stem/app/fcm_make_um2lfric/rose-app.conf b/rose-stem/app/fcm_make_um2lfric/rose-app.conf deleted file mode 100644 index 926c9f84b..000000000 --- a/rose-stem/app/fcm_make_um2lfric/rose-app.conf +++ /dev/null @@ -1,8 +0,0 @@ -[env] -CONFIG=$CONFIG -level=$LEVEL -lfric_apps_rev=$SOURCE_LFRIC_APPS_REV -lfric_apps_sources=$HOST_SOURCE_LFRIC_APPS -lfric_core_sources=$SOURCE_LFRIC_CORE -lfricinputs_util=um2lfric -shumlib_sources=$SOURCE_SHUMLIB diff --git a/rose-stem/app/jules/rose-app.conf b/rose-stem/app/jules/rose-app.conf index 1dd161e1d..1805c0613 100644 --- a/rose-stem/app/jules/rose-app.conf +++ b/rose-stem/app/jules/rose-app.conf @@ -102,15 +102,15 @@ source=$ROSE_SUITE_DIR/app/jules/file/iodef.xml [file:lut] mode=symlink+ -source=$SOURCE_ROOT/ctldata/lut +source=$BIG_DATA_DIR/um_aux/UKCA/radaer/ga7_1 [file:precalc] mode=symlink+ -source=$SOURCE_ROOT/ctldata/precalc +source=$BIG_DATA_DIR/um_aux/spectral/ga7_1 [file:spec] mode=symlink+ -source=$SOURCE_ROOT/ctldata/spec_ga9 +source=$SOURCE_ROOT/socrates/data/spectra/ga9 [!!namelist:aerosol] !!aclw_file='lut/nml_ac_lw' diff --git a/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf b/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf index 3ffa33e1e..83a26c700 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-camembert_case3_gj1214b.conf @@ -2,7 +2,7 @@ source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_idealised.xml [file:spec] -source=$SOURCE_ROOT/ctldata/spec_gj1214b +source=$SOURCE_ROOT/socrates-spectral/gj1214b [!!namelist:aerosol] !!aclw_file='lut/nml_ac_lw' diff --git a/rose-stem/app/lfric_atm/opt/rose-app-chemistry.conf b/rose-stem/app/lfric_atm/opt/rose-app-chemistry.conf index 0ef8da2ef..de3173590 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-chemistry.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-chemistry.conf @@ -1,3 +1,7 @@ +[file:fastj] +mode=symlink+ +source=$BIG_DATA_DIR/um_aux/UKCA/fastj + [file:iodef.xml] source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_gal_clim_chem.xml diff --git a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf index 93bbd2a88..e05601b1a 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-hd209458b.conf @@ -2,7 +2,7 @@ source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_idealised_flexchem.xml [file:spec] -source=$SOURCE_ROOT/ctldata/spec_hd209458b +source=$SOURCE_ROOT/socrates-spectral/hd209458b [!!namelist:aerosol] !!aclw_file='lut/nml_ac_lw' diff --git a/rose-stem/app/lfric_atm/opt/rose-app-thai.conf b/rose-stem/app/lfric_atm/opt/rose-app-thai.conf index e96747638..bca554c20 100644 --- a/rose-stem/app/lfric_atm/opt/rose-app-thai.conf +++ b/rose-stem/app/lfric_atm/opt/rose-app-thai.conf @@ -2,7 +2,7 @@ source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_idealised.xml [file:spec] -source=$SOURCE_ROOT/ctldata/spec_thai +source=$SOURCE_ROOT/socrates-spectral/thai [namelist:blayer] bl_levels=37 diff --git a/rose-stem/app/lfric_atm/rose-app.conf b/rose-stem/app/lfric_atm/rose-app.conf index 4ed5aecf8..9167a1869 100644 --- a/rose-stem/app/lfric_atm/rose-app.conf +++ b/rose-stem/app/lfric_atm/rose-app.conf @@ -96,25 +96,21 @@ source=(namelist:aerosol) = (namelist:vertadvect) = (namelist:wind_forcing) -[file:fastj] -mode=symlink+ -source=$SOURCE_ROOT/ctldata/fastj - [file:iodef.xml] mode=auto source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_gal_nwp.xml [file:lut] mode=symlink+ -source=$SOURCE_ROOT/ctldata/lut +source=$BIG_DATA_DIR/um_aux/UKCA/radaer/ga7_1 [file:precalc] mode=symlink+ -source=$SOURCE_ROOT/ctldata/precalc +source=$BIG_DATA_DIR/um_aux/spectral/ga7_1 [file:spec] mode=symlink+ -source=$SOURCE_ROOT/ctldata/spec_ga9 +source=$SOURCE_ROOT/socrates/data/spectra/ga9 [namelist:aerosol] aclw_file='lut/nml_ac_lw' diff --git a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf index f0275c2a9..ba65d5d3d 100644 --- a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf +++ b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf @@ -97,15 +97,15 @@ source=$ROSE_SUITE_DIR/app/lfric_coupled_atmosphere/file/iodef_basic_gal.xml [file:lut] mode=symlink+ -source=$SOURCE_ROOT/ctldata/lut +source=$BIG_DATA_DIR/um_aux/UKCA/radaer/ga7_1 [file:precalc] mode=symlink+ -source=$SOURCE_ROOT/ctldata/precalc +source=$BIG_DATA_DIR/um_aux/spectral/ga7_1 [file:spec] mode=symlink+ -source=$SOURCE_ROOT/ctldata/spec_ga9 +source=$SOURCE_ROOT/socrates/data/spectra/ga9 [namelist:aerosol] aclw_file='lut/nml_ac_lw' diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf index d153f989b..57c24ca7f 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf @@ -4,12 +4,6 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar -[file:iodef.xml] -source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_ral.xml - -[file:spec] -source=fcm:socrates.xm_tr/data/spectra/ga7@um13.3 - [namelist:aerosol] aclw_file='lut/nml_ac_lw' acsw_file='lut/nml_ac_sw' diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf index 0069b8f27..1d3be2c61 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf @@ -4,12 +4,6 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar -[file:iodef.xml] -source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_ral.xml - -[file:spec] -source=fcm:socrates.xm_tr/data/spectra/ga7@um13.3 - [namelist:aerosol] activation_scheme='off' glomap_mode='climatology' diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf index ef0515d42..977ecfe0f 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf @@ -4,12 +4,6 @@ default=mkdir -p $MESH_DIR ; mpiexec -n 1 $BIN_DIR/planar_mesh_generator mesh_ge [env] mesh_generator=Planar -[file:iodef.xml] -source=$ROSE_SUITE_DIR/app/lfric_atm/file/iodef_ral.xml - -[file:spec] -source=fcm:socrates.xm_tr/data/spectra/ga7@um13.3 - [namelist:aerosol] activation_scheme='off' glomap_mode='climatology' diff --git a/rose-stem/app/rose-stem_lint_check/rose-app.conf b/rose-stem/app/rose-stem_lint_check/rose-app.conf index e05bb54fb..f5a902633 100644 --- a/rose-stem/app/rose-stem_lint_check/rose-app.conf +++ b/rose-stem/app/rose-stem_lint_check/rose-app.conf @@ -1,2 +1,2 @@ [command] -default=$CYLC_WORKFLOW_RUN_DIR/bin/rose-stem_lint_check.py -s $SOURCE_ROOT/apps/rose-stem +default=$CYLC_WORKFLOW_RUN_DIR/bin/rose-stem_lint_check.py -s $SOURCE_ROOT/lfric_apps/rose-stem diff --git a/rose-stem/app/rose_ana_lfric2um/rose-app.conf b/rose-stem/app/rose_ana_lfric2um/rose-app.conf index 0e9fdf2ee..d3aa6606a 100644 --- a/rose-stem/app/rose_ana_lfric2um/rose-app.conf +++ b/rose-stem/app/rose_ana_lfric2um/rose-app.conf @@ -1,4 +1,5 @@ -[ana:mule_cumf.MuleCumf(Comparison of output.dump)] +[ana:grepper.SingleCommandStatus(Comparison of dump file)] +command=mule-cumf --fail-if-differ {0} {1} files=$KGO_DIR/output.dump =$SUITE_DIR/output.dump kgo_file=0 diff --git a/rose-stem/app/validate_rose_meta/rose-app.conf b/rose-stem/app/validate_rose_meta/rose-app.conf index dcae070a5..f900783a8 100644 --- a/rose-stem/app/validate_rose_meta/rose-app.conf +++ b/rose-stem/app/validate_rose_meta/rose-app.conf @@ -1,2 +1,2 @@ [command] -default=python3 $CYLC_WORKFLOW_SHARE_DIR/imported_github_scripts/lfric_macros/validate_rose_meta.py -a $SOURCE_ROOT/apps -c $SOURCE_ROOT/core +default=python3 $SOURCE_ROOT/SimSys_Scripts/lfric_macros/validate_rose_meta.py -a $SOURCE_ROOT/lfric_apps -c $SOURCE_ROOT/lfric_core diff --git a/rose-stem/bin/extract_checker.py b/rose-stem/bin/extract_checker.py index 28212d14c..58e83a9c9 100755 --- a/rose-stem/bin/extract_checker.py +++ b/rose-stem/bin/extract_checker.py @@ -152,7 +152,7 @@ def generate_extract_lists(set_of_copied_files, set_of_compiled_files): print( "\n\nGenerating and printing extract lists which can be copied into " - "lfric_atm/fcm-make/extract.cfg." + "lfric_atm/fcm-make/extract.yaml." ) print( diff --git a/rose-stem/bin/rose-stem_lint_check.py b/rose-stem/bin/rose-stem_lint_check.py index 27faf47b7..a85777ad4 100755 --- a/rose-stem/bin/rose-stem_lint_check.py +++ b/rose-stem/bin/rose-stem_lint_check.py @@ -39,7 +39,7 @@ def run_command(command): command = f"cylc lint {source} -n S007 -n S012 -n S013 -n S014" result = run_command(command) try: - nissues = int(re.search("found (\d+) issue", result.stdout).group(1)) + nissues = int(re.search(r"found (\d+) issue", result.stdout).group(1)) print(result.stdout, file=sys.stderr) sys.exit( f"{nissues} Errors were detected - please fix them and run again" diff --git a/rose-stem/bin/site_validator.py b/rose-stem/bin/site_validator.py index 95000f9c7..a5e165b12 100755 --- a/rose-stem/bin/site_validator.py +++ b/rose-stem/bin/site_validator.py @@ -52,13 +52,10 @@ def generate_validate_command(source, site, group): command = ( "cylc validate --debug --check-circular " - f"-S RUN_NAMES=['{group}'] " + f"-z g={group} " f"-S SITE='{site}' " - f"-S HOST_SOURCE_LFRIC_APPS='{source}/apps' " - f"-S SOURCE_LFRIC_APPS='{source}/apps' " - f"-S SOURCE_LFRIC_APPS_REV=1 " f"{fncas}" - f"{source}/apps/rose-stem" + f"{source}/lfric_apps/rose-stem" ) return command diff --git a/rose-stem/bin/update_branch_kgos.py b/rose-stem/bin/update_branch_kgos.py index a1683c801..06f4b073a 100755 --- a/rose-stem/bin/update_branch_kgos.py +++ b/rose-stem/bin/update_branch_kgos.py @@ -105,7 +105,7 @@ def get_kgo_dirs(job, flow_file): if in_job_section: if line.startswith("CURRENT_KGO"): current = line.split("=")[-1].strip() - current = current.removeprefix("$SOURCE_ROOT/apps") + current = current.removeprefix("$SOURCE_ROOT/lfric_apps") elif line.startswith("NEW_KGO"): new = line.split("=")[-1].strip() new = new.removeprefix("$OUTPUT_ROOT") diff --git a/rose-stem/flow.cylc b/rose-stem/flow.cylc index c03da9dea..f762b6e18 100644 --- a/rose-stem/flow.cylc +++ b/rose-stem/flow.cylc @@ -5,6 +5,28 @@ {# under which the code may be used. #} {# ########################################################################### #} {% from "cylc.flow" import LOG %} +{% from "utils" import get_site %} +{% from "read_sources" import read_sources %} + +{% if SITE is not defined %} + {% set SITE = get_site() %} +{% endif %} +{% do LOG.info("Site: " + SITE) %} + +{% set SOURCE_DIRECTORY = ROSE_ORIG_HOST~":"~CYLC_WORKFLOW_SRC_DIR~"/.." %} +{# Include log message for suite_report #} +{% do LOG.info("LFRIC_APPS SOURCE CLONE="~SOURCE_DIRECTORY) %} + +{# Read in groups to run #} +{% if group is defined %} + {% set RUN_NAMES = group %} +{% elif g is defined %} + {% set RUN_NAMES = g %} +{% else %} + {% set RUN_NAMES = ["developer"] %} +{% endif %} +{% do LOG.info("Running groups: "~RUN_NAMES|join(' + ')) %} {# Include the site variables file #} {# Contains some settings used for the workflow #} @@ -32,20 +54,8 @@ {% set site_groups = {} %} {% include "site/"+SITE+"/groups.cylc" %} -{# Determine the lfric_core_source #} -{# if SOURCE_LFRIC is populated then use that value #} -{# Otherwise look in the dependencies.sh #} -{% if SOURCE_LFRIC is defined and SOURCE_LFRIC %} - {% set lfric_core_source = SOURCE_LFRIC %} -{% else %} - {% set lfric_core_source = HOST_SOURCE_LFRIC_APPS|determine_source("lfric_core") %} -{% endif %} - -{# For Coupled App jobs, determine the jules source #} -{% set jules_source = HOST_SOURCE_LFRIC_APPS|determine_source("jules") %} - -{# For LFRic Inputs, determine the shumlib source #} -{% set shumlib_source = HOST_SOURCE_LFRIC_APPS|determine_source("shumlib") %} +{# Read the sources of dependencies from the dependencies.yaml file #} +{% set dependencies = read_sources(SOURCE_DIRECTORY, "lfric_apps", USE_HEADS) %} {# Generate list of tasks given by --group= #} {# Expand any groups included so list is only tasks #} @@ -56,7 +66,6 @@ {% set scripts_list = [] %} {{ expand_task_list(site_groups, ["scripts"], false, scripts_list) }} {% do set_add(scripts_list, "kgo_groups_checker") %} -{% do set_add(scripts_list, "export_simsys_scripts") %} {# Load the task definitions for each application requested at current site #} {% set requested_tasks = {} %} @@ -73,11 +82,36 @@ UTC mode = True install = site/, templates/ [[events]] - mail events = timeout + mail events = stall timeout abort on stall timeout = True stall timeout = PT3H - shutdown handlers = "suite_report.py" - stall handlers = "suite_report.py" + shutdown handlers = "suite_report_git.py -S $CYLC_WORKFLOW_RUN_DIR" + stall handlers = "suite_report_git.py -S $CYLC_WORKFLOW_RUN_DIR" + +# Check if running physics - don't extract these if not +{% if "lfric_atm" in requested_applications + or "jules" in requested_applications + or "ngarch" in requested_applications + or "lfric_coupled" in requested_applications %} + + {% do LOG.debug("Running Physics Schemes") %} + +{% else %} + + {% do LOG.debug("Not Running Physics Schemes") %} + + {% for item in ["casim", + "jules", + "ukca", + "socrates", + "socrates-spectral", + "um_aux"] %} + + {% do dependencies.pop(item, None) %} + + {% endfor %} + +{% endif %} [scheduling] [[graph]] @@ -112,7 +146,6 @@ SOURCE_ROOT = $CYLC_WORKFLOW_SHARE_DIR/source OUTPUT_ROOT = $CYLC_WORKFLOW_SHARE_DIR/output LAUNCH_SCRIPT = $CYLC_WORKFLOW_RUN_DIR/site/{{SITE}}/common/bin - INFRASTRUCTURE_ROSESTEM = $SOURCE_ROOT/core/infrastructure/rose-stem/ [[[events]]] submission timeout = PT5H diff --git a/rose-stem/lib/python/read_sources.py b/rose-stem/lib/python/read_sources.py new file mode 100644 index 000000000..50287162a --- /dev/null +++ b/rose-stem/lib/python/read_sources.py @@ -0,0 +1,66 @@ +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +import yaml +import tempfile +import os +from subprocess import run +from shutil import rmtree + +def get_dependencies_file(wc_loc): + """ + Copy the dependencies file to a temporary directory on the local machine that can be + read. + """ + + tempdir = tempfile.mkdtemp() + + try: + host, path = wc_loc.split(":", 1) + path = os.path.join(path, "dependencies.yaml") + copy_command = f"scp -o StrictHostKeyChecking=no {host}:" + except ValueError: + path = os.path.join(wc_loc, "dependencies.yaml") + copy_command = "cp " + copy_command += f"{path} {tempdir}" + + result = run( + copy_command.split(), capture_output=True, text=True, timeout=120 + ) + + # Raise an error if the returncode is positive + if result.returncode: + raise RuntimeError( + f"An error occured while running the command '{copy_command}' " + "in order to read the dependencies file. The error message is:\n\n" + f"'{result.stderr}'" + ) + + return tempdir + +def read_sources(clone_source, repo, use_heads): + """ + Load the dependencies.yaml file as a dictionary + """ + + dependencies_file = get_dependencies_file(clone_source) + + with open(os.path.join(dependencies_file, "dependencies.yaml")) as stream: + dependencies = yaml.safe_load(stream) + + if not dependencies[repo]["source"]: + dependencies[repo]["source"] = clone_source + + # Populate parent, assume MetOffice is owner if not set + for dependency, values in dependencies.items(): + if "parent" not in values: + dependencies[dependency]["parent"] = f"MetOffice/{dependency}.git" + if use_heads: + dependencies[dependency]["ref"] = "" + + rmtree(dependencies_file) + + return dependencies diff --git a/rose-stem/lib/python/utils.py b/rose-stem/lib/python/utils.py new file mode 100644 index 000000000..2f8c3d68f --- /dev/null +++ b/rose-stem/lib/python/utils.py @@ -0,0 +1,20 @@ +############################################################################## +# (c) Crown copyright 2025 Met Office. All rights reserved. +# The file LICENCE, distributed with this code, contains details of the terms +# under which the code may be used. +############################################################################## + +from subprocess import Popen, PIPE + + +def get_site(): + proc = Popen( + ["rose", "config", "rose-stem", "automatic-options"], stdout=PIPE, text=True + ) + out, _ = proc.communicate() + if proc.returncode or "SITE" not in out: + raise Exception('Could not determine the rose-stem "SITE"') + # At some sites there may be many variables that are returned by rose config rose-stem + # Try to just grab the thing after SITE= and then ignore anything afterwards + site = out.split("SITE=")[1].split(' ')[0].strip() + return site diff --git a/rose-stem/rose-suite.conf b/rose-stem/rose-suite.conf index 94752bd24..97d086115 100644 --- a/rose-stem/rose-suite.conf +++ b/rose-stem/rose-suite.conf @@ -1,12 +1,9 @@ -ROSE_STEM_VERSION=1 - -[file:ana/mule_cumf.py] -source=(fcm:um.xm_tr/rose-stem/ana/mule_cumf.py) - [template variables] FFLAGS='' HOUSEKEEPING=true LDFLAGS='' OVERRIDE_LOG_LEVEL='' -SIMSYS_BRANCH='main' +USE_HEADS=false +USE_MIRRORS=false +USE_TOKENS=false VN='2.2' diff --git a/rose-stem/site/azngarch/lfric_atm/tasks_lfric_atm_sandbox.cylc b/rose-stem/site/azngarch/lfric_atm/tasks_lfric_atm_sandbox.cylc index 116067fc1..7ea8a8eae 100644 --- a/rose-stem/site/azngarch/lfric_atm/tasks_lfric_atm_sandbox.cylc +++ b/rose-stem/site/azngarch/lfric_atm/tasks_lfric_atm_sandbox.cylc @@ -193,7 +193,7 @@ {# Set default values for lfric_atm tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/lfric_atm"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/lfric_atm"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "lfric_atm"}) %} {% endif %} diff --git a/rose-stem/site/common/adjoint/tasks_adjoint.cylc b/rose-stem/site/common/adjoint/tasks_adjoint.cylc index 0594073a7..ac7c7af75 100644 --- a/rose-stem/site/common/adjoint/tasks_adjoint.cylc +++ b/rose-stem/site/common/adjoint/tasks_adjoint.cylc @@ -15,7 +15,7 @@ {# Set default values for linear tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/science/adjoint"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/science/adjoint"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "adjoint"}) %} {% endif %} diff --git a/rose-stem/site/common/adjoint_tests/tasks_adjoint_tests.cylc b/rose-stem/site/common/adjoint_tests/tasks_adjoint_tests.cylc index cf00dc311..6a32d88bf 100644 --- a/rose-stem/site/common/adjoint_tests/tasks_adjoint_tests.cylc +++ b/rose-stem/site/common/adjoint_tests/tasks_adjoint_tests.cylc @@ -36,7 +36,7 @@ {# Set default values #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/adjoint_tests"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/adjoint_tests"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "adjoint_tests"}) %} {% endif %} @@ -45,4 +45,4 @@ {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/adjoint_tests/tasks_jedi_lfric_tests.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/adjoint_tests/tasks_jedi_lfric_tests.cylc") %} diff --git a/rose-stem/site/common/coupled_interface/tasks_coupled_interface.cylc b/rose-stem/site/common/coupled_interface/tasks_coupled_interface.cylc index af4cdae84..12650399d 100644 --- a/rose-stem/site/common/coupled_interface/tasks_coupled_interface.cylc +++ b/rose-stem/site/common/coupled_interface/tasks_coupled_interface.cylc @@ -20,9 +20,9 @@ {# Set default values for coupled_interface tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/interfaces/coupled_interface"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/interfaces/coupled_interface"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "coupled_interface"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/coupled_interface/tasks_coupled_interface.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/coupled_interface/tasks_coupled_interface.cylc") %} diff --git a/rose-stem/site/common/gravity_wave/tasks_gravity_wave.cylc b/rose-stem/site/common/gravity_wave/tasks_gravity_wave.cylc index 2e60dfcad..970131724 100644 --- a/rose-stem/site/common/gravity_wave/tasks_gravity_wave.cylc +++ b/rose-stem/site/common/gravity_wave/tasks_gravity_wave.cylc @@ -102,7 +102,7 @@ {# Set default values for Gravity Wave tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/gravity_wave"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/gravity_wave"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "gravity_wave"}) %} {% endif %} diff --git a/rose-stem/site/common/gungho/tasks_gungho.cylc b/rose-stem/site/common/gungho/tasks_gungho.cylc index 00b5b2044..6331d08f0 100644 --- a/rose-stem/site/common/gungho/tasks_gungho.cylc +++ b/rose-stem/site/common/gungho/tasks_gungho.cylc @@ -27,10 +27,10 @@ {# Set default values for Gungho tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/science/gungho"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/science/gungho"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "gungho"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/gungho/tasks_gungho.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/gungho/tasks_gungho.cylc") %} diff --git a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc index b4dc26c43..17c6843c5 100644 --- a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc +++ b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc @@ -589,7 +589,7 @@ {# Set default values for Gungho Model tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/gungho_model"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/gungho_model"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "gungho_model"}) %} {% endif %} diff --git a/rose-stem/site/common/jedi_lfric_interface/tasks_jedi_lfric_interface.cylc b/rose-stem/site/common/jedi_lfric_interface/tasks_jedi_lfric_interface.cylc index 66463695a..73770ed0c 100644 --- a/rose-stem/site/common/jedi_lfric_interface/tasks_jedi_lfric_interface.cylc +++ b/rose-stem/site/common/jedi_lfric_interface/tasks_jedi_lfric_interface.cylc @@ -26,9 +26,9 @@ {# Set default values for jedi_lfric_interface tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/interfaces/jedi_lfric_interface"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/interfaces/jedi_lfric_interface"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "jedi_lfric_interface"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/jedi_lfric_interface/tasks_jedi_lfric_interface.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/jedi_lfric_interface/tasks_jedi_lfric_interface.cylc") %} 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 f9930aed4..22c3c0742 100644 --- a/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc +++ b/rose-stem/site/common/jedi_lfric_tests/tasks_jedi_lfric_tests.cylc @@ -255,7 +255,7 @@ {# Set default values #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/jedi_lfric_tests"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/jedi_lfric_tests"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "jedi_lfric_tests"}) %} {% endif %} diff --git a/rose-stem/site/common/jules/tasks_jules.cylc b/rose-stem/site/common/jules/tasks_jules.cylc index d06f339b1..e479ae82c 100644 --- a/rose-stem/site/common/jules/tasks_jules.cylc +++ b/rose-stem/site/common/jules/tasks_jules.cylc @@ -43,10 +43,10 @@ {# Set default values for jules tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/jules"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/jules"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "jules"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/jules/tasks_jules.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/jules/tasks_jules.cylc") %} diff --git a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc index f62ac7ad5..26e8a9af8 100644 --- a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc +++ b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc @@ -133,7 +133,7 @@ {# Set default values for Solver tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/lfric2lfric"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/lfric2lfric"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "lfric2lfric"}) %} {% endif %} 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 d1a698a71..b7e58ca4d 100644 --- a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc +++ b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc @@ -470,6 +470,7 @@ "crun_compare": false, "mpi_parts": 216, "log_level": "info", + "wallclock": 30, "plot_str": "plot_map.py -encorr $NODAL_DATA_DIR/lfric_diagnostics.nc $PLOT_DIR", }) %} @@ -645,6 +646,7 @@ "xios_nodes": 3, "mpi_parts_xios" : 96, "log_level": "info", + "wallclock": 30, "plot_str": "plot_map.py -ral $NODAL_DATA_DIR/lfric_diagnostics.nc $PLOT_DIR", }) %} @@ -675,6 +677,7 @@ "xios_nodes": 4, "mpi_parts_xios" : 128, "log_level": "info", + "wallclock": 60, "plot_str": "plot_map.py -ral $NODAL_DATA_DIR/lfric_diagnostics.nc $PLOT_DIR", }) %} @@ -1150,7 +1153,7 @@ {# Set default values for lfric_atm tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/lfric_atm"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/lfric_atm"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "lfric_atm"}) %} {% endif %} diff --git a/rose-stem/site/common/lfric_coupled/tasks_lfric_coupled.cylc b/rose-stem/site/common/lfric_coupled/tasks_lfric_coupled.cylc index a8ea2b3bc..6046cb10b 100644 --- a/rose-stem/site/common/lfric_coupled/tasks_lfric_coupled.cylc +++ b/rose-stem/site/common/lfric_coupled/tasks_lfric_coupled.cylc @@ -29,10 +29,10 @@ {% endif %} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/lfric_coupled"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/lfric_coupled"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "lfric_coupled"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/lfric_coupled/tasks_lfric_coupled.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/lfric_coupled/tasks_lfric_coupled.cylc") %} diff --git a/rose-stem/site/common/lfricinputs/tasks_lfricinputs.cylc b/rose-stem/site/common/lfricinputs/tasks_lfricinputs.cylc index dde4e343d..59b9d0be4 100644 --- a/rose-stem/site/common/lfricinputs/tasks_lfricinputs.cylc +++ b/rose-stem/site/common/lfricinputs/tasks_lfricinputs.cylc @@ -18,7 +18,7 @@ {% endif %} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/lfricinputs"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/lfricinputs"}) %} {% if "app_name" not in task_dict %} {% set app_name = task_ns.conf_name.split("-")[0] %} {% do task_dict.update({"app_name": app_name}) %} diff --git a/rose-stem/site/common/linear/tasks_linear.cylc b/rose-stem/site/common/linear/tasks_linear.cylc index 14417bef3..7771e58f4 100644 --- a/rose-stem/site/common/linear/tasks_linear.cylc +++ b/rose-stem/site/common/linear/tasks_linear.cylc @@ -27,10 +27,10 @@ {# Set default values for linear tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/science/linear"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/science/linear"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "linear"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/linear/tasks_linear.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/linear/tasks_linear.cylc") %} diff --git a/rose-stem/site/common/linear_model/tasks_linear_model.cylc b/rose-stem/site/common/linear_model/tasks_linear_model.cylc index 750fb3604..23b91946c 100644 --- a/rose-stem/site/common/linear_model/tasks_linear_model.cylc +++ b/rose-stem/site/common/linear_model/tasks_linear_model.cylc @@ -27,6 +27,7 @@ "xios_nodes": 4, "mpi_parts_xios" : 16, "log_level": "debug", + "tech-tests_wallclock": 30, "plot_str": "linear.py $NODAL_DATA_DIR/lfric_diag.nc $PLOT_DIR 70 linear_model-nwp-gal9_C224 theta:exner:rho:u_in_w2h 120:0:5", }) %} @@ -101,7 +102,7 @@ {# Set default values for Linear Model tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/linear_model"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/linear_model"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "linear_model"}) %} {% endif %} diff --git a/rose-stem/site/common/name_transport/tasks_name_transport.cylc b/rose-stem/site/common/name_transport/tasks_name_transport.cylc index 9a62cb530..2af84ca7a 100644 --- a/rose-stem/site/common/name_transport/tasks_name_transport.cylc +++ b/rose-stem/site/common/name_transport/tasks_name_transport.cylc @@ -76,7 +76,7 @@ {# Set default values for NAME Transport tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/name_transport"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/name_transport"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "name_transport"}) %} {% endif %} diff --git a/rose-stem/site/common/ngarch/tasks_ngarch.cylc b/rose-stem/site/common/ngarch/tasks_ngarch.cylc index 63396b84e..23678d76a 100644 --- a/rose-stem/site/common/ngarch/tasks_ngarch.cylc +++ b/rose-stem/site/common/ngarch/tasks_ngarch.cylc @@ -23,7 +23,7 @@ {# Set default values for ngarch tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/ngarch"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/ngarch"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "ngarch"}) %} {% endif %} @@ -32,4 +32,4 @@ {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/ngarch/tasks_ngarch.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/ngarch/tasks_ngarch.cylc") %} diff --git a/rose-stem/site/common/physics_schemes_interface/tasks_physics_schemes_interface.cylc b/rose-stem/site/common/physics_schemes_interface/tasks_physics_schemes_interface.cylc index 910513db1..15e579215 100644 --- a/rose-stem/site/common/physics_schemes_interface/tasks_physics_schemes_interface.cylc +++ b/rose-stem/site/common/physics_schemes_interface/tasks_physics_schemes_interface.cylc @@ -21,10 +21,10 @@ {# Set default values for physics_schemes_interface tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/interfaces/physics_schemes_interface"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/interfaces/physics_schemes_interface"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "physics_schemes_interface"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/physics_schemes_interface/tasks_physics_schemes_interface.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/physics_schemes_interface/tasks_physics_schemes_interface.cylc") %} diff --git a/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc b/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc index 9834afd47..5871c0261 100644 --- a/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc +++ b/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc @@ -134,6 +134,7 @@ "threads": 3, "use_xios": false, "kgo_checks": [], + "wallclock": 30, "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} @@ -148,6 +149,7 @@ "threads": 3, "use_xios": false, "kgo_checks": [], + "wallclock": 30, "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} @@ -162,6 +164,7 @@ "threads": 3, "use_xios": false, "kgo_checks": [], + "wallclock": 30, "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} @@ -176,6 +179,7 @@ "threads": 3, "use_xios": false, "kgo_checks": [], + "wallclock": 30, "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} @@ -249,7 +253,7 @@ {# Set default values for Shallow Water tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/shallow_water"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/shallow_water"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "shallow_water"}) %} {% endif %} diff --git a/rose-stem/site/common/socrates_interface/tasks_socrates_interface.cylc b/rose-stem/site/common/socrates_interface/tasks_socrates_interface.cylc index a907062ed..63f465e15 100644 --- a/rose-stem/site/common/socrates_interface/tasks_socrates_interface.cylc +++ b/rose-stem/site/common/socrates_interface/tasks_socrates_interface.cylc @@ -21,10 +21,10 @@ {# Set default values for socrates_interface tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/interfaces/socrates_interface"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/interfaces/socrates_interface"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "socrates_interface"}) %} {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/socrates_interface/tasks_socrates_interface.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/common/socrates_interface/tasks_socrates_interface.cylc") %} diff --git a/rose-stem/site/common/solver/tasks_solver.cylc b/rose-stem/site/common/solver/tasks_solver.cylc index e2099a1ee..9b38d3a06 100644 --- a/rose-stem/site/common/solver/tasks_solver.cylc +++ b/rose-stem/site/common/solver/tasks_solver.cylc @@ -65,7 +65,7 @@ {# Set default values for Solver tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/solver"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/solver"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "solver"}) %} {% endif %} diff --git a/rose-stem/site/common/transport/tasks_transport.cylc b/rose-stem/site/common/transport/tasks_transport.cylc index 5612b6db2..b441d093a 100644 --- a/rose-stem/site/common/transport/tasks_transport.cylc +++ b/rose-stem/site/common/transport/tasks_transport.cylc @@ -266,7 +266,7 @@ {# Set default values for Transport tasks #} {% if task_dict %} - {% do task_dict.update({"application_dir": "apps/applications/transport"}) %} + {% do task_dict.update({"application_dir": "lfric_apps/applications/transport"}) %} {% if "app_name" not in task_dict %} {% do task_dict.update({"app_name": "transport"}) %} {% endif %} diff --git a/rose-stem/site/meto/groups/groups_linear_model.cylc b/rose-stem/site/meto/groups/groups_linear_model.cylc index 36b7b9491..b584e591e 100644 --- a/rose-stem/site/meto/groups/groups_linear_model.cylc +++ b/rose-stem/site/meto/groups/groups_linear_model.cylc @@ -31,7 +31,6 @@ {# EX1A Groups #} {% do site_groups.update({ "linear_model_ex1a_developer": [ - "linear_model_nwp_gal9-C224_MG_ex1a_gnu_fast-debug-64bit", "linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit", "linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit", "linear_model_nwp_gal9_zero-C12_MG_ex1a_gnu_fast-debug-64bit", @@ -49,6 +48,9 @@ "linear_model_ex1a_canned": [ "linear_model_canned_ex1a_gnu_fast-debug-64bit", ], + "linear_model_ex1a_weekly": [ + "linear_model_nwp_gal9-C224_MG_ex1a_gnu_fast-debug-64bit", + ], }) %} {# Platform Generic Groups #} @@ -71,6 +73,9 @@ "linear_model_azspice_canned", "linear_model_ex1a_canned", ], + "linear_model_weekly": [ + "linear_model_ex1a_weekly", + ], }) %} {# Platform Generic Extends #} diff --git a/rose-stem/site/meto/shallow_water/tasks_shallow_water_azspice.cylc b/rose-stem/site/meto/shallow_water/tasks_shallow_water_azspice.cylc index 9ef3ddaf4..af70d0c2c 100644 --- a/rose-stem/site/meto/shallow_water/tasks_shallow_water_azspice.cylc +++ b/rose-stem/site/meto/shallow_water/tasks_shallow_water_azspice.cylc @@ -22,27 +22,6 @@ {% do task_dict.update({"wallclock": 120}) %} {% endif %} -{% elif task_ns.conf_name == "williamson2_vi-C24" %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif task_ns.conf_name == "williamson5-C24" %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif task_ns.conf_name == "williamson5_vi-C24" %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif "C24" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 40}) %} - -{% elif "C96" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif "BiP32x32-1x1" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 40}) %} - -{% elif "BiP64x64-1x1" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 60}) %} - {% endif %} {% do LOG.debug("Finised in site/meto/shallow_water/tasks_shallow_water_azspice.cylc") %} diff --git a/rose-stem/site/meto/shallow_water/tasks_shallow_water_ex1a.cylc b/rose-stem/site/meto/shallow_water/tasks_shallow_water_ex1a.cylc index 68fa55bb9..7499dd8ea 100644 --- a/rose-stem/site/meto/shallow_water/tasks_shallow_water_ex1a.cylc +++ b/rose-stem/site/meto/shallow_water/tasks_shallow_water_ex1a.cylc @@ -21,28 +21,6 @@ {% else %} {% do task_dict.update({"wallclock": 120}) %} {% endif %} - -{% elif task_ns.conf_name == "williamson2_vi-C24" %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif task_ns.conf_name == "williamson5-C24" %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif task_ns.conf_name == "williamson5_vi-C24" %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif "C24" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 40}) %} - -{% elif "C96" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 60}) %} - -{% elif "BiP32x32-1x1" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 40}) %} - -{% elif "BiP64x64-1x1" in task_ns.conf_name %} - {% do task_dict.update({"wallclock": 60}) %} - {% endif %} {% do LOG.debug("Finished in site/meto/shallow_water/tasks_shallow_water_ex1a.cylc") %} diff --git a/rose-stem/site/meto/variables.cylc b/rose-stem/site/meto/variables.cylc index 8c1789b59..41a935e6f 100644 --- a/rose-stem/site/meto/variables.cylc +++ b/rose-stem/site/meto/variables.cylc @@ -37,6 +37,8 @@ {% do site_vars.update({"scripts_platform": "azspice"}) %} {% do site_vars.update({"coupled_fcm_make_platform": "azspice"}) %} +{% do site_vars.update({"git_mirror_loc": "/data/users/gitassist/git_mirrors"}) %} + {% do site_vars.update({"mesh_build": {"ex1a": "gnu_fast-debug-64bit", "azspice": "gnu_fast-debug-64bit"} }) %} @@ -47,14 +49,6 @@ {% do site_vars.update({"host_ex": "exab"}) %} {% elif USE_EXCD is defined and USE_EXCD %} {% do site_vars.update({"host_ex": "excd"}) %} -{% elif USE_EXA is defined and USE_EXA %} - {% do site_vars.update({"host_ex": "exa"}) %} -{% elif USE_EXB is defined and USE_EXB %} - {% do site_vars.update({"host_ex": "exb"}) %} -{% elif USE_EXC is defined and USE_EXC %} - {% do site_vars.update({"host_ex": "exc"}) %} -{% elif USE_EXD is defined and USE_EXD %} - {% do site_vars.update({"host_ex": "exd"}) %} {% else %} {# randomly choose either ab or cd #} {% from "random" import randint %} diff --git a/rose-stem/site/nci/common/suite_config_gadi.cylc b/rose-stem/site/nci/common/suite_config_gadi.cylc index aec79a9e8..adf8a4fe0 100644 --- a/rose-stem/site/nci/common/suite_config_gadi.cylc +++ b/rose-stem/site/nci/common/suite_config_gadi.cylc @@ -76,14 +76,10 @@ -W umask=0022 -l storage=gdata/access+gdata/hr22+gdata/ki32+scratch/access+gdata/{{environ.get('PROJECT','NO_PROJECT')}} - [[export-source]] - pre-script="module load python3/3.12.1" - post-script=""" - sed -i -e 's/FFLAGS_WARNINGS = -warn all -warn errors -gen-interfaces nosource/FFLAGS_WARNINGS = -warn all -gen-interfaces nosource/' $SOURCE_ROOT/core/infrastructure/build/fortran/ifort.mk - """ - [[GADI_EXPORT-SOURCE]] platform=localhost + pre-script="module load python3/3.12.1" + post-script="sed -i -e 's/FFLAGS_WARNINGS = -warn all -warn errors -gen-interfaces nosource/FFLAGS_WARNINGS = -warn all -gen-interfaces nosource/' $SOURCE_ROOT/lfric_core/infrastructure/build/fortran/ifort.mk" [[[environment]]] hostname = 'gadi.nci.org.au' SITE = 'nci' diff --git a/rose-stem/site/nci/common/suite_config_lfricinputs.cylc b/rose-stem/site/nci/common/suite_config_lfricinputs.cylc index 91f356df6..8fe8ab432 100644 --- a/rose-stem/site/nci/common/suite_config_lfricinputs.cylc +++ b/rose-stem/site/nci/common/suite_config_lfricinputs.cylc @@ -4,10 +4,6 @@ execution retry delays = 2*PT1M [[[environment]]] ROSE_ORIG_HOST = {{ROSE_ORIG_HOST}} - HOST_SOURCE_LFRIC_APPS = {{SOURCE_LFRIC_APPS}} - SOURCE_LFRIC_APPS_REV = {{SOURCE_LFRIC_APPS_REV}} - SOURCE_LFRIC_CORE = {{lfric_core_source}} - SOURCE_SHUMLIB = {{shumlib_source}} {% for tasks in [1, 2, 6, 12, 18, 24] %} [[NCI_GADI_{{tasks}}_TASKS]] diff --git a/rose-stem/templates/graph/generate_graph.cylc b/rose-stem/templates/graph/generate_graph.cylc index 8bc391391..7b4ad585b 100644 --- a/rose-stem/templates/graph/generate_graph.cylc +++ b/rose-stem/templates/graph/generate_graph.cylc @@ -105,11 +105,6 @@ {% endif %} {% endif %} -{# Add task to export github scripts from SimSys_Scripts repo #} -{# Runtime section in runtime/generate_runtime_scripts #} -{% do graph_sections.append(["export_simsys_scripts"]) %} -{% do tasks_to_run.update({"export_simsys_scripts": {} }) %} - {# Set Housekeeping task if housekeeping is true - default value #} {# One housekeeping task per platform being run on #} diff --git a/rose-stem/templates/graph/populate_graph_lfric_coupled.cylc b/rose-stem/templates/graph/populate_graph_lfric_coupled.cylc index cc5759397..93fb88d6c 100644 --- a/rose-stem/templates/graph/populate_graph_lfric_coupled.cylc +++ b/rose-stem/templates/graph/populate_graph_lfric_coupled.cylc @@ -57,24 +57,26 @@ {% do tasks_to_run.update({build2_ocean_task: task_values}) %} {% endif %} +{% set export_source_task = "export-source_"~task_ns.platform %} + {# ################ #} {# Create the Graph #} {# ################ #} {% do graph_sections.append([ - remote_init_task~task_ns.platform, "fcm_make_drivers" + export_source_task, "fcm_make_drivers" ]) %} {% do graph_sections.append([ "fcm_make_drivers", "fcm_make2_drivers" ]) %} {% do graph_sections.append([ - remote_init_task~task_ns.platform, build_ocean_task + export_source_task, build_ocean_task ]) %} {% do graph_sections.append([ build_ocean_task, build2_ocean_task ]) %} {% do graph_sections.append([ - remote_init_task~task_ns.platform, build_river_task + export_source_task, build_river_task ]) %} {% if application_run_task %} {% do graph_sections.append([ @@ -89,4 +91,4 @@ {% endif %} -{% do LOG.debug("Finished in templates/graph/populate_graph_lfric_coupled.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in templates/graph/populate_graph_lfric_coupled.cylc") %} diff --git a/rose-stem/templates/graph/populate_graph_scripts.cylc b/rose-stem/templates/graph/populate_graph_scripts.cylc index b27fe4e9a..41c90a45c 100644 --- a/rose-stem/templates/graph/populate_graph_scripts.cylc +++ b/rose-stem/templates/graph/populate_graph_scripts.cylc @@ -65,14 +65,6 @@ task ]) %} - {% if "macro_chains_checker" in task or "validate_rose_meta" in task %} - {# The macro chains checker relies on the export of SimSys_Scripts #} - {% do graph_sections.append([ - "export_simsys_scripts", - task - ]) %} - {% endif %} - {% set task_values = requested_tasks[task] %} {% if task not in tasks_to_run %} {% do tasks_to_run.update({task: task_values}) %} diff --git a/rose-stem/templates/populate_task_definitions.cylc b/rose-stem/templates/populate_task_definitions.cylc index 6e441a1d4..e482f96ea 100644 --- a/rose-stem/templates/populate_task_definitions.cylc +++ b/rose-stem/templates/populate_task_definitions.cylc @@ -49,7 +49,7 @@ {# If not mesh then raise an error #} {% if task_ns.application == "mesh" %} - {% do task_dict.update({"application_dir": "core/mesh_tools", + {% do task_dict.update({"application_dir": "lfric_core/mesh_tools", "app_name": "mesh"}) %} {% if task.startswith("build") %} {% do task_dict.update({"task_family": "build"}) %} @@ -114,4 +114,4 @@ {% endif %} -{% do LOG.debug("Finished in templates/populate_task_definitions.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in templates/populate_task_definitions.cylc") %} diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 4a0e80dec..011302941 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -93,10 +93,10 @@ execution time limit = PT{{task_values["wallclock"]}}M [[[environment]]] DESTINATION_DIRECTORY = {{destination_dir}} - APPS_ROOT_DIR = $SOURCE_ROOT/apps - CORE_ROOT_DIR = $SOURCE_ROOT/core + APPS_ROOT_DIR = $SOURCE_ROOT/lfric_apps + CORE_ROOT_DIR = $SOURCE_ROOT/lfric_core SOURCE_DIRECTORY = $SOURCE_ROOT/{{task_values["application_dir"]}} - METADATA = $SOURCE_ROOT/apps/applications/lfric_atm/metadata + METADATA = $SOURCE_ROOT/lfric_apps/applications/lfric_atm/metadata BIN_DIR = {{bin_dir}} LIB_DIR = {{lib_dir}} MOD_DIR = {{mod_dir}} diff --git a/rose-stem/templates/runtime/generate_runtime_build.cylc b/rose-stem/templates/runtime/generate_runtime_build.cylc index dcda9573a..0dbf19d2b 100644 --- a/rose-stem/templates/runtime/generate_runtime_build.cylc +++ b/rose-stem/templates/runtime/generate_runtime_build.cylc @@ -39,8 +39,9 @@ execution time limit = PT{{task_values["build_wallclock"]}}M [[[environment]]] SOURCE_DIRECTORY = $SOURCE_ROOT/{{src_path}} - APPS_ROOT_DIR = $SOURCE_ROOT/apps - CORE_ROOT_DIR = $SOURCE_ROOT/core + APPS_ROOT_DIR = $SOURCE_ROOT/lfric_apps + CORE_ROOT_DIR = $SOURCE_ROOT/lfric_core + PHYSICS_ROOT = $SOURCE_ROOT DESTINATION_DIRECTORY = {{destination_dir}} BIN_DIR = {{bin_dir}} LIB_DIR = {{lib_dir}} diff --git a/rose-stem/templates/runtime/generate_runtime_check.cylc b/rose-stem/templates/runtime/generate_runtime_check.cylc index 7a03d22d9..e97511800 100644 --- a/rose-stem/templates/runtime/generate_runtime_check.cylc +++ b/rose-stem/templates/runtime/generate_runtime_check.cylc @@ -23,7 +23,7 @@ {# current is in rose-stem/site/SITE/kgos, #} {# new is in the task output dir #} {# Can overwrite this per task, eg for nrun_vs_crun comparisons #} - {% set current_kgo = "$SOURCE_ROOT/apps/rose-stem/site/"~ + {% set current_kgo = "$SOURCE_ROOT/lfric_apps/rose-stem/site/"~ SITE~"/kgos/"~ task_ns.application~"/"~ task_ns.platform~ @@ -114,4 +114,4 @@ {% endif %} -{% do LOG.debug("Finished in templates/runtime/generate_runtime_check.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in templates/runtime/generate_runtime_check.cylc") %} diff --git a/rose-stem/templates/runtime/generate_runtime_control.cylc b/rose-stem/templates/runtime/generate_runtime_control.cylc index 2a6f114d1..e900d6d8e 100644 --- a/rose-stem/templates/runtime/generate_runtime_control.cylc +++ b/rose-stem/templates/runtime/generate_runtime_control.cylc @@ -19,15 +19,23 @@ [[{{task}}]] inherit = EXPORT-SOURCE, {{SITE|upper}}_ORIG, CONTROL_TASK_RETRIES - script = "rose task-run --app-key=export_source" [[[environment]]] SOURCE_DIRECTORY = $SOURCE_ROOT - {% if lfric_core_source.startswith("fcm:") %} - SOURCE_LFRIC_CORE = {{lfric_core_source}} - {% else %} - SOURCE_LFRIC_CORE = {{lfric_core_source.split(":")[-1]}} - {% endif %} - SOURCE_LFRIC_APPS = {{SOURCE_LFRIC_APPS}} + ROSE_TASK_APP = extract_source + DEPENDENCIES = {{dependencies}} + USE_MIRRORS = {{USE_MIRRORS}} + USE_TOKENS = {{USE_TOKENS}} + {% if USE_MIRRORS %} + {% if "git_mirror_loc" in site_vars %} + GIT_MIRROR_LOC = {{site_vars.git_mirror_loc}} + {% else %} + {{ raise( + "Trying to run with mirrors without setting a mirror location. " + "Ensure 'git_mirror_loc' is included in site_vars." + ) }} + {% endif %} + {% endif %} + {% elif task.startswith("export-source") %} {# 2nd export-source task specific to each platform #} @@ -51,7 +59,6 @@ """ [[[environment]]] SOURCE_DIRECTORY = $SOURCE_ROOT - SOURCE_LFRIC = {{lfric_core_source}} {% elif task.startswith("export-weights") %} {# Task to rsync generated weights files from platform where they are generated #} @@ -100,4 +107,4 @@ {% endif %} -{% do LOG.debug("Finished in templates/runtime/generate_runtime_control.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in templates/runtime/generate_runtime_control.cylc") %} diff --git a/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc b/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc index cf5d961d7..51ce6a276 100644 --- a/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc +++ b/rose-stem/templates/runtime/generate_runtime_lfric_coupled.cylc @@ -11,15 +11,6 @@ {% set task_app = "fcm_make_"~task_ns.conf_name %} -{# Extract the Jules source and Jules revision #} -{# Used in the fcm_make_rivers app - gets this info from dependencies.sh #} -{% if '@' in jules_source %} - {% set jules_rev = '@'~jules_source.split('@')[1] %} -{% else %} - {% set jules_rev = '' %} -{% endif %} -{% set jules_source = jules_source.split('@')[0] %} - {% if task.startswith("fcm_make2") or task_ns.conf_name == "river" %} {# The final build step - either the fcm_make2 task or fcm_make_rivers #} {# which only uses a single step build #} @@ -33,8 +24,6 @@ script = rose task-run [[[environment]]] ROSE_TASK_APP = {{task_app}} - JULES_SOURCE = {{jules_source}} - JULES_REV = {{jules_rev}} [[[directives]]] {{ set_task_resources(task_values["build_cpus"], task_values["build_memory"]) }} @@ -54,4 +43,4 @@ {% endif %} -{% do LOG.debug("Finised in templates/runtime/generate_runtime_lfricinputs.cyc") %} \ No newline at end of file +{% do LOG.debug("Finised in templates/runtime/generate_runtime_lfricinputs.cyc") %} diff --git a/rose-stem/templates/runtime/generate_runtime_lfricinputs.cylc b/rose-stem/templates/runtime/generate_runtime_lfricinputs.cylc deleted file mode 100644 index 947e9a1af..000000000 --- a/rose-stem/templates/runtime/generate_runtime_lfricinputs.cylc +++ /dev/null @@ -1,81 +0,0 @@ -{# ########################################################################### #} -{# (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. #} -{# ########################################################################### #} -{% do LOG.debug("Entered templates/runtime/generate_runtime_lfricinputs.cyc") %} - -{# Generate the runtime sections for all lfricinputs tasks #} - - [[{{task_family|upper}}]] - inherit={{task_ns.application|upper}}_{{task_ns.platform|upper}} - - -{% if task.startswith("run") %} -{# um2lfric, lfric2um or scintel #} - - {% set opt_confs = namespace(vals=task_values["opt_confs"][0]) %} - {% for opt_conf in task_values["opt_confs"][1:] %} - {% set opt_confs.vals = opt_confs.vals~","~opt_conf %} - {% endfor %} - - {% if "ntasks" in task_values %} - {% set resource_family = SITE|upper~"_"~ - task_ns.platform|upper~"_"~ - task_values["ntasks"]~"_TASKS" %} - {% else %} - {% set resource_family = SITE|upper~"_"~ - task_ns.platform|upper~ - "_RUN_TASKS" %} - {% endif %} - - [[{{task}}]] - inherit = {{task_family|upper}}, \ - LFRICINPUTS_BASE, \ - {{SITE|upper}}_{{task_ns.platform|upper}}_{{task_ns.compiler|upper}}, \ - {{SITE|upper}}_{{task_ns.platform|upper}}_NORMAL_QUEUE, \ - {{resource_family|upper}}, \ - {{task_ns.platform|upper}}_LFRICINPUTS - env-script = "eval $(rose task-env)" - script = rose task-run --verbose --path= --path="{{bin_dir}}" - execution time limit = PT{{task_values["wallclock"]}}M - post-script = """ - find . -regex '.*PET0+\..+\.Log' -exec cp {} $ROSE_TASK_LOG_DIR \; - find . -regex '.*PET0+\..+\.Log' -exec cat {} \; - module purge - """ - [[[environment]]] - BIN_DIR = {{bin_dir}} - ROSE_TASK_APP = {{task_values["app_name"]}} - ROSE_APP_OPT_CONF_KEYS = {{opt_confs.vals}} - NUMBER_OF_LAYERS = {{task_values["target_grid_levs"]}} - SOURCE_DUMP = {{task_values["source_dump"]}} - MESH_DIR = {{mesh_dir}} - LFRIC_MESH_FILE = {{mesh_dir}}/{{task_values["resolution"]}}/mesh_{{task_values["resolution"]}}.nc - LFRIC_MESH_NAME = {{task_values["mesh_name"]}} - WEIGHT_LOC = $CYLC_WORKFLOW_WORK_DIR/1/generate_weights_lfricinputs_{{task_ns.conf_name}}_{{site_vars["scripts_platform"]}}_weightgen_script - {% if task_values["app_name"] == "um2lfric" or task_values["app_name"] == "scintelapi" %} - TARGET_GRID_RES = {{task_values["target_grid_res"]}} - {% endif %} - - -{% elif task.startswith("rose_ana") %} - - {% set rose_ana_run_task = "run"~task.replace("rose_ana", "") %} - {% set rose_ana_app = "rose_ana_"~task_values["app_name"] %} - - [[{{task}}]] - inherit = {{task_family|upper}}, \ - LFRICINPUTS_BASE, \ - {{SITE|upper}}_{{task_ns.platform|upper}}_1_TASKS, \ - {{task_ns.platform|upper}}_LFRICINPUTS, \ - ROSE_ANA_{{task_ns.platform|upper}} - [[[environment]]] - SUITE_DIR = ../{{rose_ana_run_task}} - KGO_DIR = {{site_vars["lfricinputs_kgo_base"]}}/{{task_values["task_family"]}}/{{kgo_vars[task_values["task_family"]]|default("vn2.1")}} - ROSE_TASK_APP = {{rose_ana_app}} - -{% endif %} - - -{% do LOG.debug("Finised in templates/runtime/generate_runtime_lfricinputs.cyc") %} diff --git a/rose-stem/templates/runtime/generate_runtime_scripts.cylc b/rose-stem/templates/runtime/generate_runtime_scripts.cylc index d021df314..bd602ad7c 100644 --- a/rose-stem/templates/runtime/generate_runtime_scripts.cylc +++ b/rose-stem/templates/runtime/generate_runtime_scripts.cylc @@ -33,14 +33,7 @@ [[{{task}}]] execution time limit = PT15M -{% if "export_simsys_scripts" in task %} - - inherit=EXPORT-SOURCE - script="rose task-run --app-key=export_simsys_scripts" - [[[environment]]] - github_branch={{SIMSYS_BRANCH}} - -{% elif "config_dump_checker" in task %} +{% if "config_dump_checker" in task %} inherit={{inherit.str|upper}} script="rose task-run --app-key=check_config_dump" @@ -115,16 +108,14 @@ inherit={{local_build_inherit|upper}} execution time limit = PT25M script = """ - cp -r $CYLC_WORKFLOW_SHARE_DIR/source/apps $CYLC_TASK_WORK_DIR/apps_local_build_source - cp -r $CYLC_WORKFLOW_SHARE_DIR/source/core $CYLC_TASK_WORK_DIR/core_local_build_source + cp -r $CYLC_WORKFLOW_SHARE_DIR/source/lfric_apps $CYLC_TASK_WORK_DIR/apps_local_build_source + cp -r $CYLC_WORKFLOW_SHARE_DIR/source/lfric_core $CYLC_TASK_WORK_DIR/core_local_build_source cd $CYLC_TASK_WORK_DIR/apps_local_build_source - python3 build/local_build.py -a gungho_model -c $CYLC_TASK_WORK_DIR/core_local_build_source + python3 build/local_build.py gungho_model -c $CYLC_TASK_WORK_DIR/core_local_build_source cd $CYLC_TASK_WORK_DIR rm -rf $CYLC_TASK_WORK_DIR/apps_local_build_source rm -rf $CYLC_TASK_WORK_DIR/core_local_build_source """ - [[[environment]]] - SOURCE_LFRIC_APPS = {{HOST_SOURCE_LFRIC_APPS}} {% endif %} diff --git a/rose-stem/templates/runtime/generate_runtime_technical-tests.cylc b/rose-stem/templates/runtime/generate_runtime_technical-tests.cylc index 53d8e29e7..1074b0d5e 100644 --- a/rose-stem/templates/runtime/generate_runtime_technical-tests.cylc +++ b/rose-stem/templates/runtime/generate_runtime_technical-tests.cylc @@ -35,8 +35,9 @@ [[[environment]]] SOURCE_DIRECTORY = $SOURCE_ROOT/{{src_path}} - APPS_ROOT_DIR = $SOURCE_ROOT/apps - CORE_ROOT_DIR = $SOURCE_ROOT/core + APPS_ROOT_DIR = $SOURCE_ROOT/lfric_apps + CORE_ROOT_DIR = $SOURCE_ROOT/lfric_core + PHYSICS_ROOT = $SOURCE_ROOT WORKING_DIR = {{working_dir}}/{{mode}} RDEF_PRECISION = {{task_values["precision"]["rdef"]}} BIN_DIR = {{bin_dir}} @@ -69,8 +70,8 @@ [[[environment]]] SOURCE_DIRECTORY = $SOURCE_ROOT/{{src_path}} - APPS_ROOT_DIR = $SOURCE_ROOT/apps - CORE_ROOT_DIR = $SOURCE_ROOT/core + APPS_ROOT_DIR = $SOURCE_ROOT/lfric_apps + CORE_ROOT_DIR = $SOURCE_ROOT/lfric_core WORKING_DIR = {{working_dir}}/{{mode}} BIN_DIR = {{bin_dir}} From f09b30dd77e7b896646492a787c71ad9099e23c7 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:15:55 +0000 Subject: [PATCH 2/7] Moci port (#27) --- dependencies.sh | 33 ------------------- dependencies.yaml | 2 +- rose-stem/app/fcm_make_drivers/rose-app.conf | 6 ++-- rose-stem/app/lfric_coupled_si3/rose-app.conf | 2 +- .../site/meto/common/suite_config_ex1a.cylc | 3 +- .../runtime/generate_runtime_application.cylc | 4 +++ 6 files changed, 11 insertions(+), 39 deletions(-) delete mode 100644 dependencies.sh diff --git a/dependencies.sh b/dependencies.sh deleted file mode 100644 index 20df3ddc2..000000000 --- a/dependencies.sh +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################## -# (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. -############################################################################## - -# The variables in this file act as overrides to the contents -# of the UM's fcm-make configuration files in order to extract -# and preprocess the required code for use in LFRic. - -# Revisions and sources for dependent repositories which -# are extracted as part of the build. A blank *_sources -# variable will result in extraction from the project trunk. - -# Note that on the LFRic trunk the *_sources variables should -# always be blank (but can be used on branches during development -# to enable testing of changes) - -# On commit to trunk the code reviewer should ensure all *_sources -# variables below are empty, and the revisions of any projects with -# dependent changes should be updated to the revision at which those -# changes were committed to the project's trunk - -export lfric_core_rev=54094 -export lfric_core_sources= -export casim_rev=apps2.2 -export casim_sources= -export jules_rev=31238 -export jules_sources= -export socrates_rev=1869 -export socrates_sources= -export ukca_rev=7497 -export ukca_sources= diff --git a/dependencies.yaml b/dependencies.yaml index 989720bc6..e93d7dd71 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -35,7 +35,7 @@ lfric_core: moci: source: git@github.com:MetOffice/moci.git - ref: trunk + ref: 81951fdeddc2f1bf2e5be47f46cddba4495cf76d SimSys_Scripts: source: git@github.com:MetOffice/SimSys_Scripts.git diff --git a/rose-stem/app/fcm_make_drivers/rose-app.conf b/rose-stem/app/fcm_make_drivers/rose-app.conf index ec0dc0a7d..ecae6ba4f 100644 --- a/rose-stem/app/fcm_make_drivers/rose-app.conf +++ b/rose-stem/app/fcm_make_drivers/rose-app.conf @@ -1,9 +1,9 @@ meta=coupled_drivers/fcm_make/drivers_1.4 [env] -driver_base=fcm:moci.xm_br/dev/richardhill/r3598_drivers_lfric_cpl -driver_rev=@4648 -driver_sources=fcm:moci.xm_br/dev/richardhill/r3598_drivers_lfric_cpl@4648 +driver_base=$SOURCE_ROOT/moci +driver_rev= +driver_sources= extract=extract install=build mirror=mirror diff --git a/rose-stem/app/lfric_coupled_si3/rose-app.conf b/rose-stem/app/lfric_coupled_si3/rose-app.conf index 9fa84b4d8..bff98d01b 100644 --- a/rose-stem/app/lfric_coupled_si3/rose-app.conf +++ b/rose-stem/app/lfric_coupled_si3/rose-app.conf @@ -135,7 +135,7 @@ rn_himean=2.0 rn_himin=0.1 [namelist:nampar] -cn_icerst_in='restart_ice_in' +cn_icerst_in='restart_ice' cn_icerst_indir='.' cn_icerst_out='restart_ice' cn_icerst_outdir='$NEMO_RST' diff --git a/rose-stem/site/meto/common/suite_config_ex1a.cylc b/rose-stem/site/meto/common/suite_config_ex1a.cylc index 62d1a717b..7106a8eb6 100644 --- a/rose-stem/site/meto/common/suite_config_ex1a.cylc +++ b/rose-stem/site/meto/common/suite_config_ex1a.cylc @@ -21,7 +21,8 @@ 'module load cray-hdf5-parallel ; ' ~ 'module load cray-netcdf-hdf5parallel ; ' ~ 'module use /data/users/moci/modules_ngms/modules ; '~ - 'module load GC4-PrgEnv/2024-01-lfric_apps_coupled_port-cpe23.05/5548.lua' %} + 'module load GC4-PrgEnv/2024-01-lfric_apps_coupled_port-cpe23.05/5548.lua ; ' + 'module load scitools' %} {% set ex1a_coupled_run = '. $BIG_DATA_DIR/ancils/lfric_coupled/ocean/ocean_ancil_GO8p0_CORE_forcing_eORCA025 ; ' ~ 'DIAG_MEAN_PERIOD="INVALID_PERIOD"'%} diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 011302941..d7a2406b4 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -40,6 +40,10 @@ {% set script_str.name = script_str.name~" --opt-conf-key=suite_controlled" %} {% endif %} +{% if task_ns.application == "lfric_coupled" %} + {% set script_str.name = script_str.name~" --path=$CYLC_WORKFLOW_SHARE_DIR/fcm_make_drivers/extract/drivers/Coupled_Drivers" %} +{% endif %} + {# The PANEL_DECOMP variable expects it to be quoted #} {% set panel_decomp = "'"~task_values["panel_decomp"]~"'" %} From a28331ff5cd2852167659d2993dab18180543f3e Mon Sep 17 00:00:00 2001 From: Steve Mullerworth Date: Thu, 4 Dec 2025 10:39:49 +0000 Subject: [PATCH 3/7] lfric_atm checkpoint documentation (#22) Co-authored-by: mo-lucy-gordon <120176477+mo-lucy-gordon@users.noreply.github.com> --- documentation/source/glossary.rst | 14 +- .../applications/applications_directory.rst | 2 +- .../applications_directory/lfric_atm.rst | 21 ++ .../source/user_guide/applications/index.rst | 2 +- .../source/user_guide/checkpointing/index.rst | 32 ++ .../checkpointing/lfric_atm_checkpoint.rst | 311 ++++++++++++++++++ documentation/source/user_guide/index.rst | 3 +- 7 files changed, 371 insertions(+), 14 deletions(-) create mode 100644 documentation/source/user_guide/applications/applications_directory/lfric_atm.rst create mode 100644 documentation/source/user_guide/checkpointing/index.rst create mode 100644 documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst diff --git a/documentation/source/glossary.rst b/documentation/source/glossary.rst index aa8ea6831..921734440 100644 --- a/documentation/source/glossary.rst +++ b/documentation/source/glossary.rst @@ -13,15 +13,9 @@ Glossary ################## .. glossary:: - LFRic application - A program that uses LFRic Core. - - - - - - - - + checkpoint dump + See :ref:`here ` + LFRic application + A program that uses LFRic Core. diff --git a/documentation/source/user_guide/applications/applications_directory.rst b/documentation/source/user_guide/applications/applications_directory.rst index e35f55074..a4631f1ea 100644 --- a/documentation/source/user_guide/applications/applications_directory.rst +++ b/documentation/source/user_guide/applications/applications_directory.rst @@ -1,5 +1,5 @@ .. ----------------------------------------------------------------------------- - (c) Crown copyright 2025 Met Office. All rights reserved. + (c) Crown copyright Met Office. All rights reserved. The file LICENCE, distributed with this code, contains details of the terms under which the code may be used. ----------------------------------------------------------------------------- diff --git a/documentation/source/user_guide/applications/applications_directory/lfric_atm.rst b/documentation/source/user_guide/applications/applications_directory/lfric_atm.rst new file mode 100644 index 000000000..183bddfa0 --- /dev/null +++ b/documentation/source/user_guide/applications/applications_directory/lfric_atm.rst @@ -0,0 +1,21 @@ +.. ----------------------------------------------------------------------------- + (c) Crown copyright Met Office. All rights reserved. + The file LICENCE, distributed with this code, contains details of the terms + under which the code may be used. + ----------------------------------------------------------------------------- + +.. _lfric_atm: + +The LFRic atmosphere model - lfric_atm +====================================== + +The `lfric_atm` application is the LFRic atmosphere model used within the +|Momentum| system. It is built using the LFRic core infrastructure +code. It runs the Gungho dynamical core coupled to several physical +parametrizations. Some parametrizations are included in the LFRic apps code +base, others such as Jules, Socrates and UKCA are extracted from external +repositories. + +For IO, the application uses the XIOS library. + +The checkpoint/restart system is described :ref:`here `. diff --git a/documentation/source/user_guide/applications/index.rst b/documentation/source/user_guide/applications/index.rst index 9ba973be9..ad363b8dc 100644 --- a/documentation/source/user_guide/applications/index.rst +++ b/documentation/source/user_guide/applications/index.rst @@ -1,5 +1,5 @@ .. ----------------------------------------------------------------------------- - (c) Crown copyright 2025 Met Office. All rights reserved. + (c) Crown copyright Met Office. All rights reserved. The file LICENCE, distributed with this code, contains details of the terms under which the code may be used. ----------------------------------------------------------------------------- diff --git a/documentation/source/user_guide/checkpointing/index.rst b/documentation/source/user_guide/checkpointing/index.rst new file mode 100644 index 000000000..4c48b9914 --- /dev/null +++ b/documentation/source/user_guide/checkpointing/index.rst @@ -0,0 +1,32 @@ +.. ------------------------------------------------------------------------------ + (c) Crown copyright Met Office. All rights reserved. + The file LICENCE, distributed with this code, contains details of the terms + under which the code may be used. + ------------------------------------------------------------------------------ + +.. _checkpoint_index: + +Checkpoint and restart +====================== + +Checkpointing describes the process of writing out a checkpoint dump file +containing key application data during or at the end of an application run. It +should then be possible to restart the application with the same configuration, +but configured to start from the newly created checkpoint file. Checkpoint and +restart can be used to support very long runs such as those used for climate +projections, or to recover a run from an intermediate point following an +application failure. + +Normally, it is a requirement that a long single run produces exactly the same +results as a short initial run plus a restarted run of the same total +length. Maintaining such equivalence is important to ensure reproducibility of +results regardless of choices made about when a run should write or read a +checkpoint dump. + +Currently, support for checkpointing exists only for the ``lfric_atm`` and +``gungho_model`` applications. + +.. toctree:: + :maxdepth: 1 + + lfric_atm_checkpoint diff --git a/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst b/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst new file mode 100644 index 000000000..17be30420 --- /dev/null +++ b/documentation/source/user_guide/checkpointing/lfric_atm_checkpoint.rst @@ -0,0 +1,311 @@ +.. ----------------------------------------------------------------------------- + (c) Crown copyright Met Office. All rights reserved. + The file LICENCE, distributed with this code, contains details of the terms + under which the code may be used. + ----------------------------------------------------------------------------- + +.. _lfric_atm_checkpoint: + +LFRic atmosphere checkpoint/restart system +========================================== + +The LFRic atmosphere ``lfric_atm`` application can be configured to generate a +checkpoint dump at the end of each model run. The checkpoint dump can be read in +by a new integration of the model allowing further timesteps to be run. The dump +is written using XIOS. + +Requesting checkpoint restart +----------------------------- + +Set ``checkpoint_write=.true.`` in the ``io`` namelist of the model +configuration to generate a checkpoint dump at the end of a model run. The +checkpoint dump will be named after the ``checkpoint_stem_name`` string in the +``files`` namelist appended with the number of the last timestep of the run. + +Set ``checkpoint_read=.true.`` in the ``io`` namelist to restart a run from an +existing checkpoint dump. The expected start timestep will be defined by +``timestep_start`` in the ``time`` namelist. There must exist a checkpoint file +named according to the ``checkpoint_stem_name``, with the correct timestep +(which would be the ``timestep_start`` setting minus one) otherwise the run will +fail. Typically, such a file will have been created by a preceding run. + +Some key ``lfric_atm`` configurations are regularly tested to check that a long +single run produces exactly the same results as a short initial run plus a +restarted run of the same total length. Maintaining such equivalence is +important for many scientific requirements. + +As some configurations of ``lfric_atm`` do not run all the same science every +timestep, runs that use checkpoint and restart may need to restart at a +particular frequency. In particular, aligning restart times with radiation +timesteps is important. + + +The checkpoint dump name and format +----------------------------------- + +The name of the checkpoint dump is computed while the XIOS context is being +defined. Its name is computed from a configurable input string (that can define +a full path name plus file name prefix, or just a file name prefix in the +current working directory), and a suffix comprising the timestep number with +leading zeros allowing timesteps up to 9,999,999,999. For example, a checkpoint +written after completion of 4 timesteps may be named ``checkpoint_0000000004``. + +Field data can be written to checkpoint files in one of two formats: + +* "Legacy" or "stream" format. The field data in this form are written as a 1D + stream of data, representing the whole 3D field, just as the data is held in + memory in an LFRic field object. +* "Non-legacy" or "layer" format. The data in this form are written out much + like it is in diagnostic output: as a series of 2D horizontal layers that are + stacked to form the full 3D field. + +In a single checkpoint file, some fields will be written in stream format, and +some will be written in layers. There are some restrictions to how fields can +be checkpointed: + +1. Fields that have data points on both full- and half-levels (so anything on a + W1 or W2 function space) can only be written directly in stream form. When + the data is written like this, it cannot be successfully read if the parallel + decomposition of the reading code is different between the writing and + reading process. To ensure correct behaviour, such fields could be split into + the full-level and half-level components which are written and read + separately. +2. XIOS can write discontinuous fields in layer form only when the convention is + set to `UGRID`_. Other field outputs can be written in the `CF`_ convention. +3. XIOS does not currently support the layer output of data on the edges of + cells in discontinuous fields on a bi-periodic mesh. + +.. _CF: https://cfconventions.org/ +.. _UGRID: https://ugrid-conventions.github.io/ugrid-conventions/ + +Currently, ``lfric_atm`` outputs at least one W2 field which means +checkpoint-restart suffers the restriction described in the first point +above. + +Configuring the XIOS context +---------------------------- + +This section does not consider LBC prognostics or ancillary fields. + +The term "prognostic fields" broadly refers to the set of model fields that must +remain in scope throughout a model timestep. The LFRic atmosphere model stores +the set of prognostic fields in a prognostic field collection held in the main +``modeldb`` data structure. This means that a field can be passed more easily +from one section of the science to another. + +Not all prognostic fields need to be written to the checkpoint dump. For some +fields the need to write a field to the dump depends on the configuration. For +other fields, the data stored in a field is passed between science sections +within the same timestep and it does not need to be passed to the next timestep. + +* Prognostic fields that are always or sometimes written to the dump must be + defined in the ``lfric_dictionary.xml`` file which is included in the + ``iodef.xml`` file that configures XIOS. +* Prognostic fields that are not written to the dump should not be defined in + the ``lfric_dictionary.xml`` file. + +A module called ``create_physics_prognostics`` holds code that uses model +configuration to determine several things about the physics prognostics: + +* Identifying which fields need to be written to the checkpoint dump at the end + of the run. +* Identifying which of many possible prognostic fields are required for a given + model configuration. +* Initialising those fields that are required. +* Adding initialised fields to the correct science-specific field collection. + +Currently, the underpinning infrastructure cannot support doing all of these +tasks at the same time. A solution has been created that involves calling +``create_physics_prognostics`` twice. The procedure takes a procedure pointer as +an argument, enabling the routine to do different tasks on each call. + +.. attention:: + + There is also a ``create_gungho_prognostics`` file that manages the subset of + prognostics used by Gungho model configurations. In part, the gungho + prognostics are handled differently because the ``gungho_model`` application + supports both lowest and higher order finite element order, and checkpointing + of the latter requires a different file format. When written with XIOS, all + gungho prognostics are output using the legacy format even though only one of + them needs to be on a 3D mesh because it is a W2 field which cannot be split + into levels. + +Within the procedure, there is code like the following for each possible +prognostic field. The first prognostic field ``lw_down_surf_rtsi`` may be +written to the checkpoint file. The second prognostic field ``qcl_at_inv_top`` +is never written to the checkpoint file. + +.. code-block:: fortran + + call processor%apply(make_spec('lw_down_surf_rtsi', main%radiation, & + ckp=checkpoint_flag)) + call processor%apply(make_spec('qcl_at_inv_top', main%turbulence, W3, & + twod=.true.)) + +.. attention:: + + Note that one of the arguments in the calls above is a function call to + ``make_spec``. For the field that may be checkpointed the ``make_spec`` call + does not include the function space type or other information that describes + the shape of the field, whereas the field that is not checkpointed provides + the function space type ``W3`` and ``twod=.true`` (the latter indicates that + the field is on a single layer). + + Any field that `may` be checkpointed `must` have an XIOS definition (as + pointed out above, these definitions are stored in the + ``lfric_dictionary.xml`` file). The XML definition is used to infer the shape + of the field (its function space and so forth). Such informaton is required + to initialise the field within the model. As the information can be extracted + from the XML there is no requirement to provide the function space in the + ``make_spec`` argument list. Indeed, doing so would result in the definition + appearing in two places and raise the possibility that the two definitions + may diverge. + +Key parts of the above call are: + +* ``make_spec`` returns a ``field spec`` data structure that summarises the + requirements for the field. Optionally, the arguments to ``make_spec`` can + include stating which field collection should reference the field. + + * If the ``make_spec`` call sets the ``ckp`` flag then it can be assumed that + XIOS may need to read or write the field and therefore an XML record for the + field will be in the ``lfric_dictionary.xml`` file that is included in the + application's ``iodef.xml`` file. This means that the shape of the field + (its function space, number of levels and so forth) can be inferred from the + XIOS metadata and does not need to be supplied in the ``make_spec`` argument + list. + * If the ``make_spec`` call does not set the ``ckp`` flag, then the field is + not checkpointed and it must be assumed that there is no XML record for the + field in the ``iodef.xml`` file. Therefore, additional arguments are + required to the ``make_spec`` call to define the function space type and + other information about the field. + +* ``apply`` is a procedure in the ``processor`` object that does work on the + ``field spec``. +* ``processor`` can be one of two different objects depending on whether this is + the first or second call to the ``create_physics_prognostics`` code. + + +The first call +^^^^^^^^^^^^^^ + +The first call to the code in ``create_physics_prognostics`` is done while the +XIOS context is being defined. It must be done during this period because the +aim of the call is to provide a definition of the checkpoint fields to XIOS. + +During this call, the ``processor`` object is the ``persistor_type`` defined in +``gungho_model_mod``. Therefore procedure ``gungho_model_mod:persistor_apply`` +is applied to the ``field spec`` for each field. + +If the field is to be written to or read from the checkpoint dump the ``apply`` +method calls ``lfric_xios_metafile_mod:add_field``. The ``add_field`` procedure +registers an ``xios_field``, for writing to or reading from the checkpoint dump. +The ID is the name of the field prefixed with the hard-coded string literal, +``checkpoint_``. The procedure defines the checkpoint field for XIOS using XIOS +attributes copied from the definition of the original field ID (without the +``checkpoint_`` prefix) in ``lfric_dictionary.xml``. + +If the field is not to be checkpointed, then nothing is done during the first +call to ``processor%apply``. In fact, the whole first call to the +``create_physics_prognostics`` code has no purpose and does nothing if +checkpoint reading or writing is not requested. + +The second call +^^^^^^^^^^^^^^^ +In the second call, the ``processor`` passed to ``create_prognostics_field`` is +the ``field_maker_type`` in ``field_maker_mod``. + +Briefly, the ``apply`` method in ``field_maker_mod`` initialises the model field +based on the ``field_spec`` definition returned by the ``make_spec`` +call. Information in the ``field_spec`` is drawn from the +``lfric_dictionary.xml`` file (if the field has a record in this file) and +information from the arguments to the ``make_spec`` call. For multidata fields +(often referred to as "tiled fields") some hardwired or configured settings are +obtained by the ``apply`` method by calling +``multidata_field_dimensions_mod:get_multidata_field_dimension``. + +Problematically, the ``checkpoint_`` prefix is also used here (hard coded as a +string literal) to check if the field is valid before creating anything. + +For fields that may be checkpointed, the information from +``lfric_dictionary.xml`` is extracted using the XIOS API. This can only be done +after the context definition has been closed. That is why this call is done +separately from the first call. + + +Simplified call tree for setting up I/O in LFRic_atm +---------------------------------------------------- + + +.. code-block:: rst + + lfric_atm (lfric_atm/lfric_atm.f90) + │ + └──initialise (gungho/driver/gungho_driver_mod.F90) + │ + ├──initialise_infrastructure (gungho/driver/gungho_model_mod.F90) + │ │ + │ └──init_io (components/driver/driver_io_mod.F90) + │ │ + │ └──init_xios_io_context (components/driver/driver_io_mod.F90) + │ │ + │ ├──populate_filelist (=> init_gungho_files) (gungho/driver/gungho_setup_io_mod.F90) + │ │ + │ └──io_context%initialise_xios_context (components/lfric_xios/lfric_xios_context_mod.f90) + │ │ + │ ├──xios_context_initialise xios + │ │ + │ ├──xios_get_handle xios + │ │ + │ ├──xios_set_current_context xios + │ │ + │ ├──init_xios_calendar (components/lfric_xios/lfric_xios_setup_mod.x90) + │ │ + │ ├──init_xios_dimensions (components/lfric_xios/lfric_xios_setup_mod.x90) + │ │ + │ ├──setup_xios_files (components/lfric_xios/lfric_xios_setup_mod.x90) + │ │ + │ ├──before_close (=> before_context_close) (gungho/driver/gungho_model_mod.F90) + │ │ │ + │ │ ├──persistor%init (gungho/driver/gungho_model_mod.F90) + │ │ │ + │ │ ├──process_gungho_prognostics(persistor) + │ │ │ │ (gungho/driver/create_gungho_prognostics_mod.F90) + │ │ │ └──persistor%apply(makespec()) (gungho/driver/gungho_model_mod.F90) + │ │ │ │ + │ │ │ └──add_field (components/lfric-xios/lfric_xios_metafile_mod.F90) + │ │ │ │ + │ │ │ ├──(various xios calls…) xios + │ │ │ │ + │ │ │ └──handle_legacy_field (components/lfric-xios/lfric_xios_metafile_mod.F90) + │ │ │ + │ │ └──process_physics_prognostics(persistor) + │ │ │ (gungho/driver/create_physics_prognostics_mod.F90) + │ │ └──(…) + │ │ + │ └──xios_close_context_definitions xios + │ + │ + └──create_model_data (gungho/driver/gungho_init_fields_mod.X90) + │ + ├──field_mapper%init (gungho/driver/field_mapper_mod.F90) │ + └──create_gungho_prognostics (gungho/driver/create_gungho_prognostics_mod.F90) + │ + ├──creator%init (gungho/driver/field_maker_mod.F90) + │ + └──process_gungho_prognostics(creator) (gungho/driver/create_gungho_prognostics_mod.F90) + │ + └──creator%apply(makespec()) (gungho/driver/field_maker_mod.F90) + │ + └──add_real_field (gungho/driver/field_maker_mod.F90) + │ + ├──field%initialise (infrastructure/field/field_mod.t90) + │ + ├──field%set_read/write_behaviour (infrastructure/field/field_mod.t90) + │ + ├──depository%add_field (infrastructure/field/field_collection_mod.F90) + │ + └──prognostic_fields%add_field (infrastructure/field/field_collection_mod.F90) + +(For brevity, the paths are shortened. Some prefix directories and the “source” +directory have been omitted.) diff --git a/documentation/source/user_guide/index.rst b/documentation/source/user_guide/index.rst index a5fa777e8..91834ca41 100644 --- a/documentation/source/user_guide/index.rst +++ b/documentation/source/user_guide/index.rst @@ -12,5 +12,4 @@ User Guide :maxdepth: 2 applications/index - - + checkpointing/index From 4d21b06af3304b7965dbba4ed4860c6aec5b2b7a Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Fri, 5 Dec 2025 11:06:31 +0000 Subject: [PATCH 4/7] GitHub files (#28) Co-authored-by: Andrew Coughtrie <24609575+andrewcoughtrie@users.noreply.github.com> --- .gitattributes | 47 ++++++++++ .github/CODEOWNERS | 4 +- .github/pull_request_template.md | 108 +++++++++++++++++++++++ .github/workflows/check-cr-approved.yaml | 11 +++ .gitignore | 17 ++++ README.md | 14 ++- 6 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/check-cr-approved.yaml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..2cee0e56b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,47 @@ +# Handle line endings automatically for files detected as text +# and leave all files detected as binary untouched. +* text=auto + +# Binaries +*.nc binary +*.png binary + +# Fortran files +*.f text diff=fortran +*.for text diff=fortran +*.f90 text diff=fortran +*.F90 text diff=fortran +*.f95 text diff=fortran +*.f03 text diff=fortran +*.x90 text diff=fortran +*.X90 text diff=fortran +*.t90 text diff=fortran +*.T90 text diff=fortran +*.pf text diff=fortran +*.PF text diff=fortran + +# Enable syntax highlighting for files with `.pf` extensions. +# +*.pf linguist-language=fortran-free-form +*.pf linguist-detectable=true +*.pf linguist-documentation=false + +*.PF linguist-language=fortran-free-form +*.PF linguist-detectable=true +*.PF linguist-documentation=false + +*.x90 linguist-language=fortran-free-form +*.x90 linguist-detectable=true +*.x90 linguist-documentation=false + +*.X90 linguist-language=fortran-free-form +*.X90 linguist-detectable=true +*.X90 linguist-documentation=false + +*.t90 linguist-language=fortran-free-form +*.t90 linguist-detectable=true +*.t90 linguist-documentation=false + +*.T90 linguist-language=fortran-free-form +*.T90 linguist-detectable=true +*.T90 linguist-documentation=false diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5796c916e..0509682e8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,3 @@ -* @MetOffice/core-capability-development @MetOffice/ssdteam +**/jules_interface/rose-meta @maggiehendry +**/jedi_lfric* @MetOffice/r2o +**/linear* @MetOffice/r2o diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..b7e5f2a21 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,108 @@ +# PR Summary + +Sci/Tech Reviewer: +Code Reviewer: + + + + + + + + + +## Code Quality Checklist + +(_Some checks are automatically carried out via the CI pipeline_) + +- [ ] I have performed a self-review of my own code +- [ ] My code follows the project's style guidelines + [style guidelines](https://metoffice.github.io/lfric_core/how_to_contribute/index.html#how-to-contribute-index) +- [ ] Comments have been included that aid undertanding and enhance the + readability of the code +- [ ] My changes generate no new warnings + +## Testing + +- [ ] I have tested this change locally, using the LFRic Apps rose-stem suite +- [ ] If any tests fail (rose-stem or CI) the reason is understood and + acceptable (eg. kgo changes) +- [ ] I have added tests to cover new functionality as appropriate (eg. system + tests, unit tests, etc.) +- [ ] Any new tests have been assigned an appropriate amount of compute resource + and have tests been allocated to an appropriate testing group (i.e. the + developer tests are for jobs which use a small amount of compute resource + and complete in a matter of minutes) + + + +### trac.log + + + +## Security Considerations + +- [ ] I have reviewed my changes for potential security issues +- [ ] Sensitive data is properly handled (if applicable) +- [ ] Authentication and authorisation are properly implemented (if applicable) + +## Performance Impact + +- [ ] Performance of the code has been considered and, if applicable, suitable + performance measurements have been conducted + +## AI Assistance and Attribution + +- [ ] Some of the content of this change has been produced with the assistance + of _Generative AI tool name_ (e.g., Met Office Github Copilot Enterprise, + Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the + [Simulation Systems AI policy](https://metoffice.github.io/simulation-systems/FurtherDetails/ai.html) + (including attribution labels) + + + +## Documentation + +- [ ] Where appropriate I have updated documentation related to this change and + confirmed that it builds correctly + +## PSyclone Approval + +- [ ] If you have edited any psyclone related code (eg. PsyKAl-lite, Kernal + inteface, optimisation scripts, LFRic data structure code) then please + contact the + [tooscollabdevteam@metoffice.gov.uk](tooscollabdevteam@metoffice.gov.uk) + +# Sci/Tech Review + + + + +- [ ] I understand this area of code and the changes being added +- [ ] The proposed changes correspond to the pull request description +- [ ] Documentation is sufficient (do documentation papers need updating) +- [ ] Sufficient testing has been completed + +_Please alert the code reviewer via a tag when you have approved the SR_ + +# Code Review + + + +- [ ] All dependencies have been resolved +- [ ] Related Issues have been properly linked and addressed +- [ ] CLA compliance has been confirmed +- [ ] Code quality standards have been met +- [ ] Tests are adequate and have passed +- [ ] Documentation is complete and accurate +- [ ] Security considerations have been addressed +- [ ] Performance impact is acceptable diff --git a/.github/workflows/check-cr-approved.yaml b/.github/workflows/check-cr-approved.yaml new file mode 100644 index 000000000..9b66712a1 --- /dev/null +++ b/.github/workflows/check-cr-approved.yaml @@ -0,0 +1,11 @@ +name: Check CR approved + +on: + pull_request_review: + types: [submitted, edited, dismissed] + workflow_dispatch: + +jobs: + check_cr_approved: + if: ${{ github.event.pull_request.number }} + uses: MetOffice/growss/.github/workflows/check-cr-approved.yaml@main diff --git a/.gitignore b/.gitignore index c8710e1ed..31cbc46f8 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,23 @@ documentation/build # vscode .vscode +# vi/vim +*~ +*.swp +*.swo + # Emacs backup files .#* \#*# + +# Python +__pycache__ +*.pyc +.pytest_cache + +# LFRic CL Builds +applications/**/bin +applications/**/working +applications/**/example*/ +science/**/bin +science/**/working diff --git a/README.md b/README.md index aa9e0e5b0..3381481ee 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -# lfric_apps -LFRic Applications +# LFRic Apps + +[![ci](https://github.com/MetOffice/lfric_apps/actions/workflows/ci.yml/badge.svg)](https://github.com/MetOffice/lfric_apps/actions/workflows/ci.yml) + +This repository is home to the LFRic-based science applications and libraries such as +lfric_atm and the GungHo dynamical core. + +LFRic applications are based on the infrastructure developed in the [LFRic +Core](https://github.com/MetOffice/lfric_core) repository. + +In development documentation for LFRic Apps is available at: +[https://metoffice.github.io/lfric_apps](https://metoffice.github.io/lfric_apps) From acb50617934e92bf5a0ff500c3f50478917b7058 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Mon, 8 Dec 2025 11:54:47 +0000 Subject: [PATCH 5/7] change to c48 (#32) --- .../shallow_water/tasks_shallow_water.cylc | 36 ++++++++++++++----- .../meto/groups/groups_shallow_water.cylc | 8 ++--- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc b/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc index 5871c0261..dcca58485 100644 --- a/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc +++ b/rose-stem/site/common/shallow_water/tasks_shallow_water.cylc @@ -123,11 +123,10 @@ {# Nightly Group Tasks #} {# ################### #} -{% elif task_ns.conf_name == "galewsky_vi-C96" %} +{% elif task_ns.conf_name == "galewsky_vi-C96" or task_ns.conf_name == "galewsky_vi-C48" %} {% do task_dict.update({ "opt_confs": ["galewsky_vi"], - "resolution": "C96", "DT": 450, "tsteps": 1152, "mpi_parts": 6, @@ -138,11 +137,16 @@ "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} -{% elif task_ns.conf_name == "galewsky_vi_koren-C96" %} + {% if "C48" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C48"}) %} + {% elif "C96" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C96"}) %} + {% endif %} + +{% elif task_ns.conf_name == "galewsky_vi_koren-C96" or task_ns.conf_name == "galewsky_vi_koren-C48" %} {% do task_dict.update({ "opt_confs": ["galewsky_vi_koren"], - "resolution": "C96", "DT": 450, "tsteps": 1152, "mpi_parts": 6, @@ -153,11 +157,16 @@ "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} -{% elif task_ns.conf_name == "galewsky_vi_ffsl-C96" %} + {% if "C48" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C48"}) %} + {% elif "C96" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C96"}) %} + {% endif %} + +{% elif task_ns.conf_name == "galewsky_vi_ffsl-C96" or task_ns.conf_name == "galewsky_vi_ffsl-C48" %} {% do task_dict.update({ "opt_confs": ["galewsky_vi_ffsl"], - "resolution": "C96", "DT": 450, "tsteps": 1152, "mpi_parts": 6, @@ -168,11 +177,16 @@ "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} -{% elif task_ns.conf_name == "galewsky_vi_mono-C96" %} + {% if "C48" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C48"}) %} + {% elif "C96" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C96"}) %} + {% endif %} + +{% elif task_ns.conf_name == "galewsky_vi_mono-C96" or task_ns.conf_name == "galewsky_vi_mono-C48" %} {% do task_dict.update({ "opt_confs": ["galewsky_vi_mono"], - "resolution": "C96", "DT": 450, "tsteps": 1152, "mpi_parts": 6, @@ -183,6 +197,12 @@ "plot_str": "plot_swe_shallow_water.py diagShallowWater $NODAL_DATA_DIR C q:tracer_const:tracer_pv:tracer_step 288:1152 $PLOT_DIR", }) %} + {% if "C48" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C48"}) %} + {% elif "C96" in task_ns.conf_name %} + {% do task_dict.update({"resolution": "C96"}) %} + {% endif %} + {% elif task_ns.conf_name == "thermal-BiP32x32-1x1" %} {% do task_dict.update({ diff --git a/rose-stem/site/meto/groups/groups_shallow_water.cylc b/rose-stem/site/meto/groups/groups_shallow_water.cylc index 2798f8146..d37b0eefc 100644 --- a/rose-stem/site/meto/groups/groups_shallow_water.cylc +++ b/rose-stem/site/meto/groups/groups_shallow_water.cylc @@ -20,10 +20,10 @@ "shallow_water_azspice_canned", ], "shallow_water_azspice_extra": [ - "shallow_water_galewsky_vi-C96_azspice_gnu_fast-debug-64bit", - "shallow_water_galewsky_vi_ffsl-C96_azspice_gnu_fast-debug-64bit", - "shallow_water_galewsky_vi_koren-C96_azspice_gnu_fast-debug-64bit", - "shallow_water_galewsky_vi_mono-C96_azspice_gnu_fast-debug-64bit", + "shallow_water_galewsky_vi-C48_azspice_gnu_fast-debug-64bit", + "shallow_water_galewsky_vi_ffsl-C48_azspice_gnu_fast-debug-64bit", + "shallow_water_galewsky_vi_koren-C48_azspice_gnu_fast-debug-64bit", + "shallow_water_galewsky_vi_mono-C48_azspice_gnu_fast-debug-64bit", "shallow_water_thermal-BiP32x32-1x1_azspice_gnu_fast-debug-64bit", "shallow_water_vortex_plane-BiP64x64-1x1_azspice_gnu_fast-debug-64bit", "shallow_water_vortex_plane_vi-BiP64x64-1x1_azspice_gnu_fast-debug-64bit", From feb01b2b8e7099f7ee446c2d4614615ca3ca6222 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:45:37 +0000 Subject: [PATCH 6/7] Add cla files (#33) Co-authored-by: Jenny Hickson <61183013+jennyhickson@users.noreply.github.com> --- .github/workflows/cla-check.yaml | 10 +++++++++ CONTRIBUTORS.md | 5 +++++ README.md | 35 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .github/workflows/cla-check.yaml create mode 100644 CONTRIBUTORS.md diff --git a/.github/workflows/cla-check.yaml b/.github/workflows/cla-check.yaml new file mode 100644 index 000000000..3d28d7311 --- /dev/null +++ b/.github/workflows/cla-check.yaml @@ -0,0 +1,10 @@ +name: Legal + +on: + pull_request_target: + +jobs: + cla: + uses: MetOffice/growss/.github/workflows/cla-check.yaml@main + with: + runner: 'ubuntu-24.04' diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 000000000..c34eb45d7 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +# Contributors + +| GitHub user | Real Name | Affiliation | Date | +| ----------- | --------- | ----------- | ---- | +| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | diff --git a/README.md b/README.md index 3381481ee..e2d180047 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,38 @@ Core](https://github.com/MetOffice/lfric_core) repository. In development documentation for LFRic Apps is available at: [https://metoffice.github.io/lfric_apps](https://metoffice.github.io/lfric_apps) + +## Contributing Guidelines + +Welcome! + +The following links are here to help set clear expectations for everyone +contributing to this project. By working together under a shared understanding, +we can continuously improve the project while creating a friendly, inclusive +space for all contributors. + +### Contributors Licence Agreement + +Please see the +[Momentum Contributors Licence Agreement](https://github.com/MetOffice/Momentum/blob/main/CLA.md) + +Agreement of the CLA can be shown by adding yourself to the CONTRIBUTORS file +alongside this one, and is a requirement for contributing to this project. + +### Code of Conduct + +Please be aware of and follow the +[Momentum Code of Coduct](https://github.com/MetOffice/Momentum/blob/main/docs/CODE_OF_CONDUCT.md) + +### Working Practices + +This project is managed as part of the Simulation Systems group of repositories. + +Please follow the Simulation Systems +[Working Practices.](https://metoffice.github.io/simulation-systems/index.html) + +Questions are encouraged in the Simulation Systems +[Discussions.](https://github.com/MetOffice/simulation-systems/discussions) + +Please be aware of and follow the Simulation Systems +[AI Policy.](https://metoffice.github.io/simulation-systems/FurtherDetails/ai.html) From 9549b973b04101b1fecfdb6d93214ecc3e9ea751 Mon Sep 17 00:00:00 2001 From: Jenny Hickson <61183013+jennyhickson@users.noreply.github.com> Date: Wed, 10 Dec 2025 13:07:50 +0000 Subject: [PATCH 7/7] Prerelease v3.0 (#35) Co-authored-by: James Bruten --- CONTRIBUTORS.md | 1 + .../lfric-adjoint_tests/version22_30.py | 537 ++ .../rose-meta/lfric-adjoint_tests/versions.py | 480 +- .../lfric-adjoint_tests/vn3.0/rose-meta.conf | 1 + .../lfric-gravity_wave/version22_30.py | 515 ++ .../rose-meta/lfric-gravity_wave/versions.py | 461 +- .../lfric-gravity_wave/vn3.0/rose-meta.conf | 31 + .../lfric-gungho_model/version22_30.py | 515 ++ .../rose-meta/lfric-gungho_model/versions.py | 461 +- .../lfric-gungho_model/vn3.0/rose-meta.conf | 1 + .../rose-meta/jedi_common/version22_30.py | 537 ++ .../rose-meta/jedi_common/versions.py | 480 +- .../jedi_common/vn3.0/rose-meta.conf | 150 + .../rose-meta/jedi_forecast/version22_30.py | 539 ++ .../rose-meta/jedi_forecast/versions.py | 480 +- .../jedi_forecast/vn3.0/rose-meta.conf | 18 + .../jedi_forecast_pseudo/version22_30.py | 539 ++ .../jedi_forecast_pseudo/versions.py | 480 +- .../jedi_forecast_pseudo/vn3.0/rose-meta.conf | 1 + .../jedi_id_tlm_tests/version22_30.py | 539 ++ .../rose-meta/jedi_id_tlm_tests/versions.py | 480 +- .../jedi_id_tlm_tests/vn3.0/rose-meta.conf | 28 + .../jedi_lfric_tests/version22_30.py | 556 ++ .../rose-meta/jedi_lfric_tests/versions.py | 498 +- .../jedi_lfric_tests/vn3.0/rose-meta.conf | 93 + .../jedi_tlm_forecast_tl/version22_30.py | 539 ++ .../jedi_tlm_forecast_tl/versions.py | 480 +- .../jedi_tlm_forecast_tl/vn3.0/rose-meta.conf | 28 + .../rose-meta/jedi_tlm_tests/version22_30.py | 539 ++ .../rose-meta/jedi_tlm_tests/versions.py | 480 +- .../jedi_tlm_tests/vn3.0/rose-meta.conf | 28 + .../rose-meta/lfric-jules/version22_30.py | 515 ++ .../jules/rose-meta/lfric-jules/versions.py | 461 +- .../lfric-jules/vn3.0/rose-meta.conf | 1 + .../lfric-lfric2lfric/version22_30.py | 550 ++ .../rose-meta/lfric-lfric2lfric/versions.py | 486 +- .../lfric-lfric2lfric/vn3.0/rose-meta.conf | 248 + .../rose-meta/lfric-lfric_atm/version22_30.py | 515 ++ .../rose-meta/lfric-lfric_atm/versions.py | 461 +- .../lfric-lfric_atm/vn3.0/rose-meta.conf | 1 + .../lfric-lfric_coupled/version22_30.py | 515 ++ .../rose-meta/lfric-lfric_coupled/versions.py | 461 +- .../lfric-lfric_coupled/vn3.0/rose-meta.conf | 1 + .../lfric-linear_model/version22_30.py | 535 ++ .../rose-meta/lfric-linear_model/versions.py | 480 +- .../lfric-linear_model/vn3.0/rose-meta.conf | 1 + .../lfric-name_transport/version22_30.py | 513 ++ .../lfric-name_transport/versions.py | 475 +- .../lfric-name_transport/vn3.0/rose-meta.conf | 145 + .../rose-meta/lfric-ngarch/version22_30.py | 515 ++ .../ngarch/rose-meta/lfric-ngarch/versions.py | 461 +- .../lfric-ngarch/vn3.0/rose-meta.conf | 19 + .../lfric-shallow_water/version22_30.py | 515 ++ .../rose-meta/lfric-shallow_water/versions.py | 461 +- .../lfric-shallow_water/vn3.0/rose-meta.conf | 136 + .../rose-meta/lfric-solver/version22_30.py | 42 + .../solver/rose-meta/lfric-solver/versions.py | 2 +- .../lfric-solver/vn3.0/rose-meta.conf | 1109 +++ .../rose-meta/lfric-transport/version22_30.py | 515 ++ .../rose-meta/lfric-transport/versions.py | 461 +- .../lfric-transport/vn3.0/rose-meta.conf | 125 + dependencies.yaml | 16 +- .../rose-meta/coupling/version22_30.py | 515 ++ .../rose-meta/coupling/versions.py | 461 +- .../rose-meta/coupling/vn3.0/rose-meta.conf | 1 + .../jedi_lfric_interface/version22_30.py | 535 ++ .../jedi_lfric_interface/versions.py | 480 +- .../jedi_lfric_interface/vn3.0/rose-meta.conf | 1 + .../rose-meta/jules-lfric/version22_30.py | 71 + .../rose-meta/jules-lfric/versions.py | 35 +- .../jules-lfric/vn3.0/rose-meta.conf | 113 + .../rose-meta/jules-lsm/version22_30.py | 71 + .../rose-meta/jules-lsm/versions.py | 36 +- .../rose-meta/jules-lsm/vn3.0/rose-meta.conf | 489 ++ .../jules-hydrology/vn3.0/rose-meta.conf | 27 + .../jules-nvegparm/vn3.0/rose-meta.conf | 121 + .../jules-pftparm/vn3.0/rose-meta.conf | 167 + .../jules-radiation/vn3.0/rose-meta.conf | 113 + .../jules-sea-seaice/vn3.0/rose-meta.conf | 245 + .../jules-snow/vn3.0/rose-meta.conf | 99 + .../jules-soil/vn3.0/rose-meta.conf | 31 + .../jules-surface-types/vn3.0/rose-meta.conf | 125 + .../jules-surface/vn3.0/rose-meta.conf | 115 + .../jules-urban/vn3.0/rose-meta.conf | 50 + .../jules-vegetation/vn3.0/rose-meta.conf | 34 + .../rose-meta/um-aerosol/version22_30.py | 57 + .../rose-meta/um-aerosol/versions.py | 21 +- .../rose-meta/um-aerosol/vn3.0/rose-meta.conf | 345 + .../um-boundary_layer/version22_30.py | 42 + .../rose-meta/um-boundary_layer/versions.py | 2 +- .../um-boundary_layer/vn3.0/rose-meta.conf | 579 ++ .../rose-meta/um-chemistry/version22_30.py | 137 + .../rose-meta/um-chemistry/versions.py | 101 +- .../um-chemistry/vn3.0/rose-meta.conf | 292 + .../rose-meta/um-cloud/version22_30.py | 56 + .../rose-meta/um-cloud/versions.py | 20 +- .../rose-meta/um-cloud/vn3.0/rose-meta.conf | 630 ++ .../rose-meta/um-convection/version22_30.py | 42 + .../rose-meta/um-convection/versions.py | 2 +- .../um-convection/vn3.0/rose-meta.conf | 170 + .../rose-meta/um-iau/version22_30.py | 54 + .../rose-meta/um-iau/versions.py | 17 +- .../rose-meta/um-iau/vn3.0/rose-meta.conf | 161 + .../rose-meta/um-microphysics/version22_30.py | 42 + .../rose-meta/um-microphysics/versions.py | 2 +- .../um-microphysics/vn3.0/rose-meta.conf | 484 ++ .../um-orographic_drag/version22_30.py | 42 + .../rose-meta/um-orographic_drag/versions.py | 2 +- .../um-orographic_drag/vn3.0/rose-meta.conf | 161 + .../rose-meta/um-spectral_gwd/version22_30.py | 42 + .../rose-meta/um-spectral_gwd/versions.py | 2 +- .../um-spectral_gwd/vn3.0/rose-meta.conf | 91 + .../um-stochastic_physics/version22_30.py | 138 + .../um-stochastic_physics/versions.py | 102 +- .../vn3.0/rose-meta.conf | 1252 +++ .../socrates-radiation/version22_30.py | 42 + .../rose-meta/socrates-radiation/versions.py | 2 +- .../socrates-radiation/vn3.0/rose-meta.conf | 1941 +++++ rose-stem/app/adjoint_tests/rose-app.conf | 2 +- rose-stem/app/gravity_wave/rose-app.conf | 2 +- rose-stem/app/gungho_model/rose-app.conf | 2 +- rose-stem/app/jedi_forecast/rose-app.conf | 2 +- .../app/jedi_forecast_pseudo/rose-app.conf | 2 +- rose-stem/app/jedi_id_tlm_tests/rose-app.conf | 2 +- rose-stem/app/jedi_lfric_tests/rose-app.conf | 2 +- .../app/jedi_tlm_forecast_tl/rose-app.conf | 2 +- rose-stem/app/jedi_tlm_tests/rose-app.conf | 2 +- rose-stem/app/jules/rose-app.conf | 2 +- rose-stem/app/lfric2lfric/rose-app.conf | 2 +- rose-stem/app/lfric_atm/rose-app.conf | 2 +- .../lfric_coupled_atmosphere/rose-app.conf | 2 +- rose-stem/app/linear_model/rose-app.conf | 2 +- rose-stem/app/mesh/opt/rose-app-C12_op.conf | 3 - .../app/mesh/opt/rose-app-C224_MG_op.conf | 4 - rose-stem/app/mesh/opt/rose-app-n96_lam.conf | 1 - .../app/mesh/opt/rose-app-ral3_seuk.conf | 2 +- rose-stem/app/mesh/opt/rose-app-ral3_uk.conf | 2 +- rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf | 2 +- rose-stem/app/mesh/rose-app.conf | 2 +- rose-stem/app/name_transport/rose-app.conf | 2 +- rose-stem/app/ngarch/rose-app.conf | 2 +- rose-stem/app/shallow_water/rose-app.conf | 2 +- rose-stem/app/solver/rose-app.conf | 2 +- rose-stem/app/transport/rose-app.conf | 2 +- rose-stem/rose-suite.conf | 2 +- rose-stem/site/meto/variables_azspice.cylc | 8 +- rose-stem/site/meto/variables_ex1a.cylc | 16 +- .../rose-meta/lfric-adjoint/version22_30.py | 535 ++ .../rose-meta/lfric-adjoint/versions.py | 480 +- .../lfric-adjoint/vn3.0/rose-meta.conf | 1 + .../rose-meta/lfric-gungho/version22_30.py | 501 ++ .../gungho/rose-meta/lfric-gungho/versions.py | 449 +- .../lfric-gungho/vn3.0/rose-meta.conf | 6831 +++++++++++++++++ .../rose-meta/lfric-linear/version22_30.py | 533 ++ .../linear/rose-meta/lfric-linear/versions.py | 479 +- .../lfric-linear/vn3.0/rose-meta.conf | 106 + 156 files changed, 30611 insertions(+), 11648 deletions(-) create mode 100644 applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version22_30.py create mode 100644 applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.0/rose-meta.conf create mode 100644 applications/gravity_wave/rose-meta/lfric-gravity_wave/version22_30.py create mode 100644 applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.0/rose-meta.conf create mode 100644 applications/gungho_model/rose-meta/lfric-gungho_model/version22_30.py create mode 100644 applications/gungho_model/rose-meta/lfric-gungho_model/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_common/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.0/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/version22_30.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.0/rose-meta.conf create mode 100644 applications/jules/rose-meta/lfric-jules/version22_30.py create mode 100644 applications/jules/rose-meta/lfric-jules/vn3.0/rose-meta.conf create mode 100644 applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version22_30.py create mode 100644 applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.0/rose-meta.conf create mode 100644 applications/lfric_atm/rose-meta/lfric-lfric_atm/version22_30.py create mode 100644 applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.0/rose-meta.conf create mode 100644 applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version22_30.py create mode 100644 applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.0/rose-meta.conf create mode 100644 applications/linear_model/rose-meta/lfric-linear_model/version22_30.py create mode 100644 applications/linear_model/rose-meta/lfric-linear_model/vn3.0/rose-meta.conf create mode 100644 applications/name_transport/rose-meta/lfric-name_transport/version22_30.py create mode 100644 applications/name_transport/rose-meta/lfric-name_transport/vn3.0/rose-meta.conf create mode 100644 applications/ngarch/rose-meta/lfric-ngarch/version22_30.py create mode 100644 applications/ngarch/rose-meta/lfric-ngarch/vn3.0/rose-meta.conf create mode 100644 applications/shallow_water/rose-meta/lfric-shallow_water/version22_30.py create mode 100644 applications/shallow_water/rose-meta/lfric-shallow_water/vn3.0/rose-meta.conf create mode 100644 applications/solver/rose-meta/lfric-solver/version22_30.py create mode 100644 applications/solver/rose-meta/lfric-solver/vn3.0/rose-meta.conf create mode 100644 applications/transport/rose-meta/lfric-transport/version22_30.py create mode 100644 applications/transport/rose-meta/lfric-transport/vn3.0/rose-meta.conf create mode 100644 interfaces/coupled_interface/rose-meta/coupling/version22_30.py create mode 100644 interfaces/coupled_interface/rose-meta/coupling/vn3.0/rose-meta.conf create mode 100644 interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version22_30.py create mode 100644 interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/jules-lfric/version22_30.py create mode 100644 interfaces/jules_interface/rose-meta/jules-lfric/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/jules-lsm/version22_30.py create mode 100644 interfaces/jules_interface/rose-meta/jules-lsm/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface-types/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.0/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-aerosol/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-chemistry/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-cloud/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-convection/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-iau/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-microphysics/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.0/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version22_30.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.0/rose-meta.conf create mode 100644 interfaces/socrates_interface/rose-meta/socrates-radiation/version22_30.py create mode 100644 interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.0/rose-meta.conf create mode 100644 science/adjoint/rose-meta/lfric-adjoint/version22_30.py create mode 100644 science/adjoint/rose-meta/lfric-adjoint/vn3.0/rose-meta.conf create mode 100644 science/gungho/rose-meta/lfric-gungho/version22_30.py create mode 100644 science/gungho/rose-meta/lfric-gungho/vn3.0/rose-meta.conf create mode 100644 science/linear/rose-meta/lfric-linear/version22_30.py create mode 100644 science/linear/rose-meta/lfric-linear/vn3.0/rose-meta.conf diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c34eb45d7..d0f7ae14d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -3,3 +3,4 @@ | GitHub user | Real Name | Affiliation | Date | | ----------- | --------- | ----------- | ---- | | james-bruten-mo | James Bruten | Met Office | 2025-12-09 | +| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | diff --git a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version22_30.py b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version22_30.py new file mode 100644 index 000000000..9be4ab2eb --- /dev/null +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version22_30.py @@ -0,0 +1,537 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint_tests + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.0/rose-meta.conf b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.0/rose-meta.conf new file mode 100644 index 000000000..a890b5056 --- /dev/null +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-adjoint/vn3.0 diff --git a/applications/gravity_wave/rose-meta/lfric-gravity_wave/version22_30.py b/applications/gravity_wave/rose-meta/lfric-gravity_wave/version22_30.py new file mode 100644 index 000000000..0be7c16c2 --- /dev/null +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gravity_wave + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.0/rose-meta.conf b/applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.0/rose-meta.conf new file mode 100644 index 000000000..0d953908e --- /dev/null +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.0/rose-meta.conf @@ -0,0 +1,31 @@ +import=lfric-gungho/vn3.0 + +[namelist:gravity_wave_constants] +compulsory=true +description= +ns=namelist/gw_constants +title=Gravity wave constants + +[namelist:gravity_wave_constants=b_space] +compulsory=true +description=????? +!enumeration=true +help=????? +sort-key= +value-titles=w0, w3, wtheta +values='w0', 'w3', 'wtheta' + +[!namelist:gravity_wave_constants=cs_square] +compulsory=false +description= +!expression=namelist:gravity_wave_constants=speed_of_sound*namelist:gravity_wave_constants=speed_of_sound +help= +!kind=default +sort-key= +type=real + +[namelist:gravity_wave_constants=speed_of_sound] +compulsory=true +description= +!kind=default +type=real diff --git a/applications/gungho_model/rose-meta/lfric-gungho_model/version22_30.py b/applications/gungho_model/rose-meta/lfric-gungho_model/version22_30.py new file mode 100644 index 000000000..e0ecfcf3d --- /dev/null +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho_model + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/gungho_model/rose-meta/lfric-gungho_model/vn3.0/rose-meta.conf b/applications/gungho_model/rose-meta/lfric-gungho_model/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2a7ddac47 --- /dev/null +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.0 diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_common/version22_30.py new file mode 100644 index 000000000..753b6fa62 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/version22_30.py @@ -0,0 +1,537 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.0/rose-meta.conf new file mode 100644 index 000000000..04e9bfea7 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.0/rose-meta.conf @@ -0,0 +1,150 @@ +import=lfric-adjoint/vn3.0 + +#============================================================================== +# 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 + +#============================================================================== +# Pseudo model for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_pseudo_model] +compulsory=true +description=JEDI-LFRIC emulator pseudo model configuration +help=Configuration options for JEDI-LFRIC emulator pseudo model object. +ns=namelist/JEDI-LFRIC-setup/jedi_pseudo_model +title=jedi_pseudo_model + +[namelist:jedi_pseudo_model=initial_time] +compulsory=true +description=The start date for the the model run +help=Add the start date for the the model run + =Format: yyyy-mm-ddThh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_pseudo_model=number_of_steps] +compulsory=true +description=The number of time steps to run +help=Add the number of time steps +!kind=default +sort-key= +type=integer + +[namelist:jedi_pseudo_model=time_step] +compulsory=true +description=The model time step duration +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/rose-meta/jedi_forecast/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/version22_30.py new file mode 100644 index 000000000..89ccc5dbc --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/version22_30.py @@ -0,0 +1,539 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_forecast + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.0/rose-meta.conf new file mode 100644 index 000000000..5660020fc --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.0/rose-meta.conf @@ -0,0 +1,18 @@ +import=jedi_common/vn3.0 + +#============================================================================== +# Model for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_model] +compulsory=true +description=Jedi model configuration +ns=namelist/JEDI-LFRIC-setup/jedi_model +title=jedi_model + +[namelist:jedi_model=time_step] +compulsory=true +description=The models time step duration +help=Format PdDThHmMsS where d=day, h=hours, m=minutes and s=seconds +!kind=default +sort-key= +type=character diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version22_30.py new file mode 100644 index 000000000..243de3b2a --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version22_30.py @@ -0,0 +1,539 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_forecast_pseudo + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.0/rose-meta.conf new file mode 100644 index 000000000..0800d600f --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=jedi_common/vn3.0 diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version22_30.py new file mode 100644 index 000000000..256a8444a --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version22_30.py @@ -0,0 +1,539 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_id_tlm_tests + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2e03b886a --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.0/rose-meta.conf @@ -0,0 +1,28 @@ +import=jedi_common/vn3.0 + +#============================================================================== +# Increment for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_increment] +compulsory=true +description=JEDI-LFRIC emulator increment configuration +help=Configuration options for JEDI-LFRIC emulator increment object. +ns=namelist/JEDI-LFRIC-setup/jedi_increment +title=jedi_increment + +[namelist:jedi_increment=inc_time] +compulsory=true +description=The validity date of the increment +help=Format: yyyy-mm-dd hh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_increment=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/rose-meta/jedi_lfric_tests/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/version22_30.py new file mode 100644 index 000000000..3145905ba --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/version22_30.py @@ -0,0 +1,556 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t369(MacroUpgrade): + """Upgrade macro for ticket #369 by Tom Hill (tomhill).""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t369" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_lfric_tests + """Add incremental_wind_interpolation to namelist jedi_linear_model""" + self.add_setting( + config, + ["namelist:jedi_linear_model", "incremental_wind_interpolation"], + ".true.", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t369" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_lfric_tests + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py index 7eb30954d..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,504 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - return config, self.reports - - -class vn22_t369(MacroUpgrade): - """Upgrade macro for ticket #369 by Tom Hill (tomhill).""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t369" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_lfric_tests - """Add incremental_wind_interpolation to namelist jedi_linear_model""" - self.add_setting( - config, - ["namelist:jedi_linear_model", "incremental_wind_interpolation"], - ".true.", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t369" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.0/rose-meta.conf new file mode 100644 index 000000000..821585951 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.0/rose-meta.conf @@ -0,0 +1,93 @@ +import=jedi_common/vn3.0 + +[namelist:jedi_geometry=io_path_inc_read] +compulsory=true +description=File to read the linear model increment from +help=This is the initial condition increment file +!kind=default +sort-key= +type=character + +[namelist:jedi_geometry=io_setup_increment] +compulsory=true +description=Setup setup increment file +help=The increment file defined by io_path_inc_read will be setup if true +!kind=default +sort-key= +type=logical + +#============================================================================== +# Increment for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_increment] +compulsory=true +description=JEDI-LFRIC emulator increment configuration +help=Configuration options for JEDI-LFRIC emulator increment object. +ns=namelist/JEDI-LFRIC-setup/jedi_increment +title=jedi_increment + +[namelist:jedi_increment=inc_time] +compulsory=true +description=The validity date of the increment +help=Format: yyyy-mm-dd hh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_increment=initialise_via_read] +compulsory=true +description=Initialise increment via read +help=The increment will be setup via file read if true +!kind=default +sort-key= +type=logical + +[namelist:jedi_increment=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 + +#============================================================================== +# Linear Model for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_linear_model] +compulsory=true +description=Jedi linear-model configuration +ns=namelist/JEDI-LFRIC-setup/jedi_linear_model +title=jedi_linear_model + +[namelist:jedi_linear_model=incremental_wind_interpolation] +compulsory=true +description=Flag to control whether winds are interpolated incrementally +!kind=default +sort-key= +type=logical + +[namelist:jedi_linear_model=nl_time_step] +compulsory=true +description=The time step duration of the non-linear model +help=Format PdDThHmMsS where d=day, h=hours, m=minutes and s=seconds +!kind=default +sort-key= +type=character + +#============================================================================== +# Model for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_model] +compulsory=true +description=Jedi model configuration +ns=namelist/JEDI-LFRIC-setup/jedi_model +title=jedi_model + +[namelist:jedi_model=time_step] +compulsory=true +description=The models time step duration +help=Format PdDThHmMsS where d=day, h=hours, m=minutes and s=seconds +!kind=default +sort-key= +type=character diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version22_30.py new file mode 100644 index 000000000..805e2eff0 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version22_30.py @@ -0,0 +1,539 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_tlm_forecast_tl + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2e03b886a --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.0/rose-meta.conf @@ -0,0 +1,28 @@ +import=jedi_common/vn3.0 + +#============================================================================== +# Increment for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_increment] +compulsory=true +description=JEDI-LFRIC emulator increment configuration +help=Configuration options for JEDI-LFRIC emulator increment object. +ns=namelist/JEDI-LFRIC-setup/jedi_increment +title=jedi_increment + +[namelist:jedi_increment=inc_time] +compulsory=true +description=The validity date of the increment +help=Format: yyyy-mm-dd hh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_increment=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/rose-meta/jedi_tlm_tests/version22_30.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/version22_30.py new file mode 100644 index 000000000..00215edcc --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/version22_30.py @@ -0,0 +1,539 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_common + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_tlm_tests + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.0/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2e03b886a --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.0/rose-meta.conf @@ -0,0 +1,28 @@ +import=jedi_common/vn3.0 + +#============================================================================== +# Increment for the JEDI-LFRIC Emulator +#============================================================================== +[namelist:jedi_increment] +compulsory=true +description=JEDI-LFRIC emulator increment configuration +help=Configuration options for JEDI-LFRIC emulator increment object. +ns=namelist/JEDI-LFRIC-setup/jedi_increment +title=jedi_increment + +[namelist:jedi_increment=inc_time] +compulsory=true +description=The validity date of the increment +help=Format: yyyy-mm-dd hh:mm:ss +!kind=default +sort-key= +type=character + +[namelist:jedi_increment=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/jules/rose-meta/lfric-jules/version22_30.py b/applications/jules/rose-meta/lfric-jules/version22_30.py new file mode 100644 index 000000000..32ae5d60b --- /dev/null +++ b/applications/jules/rose-meta/lfric-jules/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-jules + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/jules/rose-meta/lfric-jules/versions.py b/applications/jules/rose-meta/lfric-jules/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/jules/rose-meta/lfric-jules/versions.py +++ b/applications/jules/rose-meta/lfric-jules/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/jules/rose-meta/lfric-jules/vn3.0/rose-meta.conf b/applications/jules/rose-meta/lfric-jules/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2a7ddac47 --- /dev/null +++ b/applications/jules/rose-meta/lfric-jules/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.0 diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version22_30.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version22_30.py new file mode 100644 index 000000000..85f28a955 --- /dev/null +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version22_30.py @@ -0,0 +1,550 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t621(MacroUpgrade): + """Upgrade macro for ticket #621 by Mike Hobson.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t621" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric2lfric + """Add orography, and boundary namelists""" + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:files", + r"namelist:files" + "\n" + " (namelist:orography)", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t621" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t711(MacroUpgrade): + """Upgrade macro for ticket #711 by Juan M Castillo.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t711" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric2lfric + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t711" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-lfric2lfric + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 4d255b8d7..152c043d0 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,492 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - return config, self.reports - - -class vn22_t621(MacroUpgrade): - """Upgrade macro for ticket #621 by Mike Hobson.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t621" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric2lfric - """Add orography, and boundary namelists""" - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:files", - r"namelist:files" + "\n" + " (namelist:orography)", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t621" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - return config, self.reports - - -class vn22_t711(MacroUpgrade): - """Upgrade macro for ticket #711 by Juan M Castillo.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t711" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric2lfric - # Blank Upgrade Macro - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t711" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.0/rose-meta.conf b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.0/rose-meta.conf new file mode 100644 index 000000000..3390dc69a --- /dev/null +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.0/rose-meta.conf @@ -0,0 +1,248 @@ +import=lfric-gungho/vn3.0 + +[namelist:base_mesh] +compulsory=false + +[namelist:base_mesh=prepartitioned] +compulsory=false +!!trigger=namelist:partitioning: .false.; + +[namelist:lfric2lfric] +compulsory=true +description= +ns=namelist/lfri2lfric +title=lfric2lfric + +[namelist:lfric2lfric=destination_geometry] +compulsory=true +description=The geometry on which the destination domain is embedded +!enumeration=true +fail-if=this == "'planar'" and namelist:lfric2lfric=destination_topology != "'non_periodic'"; +help=Along with topology this describes the domain. The geometry is the shape + =on which the domain is embedded. This is currently either 'spherical' or + ='planar'. +ns=namelist/lfric2lfric/configuration +value-titles=Planar, Spherical +values='planar', 'spherical' + +[namelist:lfric2lfric=destination_mesh_name] +compulsory=true +description=Tag-name for destination-mesh +fail-if=this == namelist:lfric2lfric=source_mesh_name ; +help=Mesh topologies are held in UGRID conformant NetCDF files which + =may contain more than one mesh topology. This tag-name identifies + =the mesh topology to use from the mesh file namelist:lfric2lfric=destination_meshfile_prefix. +!string_length=default +type=character + +[namelist:lfric2lfric=destination_meshfile_prefix] +compulsory=true +description=Location of destination 2D mesh input file(s) (prefix). +help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should + =be conformant to UGRID convention. + = +!string_length=filename +type=character + +[namelist:lfric2lfric=destination_topology] +compulsory=true +description=Describes the periodicity of the destination domain. +!enumeration=true +fail-if=this != "'fully_periodic'" and namelist:partitioning=partitioner == "'cubedsphere'" ; +help=Together with the geometry this describes the domain. The topology is the + =periodicity of the base mesh. A mesh over the whole globe would have + =spherical geometry and fully_periodic topology, while a regional model + =on the sphere would have spherical geometry and non_periodic topology. + =Note that to run a regional model in limited-area mode with lateral boundary + =conditions, namelist:boundaries=limited_area also needs to be set to "true". +ns=namelist/lfric2lfric/configuration +value-titles=Fully-periodic, Non-periodic +values='fully_periodic', 'non_periodic' + +[namelist:lfric2lfric=dst_ancil_directory] +compulsory=true +description=Directory for destination ancillary files +help=Path to the directory where LFRic ancillaries for the destination + =mesh are stored +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:lfric2lfric=dst_orography_mean_ancil_path] +compulsory=true +description=Path to mean destination orography file from the destination + =ancillary files directory +help=This file contains global surface altitude information used for + =the destination orography +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:lfric2lfric=origin_domain] +compulsory=true +description=The domain that will be the source of the values to be regridded. +!enumeration=true +help=The LAM domain can only be used as an origin domain when regridding + =to another LAM mesh, lfric2lfric does not support LAM-to-global or + =LAM-to-LBC regridding. +sort-key=1 +value-titles=global, LAM +values='global', 'LAM' + +[namelist:lfric2lfric=prepartitioned_meshes] +compulsory=true +description=Load pre-partitioned source and destination meshes +help=Input mesh files may contain global meshes whose extents are intended to cover + =the entire model domain. These may require partitioning in to a number of local + =meshes (1 per processor rank) at runtime depending on the number of ranks + =requested to perform the regridding between the source and destination meshes. + = + =If prepartitioned meshes are not used the model will expect global meshes + =in the mesh input file to be partitioned at runtime. + = + =For simplicity, pre-partitioning can not be selected individually for the + =source and destination meshes. + = + =Note: With increasing mesh size, at some point prepartitioned meshes may become + = necessary. + = +trigger=namelist:partitioning: .false. ; +type=logical + +[namelist:lfric2lfric=regrid_method] +compulsory=true +description=Regridding method +!enumeration=true +help=Method used to regrid between the source and destination mesh, + =there are three options available: + = + = 'Inter-grid maps' : Use inter-grids maps which link suitable pairs + = of input meshes. Inter-grid maps are restricted + = to mesh pairs where cells on one mesh are a + = gridded sub-division of cells from the other mesh. + = These inter-grid maps are included in the mesh + = files, if requested from the mesh generators when + = configured to output multiple meshes. + = + = 'LFRic2LFRic' : The regridding between the source and destination + = grids is made through the weight files generated + = by an external tool, applied by a lfric2lfric + = kernel. + = + = 'Oasis' : The regridding between the source and destination + = grids is make through the weigh files generated + = by an external tool, applied by the OASIS + = library. + = +ns=namelist/lfric2lfric/configuration +trigger=namelist:lfric2lfric=weight_file: 'lfric2lfric' ; +value-titles=Inter-grid maps, LFRic2LFRic, Oasis +values='map','lfric2lfric','oasis' + +[namelist:lfric2lfric=source_geometry] +compulsory=true +description=The geometry on which the source domain is embedded +!enumeration=true +fail-if=this == "'planar'" and namelist:lfric2lfric=source_topology != "'non_periodic'"; +help=Along with topology this describes the domain. The geometry is the shape + =on which the domain is embedded. This is currently either 'spherical' or + ='planar'. +ns=namelist/lfric2lfric/configuration +value-titles=Planar, Spherical +values='planar', 'spherical' + +[namelist:lfric2lfric=source_mesh_name] +compulsory=true +description=Tag-name for source-mesh +fail-if=this == namelist:lfric2lfric=destination_mesh_name ; +help=Mesh topologies are held in UGRID conformant NetCDF files which + =may contain more than one mesh topology. This tag-name identifies + =the mesh topology to use from the mesh file namelist:lfric2lfric=source_meshfile_prefix. +!string_length=default +type=character + +[namelist:lfric2lfric=source_meshfile_prefix] +compulsory=true +description=Location of source 2D mesh input file(s) (prefix). +fail-if=namelist:lfric2lfric=regrid_method == "'map'" and this != namelist:lfric2lfric=destination_meshfile_prefix ; +help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should + =be conformant to UGRID convention. + = +!string_length=filename +type=character + +[namelist:lfric2lfric=source_topology] +compulsory=true +description=Describes the periodicity of the source domain. +!enumeration=true +fail-if=this != "'fully_periodic'" and namelist:partitioning=partitioner == "'cubedsphere'" ; +help=Together with the geometry this describes the domain. The topology is the + =periodicity of the base mesh. A mesh over the whole globe would have + =spherical geometry and fully_periodic topology, while a regional model + =on the sphere would have spherical geometry and non_periodic topology. + =Note that to run a regional model in limited-area mode with lateral boundary + =conditions, namelist:boundaries=limited_area also needs to be set to "true". +ns=namelist/lfric2lfric/configuration +value-titles=Fully-periodic, Non-periodic +values='fully_periodic', 'non_periodic' + +[namelist:lfric2lfric=src_ancil_directory] +compulsory=true +description=Directory for source ancillary files +help=Path to the directory where LFRic ancillaries for the source + =mesh are stored +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:lfric2lfric=src_orography_mean_ancil_path] +compulsory=true +description=Path to mean source orography file from the source + =ancillary files directory +help=This file contains global surface altitude information used for + =the source orography +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:lfric2lfric=target_domain] +compulsory=true +description=The domain type that the source data will be regridded to. +!enumeration=true +fail-if=this == "'LBC'" and namelist:lfric2lfric=origin_domain == "'LAM'" # LAM cannot provide source values for LBC creation + =this == "'global'" and namelist:lfric2lfric=origin_domain == "'LAM'" # LAM cannot currently be regrid into global +help=Target domains currently not supported include: + = + = origin => target + = ---------------- + = LAM => LBC + = LAM => global + = +sort-key=2 +value-titles=global, LAM, LBC +values='global', 'LAM', 'LBC' + +[namelist:lfric2lfric=weight_file] +compulsory=true +description=Weight file for mesh regridding +fail-if=this == '' ; +help=Location of the weight file used to interpolate + =between the source and destination meshes +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:partitioning] +duplicate=true +!instance_key_member=mesh_type + +[namelist:partitioning=mesh_type] +compulsory=true +description=The purpose of the mesh +!enumeration=true +help=The mesh can be used to perform a LFRic forecast (Dynamics), + =or to describe the source and the destination grids in + =the lfric2lfric regridding program. +ns=namelist/lfric2lfric/configuration +value-titles=Dynamics, Source, Destination +values='dynamics', 'source', 'destination' diff --git a/applications/lfric_atm/rose-meta/lfric-lfric_atm/version22_30.py b/applications/lfric_atm/rose-meta/lfric-lfric_atm/version22_30.py new file mode 100644 index 000000000..df2b385f4 --- /dev/null +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-lfric_atm + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.0/rose-meta.conf b/applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2a7ddac47 --- /dev/null +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.0 diff --git a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version22_30.py b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version22_30.py new file mode 100644 index 000000000..adcff24b7 --- /dev/null +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-lfric_coupled + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.0/rose-meta.conf b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2a7ddac47 --- /dev/null +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.0 diff --git a/applications/linear_model/rose-meta/lfric-linear_model/version22_30.py b/applications/linear_model/rose-meta/lfric-linear_model/version22_30.py new file mode 100644 index 000000000..16ac4da1c --- /dev/null +++ b/applications/linear_model/rose-meta/lfric-linear_model/version22_30.py @@ -0,0 +1,535 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear_model + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/linear_model/rose-meta/lfric-linear_model/versions.py b/applications/linear_model/rose-meta/lfric-linear_model/versions.py index 391ea3bf1..152c043d0 100644 --- a/applications/linear_model/rose-meta/lfric-linear_model/versions.py +++ b/applications/linear_model/rose-meta/lfric-linear_model/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/linear_model/rose-meta/lfric-linear_model/vn3.0/rose-meta.conf b/applications/linear_model/rose-meta/lfric-linear_model/vn3.0/rose-meta.conf new file mode 100644 index 000000000..0faaef3f3 --- /dev/null +++ b/applications/linear_model/rose-meta/lfric-linear_model/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-linear/vn3.0 diff --git a/applications/name_transport/rose-meta/lfric-name_transport/version22_30.py b/applications/name_transport/rose-meta/lfric-name_transport/version22_30.py new file mode 100644 index 000000000..07a3607de --- /dev/null +++ b/applications/name_transport/rose-meta/lfric-name_transport/version22_30.py @@ -0,0 +1,513 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t806(MacroUpgrade): + """Upgrade macro for ticket #806 by James Kent.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t806" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-name_transport + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t806" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-name_transport + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/name_transport/rose-meta/lfric-name_transport/versions.py b/applications/name_transport/rose-meta/lfric-name_transport/versions.py index 264f4ab71..152c043d0 100644 --- a/applications/name_transport/rose-meta/lfric-name_transport/versions.py +++ b/applications/name_transport/rose-meta/lfric-name_transport/versions.py @@ -2,6 +2,8 @@ from metomi.rose.upgrade import MacroUpgrade +from .version22_30 import * + class UpgradeError(Exception): """Exception created when an upgrade fails.""" @@ -16,473 +18,16 @@ def __repr__(self): __str__ = __repr__ -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" +""" +Copy this template and complete to add your macro - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket TTTT by Unknown.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t806(MacroUpgrade): - """Upgrade macro for ticket #806 by James Kent.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t806" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-name_transport - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t806" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - + # Add settings return config, self.reports +""" diff --git a/applications/name_transport/rose-meta/lfric-name_transport/vn3.0/rose-meta.conf b/applications/name_transport/rose-meta/lfric-name_transport/vn3.0/rose-meta.conf new file mode 100644 index 000000000..af269c1ff --- /dev/null +++ b/applications/name_transport/rose-meta/lfric-name_transport/vn3.0/rose-meta.conf @@ -0,0 +1,145 @@ +import=lfric-gungho/vn3.0 + +#============================================================================== +# INITIAL NAME FIELD +#============================================================================== +[namelist:initial_name_field] +compulsory=true +description=Namelist options to set up the tracer fields in the name_transport miniapp. +help=?????? + =?????? +!kind=default +ns=namelist/Job/Initial conditions/Tracer +sort-key=Section-A03 + +[namelist:initial_name_field=field_background] +compulsory=true +description=Background value of the tracer field. +fail-if=this < 0.0 ; +help=Background value of tracer. The tracer value away from the + =set tracer function, usually the minimum tracer value. +!kind=default +range=0.0: +sort-key=Panel-A03 +type=real + +[namelist:initial_name_field=field_max] +compulsory=true +description=Maximum value of tracer field function. +fail-if=this < 0.0 ; +help=The maximum value of the tracer field function. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:initial_name_field=r1] +compulsory=true +description=Radius of initial tracer field function. +fail-if=this < 0.0 ; +help=Radius for one of the pair of initial tracer field functions + =Biperiodic domain: in metres. + =Cubed sphere domain: in radians. +!kind=default +range=0.0: +sort-key=Panel-A04 +type=real + +[namelist:initial_name_field=r2] +compulsory=true +description=Radius of second initial tracer field function. +fail-if= +help=Radius parameter for the second of the pair of initial tracer field functions (see r1) +!kind=default +!range= +sort-key=Panel-A08 +trigger= +type=real + +[namelist:initial_name_field=x1] +compulsory=true +description=Centre in long/x of tracer field function. +help=Position for one of the pair of initial tracer field functions + =Biperiodic domain: centre of the function given in terms of metres in the chi1 direction. + =Cubed sphere domain: longitudinal position of the centre of the function (a value between 0 and \f$2\pi\f$). +!kind=default +sort-key=Panel-A05 +trigger= +type=real + +[namelist:initial_name_field=x2] +compulsory=true +description=Centre in long/x of second tracer field function. +fail-if= +help=Position parameter for the second of the pair of initial tracer field functions (see x1) +!kind=default +!range= +sort-key=Panel-A09 +trigger= +type=real + +[namelist:initial_name_field=y1] +compulsory=true +description=Centre in lat/y of tracer field function. +fail-if= +help=Position for one of the pair of initial tracer field functions + =Biperiodic domain: centre of the function given in terms of metres in the chi2 direction. + =Cubed sphere domain: latitudinal position of the centre of the function (a value between \f$-\pi/2\f$ and \f$\pi/2\f$). +!kind=default +!range= +sort-key=Panel-A06 +trigger= +type=real + +[namelist:initial_name_field=y2] +compulsory=true +description=Centre in lat/y of second tracer field function. +fail-if= +help=Position parameter for the second of the pair of initial tracer field functions (see y1) +!kind=default +!range= +sort-key=Panel-A10 +trigger= +type=real + +[namelist:initial_name_field=z1] +compulsory=true +description=Centre in height of tracer field function. +fail-if= +help=Centre height position for one of the pair of initial tracer field functions +!kind=default +!range= +sort-key=Panel-A07 +trigger= +type=real + +[namelist:initial_name_field=z2] +compulsory=true +description=Centre in height of second tracer field function. +fail-if= +help=Centre height position for one of the pair of initial tracer field functions +!kind=default +!range= +sort-key=Panel-A11 +trigger= +type=real + +[namelist:name_options] +compulsory=true +description=Namelist options for the NAME transport miniapp. +help=Specific options for the NAME transport miniapp to ensure the correct + =things are transported by the correct winds. +!kind=default +ns=namelist/Science/Dynamics/Transport/Name +sort-key=Section-A01 + +[namelist:name_options=transport_density] +compulsory=true +description=Whether to transport density within the NAME application. +fail-if= +help=If set to true the density will be transported. If set to false the + =density must be read in and passed to the application at each + =time step. +!kind=default +sort-key=Panel-A02 +type=logical diff --git a/applications/ngarch/rose-meta/lfric-ngarch/version22_30.py b/applications/ngarch/rose-meta/lfric-ngarch/version22_30.py new file mode 100644 index 000000000..ef031b87f --- /dev/null +++ b/applications/ngarch/rose-meta/lfric-ngarch/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-ngarch + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/ngarch/rose-meta/lfric-ngarch/versions.py b/applications/ngarch/rose-meta/lfric-ngarch/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/ngarch/rose-meta/lfric-ngarch/versions.py +++ b/applications/ngarch/rose-meta/lfric-ngarch/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/ngarch/rose-meta/lfric-ngarch/vn3.0/rose-meta.conf b/applications/ngarch/rose-meta/lfric-ngarch/vn3.0/rose-meta.conf new file mode 100644 index 000000000..d540356c6 --- /dev/null +++ b/applications/ngarch/rose-meta/lfric-ngarch/vn3.0/rose-meta.conf @@ -0,0 +1,19 @@ +import=lfric-gungho/vn3.0 + +[namelist:ngarch] +compulsory=true +description= +ns=namelist/ngarch +title=ngarch + +[namelist:ngarch=method] +compulsory=true +description=Which ngarch timestep method to use +!enumeration=true +help=The method will be used instead of the one set by the 'method' option in the + =timestepping namelist, though that option must still be set to a valid value. + =Setting this value to 'lfricatm' will not override the method option and the + =app will continue using the setting set in timestepping. +sort-key= +value-titles=LFRic-ATM, CASIM, Boundary Layer +values='lfric_atm', 'casim', 'bl' diff --git a/applications/shallow_water/rose-meta/lfric-shallow_water/version22_30.py b/applications/shallow_water/rose-meta/lfric-shallow_water/version22_30.py new file mode 100644 index 000000000..89cea2c2e --- /dev/null +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-shallow_water + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/shallow_water/rose-meta/lfric-shallow_water/vn3.0/rose-meta.conf b/applications/shallow_water/rose-meta/lfric-shallow_water/vn3.0/rose-meta.conf new file mode 100644 index 000000000..8959ce49e --- /dev/null +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/vn3.0/rose-meta.conf @@ -0,0 +1,136 @@ +import=lfric-gungho/vn3.0 + +[namelist:shallow_water_settings] +compulsory=true +description=Shallow Water miniapp specific settings. +ns=namelist/swe_constants +title=Shallow water equation settings + +[namelist:shallow_water_settings=momentum_form] +compulsory=true +description=Either the momentum or vector invariant form of the shallow water equations. +!enumeration=true +help=Choose either the momentum (advective) form, or the vector inviariant form + =of the shallow water momentum equations. The default setting is vector-invariant. +sort-key= +value-titles=Momentum, Vector-Invariant +values='momentum', 'vector_invariant' + +[!namelist:shallow_water_settings=ref_gp] +compulsory=true +description=Reference geopotential for the shallow water miniapp. +fail-if=this <= 0.0 ; +help=Given by g*H for reference height H and gravity g. +!kind=default +sort-key= +type=real + +[namelist:shallow_water_settings=swe_test] +compulsory=true +description=Initial conditions for the Shallow Water miniapp. +!enumeration=true +fail-if=this == "'swe_geostr_imbalance'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'swe_mountain'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'swe_galewsky'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'swe_thermal_dbl_vortex'" and namelist:base_mesh=geometry == "'spherical'" ; +help=Shallow Water Test Cases + =swe_geostr_balance : Shallow water geostrophic balance test (planar sin wave|spherical Williamson2) + =swe_geostrophic_imbalance : A shallow water wave in geostrophic imbalance (planar) + =swe_gaussian_hill : A single advected gaussian hill for the shallow water equations (planar|spherical) + =swe_mountain : Steady flow perturbed by a mountain (spherical Williamson5) + =swe_galewsky : Barotropic perturbation of steady jet stream (spherical) + =swe_thermal_dbl_vortex : A double vortex for the thermal shallow water equations (planar) + =swe_vortex_field : A vortex field for the shallow water equations (planar/spherical) +sort-key= +value-titles=Shallow Water Geostrophic balance, Shallow Water Geostrophic imbalance, + =Shallow water Gaussian hill, Shallow water mountain, Shallow Water Galewsky, + =Thermal Shallow Water Double vortex, Shallow Water Vortex field +values='swe_geostr_balance', 'swe_geostr_imbalance', 'swe_gaussian_hill', + ='swe_mountain', 'swe_galewsky', 'swe_thermal_dbl_vortex', 'swe_vortex_field' + +[namelist:shallow_water_settings=thermal_swe] +compulsory=true +description=Turns on the thermal shallow water equations. +help=The thermal shallow water equations include the buoyancy. + =This is a switch on whether to use thermal shallow water equations, + =or the usual shallow water equations in the miniapp. +!kind=default +sort-key= +type=logical + +[namelist:shallow_water_settings=time_scheme] +compulsory=true +description=The time stepping method used (semi-implicit or explicit). +!enumeration=true +help=Choose either a semi-implicit or an explicit time stepping scheme + =for the shallow water equations. The semi-implicit scheme is an + =iterative method and has good stability properties. The explicit + =scheme uses Runge-Kutta SSP3 for the time stepping. +sort-key= +value-titles=Semi-Implicit, Explicit SSPRK3, Explicit RK4 +values='semi_implicit', 'ssprk3', 'rk4' + +[namelist:shallow_water_test_coeff] +compulsory=true +description=Shallow Water miniapp Gaussian hill test settings. +ns=namelist/swe_test_coeff +title=Shallow water test cases coefficients + +[!namelist:shallow_water_test_coeff=mag1] +compulsory=true +description=Gaussian hill magnitude. +fail-if=this <= 0.0 ; +help=For Gaussian hill test cases, this sets the inital profile magnitude, + =with the initial profile given by ref_gp + mag * exp(...). +!kind=default +sort-key= +type=real + +[!namelist:shallow_water_test_coeff=u1] +compulsory=true +description=x/zonal velocity magnitude. +help=Initial magnitude of u for the Gaussian hill test case. +!kind=default +sort-key= +type=real + +[!namelist:shallow_water_test_coeff=u2] +compulsory=true +description=y/meridional velocity magnitude. +help=Initial magnitude of v for the Gaussian hill test case. +!kind=default +sort-key= +type=real + +[!namelist:shallow_water_test_coeff=x1] +compulsory=true +description=Gaussian hill centre in x/longitude. +help=Geopotential Gaussian hill centre in x for the Gaussian hill test case. +!kind=default +sort-key= +type=real + +[!namelist:shallow_water_test_coeff=xr] +compulsory=true +description=Gaussian hill extent in x/longitude. +fail-if=this <= 0.0 ; +help=Geopotential Gaussian hill extent in x for the Gaussian hill test case. +!kind=default +sort-key= +type=real + +[!namelist:shallow_water_test_coeff=y1] +compulsory=true +description=Gaussian hill centre in y/latitude. +help=Geopotential Gaussian hill centre in y for Gaussian hill test case. +!kind=default +sort-key= +type=real + +[!namelist:shallow_water_test_coeff=yr] +compulsory=true +description=Gaussian hill extent in y/latitude. +help=Geopotential Gaussian hill extent in y for Gaussian hill test case. +!kind=default +sort-key= +type=real diff --git a/applications/solver/rose-meta/lfric-solver/version22_30.py b/applications/solver/rose-meta/lfric-solver/version22_30.py new file mode 100644 index 000000000..41867c61e --- /dev/null +++ b/applications/solver/rose-meta/lfric-solver/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-solver + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/solver/rose-meta/lfric-solver/versions.py b/applications/solver/rose-meta/lfric-solver/versions.py index 5a3ba41f4..152c043d0 100644 --- a/applications/solver/rose-meta/lfric-solver/versions.py +++ b/applications/solver/rose-meta/lfric-solver/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/applications/solver/rose-meta/lfric-solver/vn3.0/rose-meta.conf b/applications/solver/rose-meta/lfric-solver/vn3.0/rose-meta.conf new file mode 100644 index 000000000..e068d8a6e --- /dev/null +++ b/applications/solver/rose-meta/lfric-solver/vn3.0/rose-meta.conf @@ -0,0 +1,1109 @@ +#============================================================================== +# FINITE ELEMENT +#============================================================================== +#============================================================================== +# SYSTEM SETTINGS +#============================================================================== + +[Submission] +ns=namelist/Job/Submission +sort-key=Section-001 + +#============================================================================== +# ENVIRONMENT VARIABLES AVAILABLE TO ROSE TASK +#============================================================================== +[env] +compulsory=true + +[env=EXEC_NAME] +compulsory=true +description=Program executable name +sort-key=Panel-A01 +type=raw + +[env=OMP_NUM_THREADS] +compulsory=true +description=Number of threads for OpenMP +fail-if=this < 1 ; +range=1: +sort-key=Panel-A03 +type=integer + +[env=TOTAL_RANKS] +compulsory=true +description=Number of process ranks for a parallel run job +fail-if=this < 1 ; +range=1: +sort-key=Panel-A02 +type=integer + +#============================================================================== +# PRIMARY GLOBAL MESH +#============================================================================== +[namelist:base_mesh] +compulsory=true +description=Provides information to define the LFRic infrastructure principle mesh. +help=Lfric must use at least one mesh (prime) to run. + =This panel specifies details of the mesh and its + =configuration. +ns=namelist/Model/Mesh +sort-key=Section-A02 +title=Mesh + +[!namelist:base_mesh=f_lat] +compulsory=false +description=Latitude for F-plane + =approximation [rad]. +expression=namelist:base_mesh=f_lat_deg * source:constants_mod=PI / 180.0_r_def +help=Pre-set latitude for F-plane approximation [Radians]. The F-plane approximation + =is use to calculate the Coriolis operator, where the Coriolis parameter, f, is + =assumed to be invariant with latitude. + = +!kind=default +type=real + +[namelist:base_mesh=f_lat_deg] +compulsory=true +description=?????? +fail-if=this < -90.0 ; + =this > 90.0 ; +help=?????? + =?????? +!kind=default +range=-90.0:90.0 +sort-key=Panel-A06 +type=real + +[namelist:base_mesh=file_prefix] +compulsory=true +description=Location of 2D mesh input file(s) (prefix). +help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should + =be conformant to UGRID convention and must contain at least one mesh topology, the prime mesh. + = + =This variable is the file name (or path) prefix the mesh input file(s). If the meshes have + =been prepartitioned (namelist:base_mesh=prepartitioned = .true.) to match the intended + =distributed memory deployment of the application, each process rank of the run will load + =the mesh file given by: + = + = __.nc + = + =which will contain data to directly populate the required . Otherwise, a + = will be partitioned at runtime and the model will attempt to load: + = + = .nc + = + =Note: Should prepartitioned meshes be employed, the mesh input file(s) should have + = been created specifying the same number of partitions as ranks in the intended + = run. + = +sort-key=Panel-A01 +!string_length=filename +type=character +url=http://ugrid-conventions.github.io/ugrid-conventions + +[namelist:base_mesh=fplane] +compulsory=true +description=?????? +fail-if=this == true and namelist:base_mesh=geometry == "'spherical'" +help=Plane has constant f (omega) + =fplane can not be true when nature = spherical +!kind=default +sort-key=Panel-A05 +type=logical + +[namelist:base_mesh=geometry] +compulsory=true +description=The geometry on which the domain is embedded +!enumeration=true +fail-if=this == "'spherical'" and namelist:base_mesh=topology == "'fully_periodic'" and namelist:partitioning=partitioner != "'cubedsphere'" and namelist:base_mesh=prepartitioned == ".false." ; + =this == "'planar'" and namelist:partitioning=partitioner != "'planar'" and namelist:base_mesh=prepartitioned == ".false." ; +help=Along with topology this describes the domain. The geometry is the shape + =on which the domain is embedded. This is currently either 'spherical' or + ='planar'. +sort-key=Panel-A03 +value-titles=Planar, Spherical +values='planar', 'spherical' + +[namelist:base_mesh=prepartitioned] +compulsory=true +description=Load pre-partitioned local meshes +help=Input mesh files may contain global meshes whose extents are intended to cover + =the entire model domain. These may require partitioning in to a number of local + =meshes (1 per processor rank) at runtime depending on the number of ranks + =requested to run the model. + = + =Prepartitioned meshes would be beneficial in cases were the number of ranks for + =the model run seldom change. + = + =If prepartitioned meshes are not used the model will expect global meshes + =in the mesh input file to be partitioned at model runtime. + = + =Note: With increasing mesh size, at some point prepartitioned meshes may become + = necessary. + = +sort-key=Panel-A04a +trigger=namelist:partitioning: .false. ; +type=logical + +[namelist:base_mesh=prime_mesh_name] +compulsory=true +description=Tag-name for prime-mesh +help=Mesh topologies are held in UGRID conformant NetCDF files. It is + =possible that the mesh files in this format may contain more than + =one mesh topology. This tag-name identifies the mesh topology to + =use from the mesh file namelist:base_mesh=filename. +sort-key=Panel-A02 +!string_length=default +type=character + +[namelist:base_mesh=topology] +compulsory=true +description=Describes the periodicity of the domain. +!enumeration=true +fail-if=this != "'fully_periodic'" and namelist:partitioning=partitioner == "'cubedsphere'" ; +help=Together with the geometry this describes the domain. The topology is the + =periodicity of the base mesh. A mesh over the whole globe would have + =spherical geometry and fully_periodic topology, while a limited-area model + =on the sphere would have spherical geometry and non_periodic topology. +sort-key=Panel-A07 +value-titles=Fully-periodic, Non-periodic +values='fully_periodic', 'non_periodic' + +#============================================================================== +# 2D MESH EXTRUSION +#============================================================================== +[namelist:extrusion] +compulsory=true +description=Settings for the selected vertical mesh extrusion method. +help=Settings for the uniform, quadratic, geometric and DCMIP mesh extrusion + =profiles to extrude 2D to 3D mesh using non-dimensional vertical coordinate. +ns=namelist/Model/Mesh/Extrusion +sort-key=Section-A03 + +[namelist:extrusion=domain_height] +compulsory=true +description=Domain height [m] +fail-if=this < 0.0 ; +help=Height of the model domain from a flat planet surface. + =Height of planet surface taken as: + = * For Cartesian domain: 0m + = * For Spherical domain: namelist:extrusion=planet_radius +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:extrusion=method] +compulsory=true +description=Extrusion method +!enumeration=true +fail-if=this == 'um_L85_50t_35s_85km' and namelist:extrusion=number_of_layers != 85 ; + =this == 'um_L70_61t_9s_40km' and namelist:extrusion=number_of_layers != 70 ; + =this == 'um_L120_99t_21s_40km' and namelist:extrusion=number_of_layers != 120 ; + =this == 'um_L140_122t_18s_40km' and namelist:extrusion=number_of_layers != 140 ; +help=Available extrusion methods are (\f$n$ is number of layers): + =1) Uniform grid spacing (\f$\frac{k}{n}\f$); + =2) Quadratic grid spacing (\f$\frac{k}{n}^2\f$); + =3) Geometric grid spacing (\f$d\eta = \frac{(s - 1)}{(s^{n} - 1)}$) + = with stretching factor prescribed (\f$s=1.03$); + =4) DCMIP grid spacing (Ullrich et al. (2012) DCMIP documentation, Appendix F.2.) + = with flattening parameter prescribed. + =5) L38 40km UM specific spacing; + =6) L70 80km UM specific spacing; + =7) L85 85km UM specific spacing; + =8) L70 40km UM specific eta spacing; + =9) L120 40km UM specific eta spacing; + =10) L140 40km UM specific eta spacing +sort-key=Panel-A01 +value-titles=Uniform, Quadratic, Geometric, DCMIP, + = um_L38_29t_9s_40km, um_L70_50t_20s_80km, um_L85_50t_35s_85km, um_L70_61t_9s_40km, + = um_L120_99t_21s_40km, um_L140_122t_18s_40km +values='uniform', 'quadratic', 'geometric', 'dcmip', + ='um_L38_29t_9s_40km', 'um_L70_50t_20s_80km', 'um_L85_50t_35s_85km', 'um_L70_61t_9s_40km', + ='um_L120_99t_21s_40km', 'um_L140_122t_18s_40km' + +[namelist:extrusion=number_of_layers] +compulsory=true +description=Number of layers in the vertical +fail-if=this < 1 ; +help=Setting for number of layers of 3D-mesh in vertical. +!kind=default +range=1: +sort-key=Panel-A03 +type=integer + +[namelist:extrusion=planet_radius] +compulsory=true +description=[m] +fail-if=this <= 0.0 ; +help=?????? + =?????? +!kind=default +ns=namelist/Model/Planet/Properties +range=0.0: +sort-key=Panel-A02 +type=real + +#============================================================================== +# FINITE ELEMENT +#============================================================================== +[namelist:finite_element] +compulsory=true +description=Settings to define the choice of finite elements used +help=Settings to define which finite elements create the function spaces used + =in the model +ns=namelist/Model/Finite element +sort-key=Section-A01 +title=Finite element + +[namelist:finite_element=cellshape] +compulsory=true +description=The base shape of the elements forming the 2d mesh before extrusion + =into prisms in 3d +!enumeration=true +fail-if=this != "'quadrilateral'" ; +help=Current infrastructure requires that the cellshape is 'quadrilateral' +sort-key=Panel-A01 +value-titles=Triangluar, Quadrilateral +values='triangle', 'quadrilateral' + +[namelist:finite_element=coord_order] +compulsory=true +description=Order of the coordinate space. +fail-if=this < 0 ; +help=Order of the coordinate space. If 0 is chosen, this will be the continuous + =W0 space, with the order set by the element order. This option is only + =possible for certain geometries and topologies. Otherwise, this will be + =a discontinuous space. +!kind=default +range=0: +sort-key=Panel-A03 +type=integer + +[namelist:finite_element=coord_system] +compulsory=true +description=The coordinate system that will be stored in the chi coordinate + =fields used for computations throughout the model. +!enumeration=true +fail-if= +help=Select 'xyz' to run the model in global Cartesian coordinates. + =Otherwise use 'native' to run with the coordinate system native to the + =mesh being used. For instance, this will use the (alpha,beta,height) + =system with cubed-sphere meshes and the (longitude,latitude,height) system + =with spherical limited-area models. For the (alpha,beta,height) and + =(longitude,latitude,height) systems, the third coordinate field is given by + =height = radius - planet radius +sort-key=Panel-A04 +value-titles='(X,Y,Z)', 'Native' +values='xyz', 'native' + +[namelist:finite_element=element_order_h] +compulsory=true +description=The polynomial order of the set of compatible finite element in the + =horizontal +fail-if=this < 0 ; +help=This is the polynomial order of the L2 (W3) space in the horizontal + =direction, and is used to set the polynomial order for other finite element + =spaces. In most cases is equal to element_order_v. +!kind=default +range=0:9 +sort-key=Panel-A02 +type=integer + +[namelist:finite_element=element_order_v] +compulsory=true +description=The polynomial order of the set of compatible finite element in the + =vertical +fail-if=this < 0 ; +help=This is the polynomial order of the L2 (W3) space in the vertical + =direction, and is used to set the polynomial order for other finite element + =spaces. In most cases is equal to element_order_h. +!kind=default +range=0:9 +sort-key=Panel-A02 +type=integer + +[!namelist:finite_element=nqp_h_exact] +compulsory=false +expression=namelist:finite_element=element_order_h+3 +help=Number of quadrature points needed to exactly integrate a product of test & + = trial functions with a linear Jacobian in the horizontal direction +!kind=default +sort-key=Panel-A05 +type=integer + +[!namelist:finite_element=nqp_v_exact] +compulsory=false +expression=namelist:finite_element=element_order_v+3 +help=Number of quadrature points needed to exactly integrate a product of test & + = trial functions with a linear Jacobian in the vertical direction +!kind=default +sort-key=Panel-A05 +type=integer + +[namelist:finite_element=rehabilitate] +compulsory=true +description=Option to switch on rehabilitation to modify the mapping for the W3 + =space. +help=Rehabilitation is the modification of mapping for + =the W3 space and the divergence mapping so that + =the correct order of accuracy is maintained on + =non-affine elements. For affine elements it is not + =required. This is included here as in the future + =we wish to move to not rehabilitating +!kind=default +sort-key=Panel-A06 +type=logical + +[namelist:finite_element=vorticity_in_w1] +compulsory=true +description=Option to compute the vorticity in W1 (or implied W2) space +help=Compute the vorticity in W1 (or implied W2) space +!kind=default +sort-key=Panel-A07 +type=logical + +#============================================================================== +# DYNAMICS +#============================================================================== +# +#============================================================================== +# FORMULATION +#============================================================================== +[namelist:formulation] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +ns=namelist/Science/Dynamics +sort-key=Section-A07 +title=Dynamics + +[namelist:formulation=l_multigrid] +compulsory=true +description=Enable Multi-Grid +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A01 +trigger=namelist:multigrid: .true. ; +type=logical + +[namelist:formulation=use_multires_coupling] +compulsory=true +description=Enable use of multiple meshes for coupling +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A02 +trigger=namelist:multires_coupling: .true. ; +type=logical + +#============================================================================== +# SYSTEM LOGGING +#============================================================================== +[namelist:logging] +compulsory=true +ns=namelist/Job/IO/System + +[namelist:logging=log_to_rank_zero_only] +compulsory=true +description=Only log to a single rank, defined as rank zero +ns=namelist/Job/IO/System +sort-key=Panel-A02 +type=logical + +[namelist:logging=run_log_level] +compulsory=true +description=Logging level for run +!enumeration=true +help=Determines the severity of logging messages which are sent to standard + =output. Error levels are cumulative in severity: + = + = * Trace + = * Debugging + = * Information + = * Warning + = * Error + = + =e.g. Setting the log level to "Information" will mean log messages + =related to information,warnings and errors will be reported to + =standard output at runtime. + = +ns=namelist/Job/IO/System +sort-key=Panel-A01 +value-titles=Error, Warning, Information, Debugging, Trace +values='error','warning','info','debug','trace' + +[namelist:mixing] +compulsory=false +description=Subgrid mixing scheme options +help=Currently available schemes are: + =_________________________________________________________________ + =Constant viscosity: + = applied to theta & u, v, w + =_________________________________________________________________ + =Smagorinsky mixing scheme: + = applied to theta, moisture (water vapour and cloud liquid), + = u, v and w +!kind=default +ns=namelist/Science/Dynamics/Mixing +sort-key=Section-A05 + +[namelist:mixing=method] +compulsory=true +description=Smagorinsky subgrid mixing scheme option +!enumeration=true +help=Options for Smagorinsky subgrid mixing scheme: + =_________________________________________________________________ + =3D Smag + = Smagorinsky mixing scheme applied in horizontal and vertical. + =_________________________________________________________________ + =2D Smag + 1D BL + = Smagorinsky mixing scheme applied in horizontal. + = 1D BL scheme used in the vertical. + =_________________________________________________________________ + =Blended scheme + = Blended BL-Smagorinsky diffusion coefficient used for + = subgrid mixing in horizontal and vertical. + = + = WARNING: This option currently does not conserve energy and as + = a result may be unstable. +sort-key=Panel-A05 +value-titles=3D Smagorinsky, 2D Smagorinsky + 1D BL, Blended scheme +values='3d_smag', '2d_smag', 'blending' + +[namelist:mixing=mix_factor] +compulsory=true +description=Smagorinsky mixing length constant +help=Smagorinsky mixing length constant, typical value is 0.2 +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:mixing=smagorinsky] +compulsory=true +description=Enable Smagorinsky mixing +help=Apply Smagorinsky mixing to theta, + = moisture (water vapour and cloud liquid), u, v and w + = + = NOTE: As in the current UM implementation of Smagorinsky mixing, + = the stress terms have been implemented purely as diffusion terms. + = This results in a missing term, as described in UMDP28. + = + = WARNING: Current implementation assumes a Cartesian mesh. +!kind=default +sort-key=Panel-A03 +trigger=namelist:mixing=method: .true. ; + =namelist:mixing=mix_factor: .true. ; +type=logical + +#============================================================================== +# MIXING: Namelist Members +#============================================================================== +[namelist:mixing=viscosity] +compulsory=true +description=?????? +help=Apply constant viscosity to theta & u, v, w +!kind=default +sort-key=Panel-A01 +type=logical + +[namelist:mixing=viscosity_mu] +compulsory=true +description=?????? +help=Viscosity constant to use +!kind=default +sort-key=Panel-A02 +type=real + +#================= +# Multigrid Mesh = +#================= +#============================================================================== +# MULTIGRID +#============================================================================== +[namelist:multigrid] +compulsory=true +description=?????? +help=?????? + =?????? +ns=namelist/Science/Dynamics/multigrid +sort-key=Section-A06 +title=Multi-grid + +[namelist:multigrid=chain_mesh_tags] +!bounds=namelist:multigrid=multigrid_chain_nitems +compulsory=true +description=Meshes for function space chain. +fail-if=len(this) != namelist:multigrid=multigrid_chain_nitems ; +help=This is an ordered list of mesh names as loaded from the mesh + =input file. It is expected that the mesh input file will contain + =the correct intergrid maps betwen subsequent meshes in the chain. + = +length=: +sort-key=Panel-A04 +!string_length=default +type=character + +[namelist:multigrid=multigrid_chain_nitems] +compulsory=true +description=Number of items in multigrid function space chain +fail-if=this < 1 ; +help=?????? + =?????? +!kind=default +range=1: +sort-key=Panel-A02 +type=integer + +[namelist:multigrid=n_coarsesmooth] +compulsory=false +type=integer + +[namelist:multigrid=n_postsmooth] +compulsory=false +type=integer + +[namelist:multigrid=n_presmooth] +compulsory=false +type=integer + +[namelist:multigrid=smooth_relaxation] +compulsory=false +type=real + +#============================================================================== +# MULTIRESOLUTION COUPLING (e.g. Physics-Dynamics-Chemistry) +#============================================================================== +[namelist:multires_coupling] +compulsory=false +description=This namelist specifies options for running different model + =components on different meshes +help=This namelist provides different modes and meshes for running the coupling + =miniapp +ns=namelist/Science/Dynamics/multires_coupling +sort-key=Section-A07 +title=Multires-Coupling + +[namelist:multires_coupling=dynamics_mesh_name] +compulsory=false +description=Tag-name for mesh used by dyanamics +help=This is the mesh on which the dynamical core is run +sort-key=Panel-A02 +!string_length=default +type=character + +[namelist:multires_coupling=multires_coupling_mesh_tags] +compulsory=false +description=List of mesh tag-names for the meshes used in the coupling miniapp +help=This is an ordered list of mesh names as loaded from the mesh + =input file for the coupling miniapp. It is expected that the mesh + =input file will contain the required intergrid maps between the meshes +length=: +sort-key=Panel-A01 +!string_length=default +type=character + +[namelist:multires_coupling=multires_coupling_mode] +compulsory=false +description=Describes the mode in which the coupling miniapp will be run +!enumeration=true +help=Test - a simple test case to test miniapp capabilities + =Jnr-Snr - dynamics and physics at a fine resolution coupled + =with dynamics, physics and chemistry at a coarse resolution + =Physics-Dynamics - physics and dynamics run at different resolutions + =and coupled together +sort-key=Panel-A05 +value-titles=Test, Jnr-Snr, Physics-Dynamics +values='test', 'jnr_snr', 'physics_dynamics' + +[namelist:multires_coupling=output_mesh_name] +compulsory=false +description=Tag-name for mesh used for outputting diagnostics +help=This is the mesh on which fields will be output. Any fields not native to + =this mesh will be mapped to this mesh for outputting. +sort-key=Panel-A03 +!string_length=default +type=character + +[namelist:multires_coupling=physics_mesh_name] +compulsory=false +description=Tag-name for mesh used by physics +help=This is the mesh on which the physics parametrisations are run +sort-key=Panel-A04 +!string_length=default +type=character + +#============================================================================== +# GLOBAL MESH PARTITIONING +#============================================================================== +[namelist:partitioning] +compulsory=true +description=Global mesh panel partitioning. +help=For parallel computing, the 2D global mesh is divided up into partitions. + =Each process rank runs an instance of the model on one partition. The + =partition decompostion is specified on a `per panel` basis. + =i.e. The cubedsphere has six panels; the planar mesh has one panel. +ns=namelist/Model/Mesh/Partitioning +sort-key=Section-A02 + +[namelist:partitioning=coarsen_multigrid_tiles] +compulsory=false +description=Reduce x and y tile sizes by a factor of 2 in each multigrid level +help=Enables using larger tiles at higher resolution levels by automatically + =reducing tile sizes in coarser levels, which can improve performance. +sort-key=Panel-A10 +type=logical + +[namelist:partitioning=generate_inner_halos] +compulsory=true +description=Generate inner halo regions +help=In order to overlap comms & compute, the owned cells are reordered + =so that they consist of a number of layers of inner halos. These owned + =cells correspond to the halo cells on neighbouring MPI regions. +sort-key=Panel-A05 +type=logical + +[namelist:partitioning=inner_halo_tiles] +compulsory=false +description=Tile inner halos separately from partition interior. +help=Tiling inner halos separately from the partition interior guarantees + =that tiles never cross the boundary between interior and inner halo, + =which can be useful when overlapping communication and computation. +sort-key=Panel-A08 +type=logical + +[namelist:partitioning=max_tiled_multigrid_level] +compulsory=false +description=Coarsest multigrid level to be tiled +help=Revert to 1x1 tiling (equivalent to colouring) for multigrid levels + =above this threshold (level 1 has highest resolution); tiling is + =typically more beneficial for higher resolutions. +range=1: +sort-key=Panel-A09 +type=integer + +[namelist:partitioning=panel_decomposition] +compulsory=true +description=Panel partition decomposition +!enumeration=true +help=Partitioner will attempt to generate partitioned panels based + =on the given enumeration choices: + = + = * auto: Decompose domain as close to square decompositions. + = * row: Single row of partitions. + = * column: Single column of partitions. + = * custom: x/y decompositions explicitly requested using + = namelist:partitioning=panel_xproc, + = namelist:partitioning=panel_yproc. + = * auto_nonuniform: As auto but allow columns of partitions + = of differing heights. + = * guided_nonuniform: Partition into columns according to + = namelist:partitioning=panel_xproc but of different heights + = +!kind=default +sort-key=Panel-A01 +trigger=namelist:partitioning=panel_xproc: this == "'custom'" or this == "'guided_nonuniform'" ; + =namelist:partitioning=panel_yproc: this == "'custom'" ; +value-titles=Auto, Single row, Single column, Custom, Auto nonuniform, Guided nonuniform +values='auto', 'row', 'column', 'custom', 'auto_nonuniform', 'guided_nonuniform' + +[namelist:partitioning=panel_xproc] +compulsory=true +description=Panel partitions in x-direction +fail-if=this < 1 ; + =(env=TOTAL_RANKS == 1) and (this != 1) ; + =(env=TOTAL_RANKS != 1) and (namelist:base_mesh=geometry=="'spherical'") and ( this*namelist:partitioning=panel_yproc != env=TOTAL_RANKS/6 ) ; + =(env=TOTAL_RANKS != 1) and (namelist:base_mesh=geometry=="'planar'") and ( this*namelist:partitioning=panel_yproc != env=TOTAL_RANKS ) ; +help=Number of partitions to generate across the x-direction of a panel of the mesh +!kind=default +range=1: +sort-key=Panel-A02 +type=integer + +[namelist:partitioning=panel_yproc] +compulsory=true +description=Panel partitions in y-direction +fail-if=this < 1 ; + =(env=TOTAL_RANKS == 1) and (this != 1) ; + =(env=TOTAL_RANKS != 1) and (namelist:base_mesh=geometry=="'spherical'") and ( this*namelist:partitioning=panel_xproc != env=TOTAL_RANKS/6 ) ; + =(env=TOTAL_RANKS != 1) and (namelist:base_mesh=geometry=="'planar'") and ( this*namelist:partitioning=panel_xproc != env=TOTAL_RANKS ) ; +help=Number of partitions to generate across the y-direction of a panel of the mesh +!kind=default +range=1: +sort-key=Panel-A03 +type=integer + +[namelist:partitioning=partitioner] +compulsory=true +description=?????? +!enumeration=true +fail-if=this == "'cubedsphere'" and not ( namelist:base_mesh=geometry == "'spherical'" and namelist:base_mesh=topology == "'fully_periodic'" ); + =this == "'cubedsphere'" and not ( env=TOTAL_RANKS % 6 == 0 or env=TOTAL_RANKS == 1 ) ; +help=?????? + =?????? +sort-key=Panel-A04 +value-titles=Planar, Cubedsphere +values='planar', 'cubedsphere' + +[namelist:partitioning=tile_size_x] +compulsory=false +description=Tile size (number of cells) in x-direction +help=Tiling reorders computation of cells in the horizontal mesh to maximise + =processor cache reuse. It is currently only available for partitioned + =meshes and where mesh partitions have a rectangular shape. Tiles sizes + =along partition borders are automatically adjusted to fit, but sizes that + =are larger than partition dimensions are not accepted. +range=1: +sort-key=Panel-A06 +type=integer + +[namelist:partitioning=tile_size_y] +compulsory=false +description=Tile size (number of cells) in y-direction +help=Tiling reorders computation of cells in the horizontal mesh to maximise + =processor cache reuse. It is currently only available for partitioned + =meshes and where mesh partitions have a rectangular shape. Tiles sizes + =along partition borders are automatically adjusted to fit, but sizes that + =are larger than partition dimensions are not accepted. +range=1: +sort-key=Panel-A07 +type=integer + +#============================================================================== +# PLANET +#============================================================================== +[namelist:planet] +compulsory=true +description=?????? +help=?????? + =?????? +ns=namelist/Model/Planet +sort-key=Section-A03 + +[namelist:planet=cp] +compulsory=true +description=[J/(kg K)] +fail-if=this <= 0.0 ; +help=Specific heat of dry air at constant pressure [J/(kg K)] +!kind=default +ns=namelist/Model/Planet/Properties +range=0.0: +sort-key=Panel-A05 +type=real + +[!namelist:planet=cv] +compulsory=false +expression=namelist:planet=cp - namelist:planet=rd +help=Specific heat of dry air at constant volume [J/(kg K)] +!kind=default +type=real + +[!namelist:planet=epsilon] +compulsory=false +description=Ratio of molecular weights: dry air / water +expression=namelist:planet=rd / source:driver_water_constants_mod=gas_constant_h2o +help=Molecular weight of water divided by molecular weight of dry air. + =[dimensionless] +!kind=default +type=real + +[namelist:planet=gravity] +compulsory=true +description=[m/(s^2)] +fail-if=this <= 0.0 ; +help=Surface equatorial value of gravity [m/s^2] +!kind=default +ns=namelist/Model/Planet/Properties +range=0.0: +sort-key=Panel-A01 +type=real + +[!namelist:planet=kappa] +compulsory=false +expression=namelist:planet=rd / namelist:planet=cp +help=Ratio of Rd and Cp [dimensionless] +!kind=default +type=real + +[namelist:planet=omega] +compulsory=true +description=[units?] +help=?????? + =?????? +!kind=default +ns=namelist/Model/Planet/Properties +sort-key=Panel-A03 +type=real + +[namelist:planet=p_zero] +compulsory=true +description=[Pa] +help=Reference surface pressure [Pa] +!kind=default +ns=namelist/Model/Planet/Properties +sort-key=Panel-A06 +type=real + +[namelist:planet=rd] +compulsory=true +description=[J/(kg K)] +help=Gas constant for dry air [J/(kg K)] +!kind=default +ns=namelist/Model/Planet/Properties +sort-key=Panel-A04 +type=real + +[!namelist:planet=recip_epsilon] +compulsory=false +expression=source:driver_water_constants_mod=gas_constant_h2o / namelist:planet=rd +help=Reciprocal of ratio molecular mass of water to dry air. + =[dimensionless] +!kind=default +type=real + +[!namelist:planet=scaled_omega] +compulsory=false +expression=namelist:planet=omega * namelist:planet=scaling_factor +help=?????? + =?????? +!kind=default +type=real + +[!namelist:planet=scaled_radius] +compulsory=false +expression=namelist:extrusion=planet_radius / namelist:planet=scaling_factor +help=?????? + =?????? +!kind=default +type=real + +[namelist:planet=scaling_factor] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +sort-key=Panel-A07 +type=real + +#============================================================================== +# MASS MATRIX SOLVER +#============================================================================== +[namelist:solver] +compulsory=true +description=?????? +help=This namelist is for using iteratives solvers for the inversion of mass matrices +ns=namelist/Science/Dynamics/Mass Matrix Solver +sort-key=Section-A04 + +[namelist:solver=fail_on_non_converged] +compulsory=true +description=Cause the solver to return an error if the maximum number of iterations are reached and + =residual has not been reduced below the desired tolerance otherwise the solver will exit even + =if it has not converged. If monitor_convergence is set to false then this setting has no effect +help=Return an error if solver fails to converge +sort-key=Panel-A07 +type=logical + +[namelist:solver=gcrk] +compulsory=true +description=?????? +help=Dimension of the approximate Krylov subspace. + =In other words, it is the number of potential + =residual vectors to calculate at each + =iteration of the solver. +!kind=default +sort-key=Panel-A05 +type=integer + +[namelist:solver=jacobi_relaxation] +compulsory=true +description=?????? +help=Relaxtion factor to use in the Jacobi solver +!kind=default +sort-key=Panel-A11 +type=real + +[namelist:solver=maximum_iterations] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=Iteration limit for solver +!kind=default +range=1: +sort-key=Panel-A02 +type=integer + +[namelist:solver=method] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +sort-key=Panel-A01 +trigger=namelist:solver=jacobi_relaxation: this == "'jacobi'"; +value-titles=biconjugate gradient stabilized, + =conjugate gradient, + =generalized conjugate residual, + =generalized minimal residual, + =flexible generalized minimal residual, + =precondition only, + =jacobi +values='bicgstab', 'cg', 'gcr', 'gmres', 'fgmres', 'prec_only', 'jacobi' + +[namelist:solver=monitor_convergence] +compulsory=true +description=Computes and prints out convergence information for the iterative solver and if the + =error has been reduced below the tolerance then the solver will exit. If set to false + =the solver will always perform the maximum number of iterations before exiting +help=Monitor convergence of the iterative mass matrix solver +sort-key=Panel-A06 +trigger=namelist:solver=fail_on_non_converged: .true.; +type=logical + +[namelist:solver=preconditioner] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +sort-key=Panel-A04 +value-titles=None, Diagonal +values='none', 'diagonal' + +[namelist:solver=tolerance] +compulsory=true +description=?????? +help=Relative tolerance of solver +!kind=default +sort-key=Panel-A03 +type=real + +#============================================================================== +# SUBGRID +#============================================================================== +[namelist:subgrid] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Science/Dynamics/Subgrid +sort-key=Section-A09 + +[namelist:subgrid=dep_pt_stencil_extent] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=?????? + =?????? +!kind=default +range=1: +sort-key=Panel-A02 +type=integer + +#============================================================================== +# TRANSPORT +#============================================================================== +[namelist:transport] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Science/Dynamics/Transport +sort-key=Section-A10 + +[namelist:transport=consistent_metric] +compulsory=true +description=?????? +fail-if= +help=Compute metric terms with the advection scheme +!kind=default +sort-key=Panel-A05 +trigger= +type=logical + +[namelist:transport=enforce_monotonicity] +compulsory=true +description=?????? +fail-if= +help=Enforce monotonicity with Method of Lines advection +!kind=default +sort-key=Panel-A06 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +type=logical + +[namelist:transport=fv_advective_order] +compulsory=true +description=?????? +fail-if= +help=?????? + =?????? +!kind=default +!range= +sort-key=Panel-A04 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +type=integer + +[namelist:transport=fv_flux_order] +compulsory=true +description=?????? +fail-if= +help=?????? + =?????? +!kind=default +!range= +sort-key=Panel-A03 +trigger= +type=integer + +[namelist:transport=oned_reconstruction] +compulsory=true +description=Control use of 1D or 2D polynomial reconstruction of tracer fields + =for the method of lines advection scheme +fail-if= +help=Use 1D or 2D horizontal reconstruction +!kind=default +sort-key=Panel-A07 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +type=logical + +[namelist:transport=operators] +compulsory=false +description=?????? +!enumeration=true +fail-if= +help=?????? + =?????? +sort-key=Panel-A02 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +value-titles=Finite volume, Finite element +values='fv', 'fem' + +[namelist:transport=scheme] +compulsory=true +description=?????? +!enumeration=true +fail-if= +help=Method of lines : Uses Runge-Kutta SSP3 for time integration of fluxes + =Cosmic horizontal : Cosmic transport scheme in the horizontal + =Cosmic YZ (biperiodic) : Cosmic transport scheme for a Y-Z slice of (biperiodic mesh) + =Cosmic 3D : 3D Cosmic transport for biperiodic and cubed-sphere mesh +sort-key=Panel-A01 +value-titles=Method of lines, Cosmic horizontal, Cosmic YZ (biperiodic), Cosmic 3D +# = namelist:transport=operators: this == "'method_of_lines'" ; +# = namelist:transport=fv_advective_order: this == "'method_of_lines'" ; +# = namelist:transport=enforce_monotonicity: this == "'method_of_lines'" ; +#trigger= namelist:subgrid: this != "'method_of_lines'" ; +# = namelist:biperiodic_deppt: this != "'method_of_lines'" ; +# = namelist:transport=operators: this == "'method_of_lines'" ; +# = namelist:transport=fv_advective_order: this == "'method_of_lines'" ; +# = namelist:transport=enforce_monotonicity: this == "'method_of_lines'" ; +# = namelist:transport=oned_reconstruction: this == "'method_of_lines'" ; +values='method_of_lines', 'horz_cosmic', 'yz_bip_cosmic', 'cosmic_3D' diff --git a/applications/transport/rose-meta/lfric-transport/version22_30.py b/applications/transport/rose-meta/lfric-transport/version22_30.py new file mode 100644 index 000000000..dfd319133 --- /dev/null +++ b/applications/transport/rose-meta/lfric-transport/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-transport + # Blank Upgrade Macro + return config, self.reports diff --git a/applications/transport/rose-meta/lfric-transport/versions.py b/applications/transport/rose-meta/lfric-transport/versions.py index b8b11ee33..152c043d0 100644 --- a/applications/transport/rose-meta/lfric-transport/versions.py +++ b/applications/transport/rose-meta/lfric-transport/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/applications/transport/rose-meta/lfric-transport/vn3.0/rose-meta.conf b/applications/transport/rose-meta/lfric-transport/vn3.0/rose-meta.conf new file mode 100644 index 000000000..415a675d9 --- /dev/null +++ b/applications/transport/rose-meta/lfric-transport/vn3.0/rose-meta.conf @@ -0,0 +1,125 @@ +import=lfric-gungho/vn3.0 + +#============================================================================== +# INITIAL TRACER FIELD +#============================================================================== +[namelist:initial_tracer_field] +compulsory=true +description=Namelist options to set up the tracer fields in the transport miniapp. +help=?????? + =?????? +!kind=default +ns=namelist/Job/Initial conditions/Tracer +sort-key=Section-A03 + +[namelist:initial_tracer_field=field_background] +compulsory=true +description=Background value of the tracer field. +fail-if=this < 0.0 ; +help=Background value of tracer. The tracer value away from the + =set tracer function, usually the minimum tracer value. +!kind=default +range=0.0: +sort-key=Panel-A03 +type=real + +[namelist:initial_tracer_field=field_max] +compulsory=true +description=Maximum value of tracer field function. +fail-if=this < 0.0 ; +help=The maximum value of the tracer field function. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:initial_tracer_field=r1] +compulsory=true +description=Radius of initial tracer field function. +fail-if=this < 0.0 ; +help=Radius for one of the pair of initial tracer field functions + =Biperiodic domain: in metres. + =Cubed sphere domain: in radians. +!kind=default +range=0.0: +sort-key=Panel-A04 +type=real + +[namelist:initial_tracer_field=r2] +compulsory=true +description=Radius of second initial tracer field function. +fail-if= +help=Radius parameter for the second of the pair of initial tracer field functions (see r1) +!kind=default +!range= +sort-key=Panel-A08 +trigger= +type=real + +[namelist:initial_tracer_field=x1] +compulsory=true +description=Centre in long/x of tracer field function. +help=Position for one of the pair of initial tracer field functions + =Biperiodic domain: centre of the function given in terms of metres in the chi1 direction. + =Cubed sphere domain: longitudinal position of the centre of the function (a value between 0 and \f$2\pi\f$). +!kind=default +sort-key=Panel-A05 +trigger= +type=real + +[namelist:initial_tracer_field=x2] +compulsory=true +description=Centre in long/x of second tracer field function. +fail-if= +help=Position parameter for the second of the pair of initial tracer field functions (see x1) +!kind=default +!range= +sort-key=Panel-A09 +trigger= +type=real + +[namelist:initial_tracer_field=y1] +compulsory=true +description=Centre in lat/y of tracer field function. +fail-if= +help=Position for one of the pair of initial tracer field functions + =Biperiodic domain: centre of the function given in terms of metres in the chi2 direction. + =Cubed sphere domain: latitudinal position of the centre of the function (a value between \f$-\pi/2\f$ and \f$\pi/2\f$). +!kind=default +!range= +sort-key=Panel-A06 +trigger= +type=real + +[namelist:initial_tracer_field=y2] +compulsory=true +description=Centre in lat/y of second tracer field function. +fail-if= +help=Position parameter for the second of the pair of initial tracer field functions (see y1) +!kind=default +!range= +sort-key=Panel-A10 +trigger= +type=real + +[namelist:initial_tracer_field=z1] +compulsory=true +description=Centre in height of tracer field function. +fail-if= +help=Centre height position for one of the pair of initial tracer field functions +!kind=default +!range= +sort-key=Panel-A07 +trigger= +type=real + +[namelist:initial_tracer_field=z2] +compulsory=true +description=Centre in height of second tracer field function. +fail-if= +help=Centre height position for one of the pair of initial tracer field functions +!kind=default +!range= +sort-key=Panel-A11 +trigger= +type=real diff --git a/dependencies.yaml b/dependencies.yaml index e93d7dd71..caab36487 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -19,11 +19,11 @@ casim: source: git@github.com:MetOffice/casim.git - ref: 2ba0206692232f77729564b1202c4cdfbc6ccfef + ref: 2025.12.1 jules: source: git@github.com:MetOffice/jules.git - ref: 486cb11e0a50c19d9ebca142a58eef625365216a + ref: 2025.12.1 lfric_apps: source: @@ -31,24 +31,24 @@ lfric_apps: lfric_core: source: git@github.com:MetOffice/lfric_core.git - ref: 224c1cc82271261803fcc82a454894ea471d4378 + ref: 2025.12.1 moci: source: git@github.com:MetOffice/moci.git - ref: 81951fdeddc2f1bf2e5be47f46cddba4495cf76d + ref: 2025.12.1 SimSys_Scripts: source: git@github.com:MetOffice/SimSys_Scripts.git - ref: main + ref: 2025.12.1 socrates: source: git@github.com:MetOffice/socrates.git - ref: 1ca8a94091dde17b37fceba188f97fbbef229246 + ref: 2025.12.1 socrates-spectral: source: git@github.com:MetOffice/socrates-spectral.git - ref: main + ref: 2025.12.1 ukca: source: git@github.com:MetOffice/ukca.git - ref: d0fe6eeb09d38828093ca2f339252e3a823ce749 + ref: 2025.12.1 diff --git a/interfaces/coupled_interface/rose-meta/coupling/version22_30.py b/interfaces/coupled_interface/rose-meta/coupling/version22_30.py new file mode 100644 index 000000000..bdd2150e0 --- /dev/null +++ b/interfaces/coupled_interface/rose-meta/coupling/version22_30.py @@ -0,0 +1,515 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/coupling + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/coupled_interface/rose-meta/coupling/versions.py b/interfaces/coupled_interface/rose-meta/coupling/versions.py index b8b11ee33..152c043d0 100644 --- a/interfaces/coupled_interface/rose-meta/coupling/versions.py +++ b/interfaces/coupled_interface/rose-meta/coupling/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,462 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/interfaces/coupled_interface/rose-meta/coupling/vn3.0/rose-meta.conf b/interfaces/coupled_interface/rose-meta/coupling/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2a7ddac47 --- /dev/null +++ b/interfaces/coupled_interface/rose-meta/coupling/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.0 diff --git a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version22_30.py b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version22_30.py new file mode 100644 index 000000000..2bf5f4d89 --- /dev/null +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version22_30.py @@ -0,0 +1,535 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/jedi_lfric_interface + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py index 391ea3bf1..152c043d0 100644 --- a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.0/rose-meta.conf b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.0/rose-meta.conf new file mode 100644 index 000000000..0faaef3f3 --- /dev/null +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-linear/vn3.0 diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/version22_30.py b/interfaces/jules_interface/rose-meta/jules-lfric/version22_30.py new file mode 100644 index 000000000..1cfad0d33 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lfric/version22_30.py @@ -0,0 +1,71 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py index dba019499..152c043d0 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,41 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/jules-lfric/vn3.0/rose-meta.conf new file mode 100644 index 000000000..691c725eb --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lfric/vn3.0/rose-meta.conf @@ -0,0 +1,113 @@ +# Please see jules:wiki:SharingJULESmetadata + +import=lfric-jules-shared/jules-hydrology/vn3.0 + =lfric-jules-shared/jules-nvegparm/vn3.0 + =lfric-jules-shared/jules-pftparm/vn3.0 + =lfric-jules-shared/jules-radiation/vn3.0 + =lfric-jules-shared/jules-sea-seaice/vn3.0 + =lfric-jules-shared/jules-snow/vn3.0 + =lfric-jules-shared/jules-soil/vn3.0 + =lfric-jules-shared/jules-surface/vn3.0 + =lfric-jules-shared/jules-surface-types/vn3.0 + =lfric-jules-shared/jules-urban/vn3.0 + =lfric-jules-shared/jules-vegetation/vn3.0 + +[namelist:jules_hydrology=l_hydrology] +trigger=namelist:jules_hydrology=l_var_rainfrac: .true.; + +[namelist:jules_radiation=fixed_sea_albedo] +description=If using i_sea_alb_method='fixed', the global value of albedo to use. + +[namelist:jules_radiation=i_sea_alb_method] +trigger=namelist:jules_radiation=l_sea_alb_var_chl: 'jin'; + =namelist:jules_radiation=fixed_sea_albedo: 'fixed'; +value-titles=Barker and Li 1995,Jin et al. 2011,Fixed global value +values='barker','jin','fixed' + +[namelist:jules_radiation=l_albedo_obs] +trigger=namelist:files=albedo_vis_ancil_path: .true. ; + =namelist:files=albedo_nir_ancil_path: .true. ; + =namelist:jules_nvegparm=albsnf_nvgu_io: .true.; + =namelist:jules_nvegparm=albsnf_nvgl_io: .true.; + +[namelist:jules_radiation=l_sea_alb_var_chl] +trigger=namelist:files=sea_ancil_path: .true. ; + +[namelist:jules_snow=can_clump] +fail-if=len(this) != namelist:jules_surface_types=npft; # A value must be given for each PFT + =all(this == 0) and any(namelist:jules_snow=cansnowpft == '.true.'); # Results in floating point exception if 0. Only used if can_model = 4 (JULES default), cansnowpft = TRUE on that tile and l_embedded_snow = TRUE (LFRic default). + +[namelist:jules_snow=cansnowpft] +compulsory=true +length=5 + +[namelist:jules_snow=i_basal_melting_opt] +values='none','instant' + +[namelist:jules_snow=i_grain_growth_opt] +values='marshall','taillandier' + +[namelist:jules_snow=i_relayer_opt] +values='original','inverse' + +[namelist:jules_surface=anthrop_heat_option] +fail-if=this != "'dukes'"; # The DUKES fixed annual cycle is the only currently available option in LFRic +trigger=namelist:jules_surface=anthrop_heat_mean: 'flanner'; +values='dukes','flanner' + +[namelist:jules_surface=cor_mo_iter] +value-titles=Limit Obukhov length in low winds, + =Improve initial guess (preferred) +values='lim_oblen','improved' + +[namelist:jules_surface=fd_stability_dep] +value-titles=Off,Surface Ri +values='none','surf_ri' + +[namelist:jules_surface=formdrag] +trigger=namelist:jules_surface=fd_stability_dep: 'eff_z0','dist_drag'; +values='none','eff_z0','dist_drag' + +[namelist:jules_surface=l_urban2t] +trigger=namelist:jules_surface_types=urban_canyon: .true.; + =namelist:jules_surface_types=urban_roof: .true.; + =namelist:jules_surface_types=urban: .false.; + =namelist:jules_urban: .true.; + =namelist:jules_urban=anthrop_heat_scale: .true.; + =namelist:files=urban_ancil_path: .true.; + =namelist:stochastic_physics=rp_lsfc_z0_urban_mult: .true. ; + +[namelist:jules_surface=l_vary_z0m_soil] +trigger=namelist:files=soil_rough_ancil_path: .true. ; + +[namelist:jules_surface=srf_ex_cnv_gust] +type=logical + +[namelist:jules_vegetation=can_rad_mod] +values='one','four','five','six' + +[namelist:jules_vegetation=l_spec_veg_z0] +trigger=namelist:jules_pftparm=z0v_io: .true.; + =namelist:stochastic_physics=rp_lsfc_z0v: .true.; + =namelist:stochastic_physics=rp_lsfc_z0v_max: .true.; + =namelist:stochastic_physics=rp_lsfc_z0v_min: .true.; + +# Dummy page to force sort order for JULES Science Settings +[namespace:science] +ns=namelist/JULES Science Settings +sort-key=Section-A12b + +# Dummy page to force sort order for Snow other parameters +[namespace:snow_other] +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=02 + +# Dummy page to force sort order for Snow radiation parameters +[namespace:snow_radiation] +ns=namelist/JULES Science Settings/jules_snow/Radiation parameters +sort-key=01 + +# Dummy page to force sort order for JULES Surface Types +[namespace:surface_types] +ns=namelist/JULES Surface Types +sort-key=Section-A12a diff --git a/interfaces/jules_interface/rose-meta/jules-lsm/version22_30.py b/interfaces/jules_interface/rose-meta/jules-lsm/version22_30.py new file mode 100644 index 000000000..2b5ce306a --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lsm/version22_30.py @@ -0,0 +1,71 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py index b93f1a3e5..152c043d0 100644 --- a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py @@ -2,6 +2,8 @@ from metomi.rose.upgrade import MacroUpgrade +from .version22_30 import * + class UpgradeError(Exception): """Exception created when an upgrade fails.""" @@ -18,42 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports diff --git a/interfaces/jules_interface/rose-meta/jules-lsm/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/jules-lsm/vn3.0/rose-meta.conf new file mode 100644 index 000000000..3bf15ef5d --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lsm/vn3.0/rose-meta.conf @@ -0,0 +1,489 @@ +############################################################################### +# JULES metadata structure: +# - lfric-jules-shared = JULES metadata shared between parent models. +# = This a copy of jules-shared from the JULES repository. +# = lfric-jules-shared and jules-shared must be identical. +# - jules-lfric = LFRic specific amendments to jules-shared. +# = Imports lfric-jules-shared. +# - jules-lsm = LFRic-JULES interface metadata not relevant to JULES +# repository. +# = Imports jules-lfric. +# +# jules-lfric & jules-shared will be imported from JULES repository in future. +# +# Please see https://code.metoffice.gov.uk/trac/jules/wiki/SharingJULESmetadata +############################################################################### + +import=jules-lfric/vn3.0 + +[namelist:ideal_surface] +compulsory=true +description=Idealised surface settings +ns=namelist/Job/Initial conditions/Surface +sort-key=Section-A05 +title=Surface + +[namelist:ideal_surface=canopy_height] +compulsory=true +description=Canopy height of each plant type +fail-if=len(this) != namelist:jules_surface_types=npft +help=Canopy height of each plant type +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-03 +type=real + +[namelist:ideal_surface=leaf_area_index] +compulsory=true +description=Leaf area index of each plant type +fail-if=len(this) != namelist:jules_surface_types=npft +help=Leaf area index of each plant type +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-04 +type=real + +[namelist:ideal_surface=n_snow_layers] +compulsory=true +description=Snow layers on each tile +fail-if=len(this) != namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg + namelist:jules_sea_seaice=nice + 1 +help=The initial number of snow layers on each surface tile + = + =The order of tiles is land, sea, sea-ice +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-08 +type=integer + +[namelist:ideal_surface=snow_depth] +compulsory=true +description=Snow depth on each tile +fail-if=len(this) != namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg + namelist:jules_sea_seaice=nice + 1 +help=The initial snow depth on each surface tile + = + =The order of tiles is land, sea, sea-ice +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-09 +type=real + +[namelist:ideal_surface=snow_layer_ice_mass] +compulsory=true +description=Ice mass of each snow layer on tiles +fail-if=len(this) != 3*(namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg) +help=The initial ice mass of each snow layer + = + =The order in tiles 1-n for layer 1, then tiles 1-n for layer 2 etc +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-11 +type=real + +[namelist:ideal_surface=snow_layer_temp] +compulsory=true +description=Temperature of each snow layer on tiles +fail-if=len(this) != 3*(namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg) +help=The initial temperature of each snow layer + = + =The order in tiles 1-n for layer 1, then tiles 1-n for layer 2 etc +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-12 +type=real + +[namelist:ideal_surface=snow_layer_thickness] +compulsory=true +description=Thickness of each snow layer on tiles +fail-if=len(this) != 3*(namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg) +help=The initial thickness of each snow layer + = + =The order in tiles 1-n for layer 1, then tiles 1-n for layer 2 etc +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-10 +type=real + +[namelist:ideal_surface=soil_moisture] +compulsory=true +description=Soil moisture content +help=Soil moisture content on soil levels +!kind=default +length=4 +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-05 +type=real + +[namelist:ideal_surface=soil_temperature] +compulsory=true +description=Soil temperature +help=Temperature of soil levels +!kind=default +length=4 +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-06 +type=real + +[namelist:ideal_surface=surf_tile_fracs] +compulsory=true +description=Fraction of each surface tile +fail-if=len(this) != namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg + namelist:jules_sea_seaice=nice + 1 +help=The fraction within a grid-box of each surface tile + = + =The order of tiles is land, sea, sea-ice + = + =The fractions should sum to 1 +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-01 +type=real + +[namelist:ideal_surface=surf_tile_temps] +compulsory=true +description=Fraction of each surface tile +fail-if=len(this) != namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg + namelist:jules_sea_seaice=nice + 1 +help=The initial temperature of each surface tile + = + =The order of tiles is land, sea, sea-ice +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-02 +type=real + +[namelist:ideal_surface=tile_snow_mass] +compulsory=true +description=Snow mass on each tile +fail-if=len(this) != namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg + namelist:jules_sea_seaice=nice + 1 +help=The initial snow mass on each surface tile + = + =The order of tiles is land, sea, sea-ice +!kind=default +length=: +ns=namelist/Job/Initial conditions/Surface +sort-key=Panel-07 +type=real + +[namelist:specified_surface] +compulsory=true +description=Further Idealised surface settings +ns=namelist/Science/Specified Surface +sort-key=Section-A05 +title=Specified Surface + +[namelist:specified_surface=function_amplitude_e] +compulsory=true +description=Amplitude of the function used for surface latent heat flux +help=Specifies the amplitude of the analytical function used for calculating the + =surface latent heat flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=function_amplitude_h] +compulsory=true +description=Amplitude of the function used for surface sensible heat flux +help=Specifies the amplitude of the analytical function used for calculating the + =surface sensible heat flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=function_name_fluxes] +compulsory=true +description=Name of the function used for surface latent and sensible heat fluxes +!enumeration=true +help=Specifies function name used for calculating surface latent and sensible heat fluxes + =If constant, uses the single values set in specified_flux_h and specified_flux_e. profile_size should be set to 1. + =If time-interpolated, uses the time-varying arrays set in specified_flux_h and specified_flux_e, where the arrays are of length profile_size. + =If sinusoidal, fluxes are set to + =amplitude * sin( 2 * pi * current_time / period + phase ) + =If diurnal, fluxes are set to + =max(0, amplitude * cos( pi* (time_of_max_flux - current_time) / length_of_day )^1.3 ) +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +trigger=namelist:specified_surface=function_amplitude_e: 'sinusoidal', 'diurnal'; + =namelist:specified_surface=function_period_e: 'sinusoidal'; + =namelist:specified_surface=function_phase_e: 'sinusoidal'; + =namelist:specified_surface=function_amplitude_h: 'sinusoidal', 'diurnal'; + =namelist:specified_surface=function_period_h: 'sinusoidal'; + =namelist:specified_surface=function_phase_h: 'sinusoidal'; + =namelist:specified_surface=length_of_day: 'diurnal'; + =namelist:specified_surface=time_of_max_flux: 'diurnal'; + =namelist:specified_surface=length_of_day: 'diurnal'; + =namelist:specified_surface=time_data: 'time_interpolated'; + =namelist:specified_surface=profile_size: 'constant','time_interpolated'; + =namelist:specified_surface=specified_flux_e: 'constant','time_interpolated'; + =namelist:specified_surface=specified_flux_h: 'constant','time_interpolated'; + =namelist:specified_surface=time_units: 'sinusoidal', 'diurnal', 'time_interpolated'; +value-titles=Constant, Time Interpolated, Sinusoidal function, Diurnal function +values='constant', 'time_interpolated', 'sinusoidal', 'diurnal' + +[namelist:specified_surface=function_name_sst] +compulsory=true +description=Name of the function used for sea surface temperatures +!enumeration=true +help=Specifies the function name used for calculating surface sensible heat flux + = If constant, uses the sea surface tile value set by surf_tile_temps option found in + = ideal_surface namelist. + = If time_interpolated, uses the time-varying array set in sea_surf_temps found in the + = specified_surface namelist. +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +trigger=namelist:specified_surface=time_data_sst: 'time_interpolated'; + =namelist:specified_surface=profile_size_sst: 'time_interpolated'; + =namelist:specified_surface=time_units_sst: 'time_interpolated'; + =namelist:specified_surface=sea_surf_temps: 'time_interpolated'; +value-titles=Constant, Time Interpolated +values='constant', 'time_interpolated' + +[namelist:specified_surface=function_period_e] +compulsory=true +description=Period of the function used for surface latent heat flux +help=Specifies the period of the sinusoidal analytical function used for calculating + =latent heat flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=function_period_h] +compulsory=true +description=Period of the function used for surface sensible heat flux +help=Specifies the period of the sinusoidal analytical function used for calculating + =sensible heat flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=function_phase_e] +compulsory=true +description=Phase of the function used for latent heat flux +help=Specifies the phase of the sinusoidal analytical function used for calculating the + =latent heat flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=function_phase_h] +compulsory=true +description=Phase of the function used for sensible heat flux +help=Specifies the phase of the sinusoidal analytical function used for calculating the + =sensible heat flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=internal_flux_method] +compulsory=true +description=How to prescribe the internal flux +!enumeration=true +help=Either a constant value or a 2D map +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +trigger=namelist:files=internal_flux_ancil_path: 'non_uniform' ; + =namelist:specified_surface=internal_flux_value: 'uniform' ; +value-titles=Uniform, Non-Uniform +values='uniform','non_uniform' + +[namelist:specified_surface=internal_flux_value] +compulsory=true +description=Constant internal flux value +help=Use the Stefan-Boltzmann law to calculate the flux from + =internal temperature T_int +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=length_of_day] +compulsory=true +description=Duration of daylight +help=Specifies the duration of daylight, in units that are consistent with + =the length_of_day option, used for the diurnal analytical function. +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=profile_size] +compulsory=true +description=Number of points in varying flux profile +help=Number of data points in the specified_flux_h and specified_flux_e + =arrays +!kind=default +ns=namelist/Science/Specified Surface +range=0: +sort-key=Panel-A03e +type=integer + +[namelist:specified_surface=profile_size_sst] +compulsory=true +description=Number of points in sst profile +help=Number of data points in the sea_surf_temps arrays +!kind=default +ns=namelist/Science/Specified Surface +range=0: +sort-key=Panel-A03e +type=integer + +[namelist:specified_surface=sea_surf_temps] +!bounds=namelist:specified_surface=profile_size_sst +compulsory=true +description=Time-varying sea surface temperature profile +help=Sea surface temperature values (K) used at times specified, overides + =the sea surface tile value set by surf_tile_temps option found in + =ideal_surface namelist. +!kind=default +length=: +ns=namelist/Science/Specified Surface +sort-key=Panel-A03d +type=real + +[namelist:specified_surface=specified_flux_e] +!bounds=namelist:specified_surface=profile_size +compulsory=true +description=Surface latent heat flux [Wm-2] +help=Fixed or time-varying value used throughout the run. +!kind=default +length=: +ns=namelist/Science/Specified Surface +sort-key=Panel-A01a +type=real + +[namelist:specified_surface=specified_flux_h] +!bounds=namelist:specified_surface=profile_size +compulsory=true +description=Surface sensible heat flux [Wm-2] +help=Fixed or time-varying value used throughout the run +!kind=default +length=: +ns=namelist/Science/Specified Surface +sort-key=Panel-A01b +type=real + +[namelist:specified_surface=surf_temp_forcing] +compulsory=true +description=Forcing of the surface temperature +!enumeration=true +help=E.g. increment due to an internal flux +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +trigger=namelist:specified_surface=internal_flux_method: 'int_flux' ; +value-titles=None, Internal flux +values='none','int_flux' + +[namelist:specified_surface=time_data] +!bounds=namelist:specified_surface=profile_size +compulsory=true +description=Time values +help=Time values corresponding with the time-varying fluxes +!kind=default +length=: +ns=namelist/Science/Specified Surface +range=0.0: +sort-key=Panel-A03c +type=real + +[namelist:specified_surface=time_data_sst] +!bounds=namelist:specified_surface=profile_size_sst +compulsory=true +description=Time values +help=Time values corresponding with the time-varying ssts +!kind=default +length=: +ns=namelist/Science/Specified Surface +range=0.0: +sort-key=Panel-A03c +type=real + +[namelist:specified_surface=time_of_max_flux] +compulsory=true +description=Time of maximum flux +help=Specifies the time of day when the flux reaches its maximum value. + =The units must be consistent with the units used by the length_of_day option. + =Used for the diurnal analytical function. +!kind=default +ns=namelist/Science/Specified Surface +sort-key=Panel-A03 +type=real + +[namelist:specified_surface=time_units] +compulsory=true +description=Units of the time_data list/ function_period +!enumeration=true +help=Specifies the units of the time data/ wave period used. +ns=namelist/Science/Specified Surface +value-titles=Seconds,Minutes,Hours,Days +values='seconds','minutes','hours','days' + +[namelist:specified_surface=time_units_sst] +compulsory=true +description=Units of the time_data list/ function_period +!enumeration=true +help=Specifies the units of the time data/ wave period used. +ns=namelist/Science/Specified Surface +value-titles=Seconds,Minutes,Hours,Days +values='seconds','minutes','hours','days' + +[namelist:surface] +compulsory=true +description=Surface parametrisations used in the surface interface +ns=namelist/Science/Surface Interface +sort-key=Section-A12 + +[namelist:surface=check_soilm_negatives] +description=Switch to check if soil moisture has become negative as part of the + =lake water conservation scheme +ns=namelist/Science/Surface Interface/Soil +sort-key=Panel-B01a +type=logical + +[namelist:surface=emis_method_sea] +compulsory=true +description=Emissivity method for open sea + = Two options for spectrally varying emissivity in addition to a fixed emissivity: + = D. Feldman et al. (2014) https://doi.org/10.1073/pnas.1413640111 and + = R. Saunders et al. (2018) https://doi.org/10.5194/gmd-11-2717-2018 for IREMIS. +!enumeration=true +ns=namelist/Science/Surface Interface/Radiation +value-titles=1: Fixed, + =2: Feldman, + =3: IREMIS +values='fixed','feldman','iremis' + +[namelist:surface=emis_method_soil] +compulsory=true +description=Emissivity method for soil + = Option for spectrally varying emissivity in addition to a fixed emissivity: + = D. Feldman et al. (2014) https://doi.org/10.1073/pnas.1413640111 +!enumeration=true +ns=namelist/Science/Surface Interface/Radiation +value-titles=1: Fixed, + =2: Feldman Desert +values='fixed','feldman_desert' + +[namelist:surface=lake_water_conservation] +compulsory=true +description=Use the lake water conservation scheme +help=The inland water tile (aka lake tile) is a freely evaporating surface that does not deplete the local water supply. In order to conserve water the lake water conservation scheme decreases the level 4 soil moisture globally to account for this. +ns=namelist/Science/Surface Interface/Soil +sort-key=Panel-B01 +trigger=namelist:surface=check_soilm_negatives: .true.; +type=logical diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.0/rose-meta.conf new file mode 100644 index 000000000..782d74687 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.0/rose-meta.conf @@ -0,0 +1,27 @@ +[namelist:jules_hydrology] +compulsory=true +ns=namelist/JULES Science Settings/jules_hydrology +sort-key=Section-A12g +title=Hydrology options +url=http://jules-lsm.github.io/latest/namelists/jules_hydrology.nml.html#namelist-JULES_HYDROLOGY + +[namelist:jules_hydrology=l_hydrology] +compulsory=true +description=Enable soil hydrology +!kind=default +sort-key=Panel-G01 +trigger=namelist:jules_hydrology=l_var_rainfrac: .true.; + =namelist:jules_hydrology=l_top: .true.; + =namelist:jules_hydrology=l_pdm: .true.; + =namelist:jules_hydrology=l_limit_gsoil: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_hydrology.nml.html#JULES_HYDROLOGY::l_hydrology + +[namelist:jules_hydrology=l_var_rainfrac] +compulsory=true +description=Enable variable large scale and convective rain fractions + =SHOULD NOT BE USED IN STANDALONE - Please see online docs. +!kind=default +sort-key=Panel-G02 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_hydrology.nml.html#JULES_HYDROLOGY::l_var_rainfrac diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.0/rose-meta.conf new file mode 100644 index 000000000..1cb77755f --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.0/rose-meta.conf @@ -0,0 +1,121 @@ +[namelist:jules_nvegparm] +compulsory=true +description=Parameters required for each of the non-vegetated surface types. +ns=namelist/JULES Science Settings/jules_nvegparm +sort-key=Section-A12n +title=Non-vegetated surface parameters +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#namelist-JULES_NVEGPARM +widget[rose-config-edit]=cylc8_compat.PageArrayTable + +[namelist:jules_nvegparm=albsnc_nvg_io] +compulsory=true +description=Snow-covered albedo +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +range=0:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::albsnc_nvg_io + +[namelist:jules_nvegparm=albsnf_nvg_io] +compulsory=true +description=Snow-free albedo +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +range=-1:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::albsnf_nvg_io + +[namelist:jules_nvegparm=albsnf_nvgl_io] +compulsory=true +description=Lower limit on albsnf_nvg_io +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +range=0:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::albsnf_nvgl_io + +[namelist:jules_nvegparm=albsnf_nvgu_io] +compulsory=true +description=Upper limit on albsnf_nvg_io +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +range=0:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::albsnf_nvgu_io + +[namelist:jules_nvegparm=catch_nvg_io] +compulsory=true +description=Capacity for water (kg m-2) +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::catch_nvg_io + +[namelist:jules_nvegparm=ch_nvg_io] +compulsory=true +description=Heat capacity of this surface type (J K-1 m-2) +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::ch_nvg_io + +[namelist:jules_nvegparm=emis_nvg_io] +compulsory=true +description=Surface emissivity +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +range=0:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::emis_nvg_io + +[namelist:jules_nvegparm=gs_nvg_io] +compulsory=true +description=Surface conductance (m s-1) +fail-if=len(this) != namelist:jules_surface_types=nnvg +length=: +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::gs_nvg_io + +[namelist:jules_nvegparm=infil_nvg_io] +compulsory=true +description=Infiltration enhancement factor +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::infil_nvg_io + +[namelist:jules_nvegparm=vf_nvg_io] +compulsory=true +description=Fractional coverage of non-vegetation "canopy" +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +range=0:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::vf_nvg_io + +[namelist:jules_nvegparm=z0_nvg_io] +compulsory=true +description=Roughness length for momentum (m) +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::z0_nvg_io + +[namelist:jules_nvegparm=z0hm_nvg_io] +compulsory=true +description=Ratio of the roughness length for heat to the roughness length for momentum +fail-if=len(this) != namelist:jules_surface_types=nnvg +!kind=default +length=: +type=real +url=http://jules-lsm.github.io/latest/namelists/nveg_params.nml.html#JULES_NVEGPARM::z0hm_nvg_io diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.0/rose-meta.conf new file mode 100644 index 000000000..c9486d05e --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.0/rose-meta.conf @@ -0,0 +1,167 @@ +[namelist:jules_pftparm] +compulsory=true +description=This section is organised into two panels: + = "Radiation parameters" contains parameters related to radiative transfer in vegetation, + = "Other parameters" contains everything else. +ns=namelist/JULES Science Settings/jules_pftparm +sort-key=Section-A12l +title=PFT parameters +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#namelist-JULES_PFTPARM +widget[rose-config-edit]=cylc8_compat.PageArrayTable + +[namelist:jules_pftparm=albsnc_max_io] +compulsory=true +description=Snow-covered albedo for large LAI +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +range=0:1 +sort-key=Panel-HR03 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::albsnc_max_io + +[namelist:jules_pftparm=alnir_io] +compulsory=true +description=NIR Leaf reflection coeff. + =Leaf reflection coefficient for Near Infra Red wavelengths > 690nm. +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +range=0:1 +sort-key=Panel-HR03 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::alnir_io + +[namelist:jules_pftparm=alpar_io] +compulsory=true +description=VIS Leaf reflection coeff. + =Leaf reflection coefficient for wavelengths < 690nm (Photosyntehtically Active Radiation). +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +range=0:1 +sort-key=Panel-HR03 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::alpar_io + +[namelist:jules_pftparm=catch0_io] +compulsory=true +description=Minimum canopy capacity (kg m-2) +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=Panel-HO05 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::catch0_io + +[namelist:jules_pftparm=dcatch_dlai_io] +compulsory=true +description=Rate of change of canopy capacity with LAI (kg m-2) +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=Panel-HO05 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::dcatch_dlai_io + +[namelist:jules_pftparm=fsmc_p0_io] +compulsory=true +description=PFT-dependent parameter governing the threshold at which the plant starts to experience water stress + =due to lack of water in the soil +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=Panel-HO05 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::fsmc_p0_io + +[namelist:jules_pftparm=kext_io] +compulsory=true +description=Light extinction coefficient + =Used with Beers Law for light absorption through tile canopies +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +sort-key=Panel-HR02 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::kext_io + +[namelist:jules_pftparm=knl_io] +compulsory=true +description=Decay of nitrogen through the canopy for canopy radiation model 6 + =SHOULD NOT BE THE SAME AS KN! +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=Panel-HO05 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::knl_io + +[namelist:jules_pftparm=omega_io] +compulsory=true +description=VIS Leaf scattering coeff. + =Leaf scattering coefficient for wavelengths < 690nm (Photosyntehtically Active Radiation). +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +range=0:1 +sort-key=Panel-HR03 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::omega_io + +[namelist:jules_pftparm=omnir_io] +compulsory=true +description=NIR Leaf scattering coeff. + =Leaf scattering coefficient for Near Infra Red wavelengths > 690nm. +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +range=0:1 +sort-key=Panel-HR03 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::omnir_io + +[namelist:jules_pftparm=z0hm_pft_io] +compulsory=true +description=Ratio of the roughness length for heat to the roughness length for momentum +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=Panel-HO05 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::z0hm_pft_io + +[namelist:jules_pftparm=z0v_io] +compulsory=true +description=Specified vegetation roughness length for momentum (if l_spec_veg_z0) +fail-if=len(this) != namelist:jules_surface_types=npft +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=Panel-HO05 +type=real +url=http://jules-lsm.github.io/latest/namelists/pft_params.nml.html#JULES_PFTPARM::z0v_io + +# Dummy page to force sort order for pftparm other parameters +[namespace:pftparm_other] +description=Parameters not related to radiative transfer of vegetation. + =Related parameters are grouped together where appropriate. +ns=namelist/JULES Science Settings/jules_pftparm/Other parameters +sort-key=02 + +# Dummy page to force sort order for pftparm radiation parameters +[namespace:pftparm_radiation] +description=Parameters related to radiative transfer of vegetation +ns=namelist/JULES Science Settings/jules_pftparm/Radiation parameters +sort-key=01 diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.0/rose-meta.conf new file mode 100644 index 000000000..2e9f46c19 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.0/rose-meta.conf @@ -0,0 +1,113 @@ +[namelist:jules_radiation] +compulsory=true +ns=namelist/JULES Science Settings/jules_radiation +sort-key=Section-A12d +title=Radiation options +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#namelist-JULES_RADIATION + +[namelist:jules_radiation=fixed_sea_albedo] +compulsory=true +description=If using i_sea_alb_method=4 or 5, the global value of albedo to use. +!kind=default +range=0.0:1.0 +sort-key=Panel-B05a +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::fixed_sea_albedo + +[namelist:jules_radiation=i_sea_alb_method] +compulsory=true +description=Choice of model for the Ocean Surface Albedo (open water, + =ice free) +!enumeration=true +sort-key=Panel-B05 +trigger=namelist:jules_radiation=l_sea_alb_var_chl: 3; + =namelist:jules_radiation=fixed_sea_albedo: 4,5; + =namelist:jules_radiation=l_spec_sea_alb: 1,2,3; +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::i_sea_alb_method +value-titles=Briegleb and Ramanathan 1982,Barker and Li 1995,Jin et al. 2011,Fixed global value,Fixed sea with sea-ice param +values=1,2,3,4,5 + +[namelist:jules_radiation=l_albedo_obs] +compulsory=true +description=Scale albedos of land-surface tiles to agree with obs +!kind=default +sort-key=Panel-B01 +trigger=namelist:jules_pftparm=albsnf_maxu_io: .true.; + =namelist:jules_pftparm=albsnf_maxl_io: .true.; + =namelist:jules_pftparm=alparu_io: .true.; + =namelist:jules_pftparm=alparl_io: .true.; + =namelist:jules_pftparm=alniru_io: .true.; + =namelist:jules_pftparm=alnirl_io: .true.; + =namelist:jules_pftparm=omegau_io: .true.; + =namelist:jules_pftparm=omegal_io: .true.; + =namelist:jules_pftparm=omniru_io: .true.; + =namelist:jules_pftparm=omnirl_io: .true.; + =namelist:jules_nvegparm=albsnf_nvgu_io: .true.; + =namelist:jules_nvegparm=albsnf_nvgl_io: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::l_albedo_obs + +[namelist:jules_radiation=l_hapke_soil] +compulsory=true +description=Switch to enable Hapke's model of soil reflectance to include a zenith-angle dependence, but without the opposition effect. +!kind=default +sort-key=Panel-B03 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::l_hapke_soil + +[namelist:jules_radiation=l_niso_direct] +compulsory=true +description=Use the full non-isotropic expression for direct scattering in plant canopies. +!kind=default +sort-key=Panel-B02a1 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::l_niso_direct + +[namelist:jules_radiation=l_partition_albsoil] +compulsory=true +description=Switch to apply a spectral partitioning of the broad-band soil albedo. +!kind=default +sort-key=Panel-B04 +trigger=namelist:jules_radiation=ratio_albsoil: .true.; + =namelist:jules_radiation=swdn_frac_albsoil: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::l_partition_albsoil + +[namelist:jules_radiation=l_sea_alb_var_chl] +compulsory=true +description=Use spatially varying chlorophyll content to calculate the open sea albedos + =NOT AVAILABLE TO STANDALONE +help=The Jin et al. parameterisation of open sea albedo includes chlorophyll content. This can either be: + =FALSE: Held constant at 0.5 mg m-3, + =or, + =TRUE: Input as an ancillary field. +!kind=default +sort-key=Panel-B05b +type=logical + +[namelist:jules_radiation=l_spec_alb_bs] +compulsory=true +description=Use a single value for both the direct and diffuse beams +!kind=default +sort-key=Panel-B02a +trigger=namelist:jules_radiation=l_niso_direct: .false.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::l_spec_alb_bs + +[namelist:jules_radiation=ratio_albsoil] +compulsory=true +description=Ratio of the NIR to the VIS albedo of bare soil +!kind=default +range=1.0:10.0 +sort-key=Panel-B04a +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::ratio_albsoil + +[namelist:jules_radiation=swdn_frac_albsoil] +compulsory=true +description=The fraction of the total downward SW radiation assumed to be in the NIR part of the spectrum when partitioning the broad-band soil albedo. +!kind=default +range=0.0:1.0 +sort-key=Panel-B04b +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_radiation.nml.html#JULES_RADIATION::swdn_frac_albsoil diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/vn3.0/rose-meta.conf new file mode 100644 index 000000000..8f6938c9e --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/vn3.0/rose-meta.conf @@ -0,0 +1,245 @@ +[namelist:jules_sea_seaice] +compulsory=true +ns=namelist/JULES Science Settings/jules_sea_seaice +sort-key=Section-A12i +title=Sea and sea-ice options + +[namelist:jules_sea_seaice=alpham] +compulsory=true +description=Original HadGEM sea ice albedo scheme: Albedo of sea-ice at + =melting point (TM, if .not.l_ssice_albedo), + =or albedo of snow on sea-ice at melting point (TM, if + =l_ssice_albedo) ("M" for "melting") +!kind=default +range=0:1 +sort-key=Panel-C01 +type=real + +[namelist:jules_sea_seaice=amip_ice_thick] +compulsory=true +description=Calculate ice thickness from ice fraction +!kind=default +sort-key=Panel-C01 +type=logical + +[namelist:jules_sea_seaice=beta_evap] +compulsory=true +description=Efficiency of evaporation from sea-surface +help=This parameter controls the efficiency with which water can evaporate from a sea-surface. + = The default value is 1.0, moisture availability is effectively unrestricted. + = However, lower values can be useful for idealised modelling, + = restricting the evaporation rate. + = For example, a value of 0.0 would result in no evaporation. +!kind=default +range=0.0:1.0 +sort-key=Panel-C05 +type=real + +[namelist:jules_sea_seaice=buddy_sea] +compulsory=true +description=Use neighbouring sea point wind-speeds in coastal grid points +!enumeration=true +!kind=default +sort-key=Panel-C01a +value-titles=Off,On +values='Off','On' + +[namelist:jules_sea_seaice=cdn_hw_sea] +compulsory=true +description=Neutral drag coefficient over the sea at high wind speeds. +!kind=default +sort-key=Panel-C06a +type=real + +[namelist:jules_sea_seaice=cdn_max_sea] +compulsory=true +description=Maximum value of the neutral drag coefficient over open sea. +!kind=default +sort-key=Panel-C06b +type=real + +[namelist:jules_sea_seaice=dtice] +compulsory=true +description=Original HadGEM sea ice albedo scheme: Temperature range in which + =albedo of sea-ice (if .not.l_ssice_albedo), + =or of snow on sea-ice (if l_ssice_albedo), + =varies between its limits (recommended range 5-10K) +!kind=default +range=0.1:50 +sort-key=Panel-C02 +type=real + +[namelist:jules_sea_seaice=emis_sea] +compulsory=true +description=Emissivity of open sea +!kind=default +sort-key=Panel-C03 +type=real + +[namelist:jules_sea_seaice=emis_sice] +compulsory=true +description=Emissivity of sea-ice +!kind=default +sort-key=Panel-C04 +type=real + +[namelist:jules_sea_seaice=hcap_sea] +description=Heat capacity of the slab ocean (J K-1 m-2) +!kind=default +range=0.0: +sort-key=Panel-C14a +type=real + +[namelist:jules_sea_seaice=i_high_wind_drag] +compulsory=true +description=Option to impose a special treatment of drag at high wind speeds. +!enumeration=true +sort-key=Panel-C06 +trigger=namelist:jules_sea_seaice=cdn_hw_sea: 'reduced_v1'; + =namelist:jules_sea_seaice=cdn_max_sea: 'limited','reduced_v1'; + =namelist:jules_sea_seaice=u_cdn_hw: 'reduced_v1'; + =namelist:jules_sea_seaice=u_cdn_max: 'reduced_v1'; +value-titles=No special treatment of drag at high winds, + =The drag at high winds is capped, + =The drag at high winds is reduced over a range of speeds +values='null','limited','reduced_v1' + +[namelist:jules_sea_seaice=iseasurfalg] +compulsory=true +description=Algorithm for surface exchange over the sea +!enumeration=true +help=The most basic option for surface transfer at the sea surface + =consists of a specification of Charnocks coefficient for the + =momentum roughness length, including the aerodynamically smooth + =contribution in light winds, and a fixed thermal roughness length. + =Surface divergence theory allows for a variable thermal roughness + =length that follows the aerodynamicall smooth limit in light winds + =and decreases in stronger winds, giving a slower increase in the + =exchange coefficient for moisture as the wind rises. Historically, + =roughness lengths that depend on the friction velocity have not + =been iterated within the calculation of the Obukhov length, though + =this is more consistent: an iterative option is therefore provided. + =The COARE algorithm is based on a range of observations and exists + =in various forms. It features a dependence of Charnocks coefficient + =on the wind speed and a dependence of the thermal roughness length + =on the roughness Reynolds number. Extra parameters allow different + =versions of the algorithm to be used. +sort-key=Panel-C09 +trigger=namelist:jules_sea_seaice=z0m_specified: 'specified_roughness'; + =namelist:jules_sea_seaice=z0h_specified: 'specified_roughness'; +value-titles="Fixed values of roughness length for momentum and heat", + ="Fixed value of Charnock's coefficient with thermal + =roughness from surface divergence theory (non-iterative)", + ="Roughness lengths follow functional forms of the COARE + =algorithm" +values='specified_roughness','surf_div','coare' + +[namelist:jules_sea_seaice=kappa_seasurf] +compulsory=false +description=Thermal conductivity of sea-water (W / m / K) +!kind=default +sort-key=Panel-C11 +type=real + +[namelist:jules_sea_seaice=kappai] +compulsory=false +description=Thermal conductivity of sea-ice (W / m / K) +!kind=default +sort-key=Panel-C12 +type=real + +[namelist:jules_sea_seaice=kappai_snow] +compulsory=false +description=Thermal conductivity of snow on zero layer sea-ice (W / m / K) +!kind=default +sort-key=Panel-C13 +type=real + +[namelist:jules_sea_seaice=l_10m_neut] +compulsory=true +description=Logical for using neutral 10m wind speed to calculate the Charnock coefficient for sea points +!kind=default +sort-key=Panel-C08 +type=logical + +[namelist:jules_sea_seaice=l_iceformdrag_lupkes] +compulsory=true +description=Switch for diagnostic form drag following Lupkes et al. (2012) + =and Lupkes & Gryanik (2015) +!kind=default +sort-key=Panel-C07 +trigger=namelist:jules_sea_seaice=l_stability_lupkes: .true.; +type=logical + +[namelist:jules_sea_seaice=l_sice_heatflux] +compulsory=true +description=Do semi-implicit update of ti for sea-ice +!kind=default +sort-key=Panel-C10 +type=logical + +[namelist:jules_sea_seaice=l_stability_lupkes] +compulsory=true +description=Switch to include the stability dependence in the parametrization + =of ice form drag +!kind=default +sort-key=Panel-C07a +type=logical + +[namelist:jules_sea_seaice=l_use_dtstar_sea] +compulsory=true +description=Update the sea-surface temperature assuming a slab ocean with + = heat capacity given by namelist:jules_sea_seaice=hcap_sea +!kind=default +sort-key=Panel-C14 +trigger=namelist:jules_sea_seaice=hcap_sea: .true.; +type=logical + +[namelist:jules_sea_seaice=nice] +compulsory=true +description=Number of sea ice categories +help=The number of sea ice categories. This is normally 1 unless the model is + = coupled to a sea ice model when this is normally 5. This namelist + = entry is used to populate the nice variable in + = jules_control_init_mod.F90. All other subroutines should load + = nice from jules_control_init_mod and not from the surface + = namelist. +!kind=default +range=1:99 +sort-key=Panel-C00a +type=integer + +[namelist:jules_sea_seaice=u_cdn_hw] +compulsory=true +description=Neutral wind speed where the drag attains the high wind value. +!kind=default +sort-key=Panel-C06c +type=real + +[namelist:jules_sea_seaice=u_cdn_max] +compulsory=true +description=Neutral wind speed where the drag begins to be reduced from the maximum. +!kind=default +sort-key=Panel-C06d +type=real + +[namelist:jules_sea_seaice=z0h_specified] +compulsory=true +description=Specified roughness length for scalars [m] +fail-if=this < 0 +help=Specified value held fixed throughout the run used for surface exchange + =of scalar fields such as heat and moisture +!kind=default +range=0.0:100.0 +sort-key=Panel-C09b +type=real + +[namelist:jules_sea_seaice=z0m_specified] +compulsory=true +description=Specified roughness length for momentum [m] +fail-if=this < 0 +help=Specified value held fixed throughout the run +!kind=default +range=0.0:100.0 +sort-key=Panel-C09a +type=real diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.0/rose-meta.conf new file mode 100644 index 000000000..5248b8caa --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.0/rose-meta.conf @@ -0,0 +1,99 @@ +[namelist:jules_snow] +compulsory=true +ns=namelist/JULES Science Settings/jules_snow +sort-key=Section-A12k +title=Snow options +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html + +[namelist:jules_snow=can_clump] +compulsory=true +description=Clumping parameter for snow in the calculation of the albedo of plant canopies +fail-if=len(this) != namelist:jules_surface_types=npft; # A value must be given for each PFT + =all(this == 0) and namelist:jules_radiation=l_embedded_snow == '.true.' and any(namelist:jules_snow=cansnowpft == '.true.'); # Results in floating point exception if 0. Only used if can_model = 4, cansnowpft = TRUE on that tile and l_embedded_snow = TRUE. +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_snow/Radiation parameters +sort-key=Panel-D09 +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::can_clump + +[namelist:jules_snow=cansnowpft] +compulsory=false +description=Flag indicating whether snow can be held under the canopy of each PFT +fail-if=len(this) != namelist:jules_surface_types=npft; # A value must be given for each PFT +!kind=default +length=: +sort-key=Panel-D05 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::cansnowpft + +[namelist:jules_snow=i_basal_melting_opt] +compulsory=true +description=Option for melting at the base of the snow pack. +!enumeration=true +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=Panel-D17 +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::i_basal_melting_opt +value-titles=No basal melting,Instantaneous basal melting +values=0,1 + +[namelist:jules_snow=i_grain_growth_opt] +compulsory=true +description=Option for rate of growth of snow grains. +!enumeration=true +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=Panel-D04 +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::i_grain_growth_opt +value-titles=Marshall1989,Taillandier2007_ET +values=0,1 + +[namelist:jules_snow=i_relayer_opt] +compulsory=true +description=Option for method of relayering the snow pack in the multilayer scheme. +!enumeration=true +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=Panel-D01e +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::i_relayer_opt +value-titles=Original Scheme,Relayer inverse of grain size +values=0,1 + +[namelist:jules_snow=n_lai_exposed] +compulsory=true +description=Shape parameter for distribution of leaf area within canopies used in calculation of snow albedo. +fail-if=len(this) != namelist:jules_surface_types=npft; # A value must be given for each PFT +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_snow/Radiation parameters +sort-key=Panel-D10 +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::n_lai_exposed + +[namelist:jules_snow=rho_snow_fresh] +compulsory=false +description=Density of fresh snow (kg m-3) +!kind=default +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=Panel-D01b +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::rho_snow_fresh + +[namelist:jules_snow=unload_rate_u] +compulsory=true +description=Term proportional to wind speed in background unloading rate of snow on canopies +fail-if=len(this) != namelist:jules_surface_types=npft; # A value must be given for each PFT +!kind=default +length=: +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=Panel-D13 +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_snow.nml.html#JULES_SNOW::unload_rate_u + +# Dummy page to force sort order for Snow other parameters +[namespace:snow_other] +ns=namelist/JULES Science Settings/jules_snow/Other parameters +sort-key=02 + +# Dummy page to force sort order for Snow radiation parameters +[namespace:snow_radiation] +ns=namelist/JULES Science Settings/jules_snow/Radiation parameters +sort-key=01 diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.0/rose-meta.conf new file mode 100644 index 000000000..49a87b62a --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.0/rose-meta.conf @@ -0,0 +1,31 @@ +[namelist:jules_soil] +compulsory=true +ns=namelist/JULES Science Settings/jules_soil +sort-key=Section-A12j +title=Soil options +url=http://jules-lsm.github.io/latest/namelists/jules_soil.nml.html#namelist-JULES_SOIL + +[namelist:jules_soil=l_dpsids_dsdz] +compulsory=true +description=Calculate vertical gradient of soil suction with the assumption of linearity only for + =fractional saturation (consistent with the calculation of hydraulic conductivity) +!kind=default +sort-key=Panel-E03 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_soil.nml.html#JULES_SOIL::l_dpsids_dsdz + +[namelist:jules_soil=l_soil_sat_down] +compulsory=true +description=Direction of water in excess of saturation +!kind=default +sort-key=Panel-E04 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_soil.nml.html#JULES_SOIL::l_soil_sat_down + +[namelist:jules_soil=l_vg_soil] +compulsory=true +description=Switch for van Genuchten soil hydraulic model. +!kind=default +sort-key=Panel-E02 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_soil.nml.html#JULES_SOIL::l_vg_soil diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface-types/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface-types/vn3.0/rose-meta.conf new file mode 100644 index 000000000..42ff6a41f --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface-types/vn3.0/rose-meta.conf @@ -0,0 +1,125 @@ +[namelist:jules_surface_types] +compulsory=true +ns=namelist/JULES Surface Types/jules_surface_types +sort-key=Section-A12a +title=JULES Surface Types +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html + +[namelist:jules_surface_types=brd_leaf] +description=Pseudo level of broadleaf PFT +fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft +range=1: +sort-key=Panel-A1a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::brd_leaf + +[namelist:jules_surface_types=c3_grass] +description=Pseudo level of C3 grass PFT +fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft +range=1: +sort-key=Panel-A3a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c3_grass + +[namelist:jules_surface_types=c4_grass] +description=Pseudo level of C4 grass PFT +fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft +range=1: +sort-key=Panel-A4a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c4_grass + +[namelist:jules_surface_types=ice] +description=Pseudo level of ice surface type +fail-if=this > (namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg); # Pseudo level must be less than or equal to npft+nnvg + =this <= namelist:jules_surface_types=npft; # PFTs must be grouped together first with non-vegetated tiles following +range=1: +sort-key=Panel-A9a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::ice + +[namelist:jules_surface_types=lake] +description=Pseudo level of lake surface type +fail-if=this > (namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg); # Pseudo level must be less than or equal to npft+nnvg + =this <= namelist:jules_surface_types=npft; # PFTs must be grouped together first with non-vegetated tiles following +range=1: +sort-key=Panel-A7a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::lake + +[namelist:jules_surface_types=ndl_leaf] +description=Pseudo level of needleleaf PFT +fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft +range=1: +sort-key=Panel-A2a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::ndl_leaf + +[namelist:jules_surface_types=nnvg] +compulsory=true +description=The number of non-plant surface types to be modelled +range=1: +sort-key=Panel-A0b +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::nnvg + +[namelist:jules_surface_types=npft] +compulsory=true +description=The number of plant functional types to be modelled +range=0: +sort-key=Panel-A0a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::npft + +[namelist:jules_surface_types=shrub] +description=Pseudo level of shrub PFT +fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft +range=1: +sort-key=Panel-A5a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::shrub + +[namelist:jules_surface_types=soil] +compulsory=true +description=Pseudo level of soil surface type +fail-if=this > (namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg); # Pseudo level must be less than or equal to npft+nnvg + =this <= namelist:jules_surface_types=npft; # PFTs must be grouped together first with non-vegetated tiles following +range=1: +sort-key=Panel-A8 +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::soil + +[namelist:jules_surface_types=urban] +compulsory=true +description=Pseudo level of urban surface type +fail-if=this > (namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg); # Pseudo level must be less than or equal to npft+nnvg + =this <= namelist:jules_surface_types=npft; # PFTs must be grouped together first with non-vegetated tiles following + =this > 0 and (namelist:jules_surface_types=urban_roof > 0 or namelist:jules_surface_types=urban_canyon > 0); +range=-1,1: +sort-key=Panel-A6a +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::urban + +[namelist:jules_surface_types=urban_canyon] +compulsory=true +description=Pseudo level of urban canyon surface type +fail-if=this > namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg; # Pseudo level must be less than or equal to npft+nnvg + =this <= namelist:jules_surface_types=npft; # PFTs must be grouped together first with non-vegetated tiles following + =this > 0 and not (namelist:jules_surface_types=urban_roof > 0); # Both the canyon and roof surface type must be present + =not(this > 0) and namelist:jules_surface=l_urban2t == '.true.'; # When l_urban2t there must be a canyon and a roof surface type +range=-1,1: +sort-key=Panel-A6b +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::urban_canyon + +[namelist:jules_surface_types=urban_roof] +compulsory=true +description=Pseudo level of urban roof surface type +fail-if=this > namelist:jules_surface_types=npft + namelist:jules_surface_types=nnvg; # Pseudo level must be less than or equal to npft+nnvg + =this <= namelist:jules_surface_types=npft; # PFTs must be grouped together first with non-vegetated tiles following + =this > 0 and not (namelist:jules_surface_types=urban_canyon > 0); # Both the canyon and roof surface type must be present + =not(this > 0) and namelist:jules_surface=l_urban2t == '.true.'; # When l_urban2t there must be a canyon and a roof surface type +range=-1,1: +sort-key=Panel-A6c +type=integer +url=http://jules-lsm.github.io/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::urban_roof diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.0/rose-meta.conf new file mode 100644 index 000000000..298fad335 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.0/rose-meta.conf @@ -0,0 +1,115 @@ +[namelist:jules_surface] +compulsory=true +description=Options for surface parametrisations +ns=namelist/JULES Science Settings/jules_surface +sort-key=Section-A12e +title=Surface options +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html + +[namelist:jules_surface=anthrop_heat_mean] +compulsory=true +description=Baseline mean anthropogenic heat flux for Flanner scheme +sort-key=Panel-F03b +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::anthrop_heat_mean + +[namelist:jules_surface=anthrop_heat_option] +compulsory=true +description=Options for calculating anthropogenic heat +!enumeration=true +sort-key=Panel-F03a +trigger=namelist:jules_surface=anthrop_heat_mean: 1; +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::anthrop_heat_option +value-titles=DUKES fixed annual cycle, Flanner latitude-dependent annual and diurnal cycles +values=0,1 + +[namelist:jules_surface=cor_mo_iter] +compulsory=true +description=Corrections to Monin-Obukhov surface exchange calculation +!enumeration=true +sort-key=Panel-F11 +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::cor_mo_iter +value-titles=Correct convective gustiness in low winds, + =Correct U* in dust scheme, + =Limit Obukhov length in low winds, + =Improve initial guess (preferred) +values=1,2,3,4 + +[namelist:jules_surface=fd_stability_dep] +compulsory=true +description=Stability dependence option for orographic form drag + =NOT AVAILABLE TO STANDALONE +!enumeration=true +help=Turbulent orographic form drag can be implemented either using + =effective roughness lengths or as a distributed drag profile + =dependent on the switch namelist:jules_surface=formdrag. + =This drag can either be applied without any stability dependence, + =or dependent on the surface to level 1 Richardson number, or for + =the distributed version, on a bulk Richardson number between the + =surface and the diagnosed middle-layer depth, h_m. +sort-key=Panel-FX01b +value-titles=Off,Surface Ri,Bulk Ri +values=0,1,2 + +[namelist:jules_surface=formdrag] +compulsory=true +description=Orographic form drag option + =NOT AVAILABLE TO STANDALONE +!enumeration=true +help=Turbulent orographic form drag can be implemented either using + =effective roughness lengths or as an explicit distributed drag profile. + =This option is currently not available to standalone as there + =is no mechanism of providing the necessary ancillary data. +sort-key=Panel-FX01 +trigger=namelist:jules_surface=orog_drag_param: 1,2; + =namelist:jules_surface=fd_stability_dep: 1,2; + =namelist:jules_surface=fd_hill_option: 2; +value-titles=No orographic stress,Effective roughness,Distributed Drag +values=0,1,2 + +[namelist:jules_surface=l_anthrop_heat_src] +compulsory=true +description=Use anthropogenic heat source on urban surface types +sort-key=Panel-F03 +trigger=namelist:jules_surface=anthrop_heat_option: .true.; + =namelist:jules_urban=anthrop_heat_scale: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_anthrop_heat_src + +[namelist:jules_surface=l_urban2t] +compulsory=true +description=Switch for using the two-tile urban schemes (including MORUSES) +sort-key=Panel-F09 +trigger=namelist:jules_surface_types=urban_canyon: .true.; + =namelist:jules_surface_types=urban_roof: .true.; + =namelist:jules_surface_types=urban: .false.; + =namelist:jules_urban: .true.; + =namelist:jules_urban=anthrop_heat_scale: .true.; + =namelist:urban_properties: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_urban2t + +[namelist:jules_surface=l_vary_z0m_soil] +compulsory=true +description=Enable soil roughness to be set from ancillary file + =NOT AVAILABLE TO STANDALONE +!kind=default +sort-key=Panel-FX04 +type=logical + +[namelist:jules_surface=srf_ex_cnv_gust] +compulsory=true +description=Include effect of convective downdraughts on surface exchange + =NOT AVAILABLE TO STANDALONE +help=Surface exchange is affected by the mean wind, + =eddies spanning the depth + =of the boundary layer and eddies driven by convective downdraughts. + =Originally in the UM only boundary layer eddies were considered. If + =convective downdraughts are included, + =the impact of boundary-layer + =eddies on surface exchange is reduced and convective eddies are + =explicitly included using a parametrization due to Redelsperger + =et al. (2000), + =J. Climate,13,p. 402. +!kind=default +sort-key=Panel-FX03 diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.0/rose-meta.conf new file mode 100644 index 000000000..4f1e6fb27 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.0/rose-meta.conf @@ -0,0 +1,50 @@ +[namelist:jules_urban] +compulsory=true +description=Sets the options available for the two-tile urban schemes including + =MORUSES. For all other parameters that MORUSES does not + =provide and for any MORUSES parametrisations that are turned + =off, values from "Non-vegetated surface parameters" will be + =used instead. See help for more information. +ns=namelist/JULES Science Settings/jules_urban +sort-key=Section-A12o +title=Urban options +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#namelist-JULES_URBAN + +[namelist:jules_urban=anthrop_heat_scale] +compulsory=true +description=Distribution scaling factor for anthropogenic heat flux +!kind=default +range=0:1 +type=real +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#JULES_URBAN::anthrop_heat_scale + +[namelist:jules_urban=l_moruses_albedo] +compulsory=true +description=Use MORUSES parameterisation for effective canyon albedo (snow free) +type=logical +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#JULES_URBAN::l_moruses_albedo + +[namelist:jules_urban=l_moruses_emissivity] +compulsory=true +description=Use MORUSES parameterisation for effective canyon emissivity +type=logical +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#JULES_URBAN::l_moruses_emissivity + +[namelist:jules_urban=l_moruses_rough] +compulsory=true +description=Use MORUSES parameterisation for effective roughness length for heat +type=logical +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#JULES_URBAN::l_moruses_rough + +[namelist:jules_urban=l_moruses_storage] +compulsory=true +description=Use MORUSES parameterisation for thermal inertia and coupling with underlying soil +trigger=namelist:jules_urban=l_moruses_storage_thin: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#JULES_URBAN::l_moruses_storage + +[namelist:jules_urban=l_moruses_storage_thin] +compulsory=true +description=Use thin roofs (includes effects of insulation) +type=logical +url=http://jules-lsm.github.io/latest/namelists/urban.nml.html#JULES_URBAN::l_moruses_storage_thin diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.0/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.0/rose-meta.conf new file mode 100644 index 000000000..f59be621c --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.0/rose-meta.conf @@ -0,0 +1,34 @@ +[namelist:jules_vegetation] +compulsory=true +description=Options for vegetation parametrisations +ns=namelist/JULES Science Settings/jules_vegetation +sort-key=Section-A12f +title=Vegetation options +url=http://jules-lsm.github.io/latest/namelists/jules_vegetation.nml.html + +[namelist:jules_vegetation=can_rad_mod] +compulsory=true +description=Vegetation canopy radiation model +!enumeration=true +sort-key=Panel-I13 +url=http://jules-lsm.github.io/latest/namelists/jules_vegetation.nml.html#JULES_VEGETATION::can_rad_mod +value-titles=1: Single canopy layer, + =4: Multi-layer two stream approach, + =5: Multi-layer with Sunfleck penetration and sunlit and shaded leaves, + =6: Multi-layer with exponential decline in leaf N + +[namelist:jules_vegetation=l_limit_canhc] +compulsory=true +description=Logical for capping vegetation canopy areal thermal heat capacity +!kind=default +sort-key=Panel-I04 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_vegetation.nml.html#JULES_VEGETATION::l_limit_canhc + +[namelist:jules_vegetation=l_spec_veg_z0] +compulsory=true +description=Logical switch for setting explicit vegetation roughness lengths +!kind=default +sort-key=Panel-I05 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_vegetation.nml.html#JULES_VEGETATION::l_spec_veg_z0 diff --git a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/version22_30.py new file mode 100644 index 000000000..752f6197c --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/version22_30.py @@ -0,0 +1,57 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py index e028934f8..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,27 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.0/rose-meta.conf new file mode 100644 index 000000000..8fa4fa8fb --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.0/rose-meta.conf @@ -0,0 +1,345 @@ +[namelist:aerosol] +compulsory=true +description=Aerosol parametrization +ns=namelist/Science/UM Aerosol +sort-key=Section-A03 +title=Aerosol + +[namelist:aerosol=aclw_file] +compulsory=true +description=LW file: aitken and insol acc modes +help=The full path to the file containing the look-up table for aitken modes + =and insoluble accumulation-mode aerosol optical properties in the + =longwave. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B02 +!string_length=filename +type=character + +[namelist:aerosol=acsw_file] +compulsory=true +description=SW file: aitken and insol acc mode +help=The full path to the file containing the look-up table for aitken modes + =and insoluble accumulation-mode aerosol optical properties in the + =shortwave. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B03 +!string_length=filename +type=character + +[namelist:aerosol=activation_scheme] +compulsory=true +description=Calculate Cloud Droplet Number using: + = a Jones method doi:10.1038/370450a0 + = b Constant CDNC field +!enumeration=true +help=The Jones method is an empirical relation used to estimate CDNC + =from GLOMAP-mode aerosol. + = + =Note that Jones in UM is compatible with the 7mode including dust option. +sort-key=Panel-C01 +value-titles=off,jones +values='off','jones' + +[namelist:aerosol=anlw_file] +compulsory=true +description=LW file: soluble accumulation mode +help=The full path to the file containing the look-up table for soluble + =accumulation-mode aerosol optical properties in the longwave. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B04 +!string_length=filename +type=character + +[namelist:aerosol=answ_file] +compulsory=true +description=SW file: soluble accumulation mode +help=The full path to the file containing the look-up table for soluble + =accumulation-mode aerosol optical properties in the shortwave. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B05 +!string_length=filename +type=character + +[namelist:aerosol=crlw_file] +compulsory=true +description=LW file: coarse-mode +help=The full path to the file containing the look-up table for coarse-mode + =aerosol optical properties in the longwave +ns=namelist/Science/UM Aerosol +sort-key=Panel-B06 +!string_length=filename +type=character + +[namelist:aerosol=crsw_file] +compulsory=true +description=SW file: coarse-mode +help=The full path to the file containing the look-up table for coarse-mode + =aerosol optical properties in the shortwave. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B07 +!string_length=filename +type=character + +[namelist:aerosol=easyaerosol_cdnc] +compulsory=true +description=Include CDNC from EasyAerosol ancils +help=Cloud Droplet Number Concentrations will be read from an + =EasyAerosol climatology ancil and sent to the microphysics scheme +ns=namelist/Science/UM Aerosol +trigger=namelist:files=cloud_drop_no_conc_ancil_path: .true. ; +type=logical + +[namelist:aerosol=easyaerosol_lw] +compulsory=true +description=Include LW radiative effects from EasyAerosol ancils +help=Direct radiative effects from a climatology of aerosol optical properties + =that are sent directly to the longwave radiation scheme +ns=namelist/Science/UM Aerosol +trigger=namelist:files=easy_asymmetry_lw_ancil_path: .true. ; +type=logical + +[namelist:aerosol=easyaerosol_sw] +compulsory=true +description=Include SW radiative effects from EasyAerosol ancils +help=Direct radiative effects from a climatology of aerosol optical properties + =that are sent directly to the shortwave radiation scheme +ns=namelist/Science/UM Aerosol +trigger=namelist:files=easy_asymmetry_sw_ancil_path: .true. ; +type=logical + +[namelist:aerosol=emissions] +compulsory=true +description=Use GC3 (3D) or GC5 (2D) biomass emissions +!enumeration=true +help=Which emissions options to use + = + =GC3 uses 3D ancillaries for bc_biomass and om_biomass, + = and a high level ancillary for SO2 + = + =GC5 uses 2D ancillaries for bc_biomass and om_biomass, + = and uses all SO2 at low level +ns=namelist/Science/UM Aerosol +sort-key=Panel-A02 +trigger=namelist:files=emiss_bc_biomass_ancil_path: 'GC3'; + =namelist:files=emiss_om_biomass_ancil_path: 'GC3'; + =namelist:files=emiss_so2_high_ancil_path: 'GC3'; + =namelist:files=emiss_bc_biomass_hi_ancil_path: 'GC5'; + =namelist:files=emiss_bc_biomass_lo_ancil_path: 'GC5'; + =namelist:files=emiss_om_biomass_hi_ancil_path: 'GC5'; + =namelist:files=emiss_om_biomass_lo_ancil_path: 'GC5'; +value-titles=GC3,GC5 +values='GC3','GC5' + +[namelist:aerosol=glomap_mode] +compulsory=true +description=GLOMAP-mode aerosol scheme +!enumeration=true +help=These schemes use a two-moment modal representation of aerosols giving + =the number concentration of particles in each mode and the mass + =concentrations of the particle components. + = + =A 7-mode GLOMAP-mode configuration (Mode Setup 8, MS8) is the default. + =This has 4 soluble modes (Nucleation, Aitken, Accumulation and Coarse) and + =3 insoluble modes (Aitken, Accumulation and Coarse). 5 different + =components are represented: sulphate (in the form of H2SO4), organic + =matter, black carbon, sea salt and mineral dust. + = + =A 2-mode GLOMAP-mode configuration (Mode Setup 6, MS6) is also used to + =elove and transport dust aerosol only. This has two insoluble modes + =(Accumulation and Coarse). Only the dust component is represented. + = + =GLOMAP-mode aerosol fields and particle properties derived from these by + =either of the GLOMAP-mode schemes (or the combined option) + =can be used in conjunction with + =RADAER to provide optical properties for the radiation scheme. + = + =Choice of GLOMAP-mode aerosol scheme + = + =[Climatology]: GLOMAP-mode aerosol climatology scheme. + =-------------------------------------------------------------------------- + =This is a relatively fast aerosol scheme limited to calculating the cloud + =droplet number concentration and/or the particle properties needed for + =determining radiative effects.This scheme is driven by offline aerosol + =fields. + = + =[ukca]: GLOMAP-mode aerosol full UKCA scheme. + =-------------------------------------------------------------------------- + =This is a full prognostic aerosol scheme with aerosol pre-cursor chemistry + =provided by the UKCA Offline Oxidants chemistry scheme. + = + =[dust_and_clim]: + =-------------------------------------------------------------------------- + =GLOMAP-mode aerosol full UKCA scheme (MS6) with the remaining + =GLOMAP-mode aerosols obtained from the climatology scheme (MS8). + = + =[radaer_test]: + =-------------------------------------------------------------------------- + =A RADAER test option allows RADAER to be run without either scheme being + =active. Initial values of the aerosol and particle property fields will + =then be used instead. This option may be used for independent evaluation + =of RADAER or for troubleshooting during development. +ns=namelist/Science/UM Aerosol +sort-key=Panel-A01 +trigger=namelist:aerosol=activation_scheme: 'climatology','dust_and_clim' ; + =namelist:aerosol=l_radaer: 'climatology','ukca','dust_and_clim','radaer_test' ; + =namelist:aerosol=emissions: 'ukca' ; + =namelist:aerosol=horiz_d: 'ukca','dust_and_clim'; + =namelist:aerosol=us_am: 'ukca','dust_and_clim'; +value-titles=off,climatology,ukca,dust_and_clim,radaer_test +values='off','climatology','ukca','dust_and_clim','radaer_test' + +[namelist:aerosol=horiz_d] +compulsory=true +description=Global tuning parameter for horizontal flux +help=horiz_d is a simple tuning knob to enhance/decrease dust emissions +!kind=default +range=0:99.9 +sort-key=Panel-F01 +type=real + +[namelist:aerosol=l_radaer] +compulsory=true +description=Direct effect of climatology aerosols in RADAER +help=Direct effect of GLOMAP-mode aerosols (from UKCA or Climatology) in the + =radiation scheme, including aerosol optical depth. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B01 +trigger=namelist:aerosol=aclw_file: .true. ; + =namelist:aerosol=acsw_file: .true. ; + =namelist:aerosol=anlw_file: .true. ; + =namelist:aerosol=answ_file: .true. ; + =namelist:aerosol=crlw_file: .true. ; + =namelist:aerosol=crsw_file: .true. ; + =namelist:aerosol=prec_file: .true. ; + =namelist:aerosol=n_radaer_step: .true. ; +type=logical + +[namelist:aerosol=murk] +compulsory=true +description=Use murk aerosol +help=Include the single species prognostic aerosol commonly known as murk +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-E01 +trigger=namelist:aerosol=murk_prognostic: .true.; + =namelist:aerosol=murk_visibility: .true.; +type=logical + +[namelist:aerosol=murk_lbc] +compulsory=true +description=Apply lateral boundary conditions for murk +help=If true, lateral boundary conditions for murk will be read from file + = If false, a constant flux of murk at the boundary is assumed +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-E02b +type=logical + +[namelist:aerosol=murk_prognostic] +compulsory=true +description=Emit, advect, mix and rainout the murk aerosol +help=If false, the murk field will be a static field provided by an ancillary + =If true, the murk field will arise due to emissions, and be processed + = via the transport, mixing and scavenging (rainout) schemes +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-E02 +trigger=namelist:aerosol=murk_source_scaling: .true.; + =namelist:aerosol=murk_lbc: .true.; + =namelist:files=emiss_murk_ancil_path: .true.; +type=logical + +[namelist:aerosol=murk_source_scaling] +compulsory=true +description=Scaling factor applied to murk source +help=Combining pollutant emission inventories of different aerosol species + = into a single variable to describe the emission of murk is only accurate + = to some relative factor (there is no absolute value of murk). + =Therefore the source strength can be scaled with this variable to + = tune up or down the murk concentration appropriately. +!kind=default +ns=namelist/Science/UM Aerosol +range=0:9999 +sort-key=Panel-E02a +type=real + +[namelist:aerosol=murk_visibility] +compulsory=true +description=Use murk in the visibility calculation +help=If false, a constant value of 10microg/kg of aerosol will be used in + = visibility calculations + =If true, the murk field will be used in visibility calculations +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-E03 +type=logical + +[namelist:aerosol=n_radaer_step] +compulsory=true +description=Number of radiation timesteps per radaer timestep +help=The radaer calculations may be done less frequently than + =every radiation timestep. Radaer calculations will + =be done on timesteps 1, 1+n_radaer_step*n_radstep, + = 1+(n_radaer_step*n_radstep)*2... +!kind=default +range=1: +sort-key=Panel-B01a +type=integer + +[namelist:aerosol=prec_file] +compulsory=true +description=File of pre-computed values +help=The full path to the file containing pre-computed constants, that are + =required when the GLOMAP-mode aerosol climatology interacts with RADAER. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B08 +!string_length=filename +type=character + +[namelist:aerosol=sulphuric_strat_climatology] +compulsory=true +description=Sulphuric acid aerosol climatology +help=Include sulphuric acid aerosol in the stratosphere using a + =fixed column amount. +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-D01 +trigger=namelist:aerosol=sulphuric_strat_column: .true.; +type=logical + +[namelist:aerosol=sulphuric_strat_column] +compulsory=true +description=Sulphuric acid aerosol stratospheric column amount kg/m2 +help=Total column amount in kg/m2 above the tropopause. + = + =This will be converted into a constant mixing ratio above the level + =of the tropopause determined from the WMO lapse rate criteria. + = + =A column mass of 1.86604e-6 kg/m2 is equal to the "Cusack" + =stratospheric aerosol climatolgy in the Unified Model. +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-D02 +type=real + +[namelist:aerosol=ukca_mode_seg_size] +compulsory=false +description=Segment size for GLOMAP-mode +help=Number of segments used in ukca_aero_ctl. This is required to be greater + = than 1 to run GLOMAP with OpenMP multithreading. +!kind=default +ns=namelist/Science/UM Aerosol +sort-key=Panel-A01 +type=integer + +[namelist:aerosol=us_am] +compulsory=true +description=Multiplicative ustar correction +help=us_am is used to enhance U* to compensate for the fact that the + = thresholds in the code are for point-like U* rather than the grid-box + = mean +!kind=default +range=0:9.99 +sort-key=Panel-F02 +type=real diff --git a/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version22_30.py new file mode 100644 index 000000000..aee4bc835 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/versions.py index 5a3ba41f4..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.0/rose-meta.conf new file mode 100644 index 000000000..82f183e99 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.0/rose-meta.conf @@ -0,0 +1,579 @@ +#============================================================================== +# BOUNDARY LAYER: +#============================================================================== + +[namelist:blayer] +compulsory=true +description=Boundary layer parametrization +ns=namelist/Science/UM Boundary layer +sort-key=Section-A04 +title=Boundary layer + +[namelist:blayer=a_ent_2] +compulsory=true +description=Empirical constant multiplying buoyancy reversal entrainment term +help=The entrainment parametrization includes a term dependent on the + =strength of any negative buoyancy generated through evaporative cooling + =on mixing between cloudy boundary layer air and cloud-free air entrained + =from above the boundary layer. LES studies suggest a value 0.056. +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:1.0 +sort-key=Panel-A08a +type=real + +[namelist:blayer=a_ent_shr] +compulsory=true +description=Empirical constant multiplying ustar entrainment term +help=The entrainment parametrization includes a term dependent on the + =friction velocity (ustar). The constant of proportionality had + =been 5.0 but the LES of Beare (2008) together with UKV case + =studies suggest a lower value would be more appropriate + =(Beare gives 1.6). +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:10.0 +sort-key=Panel-A08 +type=real + +[namelist:blayer=bl_levels] +description=Number of boundary layer levels +help=Typically only the levels in the lowest few kilometres of the + =atmosphere are passed to the boundary layer scheme, + =in order to save on + =CPU time. Depending on the choices in the Boundary Layer panel, + =the + =local scheme can be applicable to mixing processes in the free atmosphere + =above the boundary layer. +!kind=default +ns=namelist/Science/UM Boundary layer +range=1: +sort-key=Panel-A01 +type=integer + +[namelist:blayer=bl_mix_w] +compulsory=true +description=Allow BL scheme to mix vertical velocity +help=Typically this is used in convective scale applications when horizontal + =mixing via the Smagorinsky scheme is also included. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A13 +type=logical + +[namelist:blayer=bl_res_inv] +compulsory=true +description=Select method for representing flux across partly resolved inversions +!enumeration=true +help=When selected the thickness of the capping inversion is diagnosed + =and if it is thick enough to be partly resolved by the vertical grid, + =the turbulent fluxes across the top of the boundary layer are applied + =across the layers within the inversion via the boundary layer diffusion + =coefficients. Two options are available for how to calculate this flux. + =Either a specified cosine shape is used or else the flux is that + =required to bring the theta_vl profile to a target piecewise linear shape. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A15 +value-titles=None,Use a cosine flux profile, + =Use a target theta_vl profile +values='off','cosine_inv_flux','target_inv_profile' + +[namelist:blayer=c_gust] +compulsory=true +description=Constant in the wind gust diagnostic +help=Tunable parameter used in the calculation of the wind gust. + =For many years this was set to 4.0 but a value of 3.14 is + =more approriate. This affects both forms of the wind gust + =diagnostics, wind_gust and scale_dep_wind_gust. +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:10.0 +sort-key=Panel-A02b +type=real + +[namelist:blayer=cbl_mix_fac] +compulsory=true +description=Parameter to control convective BL stability function +help=Parameter to control mixing from the Ri-based scheme in convective + =boundary layers, varying from 'Conventional' (0.0) to 'Standard' (1.0) + =LEM functions +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:1.0 +sort-key=Panel-A02a +type=real + +[namelist:blayer=cbl_opt] +compulsory=true +description=Convective BL stability function +!enumeration=true +help=Three options are available for the stability functions for unstable + =(negative) Richardson numbers: those described as the "standard" and + ="conventional" subgrid models in the LES of Brown (1999), and an option + =to adjust between the previous two using a parameter 'cbl_mix_fac'. + =The conventional model gives significantly less mixing than the standard. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A02 +trigger=namelist:blayer=cbl_mix_fac: 'adjustable'; +value-titles=Conventional LEM,Standard LEM,Adjustable LEM +values='conventional','standard','adjustable' + +[namelist:blayer=dec_thres_cloud] +compulsory=true +description=Decoupling threshold for cloudy boundary layers +help=This is recommended to be set to 0.1 +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:1.0 +sort-key=Panel-A11a +type=real + +[namelist:blayer=dec_thres_cu] +compulsory=true +description=Decoupling threshold for cumulus +help=This is recommended to be set to 0.05 +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:1.0 +sort-key=Panel-A11b +type=real + +[namelist:blayer=dyn_diag] +compulsory=true +description=Shear driven BL diagnosis options +!enumeration=true +help=In situations where surface conditions are close to neutral and the + =land fraction is less than a half, + =the thermodynamic parcel ascent diagnosis of both cumulus and + =non-local boundary layers are over-ruled to leave turbulent mixing + =to be determined by the local Richardson number scheme only. + ="zi/L used over sea" gives problems when BL_LEVELS is high, + =therefore "zi/L revised over sea" corrects this. + ="zi/L used in Cumulus over sea" applies this only to points + =diagnosed with Cumulus and strictly for sea points (fland<0.01, + =cf 0.5). + ="Ri based" also overrides Cumulus diagnosis if + =Zh(Ri) > Zlcl+zhloc_depth_fac*(Zhpar-Zlcl). + =Note that here Ri accounts for gradient adjustment by the + =non-local scheme. This option further restricts a Cumulus diagnosis + =to allow for disruption of cumulus formation through vertical wind + =shear (diagnosed through a sub-critical Richardson number profile + =extending well into the cloud layer). Under these circumstances the + =non-local boundary layer scheme is allowed to mix up to the original + =parcel ascent top. + = + =Additionally, + =for all options (other than 0) the consistency of the provisional + =diagnosis of an unstable boundary layer in CONV_DIAG is checked + =against the surface flux diagnosed by the surface exchange routines. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A09 +trigger=namelist:blayer=zhloc_depth_fac: 'ri_based'; +value-titles=zi/L revised over sea,zi/L used in Cumulus over sea,Ri based +values='zi_l_sea','zi_l_cu','ri_based' + +[namelist:blayer=dzrad_disc_opt] +compulsory=true +description=Cloud-top radiatively-cooled layer discretization options +!enumeration=true +help=The buoyancy-flux integration used to find the depth of mixing in + =stratocumulus layers is sensitive to the assumed depth of the cloud-top + =radiative cooling. However, this layer is often poorly resolved + =in the vertical, and there are options for how to treat it when it + =is too shallow to represent well on the grid: + =1) Set the base of the radiatively-cooled layer to be at theta-level + = nt - 1. Note that the top of the layer (the Sc-top) is allowed + = to vary continuously between model-levels (from rho-level nt+1 + = to rho-level nt+2). So this option makes the depth vary between + = 1.5 and 2.5 model-levels deep, with a sudden jump when the Sc-top + = passes a rho-level and nt jumps up. + =2) Set the base of the radiatively-cooled layer to be 1.5 model-levels + = below the accurate Sc-top (interpolating smoothly between the + = model-level heights). + = + = Both of these options satisfy a requirement that the base of the + = cloud-top layer falls below theta-level nt (otherwise vertical + = gradients used in the buoyancy flux integration are ill-defined). + = Under both options, the layer depth is subsequently increased up to + = at least 100m (or the base of the cloud) if it is shallower than that. + = Option 2 also includes any SL and qw gradients occuring within the + = radiatively-cooled layer when calculating the buoyancy-flux + = integrated over it (these are ignored in option 1). +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A10 +value-titles=1) Set base of layer at theta-level nt-1, + =2) Set base of layer smoothly 1.5 model-levels below cloud-top +values='level_ntm1','smooth_1p5' + +[namelist:blayer=entr_smooth_dec] +compulsory=true +description=Smoothly reduce surface-driven entrainment when decoupling +!enumeration=true +help=Reduce the surface-driven contribution to cloud-top entrainment + =smoothly as the strength of the decoupling grows (currently linearly + =dependent on the "svl" difference between cloud and sub-cloud layers + =in the range 0.5 to 1K. + =The second option also smoothly reduces the height-scale used to + =compute w* (which scales the surface-driven non-local mixing) from the + =Sc-top height to the SML-top height as a function of decoupling strength. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A10 +value-titles=Off, + =Smoothly taper surface entrainment terms, + =Also smoothly blend from zh to zhsc in w* +values='off','on','taper_zh' + +[namelist:blayer=flux_bc_opt] +compulsory=true +description=Surface flux production +!enumeration=true +help=This switch allows the user to specify the surface fluxes and/or surface + =stresses as follows: + = + = 'interactive' Interactive fluxes calculated by JULES + = 'specified_scalars' Specified scalar fluxes (sensible and latent heat) + = that are then calculated explicitly (this option is not recommended + = with interactive radiation because Tstar for upward LW is estimated) + = Fluxes are specified in namelist:specified_surface=function_name_fluxes. + = 'specified_scalars_tstar' As above but with prescribed surface temperature. + = 'specified_tstar' Specified surface temperatures, but not surface scalar fluxes + = Temperatures are specified in namelist:specified_surface=function_name_sst. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A01 +trigger=namelist:specified_surface=function_name_fluxes: 'specified_scalars','specified_scalars_tstar'; + =namelist:specified_surface=function_name_sst: 'specified_scalars_tstar', 'specified_tstar'; +value-titles=Interactive fluxes, Specified scalar fluxes only, Specified scalar fluxes and surface temperature, + =Specified surface temperature +values='interactive','specified_scalars','specified_scalars_tstar','specified_tstar' + +[namelist:blayer=free_atm_mix] +compulsory=true +description=Free atmospheric turbulent mixing option +!enumeration=true +help=Relax to SHARPEST: the stable stability function requested relaxes + =towards the "SHARPEST" function with height above the surface, + =with a fixed height scale of 1km. If "Do not reduce mixing lengths + =above the BL top" is selected this option will also smoothly merge + =to the asymptotic mixing length by 3km above the surface. + = + =Corrected NTML is as the original but corrects the level + =(ntml_local) below which the boundary layer value is used. + =The final option extends this version to use interactively diagnosed + =turbulent layer depths throughout the atmospheric column. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A05 +value-titles=Relax to SHARPEST,Original with corrected NTML, + =Original with diagnosed turbulent layer depths +values='to_sharp','ntml_corrected','free_trop_layer' + +[namelist:blayer=fric_heating] +compulsory=true +description=Apply heating source from turbulence dissipation +help=The drag on the resolved scale flow exerted by the boundary layer + =turbulence parametrization should ultimately be dissipated as heat + =but unless this option is selected this heating is ignored. It is + =recommended to be implemented in all model versions. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A04 +type=logical + +[namelist:blayer=interp_local] +compulsory=true +description=Choice of interpolation method for buoyancy gradient in Ri +!enumeration=true +help=Due to the winds and scalar fields being on staggered vertical grids, + =vertical interpolation is required to calculate the local turbulent + =diffusivity (as a function of shear and static stability). + =There are multiple options for the order of calculation / which + =fields to interpolate: + = 1) Interpolate the vertical gradients of sl,qw from their native + = rho-levels to theta-levels, and calculate stability, dbdz, and Kh + = on theta-levels. + = This has the advantage that the stability calculation can + = use the cloud-fraction on its native grid. But a disadvantage + = is that, since the gradients have to be interpolated, + = sharp changes in qw in cloud-free air above cloud-top inversions + = get multiplied by the in-cloud buoyancy coefficients. + = This can lead to arguably spurious instability at cloud-top + = and hence large fluxes through cloud-capping inversions. + = 2) Calculate stability, dbdz, on rho-levels where the gradients of + = sl,qw are defined (using an interpolated cloud-fraction), + = and then interpolate dbdz onto theta-levels to calculate Kh. + = This avoids the problem with option (1) at cloud-top inversions, + = but introduces additional complexity regarding how to + = interpolate the cloud-fraction onto rho-levels. The method used + = is to estimate the volume fraction of the rho-level that is + = saturated, based on the cloud-fractions at the neighbouring + = theta-levels, combined with the gradient of total-water + = supersaturation qw - qsat(Tl) between the two levels. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A04 +value-titles=Interpolate sl and qw gradients to compute dbdz on theta-levels, + =Compute dbdz on rho-levels and then interpolate to theta-levels +values='gradients','cf_dbdz' + +[namelist:blayer=kprof_cu] +compulsory=true +description=Switch for non-local mixing across the LCL in cumulus +!enumeration=true +help=When this option is not used, a diagnosis of a cumulus regime means + =that BL mixing is cut-off at the LCL leaving the convection scheme + =to couple the cloud and sub-cloud layers. + =The main advantages of using the BL scheme to couple the layers are + =that it is diffusive and the solution is implicit. Thus it responds + =more effectively to processes acting to cause the layers to diverge. + =Essentially two methods of generating the BL diffusion coefficients + =across the LCL in cumulus are available, although using the buoyancy + =flux integration algorithm is currently recommended. The less + =restrictive version of that allows the mixed layer top to be + =below the LCL +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A11 +value-titles=Use the buoyancy flux integration algorithm, + =Use less restrictive buoyancy flux integration algorithm +values='buoy_integ','buoy_integ_low' + +[namelist:blayer=l_converge_ga] +compulsory=true +description=Use gradient adjustment depth-dependence in b-flux integration +help=Improve accuracy of mixed-layer depths found via buoyancy-flux integration, + =by accounting for sensitivity of gradient adjustment to the depth. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A10 +type=logical + +[namelist:blayer=l_use_sml_dsc_fixes] +compulsory=true +description=Misc. fixes to surface and stratocumulus mixed layer diagnosis +help=This switch fixes, or mitigates, inadequacies in the original coding of + =the diagnosis of “decoupling” (the vertical extent of the diffusion + =profiles) by making a number of changes to the calculation of non-local + =turbulent mixing, related to the surface and stratocumulus mixed layers, + =and their coupling / decoupling: + =a) Remove accidental adding on of a separately-calculated entrainment + = flux at the SML-top when already using buoyancy-flux integration to + = estimate the entrainment diffusivity + = (avoids double-counting the SML entrainment-flux under cumulus). + =b) Don't turn on ksurf_iterate when the "well-mixed" test only confirms + = a diagnosed elevated DSC-layer should not be recoupled with the SML + = (caused some inconsistent setting of variables). + =c) Include missing factor of von Karman's constant times rho in the + = surface-driven Kh profile where this is added onto the DSC top-driven + = Kh profile in the buoyancy-flux integration + = (caused inaccurate estimate of the buoyancy-flux integral used to + = find the SML-top height under coupled DSC-layers). + =d) Close loop-hole in logic that allows highly stably-stratified + = cloudy layers to be suddenly mixed into the SML if a DSC-layer is + = pre-diagnosed above them + = (this was causing the code to skip a crucial test on whether the + = cloudy-layer up to parcel-top had too strong negative buoyancy-flux + = to be well-mixed). + =e) When finding the max cloud-fraction at the top of a turbulent layer + = (SML or DSC) for the purpose of computing cloud-depth, + = buoyancy-reversal and other cloud-top properties, + = check at ntml+1 as well as ntml and ntml-1 + = (original code missed instances where the inversion has nearly + = risen to the next level and ntml+1 is by-far the cloudiest level). + =f) Use revised setting of SML / DSC variables under recoupling. + = The original version diagnoses where the DSC-layer has been recoupled + = with the SML based on whether the SML-top model-level was changed + = inside excf_nl_9c, but there are rare instances where this doesn't give + = the right answer and the SML and DSC variables get muddled. + = The new version is more fool-proof, using flags explicitly set + = to indicate what has happened inside excf_nl_9c. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A10 +type=logical + +[namelist:blayer=near_neut_z_on_l] +compulsory=true +description=Threshold value of z/l below which to diagnose shear-driven BL +help=This is recommended to be set to 1.6 +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:10.0 +sort-key=Panel-A09a +type=real + +[namelist:blayer=new_kcloudtop] +compulsory=true +description=Use less level-dependent radiative flux jump calculation +help=This logical implements a new method to identify the cloud top in the + =radiative flux profile that results in a radiative flux jump estimation + = that has been found to be less resolution sensitive. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A10 +type=logical + +[namelist:blayer=ng_stress] +compulsory=true +description=Options for the Brown and Grant (1997) non-local stress scheme +!enumeration=true +help=This switch allows the user to choose between different physics options + =for the non-local stress profile of Brown and Grant (1997). + =The options are: + =1) BG97_limited, the Brown and Grant (1997) non-local stress profile + =applied above the surface layer with a limit on the surface stress used + =to scale the stress profile to avoid unphysical values, + =2) BG97_original, the same as BG97_limited but with the stress profile + =applied across the whole boundary layer (as originally defined by + =Brown and Grant (1997)). +ns=namelist/Science/UM Boundary layer +value-titles=Limited stress applied above the surface layer, + =Limited stress applied over full boundary layer depth +values='BG97_limited','BG97_original' + +[namelist:blayer=noice_in_turb] +compulsory=true +description=Ignore cloud ice in the BL turbulence scheme +help=If enabled the BL scheme will ignore all cloud ice + =(water content, qcf, and fraction, cff) in its conserved variables + =and mixing calculations. Specifically this includes: + =1) the calculation of buoyancy + =2) the calculation of saturated humidity + =3) the definition of conserved variables + = (ie sL=T+gz/cp - Lv qcl and qT=qv+qcl) + =To do so would effectively assume the timescales for ice freezing/melting + =are slower than the turbulence timescales, which is true for larger + =particles but perhaps less so for small crystals. +!kind=default +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A14 +type=logical + +[namelist:blayer=num_sweeps_bflux] +compulsory=true +description=Number of iterations used to converge buoyancy-flux criteria +help=The depth reached by Decoupled StratoCumulus mixing + =(and the height reached by the Surface Mixed Layer under some regimes) + =is determined by setting it such-that the vertical integral of + =negative turbulent buoyancy-flux at the base of a DSC (or top of a SML) + =equals a set small fraction of the integral of positive buoyancy-flux + =within the DSC-layer (or SML). The DSC-base or SML-top height satisfying + =this criterion is found by repeatedly sub-dividing the interval between + =one height that is too low and another that is too high into 4. + =num_sweeps_bflux sets the number of times the sub-dividision is repeated, + =and so determines the accuracy of the solution for the mixed-layer depths; + =each additional iteration reduces the error by a factor of 4. +!kind=default +ns=namelist/Science/UM Boundary layer +range=3:12 +sort-key=Panel-A10 +type=integer + +[namelist:blayer=p_unstable] +compulsory=true +description=Parameter for implicit solver in unstable BL column +help=Using 1.0 is recommended. In general, + =the higher these values are, + =the more stable the scheme becomes. However, + =running with great nonlinear stability at an + =area which is not required (where a weakly + =nonlinear is problem is solved) results in lower accuracy. +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:100.0 +sort-key=Panel-A12 +type=real + +[namelist:blayer=reduce_fa_mix] +compulsory=true +description=Options for where to reduce the local diffusion coefficients +!enumeration=true +help=Switch to decide where to keep the diffusion coefficient calculated + =by the local Richardson number scheme. It is found beneficial to avoid + =spurious mixing across well-defined inversions, + =particularly for stratocumulus-capped boundary layers, + =by setting these to zero. + =It can also be appropriate to remove this local mixing across the + =lifting condensation level in cumulus-capped layers. + =If the boundary layer mixing is blending with the Smagorinsky subgrid + =turbulence scheme then the local coefficients are only reduced by + =applying the 1D weighting function, + =rather than set to zero. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A06 +value-titles=Reduce in the levels spanning inversions and the LCL in cumulus, + =Reduce in the levels spanning inversions +values='inv_and_cu_lcl','inv_only' + +[namelist:blayer=sbl_opt] +compulsory=true +description=Stable BL stability function +!enumeration=true +help=There are many options for stable stability function in the Richardson + =number scheme that reflect the range of tunings used in operational models. + =The potential functions in increasing order of mixing strength are: + =LEM, SHARPEST, Meso, Louis and Long tails + =although not all these options have been coded into the LFRic interface. + = + =The LEM stability functions (which shut down turblence completely at a + =critical Ri=0.25) give a stability dependence more relevant to + =large-eddy simulation. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A03 +value-titles=LEM,SHARPEST,SHARP-sea; Mes-land +values='lem','sharpest','sharp_sea_mes_land' + +[namelist:blayer=sc_diag_opt] +compulsory=true +description=Options for diagnosing stratocumulus layers +!enumeration=true +help=This switch controls how the boundary-layer scheme decides which + =level is the top of a stratocumulus layer + =(where the Sc-top entrainment flux is applied). + =The available options are: + = 0) Original code: diagnose Sc based on svl gradient at non-cumulus points + = but set to the conv_diag parcel top at shallow cumulus points. + = 1) As (0) but also set the Sc-top to the conv_diag parcel top at + = "deep" cumulus points. + = 2) At all cumulus points, diagnose Sc-top based on max total-water RH + = instead of using the conv_diag parcel top. + = 3) Diagnose Sc-top based on max total-water RH at all points + = instead of using the svl gradient. +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A10 +value-titles=Original svl gradient and shallow Cu-top method, + =Relax to use parcel top at all convection points, + =Use max total-water RH method at convection points, + =Use max total-water RH method at all points +values='orig','cu_relax','cu_rh_max','all_rh_max' + +[namelist:blayer=sg_orog_mixing] +compulsory=true +description=Option for treating unresolved drainage flows +!enumeration=true +help=Drainage flows often form in hilly areas as the air near the surface + =cools at night. Where these flows are on scales too small to be + =resolved their effects on vertical mixing (through induced wind shear) + =should be included. Two independent methods to do this have been coded. + =Currently these require the orographic stress (LAND_SURF panel) and GWD + =schemes to be switched on in order to have the necessary ancillary + =fields loaded. The subgrid shear options currently convert these into + =a mean slope using an empirical relationship derived for the UKV only, + =and so this is not recommended for any other model. These options + =include the shear in the calculation of the Richardson number and + =diffusion coefficients, + =with an additional option to enhance the mixing lengths. The other + =option is to relate the length of the SHARPEST tail to subgrid orography, + =following McCabe and Brown (2007). +ns=namelist/Science/UM Boundary layer +sort-key=Panel-A07 +value-titles=None,Subgrid shear plus enhanced mixing lengths +values='none','shear_plus_lambda' + +[namelist:blayer=zhloc_depth_fac] +compulsory=true +description=Fractional cloud height reached by local BL depth calculation +!kind=default +ns=namelist/Science/UM Boundary layer +range=0.0:1.0 +sort-key=Panel-A09a +type=real diff --git a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/version22_30.py new file mode 100644 index 000000000..b8df6a2ec --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/version22_30.py @@ -0,0 +1,137 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/versions.py index d50380c9f..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,107 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.0/rose-meta.conf new file mode 100644 index 000000000..22d7661b7 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.0/rose-meta.conf @@ -0,0 +1,292 @@ +[namelist:chemistry] +compulsory=true +description=Chemistry settings +ns=namelist/Science/UM Chemistry +sort-key=Section-A16 +title=Chemistry + +[namelist:chemistry=chem_scheme] +compulsory=true +description=Chemistry scheme +!enumeration=true +help=Choice of UKCA chemistry scheme + = + =Currently available schemes are: + = 'Offline oxidants' which is the default scheme used + = with GLOMAP_mode for proto-GAL + = 'Strattrop' which is a full Stratosphere+Troposphere scheme + = 'Strat_test' which only switches on selected components of Strattrop + = This will be retired when Strattrop is fully implemented. + = 'flexchem' which is a flexible scheme for planetary atmospheres. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A01 +trigger=namelist:files=emiss_c2h6_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_c3h8_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_c5h8_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_ch4_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_co_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_hcho_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_me2co_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_mecho_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_meoh_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_nh3_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_no_aircrft_ancil_path: 'strattrop', 'strat_test' ; + =namelist:files=emiss_no_ancil_path: 'strattrop', 'strat_test' ; + =namelist:chemistry=l_ukca_ro2_ntp: 'strattrop', 'strat_test' ; + =namelist:chemistry=l_ukca_asad_full: 'offline_ox', 'strattrop', 'strat_test' ; + =namelist:chemistry=i_ukca_chem_version: 'offline_ox', 'strattrop', 'strat_test' ; + =namelist:chemistry=l_ukca_quasinewton: 'strattrop', 'strat_test' ; + =namelist:chemistry=top_bdy_opt: 'strattrop', 'strat_test' ; + =namelist:chemistry=l_ukca_linox_scaling: 'strattrop', 'strat_test' ; + =namelist:chemistry=flexchem_opt: 'flexchem'; + =namelist:chemistry=photol_scheme: 'strattrop', 'strat_test' ; + =namelist:chemistry=chem_timestep: 'offline_ox', 'strattrop', 'strat_test' ; +value-titles=none,offline_ox,strattrop,strat_test,flexchem +values='none','offline_ox','strattrop','strat_test','flexchem' + +[namelist:chemistry=chem_timestep] +compulsory=true +description=Chemistry timestep (seconds) +help=The UKCA chemical solver may not be called at every timestep + = for all model configurations. chem_timestep is the timestep + = for the chemistry solver, and determines the interval + = between sucessive calls to the chemistry in units of + = model timesteps. This chemical timestep affects the photolysis + = and aerosol models as well as the chemical solver. + = + = The timestep is specified in seconds, and must be a multiple of the + = model dynamical timestep +ns=namelist/Science/UM Chemistry +range=1:10800 +sort-key=Panel-A02c +type=integer + +[namelist:chemistry=fastjx_dir] +compulsory=true +description=Directory pathname for Fast-JX input files +help=Location of files containing the cross-section and scatterrer + =data. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A08a +type=character + +[namelist:chemistry=fastjx_mode] +compulsory=true +description=Method above cut-off level +help=Above the cut off level there are 3 options: + = 1: 'only lookup table' + = 2: 'combination of Fast-JX and lookup tables' + = 3: 'Fast-JX' + = The recommended option is to 'Use Lookup Tables' above a pressure + = cut-off of 20 hPa. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A07b +!type=integer +value-titles=only lookup table,Fast-JX and lookup table,Fast-JX only +values=1,2,3 + +[namelist:chemistry=fastjx_numwavel] +compulsory=true +description=Number of wavelengths to be used +help=It is possible to choose 8, 12 or 18 wavelength bins for Fast-JX. + =The 18 wavelength version is the full Fast-JX version. + =Choosing 12 is only suitable for troposphere only models + =and drops cross sections for stratospheric species. + =The 8 bin version is a fast troposphere only version. + =The choice between the 8 and 12 bin versions is a trade off + =between accuracy and speed. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A07c +!type=integer +value-titles='8 wavelengths','12 wavelengths','18 wavelengths' +values=8,12,18 + +[namelist:chemistry=fastjx_prescutoff] +compulsory=true +description=Cut-off Pressure for tabulated photolysis +help=The "Cut-off Pressure for tabulated photolysis" + = can be used to specify the pressure level (in Pascals -Pa) above + = which a simplified look-up table approach can be used to compensate + = for the lower wavelength limit of this scheme. The recommended + = option is to 'Use Lookup Tables' above a pressure cut-off of 20 Pa. +ns=namelist/Science/UM Chemistry +range=0:9999.999 +sort-key=Panel-A07c +type=real + +[namelist:chemistry=fjx_scat_file] +compulsory=true +description=filename for Fast-JX scatterer file +help=Fast-JX scatterer file containing the required scatterer data. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A08b +type=character + +[namelist:chemistry=fjx_solar_file] +compulsory=true +description=filename for Fast-JX solar cycle file +help=Fast-JX spectral file containing the required solar cycle spectral + =and time series data. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A09b +type=character + +[namelist:chemistry=fjx_solcyc_months] +compulsory=true +description=Months in solar cycle file +help=Number of months of data available in the fjx_solar_file +ns=namelist/Science/UM Chemistry +sort-key=Panel-A09c +type=integer + +[namelist:chemistry=fjx_solcyc_type] +compulsory=true +description=Apply solar variability to photolysis scheme +help=This is available for Fast-JX, not the 2-D Photolysis scheme + =(0) No solar cycle + =(1) Solar flux follows an observed solar cycle from a + =specified start year for a certain number months, + =outside of these times repeated average cyle is used + =(2) A repeated average cycle is used for all times. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A09a +trigger=namelist:chemistry=fjx_solar_file: 1,2 ; + =namelist:chemistry=fjx_solcyc_months: 1,2 ; +!type=integer +value-titles=no solar cycle,observed,average +values=0,1,2 + +[namelist:chemistry=fjx_spec_file] +compulsory=true +description=Filename for Fast-JX spectral file +help=Fast-JX spectral file containing the required cross-sections. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A08c +type=character + +[namelist:chemistry=flexchem_opt] +compulsory=true +description=Select option for flexible chemistry +!enumeration=true +help=Options: + = - None (abundances prescribed by e.g. input files), + = - Burrows & Sharp (1999, ApJ) analytic abundances for hot Jupiters, +ns=namelist/Science/UM Chemistry +sort-key=Panel-A03a +value-titles=none, Burrows & Sharp (1999) +values='none', 'bs1999' + +[namelist:chemistry=i_chem_timestep_halvings] +compulsory=false +description=Number of halvings for ASAD chemistry timestep +fail-if=this < 0 or this > 5 ; + =# number of chemistry timestep halvings must be between 0 and 5 +help=The number of times the chemistry timestep chem_timestep value is halved + = in UKCA's ASAD chemistry solver. + = + = For large values of ukca_chem_seg_size, setting a positive value of + = i_chem_timestep_halvings can skip unnecessary calculations. +ns=namelist/Science/UM Chemistry +range=0:5 +sort-key=Panel-A02c +type=integer + +[namelist:chemistry=i_ukca_chem_version] +compulsory=true +description=Chemical mechanism version +help=This version number controls the values of the rates + =and reactions used in ASAD-based chemical mechanisms. +ns=namelist/Science/UM Chemistry +range=107: +sort-key=Panel-A02b +type=integer + +[namelist:chemistry=l_ukca_asad_full] +compulsory=true +description=Call ASAD chemical solver with the full domain +help=Use (True) to select passing full (MPI/ local) domain to the + = ASAD N-R solver. + = False will pass data as individual or group of columns. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A02a +type=logical + +[namelist:chemistry=l_ukca_linox_scaling] +compulsory=true +description=Equally distribute Lightning NOx emissions using LOG(p) +help=When True, this logical makes the UKCA Lightning NOx routine + =redistribute the Lightning NOx emissions in the vertical + =linearly using LOG(pressure) and uses the same NOx production + =efficiency for cloud-to-ground and cloud-to-cloud flashes. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A06a +trigger=namelist:chemistry=lightnox_scale_fac: true; +type=logical + +[namelist:chemistry=l_ukca_quasinewton] +compulsory=true +description=Use quasi-Newton method in Newton-Raphson solver step +help=Controls use of quasi-Newton method during the ASAD (Newton-Raphson) + =solver step to improve speed of convergence: + =False for no scheme, + =True for quasi-Newton Broyden method. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A04 +type=logical + +[namelist:chemistry=l_ukca_ro2_ntp] +compulsory=true +description=To remove transport of RO2 tracers +help=if True, turns peroxy radical (RO2) in StratTrop to non-transported + =variables instead of transported tracers +ns=namelist/Science/UM Chemistry +sort-key=Panel-A02 +type=logical + +[namelist:chemistry=lightnox_scale_fac] +compulsory=true +description=Lightning NOx emiss scale factor +help=Scaling factor for NOx emissions due to Lightning +ns=namelist/Science/UM Chemistry +range=0.0: +sort-key=Panel-A06b +type=real + +[namelist:chemistry=photol_scheme] +compulsory=true +description=Photolysis scheme +!enumeration=true +help=Choice of UKCA photolysis scheme + = Only available for 'Strattrop' Chemistry scheme currently. + =Currently available schemes are: + = 'Off': No photolysis scheme used + = 'Prescribed': Use prescribed or 'pseudo' rates - as lodged at vn1.2 + = 'FastJX': Use the Fast-JX scheme +ns=namelist/Science/UM Chemistry +sort-key=Panel-A07a +trigger=namelist:chemistry=fastjx_mode: 'fastjx' ; + =namelist:chemistry=fastjx_numwavel: 'fastjx' ; + =namelist:chemistry=fastjx_prescutoff: 'fastjx' ; + =namelist:chemistry=fastjx_dir: 'fastjx' ; + =namelist:chemistry=fjx_scat_file: 'fastjx' ; + =namelist:chemistry=fjx_solcyc_type: 'fastjx' ; + =namelist:chemistry=fjx_spec_file: 'fastjx' ; +value-titles=Off,Prescribed,FastJX +values='off','prescribed','fastjx' + +[namelist:chemistry=top_bdy_opt] +compulsory=true +description=Select method of treating top boundary for selected species +!enumeration=true +help=Options: Do nothing specific at the top, + = Overwrite top 2 levels with 3rd-highest level for all species except H2O, + = Overwrite top level with 2nd-highest level for all species, + = Impose top boundary condition derived from ACE-FTS for NO, CO, O3, + = Impose top boundary condition derived from ACE-FTS for NO, CO, O3, H2O. +ns=namelist/Science/UM Chemistry +sort-key=Panel-A05 +value-titles=Do not overwrite, Overwrite top 2 levels (except H2O), + = Overwrite only top level, Overwrite NO CO & O3 top level, + = Overwrite NO CO O3 and H2O top level +values='no_overwrt', 'overwrt_top_two_lev', 'overwrt_only_top_lev', + ='overwrt_co_no_o3_top', 'overwrt_co_no_o3_h2o_top' diff --git a/interfaces/physics_schemes_interface/rose-meta/um-cloud/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-cloud/version22_30.py new file mode 100644 index 000000000..c67e852e0 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-cloud/version22_30.py @@ -0,0 +1,56 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-cloud/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-cloud/versions.py index b60bbc8a2..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-cloud/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-cloud/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,26 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.0/rose-meta.conf new file mode 100644 index 000000000..ed341bd31 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.0/rose-meta.conf @@ -0,0 +1,630 @@ +#============================================================================== +# CLOUD: +#============================================================================== + +[namelist:cloud] +compulsory=true +description=Cloud parametrization +ns=namelist/Science/UM Cloud +sort-key=Section-A05 +title=Cloud + +[namelist:cloud=cff_spread_rate] +compulsory=true +description=Ice cloud fraction spreading rate +help=When the effects of shear on falling ice cloud are either ignored + = or derived from model winds, + =this controls the rate at which ice + = cloud fraction spreads. +!kind=default +ns=namelist/Science/UM Cloud +range=0.0:1.0e-1 +sort-key=Panel-A04a +type=real + +[namelist:cloud=cld_fsd_hill] +compulsory=true +description=Whether to use the Hill scheme for fractional standard deviation of condensate +help=If true: uses the Hill et al (2015) parametrization of fractional standard deviation + = (FSD) of cloud condensate in both the microphysics and the radiation schemes. + =If false: uses the Boutle et al (2014) scheme for fractional standard deviation in the + = the microphysics and a time-and-space invariant value for radiation. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A06 +trigger=namelist:cloud=cloud_horizontal_liq_fsd: .false.; + =namelist:cloud=cloud_horizontal_ice_fsd: .false.; + =namelist:cloud=fsd_min_conv_frac: .true.; + =namelist:cloud=fsd_conv_const: .true.; + =namelist:cloud=fsd_nonconv_liq_const: .true.; + =namelist:cloud=fsd_nonconv_ice_const: .true.; +type=logical + +[namelist:cloud=cloud_call_b4_conv] +compulsory=true +description=Extra call to the large-scale-cloud scheme before convection +help=Switch to perform an extra call to the large-scale cloud scheme before the + = call to convection in atmos_physics2, to ensure the latest T,q,qcl,cf + = seen by convection are consistent with the cloud scheme assumptions. + = For PC2, this entails an extra call to PC2 checks and PC2 initiation + = before convection, and the application of advective pressure forcing + = which in the UM is controlled by the switch l_pc2_sl_advection. + = For diagnostic cloud schemes, this only updates the "latest" cloud + = fraction fields passed into convection; the primary fields for the cloud + = fractions are still calculated in ni_imp_ctl as usual. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A12 +type=logical + +[namelist:cloud=cloud_horizontal_ice_fsd] +compulsory=true +description=Relative standard deviation of ice cloud condensate +help=Defines the sub-grid ice cloud horizontal inhomogeneity using a single + =global value of the ice cloud condensate relative standard deviation + =(standard deviation / mean). +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A07 +type=real + +[namelist:cloud=cloud_horizontal_liq_fsd] +compulsory=true +description=Relative standard deviation of liquid cloud condensate +help=Defines the sub-grid liquid cloud horizontal inhomogeneity using a single + =global value of the liquid cloud condensate relative standard deviation + =(standard deviation / mean). +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A07 +type=real + +[namelist:cloud=cloud_pc2_tol] +compulsory=true +description=PC2 threshold liquid cloud fraction to retain cloud (RH < RHcrit) +help=When RH is below RHcrit, instances of liquid-cloud fraction below + =cloud_pc2_tol are reset to zero at the end of each timestep. + =Also instances of liquid-cloud fraction above 1 - cloud_pc2_tol + =are reset to 1. + =This threshold is also used to determine when to initiate cloud + =from clear-sky (or holes in cloud from fully overcast) + =under the "simplified" PC2 initiation logic option (i_pc2_init_logic=2). + = + =Note that pc2_checks performs an independent additional check to remove + =liquid-cloud fractions below cloud_rounding_tol = 1.0E-12. +!kind=double +ns=namelist/Science/UM Cloud +range=1.0e-12:1.0e-1 +sort-key=Panel-A02b +type=real + +[namelist:cloud=cloud_pc2_tol_2] +compulsory=true +description=PC2 threshold liquid cloud fraction to retain cloud (RH > RHcrit) +fail-if=this > namelist:cloud=cloud_pc2_tol +help=When RH is above RHcrit, instances of liquid-cloud fraction below + =cloud_pc2_tol_2 are reset to zero at the end of each timestep. + =Also instances of liquid-cloud fraction above 1 - cloud_pc2_tol_2 + =are reset to 1. + =This threshold is also used in a couple other places: + = - Optical depth filtered cloud diagnostics are set to zero where + = the combined cloud fraction (stratiform + convective) + = is below the threshold. + = - The riming process in the Wilson Ballard microphysics scheme is only + = performed where the mixed-phase cloud-fraction exceeds the threshold. + = + =Note that pc2_checks performs an independent additional check to remove + =liquid-cloud fractions below cloud_rounding_tol = 1.0E-12. + = + =Also note that cloud_pc2_tol_2 should not exceed cloud_pc2_tol. +!kind=double +ns=namelist/Science/UM Cloud +range=1.0e-12:1.0e-1 +sort-key=Panel-A02b +type=real + +[namelist:cloud=dbsdtbs_turb_0] +compulsory=true +description=PC2 erosion rate parameter / s-1 +help=Controls the rate of turbulent dissipation of liquid-cloud in grid-mean + =subsaturated environments (and the rate of filling-in of sub-grid + =clear-sky fraction in grid-mean supersaturated environments). + =This process corresponds to narrowing the width of the sub-grid + =moisture distribution. The rate of turbulent dissipation of cloud liquid + =water-content is parameterised as: + = + = dqcl/dt = -K 2 Cl (1 - Cl) (qsat(T) - q) + = + =where q is the grid-mean vapour mixing-ratio, qsat(T) is the saturation + =vapour mixing-ratio w.r.t. liquid water at the grid-mean temperature, + =Cl is the liquid cloud-fraction, and K is the rate coefficient + =given by this namelist input. + =This formula makes the rate of cloud erosion scale with the + =subsaturation of the environment, and an estimate of the + =sub-grid area of exposed cloud edges. + =The rate of change of Cl is then calculated based on the width-narrowing + =rate which is consistent with the computed rate of evaporation of qcl. +!kind=double +ns=namelist/Science/UM Cloud +range=0.0:1.0e-2 +sort-key=Panel-A09b +type=real + +[namelist:cloud=ent_coef_bm] +compulsory=true +description=Bimodal cloud-scheme parcel method entrainment coefficient +help=In the bimodal cloud-scheme, when representing the skewness of the + =sub-grid saturation distribution using entraining parcels + =(i_bm_ez_opt='entpar'), this dimensionless coefficient scales the rate of + =dilution of the modes from above and below towards the current + =model-level values. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +type=real + +[namelist:cloud=ez_max] +compulsory=true +description=Maximum entrainment zone depth for bimodal cloud scheme (m) +help=The bimodal cloud scheme (or bimodal initiation in PC2) searches for + = entrainment zones below sharp inversions. Ez_max sets a limit to how + = deep entrainment zones can become. The recommended value is 400m. +!kind=default +ns=namelist/Science/UM Cloud +range=300.0:500.0 +sort-key=Panel-A10 +type=real + +[namelist:cloud=falliceshear_method] +compulsory=true +description=Select how shear affects falling ice cloud fraction +!enumeration=true +help=Falling ice increases the ice cloud fraction in the layer it falls + = into. There is the option to include the effects of the further + = increase in the grid-box cloud fraction due to the lateral + = displacement as the ice falls because of the vertical shear of + = the horizontal wind. Either: + = a) the effects of shear can be ignored, + = b) a globally constant shear (not calculated from the actual wind) + = can be assumed or + = c) the effects of shear are considered and the shear is calculated + = from the model wind. + = + =When not using the globally constant value an additional ice cloud + = fraction source term is used to represent the lateral spreading out + = of ice cloud fraction while maintaining the same grid-box mean + = ice water content. +ns=namelist/Science/UM Cloud +sort-key=Panel-A04 +trigger=namelist:cloud=cff_spread_rate: 'off','real' +value-titles=Ignore the effects of shear, + =Assume a globally constant shear, + =Use shear derived from model winds +values='off','constant','real' + +[namelist:cloud=filter_optical_depth] +compulsory=true +description=Apply optical depth filter for cloud diagnostics. +help=If false: outputs the derived cloud diagnostics without any processing. + =If true: makes a simple estimate of the ice optical depth in each layer + = and ignores optically thin layers when calculating derived + = cloud diagnostics. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A11 +trigger=namelist:cloud=opt_depth_thresh: .true. +type=logical + +[namelist:cloud=fsd_conv_const] +compulsory=true +description=Inhomogeneity factor for convective cloud +help=Under some options for the representation of subgrid scale horizontal + = ice and liquid water content variability there is a + = different parameter scaling the variability under a convective + = cloud regime compared to a non-convective cloud one. Here the user + = can set that parameter for the convective regime. Originally in + = Hill et al (2015) this was set to 2.54 (their Eq 3) while GA7 to GA9 + = use the larger value of 2.81 (so more inhomogeneous) +!kind=default +ns=namelist/Science/UM Cloud +range=0.0: +sort-key=Panel-A07b +type=real + +[namelist:cloud=fsd_min_conv_frac] +compulsory=true +description=Minimum convective fraction in FSD parametrization +help=The minimum convective cloud fraction under which to consider a + = grid-box as convective when applying the Hill et al. (2015) + = fractional standard deviation parametrization +!kind=default +ns=namelist/Science/UM Cloud +range=0.0:1.0 +sort-key=Panel-A07a +type=real + +[namelist:cloud=fsd_nonconv_ice_const] +compulsory=true +description=Inhomogeneity factor for non-convective ice cloud +help=Under some options for the representation of subgrid scale horizontal + = ice and liquid water content variability there is a + = different parameter scaling the variability under a convective + = cloud regime compared to a non-convective cloud one. Here the user + = can set that parameter for the non-convective regime. Originally in + = Hill et al (2015) this was set to 0.96 (their Eq 3) while GA7 to GA9 + = use the larger value of 1.14 (so more inhomogeneous) +!kind=default +ns=namelist/Science/UM Cloud +range=0.0: +sort-key=Panel-A07d +type=real + +[namelist:cloud=fsd_nonconv_liq_const] +compulsory=true +description=Inhomogeneity factor for non-convective liquid cloud +help=Under some options for the representation of subgrid scale horizontal + = ice and liquid water content variability there is a + = different parameter scaling the variability under a convective + = cloud regime compared to a non-convective cloud one. Here the user + = can set that parameter for the non-convective regime. Originally in + = Hill et al (2015) this was set to 0.96 (their Eq 3) while GA7 to GA9 + = use the larger value of 1.14 (so more inhomogeneous) +!kind=default +ns=namelist/Science/UM Cloud +range=0.0: +sort-key=Panel-A07c +type=real + +[namelist:cloud=i_bm_ez_opt] +compulsory=true +description=Bimodal cloud scheme entrainment zone options +!enumeration=true +help=In the bimodal cloud-scheme + = (or bimodal-based initiation with PC2), + = There are several options for how to represent the skewness of + = the sub-grid saturation distribution at entrainment zones: + = (1) - Original method; each model-level is diagnosed to be either + = in an entrainment zone or not (based on the presence of a + = local maximum in dTl/dz). Model-levels inside an entrainment + = zone have skewness represented by a combination of modes drawn + = from discreet model-levels at the base and top of that zone. + = Model-levels not diagnosed to be in an entrainment zone + = have a symmetrical distribution / no skewness. + = (2) - Subcritical-only method; as (1), but the diagnosis of an + = entrainment zone additionally requires that the zone overlaps + = with a turbulent layer (either Ri < 1, or below the top height + = of non-local boundary-layer mixing). + = (3) - Entraining parcel method; all model-levels are allowed to have + = skewness, represented by drawing modes from above and below + = based on the properties of entraining parcels subsided from + = above / ascended from below. The entrainment rate scales with + = 1 / the turbulent length-scale Km/sqrt(w_var), + = so that the parcels tend to the current environment values if + = the turbulent length-scale is small + = (so that skewness becomes negigible in this limit). +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +trigger=namelist:cloud=ent_coef_bm: 'entpar'; +value-titles=Original method, + =Subcritical-only method, + =Entraining parcel method +values='orig','subcrit','entpar' + +[namelist:cloud=i_pc2_erosion_numerics] +compulsory=true +description=Numerical method for time integration of PC2 cloud erosion +!enumeration=true +help=The PC2 erosion term is often "fast" relative to the timestep length, + =which causes problems with numerical overshoot; e.g. when convection + =detrains cloud into a dry environment, the erosion rate is often + =high enough to remove all the detrained cloud within the timestep. + = + =With the explicit numerical method, + =this is addressed by not allowing erosion to act on + =the current timestep convective cloud increment, so that some + =detrained cloud survives to the end of the timestep. + =However, that method yields an end-of-timestep cloud amount which + =scales with the timestep length, which is problematic. + = + =With the implicit numerical method, erosion is allowed + =to act on the fully updated cloud fields after convection, + =but is solved such that the erosion rate applied is approximately + =consistent with the cloud-fraction that will occur after the + =erosion increment has been added on. + =This avoids the numerical overshoot, while reducing timestep sensitivity. + = + =One problem with the implicit method is that it makes it impossible for + =erosion to completely remove cloud. This makes it easy for numerical + =diffusion in the model to spread small cloud amounts far and wide, + =even into grid-points with low RH where there shouldnt be any cloud. + = + =A 3rd option computes an approximate analytical solution to the equations + =posed for the erosion, such that the rate of removal of qcl does decline + =realistically as cfl approaches zero, but the cloud can eventually + =be eroded away completely. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A09b +value-titles=Explicit forwards-in-time, + =Implicit w.r.t. cloud-fraction, + =Analytical solution +values='explicit','implicit','analytic' + +[namelist:cloud=ice_width] +compulsory=true +description=Width of vapour distribution in liquid-free part of gridbox +help=Ice width specifies the ice content (in terms of a fraction of + = qsat_liq) that corresponds to a factor of two reduction in the + = width of the vapour distribution in the liquid-free part of the + = gridbox. This is only available if a subgrid partitioning of + = out-of-liquid-cloud water vapor is requested (subgrid_qv=true). +!kind=default +ns=namelist/Science/UM Cloud +range=0.0:1.0 +sort-key=Panel-A05a +type=real + +[namelist:cloud=l_bm_sigma_s_grad] +compulsory=true +description=Account for local gradients in sub-grid saturation variance +help=In the bimodal cloud-scheme + = (or bimodal-based initiation with PC2), + = correct the saturation variance sigma_S given to each mode of the + = sub-grid moisture PDF, to account for the local vertical gradient + = in grid-mean saturation. Also corrects the calculation of + = dqsat/dz following a parcel to account for the change in pressure. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +type=logical + +[namelist:cloud=l_bm_tweaks] +compulsory=true +description=Make several miscellaneous minor tweaks to the bimodal cloud-scheme +help=In the bimodal cloud-scheme + = (or bimodal-based initiation with PC2), + = this switch activates the following minor changes: + = a) Impose a minimum limit on the turbulent moisture variance, + = consistent with the limit already imposed when determining + = where condensation should occur. + = b) Truncate the Gaussian distributions at max_sigmas standard deviations, + = consistent with the logic determining where condensation should occur. + = c) Add extra checks to prevent the scheme from predicting negative qcl + = where q is negative. + = d) Also avoid negative qcl resulting from floating point rounding error + = in a calculation of mixed-phase fraction. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +type=logical + +[namelist:cloud=max_sigmas] +compulsory=true +description=Max width of bimodal cloud-scheme Gaussian PDFs +help=The bimodal cloud-scheme assumes the local turbulent moisture + =fluctuations follow Gaussian PDFs. Strictly speaking, Gaussians + =never quite fall to zero, so technically assuming Gaussian dsitributions + =can never yield zero cloud-amount. To avoid getting silly tiny + =cloud-fractions everywhere, the Gaussians are truncated at a certain + =number of standard deviations from their means. This namelist + =input sets that number. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +type=real + +[namelist:cloud=min_sigx_ft] +compulsory=true +description=Bimodal cloud-scheme minimum free troposphere moisture variability +help=The bimodal cloud-scheme diagnoses the standard deviation of sub-grid + =moisture variability based on boundary-layer scheme turbulence fields. + =However, often the free troposphere can contain large moisture variability + =in non-turbulent conditions (e.g. leftover from earlier convection). + =This namelist input sets an imposed minimum standard deviation of the + =unimodal moisture PDFs (in units of RH), applied only in the free + =troposphere, to account for missed non-turbulent moisture variability. + =Note that an equivalent "RHcrit" (threshold RH for cloud formation) + =is given by 1 - min_sigx_ft * max_sigmas. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +type=real + +[namelist:cloud=mphys_erosion] +compulsory=true +description=Include PC2 erosion as a microphysical term +help=If true: PC2 erosion is included with the microphysics code + =If false: PC2 erosion is included with the convection code +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A09 +type=logical + +[namelist:cloud=opt_depth_thresh] +compulsory=true +description=Cloud diagnostics optical depth threshold. +help=Amount of ice optical depth below which cloud cover in + = that layer is ignored when using filter_optical_depth. +!kind=default +ns=namelist/Science/UM Cloud +range=0.0:10.0 +sort-key=Panel-A11a +type=real + +[namelist:cloud=pc2_init_logic] +compulsory=true +description=Options for where to allow PC2 initiation to operate +!enumeration=true +help=(1) Original logic; + = Tests are performed to check whether the cloud cover is 0 or 1 + = (but if it is below zero degree C we check for cloud cover less + = than 0.05 or greater than 1). + = Tests on being above the LCL when considering initiating away from 0 are + = also done early on, confusing the logic somewhat. + = Also the logic prevents PC2 initiating cloud above a convective + = boundary layer (because of assumption that there is a convection + = scheme in use that will detrain cloud and create cloud that way instead). + = This is an issue in a convection-permitting model where there is no + = convection scheme to create that cloud via detrainment. + = + =(3) Much simpler logic that should yield smoother behaviour; + = The diagnostic cloud scheme calculations (Smith or Bimodal) + = are performed at any grid-point where they are expected to yield + = nonzero liquid water content, regardless of the existing cloud fraction. + = The diagnosed qcl is then taken as a minimum limit applied + = to the PC2 prognostic qcl. Cloud fraction is adjusted towards the + = diagnostic scheme value in proportion to the fractional increase + = of qcl by initiation (or the fractional increase of saturation deficit + = at points which are grid-mean total-water supersaturated). +ns=namelist/Science/UM Cloud +sort-key=Panel-A02b +value-titles=Original,Smooth +values='original','smooth' + +[namelist:cloud=pc2ini] +compulsory=true +description=Method for doing PC2 initiation +!enumeration=true +help=Smith-like initiation as described in Wilson et al (2008). When cloud + = fraction is 0 or 1, cloud will be generated or removed based on a + = triangular subgrid PDF with a width based on the RHcrit profile. + = + =Bimodal scheme: call the bimodal cloud scheme when cloud fraction is 0 + = or 1 to determine whether cloud should be initiated or removed based + = on a bimodal Gaussian subgrid PDF with variances determined from the + = turbulent properties as in Furtado et al. (2016). +ns=namelist/Science/UM Cloud +sort-key=Panel-A02a +value-titles=Smith,Bimodal +values='smith','bimodal' + +[namelist:cloud=rh_crit] +!bounds=namelist:extrusion=number_of_layers +compulsory=true +description=Critical relative humidity +fail-if=len(this) != namelist:extrusion=number_of_layers ; +help=The critical relative humidity is used in the cloud scheme to define + = the ratio at which cloud starts to form. Values may vary depending on + = the configuration. Please refer to standard jobs for current + = recommended settings. + = + = The number of values must match the number of levels in the model. + = +!kind=default +length=: +ns=namelist/Science/UM Cloud +range=0.0:1.0 +sort-key=Panel-A03 +type=real + +[namelist:cloud=rh_crit_opt] +compulsory=true +description=RHCrit parametrization method +!enumeration=true +help=If no parametrization is selected, + =the values in the table below + = are used. + = + =The boundary layer TKE based method predicts the sub-grid + = variability based on the gradients, + =eddy diffusivities and + = TKE predicted by the boundary layer scheme. It does still + = make use of the table values in the microphysics code for + = parametrizing the RH of the clear sky portion of the grid-box. +ns=namelist/Science/UM Cloud +sort-key=Panel-A02 +value-titles=No parametrization, + =Boundary layer TKE based method +values='namelist','tke' + +[namelist:cloud=scheme] +compulsory=true +description=Cloud scheme +!enumeration=true +help=Choice of UM cloud scheme to use + = + = Smith scheme (1990): + = Uses the diagnostic cloud fraction and condensate variables, + = based on a symmetric triangualar PDF of subgrid variability. + = + = Bimodal scheme (Van Weverberg et al 2021) + = Uses the diagnostic cloud fraction and condensate variables, + = based on a bimodal PDF of sugrid variability. + = + = PC2 scheme (Wilson et al 2008): + = Uses the prognostic cloud and prognostic condensate scheme. + = + = Note: Disabling the cloud scheme will result in no updates to + = the cloud fraction or water content from the cloud scheme. + = Micro-physics updates to cloud are unaffected by this + = setting. + = +ns=namelist/Science/UM Cloud +sort-key=Panel-A01 +trigger=namelist:cloud=mphys_erosion: 'pc2' ; + =namelist:cloud=i_pc2_erosion_numerics: 'pc2' ; + =namelist:cloud=dbsdtbs_turb_0: 'pc2' ; + =namelist:cloud=ez_max: 'pc2', 'bimodal' ; + =namelist:cloud=i_bm_ez_opt: 'pc2', 'bimodal' ; + =namelist:cloud=l_bm_sigma_s_grad: 'pc2', 'bimodal' ; + =namelist:cloud=l_bm_tweaks: 'pc2', 'bimodal' ; + =namelist:cloud=max_sigmas: 'pc2', 'bimodal' ; + =namelist:cloud=min_sigx_ft: 'pc2', 'bimodal' ; + =namelist:cloud=turb_var_fac_bm: 'pc2', 'bimodal' ; + =namelist:external_forcing=pc2_force_response: 'pc2'; +value-titles=Smith, PC2, Bimodal +values='smith', 'pc2', 'bimodal' + +[namelist:cloud=subgrid_qv] +compulsory=true +description=Calculate a partitioning of water vapor outside of liquid cloud +help=Setting this option to true partitions the out-of-liquid-cloud water vapor + =in each gridbox between clear-sky and sublimating and depositing ice-cloud + =regions. If this is turned off then qv is the same throughout the + =clear-sky and ice-cloud parts of each gridbox. Which means that the ice + =is either entirely sublimating of entirely growing, + =depending on the value of + =the in-ice-cloud relative humidity. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A05 +trigger=namelist:cloud=ice_width: .true. +type=logical + +[namelist:cloud=turb_var_fac_bm] +compulsory=true +description=Bimodal cloud-scheme unimodal variance coefficient +help=In the bimodal cloud-scheme, this dimensionless coefficient + =scales the widths of the local turbulent sub-grid saturation PDFs. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A10 +type=real + +[namelist:cloud=two_d_fsd_factor] +compulsory=true +description=Factor to convert 1D FSD for straight line to 2D value +help=Current parametrizations of FSD (fractional standard deviation, + =a measure + =of subgrid variability) of cloud water content used in radiation and + =microphysics schemes are based on observations taken in a 1D line. For the + =UM we require the FSD for a 2D gridbox, + =which is generally larger. We + =account for this difference by multiplying the 1D fsd by this value. +!kind=default +range=1:2 +sort-key=Panel-A08b +type=real + +[namelist:cloud=use_fsd_eff_res] +compulsory=true +description=Whether to use a hardwired effective resolution in fractional standard deviation (FSD) scheme +help=If true: use the FSD equations (from Boutle et al (2014) or Hill et al (2015)) + = with a fixed grid-size representative of N96/C48. + =If false: use the FSD equations (from Boutle et al (2014) or Hill et al (2015)) + = with an estimate of the grid-size calculated from the grid. +!kind=default +ns=namelist/Science/UM Cloud +sort-key=Panel-A08a +type=logical diff --git a/interfaces/physics_schemes_interface/rose-meta/um-convection/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-convection/version22_30.py new file mode 100644 index 000000000..68b9fcd3a --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-convection/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-convection/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-convection/versions.py index 5a3ba41f4..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-convection/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-convection/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.0/rose-meta.conf new file mode 100644 index 000000000..b63b84efe --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.0/rose-meta.conf @@ -0,0 +1,170 @@ +#============================================================================== +# CONVECTION: +#============================================================================== + +[namelist:convection] +compulsory=true +description=Convection parametrization +ns=namelist/Science/UM Convection +sort-key=Section-A06 +title=Convection + +[namelist:convection=cape_timescale] +compulsory=true +description=Timescale in seconds for CAPE closure scheme +help=This determines the e-folding time for the dissipation of CAPE. + = There is some observational evidence for a timescale of the order of + = an hour. The convection scheme seems to work better with a shorter CAPE + = timescale of around half an hour (1800 secs). +!kind=default +range=1:9999999 +sort-key=Panel-03 +type=real + +[namelist:convection=cv_scheme] +compulsory=true +description=Convection scheme +!enumeration=true +help=Convection scheme to use, options are: + =GregoryRowntree - UM 6A mass flux scheme + =LambertLewis - UM other convection scheme 10 + =Comorph - ComorphA scheme +sort-key=Panel-01 +trigger=namelist:convection=number_of_convection_substeps: 'gregory_rowntree'; + =namelist:convection=cape_timescale: 'gregory_rowntree'; + =namelist:convection=efrac: 'gregory_rowntree'; + =namelist:convection=prog_ent_min: 'gregory_rowntree'; + =namelist:convection=orig_mdet_fac: 'gregory_rowntree'; + =namelist:convection=par_gen_mass_fac: 'comorph'; + =namelist:convection=par_gen_rhpert: 'comorph'; + =namelist:convection=par_radius_ppn_max: 'comorph'; +value-titles=GregoryRowntree, LambertLewis, Comorph +values='gregory_rowntree','lambert_lewis','comorph' + +[namelist:convection=dx_ref] +compulsory=true +description=Reference grid-length for Comorph A resolution-dependence / m +help=When using the resolution-dependent link between parcel radius + =and precipitation rate, dx_ref is the grid-length at which the + =namelist input value of par_radius_ppn_max applies. + =Typically set to 50000.0m (ie. 50km). +!kind=default +range=100.0:1000000.0 +sort-key=Panel-08 +type=real + +[namelist:convection=efrac] +compulsory=true +description=Evaporative fraction of fluxes at mid-level cloud base +help=This defines the ratio of latent heat flux to sensible plus latent + = heat flux at mid-level cloud base due to the initial perturbation. + = Only used if md_pert_opt=1 or 2. If md_pert_opt=2 then efrac just + = sets the cloud base evaporative fracton away from the boundary + = layer. +!kind=default +range=-10.0:10.0 +sort-key=Panel-03b +type=real + +[namelist:convection=l_cvdiag_ctop_qmax] +compulsory=true +description=Revised check for well-mixed q-profile in convective diagnosis. +help=In the convective diagnosis "cumulus test", use a revised + =check for a well-mixed q-profile. By default, grid-columns where + =the mean vertical q-gradient between cloud-base and the parcel-top is + =small are not allowed to diagnose cumulus. But if this switch is on, + =they are allowed if the gradient between cloud-base and any local + =minimum q found below the parcel-top is larger. This accounts for + =occasions when the profile is not well-mixed, but contains a local + =maximum q at cloud-top (due to strong detrainment there), with drier + =air beneath. +!kind=default +sort-key=Panel-01 +type=logical + +[namelist:convection=number_of_convection_substeps] +compulsory=true +description=Number of convection substeps per model time step +help=Normal set to 2 for Gregory Rowntree scheme when used in the UM. + =Ideally we would prefer this as 1 + =Has been set higher than 2 by users trying to avoid UM instabilities + =in the past. Not recommended as a solution to model instabilities. +!kind=default +range=1:5 +sort-key=Panel-02 +type=integer + +[namelist:convection=orig_mdet_fac] +compulsory=true +description=Factor multiplying the original mixing detrainment rate. +help=Factor multiplying the original mixing detrainment rate. + =Original default 1.0 +!kind=default +range=0.0:5.0 +sort-key=Panel-03d +type=real + +[namelist:convection=par_gen_mass_fac] +compulsory=true +description=Coefficient scaling the initiating mass sources (dimensionless) +help=Higher values could mean that the layer-cloud in unstable environments + =convects away more rapidly, leading to reduced layer-cloud in such + =environments. + =Recommended value 0.25 +!kind=default +range=0.01:1.0 +sort-key=Panel-04 +type=real + +[namelist:convection=par_gen_rhpert] +compulsory=true +description=Comorph neutrally-buoyant parcel initial RH perturbation (fractional) +help=Sets the magnitude of the "background" parcel initial moisture excess + = in Relative Humidity (decimal fraction). +!kind=default +sort-key=Panel-05 +type=real + +[namelist:convection=par_radius_ppn_max] +compulsory=true +description=Comorph precip rate at which max parcel radius scaling occurs. +help=Scales the parcel initial radius, which determines the entrainment rate. +!kind=default +sort-key=Panel-06 +type=real + +[namelist:convection=prog_ent_min] +compulsory=true +description=Minimum scaling when calculating entrainment from prognostic field +help=Minimum scaling applied when calculating entrainment scaling from + = 3d prognostic field based on surface precipitation. + = 6a scheme only. Used under ent_opt_md,ent_opt_dp=6 or 7 and needs + = l_conv_prog_precip=T. +!kind=default +range=0.0:5.0 +sort-key=Panel-03c +type=real + +[namelist:convection=qlmin] +compulsory=true +description=Minimum critical cloud condensate +help=Minimum Critical Cloud Condensate + = + = This sets the minimum value of the critical cloud condensate profile. + = This is related to the option settings for ccw_for_precip_opt. + = This will always be applied for option 4 but will only be applied to + = options 0-3 if PC2 is switched on. +!kind=default +range=0:1e-3 +sort-key=Panel-03a +type=real + +[namelist:convection=resdep_precipramp] +compulsory=true +description=Include grid-length dependence in Comorph A parcel radius precip ramp +help=Option to make the CoMorph A parcel radius dependence on the + =precipitation rate a function of the grid size, and so allow for + =the ability to resolve higher precip rates at higher resolution. +!kind=default +sort-key=Panel-07 +type=logical diff --git a/interfaces/physics_schemes_interface/rose-meta/um-iau/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-iau/version22_30.py new file mode 100644 index 000000000..41d9b56b2 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-iau/version22_30.py @@ -0,0 +1,54 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-iau/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-iau/versions.py index 4e6aef56c..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-iau/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-iau/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,23 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.0/rose-meta.conf new file mode 100644 index 000000000..b124f233f --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.0/rose-meta.conf @@ -0,0 +1,161 @@ +#============================================================================== +# IAU +#============================================================================== + +[namelist:iau] +compulsory=true +description=Setup the IAU option cases +help=This namelist is for the options related to the + = Incremental Analysis Update (IAU) +ns=namelist/Science/IAU +sort-key=Z + +[namelist:iau=iau_ainc_multifile] +compulsory=true +description=Enable 4D-IAU +help=This enables application of different sets of analysis + = increments over different parts of the IAU time window, + = known as 4D-IAU +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +trigger=namelist:iau_ainc_io=filename: .true.; + =namelist:iau_ainc_io=start_time: .true.; +type=logical + +[namelist:iau=iau_mode] +compulsory=true +description=whether IAU needs to act instantaneously or over window +!enumeration=true +!kind=default +sort-key=Panel-A07 +trigger=namelist:iau=iau_ts_start: 'time_window','time_mixed'; + =namelist:iau=iau_use_pertinc: 'time_window','time_mixed'; + =namelist:iau=iau_window_length: 'time_window','time_mixed'; +values='instantaneous', 'time_window', 'time_mixed' + +[namelist:iau=iau_pc2] +compulsory=true +description=Enable PC2 assimilation in IAU +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_tendency_addinf] +compulsory=true +description=Enable additive inflation as tendencies +help=This enables additive inflation increments in the form + = of tendencies (units: quantity per second, e.g.Ks^-1) as + = opposed to standard increments (units: quantity, e.g.K) +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_tendency_ainc] +compulsory=true +description=Enable analysis increments as tendencies +help=This enables analysis increments in the form + = of tendencies (units: quantity per second, e.g.Ks^-1) as + = opposed to standard increments (units: quantity, e.g.K) +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_tendency_bcorr] +compulsory=true +description=Enable bias correction as tendencies +help=This enables bias correction increments in the form + = of tendencies (units: quantity per second, e.g.Ks^-1) as + = opposed to standard increments (units: quantity, e.g.K) +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_tendency_pertinc] +compulsory=true +description=Enable perturbation increments as tendencies +help=This enables perturbation increments in the form + = of tendencies (units: quantity per second, e.g.Ks^-1) as + = opposed to standard increments (units: quantity, e.g.K) +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_ts_start] +compulsory=true +description=Timestep that IAU should start +fail-if=this < 1 ; +!kind=default +sort-key=Panel-A07 +type=integer + +[namelist:iau=iau_use_addinf] +compulsory=true +description=Enable use of additive inflation in IAU +help=If enabled, additive inflation from the ensemble DA is added to the + = model prognostic state throughout the model run +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +trigger=namelist:files=iau_addinf_path: .true.; + =namelist:iau=iau_tendency_addinf: .true.; + =namelist:iau_addinf_io=filename: .true.; + =namelist:iau_addinf_io=start_time: .true.; +type=logical + +[namelist:iau=iau_use_bcorr] +compulsory=true +description=Enable use of bias correction in IAU +help=If enabled, bias correction from the ensemble DA is added to the + = model prognostic state throughout the model run +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +trigger=namelist:files=iau_bcorr_path: .true.; + =namelist:iau=iau_tendency_bcorr: .true.; + =namelist:iau_bcorr_io=filename: .true.; + =namelist:iau_bcorr_io=start_time: .true.; +type=logical + +[namelist:iau=iau_use_level_one_temp] +compulsory=true +description=Enable use of level1 temperature increments to update + = surface temperatures +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_use_pertinc] +compulsory=true +description=Enable use of perturbation increments in IAU +help=If enabled, analysis increments from the perturbation members of + = the control-pert ensemble DA are added to the model prognostic + = state throughout the IAU time window +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +trigger=namelist:files=iau_pert_path: .true.; + =namelist:iau=iau_tendency_pertinc: .true.; +type=logical + +[namelist:iau=iau_wet_density] +compulsory=true +description=Enable density increments in form of wet density*r^2 +!kind=default +ns=namelist/Science/IAU +sort-key=Panel-A07 +type=logical + +[namelist:iau=iau_window_length] +compulsory=true +description=Length of time in seconds IAU needs to act over +fail-if=this < 0 ; +!kind=default +sort-key=Panel-A07 +type=integer diff --git a/interfaces/physics_schemes_interface/rose-meta/um-microphysics/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/version22_30.py new file mode 100644 index 000000000..519fbcf4f --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-microphysics/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/versions.py index 5a3ba41f4..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-microphysics/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.0/rose-meta.conf new file mode 100644 index 000000000..0c542ee37 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.0/rose-meta.conf @@ -0,0 +1,484 @@ +#============================================================================== +# MICROPHYSICS +#============================================================================== + +[namelist:microphysics] +compulsory=true +description=Microphysics parametrizations +ns=namelist/Science/UM Microphysics +sort-key=Section-A08 +title=Microphysics + +[namelist:microphysics=a_ratio_exp] +compulsory=true +description=Exponent in the cross-sectional area ratio relation ice +help=When the shape-dependent riming rates are used, + =this is the exponent + =used to specify the cross-sectional area of ice particles. + =The cross-sectional area ratio is given as + =R(D) = a_ratio_input D^a_ratio_exp. In the code, + =the + =actual particle area is A = R*D^2 (the neglected factor of 4/pi + =being considered as part uncertainity in + =the collection efficency of ice/liquid collisions). +!kind=default +ns=namelist/Science/UM Microphysics +range=-1:0 +sort-key=Panel-A01a +type=real + +[namelist:microphysics=a_ratio_fac] +compulsory=true +description=Prefactor in the cross-sectional area ratio relation ice +help=When the shape-dependent riming rates are used, + =this is the prefactor + =used to specify the cross-sectional area of ice particles. + =The cross-sectional area ratio is given as + =R(D) = a_ratio_input D^a_ratio_exp. In the code, + =the + =actual particle area is A = R*D^2 (the neglected factor of 4/pi + =being considered as part of the uncertainity in + =the collection efficency of ice/liquid collisions). +!kind=default +ns=namelist/Science/UM Microphysics +range=0:1 +sort-key=Panel-A01b +type=real + +[namelist:microphysics=c_r_correl] +compulsory=true +description=Cloud-rain correlation coefficient +help=Cloud-rain correlation coefficient for use with inhomogeneity + =parametrization in improved warm rain microphysics scheme. +!kind=default +ns=namelist/Science/UM Microphysics +range=-1:1 +sort-key=Panel-A05 +type=real + +[namelist:microphysics=casim_cdnc_opt] +compulsory=true +description=How to calculate cloud number in Casim +!enumeration=true +help=External will take the cloud number calculated by an external aerosol + = scheme for use in CASIM, e.g. UKCA activate or Glomap climatologies + = with the Jones relation + = + =Fixed number will use a fixed cloud drop number, as in RA3 +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A02 +value-titles=External code, Fixed number +values='external','fixed' + +[namelist:microphysics=ci_input] +compulsory=true +description=Prefactor in fallspeed relation of large ice +help=When two different ice fall speeds are used, + =this is the prefactor + =used to specify the fallspeed of the large ice particles. + =The fall speed is given as v(D) = ci_input D^di_input +!kind=default +ns=namelist/Science/UM Microphysics +range=0:1e7 +sort-key=Panel-A01b +type=real + +[namelist:microphysics=cic_input] +compulsory=true +description=Prefactor in fallspeed relation of small ice +help=When two different ice fall speeds are used, + =this is the + =prefactor used to specify the fallspeed of the small ice. + =The fall speed is given as v(D) = cic_input D^dic_input +!kind=default +ns=namelist/Science/UM Microphysics +range=0:1e7 +sort-key=Panel-A01b +type=real + +[namelist:microphysics=droplet_tpr] +compulsory=true +description=Enable tapering of cloud droplets towards surface +help=This scheme allows droplet numbers to be tapered from their maximum + =value down to a lower value towards the surface, + =and improves + =microphysical representation during low cloud and fog events. + = + =To activate this scheme, + =activate namelist:microphysics=droplet_tpr + =z_peak_nd=150.0 m is hard-wired in UM code as height below which to + =taper the droplet numbers (150m is chosen) + =Select a value of the droplet number concentration at + =namelist:microphysics=ndrop_surf - 50.0E6 to 75.0E6 is recommended + =20.0E6 to 100.0E6 is typical of fog measurements at Cardington MRU. + =For further information, see Wilkinson et al (2013), QJRMS + =http://dx.doi.org/10.1002/qj.1975 +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A02 +trigger=namelist:microphysics=ndrop_surf: .true.; + =namelist:microphysics=z_surf: .true.; + =namelist:stochastic_physics=rp_mp_ndrop_surf: .true.; +type=logical + +[namelist:microphysics=fcrit] +compulsory=true +description=Critical Froude number below which flow blocking occurs +help=Needed by the seeder feeder scheme when blocking is switched on. + =The amount of low-level blocking due to sub-grid orography is determined + =by the Froude number F (U/NH). When F falls below Fcrit, blocking occurs. + =The blocked layer depth zb increases linearly from zero to the full + =sub-grid hill peak-to-trough height as F decreases from Fcrit towards zero. + =The most physically realistic value of fcrit is around 1. + =Using a larger value increases the amount of blocking and therefore + =decreases the amount of ascent, resulting in less precipitation enhancement. + =Value must be greater than zero. +!kind=default +ns=namelist/Science/UM Microphysics +range=0.1: +sort-key=Panel-A04f +type=real + +[namelist:microphysics=graupel_scheme] +compulsory=true +description=Option for inclusion of graupel +!enumeration=true +help=Options for the inclusion of a prognostic graupel category in the + =UM microphysics code. + = + = - No prognostic graupel in use. + = + = - Modified scheme with snow-rain collisions producing graupel, + = according to the following table: + = ---------------------------------------------------------------- + = ICE TYPE | RAIN MIXING RATIO | COLLISION RESULTS IN + = CRYSTALS | > 1.0E-4 KG/KG | CRYSTALS + = CRYSTALS | < 1.0E-4 KG/KG | CRYSTALS + = SNOW AGGREGATES | > 1.0E-4 KG/KG | GRAUPEL + = SNOW AGGREGATES | < 1.0E-4 KG/KG | SNOW AGGREGATES + = ---------------------------------------------------------------- + = When the generic ice PSD is switched on, the mean diameter of the + = particles is used to determine whether the collision results in ice + = aggregates or graupel. If the mean diameter of water is larger, then + = graupel particles will be formed. Otherwise the result of the collision + = will be an increase in the mixing ratio of aggregates. + = + = If this option is not selected, then a collision between rain and + = crystals produces crystals and similarly, a collision between rain and + = aggregates forms aggregates. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A04 +value-titles=No graupel,Modified scheme +values='none','modified' + +[namelist:microphysics=heavy_rain_evap_fac] +compulsory=true +description=Factor for enhancing evaporation at high rain rates +help=This scales an additional term in the rain evaporation rate formula, + =proportional to the rain mixing-ratio, qrain. The other terms are + =proportional to qrain raised to much lower powers; hence those terms + =dominate when qrain is small. As a result this new factor can be + =thought of as representing the break up of large drops, at large qrain, + =that leads to an increase in rain number at the expense of particle size, + =in turn making the evaporation rate scale more linearly with qrain. + =The net result is to modify the calculation in such a way that it makes + =no difference to light rain, but gradually ramps up the evaporation rate + =for very heavy rain. A value of 2.5e7 is recommended. +!kind=default +ns=namelist/Science/UM Microphysics +range=0.0:1.0e9 +sort-key=Panel-A05a +type=real + +[namelist:microphysics=i_update_precfrac] +compulsory=true +description=Options for how to update the prognostic precip fraction +!enumeration=true +help=If the prognostic precip fraction is used (l_mcr_precfrac=.true.), + =When any microphysics process increments the prognostic mass of + =rain and/or graupel, it needs to increment the precip fraction + =consistently. The options for how to do this are: + =(1) - Calculate an updated effective fraction based on the increments + = to precip mass squared within assumed homogeneous sub-grid areas. + =(2) - Calculate the increments to grid-mean precip mass squared based on + = assumed correlations between the existing mass and the increments. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A01f +value-titles=Assumed homogenous sub-grid areas, + =Assumed sub-grid spatial correlations +values='homog','correl' + +[namelist:microphysics=l_mcr_precfrac] +compulsory=true +description=Include prognostic rain/graupel fraction +help=Switch to include a prognostic field for the fraction of the + =grid-box occupied by falling rain and/or graupel. + = + =If used, the calculation of the rain fraction in the microphysics + =scheme is modified to take account of the previous timestep value. + =When a process adds additional rain/graupel, the new fraction is + =weighted towards the cloud fraction within-which the new rain/graupel + =is generated, as a function of the precip mass added. + =This avoids a problem where the rain fraction can only increase + =with time unless the rain disappears completely. + = + =Graupel is also included in this prognostic sub-grid fraction + =if prognostic graupel is turned on. + = + =Note: you must use prognostic fields for rain or graupel mass + =in order to use the prognostic precipation fraction. + = + =Prognostic precip fraction is not yet available with the CASIM + =microphysics scheme; it has only been implemented in the Wilson-Ballard + =scheme code. +ns=namelist/Science/UM Microphysics +sort-key=Panel-A01e +trigger=namelist:microphysics=i_update_precfrac: .true. ; +type=logical + +[namelist:microphysics=l_proc_fluxes] +compulsory=true +description=Apply microphysics process rates to the fall-fluxes. +help=If false, the fall-flux of each hydrometeor species cannot be + = modified by the microphysical processes (once it has been calculated + = by the sedimentation call). This leads to numerical problems. + = For example, if rain is falling, and the model-levels are shallow, then + = only a small fraction of the fall-flux will remain on a given + = model-level, with most of it falling straight through. The small + = amount of qrain left on the current level after sedimentation + = may fully evaporate, but most of the rain can spuriously fall through + = without being subject to evaporation. This leads to spurious small + = rain-rates reaching the surface in dry environments, where all the + = rain should have evaporated before reaching the surface. + = + = With this switch set to true, this problem is fixed by allowing + = microphysical processes to act on the fall-out flux of each + = species as well as the mass left on the current level. + = + =This option is not yet available with the CASIM + =microphysics scheme; it has only been implemented in the Wilson-Ballard + =scheme code. +ns=namelist/Science/UM Microphysics +sort-key=Panel-A01d +type=logical + +[namelist:microphysics=microphysics_casim] +compulsory=true +description=Run with CASIM scheme +help=Setting to True will switch from the Wilson and Ballard (1999) + =microphysics scheme to the Cloud-AeroSol Interacting Microphysics + =(CASIM). This is a multi-moment microphysics scheme which is + =significantly more advanced and can include complex cloud-aerosol + =interactions. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A00 +trigger=namelist:microphysics=casim_cdnc_opt: .true.; + =namelist:microphysics=graupel_scheme: .false.; + =namelist:microphysics=shape_rime: .false.; + =namelist:microphysics=orog_rain: .false.; + =namelist:microphysics=prog_tnuc: .false.; + =namelist:microphysics=c_r_correl: .false.; + =namelist:microphysics=l_mcr_precfrac: .false.; + =namelist:microphysics=l_proc_fluxes: .false.; +type=logical + +[namelist:microphysics=mp_dz_scal] +compulsory=true +description=Layer thickness scaling factor +help=This number is a scaling factor applied to the layer thickness + = which determines the vertical length scale over which the + = turbulence is assumed to mix. Increasing it will increase the + = production of liquid water cloud by turbulence. +!kind=default +ns=namelist/Science/UM Microphysics +range=0.01:10.0 +sort-key=Panel-A03b +type=real + +[namelist:microphysics=ndrop_surf] +compulsory=true +description=Surface droplet number concentration when tapering +help=This scheme allows droplet numbers to be tapered from their maximum + =value down to a lower value towards the surface, + =and improves + =microphysical representation during low cloud and fog events. + = + =To activate this scheme, + =activate namelist:microphysics=droplet_tpr + =z_peak_nd=150.0 m is hard-wired in UM code as height below which to + =taper the droplet numbers (150m is chosen) + =Select a value of the droplet number concentration at + =namelist:microphysics=ndrop_surf - 50.0E6 to 75.0E6 are typical + =20.0E6 to 100.0E6 was suggested by fog measurements at Cardington MRU. +!kind=default +ns=namelist/Science/UM Microphysics +range=1e6:375e6 +sort-key=Panel-A02a +type=real + +[namelist:microphysics=nscalesf] +compulsory=true +description=Scaling factor controlling the vertical decay of Seeder Feeder effect +help=The factor used to scale the horizontal wavelength of the assumed + =sinusoidal ridge in the Seeder Feeder scheme. + =This is only used to determine the vertical decay rate in the sub-grid + =orographic vertical displacements (does not determine near-surface values). + =At any given altitude z, the maximum vertical sub-grid orographic streamline + =displacement is the effective amplitude of the assumed sinusoidal hill + =multiplied by exp(-z k / nscalesf), where k is the orography wavenumber. + =A value of 1 assumes that the sub-grid orographic wavelength is equal to + =the horizontal model grid spacing. + =Larger values increase the assumed scale and reduce the vertical decay rate, + =so that orographic precipitation enhancement will increase at higher levels + =if the RH is large enough. + =It is not recommended to go above a value of 6 as those wavelengths + =are almost completely present in the resolved orography. +!kind=default +ns=namelist/Science/UM Microphysics +range=0.01:6.0 +sort-key=Panel-A04c +type=real + +[namelist:microphysics=nsigmasf] +compulsory=true +description=Orographic standard deviation scaling factor +help=The factor used to scale the sub-grid orographic standard deviation + =to estimate the peak-to-trough amplitude of the assumed sinusoidal ridge. + =Physically this might be approx 2.828427, so that the standard deviation + =for the assumed sinusoidal ridge is the same as the value for the + =actual subgrid orography. + =Larger values increase the hill peak amplitude and therefore the amount + =of precipitation enhancement produced (unless blocking is increased). +!kind=default +ns=namelist/Science/UM Microphysics +range=0: +sort-key=Panel-A04b +type=real + +[namelist:microphysics=orog_block] +compulsory=true +description=Account for low-level blocking in the Seeder Feeder scheme +help=Used by the seeder feeder precipitation enhancement scheme to determine + =whether to account for sub-grid orographic low-level blocking. + =Blocking occurs for Froude numbers (U/NH) below fcrit. + =The effect of blocking is to reduce the effective sub-grid hill height + =used to estimate the sub-grid orographic water mixing ratio. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A04e +trigger=namelist:microphysics=fcrit: .true. +type=logical + +[namelist:microphysics=orog_rain] +compulsory=true +description=Include Seeder Feeder orographic precipitation enhancement +help=This scheme estimates the extra water that would be condensed + =within a gridbox due to flow over sub-grid hills. + =This water is not added to the resolved cloud water mixing ratio but + =is used in an additional accretion (riming) call to produce extra + =rain (snow). Extra riming only occurs if orog_rime is true. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A04 +trigger=namelist:microphysics=orog_rime: .true.; + = namelist:microphysics=orog_block: .true.; + = namelist:microphysics=nsigmasf: .true.; + = namelist:microphysics=nscalesf: .true.; +type=logical + +[namelist:microphysics=orog_rime] +compulsory=true +description=Allow the seeder feeder scheme to enhance riming. +help=As standard, the seeder feeder scheme uses the sub-grid orographic + =water estimate to produce extra rain accretion. + =This switch allows the scheme to also produce extra snow via riming. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A04d +type=logical + +[namelist:microphysics=prog_tnuc] +compulsory=true +description=Turn on prognostic tnuc approach +help=By setting this switch to True, + =the heterogeneous nucleation temperature + =will be calculated as a function of dust distribution (instead + =of -10 deg cel) in the large-scale precipitation. + =This is further passed to the convection scheme (indexed + =using the model-level index of the lifting condensation level). + =In convection scheme, tnuc_new is passed through shallow,deep + =and mid convection schemes +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A01 +type=logical + +[namelist:microphysics=qcl_rime] +compulsory=true +description=Minimum qcl for riming +help=When the shape-dependent riming rates are used, + =this specifies how much of the qcl in a gridbox + =is available for the riming process. + =Only the fraction of qcl that is above + =qcl_rime is used to calculate the riming rate. +!kind=default +ns=namelist/Science/UM Microphysics +range=0:1e-02 +sort-key=Panel-A01c +type=real + +[namelist:microphysics=shape_rime] +compulsory=true +description=Use ice particle shape-dependent riming rate +help=This code makes the riming rate depend on the cross-sectional + =area of the ice/snow crystals. The parametrization of area + =in terms of particle size from Heymsfield and + =Miloshevich (J. Atmos. Sci., + =60,936 (2003)) is used. + =It also includes a minimum qcl, + =above which liquid water + =is available for riming. This follows the findings of + =Harimaya (J. Meteor. Japan, + =53(6), + =384-392) that + =there is a minimum droplet size for riming to occur. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A01 +trigger=namelist:microphysics=a_ratio_fac: .true.; + = namelist:microphysics=a_ratio_exp: .true.; + = namelist:microphysics=qcl_rime: .true.; +type=logical + +[namelist:microphysics=turb_gen_mixph] +compulsory=true +description=Include turbulent production of mixed phase cloud? +help=By setting this switch to True, + =the turbulent production of mixed phase + =cloud scheme is activated. +!kind=default +ns=namelist/Science/UM Microphysics +sort-key=Panel-A03a +trigger=namelist:microphysics=mp_dz_scal: .true.; +type=logical + +[namelist:microphysics=z_surf] +compulsory=true +description=Height (m) at which taper reaches ndrop_surf +help=This sets the height (m) above the surface at which the droplet taper + =reaches the value of ndrop_surf. The droplet number then remains + =constant at this value below this height. Setting at value of 0 + =will just result in model level 1 being used. + =Value must be <= z_peak_nd which is now hard-wired to 150.0 in UM code. + = + =In the, somewhat peculiar, case of drop number decreasing with height + =it will always taper to ndrop_surf at level 1. +!kind=default +ns=namelist/Science/UM Microphysics +range=0.0:150.0 +sort-key=Panel-A02b +type=real diff --git a/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version22_30.py new file mode 100644 index 000000000..c7e26e7da --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/versions.py index 5a3ba41f4..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.0/rose-meta.conf new file mode 100644 index 000000000..a52082e03 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.0/rose-meta.conf @@ -0,0 +1,161 @@ +#============================================================================== +# OROGRAPHIC GRAVITY WAVE AND BLOCKING DRAG +#============================================================================== + +[namelist:orographic_drag] +compulsory=true +description=Orographic drag parametrization configuration +ns=namelist/Science/Orographic drag +sort-key=Section-A09 +title=Orographic drag + +[namelist:orographic_drag=cd_flow_blocking] +compulsory=true +description=Flow blocking drag coefficient +help=Factor multiplying the orographic blocking drag. + = + =Reasonable values range from 1 to 10. + = + =Recommended value is 4.0. +!kind=default +sort-key=Panel-A00 +type=real + +[namelist:orographic_drag=fr_crit_gwd] +compulsory=true +description=Low-level critical Froude Number +help=The low-level critical Froude number is the Froude number + =below which orographic blocking drag occurs. + = + =It is computed using the subgrid mountain height (h), + =low-level averaged winds (U) and stability (N) using: + = + = F = U/Nh + = + =The larger the critical Froude number the higher the + =likelihood of flow blocking within a grid-box, and the + =larger the depth over which the blocking drag is applied. + = + =According to linear theory, the critical Froude number + =should be ~1.0. However, most operational configurations + =use a value of 4.0, as smaller values can lead to excessive + =drags in the lower stratosphere and insufficient drag near + =the surface. +!kind=default +range=0.5:10.0 +sort-key=Panel-A02 +type=real + +[namelist:orographic_drag=fr_sat_gwd] +compulsory=true +description=Critical Froude number for gravity wave saturation +help=The critical value of the vertically varying Froude number. + = + =This is used in the amplitude based saturation test for gravity + =wave breaking. Higher Froude numbers will result in larger + =gravity wave amplitudes before wave breaking occurs. + = + =Theoretically this should be approximately 1.0. + = + =Recommended value is 0.25. +!kind=default +range=0.1:10.0 +sort-key=Panel-A03 +type=real + +[namelist:orographic_drag=gwd_scaling] +compulsory=true +description=Surface stress amplitude scaling coefficient +help=Coefficient used to scale amplitude of orographic gravity wave + =surface stress. + =In theory, gwd_scaling should be a function of the subgrid mountain + =sharpness but here it is treated as a constant tuning coefficient. + = + =Theoretical values range from 0.9 for sharply peaked mountains to + =2.0 for broad mountains. + = + =Recommended value is 1. +!kind=default +range=0.0:10.0 +sort-key=Panel-A01 +type=real + +[namelist:orographic_drag=include_moisture] +description=Specify whether to use the dry buoyancy frequency (Nd) or + =whether to use an effective moist value that accounts for + =latent heating (Nmoist), either throughout the atmosphere + =or just at low-levels. +!enumeration=true +help=Setting this to 'dry' means that the dry value of the buoyancy + =frequency (Nd) is used everywhere. + =Setting this to 'lowmoist' means that Nmoist is used to calculate + =the low-level flow blocking drag and the total wave stress in a column, + =while using Nd to distribute that wave drag in the vertical. + =Setting this to 'moist' means that Nmoist is used everywhere in the scheme. + =Latent heating due to moist processes is accounted for by estimating how + =much of the sub-grid orographic displacement is saturated, and then + =calculating a weighted average of the dry and saturated values of the + =buoyancy frequency. + =This is physically more realistic for moist air masses and reduces the + =buoyancy frequency N. + =The saturated value is from Durran and Klemp (1982). +!kind=default +sort-key=Panel-A08 +value-titles=Use dry N value everywhere,Include latent heat at low-levels, + =Include latent heat everywhere +values='dry','lowmoist','moist' + +[namelist:orographic_drag=mountain_height_scaling] +compulsory=true +description=Sub-grid orographic standard deviation scaling factor +help=Factor which scales the standard deviation of the sub-grid orography. + =It provides an estimate of the average mountain height within a + =model grid box. + = + =This height defines the top of the near-surface layer of air + =which is impinging on the sub-grid orography. + = + =Recommended value is 2.5. +!kind=default +range=0.5:10.0 +sort-key=Panel-A04 +type=real + +[namelist:orographic_drag=orographic_blocking_heating] +compulsory=true +description=Apply heat dissipation + =(orographic blocking drag) +help=Account for frictional heat dissipation + =due to flow blocking by orography. + = + =Recommended that flow blocking heat + =dissipitation is enabled for most model + =configurations. +!kind=default +sort-key=Panel-A06 +type=logical + +[namelist:orographic_drag=orographic_gwd_heating] +compulsory=true +description=Apply heat dissipation + =(orographic gravity-wave drag) +help=Account for frictional heat dissipation + =due to orographic gravity waves. + = + =Recommended that gravity-wave heat + =dissipitation is enabled for most model + =configurations. +!kind=default +sort-key=Panel-A05 +type=logical + +[namelist:orographic_drag=vertical_smoothing] +compulsory=true +description=Smooth acceleration over a vertical wavelength +help=The scheme has an option to apply the acceleration due to gravity wave + =drag over one vertical wavelength. + = + =Recommended value is TRUE. +!kind=default +sort-key=Panel-A07 +type=logical diff --git a/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version22_30.py new file mode 100644 index 000000000..eb90624ec --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/versions.py index 5a3ba41f4..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.0/rose-meta.conf new file mode 100644 index 000000000..8f9f8c2ca --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.0/rose-meta.conf @@ -0,0 +1,91 @@ +#============================================================================== +# SPECTRAL GRAVITY WAVE DRAG: +#============================================================================== + +[namelist:spectral_gwd] +compulsory=true +description=Spectral gravity wave drag scheme options +ns=namelist/Science/UM Spectral gravity wave drag +sort-key=Section-A11 +title=Spectral Gravity Wave Drag + +[namelist:spectral_gwd=add_cgw] +compulsory=true +description=Activate total precipitation dependent variable gravity wave + =source flux + =WARNING: This is an experimental configuration with further + =refinements planned. Users who propose to activate this option + =are recommended to consult the code owner first. +help=False: applies the standard global invariant source for the + =spectral non-orographic gravity wave scheme. + = + =True: activates a new total precipitation source for the + =spectral non-orographic gravity wave scheme. +!kind=default +ns=namelist/Science/UM Spectral gravity wave drag +sort-key=Panel-A00 +trigger=namelist:spectral_gwd=cgw_scale_factor: .true.; +type=logical + +[namelist:spectral_gwd=cgw_scale_factor] +compulsory=true +description=Factor enhancement for conversion from total precipitation + =to gravity wave source flux +help="Factor enhancement for conversion from total precipitation" allows + =the total precipitation dependent variable gravity wave source + =to be adjusted about its default value (factor = 1.0). + = + =The permitted range is from 0.0 (switch total precipitation source + =off) to 10.0 (arbitrary upper limit) but, as for the global + =invariant factor, significant impact on the QBO period is expected + =for deviations about 1.0 of order ten percent. +!kind=default +ns=namelist/Science/UM Spectral gravity wave drag +range=0:10 +sort-key=Panel-A01 +type=real + +[namelist:spectral_gwd=ussp_heating] +compulsory=true +description=Apply heating due to non-orographic gravity-wave dissipation. +help=The 5A scheme includes the option to apply heating due to the frictional + =dissipation of gravity waves (and flow blocking drag). + = + =TRUE Turns on heating due to spectral gravity wave drag +!kind=default +sort-key=Panel-A02 +type=logical + +[namelist:spectral_gwd=ussp_launch_factor] +compulsory=true +description=Factor enhancement for global invariant wave launch amplitude +help=This allows the global source to be adjusted about its default value + =(factor = 1.0). + = + =The permitted range is from 0.0 (switch off globally invariant source) + =to 10.0 (spectrum saturated at launch level given current values) + =but significant impact on the QBO period is usual + =for deviations about 1.0 of order ten percent. +!kind=default +ns=namelist/Science/UM Spectral gravity wave drag +range=0:10 +sort-key=Panel-A03 +type=real + +[namelist:spectral_gwd=wavelstar] +compulsory=true +description=Characteristic (spectrum peak) wavelength (m) +help="Characteristic (spectrum peak) wavelength" allows adjustment of + =the global source spectrum shape by varying the transition to the + =(inverse cube of vertical wavenumber) tail about its default + =value (4300.00m). + = + =The default value is generally recommended: the ability to vary + =within a permitted range from 1000.0 (high wavenumber) + =to 10000.0 (low wavenumber - there is a cut-off at 20000.0) + =has been added only for perturbed parameter experiments. +!kind=default +ns=namelist/Science/UM Spectral gravity wave drag +range=1000:10000 +sort-key=Panel-A04 +type=real diff --git a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version22_30.py b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version22_30.py new file mode 100644 index 000000000..eefde15db --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version22_30.py @@ -0,0 +1,138 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/versions.py b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/versions.py index 63c1030c4..152c043d0 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,108 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports diff --git a/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.0/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.0/rose-meta.conf new file mode 100644 index 000000000..c01f31b69 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.0/rose-meta.conf @@ -0,0 +1,1252 @@ +#============================================================================== +# Stochastic Physics: +#============================================================================== + +[namelist:stochastic_physics] +compulsory=true +description=Stochastic Physics +ns=namelist/Science/Stochastic Physics +sort-key=Section-A15 +title=Stochastic Physics + +[namelist:stochastic_physics=blpert_add_vertical_shape] +compulsory=true +description=Add vertical shape to perturbation profile +help=Within the option to perturb theta and moisture based on surface buoyancy + =flux, this perturbation can either be applied uniformly in the lower + =two-thirds levels of the boundary layer (blpert_add_vertical_shape set to + =false) or with a piece-wise linear shape that is zero at the surface and + =boundary layer top and equal to one in the middle (true). Note that the + =vertically integrated perturbation is very similar in both cases but the + =latter has less direct impact on the diagnosed screen level temperature. +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +type=logical + +[namelist:stochastic_physics=blpert_decorrelation_time] +compulsory=true +description=Decorrelation timescale for perturbations (seconds) +help= +ns=namelist/Science/Stochastic Physics +range=0.0:1.0e+10 +sort-key=Panel-A7 +type=real + +[namelist:stochastic_physics=blpert_height_bottom] +compulsory=true +description=Minimum height from which to add perturbations (m) +fail-if=this > namelist:stochastic_physics=blpert_height_bottom +help=Minimum height in metres above the surface from which to add perturbations, + =typically set to 0m, ie from directly above the surface +ns=namelist/Science/Stochastic Physics +range=0.0:1.0e+10 +sort-key=Panel-A7 +type=real + +[namelist:stochastic_physics=blpert_height_top] +compulsory=true +description=Maximum height up to which to add perturbations (m) +fail-if=this < namelist:stochastic_physics=blpert_height_top +help=Maximum height in metres above the surface up to which to add perturbations, + =typically set to 1500m +ns=namelist/Science/Stochastic Physics +range=0.0:1.0e+10 +sort-key=Panel-A7 +type=real + +[namelist:stochastic_physics=blpert_max_magnitude] +compulsory=true +description=Maximum magnitude of theta perturbations +ns=namelist/Science/Stochastic Physics +range=0.0:1.0e+10 +sort-key=Panel-A7 +type=real + +[namelist:stochastic_physics=blpert_mesh_name] +compulsory=true +description=Name of the mesh used for computing random number field in boundary + =layer perturbation scheme +help= +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +!string_length=default +type=character + +[namelist:stochastic_physics=blpert_noncumulus_points] +compulsory=true +description=In addition to cumulus-capped points, perturb non-cumulus-capped + =points, too. +help=If false, perturbations are only applied in regimes diagnosed as + =cumulus-capped. +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +type=logical + +[namelist:stochastic_physics=blpert_npts_from_edge] +compulsory=true +description=Number of points from domain edge to apply perturbations +fail-if=this <0 ; +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +type=integer + +[namelist:stochastic_physics=blpert_only_near_edge] +compulsory=true +description=Randomly perturb points only near the domain edges +fail-if=this and (namelist:boundaries=limited_area == "'.false.'"); +help=When stochastic pertubations are selected (using blpert_type), + =this switch makes them only be applied within + =blpert_npts_from_edge grid points from the domain boundaries +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +trigger=namelist:stochastic_physics=blpert_npts_from_edge: .true. +type=logical + +[namelist:stochastic_physics=blpert_time_correlation] +compulsory=true +description=Apply time-correlated random perturbation + =If false, apply purely random sequence (no time-correlation) +help= +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +trigger=namelist:stochastic_physics=blpert_decorrelation_time: .true. +type=logical + +[namelist:stochastic_physics=blpert_type] +compulsory=true +description=Main switch of boudary layer random perturbation scheme +!enumeration=true +help=Add random perturbations to the near surface field. These are either based + =on a fixed magnitude (blpert_max_magnitude) or the surface buoyancy flux. + =If they are based on the surface buoyancy flux, blpert_max_magnitude still + =provides the maximum possible value. A final option is also to perturb + =moisture. + =Perturbations can be applied on Cumulus points only or all points + =in the domain (depending on blpert_noncumulus_points). + =In the vertical they can be applied uniformly up to 2/3 of NTML (the number + =of levels in the boundary layer) or with a triangular vertical profile in + =the boundary layer. Perturbations will also only be applied between the + =heighs between blpert_height_bottom and blpert_height_top. + =Perturbations are created on a course mesh (blpert_mesh_name) and + =projected onto fine mesh without interpolation. +!kind=default +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A7 +trigger=namelist:stochastic_physics=blpert_mesh_name: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_time_correlation: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_only_near_edge: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_noncumulus_points: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_npts_from_edge: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_height_bottom: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_height_top: 'theta_mag','theta_star','theta_and_moist' ; + =namelist:stochastic_physics=blpert_add_vertical_shape: 'theta_and_moist' ; + =namelist:stochastic_physics=blpert_max_magnitude: 'theta_mag','theta_star','theta_and_moist' ; +value-titles=None,Perturb theta with fixed magnitude, + =Perturb theta based on surface buoyancy flux, + =Perturb theta and moisture based on surface buoyancy flux +values='off','theta_mag','theta_star','theta_and_moist' + +[namelist:stochastic_physics=ens_memb] +compulsory=true +description=Ensemble member +help=Ensemble member number +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A +type=integer + +[namelist:stochastic_physics=rp_bl_a_ent_1] +compulsory=true +description=Entrainment parameter A1 for RP; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); + =this(3) > 1.0; + =this(1) < 0.01 +help=Parameter controlling entrainment parameter A1 in Boundary Layer scheme. + =Min, default and max values of bl_a_ent_1 are set here + =Recommended values are 0.1 / 0.23 / 0.4 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_a_ent_shr] +compulsory=true +description=Entrainment parameter bl_a_ent_shr for RP +help=Parameter controlling entrainment due to wind shear parameter bl_a_ent_shr + =in Boundary Layer scheme. This parameter varies with A1. Only a + =default and maximum value is needed for the scheme. The minimum + =is always zero. + =Default value of bl_a_ent_shr is set here - recommended value is 1.6 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_a_ent_shr_max] +compulsory=true +description=Entrainment parameter bl_a_ent_shr for RP max value +fail-if=this < namelist:stochastic_physics=rp_bl_a_ent_shr +help=Maximum Random Perturbation value for entrainment due to wind + =shear parameter bl_a_ent_shr in Boundary Layer scheme. + =Suggested/usual value is 5.0 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_cbl_mix_fac] +compulsory=true +description=Parameter controlling mixing in convective boundary layers + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling mixing in convective boundary layers: + =Changes the unstable tail functions in the boundary-layer so that + =the function varies between the 'conventional' and 'standard' + =subgrid schemes. RPb only. + =Recommended values are 0.0 / 0.5 / 1.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_cld_top_diffusion] +compulsory=true +description=Cloud-top diffusion control parameter for RP; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); + =this(3) > 5.0; + =this(1) < 0.1 +help=Cloud-top diffusion control parameter in Boundary Layer scheme. + =Min, default and max values of rp_bl_cld_top_diffusion are set here + =Recommended values are 0.5 / 0.85 / 1.5 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_min_mix_length] +compulsory=true +description=Minimum mixing length for RP; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling min mixing length for RP in the BL scheme. + =Min, default and max values of bl_min_mix_length are set here + =Recommended values are 8.0 / 40.0 / 120.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_neutral_mix_length] +compulsory=true +description=Neutral mixing length; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter for neutral mixing length in Boundary Layer scheme. + =Min, default and max values of par_mezcla are set here + =Recommended values are 0.03 / 0.15 / 0.45 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_ricrit] +compulsory=true +description=Critical Richardson no. for RP; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling critical Richardson no. in Boundary Layer scheme. + =Min, default and max values of ricrit are set here + =Recommended values are 0.25 / 1.0 / 2.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_smag_coef] +compulsory=true +description=Parameter for the Smagorinsky coefficient + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter representing the Smagorinsky coefficient + =Changes the coefficient (c_s or mix_factor) in the Smagorinsky + =turbulence scheme. RPb only. + =Recommended values are 0.01 / 0.2 / 1.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_bl_stable_ri_coef] +compulsory=true +description=Flux profile parameter for RP; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Flux profile parameter in Boundary Layer scheme. + =Min, default and max values of rp_bl_stable_ri_coef are set here + =Recommended values are 5.0 / 10.0 / 40.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A05 +type=real + +[namelist:stochastic_physics=rp_callfreq] +compulsory=true +description=Interval between calls to the RP scheme (seconds) +help=The frequency of calls to the RP scheme in seconds. + =Must be a multiple of the timestep. +ns=namelist/Science/Stochastic Physics/RP +range=1: +sort-key=Panel-A01 +type=integer + +[namelist:stochastic_physics=rp_cycle_in] +compulsory=true +description=If true, + =then read in initial values of random parameters + =from a file. Must be used with stphseed = 0 or 1. + =Base name for the file is specified in rp_seed. +#fail-if=this ==".true." and namelist:stochastic_physics=rp_stphseed == 2 +# =#stphseed must be 0 or 1 +help=If set to true, + =then the intial values for the random parameters are + =read in from a file. Must be used with stphseed = 0 or 1. + =The file-name must take the format + =basename_CYCLE_IN_0000000000 + =where the basename is specified in rp_seed +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A03a +type=logical + +[namelist:stochastic_physics=rp_cycle_out] +compulsory=true +description=If true, + =then write out values of random parameters to a file + =at a specified time. + =File specified in rp_seed. +help=If set to true, then the random parameters will be written out to + =a file at a specified time (rp_cycle_tm). The file-name is based on + =rp_seed with the additional tag RP_CYCLE. +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A03b +trigger=namelist:stochastic_physics=rp_cycle_tm: .true. ; +type=logical + +[namelist:stochastic_physics=rp_cycle_tm] +compulsory=true +description=Time at which to write the RP parameters out + =to a file (seconds) +help=Length of time from the beginning of the forecast after + =which the set of random parameters are written out to a file. + =File name is specified in stphseed_file, + =with additional tag + =of RP_CYCLE. Can be used to initiate parameters in subsequent + =forecasts. Recommended value is 43200.0 (12 hours) +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A03c +type=integer + +[namelist:stochastic_physics=rp_decorr_ts] +compulsory=true +description=De-correlation timescale (seconds) for the + =random parameters scheme +fail-if=this < 1.0 +help=De-correlation timescale (seconds) used in the AR1 process for + =updating the parameter each time the random parameters scheme runs. + =Recommended value for global model is 216000.0 (60 hours) + =Recommended value for mogreps-uk is 604800.0 (1 week) +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A01b +type=real + +[namelist:stochastic_physics=rp_lsfc_alnir] +compulsory=true +description=RP for the JULES leaf reflection coefficient, alnir, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=this != namelist:jules_pftparm=alnir_io +help=The default value of rp_lsfc_alnir is set here - this should be the same + =as alnir_io (see jules_pftparm namelist). +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_alnir_max] +compulsory=true +description=Max RP for the JULES leaf reflection coefficient, alnir, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Maximum Random Perturbation value for JULES parameter alnir. Suggested values are + =0.5,0.45,0.7,0.7,0.7 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_alnir_min] +compulsory=true +description=Min RP for the JULES leaf reflection coefficient, alnir, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Minimum Random Perturbation value for JULES parameter alnir. Suggested values are + =0.3,0.2,0.3,0.3,0.3 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_alpar] +compulsory=true +description=RP for the JULES leaf reflection coefficient, alpar, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=this != namelist:jules_pftparm=alpar_io +help=The default value of rp_lsfc_alpar is set here - this should be the same + =as alpar (see jules_pftparm namelist). +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_alpar_max] +compulsory=true +description=Max RP for the JULES leaf reflection coefficient, alpar, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Maximum Random Perturbation value for JULES parameter alpar. Suggested values are + =0.15,0.11,0.2,0.2,0.2 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_alpar_min] +compulsory=true +description=Min RP for the JULES leaf reflection coefficient, alpar, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Minimum Random Perturbation value for JULES parameter alpar. Suggested values are + =0.05,0.04,0.05,0.05,0.05 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_lai_mult] +compulsory=true +description=RP value for the scaling parameter of the leaf area index + =ancillary. + =Input is a single value applied to all plant function types. +help=The default value for lai_mult is set here. Suggested value is + =1.0. +ns=namelist/Science/Stochastic Physics/RP +range=0.5:2.0 +sort-key=Panel-A10b +type=real + +[namelist:stochastic_physics=rp_lsfc_lai_mult_max] +compulsory=true +description=Max RP value for the scaling parameter of the leaf area index + =ancillary. + =Input is a single value applied to all plant function types. +help=Maximum Random Perturbation value for lai_mult. Suggested value is + =2.0. +ns=namelist/Science/Stochastic Physics/RP +range=1.0:2.0 +sort-key=Panel-A10b +type=real + +[namelist:stochastic_physics=rp_lsfc_lai_mult_min] +compulsory=true +description=Min RP value for the scaling parameter of the leaf area index + =ancillary. + =Input is a single value applied to all plant function types. +help=Minimum Random Perturbation value for lai_mult. Suggested value is + =0.5. +ns=namelist/Science/Stochastic Physics/RP +range=0.5:1.0 +sort-key=Panel-A10b +type=real + +[namelist:stochastic_physics=rp_lsfc_omega] +compulsory=true +description=RP for the JULES leaf scattering coefficient, omega, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=this != namelist:jules_pftparm=omega_io +help=The default value of rp_lsfc_omega is set here - this should be the same + =as omega (see jules_pftparm namelist). +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_omega_max] +compulsory=true +description=Max RP for the JULES leaf scattering coefficient, omega, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Maximum Random Perturbation value for JULES parameter omega. Suggested values are + =0.2,0.2,0.2,0.2,0.2 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_omega_min] +compulsory=true +description=Min RP for the JULES leaf scattering coefficient, omega, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Minimum Random Perturbation value for JULES parameter omega. Suggested values are + =0.05,0.05,0.1,0.1,0.1 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_omnir] +compulsory=true +description=RP for the JULES leaf scattering coefficient, omnir, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=this != namelist:jules_pftparm=omnir_io +help=The default value of rp_lsfc_omnir is set here - this should be the same + =as omnir (see jules_pftparm namelist). +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_omnir_max] +compulsory=true +description=Max RP for the JULES leaf scattering coefficient, omnir, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Maximum Random Perturbation value for JULES parameter omnir. Suggested values are + =0.9,0.6,0.9,0.9,0.9 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_omnir_min] +compulsory=true +description=Min RP for the JULES leaf scattering coefficient, omnir, on vegetation tiles + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Minimum Random Perturbation value for JULES parameter omnir. Suggested values are + =0.7,0.4,0.6,0.6,0.6 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_orog_drag_param] +compulsory=true +description=Orographic form drag parameter; + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the drag coefficient for + =orographic form drag + =Min, default and max values of orog_drag_param are set here + =Recommended values are 0.001 / 0.15 / 0.2 +length=3 +ns=namelist/UM Science Settings/section35/rp +sort-key=10 +type=real + +[namelist:stochastic_physics=rp_lsfc_z0_soil] +compulsory=true +description=RP for the roughness length for bare soil +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the roughness length for bare soil. + =Varies with z0v. + =Min, default and max values are set here + =The default value of z0_soil should equal the soil tile element of z0_nvg_io + =from the JULES namelist jules_nvegparm. + =Recommended values are 1.00000e-4 / 1.00000e-3 / 1.00000e-3 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0_urban_mult] +compulsory=true +description=RP for the roughness length for urban canyon and roof tiles +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the roughness length for urban canyon + =and roughness tile. For use with MORUSES only. + =Varies with z0v + =Min, default and max values are set here + =The default value should be 1.0. + =Recommended values are 0.5 / 1.0 / 1.5 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real +warn-if=this(2) != 1.0; # If the default it not 1.0, then the whole distribution of the ensemble will be shifted + +[namelist:stochastic_physics=rp_lsfc_z0hm_pft] +compulsory=true +description=RP for the ratio of the roughness length for heat to the + =roughness length for momentum. + =Input is an array of values corresponding to plant function type. +fail-if=this != namelist:jules_pftparm=z0hm_pft_io +help=The default value of z0hm_pft_io is set here - this should be the same + =as z0hm_pft_io for short vegetation (see jules namelist). +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0hm_pft_max] +compulsory=true +description=Max RP value for the ratio of the roughness length for + =heat to the roughness length for momentum. + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Maximum Random Perturbation value for z0hm_pft. Suggested value is 0.1 + =for short vegetation. +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0hm_pft_min] +compulsory=true +description=Min RP value for the ratio of the roughness length for heat + =to the roughness length for momentum. + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Minimum Random Perturbation value for z0hm_pft. Suggested value is 0.01 + =for short vegetation types. +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0hm_soil] +compulsory=true +description=RP for the roughness length for heat +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the roughness length for heat. + =Varies with z0v + =Min, default and max values are set here + =The default value of z0hm_soil should equal the soil tile + =element of z0hm_nvg_io from the JULES namelist jules_nvegparm. + =Recommended values are 0.01 / 0.2 / 0.5 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0v] +compulsory=true +description=RP for the vegetation tile roughness length for momentum + =Input is an array of values corresponding to plant function type. +fail-if=this != namelist:jules_pftparm=z0v_io +help=The default value of rp_lsfc_z0v is set here - this should be the same + =as z0v (see jules_pftparm namelist). +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0v_max] +compulsory=true +description=Max RP value for the vegetation tile roughness length for momentum + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Maximum Random Perturbation value for z0v. Suggested values are + =1.6,1.6,0.3,0.3 0.7 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_lsfc_z0v_min] +compulsory=true +description=Min RP value for the vegetation tile roughness length for momentum + =Input is an array of values corresponding to plant function type. +fail-if=len(this) != namelist:jules_surface_types=npft +help=Minimum Random Perturbation value for z0v. Suggested values are + =1.6,1.6,0.3,0.3 0.7 +length=: +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A10c +type=real + +[namelist:stochastic_physics=rp_mp_fxd_cld_num] +compulsory=true +description=Fixed cloud number parameter; + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the fixed cloud number + =in the CASIM microphysics scheme. + =Min, default and max values of fxd_cld_num_rp are set here + =Recommended values are 70.0e+06 / 150.0e+06 / 300.0e+06 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A08 +type=real + +[namelist:stochastic_physics=rp_mp_ice_fspd] +compulsory=true +description=Ice fallspeed parameter; + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the fall speed of ice + =in the CASIM microphysics scheme. + =Min, default and max values of ice_fspd_rp are set here + =Recommended values are 3600000.0 / 6000000.0 / 8400000.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A08 +type=real + +[namelist:stochastic_physics=rp_mp_mp_czero] +compulsory=true +description=Lagrangian structure function parameter; + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter used in the second-order Lagrangian structure + =function in the mixed-phase scheme + =Min, default and max values of mp_czero_rp are set here + =Recommended values are 4.0 / 10.0 / 10.0 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A08 +type=real + +[namelist:stochastic_physics=rp_mp_mpof] +compulsory=true +description=Mixed-phase overlap factor parameter; + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the mixed-phase overlap + =in the CASIM microphysics scheme. + =Min, default and max values of mpof_rp are set here + =Recommended values are 0.1 / 0.5 / 0.6 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A08 +type=real + +[namelist:stochastic_physics=rp_mp_ndrop_surf] +compulsory=true +description=Surface droplet number concentration; min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling surface droplet number concentration in + =the microphysics schemes. + =Min, default and max values of ndrop_surf are set here + =Recommended values for RAL3 are 2.0e+07 / 1.0e+07 / 10.0e+07 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A08 +type=real +warn-if=this(2) != namelist:microphysics=ndrop_surf + +[namelist:stochastic_physics=rp_mp_snow_fspd] +compulsory=true +description=Snow fallspeed parameter; + =min / default / max values +fail-if=(this(1) > this(2)) or (this(3) < this(2)); +help=Parameter controlling the fall speed of snow + =in the CASIM microphysics scheme. + =Min, default and max values of snow_fspd_rp are set here + =Recommended values are 7.2 / 12.0 / 16.8 +length=3 +ns=namelist/Science/Stochastic Physics/RP +sort-key=Panel-A08 +type=real + +[namelist:stochastic_physics=rp_ran_max] +compulsory=true +description=Number of independent RP variations +help=Number of independent RP variations +ns=namelist/Science/Stochastic Physics/RP +range=1:35 +sort-key=Panel-A04 +type=integer + +[namelist:stochastic_physics=skeb_add_increments] +compulsory=true +description=Add the SKEB increments to the prognostic winds +help=Set this to False for debugging purposes, increments will be + =generated but these will not be added to the flow. +ns=namelist/Science/Stochastic Physics/SKEB +sort-key=Panel-A1 +type=logical + +[namelist:stochastic_physics=skeb_br] +compulsory=true +description=SKEB Energy backscatter ratio +help=Backscatter ratio (as fraction of diss. energy) +ns=namelist/Science/Stochastic Physics/SKEB +range=0.01:1.0 +sort-key=Panel-A1c +type=real + +[namelist:stochastic_physics=skeb_convective_dissipation] +compulsory=true +description=Streamfunction modulation by convection +help=If TRUE include streamfunction modulation by convection +ns=namelist/Science/Stochastic Physics/SKEB +sort-key=Panel-A21 +trigger=namelist:stochastic_physics=skeb_convective_dissipation_factor: .true. ; + =namelist:stochastic_physics=skeb_convective_dissipation_modulation: .true. ; +type=logical + +[namelist:stochastic_physics=skeb_convective_dissipation_factor] +compulsory=true +description=Multiplication factor for convection dissipation +help=Multiplication factor for convection dissipation field (empirical value) +ns=namelist/Science/Stochastic Physics/SKEB +range=0.2:5.0 +sort-key=Panel-A21b +type=real + +[namelist:stochastic_physics=skeb_convective_dissipation_modulation] +compulsory=true +description=Convective dissipation rate factor for scalability across horizontal resolutions +help=A factor sqrt(216/res) modulates the convective dissipation rate, + =set to one if false +ns=namelist/Science/Stochastic Physics/SKEB +sort-key=Panel-A21c +type=logical + +[namelist:stochastic_physics=skeb_decorrelation_time] +compulsory=true +description=Decorrelation time in SKEB AR1 process +help=Tau is a decorrelation time (20000 sec = ~5.5 hrs is typical) +ns=namelist/Science/Stochastic Physics/SKEB +range=1.0e3:1.0e7 +sort-key=Panel-A2b +type=real + +[namelist:stochastic_physics=skeb_div_du] +compulsory=true +description=Method of divergent wind increment calculation +!enumeration=true +help= +ns=namelist/Science/Stochastic Physics/SKEB +sort-key=Panel-A22 +value-titles=Finite difference, Finite element +values='fd','fe' + +[namelist:stochastic_physics=skeb_level_bottom] +compulsory=true +description=Bottom level of SKEB calculations +help=Bottom level of SKEB calculations - model level a little above surface +ns=namelist/Science/Stochastic Physics/SKEB +range=2:60 +sort-key=Panel-A3a +type=integer + +[namelist:stochastic_physics=skeb_level_bottom_cap] +compulsory=true +description=Bottom level of SKEB capping +help=Bottom level of SKEB calculations - model level a little above surface +ns=namelist/Science/Stochastic Physics/SKEB +range=2:60 +sort-key=Panel-A3a +type=integer + +[namelist:stochastic_physics=skeb_level_top] +compulsory=true +description=Top level of SKEB calculations +help=Top level of SKEB calculations - model level at or just above tropopause +ns=namelist/Science/Stochastic Physics/SKEB +range=30:200 +sort-key=Panel-A3b +type=integer + +[namelist:stochastic_physics=skeb_n_smoothing_iters] +compulsory=true +description=Iteration count for spatial smoothing in SKEB +help=Iteration count for spatial smoothing +ns=namelist/Science/Stochastic Physics/SKEB +range=1:10 +sort-key=Panel-A4a +type=integer + +[namelist:stochastic_physics=skeb_numerical_dissipation] +compulsory=true +description=Streamfunction modulation by numerical dissipation +!enumeration=true +help=If TRUE include streamfunction modulation by numerical dissipation +ns=namelist/Science/Stochastic Physics/SKEB +sort-key=Panel-A22 +trigger=namelist:stochastic_physics=skeb_numerical_dissipation_factor: 'fd','fe' ; +value-titles=None, Finite difference, Finite element +values='none','fd','fe' + +[namelist:stochastic_physics=skeb_numerical_dissipation_factor] +compulsory=true +description=Multiplication factor for SKEB numerical dissipation +help=Multiplication factor for numerical dissipation field (empirical value) +ns=namelist/Science/Stochastic Physics/SKEB +range=0.2:5.0 +sort-key=Panel-A22b +type=real + +[namelist:stochastic_physics=skeb_rot_du] +compulsory=true +description=Method of rotational wind increment calculation +!enumeration=true +help= +ns=namelist/Science/Stochastic Physics/SKEB +sort-key=Panel-A22 +value-titles=Finite difference, Finite element +values='fd','fe' + +[namelist:stochastic_physics=skeb_total_backscatter] +compulsory=true +description=Global-mean rate of energy backscatter in SKEB +help=Global-mean rate of energy backscatter in m**2 s**(-3) (1.e-4 typical) +ns=namelist/Science/Stochastic Physics/SKEB +range=1.0e-5:1.0e-3 +sort-key=Panel-A1b +type=real + +[namelist:stochastic_physics=spt_add_increments] +compulsory=true +description=Add increments to the flow +help=Set this to False for debugging purposes, increments will be + =generated but these will not be added to the flow. +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A1 +type=logical + +[namelist:stochastic_physics=spt_convection_cfl_limit] +compulsory=true +description=Activate CFL constraint for convection increments +help=Check if the scaling of the convective mass flux by the + =SPT forcing pattern breaches the CFL limit. If it does, + =then the SPT perturbations are removed from this gridpoint. +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A3a +type=logical + +[namelist:stochastic_physics=spt_decorrelation_time] +compulsory=true +description=Decorrelation time in SPT AR1 process +help=Tau is a decorrelation time (20000 sec = ~5.5 hrs is typical) +ns=namelist/Science/Stochastic Physics/SPT +range=1.0e3:1.0e7 +sort-key=Panel-A2b +type=real + +[namelist:stochastic_physics=spt_level_begin_tapering_bottom] +compulsory=true +description=Level where near-surface tapering starts +fail-if=this <= namelist:stochastic_physics=spt_level_bottom +help=At this level the lower tapering begins, going down from here to + = spt_level_bottom as + = + = (k - spt_level_bottom) / + = (spt_level_begin_tapering_bottom - spt_level_bottom) + = + = Where k is the level number, hence spt_level_begin_tapering_bottom + = level still has an amplitude of 1 and spt_level_bottom of 0. +ns=namelist/Science/Stochastic Physics/SPT +range=2:60 +sort-key=Panel-A6b +type=integer + +[namelist:stochastic_physics=spt_level_begin_tapering_top] +compulsory=true +description=Level where near-top tapering starts +fail-if=this >= namelist:stochastic_physics=spt_level_top +help=At this level the upper tapering begins, going up from here to + = spt_level_top as + = + = (k - spt_level_tapering_top) / + = (spt_level_top - spt_level_tapering_top) + = + = Where k is the level number, hence spt_level_begin_tapering_top + = level still has an amplitude of 1 and spt_level_top of 0. +ns=namelist/Science/Stochastic Physics/SPT +range=30:200 +sort-key=Panel-A6c +type=integer + +[namelist:stochastic_physics=spt_level_bottom] +compulsory=true +description=Bottom level where SPT is active + =See Help panel for details +help=Bottom level wehre SPT perturbations are applied. + =Though, the tapering at this level is 0 so effectively + =SPT perturbations start one level above, see help-panel + = of spt_level_begin_tapering_bottom. +ns=namelist/Science/Stochastic Physics/SPT +range=2:60 +sort-key=Panel-A6a +type=integer + +[namelist:stochastic_physics=spt_level_top] +compulsory=true +description=Top level where SPT is active + =See Help panel for details +help=Top level where SPT perturbations are applied. + =Though, the tapering at this level is 0 so effectively + =SPT perturbations start one level below, see help-panel + = of spt_level_begin_tapering_top. +ns=namelist/Science/Stochastic Physics/SPT +range=30:200 +sort-key=Panel-A6d +type=integer + +[namelist:stochastic_physics=spt_moisture_conservation] +compulsory=true +description=Activate water conservation in the column +help=It makes SPT to conserve the specific humidity q in the model column. +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A3b +type=logical + +[namelist:stochastic_physics=spt_mse_conservation] +compulsory=true +description=Activate MSE conservation +help=It links SPT theta increments to q increments to conserve Moist Static Energy. +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A3c +type=logical + +[namelist:stochastic_physics=spt_n_smoothing_iters] +compulsory=true +description=Number of smoothing iterations for the SPT pert +help=The number of iterations for the 1-2-1 filter to the SPT perturbations +ns=namelist/Science/Stochastic Physics/SPT +range=0:10 +sort-key=Panel-A5 +type=integer + +[namelist:stochastic_physics=spt_orog_forcing_pattern_thresh] +compulsory=true +description=Capping SPT pert above ABS(fp) and stddev_orog_thres +help=Set the threshold for the absolute value of the Forcing Pattern (FP) + = for SPT orographic capping. + = SPT perturbation are removed if FP >= spt_orog_forcing_pattern_thresh in areas + = where the standard deviation of subgrid orography is higher than the + = 'stddev_orog_thres' parameter (also contained in the 'namelist:stochastic_physics'). + = The default value is 0.5. +ns=namelist/Science/Stochastic Physics/SPT +range=0.1:1.0 +sort-key=Panel-A3d +type=real + +[namelist:stochastic_physics=spt_stddev_convection] +compulsory=true +description=Std dev. for the SPT perturbations to the Convection tendency +help=The Standard deviation of the forcing pattern applied to the + =Convection tendencies. To scale the pertubation +ns=namelist/Science/Stochastic Physics/SPT +range=0.01:10 +sort-key=Panel-A13b +type=real + +[namelist:stochastic_physics=spt_stddev_microphysics] +compulsory=true +description=Std dev. for the SPT perturbations to the Microphysics tendency +help=The Standard deviation of the forcing pattern applied to the + =Microphysics tendencies. To scale the pertubation +ns=namelist/Science/Stochastic Physics/SPT +range=0.01:10 +sort-key=Panel-A12b +type=real + +[namelist:stochastic_physics=spt_stddev_orog_thres] +compulsory=true +description=Capping SPT pert. above this value of subgrid std. dev. of orography +help=This parameter sets the threshold for the standard deviation of subgrid orography (sigma_orog) + = for SPT orographic capping. + = SPT perturbations are removed in areas where sigma_orog >= stddev_orog_thres and + = when the absolute value of the forcing pattern is above the namelist:stochastic_physics + = parameter 'spt_orog_forcing_pattern_thresh'. The default value is 500m +ns=namelist/Science/Stochastic Physics/SPT +range=100.0:4000.0 +sort-key=Panel-A3b +type=real + +[namelist:stochastic_physics=spt_stddev_radiation] +compulsory=true +description=Std dev. for the SPT perturbations to the Radiation tendency +help=The Standard deviation of the forcing pattern applied to the + =Radiative tendencies. To scale the pertubation +ns=namelist/Science/Stochastic Physics/SPT +range=0.01:10 +sort-key=Panel-A11b +type=real + +[namelist:stochastic_physics=spt_use_convection] +compulsory=true +description=Apply SPT perturbations to the T and q tendencies from convection +help=If false it does not add the perturbations from q and T of conv.tendencies +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A13 +trigger=namelist:stochastic_physics=spt_stddev_convection: .true. ; +type=logical + +[namelist:stochastic_physics=spt_use_microphysics] +compulsory=true +description=Apply SPT perturbations to the T and q tendencies from Microphysics +help=If false it does not add the perturbations from q and T of microphysics + = (a.k.a. Large-Scale rain) tendencies +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A12 +trigger=namelist:stochastic_physics=spt_stddev_microphysics: .true. ; +type=logical + +[namelist:stochastic_physics=spt_use_radiation] +compulsory=true +description=Apply SPT perturbations to the T and q tendencies from Radiation +help=If false it does not add the perturbations from q and T of Rad. tendencies +ns=namelist/Science/Stochastic Physics/SPT +sort-key=Panel-A11 +trigger=namelist:stochastic_physics=spt_stddev_radiation: .true. ; +type=logical + +[namelist:stochastic_physics=stph_n_max] +compulsory=true +description=Maximum wavenumber for the SPT and SKEB forcing pattern +help=This value is the maximum wavenumber of the spectral + =coefficients that define the forcing pattern + = + = It is recommended to have a value of 60 to only force + = the planetary and synoptic scales. + = Higher values may have a detrimental impact on the model + = runtime and usage of computational resources. +ns=namelist/Science/Stochastic Physics +range=2:150 +sort-key=Panel-A2a +type=integer + +[namelist:stochastic_physics=stph_n_min] +compulsory=true +description=Mininum wavenumber for the SKEB forcing pattern +help=This value is the maximum wavenumber of the spectral + =coefficients that define the forcing pattern. Note it is not + =applied to SPT as it uses a Gaussian distribution. + = + = It is recommended to have a value of 60 to only force + = the planetary and synoptic scales. + = Higher values may have a detrimental impact on the model + = runtime and usage of computational resources. +ns=namelist/Science/Stochastic Physics +range=1:150 +sort-key=Panel-A1a +type=integer + +[!namelist:stochastic_physics=stph_spectral_dim] +compulsory=false +description=SPT and SKEB spectral dimension (same) +expression=(namelist:stochastic_physics=stph_n_max + 1)*(namelist:stochastic_physics=stph_n_max + 2)/2-1 +help=The dimension of the spectral coefficients of the stochastic Forcing Pattern. + = As the (N+1)x(N+1) matrix of spectral coefficients x spherical harmonics is a triangular + = matrix as below, where N is max. wavenumber (stph_n_max) + = + = ------------------------------- + = | 0 | | | | | + = | 1 | 2 | | | | + = | 3 | 4 | 5 | | | + = | 6 | 7 | 8 | 9 | | + = | 10 | 11 | 12 | 13 | 14 | + = ------------------------------- + = + = It can be reshape to a vector of dimensions + = (N+1) + ((N+1)*2-(N+1))/2 = (N+1)*(N+2)/2 -1 + = For the diagonal, and lower half minus diagonal. +ns=namelist/Science/Stochastic Physics/SPT +type=integer + +[namelist:stochastic_physics=use_random_parameters] +compulsory=true +description=Switch controls use of the RP scheme +help=Main switch to control use of the Random Parameter (RP) scheme +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A +trigger=namelist:stochastic_physics=rp_bl_a_ent_1: .true. ; + =namelist:stochastic_physics=rp_bl_a_ent_shr_max: .true.; + =namelist:stochastic_physics=rp_bl_a_ent_shr: .true.; + =namelist:stochastic_physics=rp_bl_cbl_mix_fac: .true. ; + =namelist:stochastic_physics=rp_bl_cld_top_diffusion: .true. ; + =namelist:stochastic_physics=rp_bl_min_mix_length: .true. ; + =namelist:stochastic_physics=rp_bl_neutral_mix_length: .true. ; + =namelist:stochastic_physics=rp_bl_ricrit: .true. ; + =namelist:stochastic_physics=rp_bl_smag_coef: .true. ; + =namelist:stochastic_physics=rp_bl_stable_ri_coef: .true. ; + =namelist:stochastic_physics=rp_callfreq: .true. ; + =namelist:stochastic_physics=rp_cycle_in: .true. ; + =namelist:stochastic_physics=rp_cycle_out: .true. ; + =namelist:stochastic_physics=rp_cycle_tm: .true. ; + =namelist:stochastic_physics=rp_decorr_ts: .true. ; + =namelist:stochastic_physics=rp_lsfc_alnir_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_alnir_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_alnir: .true. ; + =namelist:stochastic_physics=rp_lsfc_alpar_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_alpar_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_alpar: .true. ; + =namelist:stochastic_physics=rp_lsfc_lai_mult_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_lai_mult_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_lai_mult: .true. ; + =namelist:stochastic_physics=rp_lsfc_omnir_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_omnir_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_omnir: .true. ; + =namelist:stochastic_physics=rp_lsfc_omega_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_omega_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_omega: .true. ; + =namelist:stochastic_physics=rp_lsfc_orog_drag_param: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0_soil: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0_urban_mult: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0hm_pft_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0hm_pft_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0hm_pft: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0hm_soil: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0v_max: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0v_min: .true. ; + =namelist:stochastic_physics=rp_lsfc_z0v: .true. ; + =namelist:stochastic_physics=rp_mp_ice_fspd: .true. ; + =namelist:stochastic_physics=rp_mp_fxd_cld_num: .true. ; + =namelist:stochastic_physics=rp_mp_mp_czero: .true. ; + =namelist:stochastic_physics=rp_mp_mpof: .true. ; + =namelist:stochastic_physics=rp_mp_ndrop_surf: .true. ; + =namelist:stochastic_physics=rp_mp_snow_fspd: .true. ; + =namelist:stochastic_physics=rp_ran_max: .true. ; +type=logical + +[namelist:stochastic_physics=use_skeb] +compulsory=true +description=Switch controls use of SKEB +help=Main switch to control use of Stochastic Kinetic Energy Backscatter v2 +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A +trigger=namelist:stochastic_physics=skeb_add_increments: .true. ; + =namelist:stochastic_physics=skeb_br: .true. ; + =namelist:stochastic_physics=skeb_convective_dissipation: .true. ; + =namelist:stochastic_physics=skeb_decorrelation_time: .true. ; + =namelist:stochastic_physics=skeb_div_du: .true. ; + =namelist:stochastic_physics=skeb_level_bottom: .true. ; + =namelist:stochastic_physics=skeb_level_bottom_cap: .true. ; + =namelist:stochastic_physics=skeb_level_top: .true. ; + =namelist:stochastic_physics=skeb_n_smoothing_iters: .true. ; + =namelist:stochastic_physics=skeb_numerical_dissipation: .true. ; + =namelist:stochastic_physics=skeb_rot_du: .true. ; + =namelist:stochastic_physics=skeb_total_backscatter: .true. ; +type=logical + +[namelist:stochastic_physics=use_spt] +compulsory=true +description=Switch controls use of SPT scheme +help=Main switch to control use of Stochastic Perturbation of Tendencies (SPT) scheme +ns=namelist/Science/Stochastic Physics +sort-key=Panel-A +trigger=namelist:stochastic_physics=spt_add_increments: .true. ; + =namelist:stochastic_physics=spt_convection_cfl_limit: .true. ; + =namelist:stochastic_physics=spt_decorrelation_time: .true. ; + =namelist:stochastic_physics=spt_level_bottom: .true. ; + =namelist:stochastic_physics=spt_level_begin_tapering_bottom: .true. ; + =namelist:stochastic_physics=spt_level_begin_tapering_top: .true. ; + =namelist:stochastic_physics=spt_level_top: .true. ; + =namelist:stochastic_physics=spt_moisture_conservation: .true. ; + =namelist:stochastic_physics=spt_mse_conservation: .true. ; + =namelist:stochastic_physics=spt_n_smoothing_iters: .true. ; + =namelist:stochastic_physics=spt_orog_forcing_pattern_thresh: .true. ; + =namelist:stochastic_physics=spt_stddev_convection: .true.; + =namelist:stochastic_physics=spt_stddev_microphysics: .true.; + =namelist:stochastic_physics=spt_stddev_orog_thres: .true. ; + =namelist:stochastic_physics=spt_stddev_radiation: .true.; + =namelist:stochastic_physics=spt_use_convection: .true.; + =namelist:stochastic_physics=spt_use_microphysics: .true.; + =namelist:stochastic_physics=spt_use_radiation: .true.; +type=logical diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/version22_30.py b/interfaces/socrates_interface/rose-meta/socrates-radiation/version22_30.py new file mode 100644 index 000000000..5fd5d656f --- /dev/null +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/version22_30.py @@ -0,0 +1,42 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + return config, self.reports diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py index 5a3ba41f4..152c043d0 100644 --- a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.0/rose-meta.conf b/interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.0/rose-meta.conf new file mode 100644 index 000000000..43f642ccb --- /dev/null +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.0/rose-meta.conf @@ -0,0 +1,1941 @@ +#============================================================================== +# COSP +#============================================================================== + +[namelist:cosp] +compulsory=true +description=Options for the CFMIP Observation Simulator Package (COSP) +ns=namelist/Science/SOCRATES COSP +sort-key=Section-A20 +title=COSP + +[namelist:cosp=l_cosp] +compulsory=true +description=Run COSP if diagnostics are requested +!kind=default +ns=namelist/Science/SOCRATES COSP +sort-key=Panel-A01 +trigger=namelist:cosp=n_subcol_gen: .true. ; +type=logical + +[namelist:cosp=n_subcol_gen] +compulsory=true +description=Number of sub-columns for the cloud generator +!kind=default +sort-key=Panel-A02 +type=integer + +#============================================================================== +# RADIATION +#============================================================================== +[namelist:radiation] +compulsory=true +description=Radiation scheme options +ns=namelist/Science/SOCRATES Radiation +sort-key=Section-A10 +title=Radiation + +[namelist:radiation=cloud_entrapment] +compulsory=true +description=Treatment of flux entrapment by cloud layers +!enumeration=true +help=This option determines the solver used for radiative transfer between + =fractional cloud layers when not using McICA. There are two options: + =_________________________________________________________________ + =Maximum + = Maximum entrapment: fluxes are horizontally homogenised within + = cloud or clear-sky regions and may be reflected back up into + = different regions. + =_________________________________________________________________ + =Zero + = Zero entrapment: fluxes exiting the base of a given region may + = only be reflected back up into the same region. +sort-key=Panel-A04a +value-titles=Maximum, Zero +values='max','zero' + +[namelist:radiation=cloud_inhomogeneity] +compulsory=true +description=Sub-grid cloud horizontal inhomogeneity +!enumeration=true +help=Cloud water content exhibits subgrid-scale variability. The options for + =reperesenting the radiative effects of this variability are as follows: + =_________________________________________________________________ + =Homogeneous + = Horizontal water content variability is ignored. + =_________________________________________________________________ + =Scaling + = The mean water content in each gridbox is multiplied by given + = scaling factors. + =_________________________________________________________________ + =MCICA + = A stochastic cloud generator is used to produce sub-columns + = containing different water content values, which are randomly sampled. + =_________________________________________________________________ + =Cairns + = A correction is applied to the optical scattering properties to + = account for cloud inhomogeneity based on Cairns et al. (2000) JAS, 57. + =_________________________________________________________________ + =Tripleclouds + = Split cloud into optically thick and thin regions using the + = parametrisation from Hogan et al. (2019) DOI:10.1175/JAS-D-18-0366.1 +sort-key=Panel-A04 +trigger=namelist:radiation=cloud_entrapment: 'homogeneous', 'scaling', + ='cairns', 'tripleclouds' ; +value-titles=Homogeneous, Scaling factor, MCICA, Cairns et. al. 2000, + =Tripleclouds +values='homogeneous', 'scaling', 'mcica', 'cairns', 'tripleclouds' + +[namelist:radiation=cloud_overlap] +compulsory=true +description=Cloud fraction vertical overlap +!enumeration=true +help=Options for treating the vertical overlap between different cloud + =layers: + =_________________________________________________________________ + =Maximum-Random + = Clouds in adjacent layers are maximally overlapped. + = Clouds separated by clear-sky are randomly overlapped. + =_________________________________________________________________ + =Random + = All clouds are randomly overlapped. + =_________________________________________________________________ + =Exponential-Random + = For clouds in adjacent layers the overlap is a linear combination + = of maximum and random. The parameter controlling the proportion + = of each depends on the decorrelation pressure scale(s). +sort-key=Panel-A03 +trigger=namelist:radiation=cloud_vertical_decorr: 'exponential_random' ; +value-titles=Maximum-Random, Random, Exponential-Random +values='maximum_random', 'random', 'exponential_random' + +[namelist:radiation=cloud_representation] +compulsory=true +description=Representation of cloud +!enumeration=true +help=Mixed-phase clouds contain both ice crystals and water droplets. + =For the current options these are represented as being + =segregated into separate sub-clouds placed side by side. + =The clouds may be further divided into one or two regions to + =represent either separate convective and large-scale cloud + =fractions or optically thick and thin regions depending on the + =following options: + =_________________________________________________________________ + =No cloud + = Cloud has no radiative effect. + =_________________________________________________________________ + =Large-scale cloud only + = Single cloud region containing only large-scale liquid and ice. + =_________________________________________________________________ + =Combined convective and large-scale cloud + = Single cloud region including contributions from convective + = and large-scale cloud liquid and ice. + =_________________________________________________________________ + =Segregated large-scale and convective cloud + = Two cloud regions: one region containing convective liquid and + = ice and a second region containing large-scale liquid and ice. + =_________________________________________________________________ + =Combined cloud split into thick and thin regions + = Two cloud regions: both regions contain contributions from + = convective and large-scale cloud. Condensate is proportioned + = between an optically thick and an optically thin region + = depending on the cloud_inhomogeneity option. +sort-key=Panel-A02 +trigger=namelist:radiation=cloud_overlap: 'liquid_and_ice', + ='combined', 'conv_strat_liq_ice', 'split' ; + =namelist:radiation=cloud_inhomogeneity: 'liquid_and_ice', + ='combined', 'conv_strat_liq_ice', 'split' ; + =namelist:radiation=droplet_effective_radius: 'liquid_and_ice', + ='combined', 'conv_strat_liq_ice', 'split' ; +value-titles=No cloud, + =Large-scale cloud only, + =Combined convective and large-scale cloud, + =Segregated large-scale and convective cloud, + =Combined cloud split into thick and thin regions +values='no_cloud', 'liquid_and_ice', 'combined', 'conv_strat_liq_ice', 'split' + +[namelist:radiation=cloud_vertical_decorr] +compulsory=true +description=Decorrelation pressure scale for cloud vertical overlap +help=Defines the sub-grid cloud vertical overlap using a single + =global value of the decorrelation pressure scale (Pa). + =This is the pressure difference over which the extent of vertical + =overlap of sub-grid cloud fraction falls to 1/e. +!kind=default +sort-key=Panel-A03a +type=real + +[namelist:radiation=constant_droplet_effective_radius] +compulsory=true +description=Cloud droplet effective radius +help=Value of constant cloud droplet effective radius in metres. +!kind=default +sort-key=Panel-A05a +type=real + +[namelist:radiation=droplet_effective_radius] +compulsory=true +description=Treatment of cloud droplet effective radius +!enumeration=true +help=Options for setting the cloud droplet effective radius: + =_________________________________________________________________ + =Default + = Use the Socrates default value of 7 microns. + =_________________________________________________________________ + =Constant + = Use the constant value: constant_droplet_effective_radius + =_________________________________________________________________ + =Liu Spectral Dispersion + = Use the relative spectral dispersion parameterization of + = Liu et al (2008), ERL. + = The relative dispersion used in the calculation of cloud + = droplet effective radius is calculated as a function of + = cloud liquid water and droplet number concentration. +sort-key=Panel-A05 +trigger=namelist:radiation=constant_droplet_effective_radius: 'constant' ; + =namelist:radiation=liu_aparam: 'liu' ; + =namelist:radiation=liu_bparam: 'liu' ; +value-titles=Default (7 micron), + =Constant, + =Liu Spectral Dispersion +values='default', 'constant', 'liu' + +[namelist:radiation=i_cloud_ice_type_lw] +compulsory=true +description=Type of optical properties for cloud ice +help=Type number for the ice-crystal optical properties + =selected from those present in the LW spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Long-Wave +sort-key=Panel-A01b +type=integer + +[namelist:radiation=i_cloud_ice_type_lwinc] +compulsory=true +description=Type of optical properties for cloud ice increments +help=Type number for the ice-crystal optical properties + =selected from those present in the LW increment spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Long-Wave Increment +sort-key=Panel-A01b +type=integer + +[namelist:radiation=i_cloud_ice_type_sw] +compulsory=true +description=Type of optical properties for cloud ice +help=Type number for the ice-crystal optical properties + =selected from those present in the SW spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Short-Wave +sort-key=Panel-A01b +type=integer + +[namelist:radiation=i_cloud_ice_type_swinc] +compulsory=true +description=Type of optical properties for cloud ice increments +help=Type number for the ice-crystal optical properties + =selected from those present in the SW increment spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Short-Wave Increment +sort-key=Panel-A01b +type=integer + +[namelist:radiation=i_cloud_liq_type_lw] +compulsory=true +description=Type of optical properties for cloud liquid +help=Type number for the cloud liquid optical properties + =selected from those present in the LW spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Long-Wave +sort-key=Panel-A01a +type=integer + +[namelist:radiation=i_cloud_liq_type_lwinc] +compulsory=true +description=Type of optical properties for cloud liquid increments +help=Type number for the cloud liquid optical properties + =selected from those present in the LW increment spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Long-Wave Increment +sort-key=Panel-A01a +type=integer + +[namelist:radiation=i_cloud_liq_type_sw] +compulsory=true +description=Type of optical properties for cloud liquid +help=Type number for the cloud liquid optical properties + =selected from those present in the SW spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Short-Wave +sort-key=Panel-A01a +type=integer + +[namelist:radiation=i_cloud_liq_type_swinc] +compulsory=true +description=Type of optical properties for cloud liquid increments +help=Type number for the cloud liquid optical properties + =selected from those present in the SW increment spectral file. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Short-Wave Increment +sort-key=Panel-A01a +type=integer + +[namelist:radiation=l_inc_radstep] +compulsory=true +description=Apply incremental radiation timesteps +help=Simple radiation increments may be calculated more frequently + =than full radiation calculations. This is generally applied to + =account for changes in low cloud. +!kind=default +sort-key=Panel-A00a +trigger=namelist:radiation=i_cloud_ice_type_lwinc: .true. ; + =namelist:radiation=i_cloud_ice_type_swinc: .true. ; + =namelist:radiation=i_cloud_liq_type_lwinc: .true. ; + =namelist:radiation=i_cloud_liq_type_swinc: .true. ; + =namelist:radiation=n_inc_radstep: .true. ; + =namelist:radiation=scatter_method_lwinc: .true. ; + =namelist:radiation=spectral_file_lwinc: .true. ; + =namelist:radiation=spectral_file_swinc: .true. ; +type=logical + +[namelist:radiation=l_planet_grey_surface] +compulsory=true +description=Set grey surface optical properties +help=Grey surface with constant shortwave albedo + =and longwave emissivity for all points. +!kind=default +sort-key=Panel-A01 +trigger=namelist:radiation=planet_albedo: .true. ; + =namelist:radiation=planet_emissivity: .true. ; + =namelist:specified_surface=surf_temp_forcing: .true. ; +type=logical + +[namelist:radiation=l_rayleigh_sw] +compulsory=true +description=Include Rayleigh scattering +!kind=default +ns=namelist/Science/SOCRATES Radiation/Short-Wave +sort-key=Panel-A02 +type=logical + +[namelist:radiation=l_trans_zen_correction] +compulsory=true +description=Transmission based solar zenith angle correction +help=This will take into account the change in optical path length through the + =atmosphere when correcting the surface fluxes for the change in + =solar zenith angle between radiation time-steps. See Manners et al 2009, + =DOI:10.1002/qj.385 for further details. +!kind=default +ns=namelist/Science/SOCRATES Radiation/Short-Wave +sort-key=Panel-A01c +type=logical + +[namelist:radiation=liu_aparam] +compulsory=true +description=Parameter A for Liu spectral dispersion +help=Parameter to control the cloud droplet effective radius as a function of the cloud droplet number concentration. +!kind=default +sort-key=Panel-A05a +type=real + +[namelist:radiation=liu_bparam] +compulsory=true +description=Parameter B for Liu spectral dispersion +help=Parameter to control the cloud droplet effective radius as a function of the cloud droplet number concentration. +!kind=default +sort-key=Panel-A05b +type=real + +[namelist:radiation=mcica_data_file] +compulsory=true +description=MCICA data file +help=The path to the MCICA data file holding the configuration for sampling + =sub-grid cloud. This file is specific to the particular SW and LW + =spectral files used in the run and will usually be held in the same + =directory as the spectral files. +sort-key=Panel-A04b +!string_length=filename +type=character + +[namelist:radiation=n_horiz_ang] +compulsory=true +description=Number of aspects of horizon angles +help=Number of directions in which horizon angles are supplied in + =the ancillary data. +!kind=default +sort-key=Panel-A06a +type=integer + +[namelist:radiation=n_horiz_layer] +compulsory=true +description=Number of layers of horizon angles +help=Number of model layers (including the surface) in which horizon + =angles are supplied in the ancillary data. +!kind=default +sort-key=Panel-A06b +type=integer + +[namelist:radiation=n_inc_radstep] +compulsory=true +description=Number of model timesteps per increment radiation timestep +help=The increment radiation calculations should be done more frequently + =then every radiation timestep. Increment calculations will be done + =on timesteps 1, 1+n_inc_radstep, 1+n_inc_radstep*2... +!kind=default +sort-key=Panel-A00b +type=integer + +[namelist:radiation=n_radstep] +compulsory=true +description=Number of model timesteps per radiation timestep +help=The radiation calculations may be done less frequently than + =every model (dynamics) timestep. Radiation calculations will + =be done on timesteps 1, 1+n_radstep, 1+n_radstep*2... +!kind=default +sort-key=Panel-A00 +type=integer + +[namelist:radiation=planet_albedo] +compulsory=true +description=Grey surface shortwave albedo +help=Surface albedo for all points and all wavelengths. +!kind=default +sort-key=Panel-A01a +type=real + +[namelist:radiation=planet_emissivity] +compulsory=true +description=Grey surface longwave emissivity +help=Surface emissivity for all points and all wavelengths. +!kind=default +sort-key=Panel-A01b +type=real + +[namelist:radiation=scatter_method_lw] +compulsory=true +description=Treatment of scattering for longwave optical properties +!enumeration=true +help=Treatment of scattering for longwave optical properties. + =Approximate and hybrid methods are faster but less accurate. + =The hybrid method uses a different treatment of scattering for each + =k-term and requires the methods to be set in the spectral file. +ns=namelist/Science/SOCRATES Radiation/Long-Wave +sort-key=Panel-A010 +value-titles=Full,None,Approximate,Hybrid +values='full','none','approx','hybrid' + +[namelist:radiation=scatter_method_lwinc] +compulsory=true +description=Treatment of scattering for longwave increments +!enumeration=true +help=Treatment of scattering for longwave increments + =Approximate and hybrid methods are faster but less accurate. + =The hybrid method uses a different treatment of scattering for each + =k-term and requires the methods to be set in the spectral file. +ns=namelist/Science/SOCRATES Radiation/Long-Wave Increment +sort-key=Panel-A010 +value-titles=Full,None,Approximate,Hybrid +values='full','none','approx','hybrid' + +[namelist:radiation=spectral_file_lw] +compulsory=true +description=Longwave spectral file +help=The path to the longwave spectral file holding the configuration of + =optical properties for the longwave radiation calculation. +ns=namelist/Science/SOCRATES Radiation/Long-Wave +sort-key=Panel-A01 +!string_length=filename +type=character + +[namelist:radiation=spectral_file_lwinc] +compulsory=true +description=Increment longwave spectral file +help=The path to the longwave spectral file holding the configuration of + =optical properties for the incremental longwave radiation calculation. +ns=namelist/Science/SOCRATES Radiation/Long-Wave Increment +sort-key=Panel-A01 +!string_length=filename +type=character + +[namelist:radiation=spectral_file_sw] +compulsory=true +description=Shortwave spectral file +help=The path to the shortwave spectral file holding the configuration of + =optical properties for the shortwave (SW) radiation calculation. +ns=namelist/Science/SOCRATES Radiation/Short-Wave +sort-key=Panel-A01 +!string_length=filename +type=character + +[namelist:radiation=spectral_file_swinc] +compulsory=true +description=Increment shortwave spectral file +help=The path to the shortwave spectral file holding the configuration of + =optical properties for the incremental shortwave radiation calculation. +ns=namelist/Science/SOCRATES Radiation/Short-Wave Increment +sort-key=Panel-A01 +!string_length=filename +type=character + +[namelist:radiation=topography] +compulsory=true +description=Topographic correction scheme +!enumeration=true +help=Treatment of radiative transfer over resolved topographic features: + =_________________________________________________________________ + =Flat + = No corrections for slope or shading + =_________________________________________________________________ + =Slope + = Corrects the direct SW radiation absorbed and reflected at the + = surface for the angle of the surface slope with respect to the + = position of the sun. + = + = Requires that X and Y gradient fields are read from the + = orography ancillary file. + =_________________________________________________________________ + =Horizon + = In addition to the treatment of surface slope, the direct SW + = radiation at the surface will also be corrected for shading by + = surrounding terrain. The insulating effect of surrounding + = terrain on the LW net surface flux will be accounted for in + = the absorbed land surface flux (within JULES). + = + = Requires that horizon angle and aspect fields are read from the + = orography ancillary file. + = + =Manners et. al. (2012), DOI:10.1002/qj.956 +sort-key=Panel-A06 +trigger=namelist:radiation=n_horiz_ang: 'horizon' ; + =namelist:radiation=n_horiz_layer: 'horizon' ; +value-titles=Flat, Slope, Horizon +values='flat', 'slope', 'horizon' + +#============================================================================== +# RADIATIVELY ACTIVE GASES +#============================================================================== +[namelist:radiative_gases] +compulsory=true +description=Mass mixing ratios of radiatively active gases [kg/kg] +help=Settings for the gas mass mixing ratios to be used in + =the radiative transfer calculations. + = + =When the 'time_varying' option is used: + = If a negative rate is specified in the *_clim_fcg_rates parameter + = gas concentrations will be linearly interpolated between given values. + = Where positive rates are supplied the current gas concentration will + = be calculated by compounding the rates given for each year. + = This means only the concentration supplied for the first year of the + = positive sequence will be used. +ns=namelist/Science/SOCRATES Radiation/Gases +sort-key=Section-A01b +title=Radiatively active gases + +[namelist:radiative_gases=cfc113_clim_fcg_levls] +compulsory=true +description=List of values for growth for the CFC113 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A01c +type=real + +[namelist:radiative_gases=cfc113_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the CFC113 gas +sort-key=Panel-A01d +type=integer + +[namelist:radiative_gases=cfc113_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the CFC113 gas +length=: +sort-key=Panel-A01e +type=real + +[namelist:radiative_gases=cfc113_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas CFC113 +length=: +sort-key=Panel-A01f +type=integer + +[namelist:radiative_gases=cfc113_mix_ratio] +compulsory=true +description=CFC113 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A01b +type=real + +[namelist:radiative_gases=cfc113_rad_opt] +compulsory=true +description=Radiative options for CFC113 +!enumeration=true +help=RT options for the mixing ratio of CFC113 +sort-key=Panel-A01a +trigger=namelist:radiative_gases=cfc113_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=cfc113_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=cfc113_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=cfc113_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=cfc113_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value +values='off', 'constant', 'time_varying' + +[namelist:radiative_gases=cfc11_clim_fcg_levls] +compulsory=true +description=List of values for growth for the CFC11 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A00c +type=real + +[namelist:radiative_gases=cfc11_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the CFC11 gas +sort-key=Panel-A00d +type=integer + +[namelist:radiative_gases=cfc11_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the CFC11 gas +length=: +sort-key=Panel-A00e +type=real + +[namelist:radiative_gases=cfc11_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas CFC11 +length=: +sort-key=Panel-A00f +type=integer + +[namelist:radiative_gases=cfc11_mix_ratio] +compulsory=true +description=CFC11 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A00b +type=real + +[namelist:radiative_gases=cfc11_rad_opt] +compulsory=true +description=Radiative options for CFC11 +!enumeration=true +help=RT options for the mixing ratio of CFC11 +sort-key=Panel-A00a +trigger=namelist:radiative_gases=cfc11_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=cfc11_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=cfc11_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=cfc11_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=cfc11_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value +values='off', 'constant', 'time_varying' + +[namelist:radiative_gases=cfc12_clim_fcg_levls] +compulsory=true +description=List of values for growth for the CFC12 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A02c +type=real + +[namelist:radiative_gases=cfc12_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the CFC12 gas +sort-key=Panel-A02d +type=integer + +[namelist:radiative_gases=cfc12_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the CFC12 gas +length=: +sort-key=Panel-A02e +type=real + +[namelist:radiative_gases=cfc12_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas CFC12 +length=: +sort-key=Panel-A02f +type=integer + +[namelist:radiative_gases=cfc12_mix_ratio] +compulsory=true +description=CFC12 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A02b +type=real + +[namelist:radiative_gases=cfc12_rad_opt] +compulsory=true +description=Radiative options for CFC12 +!enumeration=true +help=RT options for the mixing ratio of CFC12 +sort-key=Panel-A02a +trigger=namelist:radiative_gases=cfc12_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=cfc12_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=cfc12_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=cfc12_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=cfc12_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value +values='off', 'constant', 'time_varying' + +[namelist:radiative_gases=ch4_clim_fcg_levls] +compulsory=true +description=List of values for growth for the CH4 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A03c +type=real + +[namelist:radiative_gases=ch4_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the CH4 gas +sort-key=Panel-A03d +type=integer + +[namelist:radiative_gases=ch4_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the CH4 gas +length=: +sort-key=Panel-A03e +type=real + +[namelist:radiative_gases=ch4_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas CH4 +length=: +sort-key=Panel-A03f +type=integer + +[namelist:radiative_gases=ch4_mix_ratio] +compulsory=true +description=CH4 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A03b +type=real + +[namelist:radiative_gases=ch4_rad_opt] +compulsory=true +description=Radiative options for CH4 +!enumeration=true +help=RT options for the mixing ratio of CH4 +sort-key=Panel-A03a +trigger=namelist:radiative_gases=ch4_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=ch4_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=ch4_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=ch4_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=ch4_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=co2_clim_fcg_levls] +compulsory=true +description=List of values for growth for the CO2 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A05c +type=real + +[namelist:radiative_gases=co2_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the CO2 gas +sort-key=Panel-A05d +type=integer + +[namelist:radiative_gases=co2_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the CO2 gas +length=: +sort-key=Panel-A05e +type=real + +[namelist:radiative_gases=co2_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas CO2 +length=: +sort-key=Panel-A05f +type=integer + +[namelist:radiative_gases=co2_mix_ratio] +compulsory=true +description=CO2 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A05b +type=real + +[namelist:radiative_gases=co2_rad_opt] +compulsory=true +description=Radiative options for CO2 +!enumeration=true +help=RT options for the mixing ratio of CO2 +sort-key=Panel-A05a +trigger=namelist:radiative_gases=co2_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=co2_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=co2_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=co2_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=co2_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=co_clim_fcg_levls] +compulsory=true +description=List of values for growth for the CO gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A04c +type=real + +[namelist:radiative_gases=co_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the CO gas +sort-key=Panel-A04d +type=integer + +[namelist:radiative_gases=co_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the CO gas +length=: +sort-key=Panel-A04e +type=real + +[namelist:radiative_gases=co_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas CO +length=: +sort-key=Panel-A04f +type=integer + +[namelist:radiative_gases=co_mix_ratio] +compulsory=true +description=CO mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A04b +type=real + +[namelist:radiative_gases=co_rad_opt] +compulsory=true +description=Radiative options for CO +!enumeration=true +help=RT options for the mixing ratio of CO +sort-key=Panel-A04a +trigger=namelist:radiative_gases=co_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=co_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=co_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=co_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=co_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=cs_clim_fcg_levls] +compulsory=true +description=List of values for growth for the Cs gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A18c +type=real + +[namelist:radiative_gases=cs_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the Cs gas +sort-key=Panel-A18d +type=integer + +[namelist:radiative_gases=cs_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the Cs gas +length=: +sort-key=Panel-A18e +type=real + +[namelist:radiative_gases=cs_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas Cs +length=: +sort-key=Panel-A18f +type=integer + +[namelist:radiative_gases=cs_mix_ratio] +compulsory=true +description=Cs mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A18b +type=real + +[namelist:radiative_gases=cs_rad_opt] +compulsory=true +description=Radiative options for Cs +!enumeration=true +help=RT options for the mixing ratio of Cs +sort-key=Panel-A18a +trigger=namelist:radiative_gases=cs_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=cs_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=cs_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=cs_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=cs_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=h2_clim_fcg_levls] +compulsory=true +description=List of values for growth for the H2 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A06c +type=real + +[namelist:radiative_gases=h2_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the H2 gas +sort-key=Panel-A06d +type=integer + +[namelist:radiative_gases=h2_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the H2 gas +length=: +sort-key=Panel-A06e +type=real + +[namelist:radiative_gases=h2_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas H2 +length=: +sort-key=Panel-A06f +type=integer + +[namelist:radiative_gases=h2_mix_ratio] +compulsory=true +description=H2 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A06b +type=real + +[namelist:radiative_gases=h2_rad_opt] +compulsory=true +description=Radiative options for H2 +!enumeration=true +help=RT options for the mixing ratio of H2 +sort-key=Panel-A06a +trigger=namelist:radiative_gases=h2_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=h2_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=h2_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=h2_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=h2_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=h2o_clim_fcg_levls] +compulsory=true +description=List of values for growth for the H2O gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A07c +type=real + +[namelist:radiative_gases=h2o_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the H2O gas +sort-key=Panel-A07d +type=integer + +[namelist:radiative_gases=h2o_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the H2O gas +length=: +sort-key=Panel-A07e +type=real + +[namelist:radiative_gases=h2o_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas H2O +length=: +sort-key=Panel-A07f +type=integer + +[namelist:radiative_gases=h2o_mix_ratio] +compulsory=true +description=H2O mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A07b +type=real + +[namelist:radiative_gases=h2o_rad_opt] +compulsory=true +description=Radiative options for H2O +!enumeration=true +help=RT options for the mixing ratio of H2O +sort-key=Panel-A07a +trigger=namelist:radiative_gases=h2o_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=h2o_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=h2o_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=h2o_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=h2o_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=hcfc22_clim_fcg_levls] +compulsory=true +description=List of values for growth for the HCFC22 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A08c +type=real + +[namelist:radiative_gases=hcfc22_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the HCFC22 gas +sort-key=Panel-A08d +type=integer + +[namelist:radiative_gases=hcfc22_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the HCFC22 gas +length=: +sort-key=Panel-A08e +type=real + +[namelist:radiative_gases=hcfc22_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas HCFC22 +length=: +sort-key=Panel-A08f +type=integer + +[namelist:radiative_gases=hcfc22_mix_ratio] +compulsory=true +description=HCFC22 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A08b +type=real + +[namelist:radiative_gases=hcfc22_rad_opt] +compulsory=true +description=Radiative options for HCFC22 +!enumeration=true +help=RT options for the mixing ratio of HCFC22 +sort-key=Panel-A08a +trigger=namelist:radiative_gases=hcfc22_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=hcfc22_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=hcfc22_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=hcfc22_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=hcfc22_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value +values='off', 'constant', 'time_varying' + +[namelist:radiative_gases=hcn_clim_fcg_levls] +compulsory=true +description=List of values for growth for the HCN gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A09c +type=real + +[namelist:radiative_gases=hcn_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the HCN gas +sort-key=Panel-A09d +type=integer + +[namelist:radiative_gases=hcn_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the HCN gas +length=: +sort-key=Panel-A09e +type=real + +[namelist:radiative_gases=hcn_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas HCN +length=: +sort-key=Panel-A09f +type=integer + +[namelist:radiative_gases=hcn_mix_ratio] +compulsory=true +description=HCN mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A09b +type=real + +[namelist:radiative_gases=hcn_rad_opt] +compulsory=true +description=Radiative options for HCN +!enumeration=true +help=RT options for the mixing ratio of HCN +sort-key=Panel-A09a +trigger=namelist:radiative_gases=hcn_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=hcn_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=hcn_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=hcn_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=hcn_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=he_clim_fcg_levls] +compulsory=true +description=List of values for growth for the HE gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A10c +type=real + +[namelist:radiative_gases=he_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the HE gas +sort-key=Panel-A10d +type=integer + +[namelist:radiative_gases=he_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the HE gas +length=: +sort-key=Panel-A10e +type=real + +[namelist:radiative_gases=he_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas HE +length=: +sort-key=Panel-A10f +type=integer + +[namelist:radiative_gases=he_mix_ratio] +compulsory=true +description=HE mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A10b +type=real + +[namelist:radiative_gases=he_rad_opt] +compulsory=true +description=Radiative options for HE +!enumeration=true +help=RT options for the mixing ratio of HE +sort-key=Panel-A10a +trigger=namelist:radiative_gases=he_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=he_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=he_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=he_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=he_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=hfc134a_clim_fcg_levls] +compulsory=true +description=List of values for growth for the HFC134A gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A11c +type=real + +[namelist:radiative_gases=hfc134a_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the HFC134A gas +sort-key=Panel-A11d +type=integer + +[namelist:radiative_gases=hfc134a_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the HFC134A gas +length=: +sort-key=Panel-A11e +type=real + +[namelist:radiative_gases=hfc134a_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas HFC134A +length=: +sort-key=Panel-A11f +type=integer + +[namelist:radiative_gases=hfc134a_mix_ratio] +compulsory=true +description=HFC134A mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A11b +type=real + +[namelist:radiative_gases=hfc134a_rad_opt] +compulsory=true +description=Radiative options for HFC134A +!enumeration=true +help=RT options for the mixing ratio of HFC134A +sort-key=Panel-A11a +trigger=namelist:radiative_gases=hfc134a_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=hfc134a_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=hfc134a_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=hfc134a_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=hfc134a_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value +values='off', 'constant', 'time_varying' + +[namelist:radiative_gases=k_clim_fcg_levls] +compulsory=true +description=List of values for growth for the K gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A19c +type=real + +[namelist:radiative_gases=k_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the K gas +sort-key=Panel-A19d +type=integer + +[namelist:radiative_gases=k_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the K gas +length=: +sort-key=Panel-A19e +type=real + +[namelist:radiative_gases=k_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas K +length=: +sort-key=Panel-A19f +type=integer + +[namelist:radiative_gases=k_mix_ratio] +compulsory=true +description=K mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A19b +type=real + +[namelist:radiative_gases=k_rad_opt] +compulsory=true +description=Radiative options for K +!enumeration=true +help=RT options for the mixing ratio of K +sort-key=Panel-A19a +trigger=namelist:radiative_gases=k_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=k_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=k_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=k_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=k_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=l_cts_fcg_rates] +compulsory=true +description=If using time-varying gases with rates, then switch + =this on so that gas rates are applied continuously + =rather than updating at the beginning of the year +sort-key=Panel-A99 +type=logical + +[namelist:radiative_gases=li_clim_fcg_levls] +compulsory=true +description=List of values for growth for the Li gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A20c +type=real + +[namelist:radiative_gases=li_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the Li gas +sort-key=Panel-A20d +type=integer + +[namelist:radiative_gases=li_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the Li gas +length=: +sort-key=Panel-A20e +type=real + +[namelist:radiative_gases=li_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas Li +length=: +sort-key=Panel-A20f +type=integer + +[namelist:radiative_gases=li_mix_ratio] +compulsory=true +description=Li mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A20b +type=real + +[namelist:radiative_gases=li_rad_opt] +compulsory=true +description=Radiative options for Li +!enumeration=true +help=RT options for the mixing ratio of Li +sort-key=Panel-A20a +trigger=namelist:radiative_gases=li_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=li_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=li_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=li_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=li_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=n2_clim_fcg_levls] +compulsory=true +description=List of values for growth for the N2 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A12c +type=real + +[namelist:radiative_gases=n2_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the N2 gas +sort-key=Panel-A12d +type=integer + +[namelist:radiative_gases=n2_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the N2 gas +length=: +sort-key=Panel-A12e +type=real + +[namelist:radiative_gases=n2_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas N2 +length=: +sort-key=Panel-A12f +type=integer + +[namelist:radiative_gases=n2_mix_ratio] +compulsory=true +description=N2 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A12b +type=real + +[namelist:radiative_gases=n2_rad_opt] +compulsory=true +description=Radiative options for N2 +!enumeration=true +help=RT options for the mixing ratio of N2 +sort-key=Panel-A12a +trigger=namelist:radiative_gases=n2_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=n2_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=n2_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=n2_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=n2_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=n2o_clim_fcg_levls] +compulsory=true +description=List of values for growth for the N2O gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A13c +type=real + +[namelist:radiative_gases=n2o_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the N2O gas +sort-key=Panel-A13d +type=integer + +[namelist:radiative_gases=n2o_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the N2O gas +length=: +sort-key=Panel-A13e +type=real + +[namelist:radiative_gases=n2o_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas N2O +length=: +sort-key=Panel-A13f +type=integer + +[namelist:radiative_gases=n2o_mix_ratio] +compulsory=true +description=N2O mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A13b +type=real + +[namelist:radiative_gases=n2o_rad_opt] +compulsory=true +description=Radiative options for N2O +!enumeration=true +help=RT options for the mixing ratio of N2O +sort-key=Panel-A13a +trigger=namelist:radiative_gases=n2o_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=n2o_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=n2o_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=n2o_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=n2o_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=na_clim_fcg_levls] +compulsory=true +description=List of values for growth for the Na gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A21c +type=real + +[namelist:radiative_gases=na_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the Na gas +sort-key=Panel-A21d +type=integer + +[namelist:radiative_gases=na_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the Na gas +length=: +sort-key=Panel-A21e +type=real + +[namelist:radiative_gases=na_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas Na +length=: +sort-key=Panel-A21f +type=integer + +[namelist:radiative_gases=na_mix_ratio] +compulsory=true +description=Na mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A21b +type=real + +[namelist:radiative_gases=na_rad_opt] +compulsory=true +description=Radiative options for Na +!enumeration=true +help=RT options for the mixing ratio of Na +sort-key=Panel-A21a +trigger=namelist:radiative_gases=na_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=na_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=na_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=na_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=na_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=nh3_clim_fcg_levls] +compulsory=true +description=List of values for growth for the NH3 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A14c +type=real + +[namelist:radiative_gases=nh3_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the NH3 gas +sort-key=Panel-A14d +type=integer + +[namelist:radiative_gases=nh3_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the NH3 gas +length=: +sort-key=Panel-A14e +type=real + +[namelist:radiative_gases=nh3_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas NH3 +length=: +sort-key=Panel-A14f +type=integer + +[namelist:radiative_gases=nh3_mix_ratio] +compulsory=true +description=NH3 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A14b +type=real + +[namelist:radiative_gases=nh3_rad_opt] +compulsory=true +description=Radiative options for NH3 +!enumeration=true +help=RT options for the mixing ratio of NH3 +sort-key=Panel-A14a +trigger=namelist:radiative_gases=nh3_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=nh3_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=nh3_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=nh3_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=nh3_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=o2_clim_fcg_levls] +compulsory=true +description=List of values for growth for the O2 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A15c +type=real + +[namelist:radiative_gases=o2_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the O2 gas +sort-key=Panel-A15d +type=integer + +[namelist:radiative_gases=o2_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the O2 gas +length=: +sort-key=Panel-A15e +type=real + +[namelist:radiative_gases=o2_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas O2 +length=: +sort-key=Panel-A15f +type=integer + +[namelist:radiative_gases=o2_mix_ratio] +compulsory=true +description=O2 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A15b +type=real + +[namelist:radiative_gases=o2_rad_opt] +compulsory=true +description=Radiative options for O2 +!enumeration=true +help=RT options for the mixing ratio of O2 +sort-key=Panel-A15a +trigger=namelist:radiative_gases=o2_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=o2_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=o2_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=o2_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=o2_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=o3_clim_fcg_levls] +compulsory=true +description=List of values for growth for the O3 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A16c +type=real + +[namelist:radiative_gases=o3_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the O3 gas +sort-key=Panel-A16d +type=integer + +[namelist:radiative_gases=o3_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the O3 gas +length=: +sort-key=Panel-A16e +type=real + +[namelist:radiative_gases=o3_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas O3 +length=: +sort-key=Panel-A16f +type=integer + +[namelist:radiative_gases=o3_mix_ratio] +compulsory=true +description=O3 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A16b +type=real + +[namelist:radiative_gases=o3_profile_data] +!bounds=namelist:radiative_gases=o3_profile_size +compulsory=true +description=Initial ozone profile +help=Values specifying mixing ratio (kg/kg) of ozone at heights specified + =in profile_heights. +!kind=default +length=: +range=0.0: +sort-key=Panel-A16i +type=real + +[namelist:radiative_gases=o3_profile_heights] +!bounds=namelist:radiative_gases=o3_profile_size +compulsory=true +description=Nodal heights for ozone profile +help=Heights, in metres, of nodes for specifying an ozone profile +!kind=default +length=: +range=0.0: +sort-key=Panel-A16h +type=real + +[namelist:radiative_gases=o3_profile_size] +compulsory=true +description=Number of points in initial ozone profile +help=Number of data points in the initial profile +!kind=default +range=0:200 +sort-key=Panel-A16g +type=integer + +[namelist:radiative_gases=o3_rad_opt] +compulsory=true +description=Radiative options for O3 +!enumeration=true +help=RT options for the mixing ratio of O3 +sort-key=Panel-A16a +trigger=namelist:radiative_gases=o3_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=o3_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=o3_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=o3_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=o3_mix_ratio: 'constant'; + =namelist:radiative_gases=o3_profile_data: 'profile'; + =namelist:radiative_gases=o3_profile_heights: 'profile'; + =namelist:radiative_gases=o3_profile_size: 'profile'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =1D specified profile, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'profile', 'prognostic', 'ancil' + +[namelist:radiative_gases=rb_clim_fcg_levls] +compulsory=true +description=List of values for growth for the Rb gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A22c +type=real + +[namelist:radiative_gases=rb_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the Rb gas +sort-key=Panel-A22d +type=integer + +[namelist:radiative_gases=rb_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the Rb gas +length=: +sort-key=Panel-A22e +type=real + +[namelist:radiative_gases=rb_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas Rb +length=: +sort-key=Panel-A22f +type=integer + +[namelist:radiative_gases=rb_mix_ratio] +compulsory=true +description=Rb mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A22b +type=real + +[namelist:radiative_gases=rb_rad_opt] +compulsory=true +description=Radiative options for Rb +!enumeration=true +help=RT options for the mixing ratio of Rb +sort-key=Panel-A22a +trigger=namelist:radiative_gases=rb_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=rb_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=rb_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=rb_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=rb_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=so2_clim_fcg_levls] +compulsory=true +description=List of values for growth for the SO2 gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A17c +type=real + +[namelist:radiative_gases=so2_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the SO2 gas +sort-key=Panel-A17d +type=integer + +[namelist:radiative_gases=so2_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the SO2 gas +length=: +sort-key=Panel-A17e +type=real + +[namelist:radiative_gases=so2_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas SO2 +length=: +sort-key=Panel-A17f +type=integer + +[namelist:radiative_gases=so2_mix_ratio] +compulsory=true +description=SO2 mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A17b +type=real + +[namelist:radiative_gases=so2_rad_opt] +compulsory=true +description=Radiative options for SO2 +!enumeration=true +help=RT options for the mixing ratio of SO2 +sort-key=Panel-A17a +trigger=namelist:radiative_gases=so2_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=so2_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=so2_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=so2_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=so2_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=tio_clim_fcg_levls] +compulsory=true +description=List of values for growth for the TiO gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A23c +type=real + +[namelist:radiative_gases=tio_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the TiO gas +sort-key=Panel-A23d +type=integer + +[namelist:radiative_gases=tio_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the TiO gas +length=: +sort-key=Panel-A23e +type=real + +[namelist:radiative_gases=tio_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas TiO +length=: +sort-key=Panel-A23f +type=integer + +[namelist:radiative_gases=tio_mix_ratio] +compulsory=true +description=TiO mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A23b +type=real + +[namelist:radiative_gases=tio_rad_opt] +compulsory=true +description=Radiative options for TiO +!enumeration=true +help=RT options for the mixing ratio of TiO +sort-key=Panel-A23a +trigger=namelist:radiative_gases=tio_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=tio_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=tio_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=tio_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=tio_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' + +[namelist:radiative_gases=vo_clim_fcg_levls] +compulsory=true +description=List of values for growth for the VO gas +help=Mass mixing ratio at the beginning of each year. +length=: +sort-key=Panel-A24c +type=real + +[namelist:radiative_gases=vo_clim_fcg_nyears] +compulsory=true +description=N of years at which forcing rate is specified for the VO gas +sort-key=Panel-A24d +type=integer + +[namelist:radiative_gases=vo_clim_fcg_rates] +compulsory=true +description=List of rates of growth for the VO gas +length=: +sort-key=Panel-A24e +type=real + +[namelist:radiative_gases=vo_clim_fcg_years] +compulsory=true +description=List of years at which forcing rate or level is specified for + =radiatively the active gas VO +length=: +sort-key=Panel-A24f +type=integer + +[namelist:radiative_gases=vo_mix_ratio] +compulsory=true +description=VO mass mixing ratio +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A24b +type=real + +[namelist:radiative_gases=vo_rad_opt] +compulsory=true +description=Radiative options for VO +!enumeration=true +help=RT options for the mixing ratio of VO +sort-key=Panel-A24a +trigger=namelist:radiative_gases=vo_clim_fcg_levls: 'time_varying'; + =namelist:radiative_gases=vo_clim_fcg_nyears: 'time_varying'; + =namelist:radiative_gases=vo_clim_fcg_years: 'time_varying'; + =namelist:radiative_gases=vo_clim_fcg_rates: 'time_varying'; + =namelist:radiative_gases=vo_mix_ratio: 'constant'; +value-titles=Turned off i.e. transparent to radiation, + =Constant well mixed value, + =Time varying well mixed value, + =3D prognostic field, + =3D field from an ancillary file +values='off', 'constant', 'time_varying', 'prognostic', 'ancil' diff --git a/rose-stem/app/adjoint_tests/rose-app.conf b/rose-stem/app/adjoint_tests/rose-app.conf index e1950c137..76c5b0144 100644 --- a/rose-stem/app/adjoint_tests/rose-app.conf +++ b/rose-stem/app/adjoint_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-adjoint_tests/vn2.2_t618 +meta=lfric-adjoint_tests/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/gravity_wave/rose-app.conf b/rose-stem/app/gravity_wave/rose-app.conf index 98f6e871a..8e7d37bc9 100644 --- a/rose-stem/app/gravity_wave/rose-app.conf +++ b/rose-stem/app/gravity_wave/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-gravity_wave/vn2.2_t618 +meta=lfric-gravity_wave/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/gungho_model/rose-app.conf b/rose-stem/app/gungho_model/rose-app.conf index 628fde1ae..d4bc76fa1 100644 --- a/rose-stem/app/gungho_model/rose-app.conf +++ b/rose-stem/app/gungho_model/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-gungho_model/vn2.2_t618 +meta=lfric-gungho_model/vn3.0 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ diff --git a/rose-stem/app/jedi_forecast/rose-app.conf b/rose-stem/app/jedi_forecast/rose-app.conf index 5f331bc4b..3848d4ba0 100644 --- a/rose-stem/app/jedi_forecast/rose-app.conf +++ b/rose-stem/app/jedi_forecast/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_forecast/vn2.2_t618 +meta=jedi_forecast/vn3.0 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef ; \ diff --git a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf index 97ce0d82b..8d5864da0 100644 --- a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf +++ b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_forecast_pseudo/vn2.2_t618 +meta=jedi_forecast_pseudo/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf index c836fe1dc..1049af568 100644 --- a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_id_tlm_tests/vn2.2_t618 +meta=jedi_id_tlm_tests/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/jedi_lfric_tests/rose-app.conf b/rose-stem/app/jedi_lfric_tests/rose-app.conf index a7b03db25..a683eda8f 100644 --- a/rose-stem/app/jedi_lfric_tests/rose-app.conf +++ b/rose-stem/app/jedi_lfric_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_lfric_tests/vn2.2_t618 +meta=jedi_lfric_tests/vn3.0 [command] default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf index 662588afd..ba5167caf 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf +++ b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_tlm_forecast_tl/vn2.2_t618 +meta=jedi_tlm_forecast_tl/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/jedi_tlm_tests/rose-app.conf b/rose-stem/app/jedi_tlm_tests/rose-app.conf index 32f75c053..8e0df8026 100644 --- a/rose-stem/app/jedi_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_tlm_tests/rose-app.conf @@ -1,4 +1,4 @@ -meta=jedi_tlm_tests/vn2.2_t618 +meta=jedi_tlm_tests/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/jules/rose-app.conf b/rose-stem/app/jules/rose-app.conf index 1805c0613..87b61ec08 100644 --- a/rose-stem/app/jules/rose-app.conf +++ b/rose-stem/app/jules/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-jules/vn2.2_t618 +meta=lfric-jules/vn3.0 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index b97534384..704d66740 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric2lfric/vn2.2_t618 +meta=lfric-lfric2lfric/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/lfric_atm/rose-app.conf b/rose-stem/app/lfric_atm/rose-app.conf index 9167a1869..d7f7988a5 100644 --- a/rose-stem/app/lfric_atm/rose-app.conf +++ b/rose-stem/app/lfric_atm/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric_atm/vn2.2_t618 +meta=lfric-lfric_atm/vn3.0 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ diff --git a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf index ba65d5d3d..ce50c6fa3 100644 --- a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf +++ b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric_atm/vn2.2_t618 +meta=lfric-lfric_atm/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/linear_model/rose-app.conf b/rose-stem/app/linear_model/rose-app.conf index f5ec84feb..1c83c6635 100644 --- a/rose-stem/app/linear_model/rose-app.conf +++ b/rose-stem/app/linear_model/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-linear_model/vn2.2_t618 +meta=lfric-linear_model/vn3.0 [command] default=rose env-cat iodef_temp.xml -o iodef.xml; $LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/mesh/opt/rose-app-C12_op.conf b/rose-stem/app/mesh/opt/rose-app-C12_op.conf index bc6954167..f6eebc58d 100644 --- a/rose-stem/app/mesh/opt/rose-app-C12_op.conf +++ b/rose-stem/app/mesh/opt/rose-app-C12_op.conf @@ -12,7 +12,4 @@ partition_mesh=.true. generate_inner_halos=.true. max_stencil_depth=2 n_partitions=6 -panel_decomposition='auto' -!!panel_xproc=1 -!!panel_yproc=1 partition_range=0,5 diff --git a/rose-stem/app/mesh/opt/rose-app-C224_MG_op.conf b/rose-stem/app/mesh/opt/rose-app-C224_MG_op.conf index 49f1c3130..684f79e69 100644 --- a/rose-stem/app/mesh/opt/rose-app-C224_MG_op.conf +++ b/rose-stem/app/mesh/opt/rose-app-C224_MG_op.conf @@ -13,10 +13,6 @@ n_meshes=4 partition_mesh=.true. [namelist:partitions] -generate_inner_halos=.false. max_stencil_depth=10 n_partitions=$TOTAL_RANKS -panel_decomposition='auto' -!!panel_xproc=1 -!!panel_yproc=1 partition_range=0,$FINAL_RANK diff --git a/rose-stem/app/mesh/opt/rose-app-n96_lam.conf b/rose-stem/app/mesh/opt/rose-app-n96_lam.conf index 5810df7ae..2548b63b3 100644 --- a/rose-stem/app/mesh/opt/rose-app-n96_lam.conf +++ b/rose-stem/app/mesh/opt/rose-app-n96_lam.conf @@ -8,7 +8,6 @@ mesh_generator=Planar [!!namelist:cubedsphere_mesh] [namelist:mesh] -mesh_names='dynamics' topology='non_periodic' [namelist:planar_mesh] diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf index 57c24ca7f..c246b5d54 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_seuk.conf @@ -30,7 +30,7 @@ sg_orog_mixing='shear_plus_lambda' [namelist:boundaries] blend_frequency='inner' -blending_weights=4*1.0,0.9,0.7,0.5,0.3,0.1 +blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 lbc_eos_height=38 lbc_method='onion_layer' limited_area=.true. diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf index 1d3be2c61..daf0db140 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_uk.conf @@ -22,7 +22,7 @@ sg_orog_mixing='shear_plus_lambda' [namelist:boundaries] blend_frequency='inner' -blending_weights=4*1.0,0.9,0.7,0.5,0.3,0.1 +blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 lbc_eos_height=10 lbc_method='onion_layer' limited_area=.true. diff --git a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf index 977ecfe0f..557ac431f 100644 --- a/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf +++ b/rose-stem/app/mesh/opt/rose-app-ral3_ukv.conf @@ -22,7 +22,7 @@ sg_orog_mixing='shear_plus_lambda' [namelist:boundaries] blend_frequency='inner' -blending_weights=4*1.0,0.9,0.7,0.5,0.3,0.1 +blending_weights=1.0,1.0,1.0,1.0,0.9,0.7,0.5,0.3,0.1 lbc_eos_height=10 lbc_method='onion_layer' limited_area=.true. diff --git a/rose-stem/app/mesh/rose-app.conf b/rose-stem/app/mesh/rose-app.conf index 0a65ae393..e34b44b7e 100644 --- a/rose-stem/app/mesh/rose-app.conf +++ b/rose-stem/app/mesh/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-mesh_tools/vn2.2 +meta=lfric-mesh_tools/vn3.0 [command] default=echo "There is no default mesh generator, please specify an optional configuration"; false diff --git a/rose-stem/app/name_transport/rose-app.conf b/rose-stem/app/name_transport/rose-app.conf index 89c6118e6..81070757a 100644 --- a/rose-stem/app/name_transport/rose-app.conf +++ b/rose-stem/app/name_transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-name_transport/vn2.2_t618 +meta=lfric-name_transport/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/ngarch/rose-app.conf b/rose-stem/app/ngarch/rose-app.conf index ec1ee442e..0652790e8 100644 --- a/rose-stem/app/ngarch/rose-app.conf +++ b/rose-stem/app/ngarch/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-ngarch/vn2.2_t618 +meta=lfric-ngarch/vn3.0 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ diff --git a/rose-stem/app/shallow_water/rose-app.conf b/rose-stem/app/shallow_water/rose-app.conf index 090bde4d2..4925a58af 100644 --- a/rose-stem/app/shallow_water/rose-app.conf +++ b/rose-stem/app/shallow_water/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-shallow_water/vn2.2_t618 +meta=lfric-shallow_water/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/solver/rose-app.conf b/rose-stem/app/solver/rose-app.conf index ba3593dd0..51300e343 100644 --- a/rose-stem/app/solver/rose-app.conf +++ b/rose-stem/app/solver/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-solver/vn2.2 +meta=lfric-solver/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/transport/rose-app.conf b/rose-stem/app/transport/rose-app.conf index b8dc638cb..b5a4cd880 100644 --- a/rose-stem/app/transport/rose-app.conf +++ b/rose-stem/app/transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-transport/vn2.2_t618 +meta=lfric-transport/vn3.0 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/rose-suite.conf b/rose-stem/rose-suite.conf index 97d086115..c720c8bc7 100644 --- a/rose-stem/rose-suite.conf +++ b/rose-stem/rose-suite.conf @@ -6,4 +6,4 @@ OVERRIDE_LOG_LEVEL='' USE_HEADS=false USE_MIRRORS=false USE_TOKENS=false -VN='2.2' +VN='3.0' diff --git a/rose-stem/site/meto/variables_azspice.cylc b/rose-stem/site/meto/variables_azspice.cylc index 0009b2812..411b1ac22 100644 --- a/rose-stem/site/meto/variables_azspice.cylc +++ b/rose-stem/site/meto/variables_azspice.cylc @@ -22,11 +22,11 @@ "lfricinputs_um2lfric-basicgal-N96L70_C12L70_azspice_gnu_fast-debug-64bit": BASE, "lfricinputs_um2lfric-basicgal-N96L70_C12L70_azspice_gnu_full-debug-64bit": BASE, - "lfricinputs_um2lfric-protogal-N320L70_C12L70_azspice_gnu_fast-debug-64bit": BASE~"_t819", - "lfricinputs_um2lfric-protogal-N320L70_C12L70_azspice_gnu_full-debug-64bit": BASE~"_t819", + "lfricinputs_um2lfric-protogal-N320L70_C12L70_azspice_gnu_fast-debug-64bit": BASE, + "lfricinputs_um2lfric-protogal-N320L70_C12L70_azspice_gnu_full-debug-64bit": BASE, - "lfricinputs_um2lfric-protogal_chem-N48L70_C12L70_azspice_gnu_fast-debug-64bit": BASE~"_t819", - "lfricinputs_um2lfric-protogal_chem-N48L70_C12L70_azspice_gnu_full-debug-64bit": BASE~"_t819", + "lfricinputs_um2lfric-protogal_chem-N48L70_C12L70_azspice_gnu_fast-debug-64bit": BASE, + "lfricinputs_um2lfric-protogal_chem-N48L70_C12L70_azspice_gnu_full-debug-64bit": BASE, "lfricinputs_um2lfric-aquaplanet_lam_azspice_gnu_fast-debug-64bit": BASE, "lfricinputs_um2lfric-aquaplanet_lam_azspice_gnu_full-debug-64bit": BASE, diff --git a/rose-stem/site/meto/variables_ex1a.cylc b/rose-stem/site/meto/variables_ex1a.cylc index 059e6e844..20eab8748 100644 --- a/rose-stem/site/meto/variables_ex1a.cylc +++ b/rose-stem/site/meto/variables_ex1a.cylc @@ -10,8 +10,8 @@ "lfricinputs_lfric2um-aquaplanet-C48L38_N48L38_ex1a_gnu_fast-debug-64bit": BASE, "lfricinputs_lfric2um-umlam-C48L70_N512L70_ex1a_gnu_full-debug-64bit": BASE, "lfricinputs_lfric2um-umlam-C48L70_N512L70_ex1a_gnu_fast-debug-64bit": BASE, - "lfricinputs_lfric2um-performance-C224L70_N512L70_ex1a_gnu_full-debug-64bit": BASE~"_t808", - "lfricinputs_lfric2um-performance-C224L70_N512L70_ex1a_gnu_fast-debug-64bit": BASE~"_t808", + "lfricinputs_lfric2um-performance-C224L70_N512L70_ex1a_gnu_full-debug-64bit": BASE, + "lfricinputs_lfric2um-performance-C224L70_N512L70_ex1a_gnu_fast-debug-64bit": BASE, "lfricinputs_scintelapi-basic-C48L38_C48L38_ex1a_gnu_full-debug-64bit": BASE, "lfricinputs_scintelapi-basic-C48L38_C48L38_ex1a_gnu_fast-debug-64bit": BASE, @@ -32,12 +32,12 @@ "lfricinputs_um2lfric-nwp_gal9-N320L70_C12L70_ex1a_gnu_fast-debug-64bit": BASE, "lfricinputs_um2lfric-nwp_gal9-N320L70_C48L70_ex1a_gnu_full-debug-64bit": BASE, "lfricinputs_um2lfric-nwp_gal9-N320L70_C48L70_ex1a_gnu_fast-debug-64bit": BASE, - "lfricinputs_um2lfric-nwp_gal9-N320L70_C224L70_ex1a_gnu_fast-debug-64bit": BASE~"_t808", - "lfricinputs_um2lfric-nwp_gal9-N320L70_C224L70_ex1a_gnu_full-debug-64bit": BASE~"_t808", - "lfricinputs_um2lfric-protogal_chem-N48L70_C48L70_ex1a_gnu_full-debug-64bit": BASE~"_t819", - "lfricinputs_um2lfric-protogal_chem-N48L70_C48L70_ex1a_gnu_fast-debug-64bit": BASE~"_t819", - "lfricinputs_um2lfric-protogal-N320L70_C12L70_ex1a_gnu_full-debug-64bit": BASE~"_t819", - "lfricinputs_um2lfric-protogal-N320L70_C12L70_ex1a_gnu_fast-debug-64bit": BASE~"_t819", + "lfricinputs_um2lfric-nwp_gal9-N320L70_C224L70_ex1a_gnu_fast-debug-64bit": BASE, + "lfricinputs_um2lfric-nwp_gal9-N320L70_C224L70_ex1a_gnu_full-debug-64bit": BASE, + "lfricinputs_um2lfric-protogal_chem-N48L70_C48L70_ex1a_gnu_full-debug-64bit": BASE, + "lfricinputs_um2lfric-protogal_chem-N48L70_C48L70_ex1a_gnu_fast-debug-64bit": BASE, + "lfricinputs_um2lfric-protogal-N320L70_C12L70_ex1a_gnu_full-debug-64bit": BASE, + "lfricinputs_um2lfric-protogal-N320L70_C12L70_ex1a_gnu_fast-debug-64bit": BASE, "lfricinputs_um2lfric-var_seuk_lam_ex1a_gnu_full-debug-64bit": BASE, "lfricinputs_um2lfric-var_seuk_lam_ex1a_gnu_fast-debug-64bit": BASE, }) %} diff --git a/science/adjoint/rose-meta/lfric-adjoint/version22_30.py b/science/adjoint/rose-meta/lfric-adjoint/version22_30.py new file mode 100644 index 000000000..388f72f6d --- /dev/null +++ b/science/adjoint/rose-meta/lfric-adjoint/version22_30.py @@ -0,0 +1,535 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-adjoint + # Blank Upgrade Macro + return config, self.reports diff --git a/science/adjoint/rose-meta/lfric-adjoint/versions.py b/science/adjoint/rose-meta/lfric-adjoint/versions.py index 391ea3bf1..152c043d0 100644 --- a/science/adjoint/rose-meta/lfric-adjoint/versions.py +++ b/science/adjoint/rose-meta/lfric-adjoint/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -31,481 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/science/adjoint/rose-meta/lfric-adjoint/vn3.0/rose-meta.conf b/science/adjoint/rose-meta/lfric-adjoint/vn3.0/rose-meta.conf new file mode 100644 index 000000000..0faaef3f3 --- /dev/null +++ b/science/adjoint/rose-meta/lfric-adjoint/vn3.0/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-linear/vn3.0 diff --git a/science/gungho/rose-meta/lfric-gungho/version22_30.py b/science/gungho/rose-meta/lfric-gungho/version22_30.py new file mode 100644 index 000000000..ad0ae099a --- /dev/null +++ b/science/gungho/rose-meta/lfric-gungho/version22_30.py @@ -0,0 +1,501 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + return config, self.reports diff --git a/science/gungho/rose-meta/lfric-gungho/versions.py b/science/gungho/rose-meta/lfric-gungho/versions.py index 2634630bb..152c043d0 100644 --- a/science/gungho/rose-meta/lfric-gungho/versions.py +++ b/science/gungho/rose-meta/lfric-gungho/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -18,447 +18,16 @@ def __repr__(self): __str__ = __repr__ -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" +""" +Copy this template and complete to add your macro - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket TTTT by Unknown.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - + # Add settings return config, self.reports +""" diff --git a/science/gungho/rose-meta/lfric-gungho/vn3.0/rose-meta.conf b/science/gungho/rose-meta/lfric-gungho/vn3.0/rose-meta.conf new file mode 100644 index 000000000..f4cf8cbfc --- /dev/null +++ b/science/gungho/rose-meta/lfric-gungho/vn3.0/rose-meta.conf @@ -0,0 +1,6831 @@ +import=lfric-driver/vn3.0 + =jules-lsm/vn3.0 + =socrates-radiation/vn3.0 + =um-aerosol/vn3.0 + =um-boundary_layer/vn3.0 + =um-chemistry/vn3.0 + =um-cloud/vn3.0 + =um-convection/vn3.0 + =um-iau/vn3.0 + =um-microphysics/vn3.0 + =um-orographic_drag/vn3.0 + =um-spectral_gwd/vn3.0 + =um-stochastic_physics/vn3.0 + +[!0.1 Namelist Maintainers] +#============================================================ +# Initial developers available to maintain namelist metadata +#============================================================ +# base_mesh | Ricky Wong +# boundaries | Christine Johnson +# checks | Ben Shipway +# damping_layer | Ben Shipway +# departure_points | James Kent, Stephen Pring +# energy_correction | Chris Smith +# external_forcing | Ian Boutle +# extrusion | Thomas Melvin, Iva Kavcic +# finite_element | Thomas Melvin +# formulation | Thomas Melvin +# helmholtz_solver | Thomas Melvin +# iau_addinf_io | Warren Tennant, Samantha Pullen +# iau_ainc_io | Warren Tennant, Samantha Pullen +# iau_bcorr_io | Warren Tennant, Samantha Pullen +# idealised | Stephen Pring +# initial_density | Stephen Pring +# initial_pressure | Chris Smith +# initial_temperature | Ben Shipway +# initial_vapour | Chris Smith +# initial_wind | Ben Shipway +# io | Samantha Adams +# jules-lfric | Maggie Hendry +# jules-hydrology | Maggie Hendry +# jules-nvegparm | Maggie Hendry +# jules-pftparm | Maggie Hendry +# jules-radiation | Maggie Hendry +# jules-sea-seaice | Maggie Hendry +# jules-snow | Maggie Hendry +# jules-soil | Maggie Hendry +# jules-surface | Maggie Hendry +# jules-surface-types | Maggie Hendry +# jules-urban | Maggie Hendry +# jules-vegetation | Maggie Hendry +# mixed_solver | Thomas Melvin +# mixing | Thomas Melvin, Kirsty Hanley +# multigrid | Ricky Wong +# multires_coupling | Thomas Bendall, Alex Brown +# esm_couple | Richard Hill +# orbit | James Manners +# orography | Iva Kavcic +# orography_agnesi_cartesian | Iva Kavcic +# orography_agnesi_spherical | Iva Kavcic +# orography_dcmip200_spherical | Iva Kavcic +# orography_schar_cartesian | Iva Kavcic +# orography_schar_spherical | Iva Kavcic +# partitioning | Mike Hobson +# physics | Ben Shipway +# planet | Thomas Melvin +# section_choice | Ricky Wong +# socrates-radiation | James Manners +# solver | Thomas Melvin +# star | James Manners +# submission | Ricky Wong +# time | Matthew Hambley +# timestepping | Thomas Melvin +# transport | Stephen Pring, Thomas Melvin +# um-aerosol | Alan J Hewitt +# um-boundary_layer | Ian Boutle +# um-chemistry | Mohit Dalvi +# um-cloud | Kwinten Van Weverberg +# um-convection | Ian Boutle +# um-iau | Warren Tennant, Samantha Pullen +# um-microphysics | Jonathan Wilkinson +# um-orographic_drag | Annelize van Niekerk +# um-spectral_gwd | Annelize van Niekerk +# um-stochastic_physics | Claudio Sanchez, Warren Tennant +!= + +#============================================================================== +# SYSTEM SETTINGS +#============================================================================== +[Submission] +ns=namelist/Job/Submission +sort-key=Section-001 + +#============================================================================== +# ENVIRONMENT VARIABLES AVAILABLE TO ROSE TASK +#============================================================================== +[env] +compulsory=true + +[env=ENSEMBLE_MEMBER] +compulsory=true +description=Ensemble member number +sort-key=Panel-A06 +type=integer + +[env=EXEC_NAME] +compulsory=true +description=Program executable name +sort-key=Panel-A01 +type=raw + +[env=OMP_NUM_THREADS] +compulsory=true +description=Number of threads for OpenMP +fail-if=this < 1 ; +range=1: +sort-key=Panel-A03 +type=integer + +[env=TOTAL_RANKS] +compulsory=true +description=Number of process ranks for a parallel run job +fail-if=this < 1 ; +range=1: +sort-key=Panel-A02 +type=integer + +[env=XIOS_SERVER_MODE] +compulsory=true +description=Run with XIOS in server mode +sort-key=Panel-A04 +type=python_boolean + +[env=XIOS_SERVER_RANKS] +compulsory=true +description=XIOS server process ranks +fail-if=this < 1 ; +range=1: +sort-key=Panel-A05 +type=integer + +#============================================================================== +# INITIAL CONDITIONS +#============================================================================== +[initial_conditions] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Job/Initial conditions +sort-key=Section-A04 + +[io_checkpoint_restart] +compulsory=false +description=Settings for writing and restarting the model from checkpoints. +ns=namelist/Job/IO/Checkpointing & Restart +sort-key=Section-A02 + +[io_diagnostics] +compulsory=false +description=Atmospheric model diagnostic output settings +ns=namelist/Job/IO/Diagnostics +sort-key=Section-A03 + +[io_dump] +compulsory=false +description=Atmospheric model dump settings +ns=namelist/Job/IO/Dumping +sort-key=Section-A03 + +[io_field_init] +compulsory=false +description=Settings that control how a field is initialised +ns=namelist/Job/IO/Field Initialisation +sort-key=Section-A03 + +[io_system] +compulsory=false +description=System related I/O for statistics and debugging +ns=namelist/Job/IO/System +sort-key=Section-A01 + +[jinja:suite.rc=threads] +compulsory=true +description=???? +help=??? +ns=namelist/Job/Submission +sort-key=Panel-A03 + +[jinja:suite.rc=wallclock] +compulsory=true +description=???? +help=??? +ns=namelist/Job/Submission +sort-key=Panel-A02 + +[jinja:suite.rc=xios_nodes] +compulsory=true +description=???? +help=??? +ns=namelist/Job/Submission +sort-key=Panel-A04 + +#============================================================================== +# JOB RUN +#============================================================================== +[job details] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Job +sort-key=Section-A02 +title=Job + +[job details=end_date] +compulsory=false +type=integer + +[job details=nprocessors] +compulsory=false + +[job details=nsubs] +compulsory=false +range=1: +type=integer + +[job details=start_date] +compulsory=false +type=integer + +#============================================================================== +# MODEL SETUP +#============================================================================== +[model setup] +compulsory=false +description=?????? +help=This section is for configuration of the model geometry. +ns=namelist/Model +sort-key=Section-A01 +title=Model + +#============================================================================== +# OROGRAPHY TRIGGERS FROM GEOMETRY +#============================================================================== +[namelist:base_mesh=geometry] +trigger=namelist:orography_agnesi_cartesian: this == "'planar'" ; + =namelist:orography_bell_cartesian: this == "'planar'" ; + =namelist:orography_schar_cartesian: this == "'planar'" ; + =namelist:base_mesh=fplane: this == "'planar'" ; + =namelist:base_mesh=f_lat_deg: this == "'planar'" ; + =namelist:orography_agnesi_spherical: this == "'spherical'" ; + =namelist:orography_bell_spherical: this == "'spherical'" ; + =namelist:orography_schar_spherical: this == "'spherical'" ; + =namelist:orography_dcmip200_spherical: this == "'spherical'" ; + +#============================================================================== +# LIMITED AREA TRIGGERS FROM BASE MESH TOPOLOGY +#============================================================================== +[namelist:base_mesh=topology] +trigger=namelist:boundaries=transport_boundary_depth: this == "'non_periodic'" ; + +#============================================================================== +# LIMITED AREA +#============================================================================== +[namelist:boundaries] +compulsory=true +description=Lateral boundary conditions for running limited-area, regional + =models. +help=Specify whether to use lateral boundary conditions and the physical + =location of the boundaries. +ns=namelist/Science/Dynamics/Boundaries +sort-key=Section-A00 + +[namelist:boundaries=blend_frequency] +compulsory=true +description=Frequency of calls to blending +!enumeration=true +help=Options for when the blending is done within the semi-implicit + =timestep: + = 'inner': The blending is done at the end of each inner iteration + = 'outer': The blending is done at the end of the final inner + = iteration within each outer iteration + = 'final': The blending is done at the end of the final inner + = iteration within the final outer iteration +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A08 +value-titles=Inner, Outer, Final +values='inner', 'outer', 'final' + +[namelist:boundaries=blending_weights] +compulsory=true +description=Rim weights from outermost first inwards +fail-if=this <= 0.0 ; +help=The blending zone is the region around the edge (rim) of the + =model domain where data will undergo weighted relaxation back to + =the values in the LBC data fields. + = + =Blending weights are applied at each layer of cells from the domain + =edge radiating inwards using: + = + = Field_updated = Weighting*Field_LBC_data + (1 - Weighting)*Field_model_data + = + =Blending weights should be specified for each layer from 1.0, decreasing + =monotonically. + = + =Note: + = * The number of blending weights must be <= number of available rim layers + = in the LBC data fields. + = * Blending weight values should be > 0.0 + = * The outer weights may need to be padded with values of 1 depending + = on the choices made in the science configuration. + = +!kind=default +length=: +ns=namelist/Science/Dynamics/Boundaries +range=this > 0.0 and this <= 1.0 +sort-key=Panel-A03 +type=real + +[namelist:boundaries=blending_weights_w2v] +compulsory=true +description=Rim weights from outermost first inwards, for the W2V space. +fail-if=this <= 0.0 ; +help=Identical to the blending_weights, but only applied to the W2V space + =i.e. the Top and bottom dofs for the wind/momentum space. + =This controls the amount of damping of the vertical wind in the blending + =zone. +!kind=default +length=: +ns=namelist/Science/Dynamics/Boundaries +range=this > 0.0 and this <= 1.0 +sort-key=Panel-A03 +type=real + +[namelist:boundaries=boundary_e] +compulsory=true +description=The number of cells to the Eastern linear solver boundary. +fail-if=this <0 ; +help=Specify the position of the Eastern lateral boundary + =for the linear solver. This is the number of cells from + =the Eastern edge of the mesh (or panel if using a cubed-sphere). +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=0: +sort-key=Panel-A05 +type=integer + +[namelist:boundaries=boundary_n] +compulsory=true +description=The number of cells to the Northern linear solver boundary. +fail-if=this <0 ; +help=Specify the position of the Northern lateral boundary + =for the linear solver. This is the number of cells from + =the Northern edge of the mesh (or panel if using a cubed-sphere). +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=0: +sort-key=Panel-A03 +type=integer + +[namelist:boundaries=boundary_s] +compulsory=true +description=The number of cells to the Southern linear solver boundary. +fail-if=this <0 ; +help=Specify the position of the Southern lateral boundary + =for the linear solver. This is the number of cells from + =the Southern edge of the mesh (or panel if using a cubed-sphere). +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=0: +sort-key=Panel-A04 +type=integer + +[namelist:boundaries=boundary_w] +compulsory=true +description=The number of cells to the Western linear solver boundary. +fail-if=this <0 ; +help=Specify the position of the Western lateral boundary + =for the linear solver. This is the number of cells from + =the Western edge of the mesh (or panel if using a cubed-sphere). +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=0: +sort-key=Panel-A06 +type=integer + +[namelist:boundaries=edge_cells_ew] +compulsory=true +description=Total number of mesh cells in East-West direction. +fail-if=this <1 ; +help=Specify the total number of cells along the E-W edge of the planar domain + =or the total number of cells along the edge of a cubed-sphere panel. +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=1: +sort-key=Panel-A02 +type=integer + +[namelist:boundaries=edge_cells_ns] +compulsory=true +description=Total number of mesh cells in North-South direction. +fail-if=this <1 ; +help=Specify the total number of cells along the N-S edge of the planar domain + =or the total number of cells along the edge of a cubed-sphere panel. +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=1: +sort-key=Panel-A01 +type=integer + +[namelist:boundaries=inner_width_ew] +compulsory=true +description=Number of cells to be overwritten inside E/W solver boundary. +fail-if=this > namelist:boundaries=rim_width_ew - namelist:boundaries=outer_width_ew +help=Specify the number of cells on the INTERIOR side of + =the solver boundary (boundary_e or boundary_w) to be + =overwritten by the driving model data. + = + = Mesh edge Solver boundary + = |<------boundary_w...----->| + = |<----***------------rim_width_ew---------------------***----->| + = |<--outer_width_ew--->|<-.inner_width_ew.->|.....blend.........| +!kind=default +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A10 +type=integer + +[namelist:boundaries=inner_width_ns] +compulsory=true +description=Number of cells to be overwritten inside N/S solver boundary. +fail-if=this > namelist:boundaries=rim_width_ns - namelist:boundaries=outer_width_ns +help=Specify the number of cells on the INTERIOR side of + =the solver boundary (boundary_n or boundary_s) to be + =overwritten by the driving model data. + = + = Mesh edge Solver boundary + = |<------boundary_n...----->| + = |<----***------------rim_width_ns---------------------***----->| + = |<--outer_width_ns--->|<-.inner_width_ns.->|.....blend.........| + = +!kind=default +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A09 +type=integer + +[namelist:boundaries=lbc_eos_height] +compulsory=true +description=Exner initialisation height for LBCs [%]. +help=The value is an integer percentage of the atmospheric depth before any application of orography. + =It is used to determine the atmospheric layer/level at which to begin Exner profile initialisation + =for the lateral boundary conditions. The Equation of State (EoS) is satisfied at the resulting layer + =where Exner initialisation begins. + = + =To initialise an Exner vertical profile, the Equation of state (EoS) is first used + =to calculate Exner on a single vertical layer L using density and temperature. + =This vertical layer L is the nearest layer to (lbc_eos_height/100)*total_height. + =Then hydrostatic balance is used to integrate from this layer to the top of the atmosphere, + =and similarly to the bottom of the atmosphere. + = + =If lbc_eos_height=0, the initial layer is 1 so the EoS is solved for the bottom layer + =and then hydrostatic balance is used to integrate upwards to the top of the model. + =If lbc_eos_height=100, the initial layer is number_of_layers, so the EoS is solved for the + =top layer, and then hydrostatic balance is used to integrate downwards to the bottom of the model. + = + =It is also possible to use any value between 0 and 100, so that hydrostatic balance is + =used to integrate both upwards and downwards. +range=0:100 +sort-key=Panel-A01 +type=integer + +[namelist:boundaries=lbc_method] +compulsory=true +description=LBC rim weights/mask generation method +!enumeration=true +help=Onion Layer + =---------------- + =Blending weights used to imply depth of + =rim region where weights are applied to + =LBC data. + = + =Coordinate based + =---------------- + =Physical coordinates used to determine + =locations and therefore weights and masks. + = +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A08 +trigger=namelist:boundaries=blending_weights: this == "'onion_layer'" ; + =namelist:boundaries=blending_weights_w2v: this == "'onion_layer'" ; + =namelist:boundaries=solver_boundary_depth: this == "'onion_layer'" ; + =namelist:boundaries=edge_cells_ns: this == "'coordinate_based'" ; + =namelist:boundaries=edge_cells_ew: this == "'coordinate_based'" ; + =namelist:boundaries=boundary_e: this == "'coordinate_based'" ; + =namelist:boundaries=boundary_w: this == "'coordinate_based'" ; + =namelist:boundaries=boundary_n: this == "'coordinate_based'" ; + =namelist:boundaries=boundary_s: this == "'coordinate_based'" ; + =namelist:boundaries=rim_width_ns: this == "'coordinate_based'" ; + =namelist:boundaries=rim_width_ew: this == "'coordinate_based'" ; +value-titles=Onion Layer, Coordinate based +values='onion_layer','coordinate_based' + +[namelist:boundaries=limited_area] +compulsory=true +description=Running in limited_area configuration. +help=Run as a limited area model and impose lateral boundary conditions + =(currently with zero flux boundary conditions). +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A00 +trigger=namelist:boundaries=normal_only: .true. ; + =namelist:boundaries=output_lbcs: .true. ; + =namelist:boundaries=lbc_method: .true. ; + =namelist:boundaries=transport_boundary_depth: .true. ; + =namelist:boundaries=blend_frequency: .true. ; + =namelist:boundaries=lbc_eos_height: .true. ; +type=logical + +[namelist:boundaries=normal_only] +compulsory=true +description=Use only W2 degrees of freedom (dofs) on the boundary for LBCs. +help=When '.true.' use the W2 dofs on the boundary (the normal + =component of the wind). When '.false.' use the W2 dofs on the + =boundary and 1 cell in (the normal and tangential components). +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A00 +type=logical + +[namelist:boundaries=outer_width_ew] +compulsory=true +description=Number of cells to be overwritten outside E/W solver boundary. +help=Specify the number of cells on the EXTERIOR side of + =the solver boundary (boundary_e or boundary_w) to be + =overwritten by the driving model data. This will often + =be the same value as boundary_e and boundary_w. + = + = Mesh edge Solver boundary + = |<------boundary_w...----->| + = |<----***------------rim_width_ew---------------------***----->| + = |<--outer_width_ew--->|<-.inner_width_ew.->|.....blend.........| + = +!kind=default +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A12 +type=integer + +[namelist:boundaries=outer_width_ns] +compulsory=true +description=Number of cells to be overwritten outside N/S solver boundary. +help=Specify the number of cells on the EXTERIOR side of + =the solver boundary (boundary_n or boundary_s) to be + =overwritten by the driving model data. This will often + =be the same value as boundary_n and boundary_s. + = + = Mesh edge Solver boundary + = |<------boundary_n...----->| + = |<----***------------rim_width_ns---------------------***----->| + = |<--outer_width_ns--->|<-.inner_width_ns.->|.....blend.........| + = +!kind=default +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A11 +type=integer + +[namelist:boundaries=output_lbcs] +compulsory=true +description=Output the lbcs in the diagnostics file +help= +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A00 +type=logical + +[namelist:boundaries=rim_width_ew] +compulsory=true +description=Total number of cells of the East-West LBC data. +help=a) If rim_width_ew>0 this is the number of cells (an integer) for the + = width of the lateral boundary condition (LBC) on both the East and West + = boundaries. + = The blending weight is 1 in outer_width_ew and inner_width_ew - where + = the data is overwritten with the driving model data. + = The blending weight then ramps down from 1 to 0 in the remaining cells + = in rim_width_ew - where the data is blended with the driving model data. + =b) If rim_width_ew=0 then the width of the lateral boundary condition + = data is zero - but a boundary condition is still enforced in the linear + = solver (for models with no advection). + =c) If rim_width_ew<0 then there is no boundary condition - on both the + = East and West boundaries. i.e. periodic boundary conditions are enforced + = instead. +!kind=default +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A08 +trigger=namelist:boundaries=inner_width_ew: this > 0 ; + =namelist:boundaries=outer_width_ew: this > 0 ; +type=integer + +[namelist:boundaries=rim_width_ns] +compulsory=true +description=Total number of cells of the North-South LBC data. +help=a) If rim_width_ns>0 this is the number of cells (an integer) for the + = width of the lateral boundary condition (LBC) on both the North and South + = boundaries. + = The blending weight is 1 in outer_width_ns and inner_width_ns- where + = the data is overwritten with the driving model data. + = The blending weight then ramps down from 1 to 0 in the remaining cells + = in rim_width_ns - where the data is blended with the driving model data. + =b) If rim_width_ns=0 then the width of the lateral boundary condition + = data is zero - but a boundary condition is still enforced in the linear + = solver (for models with no advection). + =c) If rim_width_ns<0 then there is no boundary condition - on both the + = North and South boundaries. i.e. periodic boundary conditions are + = enforced instead. +!kind=default +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A07 +trigger=namelist:boundaries=inner_width_ns: this > 0 ; + =namelist:boundaries=outer_width_ns: this > 0 ; +type=integer + +[namelist:boundaries=solver_boundary_depth] +compulsory=true +description=Depth to boundary of linear solver (in cells) +fail-if=this <0 ; +help=Specifies the location of the lateral edge boundary of the + =linear solver domain. The distance to the boundary is + =given as number cells inward from the mesh domain edge. +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=0: +sort-key=Panel-A05 +type=integer + +[namelist:boundaries=transport_boundary_depth] +compulsory=true +description=Depth to boundary of transport scheme (in cells). +fail-if=this <0 ; +help=Specifies the number of cells that are needed by the transport scheme at + =the edge of the model domain for limited area (non-periodic) configurations. + =This will depend on the choice of time splitting scheme. Recommended value + =for MoL with SSP3 is: + = + = transport_boundary_depth = 6 + = + =The recommended value for FFSL or SL schemes is to match the value of the + =dep_pt_stencil_extent namelist option. + =Note that the region with blending weights set to 1 should extend beyond + =this depth. + =This is only used for non-periodic domains. +!kind=default +ns=namelist/Science/Dynamics/Boundaries +range=0: +sort-key=Panel-A13 +type=integer + +[namelist:boundaries=transport_overwrite_freq] +compulsory=true +description=The frequency of LBC overwriting operations in transport schemes. +!enumeration=true +help=Overwriting transported fields in the LBC region during the transport + =scheme helps to enforce the LBCs. However there is a choice in the + =frequency that this can be performed. The options are, in increasing order + =of frequency: + = 'none' : No overwriting of transported fields + = 'final': Overwrite transported fields only at the end of the 3D transport + = of that field + = 'split_step': Overwrite transported fields at the end of each vertical + = or horizontal split transport step + = 'all': Overwrite transported fields after every transport calculation, + = including after the inner SWIFT steps and vertical transport. +ns=namelist/Science/Dynamics/Boundaries +sort-key=Panel-A14 +value-titles=None, Final, Split Step, All +values='none','final','split_step','all' + +#============================================================================== +# CHECKING CRITERIA +#============================================================================== +[namelist:checks] +compulsory=true +description=This namelist is used to add in runtime checks +help=See individual options for further help. +ns=namelist/Science/Dynamics/checks +sort-key=Section-A01 +title=Checking criteria + +[namelist:checks=limit_cfl] +compulsory=true +description=Limit the local advective Courant number +help=If true, then tests the local advective Courant number + =and if necessary reduces the wind components to ensure + =this doesn't exceed the limit given by max_cfl. #' + =Note that this will change the answers and is only + =designed to aid model development. It should not be + =used in operational rund. +!kind=default +sort-key=Panel-A01 +trigger=namelist:checks=max_cfl: .true. ; +type=logical + +[namelist:checks=max_cfl] +compulsory=true +description=Set the maximum advective Courant number. +fail-if=this <= 0.0 ; +help=If limit_cfl=.true., then this will be used to determine the maximum advective Courant number. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real +warn-if=this > 10.0 ; + +#============================================================================== +# DAMPING LAYER +#============================================================================== +[namelist:damping_layer] +compulsory=true +description=?????? +help=?????? + =?????? +ns=namelist/Science/Dynamics/Damping layer +sort-key=Section-A02 + +[namelist:damping_layer=dl_base] +compulsory=true +description=?????? +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=Base height of damping layer +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:damping_layer=dl_str] +compulsory=true +description=?????? +fail-if=this < 0.0 ; +help=Strength of damping layer +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:damping_layer=dl_type] +compulsory=true +description=Type of damping layer profile +!enumeration=true +help=Standard: Sine-squared profile above dl_base + =Latitude: Standard profile with cos(latitude) dip from equator to 50N/S. + = Poleward of 50N/S, profile is fixed at that of 50N/S. +sort-key=Panel-A03 +value-titles=Standard,Latitude +values='standard','latitude' + +#============================================================================== +# DEPARTURE POINTS +#============================================================================== +[namelist:departure_points] +compulsory=true +description=The method to calculate departure points. +help=This namelist selects the method to choose the departure points + =for the flux form semi-Lagrangian (FFSL) scheme and the vertical + =semi-Lagrangian and SLICE schemes. +ns=namelist/Science/Dynamics/departure_points +sort-key=Section-A03 +title=Departure points + +[namelist:departure_points=horizontal_limit] +compulsory=true +description=Method for handling the horizontal departure points that exceed the stencil extent. +!enumeration=true +fail-if=this=="'cap'" and namelist:departure_points=horizontal_method=="'midpoint'" + =this=="'cap'" and namelist:departure_points=horizontal_method=="'trapezoidal'" +help=Select option for how to deal with the horizontal departure points that lie beyond + =the specified departure point stencil extent: + =None : Do nothing if departure points exceed the stencil extent. + = This may result in the model failing. + =Cap : Cap the departure distance to lie within the stencil extent. + = This is equivalent to capping the advecting wind, and is only + = suitable for Eulerian horizontal departure points. +sort-key=Panel-A03 +value-titles=None, Cap +values='none', 'cap' + +[namelist:departure_points=horizontal_method] +compulsory=true +description=Method for calculating departure points in horizontal +!enumeration=true +fail-if= +help=Available horizontal departure point calculation choices: + =Eulerian: uses the new velocity at the arrival point. + =Trapezoidal: uses the old velocity interpolated to the estimated + =departure point and the new velocity at the arrival point. Only suitable + =for planar domain. + =Midpoint: interpolates the old velocity to halfway along the trajectory. + =Only suitable for planar domain. + =TimeAverage: averages the old and new velocities at the arrival point. + =FFSL: uses the time-averaged winds averaged at the arrival point, but takes + =the grid spacing into account using the volume of cells. +sort-key=Panel-A01 +value-titles=Eulerian, Trapezoidal, Midpoint, Time Average, FFSL +values='euler', 'trapezoidal', 'midpoint', 'timeaverage', 'ffsl' + +[namelist:departure_points=n_dep_pt_iterations] +compulsory=true +description=The number of iterations for the Trapezoidal and Midpoint methods. +fail-if= +help=The number of iterations for the Trapezoidal and Midpoint departure point + =calculation methods in both the horizontal and vertical. The departure point + =estimate converges quickly, and so only 2-3 iterations are usually required. +!kind=default +!range= +sort-key=Panel-A06 +type=integer + +[namelist:departure_points=share_stencil_extent] +compulsory=true +description=Whether to share the maximum extent of departure points between + =different sets of calculations. +help=The departure distances are used to set the size of stencils to use in + =corresponding horizontal transport calculations. Using the maximum + =departure distance to set the stencil size (rather than the maximum halo + =depth of the model) reduces the amount of parallel data communication + =required. However this requires a global min/max calculation on the + =departure distance field. + =If this option is set to true, the stencil size is shared between different + =horizontal calculations that use different departure distances. This + =reduces the number of min/max calculations required. +sort-key=Panel-A08 +type=logical + +[namelist:departure_points=vertical_limit] +compulsory=true +description=Method for correcting departure points that exceed the vertical domain. +!enumeration=true +fail-if= +help=Select option for how to deal with departure points that lie below the surface + =or above the model top: + =None : no capping is applied. + =Boundary : sets the departure point to the boundary value. + =Exponential: follows the method of Wood et al. (2009) to use an exponential + =function to force the departure point into the domain. +sort-key=Panel-A04 +value-titles=None, Boundary, Exponential +values='none', 'boundary', 'exponential' + +[namelist:departure_points=vertical_method] +compulsory=true +description=Method for calculating departure points in vertical. +!enumeration=true +fail-if= +help=Available vertical departure point calculation choices: + =Eulerian: uses the new velocity at the arrival point. + =Trapezoidal: uses the old velocity interpolated to the estimated + =departure point and the new velocity at the arrival point. + =Midpoint: interpolates the old velocity to halfway along the trajectory. + =TimeAverage: averages the old and new velocities at the arrival point. +sort-key=Panel-A02 +value-titles=Eulerian, Trapezoidal, Midpoint, Time Average +values='euler', 'trapezoidal', 'midpoint', 'timeaverage' + +[namelist:departure_points=vertical_sorting] +compulsory=true +description=Whether to sort vertical departure points +help=If true, the vertical departure points are sorted to be vertically + =increasing, so that vertical trajectories do not cross. +sort-key=Panel-A05 +type=logical + +#============================================================================== +# Energy correction for climate simulation +#============================================================================== +[namelist:energy_correction] +compulsory=true +description=Energy correction options +help=Implementation of Unified Model global energy correction, + =as described in UMDP85. +ns=namelist/Science/Energy correction +sort-key=Section-A02 +title=Energy correction + +[namelist:energy_correction=encorr_usage] +compulsory=true +description=Determines how energy correction is used +!enumeration=true +fail-if=this != "'none'" and namelist:base_mesh=geometry != "'spherical'" ; +help=None - energy correction not calculated. + =Diagnose - diagnose but do not apply energy correction. + =Apply - apply energy correction. +!kind=default +ns=namelist/Science/Energy correction +sort-key=Panel-A04 +trigger=namelist:energy_correction=reset_hours: this != "'none'"; +value-titles=None, Diagnose, Apply +values='none', 'diag', 'apply' + +[namelist:energy_correction=integral_method] +compulsory=true +description=Method for calculating global integrals of mass and total energy +!enumeration=true +help=Finite difference - this replicates the numerics used in UM(ENDGame). + =Finite element - use quadrature on the finite element representation of fields. + =The finite element method is computationally more expensive than the finite difference + =method but is more accurate, as it uses the correct cell shapes and applies quadrature + =to the finite element fields. +!kind=default +ns=namelist/Science/Energy correction +sort-key=Panel-A03a +value-titles=Finite difference, Finite element +values='fd', 'fe' + +[namelist:energy_correction=reset_hours] +compulsory=true +description=Number of hours between each reset of energy correction +help=Period over which energy correction applies a constant temperature increment. This increment + =is recalculated at the end of each period, to correct for the energy error incurred during + =that period. The energy error in a given period is the difference in total energy between + =the end and start of the period minus the accumulated net inward radiation. The period must + =comprise a whole number multiple of radiation steps. +!kind=default +ns=namelist/Science/Energy correction +sort-key=Panel-A03b +type=integer + +#============================================================================== +# ESM COUPLE (e.g. OASIS3-MCT) +#============================================================================== +[namelist:esm_couple] +compulsory=true +description=This namelist is used to control coupling operations + =between lfric and other Earth system model components. +help=See individual options for further help. +ns=namelist/Model/Coupling +sort-key=Section-A50 +title=Coupling controls + +[namelist:esm_couple=l_esm_couple_test] +compulsory=true +description=Test coupling exchanges? +help=Set to true in order to test coupling operations + =without using the incoming coupling field values to drive LFRic. + = + =Coupling "put" operations will be performed as normal. + = + =Coupling "get" operations will result in data + =being recieved but not used by LFRic. + = + =This should normally only be set to true for + =development and debugging purposes. + = + =This switch will have no effect if the model is compiled without + =the presence of a suitable coupler (e.g. OASIS3-MCT) +sort-key=Panel-A51 +type=logical + +#============================================================================== +# External forcing +#============================================================================== +[namelist:external_forcing] +compulsory=true +description=External forcing options +ns=namelist/Science/External Forcing +sort-key=Section-A13 +title=External forcing + +[namelist:external_forcing=diffusion_coefficient] +compulsory=true +description=The horizontal wind diffusion coefficient. +help=The horizontal wind diffusion coefficient (dimensionless). +!kind=default +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=Panel-A02c +type=real + +[namelist:external_forcing=diffusion_order] +compulsory=true +description=Order of horizontal wind diffusion forcing +help=Number of successive diffusion operators to apply to horizontal wind on W2 +!kind=default +ns=namelist/Science/External Forcing/Wind Forcing +range=1:10 +sort-key=Panel-A02b +type=integer + +[namelist:external_forcing=filtering_order] +compulsory=true +description=Order or degree of wind filtering +help=Number of successive 1-2-1 filters to apply to horizontal wind on W2 +!kind=default +ns=namelist/Science/External Forcing/Wind Forcing +range=1:10 +sort-key=Panel-A02a +type=integer + +[namelist:external_forcing=geostrophic_forcing] +compulsory=true +description=Switch on geostrophic forcing of wind +help=Switch on geostrophic wind forcing. + =Further details must be supplied on the subsequent geostrophic wind + =forcing panel. +!kind=default +ns=namelist/Science/External Forcing +sort-key=C3 +trigger=namelist:geostrophic_forcing: this == ".true."; +type=logical + +[namelist:external_forcing=hs_random] +compulsory=true +description=Random perturbations to the Held-Suarez theta forcing +help=Option to add in random perturbations to the Held-Suarez theta forcing: + = After the calculation of the theta increment, this will be multiplied + = by a factor (1 + 0.0001*(p - 0.5)), where p is a random number taken from + = a Uniform distribution on [0,1]. + = Note, this is for model development purposes. +!kind=default +ns=namelist/Science/External Forcing/Temperature Forcing +sort-key=Panel-A01a +type=logical + +[namelist:external_forcing=pc2_force_response] +compulsory=true +description=Include PC2 response to external forcing +help=If true, then a PC2 homogeneous forcing response will be applied to any + = external forcing which is included +!kind=default +ns=namelist/Science/External Forcing +sort-key=E1 +type=logical + +[namelist:external_forcing=theta_forcing] +compulsory=true +description=Options for external forcing of potential temperature (theta) +!enumeration=true +help=Available forcing options are: + =Held-Suarez theta forcing term, based on Wedi and Smolarkiewicz (2009), + = A framework for testing global non-hydrostatic models. + = Q.J.R. Meteorol. Soc., 135: 469-484. DOI: 10.1002/qj.377. + =Theta forcing term for the Earth-Like and Hot-Jupiter tests based on + = Menou & Rauscher (2009), Atmospheric Circulation of Hot Jupiters: A Shallow + = Three-Dimensional Model, ApJ, 700, 887-897, DOI: 10.1088/0004-637X/700/1/887, + = and Tidally-Locked forcing based on Merlis and Schneider (2010), + = Atmospheric Dynamics of Earth-Like Tidally Locked Aquaplanets, + = Journal of Advances in Modeling Earth Systems, 2, 13, + = DOI: 10.1029/JAMES.2010.2.13. + =Tidally Locked Earth (TLE) theta forcing based on Merlis, T. M., and + = Schneider, T. (2010), Atmospheric Dynamics of Earth-Like Tidally Locked + = Aquaplanets, J. Adv. Model. Earth Syst., 2, 13, doi:10.3894/JAMES.2010.2.13. + =Temperature tendency profile: apply a specified profile of heating rates +!kind=default +ns=namelist/Science/External Forcing +sort-key=A1 +trigger=namelist:external_forcing=hs_random: this == "'held_suarez'" ; + =namelist:temp_tend_data: this == "'temp_tend'"; + =namelist:external_forcing=pc2_force_response: this != "'none'"; +value-titles=None, Held-Suarez, Earth-Like, Tidally Locked Earth, Shallow Hot Jupiter, Deep Hot Jupiter, Temperature Tendency Profile +values='none', 'held_suarez', 'earth_like', 'tidally_locked_earth', 'shallow_hot_jupiter', 'deep_hot_jupiter', 'temp_tend' + +[namelist:external_forcing=theta_relaxation] +compulsory=true +description=Switch on relaxation forcing of theta +help=Newtonian relaxation is applied to potential temperature, + = d(theta)/dt = -(theta - theta_target) / tau, + =where tau is specified in seconds using theta_relax:timescale. + =The target vertical profile, towards which potential temperature is relaxed, + =is specified in the theta_relax:profile_data array. This contains values of the + =profile at the corresponding heights contained in the theta_relax:heights + =array. Linear interpolation is used to map the profile onto the vertical + =grid as defined in the extrusion namelist. + =The target profile may change in time and this is done by listing + =the target profile data sequentially in theta_relax:profile_data, with the validity + =times of these profiles specified in theta_relax:times. It is essential to + =correctly specify the number of elements in the height and time arrays, + =using the variables theta_relax:number_heights and theta_relax:number_times, respectively. +!kind=default +ns=namelist/Science/External Forcing +sort-key=A2 +trigger=namelist:theta_relax: this == ".true."; +type=logical + +[namelist:external_forcing=vapour_forcing] +compulsory=true +description=Options for external forcing of vapour mixing ratio +!enumeration=true +help=Available forcing options for water vapour are: + = + =Apply specified profile of mixing ratio tendency. + = + =Further details must be supplied on the subsequent vapour forcing panel. +!kind=default +ns=namelist/Science/External Forcing +sort-key=B1 +trigger=namelist:vapour_forcing: this == "'profile'" ; +value-titles=None, Profile +values='none', 'profile' + +[namelist:external_forcing=vertadvect_forcing] +compulsory=true +description=Switch on vertical advection forcing +help=If true, advection increments from a specified vertical velocity + =profile are calculated, for theta, water vapour, liquid water mixing + =ratio and horizontal wind components, as must be specified in the + =subsequent vertical advection forcing panel. +!kind=default +ns=namelist/Science/External Forcing +sort-key=D1 +trigger=namelist:vertadvect: this == ".true."; +type=logical + +[namelist:external_forcing=wind_forcing] +compulsory=true +description=Options for external forcing of the horizontal wind +!enumeration=true +help=Available forcing options for the horizontal components of the wind are: + = + =Held-Suarez wind forcing term, based on Wedi and Smolarkiewicz (2009) + = A framework for testing global non-hydrostatic models. + = Q.J.R. Meteorol. Soc., 135: 469-484. DOI: 10.1002/qj.377. + = + =Apply successive diffusion or 1-2-1 filters to horizontal winds on W2. + = + =Apply specified profiles of horizontal wind component tendencies. + = + =Further details must be supplied on the subsequent horizontal wind + =forcing panel. +!kind=default +ns=namelist/Science/External Forcing +sort-key=C1 +trigger=namelist:external_forcing=filtering_order: this == "'filtering'"; + =namelist:external_forcing=diffusion_order: this == "'diffusion'"; + =namelist:external_forcing=diffusion_coefficient: this == "'diffusion'"; + =namelist:wind_forcing: this == "'profile'"; +value-titles=None, Held-Suarez, Filtering, Diffusion, Profile +values='none','held_suarez', 'filtering', 'diffusion', 'profile' + +[namelist:files] +compulsory=true +description=Sets up options for files +help=?????? + =?????? +ns=namelist/Job/IO +sort-key=sec-AAAA + +[namelist:files=aerosols_ancil_path] +compulsory=true +description=Path to aerosols file from ancillary files directory +help=This file contains the aerosols data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=albedo_nir_ancil_path] +compulsory=true +description=Path to near-IR albedo file from ancillary files directory +help=This file contains the near-IR albedo data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=albedo_vis_ancil_path] +compulsory=true +description=Path to visible albedo file from ancillary files directory +help=This file contains the visible albedo data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=ancil_directory] +compulsory=true +description=Directory for ancillary files +help=Path to the directory where LFRic ancillaries are stored +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=checkpoint_stem_name] +compulsory=true +description=Filename stem for checkpoint files +help=Filename stem for checkpoint files +ns=namelist/Job/IO/Checkpointing & Restart +sort-key=A-007 +!string_length=filename +type=character + +[namelist:files=cloud_drop_no_conc_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of cloud droplet number + =concentrations. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=coarse_ancil_directory] +compulsory=true +description=Directory for coarse ancillary files +help=Path to the directory where coarse LFRic ancillaries are stored +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=diag_stem_name] +compulsory=true +description=Filename stem for diagnostic files +help=Filename stem for diagnostic files +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A02 +!string_length=filename +type=character + +[namelist:files=dms_conc_ocean_ancil_path] +compulsory=true +description=Path to DMS (surface) concentrations in ocean in ancil directory +help=This file contains the DiMethyl Sulphide (DMS) concentrations for + = aerosols, generated at the ocean surface, which feed into DMS emissions +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=ea_ancil_directory] +compulsory=true +description=Directory for ancillary files +help=Path to the directory where LFRic ancillaries are stored +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=easy_absorption_lw_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of the aerosol absorption coefficient + =for the longwave wavebands. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=easy_absorption_sw_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of the aerosol absorption coefficient + =for the shortwave wavebands. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=easy_asymmetry_lw_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of the aerosol asymmetry parameter + =for the longwave wavebands. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=easy_asymmetry_sw_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of the aerosol asymmetry parameter + =for the shortwave wavebands. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=easy_extinction_lw_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of the aerosol extinction coefficient + =for the longwave wavebands. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=easy_extinction_sw_ancil_path] +compulsory=true +description=Path to EasyAerosol ancillary files directory +help=This file contains a climatology of the aerosol extinction coefficient + =for the shortwave wavebands. +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_bc_biofuel_ancil_path] +compulsory=true +description=Path to BC biofuel emissions from ancillary files directory +help=This file contains the Black Carbon (BC) surface aerosol emissions + = generated from biofuels +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_bc_biomass_ancil_path] +compulsory=true +description=Path to BC biomass emissions from ancillary files directory +help=This file contains the Black Carbon (BC) (3-D) aerosol emissions + = generated from biomass burning, incl. forest fires +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_bc_biomass_hi_ancil_path] +compulsory=true +description=Path to high-level BC biomass emissions +help=This file contains the Black Carbon (BC) upper-level aerosol emissions + = generated from biomass burning, incl. forest fires +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_bc_biomass_lo_ancil_path] +compulsory=true +description=Path to low-level BC biomass emissions +help=This file contains the Black Carbon (BC) surface aerosol emissions + = generated from biomass burning, incl. forest fires +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_bc_fossil_ancil_path] +compulsory=true +description=Path to BC fossil fuel emissions from ancillary files directory +help=This file contains the Black Carbon (BC) surface aerosol emissions + = generated from fossil fuels +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_c2h6_ancil_path] +compulsory=true +description=Path to C2H6 (surface) emissions in ancil directory +help=This file contains the C2H6 surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_c3h8_ancil_path] +compulsory=true +description=Path to C3H8 (surface) emissions in ancil directory +help=This file contains the C3H8 surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_c5h8_ancil_path] +compulsory=true +description=Path to C5H8 (surface) emissions in ancil directory +help=This file contains the Biogenic surface C5H8 emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_ch4_ancil_path] +compulsory=true +description=Path to CH4 (surface) emissions in ancil directory +help=This file contains the CH4 surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_co_ancil_path] +compulsory=true +description=Path to CO (surface) emissions in ancil directory +help=This file contains the CO surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_dms_land_ancil_path] +compulsory=true +description=Path to DMS (surface) emissions over land from ancillary directory +help=This file contains the DiMethyl Sulphide surface aerosol emissions + = generated over land +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_hcho_ancil_path] +compulsory=true +description=Path to HCHO (surface) emissions in ancil directory +help=This file contains the HCHO surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_me2co_ancil_path] +compulsory=true +description=Path to ME2CO (surface) emissions in ancil directory +help=This file contains the Me2CO surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_mecho_ancil_path] +compulsory=true +description=Path to MECHO (surface) emissions in ancil directory +help=This file contains the MeCHO surf emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_meoh_ancil_path] +compulsory=true +description=Path to MEOH (surface) emissions in ancil directory +help=This file contains the Biogenic surface methanol (CH3OH) emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_monoterp_ancil_path] +compulsory=true +description=Path to Monoterpene (surface) emissions from ancillary directory +help=This file contains the Monoterpene surface aerosol emissions +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_murk_ancil_path] +compulsory=true +description=Path to Murk emissions from ancillary directory +help=This file contains the Murk aerosol emissions +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_nh3_ancil_path] +compulsory=true +description=Path to NH3 (surface) emissions in ancil directory +help=This file contains the ammonia gas emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_no_aircrft_ancil_path] +compulsory=true +description=Path to NO_AIRCRFT (3-D) emissions in ancil directory +help=This file contains the NOx aircraft emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_no_ancil_path] +compulsory=true +description=Path to NO (surface) emissions in ancil directory +help=This file contains the NOx surface emissions for chemistry +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_om_biofuel_ancil_path] +compulsory=true +description=Path to OC biofuel emissions from ancillary files directory +help=This file contains the Organic Carbon (OC) surface aerosol emissions + = generated from biofuels +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_om_biomass_ancil_path] +compulsory=true +description=Path to OC biomass emissions from ancillary files directory +help=This file contains the Organic Carbon (OC) (3-D) aerosol emissions + = generated from biomass burning, incl. forest fires +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_om_biomass_hi_ancil_path] +compulsory=true +description=Path to high-level OC biomass emissions +help=This file contains the Organic Carbon (OC) high-level aerosol emissions + = generated from biomass burning, incl. forest fires +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_om_biomass_lo_ancil_path] +compulsory=true +description=Path to OC low-level biomass emissions +help=This file contains the Organic Carbon (OC) surface aerosol emissions + = generated from biomass burning, incl. forest fires +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_om_fossil_ancil_path] +compulsory=true +description=Path to OC fossil fuel emissions from ancillary files directory +help=This file contains the Organic Carbon (OC) surface aerosol emissions + = generated from fossil fuels +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_so2_high_ancil_path] +compulsory=true +description=Path to SO2-high emission from ancillary files directory +help=This file contains the SO2 high (but fixed-level) aerosol emissions + = generated by industrial sources/ shipping +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_so2_low_ancil_path] +compulsory=true +description=Path to SO2-low emission from ancillary files directory +help=This file contains the SO2 low surface aerosol emissions +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=emiss_so2_nat_ancil_path] +compulsory=true +description=Path to SO2-natural emission from ancillary files directory +help=This file contains the natural SO2 (3D) emissions for aerosols +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=gas_mmr_ancil_path] +compulsory=true +description=Path to gas MMRs (3-D) in ancil directory +help=This file contains the gas MMRs for the idealised/flexchem scheme +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=h2o2_limit_ancil_path] +compulsory=true +description=Path to H2O2 (limiting oxidant) file from ancillary files directory +help=This file contains the H2O2 (hydrogen peroxide) mass mixing ratio data + = required to run GLOMAP aerosols in Offline mode +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=ho2_ancil_path] +compulsory=true +description=Path to HO2 (oxidant) file from ancillary files directory +help=This file contains the HO2 (hydroperoxy radical) mass mixing ratio data + = required to run GLOMAP aerosols in Offline mode +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=hydtop_ancil_path] +compulsory=true +description=Path to TOPMODEL hydrology file from ancillary files directory +help=This file contains the topographic index data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=iau_addinf_path] +compulsory=true +description=Path to the IAU addinf file +help=This file contains the first set of additive inflation increments + = for the IAU +ns=namelist/Job/IO/IAU +!string_length=filename +type=character + +[namelist:files=iau_bcorr_path] +compulsory=true +description=Path to the IAU bcorr file +help=This file contains the first set of bias correction increments + = for the IAU +ns=namelist/Job/IO/IAU +!string_length=filename +type=character + +[namelist:files=iau_path] +compulsory=true +description=Path to the IAU file +help=This file contains the analysis increments for the IAU +ns=namelist/Job/IO/IAU +!string_length=filename +type=character + +[namelist:files=iau_pert_path] +compulsory=true +description=Path to the IAU pert inc file +help=This file contains analysis increments from the perturbation members + = of the control-pert DA ensemble for the IAU +ns=namelist/Job/IO/IAU +!string_length=filename +type=character + +[namelist:files=iau_sst_path] +compulsory=true +description=Path to the sst IAU file +help=This file contains SST perturbations from the ensemble for use by the IAU +ns=namelist/Job/IO/IAU +!string_length=filename +type=character + +[namelist:files=iau_surf_path] +compulsory=true +description=Path to the surf IAU file +help=This path contains the IAU surf file +ns=namelist/Job/IO/IAU +!string_length=filename +type=character + +[namelist:files=internal_flux_ancil_path] +compulsory=true +description=Path to an internal flux 2D map in ancil directory +help=This file contains the internal flux data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=land_area_ancil_path] +compulsory=true +description=Path to land area fraction file from ancillary files directory +help=This file contains the land area fraction data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=lbc_directory] +compulsory=true +description=Path to lbc directory +help=This directory contains the lbc file +ns=namelist/Job/IO/LBCs +!string_length=filename +type=character + +[namelist:files=lbc_filename] +compulsory=true +description=Path to lbc file +help=This file contains the lbc data +ns=namelist/Job/IO/LBCs +!string_length=filename +type=character + +[namelist:files=ls_directory] +compulsory=true +description=Path to the linearisation state directory +help=This directory contains the linearisation state file +ns=namelist/Job/IO/LS +!string_length=filename +type=character + +[namelist:files=ls_filename] +compulsory=true +description=Path to the linearisation state file +help=This file contains the linearisation state data +ns=namelist/Job/IO/LS +!string_length=filename +type=character + +[namelist:files=no3_ancil_path] +compulsory=true +description=Path to NO3 (oxidant) file from ancillary files directory +help=This file contains the NO3 (nitrate radical) mass mixing ratio data + = required to run GLOMAP aerosols in Offline mode +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=o3_ancil_path] +compulsory=true +description=Path to O3 (oxidant) file from ancillary files directory +help=This file contains the O3 (ozone) mass mixing ratio data + = required to run GLOMAP aerosols in Offline mode +ns=namelist/Job/IO/Ancils +type=character + +[namelist:files=oh_ancil_path] +compulsory=true +description=Path to OH (oxidant) file from ancillary files directory +help=This file contains the OH (hydroxl radical) mass mixing ratio data + = required to run GLOMAP aerosols in Offline mode +ns=namelist/Job/IO/Ancils +type=character + +[namelist:files=orography_mean_ancil_path] +compulsory=true +description=Path to mean orography file from ancillary files directory +help=This file contains global surface altitude information used for orography +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=orography_subgrid_ancil_path] +compulsory=true +description=Path to subgrid orography file from ancillary files directory +help=This file contains subgrid orographic information used by parametrizations +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=ozone_ancil_path] +compulsory=true +description=Path to Ozone file from ancillary files directory +help=This file contains the ozone mass mixing ratio data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=plant_func_ancil_path] +compulsory=true +description=Path to plant functional type file from ancillary files directory +help=This file contains the canopy height and leaf area index +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=sea_ancil_path] +compulsory=true +description=Path to sea file from ancillary files directory +help=This file contains the sea surface chlorophyll concentration +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=sea_ice_ancil_path] +compulsory=true +description=Path to sea ice file from ancillary files directory +help=This file contains the sea ice thickness and fraction +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=snow_analysis_ancil_path] +compulsory=true +description=Path to snow file from ancillary files directory +help=This file contains the snow analysis data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=soil_ancil_path] +compulsory=true +description=Path to soil file from ancillary files directory +help=This file contains the soil data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=soil_dust_ancil_path] +compulsory=true +description=Path to soil inputs for dust from ancil files directory +help=This file contains the soil properties required for dust emissions +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=soil_rough_ancil_path] +compulsory=true +description=Path to soil roughness file from ancillary files directory +help=This file contains the soil roughness data +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=sst_ancil_path] +compulsory=true +description=Path to sst file from ancillary files directory +help=This file contains the sea surface temperature +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=start_dump_directory] +compulsory=true +description=Directory for start dumps +help=?????? +ns=namelist/Job/IO/Dumping +!string_length=filename +type=character + +[namelist:files=start_dump_filename] +compulsory=true +description=Filename for start dump +help=?????? +ns=namelist/Job/IO/Dumping +!string_length=filename +type=character + +[namelist:files=surface_frac_ancil_path] +compulsory=true +description=Path to surface types fraction file from ancillary files directory +help=This file contains the fractions of different surface types +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +[namelist:files=urban_ancil_path] +compulsory=true +description=Path to urban file from ancillary files directory +help=This file contains information on building size for the urban schemes +ns=namelist/Job/IO/Ancils +!string_length=filename +type=character + +#============================================================================== +# FINITE ELEMENT +#============================================================================== +[namelist:finite_element=vorticity_in_w1] +compulsory=true +description=?????? +help=Compute the vorticity in W1 (or implied W2) space +!kind=default +sort-key=Panel-A07 +type=logical + +#============================================================================== +# DYNAMICS +#============================================================================== +# +#============================================================================== +# FORMULATION +#============================================================================== +[namelist:formulation] +compulsory=true +description=Dynamics options +help=Options for dynamics formulation and numerics +ns=namelist/Science/Dynamics +sort-key=B +title=Dynamics + +[namelist:formulation=dlayer_on] +compulsory=true +description=Damping layer switch +help=Use damping layer yes/no +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A07 +trigger=namelist:damping_layer: .true. ; +type=logical + +[namelist:formulation=dry_static_adjust] +compulsory=true +description=Dry static adjustment of reference profile +help=Apply a sorting algorithm to each column of the + =potential temperature semi-implicit reference profile, + =ensuring that it is monotonically increasing with height. + =Without this the semi-implicit Helmholtz equation may + =be ill-posed. +!kind=default +sort-key=Panel-A06 +type=logical + +[namelist:formulation=eos_method] +compulsory=true +description=Method used to treat equation of state (EoS). This method will + =be used consistently throughout the model +!enumeration=true +help=Two methods are available for treating the EoS: + ='sampled' - Sampled at finite element data points + ='projected' - Galerkin projected onto finite element representation +sort-key=Panel-A12 +value-titles=Sampled at data points, Projected onto elements +values='sampled', 'projected' + +[namelist:formulation=exner_from_eos] +compulsory=true +description=Recompute Exner pressure after each solve +help=Diagnose the Exner pressure function from the equation of state + =after each mixed solve +!kind=default +sort-key=Panel-A11 +type=logical + +[namelist:formulation=horizontal_physics_predictor] +compulsory=true +description=Only use the horizontal component when computing + =the wind physics predictors +help=If true only the horizontal component of the RHS terms + =will be used when computing the physics wind predictor +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A12 +type=logical + +[namelist:formulation=horizontal_transport_predictor] +compulsory=true +description=Only use the horizontal component when computing + =the wind transport predictors +help=If true only the horizontal component of the RHS will be + =used when computing the transport wind predictor +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A12 +type=logical + +[namelist:formulation=init_exner_bt] +compulsory=true +description=?????? +help=Initialize exner hydrostatically bottom to top +!kind=default +sort-key=Panel-A10 +type=logical + +[namelist:formulation=l_multigrid] +compulsory=true +description=Enable Multi-Grid +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A01 +trigger=namelist:multigrid: .true. ; +type=logical + +[namelist:formulation=lagged_orog] +compulsory=true +description=Lag sloped/bent orography terms on the right hand side. +help=This is achieved by omitting the vertical-horizontal correlations from + =the W2 mass-matrix in the mixed-solve, but keeping them in the W2 + =mass-matrix used to create the RHS. Then the vertical-horizontal + =correlations are evaluated at iteration i rather than at iteration + =i+1 i.e. they are lagged. +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A01 +type=logical + +[namelist:formulation=moisture_formulation] +compulsory=true +description=Select behaviour of moisture fields +!enumeration=true +help=Dry: Moisture fields set to zero, have no effect on dynamics and are not transported. + =Passive: Moisture fields transported as passive tracers. + =Active: Moisture fields transported as active tracers, with their inertia + = affecting the dynamics. + =Traditional: Traditional treatment of moist dynamics. Moisture fields are transported, + = their inertia affects dynamics, and vapour pressure is + = accounted for in the equation of state and pressure gradients. +ns=namelist/Science +sort-key=Panel-A02 +trigger=namelist:section_choice=aerosol: 'traditional' ; + =namelist:section_choice=cloud: 'traditional' ; + =namelist:section_choice=methane_oxidation: 'traditional' ; + =namelist:section_choice=microphysics: 'traditional' ; + =namelist:formulation=theta_moist_source: 'traditional' ; +value-titles=Dry, Passive tracers, Active tracers, Traditional approximations +values='dry', 'passive', 'active', 'traditional' + +[namelist:formulation=moisture_in_solver] +compulsory=true +description=Whether to include contributions from moisture variables to the + =pressure gradient term in the linear solver +help=If true, moisture weights are included in the pressure gradient in the + =linear solver. + =If false, then impact of moisture on pressure gradient is ignored. +!kind=default +sort-key=Panel-A07 +type=logical + +[namelist:formulation=p2theta_vert] +compulsory=true +description=Only use vertical parts in projection operators from + =temperature to velocity space +help=If true, then only use vertical parts in projection operators from + =temperature to velocity space. + =If false, then use all components in projection operators from + =temperature to velocity space. +!kind=default +sort-key=Panel-A11 +type=logical + +[namelist:formulation=rotating] +compulsory=true +description=Include Coriolis terms +help=Turn on/off Coriolis terms +!kind=default +sort-key=Panel-A03 +type=logical + +[namelist:formulation=shallow] +compulsory=true +description=Constant gravity +help=When true, the gravitational field is constant, as would be the under the shallow + =atmosphere approximation. When false, gravity varies as inverse square of radial distance + =from planet centre. +!kind=default +sort-key=Panel-A04 +type=logical + +[namelist:formulation=si_momentum_equation] +compulsory=true +description=Use a semi-implicit or explicit computation + =of the momentum equation. +help=Set .true. to use semi-implicit or + =set .false. to use an explicit treatment +!kind=default +sort-key=Panel-A13 +type=logical + +[namelist:formulation=theta_moist_source] +compulsory=false +description=Explicitly includes the source term to the potential temperature + =equation that relates to the difference in heat capacities between + =different moisture phases. +help=Adds a pointwise Crank-Nicolson discretisation of the moist source term + =to the potential temperature equation, which is applied after transporting + =the potential temperature. This does nothing if the transported theta + =variable is the 'moist' potential temperature. This variable is only active + =if the moisture_formulation is set to 'traditional'. +!kind=default +sort-key=Panel-A02 +type=logical + +[namelist:formulation=use_multires_coupling] +compulsory=true +description=Enable use of multiple resolution meshes for coupling +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A11 +trigger=namelist:multires_coupling: .true. ; + =namelist:multires_coupling=lowest_order_aero_flag: .true. ; +type=logical + +[namelist:formulation=use_physics] +compulsory=true +description=Use subgrid physics parametrizations or forcing terms +help=Use subgrid physics parametrizations or forcing terms +!kind=default +ns=namelist/Science +sort-key=Panel-A01 +trigger=namelist:section_choice=aerosol: .true. ; + =namelist:section_choice=boundary_layer: .true. ; + =namelist:section_choice=chemistry: .true. ; + =namelist:section_choice=cloud: .true. ; + =namelist:section_choice=electric: .true. ; + =namelist:section_choice=methane_oxidation: .true. ; + =namelist:section_choice=microphysics: .true. ; + =namelist:section_choice=orographic_drag: .true. ; + =namelist:section_choice=radiation: .true. ; + =namelist:section_choice=spectral_gwd: .true. ; + =namelist:section_choice=surface: .true. ; + =namelist:physics=sample_physics_scalars: .true. ; + =namelist:physics=sample_physics_winds: .true. ; + =namelist:physics=limit_drag_incs: .true. ; + =namelist:section_choice=stochastic_physics: .true. ; +type=logical + +[namelist:formulation=use_wavedynamics] +compulsory=true +description=Dynamics switch +help=This switch is for the wave-dynamics (adjustment) part of + =the dynamical core. When set to false, advection remains + =active. +!kind=default +sort-key=Panel-A05 +type=logical + +[namelist:formulation=vector_invariant] +compulsory=true +description=Use a vector invariant or advective form + =for the momentum equation. +help=Set .true. to use vector invariant or + =set .false. to use advective +!kind=default +sort-key=Panel-A14 +type=logical + +#============================================================================== +# GEOSTROPHIC FORCING OF HORIZONTAL WIND COMPONENTS +#============================================================================== +[namelist:geostrophic_forcing] +compulsory=true +description=Settings for geostrophic wind forcing +ns=namelist/Science/External Forcing/Geostrophic Forcing +sort-key=C3 +title=Geostrophic forcing + +[namelist:geostrophic_forcing=coordinate] +compulsory=true +description=Vertical coordinate for geostrophic wind forcing +!enumeration=true +help=Geostrophic wind profiles may be specified with either height + =or pressure as the vertical coordinate. In both cases the coordinate + =information is entered using the heights array. + =Height: height in metres above sea-level. Values should be monotonically increasing. + =Pressure: pressure level in Pascals. Values should be monotonically decreasing. +!kind=default +ns=namelist/Science/External Forcing/Geostrophic Forcing +sort-key=Panel-A01b +value-titles=Height, Pressure +values='height', 'pressure' + +[namelist:geostrophic_forcing=heights] +!bounds=namelist:geostrophic_forcing=number_heights +compulsory=true +description=Heights of points in geostrophic wind profiles +fail-if=len(this) != namelist:geostrophic_forcing=number_heights +help=Heights for geostrophic wind profiles. If in ascending order, these are + =taken to be height in metres. Heights specified in descending order are + =taken to be pressure coordinate in Pascals. +!kind=default +length=: +ns=namelist/Science/External Forcing/Geostrophic Forcing +sort-key=Panel-A01c +type=real + +[namelist:geostrophic_forcing=number_heights] +compulsory=true +description=Number of points in each geostrophic wind profile +help= +!kind=default +ns=namelist/Science/External Forcing/Geostrophic Forcing +range=0:100 +sort-key=Panel-A01a +type=integer + +[namelist:geostrophic_forcing=number_times] +compulsory=true +description=Number of geostrophic wind profiles +help= +!kind=default +ns=namelist/Science/External Forcing/Geostrophic Forcing +range=0:100 +sort-key=Panel-A01a +type=integer + +[namelist:geostrophic_forcing=profile_data_u] +!bounds=namelist:geostrophic_forcing=number_heights * namelist:geostrophic_forcing=number_times +compulsory=true +description=Geostrophic wind data +fail-if=len(this) != namelist:geostrophic_forcing=number_heights * namelist:geostrophic_forcing=number_times +help=U-component of geostrophic wind (m/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Geostrophic Forcing +sort-key=Panel-A01d +type=real + +[namelist:geostrophic_forcing=profile_data_v] +!bounds=namelist:geostrophic_forcing=number_heights * namelist:geostrophic_forcing=number_times +compulsory=true +description=Geostrophic wind data +fail-if=len(this) != namelist:geostrophic_forcing=number_heights * namelist:geostrophic_forcing=number_times +help=V-component of the geostrophic wind (m/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Geostrophic Forcing +sort-key=Panel-A01d +type=real + +[namelist:geostrophic_forcing=times] +!bounds=namelist:geostrophic_forcing=number_times +compulsory=true +description=Validity times of geostrophic wind profiles +fail-if=len(this) != namelist:geostrophic_forcing=number_times +help= +!kind=default +length=: +ns=namelist/Science/External Forcing/Geostrophic Forcing +sort-key=Panel-A01c +type=real + +#============================================================================== +# HELMHOLTZ SOLVER +#============================================================================== +[namelist:helmholtz_solver] +compulsory=true +description=?????? +help=This namelist contains the options for the preconditioner (helmholtz) solver +!kind=default +ns=namelist/Science/Dynamics/helmholtz solver +sort-key=Section-A08 +title=Pre-conditioner solver + +[namelist:helmholtz_solver=fail_on_non_converged] +compulsory=true +description=Cause the solver to return an error if the maximum number of iterations are reached and + =residual has not been reduced below the desired tolerance otherwise the solver will exit even + =if it has not converged. If monitor_convergence is set to false then this setting has no effect +help=Return an error if solver fails to converge +sort-key=Panel-A07 +type=logical + +[namelist:helmholtz_solver=gcrk] +compulsory=true +description=?????? +help=Dimension of the approximate Krylov subspace. + =In other words, it is the number of potential + =residual vectors to calculate at each + =iteration of the solver. +!kind=default +sort-key=Panel-A06 +type=integer + +[namelist:helmholtz_solver=jacobi_relaxation] +compulsory=true +description=?????? +help=Relaxtion factor to use in the Jacobi solver +!kind=default +sort-key=Panel-A11 +type=real + +[namelist:helmholtz_solver=method] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +sort-key=Panel-A01 +trigger=namelist:helmholtz_solver=jacobi_relaxation: this == "'jacobi'"; +value-titles=biconjugate gradient stabilized, + =conjugate gradient, + =generalized conjugate residual, + =generalized minimal residual, + =flexible generalized minimal residual, + =precondition only, + =jacobi +values='bicgstab', 'cg', 'gcr', 'gmres', 'fgmres', 'prec_only', 'jacobi' + +[namelist:helmholtz_solver=monitor_convergence] +compulsory=true +description=Computes and prints out convergence information for the iterative solver and if the + =error has been reduced below the tolerance then the solver will exit. If set to false + =the solver will always perform the maximum number of iterations before exiting +help=Monitor convergence of the iterative Helmholtz solver +sort-key=Panel-A06 +trigger=namelist:helmholtz_solver=fail_on_non_converged: .true.; +type=logical + +[namelist:helmholtz_solver=normalise] +compulsory=true +description=?????? +help=Normalise Helmholtz matrix by its approximate diagonal +!kind=default +sort-key=Panel-A05 +type=logical + +[namelist:helmholtz_solver=preconditioner] +compulsory=true +description=?????? +!enumeration=true +fail-if=this == "'multigrid'" and namelist:formulation=l_multigrid == ".false." ; +help=?????? + =?????? +sort-key=Panel-A03 +value-titles=None, Diagonal, Tridiagonal, Multigrid +values='none', 'diagonal', 'tridiagonal', 'multigrid' + +[namelist:helmholtz_solver=si_pressure_a_tol] +compulsory=true +description=?????? +help=Absolute tolerance of semi-implicit pressure solver +!kind=default +sort-key=Panel-A03 +type=real + +[namelist:helmholtz_solver=si_pressure_maximum_iterations] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=Iteration limit for si preconditioner solver +!kind=default +range=1: +sort-key=Panel-A04 +type=integer + +[namelist:helmholtz_solver=si_pressure_tolerance] +compulsory=true +description=?????? +help=Relative tolerance of semi-implicit pressure solver +!kind=default +sort-key=Panel-A02 +type=real + +#============================================================================== +# IAU MULTIFILE IO +#============================================================================== +[namelist:iau_addinf_io] +compulsory=false +description=This namelist contains the settings for use + =in IAU multifile IO for additive inflation +duplicate=true +!instance_key_member=filename +ns=namelist/Job/IO/IAU/Addinf +sort-key=Section-A05 + +[namelist:iau_addinf_io=filename] +compulsory=true +description=Filename for multifile IO additive inflation +!kind=default +type=character + +[namelist:iau_addinf_io=start_time] +compulsory=true +description=Time to read from additive inflation file(s) +help=Time in seconds from the start of the model run to + = open and read from additive inflation file(s) +!kind=default +type=integer + +[namelist:iau_ainc_io] +compulsory=false +description=This namelist contains the settings for use + =in IAU multifile IO for analysis increments +duplicate=true +!instance_key_member=filename +ns=namelist/Job/IO/IAU/Ainc +sort-key=Section-A05 + +[namelist:iau_ainc_io=filename] +compulsory=true +description=Filename for multifile IO analysis increments +!kind=default +type=character + +[namelist:iau_ainc_io=start_time] +compulsory=true +description=Time to read from analysis increments file(s) +help=Time in seconds from the start of the model run to + = open and read from analysis increment file(s) +!kind=default +type=integer + +[namelist:iau_bcorr_io] +compulsory=false +description=This namelist contains the settings for use + =in IAU multifile IO for bias correction +duplicate=true +!instance_key_member=filename +ns=namelist/Job/IO/IAU/Bcorr +sort-key=Section-A05 + +[namelist:iau_bcorr_io=filename] +compulsory=true +description=Filename for multifile IO bias correction +!kind=default +type=character + +[namelist:iau_bcorr_io=start_time] +compulsory=true +description=Time to read from bias correction file(s) +help=Time in seconds from the start of the model run to + = open and read from bias correction file(s) +!kind=default +type=integer + +#============================================================================== +# IDEALISED CASES +#============================================================================== +[namelist:idealised] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +ns=namelist/Job/Initial conditions + +[!namelist:idealised=f_lon] +compulsory=false +description=Longitude for idealised domain [rad]. +expression=namelist:idealised=f_lon_deg * source:constants_mod=PI / 180.0_r_def +help=Longitude for idealised domain [rad]. + = + =Used in calculations of the solar position. +!kind=default +type=real + +[namelist:idealised=f_lon_deg] +compulsory=true +description=Longitude for idealised domain [degrees]. +fail-if=this < 0.0 ; + =this > 360.0 ; +help=Longitude for idealised domain [degrees]. + = + =Used in calculations of the solar position. +!kind=default +range=0.0:360.0 +sort-key=Panel-A01 +type=real + +[namelist:idealised=perturb_init] +compulsory=true +description=Apply a perturbation to initial conditions of theta sampled from the + =Gaussian distribution and added after hydrostatic balance +help=?????? +!kind=default +sort-key=Panel-A05 +trigger=namelist:idealised=perturb_magnitude: this == ".true."; + =namelist:idealised=perturb_seed: this == ".true."; +type=logical + +[namelist:idealised=perturb_magnitude] +compulsory=true +description=A scaling to be applied to the perturbation by multiplying each + =perturbation by 10**perturb_magnitude +help=?????? +!kind=default +sort-key=Panel-A05 +type=integer + +[namelist:idealised=perturb_seed] +compulsory=true +description=A random seed to be applied in the case that perturb_init is true. + = Should be an integer of size ~10^6. If not supplied then no seed + = will be set and the test will not be repeatable. +help=?????? +!kind=default +sort-key=Panel-A05 +type=integer + +[namelist:idealised=test] +compulsory=true +description=?????? +!enumeration=true +fail-if=this == "'yz_cosine_hill'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'cold_bubble_x'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'cold_bubble_y'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'warm_bubble'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'warm_bubble_3d'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'hadley_like_dcmip'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'vortex_field'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'deep_baroclinic_wave'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'solid_body_rotation'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'solid_body_rotation_alt'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'cos_phi'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'cosine_bell'" and namelist:base_mesh=geometry == "'planar'" ; + =this == "'cosine_bubble'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'eternal_fountain'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'curl_free_reversible'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'div_free_reversible'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'translational'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'rotational'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'vertical_cylinder'" and namelist:base_mesh=geometry == "'spherical'" ; + =this == "'bryan_fritsch'" and namelist:base_mesh=geometry == "'spherical'"; + =this == "'grabowski_clark'" and namelist:base_mesh=geometry == "'spherical'"; + =this == "'grabowski_clark'" and namelist:formulation=moisture_formulation == "'dry'"; +help=gravity_wave : Gravity wave test (planar|spherical) + =isot_atm : Isothermal atmosphere + =isot_cold_atm : Isothermal atmosphere, cold ground temperature + =isot_dry_atm : Isothermal and dry atmosphere + =cold_bubble_x : Straka density cold current test in x direction (planar) + =cold_bubble_y : Straka density cold current test in y direction (planar) + =const_lapse_rate : const_lapse_rate : Stratified atmosphere, constant lapse rate + =warm_bubble : Warm bubble test (planar) + =warm_bubble_3d : 3d Warm bubble test (planar) + =gaussian_hill : Pair of Gaussian hills (planar|spherical) + =cosine_hill : Pair of cosine hills (planar|spherical) + =cosine_bell : Pair of 3D cosine bells (spherical) + =yz_cosine_hill : Pair of cosine hills (in a y-z slice of the planar domain) + =slotted_cylinder : Pair of slotted cylinders (planar|spherical) + =constant_field : Constant density value everywhere (planar|spherical) + =cosine_stripe : Cosine profile which is a function of longitude only (planar|spherical) + =vortex_field : Pair of vortices (spherical) + =hadley_like_dcmip : Hadley-like DCMIP test (spherical) + =solid_body_rotation : Solid body rotation test + =solid_body_rotation_alt : Switchable deep/shallow solid body rotation test + =deep_baroclinic_wave : Deep atmosphere baroclinic wave (Ullrich 13) + =isentropic : Stationary isentropic case + =cos_phi : Advection of latitudinally varying function + =cosine_bubble : Advection of a cosine bubble in an x-z domain + =eternal_fountain : A mimic of an eternal fountain + =curl_free_reversible : A curl-free reversible flow with high divergence + =div_free_reversible : A divergence-free deformative flow + =translational : Simple translational flow + =rotational : A vertical solid body rotation + =vertical_cylinder : A cylinder for a vertical slice + =specified_profiles : Use profile data provided by initial namelists + =bryan_fritsch : Rising bubble test of Bryan and Fritsch (2002) + =grabowski_clark : Rising bubble test of Grabowski and Clark (1991) +sort-key=Panel-A01 +trigger=namelist:initial_temperature=profile_data: 'specified_profiles'; + =namelist:initial_temperature=profile_heights: 'specified_profiles'; + =namelist:initial_temperature=profile_size: 'specified_profiles'; + =namelist:initial_vapour=profile_data: 'specified_profiles'; + =namelist:initial_vapour=profile_heights: 'specified_profiles'; + =namelist:initial_vapour=profile_size: 'specified_profiles'; +value-titles=None, Gravity Wave, Isothermal atmosphere, Cold ground temperature, + =Isothermal dry atmosphere, Cold bubble x, + =Cold bubble y, Constant lapse rate, Warm bubble, Warm bubble 3d, Gaussian hill, + =Cosine hill, Cosine bell 3D, YZ cosine hill, Slotted cylinder, Constant field, + =Cosine stripe, Hadley like DCMIP, Vortex field, Solid body rotation, + =Solid body rotation alt, Deep baroclinic wave, Isentropic, + =Advection of cos(phi) function, Advection of a cosine bubble, + =Eternal fountain, A reversible potential flow, A deformative twisting flow, + =Uniform translation, Vertical solid body rotation, Cylinder for vertical slice, + =Specified profiles, Bryan and Fritsch (2002) rising bubble, + =Grabowski and Clark (1991) moist rising bubble in an unsaturated atmosphere +# initial temp namelists +# XS +# trigger=namelist:initial_density: 'none' ; +# namelist:initial_temperature: 'none' ; +# namelist:initial_wind: 'none' ; +values='none', 'gravity_wave', 'isot_atm', 'isot_cold_atm', 'isot_dry_atm', 'cold_bubble_x', + ='cold_bubble_y', 'const_lapse_rate', 'warm_bubble', 'warm_bubble_3d', 'gaussian_hill', + ='cosine_hill', 'cosine_bell', 'yz_cosine_hill', 'slotted_cylinder', 'constant_field', 'cosine_stripe', + ='hadley_like_dcmip', 'vortex_field', 'solid_body_rotation', + ='solid_body_rotation_alt', 'deep_baroclinic_wave', 'isentropic', + ='cos_phi','cosine_bubble', + ='eternal_fountain', 'curl_free_reversible', 'div_free_reversible', 'translational', + ='rotational','vertical_cylinder', 'specified_profiles', 'bryan_fritsch', 'grabowski_clark' + +#============================================================================== +# INITIAL DENSITY +#============================================================================== +[namelist:initial_density] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +ns=namelist/Job/Initial conditions/Density +sort-key=Section-A03 + +[namelist:initial_density=density_background] +compulsory=true +description=?????? +fail-if=this < 0.0 ; +help=Background value of initial idealised density +!kind=default +range=0.0: +sort-key=Panel-A03 +# This variable is only valid for the following idealised test cases: cosine_hill, yz_cosine_hill, +# slotted_cylinder, cosine_stripe, constant_field +type=real + +[namelist:initial_density=density_max] +compulsory=true +description=?????? +fail-if=this < 0.0 ; +help=Maximum value of initial idealised density +!kind=default +range=0.0: +sort-key=Panel-A02 +# trigger= only valid for some of idealised test cases namelist:idelaised=test Add comments as to which +# This variable is only valid for the following idealised test cases: gaussian_hill, cosine_hill, +# yz_cosine_hill, slotted_cylinder, cosine_stripe, +type=real + +[namelist:initial_density=r1] +compulsory=true +description=?????? +# fail-if= only valid for certain tests +fail-if=this < 0.0 ; +# Poor, variables should not change units based on other settings!! +help=Radius for one of the pair of initial tracer functions + =Biperiodic domain: in metres. + =Cubed sphere domain: in radians. +!kind=default +range=0.0: +#range= +sort-key=Panel-A04 +type=real + +[namelist:initial_density=r2] +compulsory=true +description=?????? +fail-if= +help=Radius parameter for the second of the pair of initial tracer functions (see r1) +!kind=default +!range= +sort-key=Panel-A08 +trigger= +type=real + +[namelist:initial_density=x1] +compulsory=true +description=?????? +# trigger= only valid for some of idealised test cases namelist:idelaised=test Add comments as to which +# A change in the way it is coded is needed as x1 is required for several of the idealised tests but need +# not be. +# Poor, variables should not change units based on other settings!! +help=Position for one of the pair of initial tracer functions + =Biperiodic domain: centre of the function given in terms of metres in the chi1 direction. + =Cubed sphere domain: longitudinal position of the centre of the function (a value between 0 and \f$2\pi\f$). +!kind=default +#range= +sort-key=Panel-A05 +trigger= +type=real + +[namelist:initial_density=x2] +compulsory=true +description=?????? +fail-if= +help=Position parameter for the second of the pair of initial tracer functions (see x1) +!kind=default +!range= +sort-key=Panel-A09 +trigger= +type=real + +[namelist:initial_density=y1] +compulsory=true +description=?????? +fail-if= +# A change in the way it is coded is needed as y1 is required for several of the idealised tests but need +# not be. +# Poor, variables should not change units based on other settings!! +help=Position for one of the pair of initial tracer functions + =Biperiodic domain: centre of the function given in terms of metres in the chi2 direction. + =Cubed sphere domain: latitudinal position of the centre of the function (a value between \f$-\pi/2\f$ and \f$\pi/2\f$). +!kind=default +!range= +sort-key=Panel-A06 +trigger= +type=real + +[namelist:initial_density=y2] +compulsory=true +description=?????? +fail-if= +help=Position parameter for the second of the pair of initial tracer functions (see y1) +!kind=default +!range= +sort-key=Panel-A10 +trigger= +type=real + +[namelist:initial_density=z1] +compulsory=true +description=?????? +fail-if= +help=Centre height position for one of the pair of initial tracer functions +!kind=default +!range= +sort-key=Panel-A07 +trigger= +# Only valid for yz_cosine_hill +type=real + +[namelist:initial_density=z2] +compulsory=true +description=?????? +fail-if= +help=Centre height position for one of the pair of initial tracer functions +!kind=default +!range= +sort-key=Panel-A11 +# Only valid for yz_cosine_hill +trigger= +type=real + +#============================================================================== +# INITIAL PRESSURE +#============================================================================== +[namelist:initial_pressure] +compulsory=true +description=Options for initialising Exner +help= +!kind=default +ns=namelist/Job/Initial conditions/Pressure +sort-key=Section-A02 + +[namelist:initial_pressure=method] +compulsory=true +description=Method used to initialise Exner +!enumeration=true +help=Three methods are available for idealised initialisation of Exner pressure: + ='sampled' - analytic function sampled at finite element data points + ='projected' - analytic function projected onto finite element representation + ='balanced' - Exner calculated using discrete hydrostatic balance + = (only works for element_order_h=0 and element_order_v=0 + = until #2304 is implemented) +sort-key=Panel-A01 +value-titles=None, Sampled at data points, Projected onto elements, Discrete hydrostatic balance +values='none', 'sampled', 'projected', 'balanced' + +[namelist:initial_pressure=surface_pressure] +compulsory=true +description=Pressure at sea level (Pa) +help=Pressure in Pascals at the lower boundary. When orography is present, + =this is taken to be pressure at sea level. +!kind=default +sort-key=Panel-A02 +type=real + +#============================================================================== +# INITIAL TEMPERATURE +#============================================================================== +[namelist:initial_temperature] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +ns=namelist/Job/Initial conditions/Temperature +sort-key=Section-A01 + +[namelist:initial_temperature=bvf_square] +compulsory=true +description=?????? +help=The square of Brunt-Vaisala frequency [1/s^2] +!kind=default +sort-key=Panel-A01 +type=real + +[namelist:initial_temperature=pert_centre] +compulsory=true +description=Centre (in degrees) of the temperature perturbation. +fail-if=this < -180.0 ; + =this > 180.0 ; +help=For the Gravity wave idealised case set the location (in longitude) of the + =initial pertubation +!kind=default +sort-key=Panel-A05 +type=real + +[namelist:initial_temperature=pert_width_scaling] +compulsory=true +description=The scaling applied to the temperature perturbation width. +help=This is designed to allow a smaller perturbation width to be used for a + =limited area model on one panel, and zero flux LBCs. +!kind=default +sort-key=Panel-A03b +type=real +warn-if=this <= 0.0 ; + +[namelist:initial_temperature=perturb] +compulsory=true +description=Add a perturbation to the initial potential temperature +!enumeration=true +help=random - random noise (same on each processor) +sort-key=Panel-A03 +value-titles=None, Random +values='none', 'random' + +[namelist:initial_temperature=profile_data] +!bounds=namelist:initial_temperature=profile_size +compulsory=true +description=Initial temperature profile +help=Values of potential temperature (Kelvin) at heights specified in profile_heights. +!kind=default +length=: +range=0.0: +sort-key=Panel-A04b +type=real + +[namelist:initial_temperature=profile_heights] +!bounds=namelist:initial_temperature=profile_size +compulsory=true +description=Heights for temperature profile +help=Heights, in metres, at which temperature data are specified. +!kind=default +length=: +range=0.0: +sort-key=Panel-A04c +type=real + +[namelist:initial_temperature=profile_size] +compulsory=true +description=Size of initial profile +help=Number of data points in the initial profile. +!kind=default +range=0:200 +sort-key=Panel-A04a +type=integer + +[namelist:initial_temperature=theta_surf] +compulsory=true +description=?????? +help=Value of temperature at z=0 +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real +warn-if=this <= 0.0 ; + +#============================================================================== +[namelist:initial_vapour] +compulsory=true +description=Initialisation of the water vapour field +help=Options for idealised initialisation of water vapour +!kind=default +ns=namelist/Job/Initial conditions/Vapour +sort-key=Section-A03 + +[namelist:initial_vapour=profile_data] +!bounds=namelist:initial_vapour=profile_size +compulsory=true +description=Initial vapour profile +help=Values specifying mixing ratio (kg/kg) of water vapour at heights specified + =in profile_heights. +!kind=default +length=: +range=0.0: +sort-key=Panel-A03 +type=real + +[namelist:initial_vapour=profile_heights] +!bounds=namelist:initial_vapour=profile_size +compulsory=true +description=Nodal heights for vapour profile +help=Heights, in metres, of nodes for specifying a vapour profile +!kind=default +length=: +range=0.0: +sort-key=Panel-A04 +type=real + +[namelist:initial_vapour=profile_size] +compulsory=true +description=Number of points in initial vapour profile +help=Number of data points in the initial profile +!kind=default +range=0:200 +sort-key=Panel-A02 +type=integer + +#============================================================================== +[namelist:initial_wind] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +ns=namelist/Job/Initial conditions/Wind +sort-key=Section-A04 + +[namelist:initial_wind=nl_constant] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +sort-key=Panel-A07 +type=real + +[namelist:initial_wind=profile] +compulsory=true +description=Initial wind profiles for GungHo and Transport Miniapp tests. +!enumeration=true +fail-if=this == "'sbr_with_vertical'" and namelist:base_mesh=geometry != "'spherical'" ; + =this == "'dcmip_101'" and namelist:base_mesh=geometry != "'spherical'" ; + =this == "'vertical_deformation'" and namelist:base_mesh=geometry != "'spherical'" ; + =this == "'four_part_sbr'" and namelist:base_mesh=geometry != "'spherical'" ; +help=Select the initial wind profiles for the GungHo and Transport miniapp test cases. + =Solid body rotation with vertical wind: Standard horizontal SBR with a vertical translation. + =DCMIP 2012 Test 1.1: From Kent et al. 2014, it uses the Nair-Lauritzen + =test 4 deformational flow in the horizontal, and a vertical translation. Ony suitable for spherical geometry. + =Vertical Deformational Flow: Uses the Nair-Lauritzen test 4 deformational flow in the + =longitude-height plane. Ony suitable for spherical geometry. +# Add help description of different values +sort-key=Panel-A01 +trigger=namelist:initial_wind=profile_data_u: 'pw_linear'; + =namelist:initial_wind=profile_data_v: 'pw_linear'; + =namelist:initial_wind=profile_data_w: 'pw_linear'; + =namelist:initial_wind=profile_heights_uv: 'pw_linear'; + =namelist:initial_wind=profile_heights_w: 'pw_linear'; + =namelist:initial_wind=profile_size_uv: 'pw_linear'; + =namelist:initial_wind=profile_size_w: 'pw_linear'; +value-titles=None, Solid body rotation, Solid body rotation-alt, Constant uv, Constant shear uv, + =Sin wave uv, DCMIP 3.0.1, Deep baroclinic-steady, Deep baroclinic-perturbed, + =NL case-1, NL case-2, NL case-3, NL case-4, xy NL case-1, yz NL case-1, + =Hadley like DCMIP, Vortex, + =Solid body rotation-Streamfunction, DCMIP 3.0.1-Streamfunction, Eternal fountain, + =Reversible curl free, Reversible divergence free, Vertical solid body rotation, + =Solid body rotation with vertical wind, DCMIP 2012 Test 1.1, Vertical Deformational Flow, + =Solid body rotation around sphere in four parts, + =Piecewise linear vertical profile +# PLEASE add coments to indicate which of these values should allowed given +# the value of namelist:idealised=test +# the value of the mesh geometry +values='none', 'solid_body_rotation', 'solid_body_rotation_alt', 'constant_uv', 'constant_shear_uv', + ='sin_uv','dcmip301', 'deep_baroclinic_steady', 'deep_baroclinic_perturbed', + ='NL_case_1', 'NL_case_2', 'NL_case_3', 'NL_case_4', 'xy_NL_case_1', 'yz_NL_case_1', + ='hadley_like_dcmip', 'vortex', 'sbr_streamfunction', 'dcmip301_streamfunction', 'eternal_fountain', + ='curl_free_reversible', 'div_free_reversible', 'rotational', + ='sbr_with_vertical','dcmip_101', 'vertical_deformation', 'four_part_sbr', 'pw_linear' + +[namelist:initial_wind=profile_data_u] +!bounds=namelist:initial_wind=profile_size_uv +compulsory=true +description=Initial u profile +help=Values specifying u component of wind (m/s) at heights specified + =in profile_heights. Linear interpolation is applied between the + =specified heights. +!kind=default +length=: +sort-key=Panel-A03 +type=real + +[namelist:initial_wind=profile_data_v] +!bounds=namelist:initial_wind=profile_size_uv +compulsory=true +description=Initial v profile +help=Values specifying v component of wind (m/s) at heights specified + =in profile_heights. Linear interpolation is applied between the + =specified heights. +!kind=default +length=: +sort-key=Panel-A03 +type=real + +[namelist:initial_wind=profile_data_w] +!bounds=namelist:initial_wind=profile_size_w +compulsory=true +description=Initial w profile +help=Values specifying w component of wind (m/s) at heights specified + =in profile_heights. Linear interpolation is applied between the + =specified heights. +!kind=default +length=: +sort-key=Panel-A03 +type=real + +[namelist:initial_wind=profile_heights_uv] +!bounds=namelist:initial_wind=profile_size_uv +compulsory=true +description=Nodal heights for profiles of horizontal wind +help=Heights, in metres, of nodes for specifying horizontal wind profiles +!kind=default +length=: +range=0.0: +sort-key=Panel-A04 +type=real + +[namelist:initial_wind=profile_heights_w] +!bounds=namelist:initial_wind=profile_size_w +compulsory=true +description=Nodal heights for profile of vertical wind +help=Heights, in metres, of nodes for specifying vertical wind profile +!kind=default +length=: +range=0.0: +sort-key=Panel-A04 +type=real + +[namelist:initial_wind=profile_size_uv] +compulsory=true +description=Size of horizontal wind profile data +help=Number of data points in the initial profiles for horizontal wind +!kind=default +range=1:200 +sort-key=Panel-A02 +type=integer + +[namelist:initial_wind=profile_size_w] +compulsory=true +description=Size of vertical wind profile data +help=Number of data points in the initial profile for vertical wind +!kind=default +range=1:200 +sort-key=Panel-A02 +type=integer + +[namelist:initial_wind=sbr_angle_lat] +#Units? Degrees radians []?? +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:initial_wind=sbr_angle_lon] +#Units? Degrees radians []?? +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +sort-key=Panel-A05 +type=real + +[namelist:initial_wind=shear] +compulsory=false +description=Shear value used to initialise wind +help=This value is used to initialise constant_shear_uv + =Wind profile is computed using: + =u(z) = u0*z/shear +!kind=default +sort-key=Panel-A09 +type=real + +[namelist:initial_wind=smp_init_wind] +compulsory=true +description=sample initial wind or not. +help=?????? + =?????? +!kind=default +sort-key=Panel-A08 +type=logical + +[namelist:initial_wind=u0] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +sort-key=Panel-A02 +type=real + +[namelist:initial_wind=v0] +compulsory=true +description=?????? +help=?????? + =?????? +!kind=default +sort-key=Panel-A03 +type=real + +[namelist:initial_wind=wavelength] +compulsory=false +description=Wavelength used in sin_uv wind profile +help=Wavelength for sin uv profile + =Wind profile is computed using: + =u(z) = u0*sin(2pi*k_z), where k_z = 2*pi/wavelength +!kind=default +sort-key=Panel-A10 +type=real + +[namelist:initial_wind=wind_time_period] +compulsory=true +description=?????? +fail-if=this < 0.0 ; +help=?????? + =?????? +!kind=default +range=0.0: +sort-key=Panel-A06 +type=real + +#============================================================================== +# Field Initialization +#============================================================================== +[namelist:initialization] +compulsory=true +description=Sets up options for field initialization +help=?????? + =?????? +ns=namelist/Job/IO/Field Initialisation +sort-key=sec-AAAA + +[namelist:initialization=ancil_option] +compulsory=true +description=Where from and how to process ancillary data +!enumeration=true +help=start_dump will process some ancillary information from the start dump. + = This is useful for aquaplanet runs. + = + =fixed will read the ancillary files and interpolate the data to the + = start date of the model, holding it fixed after this. + = This is typically how forecast runs are done. + = + =updating is as fixed, but will additionally update the ancillary data + = as the run progresses. + = This is typically how climate runs are done. +sort-key=01 +trigger=namelist:files=land_area_ancil_path: 'fixed', 'updating' ; + =namelist:files=orography_subgrid_ancil_path: 'fixed', 'updating' ; + =namelist:files=soil_ancil_path: 'fixed', 'updating' ; + =namelist:files=soil_rough_ancil_path: 'fixed', 'updating' ; + =namelist:files=aerosols_ancil_path: 'fixed', 'updating' ; + =namelist:files=plant_func_ancil_path: 'fixed', 'updating' ; + =namelist:files=sea_ancil_path: 'fixed', 'updating' ; + =namelist:files=sst_ancil_path: 'fixed', 'updating' ; + =namelist:files=snow_analysis_ancil_path: 'fixed', 'updating' ; + =namelist:files=sea_ice_ancil_path: 'fixed', 'updating' ; + =namelist:files=albedo_vis_ancil_path: 'fixed', 'updating' ; + =namelist:files=albedo_nir_ancil_path: 'fixed', 'updating' ; + =namelist:files=hydtop_ancil_path: 'fixed', 'updating' ; + =namelist:files=ozone_ancil_path: 'fixed', 'updating' ; + =namelist:files=surface_frac_ancil_path: 'fixed', 'updating' ; + =namelist:files=urban_ancil_path: 'fixed', 'updating' ; + =namelist:files=emiss_bc_biofuel_ancil_path: 'updating' ; + =namelist:files=emiss_bc_fossil_ancil_path: 'updating' ; + =namelist:files=emiss_bc_biomass_ancil_path: 'updating' ; + =namelist:files=emiss_bc_biomass_hi_ancil_path: 'updating' ; + =namelist:files=emiss_bc_biomass_lo_ancil_path: 'updating' ; + =namelist:files=emiss_c2h6_ancil_path: 'updating' ; + =namelist:files=emiss_c3h8_ancil_path: 'updating' ; + =namelist:files=emiss_c5h8_ancil_path: 'updating' ; + =namelist:files=emiss_ch4_ancil_path: 'updating' ; + =namelist:files=emiss_co_ancil_path: 'updating' ; + =namelist:files=emiss_dms_land_ancil_path: 'updating' ; + =namelist:files=dms_conc_ocean_ancil_path: 'updating' ; + =namelist:files=emiss_hcho_ancil_path: 'updating' ; + =namelist:files=emiss_me2co_ancil_path: 'updating' ; + =namelist:files=emiss_mecho_ancil_path: 'updating' ; + =namelist:files=emiss_meoh_ancil_path: 'updating' ; + =namelist:files=emiss_monoterp_ancil_path: 'updating' ; + =namelist:files=emiss_nh3_ancil_path: 'updating' ; + =namelist:files=emiss_no_ancil_path: 'updating' ; + =namelist:files=emiss_no_aircrft_ancil_path: 'updating' ; + =namelist:files=emiss_om_biofuel_ancil_path: 'updating' ; + =namelist:files=emiss_om_fossil_ancil_path: 'updating' ; + =namelist:files=emiss_om_biomass_ancil_path: 'updating' ; + =namelist:files=emiss_om_biomass_hi_ancil_path: 'updating' ; + =namelist:files=emiss_om_biomass_lo_ancil_path: 'updating' ; + =namelist:files=emiss_so2_low_ancil_path: 'updating' ; + =namelist:files=emiss_so2_high_ancil_path: 'updating' ; + =namelist:files=emiss_so2_nat_ancil_path: 'updating' ; + =namelist:files=h2o2_limit_ancil_path: 'updating' ; + =namelist:files=ho2_ancil_path: 'updating' ; + =namelist:files=no3_ancil_path: 'updating' ; + =namelist:files=o3_ancil_path: 'updating' ; + =namelist:files=oh_ancil_path: 'updating' ; + =namelist:files=soil_dust_ancil_path: 'fixed', 'updating' ; + =namelist:files=emiss_murk_ancil_path: 'fixed', 'updating' ; + =namelist:initialization=sst_source: 'fixed' ; + =namelist:files=ea_ancil_directory: 'updating' ; + =namelist:files=cloud_drop_no_conc_ancil_path: 'updating' ; + =namelist:files=easy_absorption_sw_ancil_path: 'updating' ; + =namelist:files=easy_extinction_sw_ancil_path: 'updating' ; + =namelist:files=easy_asymmetry_sw_ancil_path: 'updating' ; + =namelist:files=easy_absorption_lw_ancil_path: 'updating' ; + =namelist:files=easy_extinction_lw_ancil_path: 'updating' ; + =namelist:files=easy_asymmetry_lw_ancil_path: 'updating' ; + =namelist:files=gas_mmr_ancil_path: 'idealised' ; +values='none', 'start_dump', 'fixed', 'updating', 'idealised' + +[namelist:initialization=coarse_aerosol_ancil] +compulsory=true +description=Whether to read in aerosol ancil on coarse mesh +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A12a +trigger=namelist:files=coarse_ancil_directory: .true. +type=logical + +[namelist:initialization=coarse_orography_ancil] +compulsory=true +description=Whether to read in orography on coarse mesh +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A13 +trigger= +type=logical + +[namelist:initialization=coarse_ozone_ancil] +compulsory=true +description=Whether to read in ozone ancil on coarse mesh +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A12b +trigger=namelist:files=coarse_ancil_directory: .true. +type=logical + +[namelist:initialization=init_option] +compulsory=true +description=Choice for initialization of model fields +!enumeration=true +!fail-if=this='checkpoint_dump' and namelist:io=checkpoint_read==.false. +help=Choose how to initialize the model fields: + = 'analytic' : Initialization is taken from analytic fields. See + = the appropriate related namelists for choices available. + = 'checkpoint_dump' : Initialize the model from a checkpoint from a previous + =lfric run. + = 'fd_start_dump' : Initialize fields from a start dump file on disk. + =The data in this file will be used to populate finite + =difference fields, i.e. physics fields from which the + =model will run. + = 'fe_start_dump' : Initialize fields from a start dump file on disk. The + =data in this file will be used to populate finite element + =fields, i.e. gungho dynamics fields from which the model + =will run. NOT CURRENTLY IMPLEMENTED +sort-key=02 +trigger=namelist:initialization=model_eos_height: 'fd_start_dump', 'fe_start_dump' +values='analytic', 'checkpoint_dump', 'fd_start_dump', 'fe_start_dump' + +[namelist:initialization=lbc_option] +compulsory=true +description=Choice of which lateral boundary conditions to read in. +!enumeration=true +fail-if=this=='gungho_file' and namelist:boundaries=limited_area !="'.true.'" ; + =this=='um2lfric_file' and namelist:boundaries=limited_area !="'.true.'" ; + =this=='analytic' and namelist:boundaries=limited_area !="'.true.'" +help=Currently support is only available for: + ='none', 'analytic','gungho_file', 'um2lfric_file' +sort-key=03 +trigger=namelist:files=lbc_directory: 'file', 'gungho_file', 'um2lfric_file'; + =namelist:files=lbc_filename: 'gungho_file', 'um2lfric_file' ; +values='none', 'analytic', 'gungho_file', 'um2lfric_file' + +[namelist:initialization=ls_option] +compulsory=true +description=Choice of which linearisation state. +!enumeration=true +help=Currently support is only available for: + ='none', 'analytic','file' +sort-key=04 +trigger=namelist:files=ls_directory: 'file' ; + =namelist:files=ls_filename: 'file' ; +values='none', 'analytic', 'file' + +[namelist:initialization=model_eos_height] +compulsory=true +!default=kind +description=Exner initialisation height for the initial conditions [%]. +help=The value is an integer percentage of the atmospheric depth before any application of orography. + =It is used to determine the atmospheric layer/level at which to begin Exner profile initialisation + =for the initial conditions. The Equation of State (EoS) is satisfied at the resulting layer + =where Exner initialisation begins. + = + =To initialise an Exner vertical profile, the Equation of state (EoS) is first used + =to calculate Exner on a single vertical layer L using density and temperature. + =This vertical layer L is the nearest layer to (model_eos_height/100)*total_height. + =Then hydrostatic balance is used to integrate from this layer to the top of the atmosphere, + =and similarly to the bottom of the atmosphere. + = + =If model_eos_height=0, the initial layer is 1 so the EoS is solved for the bottom layer + =and then hydrostatic balance is used to integrate upwards to the top of the model. + =If model_eos_height=100, the initial layer is number_of_layers, so the EoS is solved for the + =top layer, and then hydrostatic balance is used to integrate downwards to the bottom of the model. + = + =It is also possible to use any value between 0 and 100, so that hydrostatic balance is + =used to integrate both upwards and downwards. +range=0:100 +sort-key=02a +type=integer + +[namelist:initialization=n_orog_smooth] +compulsory=true +description=Number of passes of a 1-2-1 smoothing filter applied to the orography. +fail-if=this != "0" and namelist:boundaries=limited_area =="'.false.'" ; +help=Smoothing is only available to limited area (lat/lon non-periodic mesh) models. +!kind=default +range=0: +sort-key=Panel-A07 +type=integer + +[namelist:initialization=read_w2h_wind] +compulsory=true +!default=kind +description=Horizontal winds are read in on a W2h space from a start dump. If + = false, then cell-centres (W3), co-located winds are assumed. +help=Horizontal winds are read in on a W2h space from a start dump. If + = false, then cell-centres (W3), co-located winds are assumed. +sort-key=02b +type=logical + +[namelist:initialization=sea_ice_source] +compulsory=true +description=Where to read the sea ice fields from +!enumeration=true +help=The sea ice fraction (and thickness if amip_ice_thick is false) can either be read from an static ancillary file + = (typical in climate runs or NWP forecasts using an analysis file), or from a SURF derived ancillary file + = To use a SURF produced ancillary-style file, select `surf` else just `ancillary` + = + =The iodef file must be consistent with this setting, specifying + = seaice from either a static ancillary file or a SURF-derived ancillary file. +sort-key=01a +values='ancillary', 'surf' + +[namelist:initialization=snow_source] +compulsory=true +description=Where to read the snow fields from +!enumeration=true +help=The snow fields can be read either from the start dump, or from an ancillary, for example SURF analysis. + =To use the start_dump select `start_dump` else `surf` for SURF snow analysis. + = + =The iodef file must be consistent with this setting, specifying the snow fields in their own ancillary file. +sort-key=01c +trigger=namelist:files=snow_analysis_ancil_path: 'surf'; +values='start_dump','surf' + +[namelist:initialization=sst_source] +compulsory=true +description=Where to read the sea-surface temperature from +!enumeration=true +help=The sea-surface temperature can either be read from an ancillary file + = (typical in climate runs or NWP forecasts using an analysis file), + = or from the start dump (typical for downscaling models). + = To use a SURF produced ancillary-style file, select `surf` else just `ancillary` + = + =The iodef file must be consistent with this setting, specifying + = tstar_sea from either type of ancillary file or as part of the start dump. +sort-key=01b +values='ancillary','start_dump','surf' + +[namelist:initialization=w0_orography_mapping] +compulsory=true +description=Whether to map orography between meshes using W0 mapping rather than W3 +help= +!kind=default +ns=namelist/Science/Dynamics +sort-key=Panel-A14 +type=logical + +[namelist:initialization=zero_w2v_wind] +compulsory=true +description=Zero vertical DoFs of initial wind field +help=If true then zero the vertical DoFs of the initial wind field +!kind=default +sort-key=02c +type=logical + +#============================================================================== +# IO +#============================================================================== +[namelist:io=diag_active_files] +compulsory=true +description=List of IDs of active diagnostics output files for use in dynamic sampling. +fail-if= +help=Include the ID of any active diagnostics file in this list. +length=: +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A05 +!string_length=filename +trigger= +type=character + +[namelist:io=diag_always_on_sampling] +compulsory=true +description=Force field sampling status to always true for backwards compatibility and for testing. + =Setting it to false is an optimisation and will not affect the production of diagnostics. +fail-if= +help=Set to true for backwards compatible diagnostics and for testing dynamic sampling. +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A05 +trigger= +type=logical + +[namelist:io=multifile_io] +compulsory=true +description=Use multifile IO functionality +!kind=default +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A05 +type=logical + +[namelist:io=write_conservation_diag] +compulsory=true +description=Enable write of conservation diagnostics for masses, energy and axial ang. mom. +help=Writes out conservation diagnostics to the job log. These are the totals of + =dry mass, energy and axial angular momentum. In the presence of moisture, + =the total mass of each species of moisture is also written out as well as + =the masses of water associated with fluxes from precipitation and the boundary layer. +!kind=default +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A05 +type=logical + +[namelist:io=write_diag] +trigger=namelist:io=diagnostic_frequency: .true. ; + =namelist:io=nodal_output_on_w3: .true. ; + =namelist:io=write_minmax_tseries: .true. ; + =namelist:files=diag_stem_name: .true. ; + +[namelist:io=write_dump] +compulsory=true +description=Enable dump of a field +help=Write a dump of a field +!kind=default +ns=namelist/Job/IO/Dumping +sort-key=A-001 +type=logical + +[namelist:io=write_fluxes] +compulsory=true +description=Write out fluxes for vector fields +help=In addition to outputting u1,u2 and u3, output fluxes on w2h and wtheta +!kind=default +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A04 +type=logical + +[namelist:io=write_minmax_tseries] +compulsory=true +description=Enable write of maxima and minima + =of fields for time-series. +help=Writes out a min/max of fields to text file +!kind=default +ns=namelist/Job/IO/Diagnostics +sort-key=Panel-A05 +type=logical + +#============================================================================== +# OUTER SOLVER +#============================================================================== +[namelist:mixed_solver] +compulsory=true +description=?????? +help=This namelist is for the mixed (outer) si solver +ns=namelist/Science/Dynamics/mixed_solver +sort-key=Section-A07 +title=Outer solver + +[namelist:mixed_solver=eliminate_variables] +compulsory=true +description=Eliminate the density and potential temperature from the mixed solver. +!enumeration=true +help=Eliminate the density and potential temperature from the mixed solver using + =either discrete or analytic elimination. See solver documentation of + =https://code.metoffice.gov.uk/trac/lfric/wiki/GhaspSupport/Documentation + =for further details. +!kind=default +sort-key=Panel-A07 +value-titles=Discrete, Analytic +values='discrete', 'analytic' + +[namelist:mixed_solver=fail_on_non_converged] +compulsory=true +description=Cause the solver to return an error if the maximum number of iterations are reached and + =residual has not been reduced below the desired tolerance otherwise the solver will exit even + =if it has not converged. If monitor_convergence is set to false then this setting has no effect +help=Return an error if solver fails to converge +sort-key=Panel-A07 +type=logical + +[namelist:mixed_solver=gcrk] +compulsory=true +description=?????? +help=Dimension of the approximate Krylov subspace. + =In other words, it is the number of potential + =residual vectors to calculate at each + =iteration of the solver. +!kind=default +sort-key=Panel-A05 +type=integer + +[namelist:mixed_solver=guess_np1] +compulsory=true +description=?????? +help=Guess values for theta, rho and exner n+1 in inner loop +!kind=default +sort-key=Panel-A06 +type=logical + +[namelist:mixed_solver=jacobi_relaxation] +compulsory=true +description=?????? +help=Relaxtion factor to use in the Jacobi solver +!kind=default +sort-key=Panel-A11 +type=real + +[namelist:mixed_solver=mixed_solver_a_tol] +compulsory=true +description=Sets the absolute tolerance of semi-implicit solver. +help=Absolute tolerance of semi-implicit solver + =Safe value is (\f$10^{-6}\f$), but optimal value may depend + =on model configuration. +!kind=default +range=0:1 +sort-key=Panel-A02 +type=real + +[namelist:mixed_solver=monitor_convergence] +compulsory=true +description=Computes and prints out convergence information for the iterative solver and if the + =error has been reduced below the tolerance then the solver will exit. If set to false + =the solver will always perform the maximum number of iterations before exiting +help=Monitor convergence of the iterative mixed solver +sort-key=Panel-A06 +trigger=namelist:mixed_solver=fail_on_non_converged: .true.; +type=logical + +[namelist:mixed_solver=normalise] +compulsory=true +description=?????? +help=Normalise matrix so diagonal is 1 +!kind=default +sort-key=Panel-A08 +type=logical + +[namelist:mixed_solver=reference_reset_time] +compulsory=true +description=The elapsed time (in seconds) between computations of the semi-implicit operators + =for the mixed solve with an updated reference state.This reset time is then divided + =by the timestep and rounded to the nearest integer to determine if the operators + =need to be recomputed. +help=Time passed (in seconds) to reset reference state +!kind=default +sort-key=Panel-A07 +type=real + +[namelist:mixed_solver=si_maximum_iterations] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=Iteration limit for si solver +!kind=default +range=1: +sort-key=Panel-A04 +type=integer + +[namelist:mixed_solver=si_method] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +!kind=default +sort-key=Panel-A01 +trigger=namelist:mixed_solver=jacobi_relaxation: this == "'jacobi'"; +value-titles=biconjugate gradient stabilized, + =conjugate gradient, + =generalized conjugate residual, + =generalized conjugate residual(block form), + =generalized minimal residual, + =flexible generalized minimal residual, + =precondition only, + =jacobi +values='bicgstab', 'cg', 'gcr', 'block_gcr', 'gmres', 'fgmres', 'prec_only', 'jacobi' + +[namelist:mixed_solver=si_preconditioner] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +!kind=default +sort-key=Panel-A03 +value-titles=None, Diagonal, Pressure +values='none', 'diagonal', 'pressure' + +[namelist:mixed_solver=si_tolerance] +compulsory=true +description=?????? +help=Relative tolerance of semi-implicit solver +!kind=default +sort-key=Panel-A02 +type=real + +[namelist:mixed_solver=split_w] +compulsory=true +description=Split vertical and horizontal components of velocity field in solve +help=??? +!kind=default +sort-key=Panel-A06 +type=logical + +[namelist:mixing] +compulsory=true +description=Subgrid mixing scheme options +help=Currently available schemes are: + =_________________________________________________________________ + =Constant viscosity: + = applied to theta & u, v, w + =_________________________________________________________________ + =Smagorinsky mixing scheme: + = applied to theta, moisture (water vapour and cloud liquid), + = u, v and w + =_________________________________________________________________ + =Vertical Leonard terms: + = turbulent vertical fluxes due to the Leonard terms + = calculated for liquid water temperature, total water content, + = u, v and w + = This scheme can be used with the Smagorinsky mixing scheme + = +!kind=default +ns=namelist/Science/Dynamics/Mixing +sort-key=Section-A05 + +[namelist:mixing=leonard_kl] +compulsory=true +description=Leonard term parameter +help=Scales the Leonard term fluxes applied to winds and scalars. + = A value of 1.0 yields just the Leonard term. + = + = Values in the range 1-6 are justified, as Moeng et al (2010) + = found that a significant fraction of other turbulent flux terms are + = highly correlated with the Leonard term. +!kind=default +sort-key=Panel-A07 +type=real + +[namelist:mixing=leonard_term] +compulsory=true +description=Enable vertical Leonard terms +help=Calculate turbulent vertical fluxes due to Leonard terms, + = as described in Moeng et al (2010). + = + = Fluxes are calculated for: + = Liquid water temperature + = Total water content + = u, v and w + = +!kind=default +sort-key=Panel-A06 +trigger=namelist:mixing=leonard_kl: .true. ; +type=logical + +[namelist:mixing=method] +compulsory=true +description=Smagorinsky subgrid mixing scheme option +!enumeration=true +help=Options for Smagorinsky subgrid mixing scheme: + =_________________________________________________________________ + =3D Smag + = Smagorinsky mixing scheme applied in horizontal and vertical. + =_________________________________________________________________ + =2D Smag + 1D BL + = Smagorinsky mixing scheme applied in horizontal. + = 1D BL scheme used in the vertical. + =_________________________________________________________________ + =Blended scheme + Smag above + = Blended BL-Smagorinsky diffusion coefficient used for + = subgrid mixing in horizontal and vertical. + = Relaxes to 3D Smagorinsky above BL + =_________________________________________________________________ + =Blended scheme + 1D BL above + = As above, but relaxes to 1D BL above BL + = + = WARNING: This option currently does not conserve energy and as + = a result may be unstable. +sort-key=Panel-A05 +value-titles=3D Smagorinsky, 2D Smagorinsky + 1D BL, Blended scheme + Smag above, Blended scheme + 1D BL above +values='3d_smag', '2d_smag', 'blend_smag_fa','blend_1dbl_fa' + +[namelist:mixing=mix_factor] +compulsory=true +description=Smagorinsky mixing length constant +help=Smagorinsky mixing length constant, typical value is 0.2 +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:mixing=smag_l_calc] +compulsory=true +description=Choice of Smagorinsky mixing length calculation +!enumeration=true +help=Option within the Smagorinsky subgrid mixing scheme to use either + =Dx (the mininum of the cell horizontal edge lengths) as the length + =scale or a 3d geometric mean, L=(Dx*Dx*Dz)^1/3 +sort-key=Panel-A05 +value-titles=Use Dx, Use 3D geometric mean +values='UseDx','use_geo' + +[namelist:mixing=smagorinsky] +compulsory=true +description=Enable Smagorinsky mixing +help=Apply Smagorinsky mixing to theta, + = moisture (water vapour and cloud liquid), u, v and w + = + = NOTE: As in the current UM implementation of Smagorinsky mixing, + = the stress terms have been implemented purely as diffusion terms. + = This results in a missing term, as described in UMDP28. + = + = WARNING: Current implementation assumes a Cartesian mesh. +!kind=default +sort-key=Panel-A03 +trigger=namelist:mixing=method: .true. ; + =namelist:mixing=mix_factor: .true. ; + =namelist:mixing=smag_l_calc: .true. ; + =namelist:physics=smagorinsky_placement: .true. ; +type=logical + +#============================================================================== +# MIXING: Namelist Members +#============================================================================== +[namelist:mixing=viscosity] +compulsory=true +description=?????? +help=Apply constant viscosity to theta & u, v, w +!kind=default +sort-key=Panel-A01 +type=logical + +[namelist:mixing=viscosity_mu] +compulsory=true +description=?????? +help=Viscosity constant to use +!kind=default +sort-key=Panel-A02 +type=real + +#============================================================================== +# MULTIRESOLUTION COUPLING (e.g. Physics-Dynamics-Chemistry) +#============================================================================== +[namelist:multires_coupling] +compulsory=false +description=This namelist specifies options for running different model + =components on different meshes +help=This namelist provides different modes and meshes for running the coupling + =miniapp +ns=namelist/Science/Dynamics/multires_coupling +sort-key=Section-A07 +title=Multires-Coupling + +[namelist:multires_coupling=aerosol_mesh_name] +compulsory=false +description=Name of the mesh used for reading in aerosol data. May also be used + =for transporting aerosols. +help=Aerosols are read in (and possibly transported) on this mesh +sort-key=Panel-A03 +!string_length=default +type=character + +[namelist:multires_coupling=coarse_aerosol_transport] +compulsory=false +description=Whether to transport aerosols on the aerosol mesh +help=If this is set to true, aerosols will be transported on the coarse aerosol + =mesh. Otherwise they will be transported on the dynamics mesh. +!kind=default +sort-key=Section-A03b +type=logical + +[namelist:multires_coupling=coarse_rad_aerosol] +compulsory=true +description=Whether to run RADAER, the Jones CDNC calculation, and the + =stratospheric aerosol climatology on a coarse mesh. Resolution of the + =mesh is that of aerosol_mesh_name +help= +!kind=default +sort-key=Section-A08 +type=logical + +[namelist:multires_coupling=dynamics_mesh_name] +compulsory=false +description=Tag-name for mesh used by dynamics +help=This is the mesh on which the dynamical core is run +sort-key=Panel-A02 +!string_length=default +type=character + +[namelist:multires_coupling=lowest_order_aero_flag] +compulsory=false +description=Forces the mapping of aerosol related fields to be lowest order, even if + =recovery_order is set to linear. +help=If this is set to true, aerosols will be mapped using low order mapping. + =If recovery_order is constant and this is set to false, the mapping will still be + =lowest order. But if recovery_order is linear and this is false, the mapping will + =be linear +!kind=default +sort-key=Section-A06b +type=logical + +[namelist:multires_coupling=multires_coupling_mesh_tags] +compulsory=false +description=List of mesh tag-names for the meshes used in the coupling miniapp +help=This is an ordered list of mesh names as loaded from the mesh + =input file for the coupling miniapp. It is expected that the mesh + =input file will contain the required intergrid maps between the meshes +length=: +sort-key=Panel-A01 +!string_length=default +type=character + +[namelist:multires_coupling=multires_coupling_mode] +compulsory=false +description=Describes the mode in which the coupling miniapp will be run +!enumeration=true +help=Test - a simple test case to test miniapp capabilities + =Jnr-Snr - dynamics and physics at a fine resolution coupled + =with dynamics, physics and chemistry at a coarse resolution + =Physics-Dynamics - physics and dynamics run at different resolutions + =and coupled together +sort-key=Panel-A04 +value-titles=Test, Jnr-Snr, Physics-Dynamics +values='test', 'jnr_snr', 'physics_dynamics' + +[namelist:multires_coupling=negative_correction] +compulsory=false +description=The type of correction to apply to intermesh mappings to prevent + =generation of negative values. +!enumeration=true +help=none - Map tracer variables without a mapping correction + =one_by_one - Each tracer is mapped with its own correction factor + =consistent - Variables of the same type, such as moisture variables or + = aerosols, are all given the same correction factor +sort-key=Panel-A05 +value-titles=none, one_by_one, consistent +values='none', 'one_by_one', 'consistent' + +[namelist:multires_coupling=orography_mesh_name] +compulsory=false +description=Name of the mesh used for reading in orography data +help=Orography is read in on this mesh +sort-key=Panel-A04 +!string_length=default +type=character + +[namelist:multires_coupling=physics_mesh_name] +compulsory=false +description=Tag-name for mesh used by physics +help=This is the mesh on which the physics parametrisations are run +sort-key=Panel-A03 +!string_length=default +type=character + +[namelist:multires_coupling=reconstruction] +compulsory=false +description=The strategy for the reconstruction used in the prolongation of + =scalar variables from coarse to fine meshes. +!enumeration=true +help=simple - simple reconstruction, performing a simple interpolation + = from neighbouring values. + =reversible - first performs the simple reconstruction, before adjusting + = it to make the prolongation process reversible with respect + = to the restriction operator. +sort-key=Panel-A06 +value-titles=simple, reversible +values='simple', 'reversible' + +[namelist:multires_coupling=recovery_order] +compulsory=false +description=The order of reconstruction to use when performing prolongation of + =scalar fields. +!enumeration=true +help=constant : injection, 0th order. + =linear : linear. +!kind=default +sort-key=Panel-A07 +value-titles=constant, linear +values='constant', 'linear' + +#============================================================================== +# ORBIT +#============================================================================== +[namelist:orbit] +compulsory=true +description=Orbital elements +ns=namelist/Model/Planet/Orbit +sort-key=Section-A05 +title=Orbit + +[namelist:orbit=arg_periapsis] +compulsory=true +description=Argument of periapsis [radians] +help=The angle between the ascending node and the periapsis (anticlockwise). + = + =The ascending node in this context is the point in the orbit where the + =planet passes through its autumn equinox for the northern hemisphere. + =The direction from the star to planet at this point in the orbit is the + =zero of the reference frame used here for the orbital elements. + =This direction is also where the host star appears in the sky as viewed + =from the planet at its northern hemisphere spring equinox. For the Earth + =this is known as the First Point of Aries. + =(Note, for a planet with zero obliquity, this zero direction is + =arbitrarily defined.) + = + =The periapsis is the point of closest approach in the planet's + =elliptical orbit. For a circular orbit it is undefined + =(can be set to zero.) + = + =As we are using the ascending node as the zero point for the reference + =frame here, then by definition, the longitude of the ascending node is + =zero, and the argument of periapsis is equal to the longitude of + =periapsis. For a planet around the sun this is known as the longitude + =of perihelion. +sort-key=Panel-A06 +type=real + +[namelist:orbit=arg_periapsis_inc] +compulsory=true +description=Increment to the argument of periapsis + =per Julian day from epoch [radians/day] +sort-key=Panel-A07 +type=real + +[namelist:orbit=eccentricity] +compulsory=true +description=Orbital Eccentricity [unitless] +help=The orbital eccentricity determines the amount by which the orbit + =deviates from a perfect circle. A value of 0 is a circular orbit, + =values between 0 and 1 form an elliptic orbit, 1 is a parabolic + =escape orbit, and greater than 1 is a hyperbola. +range=0.0:1.0 +sort-key=Panel-A04 +type=real + +[namelist:orbit=eccentricity_inc] +compulsory=true +description=Increment to eccentricity + =per Julian day from epoch [/day] +sort-key=Panel-A05 +type=real + +[namelist:orbit=elements] +compulsory=true +description=Orbital parameters +!enumeration=true +help=Parameters for the planet's orbit may be user-defined + =or given by the following presets: + =_________________________________________________________________ + =Earth: Fixed + = A standard Earth orbit that does not vary from one year to the next. + = The day number of the passage through perihelion is set to a mean + = value for the years 1995-2005. + = As the orbit is reset at the beginning of each year there will be a + = slight discontinuity in the orbital position. The epoch used is + = therefore always midday on the first day of the current year. + = The orbital elements used are taken from JPL and the Astronomical + = Almanac (1984) and equivalent to: + = eccentricity = 1.6710222E-02 + = eccentricity_inc = 0.0 + = arg_periapsis = 1.796767421 + = arg_periapsis_inc = 0.0 + = obliquity = 0.409092804 + = obliquity_inc = 0.0 + = semimajor_axis = 1.0 + = semimajor_axis_inc = 0.0 + = mean_anomaly = -0.037278428 + = mean_anomaly_inc = 0.01720278179 + = hour_angle = 0.0 + =_________________________________________________________________ + =Earth: Secular variation + = An Earth orbit with secular variations of the orbital elements + = described by A. L. Berger (1978), J. Atm. Sci., vol 35, p. 2362. + = These use higher order terms than the simple linear increments + = available with the user defined orbital elements. +sort-key=Panel-A01 +trigger=namelist:orbit=epoch: 'user' ; + =namelist:orbit=eccentricity: 'user' ; + =namelist:orbit=eccentricity_inc: 'user' ; + =namelist:orbit=arg_periapsis: 'user' ; + =namelist:orbit=arg_periapsis_inc: 'user' ; + =namelist:orbit=obliquity: 'user' ; + =namelist:orbit=obliquity_inc: 'user' ; + =namelist:orbit=semimajor_axis: 'user' ; + =namelist:orbit=semimajor_axis_inc: 'user' ; + =namelist:orbit=mean_anomaly: 'user' ; + =namelist:orbit=mean_anomaly_inc: 'user' ; + =namelist:orbit=hour_angle: 'user' ; +value-titles=User defined, Earth: Fixed, Earth: Secular variation +values='user', 'earth_fixed', 'earth_secular_variation' + +[namelist:orbit=epoch] +compulsory=true +description=Reference date in Julian Days [days] +help=The Julian day number on which the specified orbital elements + =apply. The increments are then the change in these orbital + =elements per Julian day from the given epoch. + = + =The J2000 epoch is specified by the Julian day number 2451545.0 + =which equates to midday on the 1st January 2000. +sort-key=Panel-A03 +type=real + +[namelist:orbit=fixed_azimuth_angle] +compulsory=true +description=Fixed stellar azimuth angle + =measured clockwise from north [radians] +help=This is an idealised setting where the solar / stellar azimuth angle + =will be the same for all points in the model. This overrides the + =angles calculated from the orbital elements but retains the distance + =of the planet from the host star. +sort-key=Panel-A17 +type=real + +[namelist:orbit=fixed_zenith_angle] +compulsory=true +description=Fixed stellar zenith angle for all points + =[radians] +help=This is an idealised setting where the solar / stellar zenith angle + =will be the same for all points in the model. This overrides the + =angles calculated from the orbital elements but retains the distance + =of the planet from the host star. +sort-key=Panel-A16 +type=real + +[namelist:orbit=hour_angle] +compulsory=true +description=Hour angle at epoch [radians] +help=The fraction of the planet's day since the host star was over + =the planet's prime meridian expressed as a fraction of a circle + =in radians. For the Earth, this is the angle the Sun has moved + =westwards since solar noon. + = + =This is the hour angle at the time of the given epoch. +sort-key=Panel-A14 +type=real + +[namelist:orbit=hour_angle_inc] +compulsory=true +description=Increment to hour angle + =per Julian day from epoch [radians/day] +help=This equates to 2*pi times the length of the planet's day over the + =length of a Julian day. +sort-key=Panel-A15 +type=real + +[namelist:orbit=mean_anomaly] +compulsory=true +description=Mean anomaly at epoch [radians] +help=The fraction of the orbital period since passage through periapsis + =expressed as a fraction of a circle in radians. If the orbit were + =completely circular then this would describe the actual angular + =position of the planet in the orbit (the true anomaly). + = + =This is the mean anomaly at the time of the given epoch. +sort-key=Panel-A12 +type=real + +[namelist:orbit=mean_anomaly_inc] +compulsory=true +description=Increment to mean anomaly + =per Julian day from epoch [radians/day] +help=This equates to 2*pi over the orbital period in Julian days. +sort-key=Panel-A13 +type=real + +[namelist:orbit=obliquity] +compulsory=true +description=Obliquity of the orbit [radians] +help=The angle between the rotational axis of the planet and the orbital axis, + =where the direction is defined so the rotation is in the same sense (i.e. + =anticlockwise). +sort-key=Panel-A08 +type=real + +[namelist:orbit=obliquity_inc] +compulsory=true +description=Increment to obliquity of the orbit + =per Julian day from epoch [radians/day] +sort-key=Panel-A09 +type=real + +[namelist:orbit=observer_lat] +compulsory=true +description=Orbital latitude of observer [radians] +help=Describes the angle from the plane of the planet's orbit to the + =position of a distant observer. Used for the calculation of diagnostics. +sort-key=Panel-A19 +type=real + +[namelist:orbit=observer_lon] +compulsory=true +description=Orbital longitude of observer [radians] +help=Describes the orbital angle (anticlockwise) from the ascending node + =of the planet's orbit to the position of a distant observer. Used + =for the calculation of diagnostics. +sort-key=Panel-A18 +type=real + +[namelist:orbit=semimajor_axis] +compulsory=true +description=Semi-major axis [AU] +help=One half of the major axis of the orbit, equivalent to the average + =between the orbital distance at periapsis and apoapsis (perihelion + =and aphelion for orbits around the Sun). For the Earth this was + =originally defined as 1 AU (astronomical unit), but 1 AU is now + =defined as exactly 149597870700 metres. +sort-key=Panel-A10 +type=real + +[namelist:orbit=semimajor_axis_inc] +compulsory=true +description=Increment to semi-major axis + =per Julian day from epoch [AU/day] +sort-key=Panel-A11 +type=real + +[namelist:orbit=spin] +compulsory=true +description=Treatment of stellar motion + =from planet's surface +!enumeration=true +help=The change in the hour angle of the sun as viewed from the + =planet's surface over the course of the day. + =This may be user defined or given by the following presets: + =_________________________________________________________________ + =Earth Day + = hour_angle_inc = exactly 2*pi + = The sun appears to make a full circuit in exactly one Earth day. + = This setting avoids any numerical drift due to an inexact user + = setting of 2*pi. + =_________________________________________________________________ + =Fixed Sun + = The position of the sun in the sky is fixed for all points. + = The solar zenith and azimuth angles are user supplied. +sort-key=Panel-A02 +trigger=namelist:orbit=hour_angle_inc: 'user' ; + =namelist:orbit=fixed_zenith_angle: 'fixed_sun' ; + =namelist:orbit=fixed_azimuth_angle: 'fixed_sun' ; +value-titles=User defined, Earth Day, Fixed Sun +values='user', 'earth_day', 'fixed_sun' + +#============================================================================== +# OROGRAPHY +#============================================================================== +[namelist:orography] +compulsory=true +description=Settings for the selected analytic orography profiles. +help=Settings for the Schar, Witch-of-Agnesi, Bell-shaped and DCMIP 2.0.0 analytic + =orography profiles in Cartesian and spherical coordinates + = (only spherical for DCMIP 2.0.0 profile, two bell-shaped mountains for spherical). +ns=namelist/Model/Planet/Orography +sort-key=Panel-A02 + +[namelist:orography=orog_init_option] +compulsory=true +description=Choice for initialization of orography fields +!enumeration=true +fail-if=this=='analytic' and namelist:orography=profile=="'none'" ; + =this=='ancil' and namelist:io=use_xios_io==".false." + =this=='start_dump' and namelist:io=use_xios_io==".false." +help=Choose how to initialize the orography fields: + = 'analytic' : Initialization is performed analytically. Profile must be + = set in the orography namelist option. + = 'ancil' : Initialize the orography from an ancillary file. Must be + = used with xios. + = 'start_dump' : Initialise the orography from the um2lfric start dump. +sort-key=Panel-A02 +trigger=namelist:files=orography_mean_ancil_path: 'ancil' ; + =namelist:orography=profile: 'analytic' ; + =namelist:extrusion=stretching_method: this != 'none'; +values='none', 'analytic', 'ancil','start_dump' + +[namelist:orography=profile] +compulsory=true +description=orography profile +!enumeration=true +fail-if=this == "'dcmip200'" and namelist:base_mesh=geometry != "'spherical'" ; + =this == "'none'" and namelist:orography=orog_init_option == "'analytic'" ; +help=none : No orography (flat surface) + =schar : Schar mountain profile + =agnesi : Witch-of-Agnesi mountain profile + =dcmip200 : DCMIP 2.0.0 mountain orography + =bell : Bell-shaped mountain profile +sort-key=Panel-A02 +trigger=namelist:orography_agnesi_cartesian: 'agnesi' ; + =namelist:orography_agnesi_spherical: 'agnesi' ; + =namelist:orography_bell_cartesian: 'bell' ; + =namelist:orography_bell_spherical: 'bell' ; + =namelist:orography_dcmip200_spherical: 'dcmip200' ; + =namelist:orography_schar_cartesian: 'schar' ; + =namelist:orography_schar_spherical: 'schar' ; +value-titles=None, Agnesi, Bell-shaped, Schar, DCMIP 2.0.0 +values='none', 'agnesi', 'bell', 'schar', 'dcmip200' + +#============================================================================== +# OROGRAPHY (AGNESI CARTESIAN) +#============================================================================== +[namelist:orography_agnesi_cartesian] +compulsory=true +description=Witch-of-Agnesi orography profile in Cartesian coordinates. +help=Settings for analytic orography profile of Witch-of-Agnesi mountain function + =in Cartesian biperiodic domain in x and/or y directions. + =Reference: Melvin et al. (2010), Section 4.3. +ns=namelist/Model/Planet/Agnesi cartesian +sort-key=Section-A03 +title=Agnesi cartesian profile + +[namelist:orography_agnesi_cartesian=direction] +compulsory=true +description=Direction of mountain (x, y, or xy) +!enumeration=true +help=See Melvin et al. (2010), Section 4.3. for the analytic form. +!kind=default +sort-key=Panel-A06 +value-titles=x, y, xy +values='x', 'y', 'xy' + +[namelist:orography_agnesi_cartesian=half_width_x] +compulsory=true +description=Half-width of mountain in x direction [m] +fail-if=this < 0.0 +help=See Melvin et al. (2010), Section 4.3. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:orography_agnesi_cartesian=half_width_y] +compulsory=true +description=Half-width of mountain in y direction [m] +fail-if=this < 0.0 +help=See Melvin et al. (2010), Section 4.3. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A03 +type=real + +[namelist:orography_agnesi_cartesian=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Melvin et al. (2010), Section 4.3. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:orography_agnesi_cartesian=x_centre] +compulsory=true +description=x coordinate of mountain centre [m] +help=See Melvin et al. (2010), Section 4.3. for the analytic form. +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:orography_agnesi_cartesian=y_centre] +compulsory=true +description=y coordinate of mountain centre [m] +help=See Melvin et al. (2010), Section 4.3. for the analytic form. +!kind=default +sort-key=Panel-A05 +type=real + +#============================================================================== +# OROGRAPHY (AGNESI SPHERICAL) +#============================================================================== +[namelist:orography_agnesi_spherical] +compulsory=true +description=Witch-of-Agnesi orography profile in spherical coordinates. +help=Settings for analytic orography profile of Witch-of-Agnesi mountain function + =in spherical domain. Reference: Wedi and Smolarkiewicz (2009), Section 4.1. +ns=namelist/Model/Planet/Agnesi spherical +sort-key=Section-A03 +title=Agnesi spherical profile + +[namelist:orography_agnesi_spherical=half_width] +compulsory=true +description=Half-width of mountain [m] +fail-if=this < 0.0 +help=See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[!namelist:orography_agnesi_spherical=lambda_centre] +compulsory=false +description=Latitude of mountain centre [radian] +expression=namelist:orography_agnesi_spherical=lambda_centre_dec * source:constants_mod=PI +help=See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +type=real + +[namelist:orography_agnesi_spherical=lambda_centre_dec] +compulsory=true +description=Latitude of mountain centre unscaled by PI +help=Scaled by PI in the configuration setup. + =See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +range=-0.5:0.5 +sort-key=Panel-A04 +type=real +warn-if=this > 0.5 ; + =this < -0.5 ; + +[!namelist:orography_agnesi_spherical=lambda_focus] +compulsory=false +description=Latitude of mountain focus [radian] +expression=namelist:orography_agnesi_spherical=lambda_focus_dec * source:constants_mod=PI +help=See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +type=real + +[namelist:orography_agnesi_spherical=lambda_focus_dec] +compulsory=true +description=Latitude of mountain focus unscaled by PI +help=Scaled by PI in the configuration setup. + =See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +range=-0.5:0.5 +sort-key=Panel-A06 +type=real +warn-if=this > 0.5 ; + =this < -0.5 ; + +[namelist:orography_agnesi_spherical=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[!namelist:orography_agnesi_spherical=phi_centre] +compulsory=false +description=Longitude of mountain centre [radian] +expression=namelist:orography_agnesi_spherical=phi_centre_dec * source:constants_mod=PI +help=See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +type=real + +[namelist:orography_agnesi_spherical=phi_centre_dec] +compulsory=true +description=Longitude of mountain centre unscaled by PI +help=Scaled by PI in the configuration setup. + =See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +range=0.0:2.0 +sort-key=Panel-A03 +type=real +warn-if=this > 2.0 ; + =this < 0.0 ; + +[!namelist:orography_agnesi_spherical=phi_focus] +compulsory=false +description=Longitude of mountain focus [radian] +expression=namelist:orography_agnesi_spherical=phi_focus_dec * source:constants_mod=PI +help=See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +type=real + +[namelist:orography_agnesi_spherical=phi_focus_dec] +compulsory=true +description=Longitude of mountain focus unscaled by PI +help=Scaled by PI in the configuration setup. + =See Wedi and Smolarkiewicz (2009), Section 4.1. for the analytic form. +!kind=default +range=0.0:2.0 +sort-key=Panel-A05 +type=real +warn-if=this > 2.0 ; + =this < 0.0 ; + +#============================================================================== +# OROGRAPHY (BELL CARTESIAN) +#============================================================================== +[namelist:orography_bell_cartesian] +compulsory=true +description=Bell-Shaped orography profile in Cartesian coordinates. +help=Settings for analytic orography profile of Bell-shaped mountain function + =in Cartesian biperiodic domain in x and/or y directions. + =Reference: Lock et al. (2012), Section 3.b. +ns=namelist/Model/Planet/Bell cartesian +sort-key=Section-A03 +title=Bell cartesian profile + +[namelist:orography_bell_cartesian=direction] +compulsory=true +description=Direction of mountain (x, y, or xy) +!enumeration=true +help=See Lock et al. (2012), Section 3.b. for the analytic form. +sort-key=Panel-A06 +value-titles=x, y, xy +values='x', 'y', 'xy' + +[namelist:orography_bell_cartesian=half_width_x] +compulsory=true +description=Half-width of mountain in x direction [m] +fail-if=this < 0.0 +help=See Lock et al. (2012), Section 3.b. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:orography_bell_cartesian=half_width_y] +compulsory=true +description=Half-width of mountain in y direction [m] +fail-if=this < 0.0 +help=See Lock et al. (2012), Section 3.b. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A03 +type=real + +[namelist:orography_bell_cartesian=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Lock et al. (2012), Section 3.b. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:orography_bell_cartesian=x_centre] +compulsory=true +description=x coordinate of mountain centre [m] +help=See Lock et al. (2012), Section 3.b. for the analytic form. +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:orography_bell_cartesian=y_centre] +compulsory=true +description=y coordinate of mountain centre [m] +help=See Lock et al. (2012), Section 3.b. for the analytic form. +!kind=default +sort-key=Panel-A05 +type=real + +#============================================================================== +# OROGRAPHY (Double Bell SPHERICAL) +#============================================================================== +[namelist:orography_bell_spherical] +compulsory=true +description=Double bell orography profile in spherical coordinates. +help=Settings for analytic orography profile of DCMIP 2.0.0 mountain function + =in spherical domain. + =Reference: Hughes & Jablonowski 2023 +ns=namelist/Model/Planet/Bell spherical +sort-key=Section-A03 +title=Bell spherical profile + +[namelist:orography_bell_spherical=lambda_centre1] +compulsory=true +description=Latitude of mountain centre in degrees +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:orography_bell_spherical=lambda_centre2] +compulsory=true +description=Latitude of mountain centre in degrees +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:orography_bell_spherical=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:orography_bell_spherical=phi_centre1] +compulsory=true +description=Longitude of mountain centre in degrees +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +sort-key=Panel-A03 +type=real + +[namelist:orography_bell_spherical=phi_centre2] +compulsory=true +description=Longitude of mountain centre in degrees +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +sort-key=Panel-A03 +type=real + +[namelist:orography_bell_spherical=radius_lat] +compulsory=true +description=Mountain radius unscaled in degrees +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +sort-key=Panel-A02 +type=real + +[namelist:orography_bell_spherical=radius_lon] +compulsory=true +description=Mountain radius in degrees +help=See Hughes & Jablonowski 2023 for the analytic form. +!kind=default +sort-key=Panel-A02 +type=real + +#============================================================================== +# OROGRAPHY (DCMIP 2.0.0 SPHERICAL) +#============================================================================== +[namelist:orography_dcmip200_spherical] +compulsory=true +description=DCMIP 2.0.0 orography profile in spherical coordinates. +help=Settings for analytic orography profile of DCMIP 2.0.0 mountain function + =in spherical domain. + =Reference: Ullrich et al. (2012) DCMIP documentation, Section 2.0. +ns=namelist/Model/Planet/DCMIP2.0.0 spherical +sort-key=Section-A03 +title=DCMIP spherical profile + +[!namelist:orography_dcmip200_spherical=lambda_centre] +compulsory=false +description=Latitude of mountain centre [radian] +expression=namelist:orography_dcmip200_spherical=lambda_centre_dec * source:constants_mod=PI +help=See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +type=real + +[namelist:orography_dcmip200_spherical=lambda_centre_dec] +compulsory=true +description=Latitude of mountain centre unscaled by PI +help=Scaled by PI in the configuration setup. + =See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +range=0.0:2.0 +sort-key=Panel-A04 +type=real +warn-if=this > 2.0 ; + =this < 0.0 ; + +[namelist:orography_dcmip200_spherical=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[!namelist:orography_dcmip200_spherical=osc_half_width] +compulsory=false +description=Oscillation half-width of mountain function [radian] +expression=namelist:orography_dcmip200_spherical=osc_half_width_dec * source:constants_mod=PI +help=See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +type=real + +[namelist:orography_dcmip200_spherical=osc_half_width_dec] +compulsory=true +description=Oscillation half-width of mountain function unscaled by PI +fail-if=this < 0.0 +help=Scaled by PI in the configuration setup. + =See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A05 +type=real + +[!namelist:orography_dcmip200_spherical=phi_centre] +compulsory=false +description=Longitude of mountain centre [radian] +expression=namelist:orography_dcmip200_spherical=phi_centre_dec * source:constants_mod=PI +help=See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +type=real + +[namelist:orography_dcmip200_spherical=phi_centre_dec] +compulsory=true +description=Longitude of mountain centre unscaled by PI +help=Scaled by PI in the configuration setup. + =See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +range=0.0:2.0 +sort-key=Panel-A03 +type=real +warn-if=this > 2.0 ; + =this < 0.0 ; + +[!namelist:orography_dcmip200_spherical=radius] +compulsory=false +description=Mountain radius [radian] +expression=namelist:orography_dcmip200_spherical=radius_dec * source:constants_mod=PI +help=See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +type=real + +[namelist:orography_dcmip200_spherical=radius_dec] +compulsory=true +description=Mountain radius unscaled by PI +help=Scaled by PI in the configuration setup. + =See Ullrich et al. (2012) DCMIP documentation, Section 2.0. for the analytic form. +!kind=default +range=0.0:2.0 +sort-key=Panel-A02 +type=real +warn-if=this > 2.0 ; + =this < 0.0 ; + +#============================================================================== +# OROGRAPHY (SCHAR CARTESIAN) +#============================================================================== +[namelist:orography_schar_cartesian] +compulsory=true +description=Schar orography profile in Cartesian coordinates. +help=Settings for analytic orography profile of Schar mountain function + =in spherical domain. Reference: Melvin et al. (2010), Section 4.4. +ns=namelist/Model/Planet/Schar cartesian +sort-key=Section-A03 +title=Schar cartesian profile + +[namelist:orography_schar_cartesian=direction] +compulsory=true +description=Direction of mountain (x, y, or xy) +!enumeration=true +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +sort-key=Panel-A06 +value-titles=x, y, xy +values='x', 'y', 'xy' + +[namelist:orography_schar_cartesian=half_width_x] +compulsory=true +description=Half-width of mountain in x direction [m] +fail-if=this < 0.0 +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[namelist:orography_schar_cartesian=half_width_y] +compulsory=true +description=Half-width of mountain in y direction [m] +fail-if=this < 0.0 +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A03 +type=real + +[namelist:orography_schar_cartesian=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:orography_schar_cartesian=wavelength] +compulsory=true +description=Wavelength of Cos part of mountain function [m] +fail-if=this < 0.0 +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A07 +type=real + +[namelist:orography_schar_cartesian=x_centre] +compulsory=true +description=x coordinate of mountain centre [m] +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +!kind=default +sort-key=Panel-A04 +type=real + +[namelist:orography_schar_cartesian=y_centre] +compulsory=true +description=y coordinate of mountain centre [m] +help=See Melvin et al. (2010), Section 4.4. for the analytic form. +!kind=default +sort-key=Panel-A05 +type=real + +#============================================================================== +# OROGRAPHY (SCHAR SPHERICAL) +#============================================================================== +[namelist:orography_schar_spherical] +compulsory=true +description=Schar orography profile in spherical coordinates. +help=Settings for analytic orography profile of Schar mountain function + =in spherical domain. Reference: Wood et al. (2013), Section 7.1. +ns=namelist/Model/Planet/Schar spherical +sort-key=Section-A03 +title=Schar spherical profile + +[namelist:orography_schar_spherical=half_width] +compulsory=true +description=Half-width of mountain [m] +fail-if=this < 0.0 +help=See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A02 +type=real + +[!namelist:orography_schar_spherical=lambda_centre] +compulsory=false +description=Latitude of mountain centre [radian] +expression=namelist:orography_schar_spherical=lambda_centre_dec * source:constants_mod=PI +help=See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +type=real + +[namelist:orography_schar_spherical=lambda_centre_dec] +compulsory=true +description=Latitude of mountain centre unscaled by PI +help=Scaled by PI in the configuration setup. + =See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +range=-0.5:0.5 +sort-key=Panel-A04 +type=real +warn-if=this > 0.5 ; + =this < -0.5 ; + +[namelist:orography_schar_spherical=mountain_height] +compulsory=true +description=Height of mountain [m] +fail-if=this < 0.0 ; + =this > namelist:extrusion=domain_height ; +help=See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A01 +type=real + +[!namelist:orography_schar_spherical=phi_centre] +compulsory=false +description=Longitude of mountain centre [radian] +expression=namelist:orography_schar_spherical=phi_centre_dec * source:constants_mod=PI +help=See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +type=real + +[namelist:orography_schar_spherical=phi_centre_dec] +compulsory=true +description=Longitude of mountain centre unscaled by PI +help=Scaled by PI in the configuration setup. + =See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +range=0.0:2.0 +sort-key=Panel-A03 +type=real +warn-if=this > 2.0 ; + =this < 0.0 ; + +[namelist:orography_schar_spherical=wavelength] +compulsory=true +description=Wavelength of Cos part of mountain function [m] +fail-if=this < 0.0 +help=See Wood et al. (2013), Section 7.1. for the analytic form. +!kind=default +range=0.0: +sort-key=Panel-A07 +type=real + +#============================================================================== +# PHYSICS SECTION +#============================================================================== +[namelist:physics] +compulsory=true +description=Options for physics parametrizations +help=The placement variables indicate where a given physics routine is placed: + =if > 0: then placement is in fast physics + =if =0: then routine is not called + =if < 0: then placement is in slow physics +ns=namelist/Science + +[namelist:physics=bl_segment] +compulsory=true +description=Over-rides bl_segment_size in physics +fail-if=this <= 0 ; +help=Boundary layer segment size. + = + =Setting bl_segment=0 will trigger the default behaviour + =of using the length of the local partition. +!kind=default +range=0: +type=integer + +[namelist:physics=blayer_placement] +compulsory=true +description=Boundary layer placement +!enumeration=true +help=Determines where the boundary layer scheme is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A03 +value-titles=Fast physics, Slow physics +values='fast','slow' + +[namelist:physics=configure_segments] +compulsory=true +description=Configure OMP segment lengths in physics schemes +help=This will allow segmentation of physics loops and thereform OMP performance to be tuned +!kind=default +trigger=namelist:physics=bl_segment: .true. ; + =namelist:physics=gw_segment: .true. ; + =namelist:physics=ls_ppn_segment: .true. ; + =namelist:physics=ussp_segment: .true. ; +type=logical + +[namelist:physics=convection_placement] +compulsory=true +description=Convection placement +!enumeration=true +help=Determines where the convection scheme is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A04 +value-titles=Fast physics, Slow physics +values='fast','slow' + +[namelist:physics=electric_placement] +compulsory=true +description=Electric placement +!enumeration=true +help=Determines where the electric (lightning scheme) is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A16 +value-titles=Start of slow physics, After microphysics +values='slow','post_mphys' + +[namelist:physics=evap_condense_placement] +compulsory=true +description=Simple evaporation-condensation placement +!enumeration=true +help=Determines where the evaporation-condensation scheme is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A03 +value-titles=Fast physics, Slow physics +values='fast','slow' + +[namelist:physics=gw_segment] +compulsory=true +description=Over-rides gw_seg_size in um physics +fail-if=this <= 0 ; +help=Break segments gravity wave. + = + =Setting gw_segment=0 will trigger the default behaviour + =of using the length of the local partition. +!kind=default +range=0: +type=integer + +[namelist:physics=limit_drag_incs] +compulsory=true +description=Switch to ensure W2 drag increments are physically sensible +help=This will prevent the remapping of W3 -> W2 creating instances + = where the drag can accelerate the wind +!kind=default +ns=namelist/Science/Physics mapping +sort-key=Section-A03 +type=logical + +[namelist:physics=lowest_level] +compulsory=true +description=Option for updating lowest wtheta level prognostics +!enumeration=true +help=Physics codes typically only operate from the 1st wtheta level upwards. + = Hence we need to provide updates to the 0th wtheta level somehow. + = 3 options are available: + = + =Constant value: This forces the value of fields + = to be held constant below level 1. This is physically unrealistic + = and only provided for testing consistency with ENDGame. + = + =Constant gradient: Extrapolate the gradient between level 2 and level 1 + = to obtain the level 0 value, i.e. + = theta(z0) = theta(z1) - z1*(theta(z2)-theta(z1))/(z2-z1). + = + =Constant flux: Obtain the value at the surface using the surface + = fluxes from the bounary layer scheme, i.e. + = theta(z0) = theta(z1) + ftl/(cp*rhokh), + = where ftl is the surface heat flux and kh is the eddy diffusivity. +!kind=default +ns=namelist/Science/Physics mapping +sort-key=Section-A03 +value-titles=Constant value,Constant gradient,Constant flux +values='constant','gradient','flux' + +[namelist:physics=ls_ppn_segment] +compulsory=true +description=Large-scale precipitation OMP segment length +fail-if=this < 0 +help=Segment length used by large-scale precipitation scheme + =for OMP parallelization of loops. + = + =Setting ls_ppn_segment=0 will trigger the default behaviour + =of using the length of the local partition. +!kind=default +range=0: +type=integer + +[namelist:physics=microphysics_placement] +compulsory=true +description=Microphysics placement +!enumeration=true +help=Determines where the microphysics scheme is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A05 +value-titles=Slow\ physics +values='slow' + +[namelist:physics=orographic_drag_placement] +compulsory=true +description=Orographic drag placement +!enumeration=true +help=Determines where the orographic drag scheme is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A06 +value-titles=Slow\ physics +values='slow' + +[namelist:physics=radiation_placement] +compulsory=true +description=Radiative transfer placement +!enumeration=true +help=Determines where the radiation transfer scheme is called from. +ns=namelist/Science/Timestep placement +sort-key=Panel-A07 +value-titles=Slow\ physics +values='slow' + +[namelist:physics=sample_physics_scalars] +compulsory=true +description=Switch to sample rho, theta and exner at physics locations +help=If true then sample rho, theta and exner at physics locations, else use a + = Galerkin projection +!kind=default +ns=namelist/Science/Physics mapping +sort-key=Section-A01 +type=logical + +[namelist:physics=sample_physics_winds] +compulsory=true +description=Switch to sample FE winds at physics locations +help=If true then sample FE winds at physics locations, else use a + = Galerkin projection +!kind=default +ns=namelist/Science/Physics mapping +sort-key=Section-A02 +trigger=namelist:physics=sample_physics_winds_correction: .true. ; +type=logical + +[namelist:physics=sample_physics_winds_correction] +compulsory=false +description=When sampling physics winds, whether to include a correction at + =cubed sphere panel edges +help=If true then, when using a sampling method to convert physical wind + =components into a FE wind, include a correction to improve accuracy at the + =edges of cubed sphere panels +!kind=default +ns=namelist/Science/Physics mapping +sort-key=Section-A02b +type=logical + +[namelist:physics=smagorinsky_placement] +compulsory=true +description=Smagorinsky placement +!enumeration=true +help=Determines where the Smagorinsky mixing scheme is called from. + =Fast => from the fast physics predictors, equivalent to where the + = vertical mixing happens + =Outer => from the state variables in the dynamics outer-loop + = equivalent to the UM + =End => at the end of the timestep, after the solver +ns=namelist/Science/Timestep placement +sort-key=Panel-A09 +value-titles=Fast physics,Outer loop,Timestep end +values='fast','outer','end' + +[namelist:physics=spectral_gwd_placement] +compulsory=true +description=Spectral gravity wave drag placement +!enumeration=true +help=Determines where the spectral gravity wave drag scheme is called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A08 +value-titles=Slow\ physics +values='slow' + +[namelist:physics=stochastic_physics_placement] +compulsory=true +description=stochastic_physics placement +!enumeration=true +help=Determines where the stochastic physics schemes are called from. +!kind=default +ns=namelist/Science/Timestep placement +sort-key=Panel-A15 +value-titles=Fast\ physics +values='fast' + +[namelist:physics=ussp_segment] +compulsory=true +description=Gravity wave drag ussp OMP segment length +fail-if=this < 0 +help=Segment length used by ussp + =for OMP parallelization of loops. + = + =Setting ussp_seg_size=0 will trigger the default behaviour + =of using the length of the local partition. +!kind=default +range=0: +type=integer + +#============================================================================== +# PLANET +#============================================================================== +[namelist:planet=cp] +compulsory=true +description=[J/(kg K)] +fail-if=this <= 0.0 ; +help=Specific heat of dry air at constant pressure [J/(kg K)] +!kind=default +ns=namelist/Model/Planet/Properties +range=0.0: +sort-key=Panel-A05 +type=real + +[!namelist:planet=cv] +compulsory=false +expression=namelist:planet=cp - namelist:planet=rd +help=Specific heat of dry air at constant volume [J/(kg K)] +!kind=default +type=real + +[!namelist:planet=epsilon] +compulsory=false +description=Ratio of molecular weights: dry air / water +expression=namelist:planet=rd / source:driver_water_constants_mod=gas_constant_h2o +help=Molecular weight of water divided by molecular weight of dry air. + =[dimensionless] +!kind=default +type=real + +[namelist:planet=gravity] +compulsory=true +description=[m/(s^2)] +fail-if=this <= 0.0 ; +help=Surface equatorial value of gravity [m/s^2] +!kind=default +ns=namelist/Model/Planet/Properties +range=0.0: +sort-key=Panel-A01 +type=real + +[!namelist:planet=kappa] +compulsory=false +expression=namelist:planet=rd / namelist:planet=cp +help=Ratio of Rd and Cp [dimensionless] +!kind=default +type=real + +[namelist:planet=omega] +compulsory=true +description=[radians/second] +help=Planetary angular rotation rate. +!kind=default +ns=namelist/Model/Planet/Properties +sort-key=Panel-A03 +type=real + +[!namelist:planet=one_over_kappa] +compulsory=false +expression=namelist:planet=cp / namelist:planet=rd +help=Inverse ratio of Rd and Cp [dimensionless] +!kind=default +type=real + +[namelist:planet=p_zero] +compulsory=true +description=[Pa] +help=Reference surface pressure [Pa] +!kind=default +ns=namelist/Model/Planet/Properties +sort-key=Panel-A06 +type=real + +[namelist:planet=rd] +compulsory=true +description=[J/(kg K)] +help=Gas constant for dry air [J/(kg K)] +!kind=default +ns=namelist/Model/Planet/Properties +sort-key=Panel-A04 +type=real + +[!namelist:planet=recip_epsilon] +compulsory=false +expression=source:driver_water_constants_mod=gas_constant_h2o / namelist:planet=rd +help=Reciprocal of ratio molecular mass of water to dry air. + =[dimensionless] +!kind=default +type=real + +[!namelist:planet=scaled_omega] +compulsory=false +expression=namelist:planet=omega * namelist:planet=scaling_factor +help=?????? + =?????? +!kind=default +type=real + +#============================================================================== +# Section choice namelist +#============================================================================== +[namelist:section_choice] +compulsory=true +description=Specify section choices for this configuration. +ns=namelist/Science/Section choice +sort-key=A + +[namelist:section_choice=aerosol] +compulsory=true +description=Which aerosol scheme to use +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=The following aerosol options are available from the aerosol namelist + = GLOMAP-mode climatology + = + =Note that only one of these aerosol options can be used at a time. +sort-key=Panel-A01 +trigger=namelist:aerosol: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=boundary_layer] +compulsory=true +description=Which boundary layer turbulence parametrization to use +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=Either the boundary layer can be switched off and no surface drag applied, + =or the UM scheme based on Lock et al (2000 MWR) can be used. +sort-key=Panel-A02 +trigger=namelist:physics=blayer_placement: this != "'none'" ; + =namelist:physics=lowest_level: this == "'um'" ; + =namelist:section_choice=convection: this != "'none'" ; + =namelist:blayer: this == "'um'" ; + =namelist:mixing=method: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=chemistry] +compulsory=true +description=Which Chemistry model to use +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=The following Chemistry schemes are available from the chemistry namelist + = UM: Offline oxidants + = UM: Strattrop + =Note that only one of these chemistry options can be used at a time. +sort-key=Panel-A01 +trigger=namelist:chemistry: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=cloud] +compulsory=true +description= + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; + =this != "'none'" and namelist:formulation=moisture_formulation == "'dry'" ; +help=?????? + =?????? +sort-key=Panel-A03 +trigger=namelist:cloud: this == "'um'" ; + =namelist:physics=evap_condense_placement: this == "'evap_condense'" ; + =namelist:section_choice=microphysics: this != "'none'" ; +value-titles=None, Unified Model, Evaporation-Condensation +values='none', 'um', 'evap_condense' + +[namelist:section_choice=convection] +compulsory=true +description= + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; + =this != "'none'" and namelist:section_choice=boundary_layer == "'none'" ; +help=?????? + =?????? +sort-key=Panel-A04 +trigger=namelist:physics=convection_placement: this != "'none'" ; + =namelist:convection=cv_scheme: this == "'um'" ; + =namelist:cloud=mphys_erosion: this == "'none'"; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=dynamics] +compulsory=true +description= + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_wavedynamics == ".false." ; +help=?????? + =?????? +sort-key=Panel-A05 +value-titles=None, GungHo +values='none', 'gungho' + +[namelist:section_choice=electric] +compulsory=true +description=Use electrification (lightning) scheme +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; + =this != "'none'" and namelist:section_choice=microphysics == "'none'" ; +help=Selecting an electification scheme allows the model to produce + =lightning from appropriate thunderstorm clouds. This scheme requires + =a working cloud microphysics scheme as a prerequisite. +sort-key=Panel-A12 +trigger=namelist:physics=electric_placement: this != "'none'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=external_forcing] +compulsory=true +description=Use external forcing of thermodynamic variables +sort-key=Panel-A12 +trigger=namelist:external_forcing: .true.; +type=logical + +[namelist:section_choice=iau] +compulsory=true +description=Use IAU +help=Logical namelist variable to say whether the IAU is used +sort-key=Panel-A12 +trigger=namelist:files=iau_path: .true.; + =namelist:iau=iau_ainc_multifile: .true.; + =namelist:iau=iau_mode: .true.; + =namelist:iau=iau_pc2: .true.; + =namelist:iau=iau_tendency_ainc: .true.; + =namelist:iau=iau_use_level_one_temp: .true.; + =namelist:iau=iau_wet_density: .true.; + =namelist:iau=iau_use_addinf: .true.; + =namelist:iau=iau_use_bcorr: .true.; +type=logical + +[namelist:section_choice=iau_sst] +compulsory=true +description=Use iau_sst +help=Logical namelist variable to say whether the IAU is used for sst increments +sort-key=Panel-A12 +trigger=namelist:files=iau_sst_path: .true.; +type=logical + +[namelist:section_choice=iau_surf] +compulsory=true +description=Use iau_surf +help=Logical namelist variable to say whether the IAU is used for surface increments +sort-key=Panel-A12 +trigger=namelist:files=iau_surf_path: .true.; +type=logical + +[namelist:section_choice=methane_oxidation] +compulsory=true +description=Use methane oxidation +help=Selecting methane_oxidation allows the calculation of + =chemical water vapour change due to methane oxidation and photolysis, + =following the method used at ECMWF (Untch et al (ECMWF Newsletter No + =87 winter 1998/99 pp 2-8) and Simmons (pers. comm.)). The model + =methane mixing ratio is implicit and derived from the assumption that + =2 [CH4] + [H2O] = 3.75 ppmm throughout the stratosphere. + = + =The methane oxidation and hydrogen photolysis rate coefficients vary + =only with pressure, which is calculated for a standard atmosphere + =assuming a surface pressure of namelist:planet=p_zero. +sort-key=Panel-A11 +type=logical + +[namelist:section_choice=microphysics] +compulsory=true +description= + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; + =this != "'none'" and namelist:section_choice=cloud == "'none'" ; +help=?????? + =?????? +sort-key=Panel-A06 +trigger=namelist:physics=microphysics_placement: this != "'none'" ; + =namelist:section_choice=electric: this!= "'none'"; + =namelist:microphysics: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=orographic_drag] +compulsory=true +description=Orographic drag scheme + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=Orographic drag scheme + ====================================== + =Accounts for drag forces on the atmosphere due to interaction + =with sub-grid mountains. + = + =Options are: + =_________________________________________________________________ + =None: + = No orographic drag scheme applied. + =_________________________________________________________________ + =UM: + = The orographic drag scheme from the Unified Model. + = + = This scheme is based on the Lott and Miller (1997) parametrization and + = includes drag contributions from low-level flow blocking and + = orographic gravity waves. It accounts for sub-grid orography of + = horizontal scales larger than 6 km (i.e. hydrostatic scales). + = (see UM Documentation paper, UMDP022). +sort-key=Panel-A07 +trigger=namelist:physics=orographic_drag_placement: this != "'none'" ; + =namelist:orographic_drag: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=radiation] +compulsory=true +description= + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=?????? + =?????? +sort-key=Panel-A08 +trigger=namelist:radiation: this == "'socrates'" ; + =namelist:physics=radiation_placement: this != "'none'" ; + =namelist:orbit: this != "'none'" ; + =namelist:star: this != "'none'" ; +value-titles=None, SOCRATES +values='none', 'socrates' + +[namelist:section_choice=spectral_gwd] +compulsory=true +description= + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=Spectral gravity wave drag scheme + ====================================== + =Accounts for drag forces on the atmosphere due to non-orographic + =gravity wave sources. + = + =Options are: + =_________________________________________________________________ + =None: + = No spectral gravity wave drag scheme applied. + =_________________________________________________________________ + =UM: + = The Ultra Simple Spectral Parametrization (USSP) of gravity wave drag + = from the Unified Model. + = + = The approach taken is that of Warner and McIntyre (1996), Warner and + = McIntyre (1999) and Warner and McIntyre (2001) with further + = modifications (Scaife et al., 2002; Scaife et al., 2000). + = + = The scheme includes an option for convective gravity wave sources. + = + = See UM documentation page 034 (UMDP034). +sort-key=Panel-A09 +trigger=namelist:physics=spectral_gwd_placement: this != "'none'" ; + =namelist:spectral_gwd: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=stochastic_physics] +compulsory=true +description=Sets of Stochastic Physics to use + = +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; + =this != "'none'" and namelist:section_choice=stochastic_physics == "'none'" ; +help=UM: + = The Stochastic Perturbation of Tendencies (SPT) +sort-key=Panel-A15 +trigger=namelist:physics=stochastic_physics_placement: this != "'none'" ; + =namelist:stochastic_physics: this == "'um'" ; +value-titles=None, Unified Model +values='none', 'um' + +[namelist:section_choice=surface] +compulsory=true +description=Which surface scheme to use +!enumeration=true +fail-if=this != "'none'" and namelist:formulation=use_physics == ".false." ; +help=Currently JULES is the only surface scheme available for use +sort-key=Panel-A10 +trigger=namelist:surface: this == "'jules'" ; + =namelist:jules_hydrology: this == "'jules'" ; + =namelist:jules_nvegparm: this == "'jules'" ; + =namelist:jules_pftparm: this == "'jules'" ; + =namelist:jules_radiation: this == "'jules'" ; + =namelist:jules_sea_seaice: this == "'jules'" ; + =namelist:jules_soil: this == "'jules'" ; + =namelist:jules_snow: this == "'jules'" ; + =namelist:jules_surface: this == "'jules'" ; + =namelist:jules_surface_types: this == "'jules'" ; + =namelist:jules_urban: this == "'jules'" ; + =namelist:jules_vegetation: this == "'jules'" ; +value-titles=None, JULES +values='none','jules' + +#============================================================================== +# MASS MATRIX SOLVER +#============================================================================== +[namelist:solver] +compulsory=true +description=?????? +help=This namelist is for using iteratives solvers for the inversion of mass matrices +ns=namelist/Science/Dynamics/Mass Matrix Solver +sort-key=Section-A04 + +[namelist:solver=fail_on_non_converged] +compulsory=true +description=Cause the solver to return an error if the maximum number of iterations are reached and + =residual has not been reduced below the desired tolerance otherwise the solver will exit even + =if it has not converged. If monitor_convergence is set to false then this setting has no effect +help=Return an error if solver fails to converge +sort-key=Panel-A07 +type=logical + +[namelist:solver=gcrk] +compulsory=true +description=?????? +help=Dimension of the approximate Krylov subspace. + =In other words, it is the number of potential + =residual vectors to calculate at each + =iteration of the solver. +!kind=default +sort-key=Panel-A05 +type=integer + +[namelist:solver=jacobi_relaxation] +compulsory=true +description=?????? +help=Relaxtion factor to use in the Jacobi solver +!kind=default +sort-key=Panel-A11 +type=real + +[namelist:solver=maximum_iterations] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=Iteration limit for solver +!kind=default +range=1: +sort-key=Panel-A02 +type=integer + +[namelist:solver=method] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +sort-key=Panel-A01 +trigger=namelist:solver=jacobi_relaxation: this == "'jacobi'"; +value-titles=biconjugate gradient stabilized, + =conjugate gradient, + =generalized conjugate residual, + =generalized minimal residual, + =flexible generalized minimal residual, + =precondition only, + =jacobi, + =chebyshev +values='bicgstab', 'cg', 'gcr', 'gmres', 'fgmres', 'prec_only', 'jacobi', 'chebyshev' + +[namelist:solver=monitor_convergence] +compulsory=true +description=Computes and prints out convergence information for the iterative solver and if the + =error has been reduced below the tolerance then the solver will exit. If set to false + =the solver will always perform the maximum number of iterations before exiting +help=Monitor convergence of the iterative mass matrix solver +sort-key=Panel-A06 +trigger=namelist:solver=fail_on_non_converged: .true.; +type=logical + +[namelist:solver=preconditioner] +compulsory=true +description=?????? +!enumeration=true +help=?????? + =?????? +sort-key=Panel-A04 +value-titles=None, Diagonal +values='none', 'diagonal' + +[namelist:solver=tolerance] +compulsory=true +description=?????? +help=Relative tolerance of solver +!kind=default +sort-key=Panel-A03 +type=real + +#============================================================================== +# STAR +#============================================================================== +[namelist:star] +compulsory=true +description=Properties of host star +ns=namelist/Model/Planet/Star +sort-key=Section-A04 +title=Star + +[namelist:star=stellar_constant] +compulsory=true +description=Stellar irradiance at 1 AU [Wm-2] +help=The flux received from the host star at a distance of 1 astronomical unit. + =For the Sun, this is the "Solar constant". +sort-key=Panel-A01 +type=real + +[namelist:star=stellar_radius] +compulsory=true +description=Radius of host star [m] +help=Radius at the photosphere of the host star used for the calculation + =of diagnostics. +sort-key=Panel-A02 +type=real + +#============================================================================== +# IDEALISED FORCING - PROFILE OF TEMPERATURE TENDENCY +#============================================================================== +[namelist:temp_tend_data] +compulsory=true +description=Settings for temperature forcing +ns=namelist/Science/External Forcing/Temperature Forcing +sort-key=A1 +title=Temperature forcing + +[namelist:temp_tend_data=coordinate] +compulsory=true +description=Vertical coordinate for temperature tendency forcing +!enumeration=true +help=Temperature tendency forcing profiles may be specified with either height + =or pressure as the vertical coordinate. In both cases the coordinate + =information is entered using the heights array. + =Height: height in metres above sea-level. Values should be monotonically increasing. + =Pressure: pressure level in Pascals. Values should be monotonically decreasing. +!kind=default +ns=namelist/Science/External Forcing/Temperature Forcing +sort-key=Panel-A01b +value-titles=Height, Pressure +values='height', 'pressure' + +[namelist:temp_tend_data=heights] +!bounds=namelist:temp_tend_data=number_heights +compulsory=true +description=Temperature tendency heights +fail-if=len(this) != namelist:temp_tend_data=number_heights +help=Heights for temperature tendency profile. If in ascending order, these are + =taken to be height in metres. Heights specified in descending order are + =taken to be pressure coordinate in Pascals. +!kind=default +length=: +ns=namelist/Science/External Forcing/Temperature Forcing +sort-key=Panel-A01c +type=real + +[namelist:temp_tend_data=number_heights] +compulsory=true +description=Size of temperature tendency profile +help=Number of data points in the temperature tendency profile. +!kind=default +ns=namelist/Science/External Forcing/Temperature Forcing +range=0:100 +sort-key=Panel-A01a +type=integer + +[namelist:temp_tend_data=number_times] +compulsory=true +description=Number of temperature tendency profile +help=Temperature tendency profiles at the times specified in + =the times array. +!kind=default +ns=namelist/Science/External Forcing/Temperature Forcing +range=0:100 +sort-key=Panel-A01a +type=integer + +[namelist:temp_tend_data=profile_data] +!bounds=namelist:temp_tend_data=number_heights * namelist:temp_tend_data=number_times +compulsory=true +description=Temperature tendency data +fail-if=len(this) != namelist:temp_tend_data=number_heights * namelist:temp_tend_data=number_times +help=Temperature tendency (K/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Temperature Forcing +sort-key=Panel-A01d +type=real + +[namelist:temp_tend_data=times] +!bounds=namelist:temp_tend_data=number_times +compulsory=true +description=Temperature tendency times +fail-if=len(this) != namelist:temp_tend_data=number_times +help= +!kind=default +length=: +ns=namelist/Science/External Forcing/Temperature Forcing +sort-key=Panel-A01c +type=real + +#============================================================================== +# RELAXATION OF POTENTIAL TEMPERATURE +#============================================================================== +[namelist:theta_relax] +compulsory=false +description=Settings for relaxation of potential temperature +ns=namelist/Science/External Forcing/Theta Relaxation +sort-key=A2 +title=Potential temperature relaxation + +[namelist:theta_relax=coordinate] +compulsory=true +description=Vertical coordinate for potential temperature relaxation +!enumeration=true +help=Target vertical profiles, towards which potential temperature is relaxed, may be + =specified with either height or pressure as the vertical coordinate. + =In both cases the coordinate information is entered using the + =theta_relax_heights array. + =Height: height in metres above sea-level. Values should be monotonically increasing. + =Pressure: pressure level in Pascals. Values should be monotonically decreasing. + =Note that while the pressure coordinate is specified in Pascals, this is + =converted to Exner for the purposes of interpolating the target profile. +!kind=default +ns=namelist/Science/External Forcing/Theta Relaxation +sort-key=Panel-A03a +value-titles=Height, Pressure +values='height', 'pressure' + +[namelist:theta_relax=heights] +!bounds=namelist:theta_relax=number_heights +compulsory=true +description=Coordinate information for relaxation target profile +help=The vertical coordinate information for the target profile + =may be either heights, in metres, or pressure, in Pascals. + =Use theta_relax_coord to determine which coordinate variable + =is used. + =The order in which coordinate values are listed should correspond + =with the order in which the profile data are listed. + =Note also that relaxation is applied only within the region + =defined by the limits of the coordinate data provided. The + =target profile is not extrapolated beyond this range. +!kind=default +length=: +ns=namelist/Science/External Forcing/Theta Relaxation +sort-key=Panel-A03b +type=real + +[namelist:theta_relax=number_heights] +compulsory=true +description=Size of theta_relax_heights array +help=Number of points in the target profile for potential temperature. +!kind=default +ns=namelist/Science/External Forcing/Theta Relaxation +range=0:200 +sort-key=Panel-A03a +type=integer + +[namelist:theta_relax=number_times] +compulsory=true +description=Number of target profiles towards which potential temperature is relaxed +help=At each timestep an increment is applied to potential temperature to relax its + =horizontal mean towards a specified profile. This profile may be time-varying, + =in which case profiles are specified at multiple times and linear interpolation + =is used to evaluate the profile at the current model time. +!kind=default +ns=namelist/Science/External Forcing/Theta Relaxation +range=0: +sort-key=Panel-A03c +type=integer + +[namelist:theta_relax=profile_data] +!bounds=namelist:theta_relax=number_heights * namelist:theta_relax=number_times +compulsory=true +description=Target profile data for relaxation of potential temperature (Kelvin) +help=Values of dry potential temperature (in Kelvin) in the target vertical profiles + =for dry potential temperature. Profiles are listed sequentially in time. +!kind=default +length=: +ns=namelist/Science/External Forcing/Theta Relaxation +sort-key=Panel-A03d +type=real + +[namelist:theta_relax=times] +!bounds=namelist:theta_relax=number_times +compulsory=true +description=Timestamps (in seconds) of target profiles +help=Validity times (in seconds) of the target profiles for Newtonian + =relaxation of dry potential temperature. +!kind=default +length=: +ns=namelist/Science/External Forcing/Theta Relaxation +sort-key=Panel-A03c +type=real + +[namelist:theta_relax=timescale] +compulsory=true +description=Relaxation timescale in seconds +help=Time-scale in seconds on which dry potential temperature is relaxed to its + =target profile. This is the e-fold time, which is related to the + =half-life time by half_life = ln(2) * timescale. +!kind=default +ns=namelist/Science/External Forcing/Theta Relaxation +sort-key=Panel-A03e +type=real + +#============================================================================== +# TIMESTEPPING +#============================================================================== +[namelist:timestepping=alpha] +compulsory=true +description=?????? +help=Time off-centering parameter +!kind=default +sort-key=Panel-A03 +type=real + +[!namelist:timestepping=beta] +compulsory=false +expression=1.0_r_def - namelist:timestepping=alpha +help=?????? + =?????? +!kind=default +type=real + +[namelist:timestepping=inner_iterations] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=Number of inner (Newton) iterations to do +!kind=default +range=1: +sort-key=Panel-A08 +type=integer + +[namelist:timestepping=method] +compulsory=true +description=Use either explicit Runge-Kutta timestepping or (iterative-) Semi-Implicit scheme +!enumeration=true +help=Set the timestepping method for the GungHo dynamical core, either a fully explicit multi-stage + =Runge-Kutta method ('rk') or an (iterative-) Semi-Implicit scheme ('semi_implicit'). + =It is also possible to set 'no_timestepping'. There are no calls to dynamics or physics and the prognostic fields remain the same. However, time-varying fields such as ancillaries, and LBCs are still updated on each timestep, and diagnostics are output. + ='no_timestepping' is intended as a temporary switch required for basic-ral development. + =But it may also be useful for testing the tangent linear in 4DVar. +sort-key=Panel-A01 +trigger=namelist:timestepping=tau_t: 'semi_implicit' ; + =namelist:timestepping=tau_r: 'semi_implicit' ; + =semi-implicit: 'semi_implicit' ; + =namelist:timestepping=outer_iterations: 'semi_implicit', 'jules' ; + =namelist:timestepping=inner_iterations: 'semi_implicit' ; +value-titles=Semi-implicit, Runge-Kutta, No-timestepping, JULES +values='semi_implicit', 'rk', 'no_timestepping', 'jules' + +[namelist:timestepping=outer_iterations] +compulsory=true +description=?????? +fail-if=this < 1 ; +help=Number of outer (advection) iterations to do +!kind=default +range=1: +sort-key=Panel-A07 +type=integer + +[namelist:timestepping=runge_kutta_method] +compulsory=true +description=????? +!enumeration=true +fail-if= +help=????? + =????? +ns=namelist/Job/Timestepping/runge kutta +sort-key=Panel-A01 +value-titles=Foward Euler, + =Stong Stability Preserving: Order-2, + =Stong Stability Preserving: Order-3, + =Stong Stability Preserving: Order-4, + =Stong Stability Preserving: Order-5 +values='forward_euler', 'ssp2', 'ssp3', 'ssp4', 'ssp5' + +[namelist:timestepping=spinup_alpha] +compulsory=true +description=?????? +help=If true then spin up alpha over the spin up period +!kind=default +sort-key=Panel-A11 +trigger=namelist:timestepping=spinup_period: .true.; +type=logical + +[namelist:timestepping=tau_r] +compulsory=true +description=?????? +fail-if=this < 0.0 +help=Relaxation parameter for density in semi-implicit method +!kind=default +ns=namelist/Job/Timestepping/semi-implicit +range=0.0: +sort-key=Panel-A06 +type=real + +[namelist:timestepping=tau_t] +compulsory=true +description=?????? +fail-if=this < 0.0 +help=Relaxation parameter for potential temperature in semi-implicit method +!kind=default +ns=namelist/Job/Timestepping/semi-implicit +range=0.0: +sort-key=Panel-A05 +type=real + +[namelist:timestepping=tau_u] +compulsory=true +description=?????? +fail-if=this < 0.0 +help=Relaxation parameter for velocity in semi-implicit method +!kind=default +ns=namelist/Job/Timestepping/semi-implicit +range=0.0: +sort-key=Panel-A04 +type=real + +#============================================================================== +# TRANSPORT +#============================================================================== +[namelist:transport] +compulsory=true +description=?????? +help=?????? + =?????? +ns=namelist/Science/Dynamics/Transport +sort-key=Section-A10 + +[namelist:transport=adjust_theta] +compulsory=true +description=Whether to apply dry static adjustment to theta after transport. +fail-if= +help=Applies an insertion sort to theta within a column after it is transported + =to ensure that the resulting theta profile is stable. +!kind=default +sort-key=Panel-A25 +trigger=namelist:transport=adjust_theta_above: .true.; +type=logical + +[namelist:transport=adjust_theta_above] +compulsory=true +description=Height, in metres above sea level, above which to apply dry static + =adjustment to theta. +fail-if= +help=The dry static adjustment will be applied to theta above this height. +!kind=default +sort-key=Panel-A25 +trigger= +type=real + +[namelist:transport=adjust_vhv_wind] +compulsory=true +description=Adujsts the first and final vertical winds in a Strang VHV splitting + =to avoid breaking any Lipschitz condition. +fail-if= +help=Must be used with 3D FFSL and SWIFT splittings +!kind=default +sort-key=Panel-A31 +trigger= +type=logical + +[namelist:transport=ageofair_reset_level] +compulsory=false +description=Level below which ageofair is reset to zero +fail-if=this < 0 ; +range=0: +sort-key=Panel-A01 +type=integer + +[namelist:transport=broken_w2_projection] +compulsory=true +description=Switch to control whether to reconstruct the wind from its + =components in W3 via the broken W2 space, to avoid this leading to + =overshoots and undershoots. +fail-if= +help=Set as true to reconstruct the transported wind increments via broken W2, + =else perform a Galerkin projection into W2. +!kind=default +sort-key=Panel-A21 +trigger= +type=logical + +[namelist:transport=calculate_detj] +compulsory=true +description=Method to compute Det(J) at W2 DoFs used in vertical departure point calculations. +!enumeration=true +help=Det(J) at W2 DoFs is used to compute the vertical departure points for the + =FFSL and semi-Lagrangian transport schemes. To compute Det(J) at vertical W2 + =points we choose either an average of Det(J) from neighbouring cells, or + =use Det(J) from the upwind cell. +sort-key=Panel-A30 +value-titles=Averaged Det(J), Upwind Det(J) +values='averaged', 'upwind' + +[namelist:transport=cap_density_predictor] +compulsory=true +description=Value which limits the divergence factor in the density predictor. +fail-if=this < 0.0 ; +help=The density predictor has the form density*divergence_factor. This option + =provides a value that limits the divergence_factor to be in the range + =1-value <= divergence_factor <= 1+value. +range=0.0:1.0 +sort-key=Panel-A05 +type=real + +[namelist:transport=cfl_mol_1d_stab] +compulsory=false +description=Max stability Courant number for 1D-MOL (One-Dimensional Method of Line). +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:transport=cfl_mol_2d_stab] +compulsory=false +description=Max stability Courant number for 2D-MOL (2-Dimensional Method of Line). +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:transport=cfl_mol_3d_stab] +compulsory=false +description=Max stability Courant number for 3D-MOL (3-Dimensional Method of Line). +fail-if=this < 0.0 ; +range=0.0: +sort-key=Panel-A01 +type=real + +[namelist:transport=cheap_update] +compulsory=true +description=Switch to control whether to use the cheap transport update with + =the semi-implicit time stepping. +fail-if=this == ".true." and namelist:transport=substep_transport != "'off'" +help=Set as true to use the cheap update in gungho transport. The cheap update uses + =wind_n as the advecting wind during the first outer iteration, and + =(wind_np1 - wind_n)/2 for the second outer iteration. The advection increments + =are then summed to give transport with (wind_np1 + wind_n)/2 as the advecting + =wind. The aim is that the second iteration transport has a much smaller CFL and + =so is cheaper than the full transport. For more outer iterations we use + =(wind_np1_current_iteration - wind_np1_previous_iteration)/2 as the advecting + =wind. +!kind=default +sort-key=Panel-A21 +trigger= +type=logical + +[namelist:transport=consistent_metric] +compulsory=true +description=?????? +fail-if= +help=Compute metric terms with the advection scheme +!kind=default +sort-key=Panel-A05 +trigger= +type=logical + +[namelist:transport=dep_pt_stencil_extent] +compulsory=true +description=Determines the size of the stencil extent used to find departure + =points, and hence the size of halos of the model. +fail-if=this < 1 ; +help=This should be set to the expected maximum Courant number for horizontal + =flow. This value is then equal to the maximum departure distance in + =number of cells. +!kind=default +range=1: +sort-key=Panel-A01 +type=integer + +[namelist:transport=dry_field_name] +compulsory=false +description=Name of the dry field used for conservative tracer transport +fail-if= +help=This must be the name of one of the other transported fields +sort-key=Panel-A06 +!string_length=default +type=character + +[namelist:transport=enforce_min_value] +!bounds=namelist:transport=profile_size +compulsory=true +description=Enforce a minimum value for the transported field +help= +!kind=default +length=: +sort-key=Panel-A04c +type=logical + +[namelist:transport=equation_form] +!bounds=namelist:transport=profile_size +compulsory=true +description=Which form of the transport equation to use for each variable. +fail-if=len(this) != namelist:transport=profile_size ; +help=The options are: 1 = 'conservative', 2 = 'advective', 3 = 'consistent' +!kind=default +length=: +sort-key=Panel-A04a +type=integer + +[namelist:transport=ffsl_inner_order] +compulsory=true +description=Order of FFSL scheme for inner operators. +fail-if= +help=The order of the inner operators for the FFSL scheme. This also specifies + =the size of the stencil needed for the reconstruction. Note that Nirvana + =uses a quadratic reconstruction but a smaller stencil than PPM due to the + =calculation of the cell edge values. Either + =0: Piecewise Constant Method (PCM) + =1: Nirvana Method + =2: Piecewise Parabolic Method (PPM) +!kind=default +!range= +sort-key=Panel-A31 +trigger= +type=integer + +[namelist:transport=ffsl_outer_order] +compulsory=true +description=Order of FFSL scheme for outer operators. +fail-if= +help=The order of the outer operators for the FFSL scheme. This also specifies + =the size of the stencil needed for the reconstruction. Note that Nirvana + =uses a quadratic reconstruction but a smaller stencil than PPM due to the + =calculation of the cell edge values. Either + =0: Piecewise Constant Method (PCM) + =1: Nirvana Method + =2: Piecewise Parabolic Method (PPM) +!kind=default +!range= +sort-key=Panel-A31 +trigger= +type=integer + +[namelist:transport=ffsl_splitting] +!bounds=namelist:transport=profile_size +compulsory=true +description=Which horizontal splitting to use for consistent and conservative + =tracer transport with the FFSL scheme. SWIFT facilitates positivity + =but all steps use higher-order reconstructions. COSMIC does not + =facilitate positivity but can use lower-order reconstructions for + =inner steps. +fail-if= +help=The options are 1 = 'swift', 2 = 'cosmic' +!kind=default +length=: +sort-key=Panel-A04d +type=integer + +[namelist:transport=ffsl_unity_3d] +compulsory=true +description=Whether the unity transport field undergoes 3D transport, or reset + =the unity transport at each split transport step. +fail-if= +help=If true, FFSL transport is relative to a 3D unity transport, rather than + =a resetting the unity transport at each step. +!kind=default +sort-key=Panel-A26 +trigger= +type=logical + +[namelist:transport=ffsl_vertical_order] +!bounds=namelist:transport=profile_size +compulsory=true +description=Order of the vertical FFSL scheme. +fail-if= +help=The order of the vertical FFSL scheme. This is the outer order + =for 3D FFSL, and the only order for dimensionally split FFSL. + =0: Piecewise Constant Method (PCM) + =1: Nirvana Method + =2: Piecewise Parabolic Method (PPM) +!kind=default +length=: +sort-key=Panel-A32 +type=integer + +[namelist:transport=field_names] +!bounds=namelist:transport=profile_size +compulsory=true +description=Names of advected fields / groups +fail-if=len(this) != namelist:transport=profile_size ; +help= +length=: +sort-key=Panel-A04 +!string_length=default +type=character + +[namelist:transport=fv_horizontal_order] +compulsory=true +description=Order of polynomials to use for the horizontal reconstruction + =in the MoL scheme +fail-if= +help=?????? + =?????? +!kind=default +!range= +sort-key=Panel-A03 +trigger= +type=integer + +[namelist:transport=fv_vertical_order] +compulsory=true +description=Order of polynomials to use for the vertical reconstruction + =in the MoL scheme +fail-if= +help=?????? + =?????? +!kind=default +!range= +sort-key=Panel-A04 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +type=integer + +[namelist:transport=horizontal_method] +!bounds=namelist:transport=profile_size +compulsory=true +description=Horizontal method to use +fail-if= +help=This should be an enumerated types but enumerated type arrays are not supported. + = The options are 0 = 'null', 1 = 'mol', 2 = 'ffsl', 3 = 'sl' +!kind=default +length=: +sort-key=Panel-A04b +type=integer + +[namelist:transport=horizontal_monotone] +!bounds=namelist:transport=profile_size +compulsory=true +description=monotone scheme used for horizontal transport +fail-if=(this == 2 or this == 3) and namelist:transport=horizontal_method != 1 + =(this == 4 or this == 5 or this == 6 or this == 7) and namelist:transport=horizontal_method == 1 +help=The options are + = 1 = 'none (no monotonicity)', + = 2 = 'clipping (only for MOL)', + = 3 = 'koren (only for MOL)', + = 4 = 'sl_strict (only for FFSL/SL)', + = 5 = 'sl_relaxed (only for FFSL)', + = 6 = 'positive (only for FFSL/SL)', + = 7 = 'quasi-monotone (only for FFSL), assume positivity limiter unless transport=min_value is set' +!kind=default +length=: +sort-key=Panel-A04d +type=integer + +[namelist:transport=log_space] +!bounds=namelist:transport=profile_size +compulsory=true +description=Perform vertical interpolation in log space +help= +!kind=default +length=: +sort-key=Panel-A04c +type=logical + +[namelist:transport=max_vert_cfl_calc] +compulsory=true +description=Method to compute the maximum vertical CFL used for substepping the MoL scheme. +!enumeration=true +fail-if=this=="'dep_point'" and namelist:transport=calculate_detj=="'averaged'" +help=uniform : sets CFL=w dt/dz. This does not take into account the + = vertical grid spacing away from the cell (i.e. it assumes + = a uniform vertical extrusion). + =departure point: uses the vertical departure point calculation to set + = the maximum CFL. The departure point is calculated using + = the physical vertical grid and so the vertical grid spacing + = is taken into account. +sort-key=Panel-A01 +value-titles=uniform, departure point +values='uniform', 'dep_point' + +[namelist:transport=min_val_abs_tol] +compulsory=true +description=The flux limiter is stopped once the minimum field value exceeds the + =absolute tolerance specified here. +fail-if=this > 0.0 ; +help=The flux limiter will stop iterating once the minimum field value exceeds + =this value. Values must be negative. Values should be small compared with + =the typical field value. +range=-99999.99:0.0 +sort-key=Panel-A06 +type=real + +[namelist:transport=min_val_max_iterations] +compulsory=true +description=The maximum number of iterations to be performed by the flux limiter. +fail-if= +help=The flux limiter will be stopped once it has either given a field whose + =minimum exceeds the value specified by the min_val_abs_tol option, + =or once it has performed this many iterations. +!kind=default +sort-key=Panel-A06 +type=integer + +[namelist:transport=min_val_method] +compulsory=true +description=Method to use for the conservative positivity limiter. Applies to + =variables that are transported with the consistent or conservative + =form of the transport equation. Any variable which is only advected + =will be clipped to ensure positivity. +!enumeration=true +help=clipping: a simple, non-conservative clipping. + =iterative: uses an iterative flux limiting method, which limits fluxes + = outgoing from a cell, based on the incoming fluxes. As the + = incoming fluxes may be changed, a single iteration may not + = guarantee positivity. This method therefore iterates until the + = field is acceptably close to being positive, before sweeping up + = any remaining negative values. + =columnwise_fixer: clips negative values in a column, before rescaling the + = remaining positive values to ensure conservation of mass. +sort-key=Panel-A04a +trigger=namelist:transport=min_val_max_iterations: this == "'iterative'"; + =namelist:transport=min_val_abs_tol: this == "'iterative'"; +value-titles=Clipping, iterative, columnwise_fixer +values='clipping', 'iterative', 'columnwise_fixer' + +[namelist:transport=min_value] +!bounds=namelist:transport=profile_size +compulsory=true +description=The minimum value imposed for the transported field +help= +!kind=default +length=: +sort-key=Panel-A04c +type=real + +[namelist:transport=oned_reconstruction] +compulsory=true +description=Control use of 1D or 2D polynomial reconstruction of tracer fields + =for the method of lines advection scheme +fail-if= +help=Use 1D or 2D horizontal reconstruction +!kind=default +sort-key=Panel-A07 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +type=logical + +[namelist:transport=operators] +compulsory=true +description=Use finite volume (lowest order only) or finite element + =operators to compute the spatial reconstruction in the mol scheme +!enumeration=true +fail-if=this=="'fv'" and (namelist:finite_element=element_order_h > 0 or namelist:finite_element=element_order_v > 0) +help=?????? + =?????? +sort-key=Panel-A02 +# This option should only be triggered if transport scheme is method_of_lines +trigger= +value-titles=Finite volume, Finite element +values='fv', 'fem' + +[namelist:transport=panel_edge_high_order] +compulsory=true +description=Whether to use high-order treatment of horizontal reconstructions at + =the edges of cubed-sphere panels, for whichever scheme is used to + =treat panel edges. If true, reconstructions will generally be cubic, + =whereas they will generally be linear if this is set to false. + =Cubic reconstructions will be more accurate but may require larger + =stencils. +fail-if= +help=This sets the order of the panel edge treatment. For each treatment, this + =does the following: + =Extended Mesh: If this is true, the remapping to the extended mesh uses + = cubic polynomials. If false, it uses linear polynomials. + =Special Edges: If this is true, the reconstruction of the special edges + = shifts the stencil by an extra point, which requires the + = model to use a greater halo depth. If false, the horizontal + = reconstruction drops by an order and no extra point is + = required. + =Remapping: If this is true, the remapping to the extended mesh uses + = cubic polynomials. If false, it uses linear polynomials. + = When performing redundant computations, this requires the + = halo depth (and the size of halo exchanges) to be increased. +!kind=default +sort-key=Panel-A05b +trigger= +type=logical + +[namelist:transport=panel_edge_treatment] +compulsory=true +description=Describes how horizontal field reconstructions are handled at the + =edges of cubed-sphere panels during transport. At these edges, the + =coordinate fields are discontinuous, which can lead to grid + =imprinting when performing a naive reconstruction. Several different + =options are implemented, with different properties. +!enumeration=true +fail-if= +help=The options are described as follows: + =None: No treatment of panel edges is applied, which can lead to + = grid imprinting. + =Extended Mesh: Reconstructions are performed on computational panels that + = extend beyond the normal boundaries at alpha/beta +/- pi/4. + = Reconstructions therefore occur in uniform alpha-beta space. + = This option performs well for the Method-of-Lines scheme + = (it is only relevant for the Koren monotonicity scheme or + = when using 1D reconstructions), but can be expensive when + = used with FFSL, where any part of a calculation that crosses + = a panel edge is performed on the "extended mesh". This + = breaks formal monotonicity properties. + =Special Edges: Only relevant to FFSL. Reconstructions do not span panel + = edges, and involve shifting the stencil so that the stencil + = lies on a single panel, and the reconstructed field is + = extrapolated. + =Remapping: Fields are also mapped to extended panels, like in the + = "extended mesh" option, but these are only used in the + = fractional part of FFSL flux calculations. This still obeys + = any desired conservation and monotonicity properties. +sort-key=Panel-A05 +value-titles=None, Extended Mesh, Special Edges, Remapping +values='none', 'extended_mesh', 'special_edges', 'remapping' + +[namelist:transport=profile_size] +compulsory=true +description=Number of transport schemes to define +help=Number of transport schemes to define +!kind=default +range=0:100 +sort-key=Panel-A02 +type=integer + +[namelist:transport=reversible] +!bounds=namelist:transport=profile_size +compulsory=true +description=Use a reversible transport scheme +help=Use Hermite polynomials rather than Lagrange polynomials for the + =reconstructions used in the vertical SL or MoL transport schemes. By + =using this polynomial, the reconstruction will be independent of the + =vertical velocity. When used with vertical MoL transport, this Hermite + =polynomial only appears in the final Runge-Kutta stage. + =This option must be set to .true. when using a reversible configuration of + =the FFSL scheme for vertical transport. +!kind=default +length=: +sort-key=Panel-A04c +type=logical + +[namelist:transport=runge_kutta_method] +compulsory=true +description=Runge Kutta method to use the MoL scheme +!enumeration=true +fail-if= +help=Runge-Kutta method to use for the method of lines + =transport scheme. A variety of Strong Stability Preserving (SSP) + =methods with different orders of accuracy and CFL limit + =are available along with a forward Euler method which should be + =used for explicit timestepping methods +ns=namelist/Job/Transport/runge kutta +sort-key=Panel-A01 +value-titles=Foward Euler, + =Strong Stability Preserving: Order-2, + =Strong Stability Preserving: Order-3, + =Strong Stability Preserving: Order-4, + =Strong Stability Preserving: Order-5 +values='forward_euler', 'ssp2', 'ssp3', 'ssp4', 'ssp5' + +[namelist:transport=scheme] +!bounds=namelist:transport=profile_size +compulsory=true +description=Transport scheme to use +fail-if= +help=This should be an enumerated types but enumerated type arrays are not supported. + = The options are 1 = 'mol', 2 = 'ffsl', 3 = 'split' +!kind=default +length=: +sort-key=Panel-A04b +type=integer + +[namelist:transport=si_outer_transport] +compulsory=true +description=Efficiency option to speed up transport in the first outer + =semi-implicit iteration. +!enumeration=true +fail-if= +help=none : do nothing to speed up transport + =advective : use semi-Lagrangian advective transport for the first outer + = transport + =no_mono : use no monotonicity for the first outer transport + =horizontal_sl: horizontal semi-Lagrangian transport for the first outer + = transport +sort-key=Panel-A01 +value-titles=None, Advective, No monotonicity, Horizontal SL +values='none', 'advective', 'no_mono', 'horizontal_sl' + +[namelist:transport=slice_order] +compulsory=false +description=Order of the polynomial used for the reconstruction in slice-remapping. +!enumeration=true +fail-if= +help=constant : Constant piecewise reconstruction + =linear : Linear piecewise reconstruction + =parabola : Parabolic piecewise reconstruction + =cubic : Cubic piecewise reconstruction +sort-key=Panel-A01 +value-titles=constant, linear, parabola, cubic +values='constant', 'linear', 'parabola','cubic' + +[namelist:transport=special_edges_monotone] +!bounds=namelist:transport=profile_size +compulsory=true +description=Monotone option used for horizontal transport at special edges +help=This monotone option is only applied to fluxes at cubed sphere panel + =edges when the special edge treatment is used with FFSL. The array length + =is equal to the 'profile_size', so that a different option can be used for + =each transported variable. The options are + = 0 = 'none (no monotonicity)', + = 1 = 'full (same as horizontal_monotone)', + = 2 = 'positive (enforces positivity)', +!kind=default +length=: +range=0:2 +sort-key=Panel-A04d +type=integer + +[namelist:transport=splitting] +!bounds=namelist:transport=profile_size +compulsory=true +description=Directional (horizontal-vertical) splitting to use. +fail-if= +help=This should be an enumerated types but enumerated type arrays are not yet + =implemented. + =The options are given as a sequence of H (horizontal) and V (vertical) + =letters. These are + =1: no splitting + =2: Strang VHV splitting (weights of 1/2, 1, 1/2) + =3: Strang HVH splitting (weights of 1/2, 1, 1/2) + =4: VH splitting (weights of 1, 1) + =5: HV splitting (weights of 1, 1) + =6: VHVHV splitting (weights of 1/3, 1/2, 1/3, 1/2, 1/3) + =7: VHVHV splitting (weights of 1/4, 1/2, 1/2, 1/2, 1/4) + =8: VHHV splitting (weights of 1/2, 1/2, 1/2, 1/2) + =Note that Strang VHV is the preferred efficient splitting for SWIFT. +!kind=default +length=: +sort-key=Panel-A04b +type=integer + +[namelist:transport=substep_transport] +compulsory=true +description=Turn on substepping of gungho transport for FFSL if certain + =conditions are broken. +!enumeration=true +fail-if=this != "'off'" and namelist:transport=cheap_update == ".true." +help=off : Do not substep gungho transport + =adaptive : Substep if the maximum Lipschitz number exceeds 1 or if + = the maximum Courant number exceeds the stencil extent + =two : Run with two substeps for transport - used for debugging only + =four : Run with four substeps for transport - used for debugging only +sort-key=Panel-A01 +value-titles=off, adaptive, two, four +values='off', 'adaptive', 'two', 'four' + +[namelist:transport=theta_dispersion_correction] +compulsory=true +description=Whether to use the correction to improve the dispersion relation + =when using conservative theta transport. +fail-if= +help=When transporting the potential temperature variable with a conservative + =transport scheme, care is needed to avoid polluting the dispersion of + =gravity waves. This switch turns on the correction to the horizontal fluxes + =of Thuburn 2022, which improves the dispersion. +!kind=default +sort-key=Panel-A01b +trigger= +type=logical + +[namelist:transport=theta_variable] +compulsory=true +description=Which potential temperature variable to transport. +!enumeration=true +fail-if= +help=dry : The dry potential temperature, "theta = T/Pi" + =virtual dry : The virtual dry potential temperature, + = "theta_{vd} = T/Pi*(1+m_v/eps)" + =moist : The moist potential temperature that is materially conserved + = in the absence of phase changes, + = "theta_{m} = T*(p/p_0)^{cpm/Rm}", where the exponent involves + = the moist gas constant and moist specific heat capacity. In + = the absence of moisture, this reverts to the dry variable. +sort-key=Panel-A24 +value-titles=dry, virtual dry, moist +values='dry', 'virtual_dry', 'moist' + +[namelist:transport=transport_ageofair] +compulsory=false +description=Option to transport age-of-air diagnostic. +fail-if= +!range=: +sort-key=Panel-A01 +type=logical + +[namelist:transport=use_density_predictor] +compulsory=true +description=DEPRECATED If set to true, then the divergence term will be included + =in the transport of density +fail-if= +help=Use predictor for density for improved stability of SI timestep +!kind=default +sort-key=Panel-A05 +type=logical + +[namelist:transport=vertical_method] +!bounds=namelist:transport=profile_size +compulsory=true +description=Method to use for vertical transport. If FFSL is used with a + =reversible reconstruction, then the reversible namelist option must + =also be set to true. +fail-if= +help=This should be an enumerated types but enumerated type arrays are not supported. + = The options are 0 = 'null', 1 = 'mol', 2 = 'ffsl', 3 = 'sl' +!kind=default +length=: +sort-key=Panel-A04b +type=integer + +[namelist:transport=vertical_monotone] +!bounds=namelist:transport=profile_size +compulsory=true +description=monotone scheme used for vertical transport +fail-if=(this == 2 or this == 3) and namelist:transport=vertical_method != 1 + =(this == 4 or this == 5 or this == 6 or this == 7) and namelist:transport=vertical_method == 1 +help=The options are + = 1 = 'none (no monotonicity)', + = 2 = 'clipping (only for MOL)', + = 3 = 'koren (only for MOL)', + = 4 = 'sl_strict (only for FFSL/SL)', + = 5 = 'sl_relaxed (only for FFSL/SL)', + = 6 = 'positive (only for FFSL)', + = 7 = 'quasi-monotone (only for FFSL with PPM), assume positivity limiter unless transport=min_value is set' +!kind=default +length=: +sort-key=Panel-A04e +type=integer + +[namelist:transport=vertical_monotone_order] +!bounds=namelist:transport=profile_size +compulsory=true +description=option (or order) of the monotone scheme for semi-Lagrangian vertical transport +help=The options are 1 = 'constant', 2 = 'linear', 3 = 'high' +!kind=default +length=: +sort-key=Panel-A04f +type=integer + +[namelist:transport=vertical_sl_order] +compulsory=false +description=Order of the polynomial used for the vertical semi-Lagrangian. +!enumeration=true +fail-if= +help=cubic : Cubic interpolation + =quintic : Quintic interpolation + =cubic_hermite : Cubic-Hermite interpolation + =linear : Linear interpolation +sort-key=Panel-A01 +value-titles=cubic, quintic, cubic_hermite, linear +values='cubic','quintic','cubic_hermite', 'linear' + +[namelist:transport=wind_mono_top] +compulsory=true +description=Whether to apply a monotonicity limiter to the vertical transport of + =wind components near the top of the atmosphere. +fail-if= +help=Applies the relaxed monotonicity limiter to the vertical transport of wind + =components for a number of layers at the top of the atmosphere (the + =number of layers is specified by the "wind_mono_top_depth" option). If + =monotonicity is already specified for the vertical wind transport, this + =does nothing. This is only applicable to the FFSL scheme, and for + =irreversible Nirvana reconstructions. +!kind=default +sort-key=Panel-A15 +trigger=namelist:transport=wind_mono_top_depth: this == ".true." +type=logical + +[namelist:transport=wind_mono_top_depth] +compulsory=true +description=The number of levels at the model top over which to apply the + =monotonicity limiter to the vertical transport of wind components. +fail-if=this < 0; + =this > namelist:extrusion=number_of_layers; +help= +!kind=default +sort-key=Panel-A15b +type=integer + +#============================================================================== +# IDEALISED FORCING OF WATER VAPOUR +#============================================================================== +[namelist:vapour_forcing] +compulsory=true +description=Settings for water vapour forcing +ns=namelist/Science/External Forcing/Vapour forcing +sort-key=B1 +title=Water vapour forcing + +[namelist:vapour_forcing=coordinate] +compulsory=true +description=Vertical coordinate for vapour tendency forcing +!enumeration=true +help=Vapour tendency forcing profiles may be specified with either height + =or pressure as the vertical coordinate. In both cases the coordinate + =information is entered using the heights array. + =Height: height in metres above sea-level. Values should be monotonically increasing. + =Pressure: pressure level in Pascals. Values should be monotonically decreasing. +!kind=default +ns=namelist/Science/External Forcing/Vapour forcing +sort-key=Panel-A04b +value-titles=Height, Pressure +values='height', 'pressure' + +[namelist:vapour_forcing=heights] +!bounds=namelist:vapour_forcing=number_heights +compulsory=true +description=Vapour tendency heights +fail-if=len(this) != namelist:vapour_forcing=number_heights +help=Heights for vapour tendency profile. If in ascending order, these are + =taken to be height in metres. Heights specified in descending order are + =taken to be pressure coordinate in Pascals. +!kind=default +length=: +ns=namelist/Science/External Forcing/Vapour forcing +sort-key=Panel-A04c +type=real + +[namelist:vapour_forcing=number_heights] +compulsory=true +description=Size of vapour tendency profile +help=Number of data points in the vapour tendency profile. +!kind=default +ns=namelist/Science/External Forcing/Vapour forcing +range=0:200 +sort-key=Panel-A04a +type=integer + +[namelist:vapour_forcing=number_times] +compulsory=true +description=Number of vapour tendency profile +help=Vapour tendency profiles at the times specified in + =the times array. +!kind=default +ns=namelist/Science/External Forcing/Vapour forcing +range=0:100 +sort-key=Panel-A04d +type=integer + +[namelist:vapour_forcing=profile_data] +!bounds=namelist:vapour_forcing=number_heights * namelist:vapour_forcing=number_times +compulsory=true +description=Temperature tendency data +fail-if=len(this) != namelist:vapour_forcing=number_heights * namelist:vapour_forcing=number_times +help=Water vapour mixing ratio tendency (kg/kg/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Vapour forcing +sort-key=Panel-A04e +type=real + +[namelist:vapour_forcing=times] +!bounds=namelist:vapour_forcing=number_times +compulsory=true +description=Vapour tendency times +fail-if=len(this) != namelist:vapour_forcing=number_times +help= +!kind=default +length=: +ns=namelist/Science/External Forcing/Vapour forcing +sort-key=Panel-A04f +type=real + +#============================================================================== +# IDEALISED FORCING - VERTICAL ADVECTION OF THETA, MV, MCL, U, V +#============================================================================== +[namelist:vertadvect] +compulsory=true +description=Settings for vertical advection forcing +ns=namelist/Science/External Forcing/Advection Forcing +sort-key=D1 +title=Vertical advection forcing + +[namelist:vertadvect=heights] +!bounds=namelist:vertadvect=number_heights +compulsory=true +description=Heights of points in vertical advection velocity profiles +fail-if=len(this) != namelist:vertadvect=number_heights +help=Heights for vertical advection wind profiles. If in ascending order, + =these are taken to be height in metres. Heights specified in descending + =order are taken to be pressure coordinate in Pascals. +!kind=default +length=: +ns=namelist/Science/External Forcing/Advection Forcing +sort-key=Panel-A05c +type=real + +[namelist:vertadvect=number_heights] +compulsory=true +description=Number of points in each vertical advection velocity profile +help= +!kind=default +ns=namelist/Science/External Forcing/Advection Forcing +range=0:200 +sort-key=Panel-A05a +type=integer + +[namelist:vertadvect=number_times] +compulsory=true +description=Number of vertical advection velocity profiles +help= +!kind=default +ns=namelist/Science/External Forcing/Advection Forcing +range=0:100 +sort-key=Panel-A05d +type=integer + +[namelist:vertadvect=profile_data_w] +!bounds=namelist:vertadvect=number_heights * namelist:vertadvect=number_times +compulsory=true +description=Vertical advection vertical velocity data +fail-if=len(this) != namelist:vertadvect=number_heights * namelist:vertadvect=number_times +help=Vertical Advection wind (m/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Advection Forcing +sort-key=Panel-A05d +type=real + +[namelist:vertadvect=times] +!bounds=namelist:vertadvect=number_times +compulsory=true +description=Timestamps (in seconds) of vertical advection profiles +help=Validity times (in seconds) of the vertical velocity profiles + =for idealised vertical advection forcing +!kind=default +length=: +ns=namelist/Science/External Forcing/Advection Forcing +sort-key=Panel-A05f +type=real + +#============================================================================== +# IDEALISED FORCING OF HORIZONTAL WIND COMPONENTS +#============================================================================== +[namelist:wind_forcing] +compulsory=true +description=Settings for wind forcing +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=C1 +title=Horizontal wind forcing + +[namelist:wind_forcing=coordinate] +compulsory=true +description=Vertical coordinate for wind tendency forcing +!enumeration=true +help=Wind tendency forcing profiles may be specified with either height + =or pressure as the vertical coordinate. In both cases the coordinate + =information is entered using the heights array. + =Height: height in metres above sea-level. Values should be monotonically increasing. + =Pressure: pressure level in Pascals. Values should be monotonically decreasing. +!kind=default +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=Panel-A01b +value-titles=Height, Pressure +values='height', 'pressure' + +[namelist:wind_forcing=heights] +!bounds=namelist:wind_forcing=number_heights +compulsory=true +description=Wind tendency heights +fail-if=len(this) != namelist:wind_forcing=number_heights +help=Heights for wind tendency profile. If in ascending order, these are + =taken to be height in metres. Heights specified in descending order are + =taken to be pressure coordinate in Pascals. +!kind=default +length=: +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=Panel-A01c +type=real + +[namelist:wind_forcing=number_heights] +compulsory=true +description=Size of wind tendency profile +help=Number of data points in the wind tendency profile. +!kind=default +ns=namelist/Science/External Forcing/Wind Forcing +range=0:200 +sort-key=Panel-A01a +type=integer + +[namelist:wind_forcing=number_times] +compulsory=true +description=Number of wind tendency profile +help=Wind tendency profiles at the times specified in + =the times array. +!kind=default +ns=namelist/Science/External Forcing/Wind Forcing +range=0:100 +sort-key=Panel-A01a +type=integer + +[namelist:wind_forcing=profile_data_u] +!bounds=namelist:wind_forcing=number_heights * namelist:wind_forcing=number_times +compulsory=true +description=Wind tendency data +fail-if=len(this) != namelist:wind_forcing=number_heights * namelist:wind_forcing=number_times +help=Wind tendency for u-component of wind (m/s/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=Panel-A01d +type=real + +[namelist:wind_forcing=profile_data_v] +!bounds=namelist:wind_forcing=number_heights * namelist:wind_forcing=number_times +compulsory=true +description=Wind tendency data +fail-if=len(this) != namelist:wind_forcing=number_heights * namelist:wind_forcing=number_times +help=Wind tendency for v-component of wind (m/s/s) +!kind=default +length=: +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=Panel-A01d +type=real + +[namelist:wind_forcing=times] +!bounds=namelist:wind_forcing=number_times +compulsory=true +description=Wind tendency times +fail-if=len(this) != namelist:wind_forcing=number_times +help= +!kind=default +length=: +ns=namelist/Science/External Forcing/Wind Forcing +sort-key=Panel-A01c +type=real + +[physics mapping] +ns=namelist/Science/Physics mapping +sort-key=C + +[planet properties] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Model/Planet/Properties +sort-key=Section-A02 + +[run configuration] +compulsory=false +ns=namelist +title=Run Task Settings + +[runge-kutta] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Job/Timestepping/runge kutta +sort-key=Section-A01 +title=Runge-Kutta + +#============================================================================== +# SCIENCE CONFIGURATION +#============================================================================== +[science] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Science +sort-key=Section-A03 + +[semi-implicit] +compulsory=false +description=?????? +help=?????? + =?????? +ns=namelist/Job/Timestepping/semi-implicit +sort-key=Section-A02 +title=Semi-implicit + +[timestep placements] +ns=namelist/Science/Timestep placement +sort-key=D diff --git a/science/linear/rose-meta/lfric-linear/version22_30.py b/science/linear/rose-meta/lfric-linear/version22_30.py new file mode 100644 index 000000000..53f80d4b3 --- /dev/null +++ b/science/linear/rose-meta/lfric-linear/version22_30.py @@ -0,0 +1,533 @@ +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version21_22 import * + + +class UpgradeError(Exception): + """Exception created when an upgrade fails.""" + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + sys.tracebacklimit = 0 + return self.msg + + __str__ = __repr__ + + +""" +Copy this template and complete to add your macro +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports +""" + + +class vn22_t885(MacroUpgrade): + """Upgrade macro for ticket #885 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2" + AFTER_TAG = "vn2.2_t885" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Add iau_sst_path to files namelist""" + self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") + """Add iau_sst to section_choice namelist""" + self.add_setting( + config, ["namelist:section_choice", "iau_sst"], ".false." + ) + return config, self.reports + + +class vn22_t4661(MacroUpgrade): + """Upgrade macro for ticket #4661 by Denis Sergeev.""" + + BEFORE_TAG = "vn2.2_t885" + AFTER_TAG = "vn2.2_t4661" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") + return config, self.reports + + +class vn22_t771(MacroUpgrade): + """Upgrade macro for ticket #771 by josephwallwork.""" + + BEFORE_TAG = "vn2.2_t4661" + AFTER_TAG = "vn2.2_t771" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """Add new namelist options for chemistry timestep halving""" + self.add_setting( + config, + ["namelist:chemistry", "i_chem_timestep_halvings"], + value="0", + ) + return config, self.reports + + +class vn22_t887(MacroUpgrade): + """Upgrade macro for ticket #887 by Mike Whitall.""" + + BEFORE_TAG = "vn2.2_t771" + AFTER_TAG = "vn2.2_t887" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-cloud + nml = "namelist:cloud" + self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") + self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") + return config, self.reports + + +class vn22_t987(MacroUpgrade): + """Upgrade macro for ticket #987 by Christine Johnson.""" + + BEFORE_TAG = "vn2.2_t887" + AFTER_TAG = "vn2.2_t987" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") + else: + self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") + return config, self.reports + + +class vn22_t886(MacroUpgrade): + """Upgrade macro for ticket #886 by Samantha Pullen.""" + + BEFORE_TAG = "vn2.2_t987" + AFTER_TAG = "vn2.2_t886" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + return config, self.reports + + +class vn22_t850(MacroUpgrade): + """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" + + BEFORE_TAG = "vn2.2_t886" + AFTER_TAG = "vn2.2_t850" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + idealised_test_name = self.get_setting_value( + config, ["namelist:idealised", "test"] + ) + l_multigrid = self.get_setting_value( + config, ["namelist:formulation", "l_multigrid"] + ) + limited_area = self.get_setting_value( + config, ["namelist:boundaries", "limited_area"] + ) + if ( + idealised_test_name == "'none'" + and limited_area == ".true." + and l_multigrid == ".true." + ): + self.change_setting_value( + config, + ["namelist:section_choice", "stochastic_physics"], + "'um'", + ) + self.add_setting( + config, + ["namelist:physics", "stochastic_physics_placement"], + "'fast'", + ) + blpert_type = "'theta_and_moist'" + mesh_names = self.get_setting_value( + config, ["namelist:multigrid", "chain_mesh_tags"] + ) + coarsest_mesh_name = mesh_names.split(",")[-1] + else: + blpert_type = "'off'" + coarsest_mesh_name = "''" + self.add_setting( + config, ["namelist:stochastic_physics", "blpert_type"], blpert_type + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_mesh_name"], + coarsest_mesh_name, + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_time_correlation"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_decorrelation_time"], + "600.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_only_near_edge"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_npts_from_edge"], + "24", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_noncumulus_points"], + ".false.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_bottom"], + "0.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_height_top"], + "1500.0", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_add_vertical_shape"], + ".true.", + ) + self.add_setting( + config, + ["namelist:stochastic_physics", "blpert_max_magnitude"], + "1.0", + ) + return config, self.reports + + +class vn22_t36(MacroUpgrade): + """Upgrade macro for ticket #36 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t850" + AFTER_TAG = "vn2.2_t36" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Reorganises the transport options that describe treatment of + cubed-sphere panel edges. + Replace all "special edges" options with "remapping". + """ + # Get values of old options + nml = "namelist:transport" + special_edges = self.get_setting_value( + config, [nml, "special_edges_treatment"] + ) + extended = self.get_setting_value(config, [nml, "extended_mesh"]) + # Work out the new option for "panel_edge_treatment" + if special_edges == ".true.": + panel_edge_treatment = "'special_edges'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + elif extended == ".true.": + panel_edge_treatment = "'extended_mesh'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") + else: + panel_edge_treatment = "'none'" + self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") + # Add the new option and remove the old ones + self.remove_setting(config, [nml, "extended_mesh"]) + self.remove_setting(config, [nml, "special_edges_treatment"]) + self.remove_setting(config, [nml, "special_edges_high_order"]) + self.add_setting( + config, [nml, "panel_edge_treatment"], panel_edge_treatment + ) + return config, self.reports + + +class vn22_t797(MacroUpgrade): + """Upgrade macro for ticket #797 by Charlotte Norris.""" + + BEFORE_TAG = "vn2.2_t36" + AFTER_TAG = "vn2.2_t797" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, + fastjx_dir, fjx_spec_file to namelist chemistry + """ + self.add_setting( + config, ["namelist:chemistry", "fastjx_numwavel"], "18" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.add_setting( + config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_solar_file"], + "'FJX_solcyc_May17.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fjx_spec_file"], + "'FJX_spec_Nov11.dat'", + ) + self.add_setting( + config, + ["namelist:chemistry", "fastjx_dir"], + "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", + ) + return config, self.reports + + +class vn22_t995(MacroUpgrade): + """Upgrade macro for ticket None by None.""" + + BEFORE_TAG = "vn2.2_t797" + AFTER_TAG = "vn2.2_t995" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") + return config, self.reports + + +class vn22_t202(MacroUpgrade): + """Upgrade macro for ticket #202 by Katty Huang.""" + + BEFORE_TAG = "vn2.2_t995" + AFTER_TAG = "vn2.2_t202" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" + ) + self.add_setting( + config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" + ) + return config, self.reports + + +class vn22_t827(MacroUpgrade): + """Upgrade macro for ticket #827 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t202" + AFTER_TAG = "vn2.2_t827" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Adds the "theta_moist_source" variable to the formulation namelist, + which controls the option to add the missing term to the potential + temperature equation, relating to the different heat capacities of moist + phases. This is set to be trig-ignored when moisture settings are not + 'traditional'. In both cases the default value is .false. + """ + nml = "namelist:formulation" + moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) + default_setting = ".false." + if moisture == "'traditional'": + self.add_setting( + config, [nml, "theta_moist_source"], default_setting + ) + else: + # Trig-ignored as moisture not being used + self.add_setting( + config, [nml, "!!theta_moist_source"], default_setting + ) + return config, self.reports + + +class vn22_t938(MacroUpgrade): + """Upgrade macro for ticket #938 by Jon Elsey.""" + + BEFORE_TAG = "vn2.2_t827" + AFTER_TAG = "vn2.2_t938" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-aerosol + # Add setting for ukca_mode_segment_size + self.add_setting( + config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" + ) + return config, self.reports + + +class vn22_t903(MacroUpgrade): + """Upgrade macro for ticket #903 by James Kent.""" + + BEFORE_TAG = "vn2.2_t938" + AFTER_TAG = "vn2.2_t903" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add horizontal predictor options to formulation namelist + self.add_setting( + config, + ["namelist:formulation", "horizontal_physics_predictor"], + ".false.", + ) + self.add_setting( + config, + ["namelist:formulation", "horizontal_transport_predictor"], + ".false.", + ) + return config, self.reports + + +class vn22_t1012(MacroUpgrade): + """Upgrade macro for ticket #1012 by Maggie Hendry.""" + + BEFORE_TAG = "vn2.2_t903" + AFTER_TAG = "vn2.2_t1012" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Blank upgrade macro to bump tag + return config, self.reports + + +class vn22_t953(MacroUpgrade): + """Upgrade macro for ticket #593 by Thomas Bendall.""" + + BEFORE_TAG = "vn2.2_t1012" + AFTER_TAG = "vn2.2_t953" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """ + Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. + The "wind_mono_top" option is set to false by default. + """ + num_layers = self.get_setting_value( + config, ["namelist:extrusion", "number_of_layers"] + ) + wind_mono_top = ".false." + # Add wind_mono_top setting + self.add_setting( + config, ["namelist:transport", "wind_mono_top"], wind_mono_top + ) + # Add wind_mono_top_depth setting + # If the number of layers is greater than 10, set the depth to 5 + # otherwise set it to 0 + if int(num_layers) > 10: + wind_mono_top_depth = "5" + else: + wind_mono_top_depth = "0" + self.add_setting( + config, + ["namelist:transport", "wind_mono_top_depth"], + wind_mono_top_depth, + ) + return config, self.reports + + +class vn22_t4020(MacroUpgrade): + """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" + + BEFORE_TAG = "vn2.2_t953" + AFTER_TAG = "vn2.2_t4020" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-driver + self.add_setting( + config, ["namelist:io", "end_of_run_checkpoint"], ".true." + ) + self.add_setting(config, ["namelist:io", "checkpoint_times"], "") + return config, self.reports + + +class vn22_t618(MacroUpgrade): + """Upgrade macro for ticket #618 by Mohit Dalvi.""" + + BEFORE_TAG = "vn2.2_t4020" + AFTER_TAG = "vn2.2_t618" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-chemistry + """ + Add Photolysis scheme and FastJX namelist items to chemistry namelist. + Value of photol_scheme is based on chem_scheme choice. + Change the value of fastjx_dir to replace hardwired path with + link from central ctldata extract + """ + chem_scheme = self.get_setting_value( + config, ["namelist:chemistry", "chem_scheme"] + ) + if chem_scheme == "'strattrop'": + phot_scheme = "'fastjx'" + else: + phot_scheme = "'off'" # Default + self.add_setting( + config, ["namelist:chemistry", "photol_scheme"], phot_scheme + ) + self.add_setting( + config, ["namelist:chemistry", "chem_timestep"], "3600" + ) + self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") + self.add_setting( + config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" + ) + self.add_setting( + config, ["namelist:chemistry", "fjx_solcyc_months"], "0" + ) + self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") + self.change_setting_value( + config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" + ) + return config, self.reports + + +class vn22_t34(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn2.2_t618" + AFTER_TAG = "vn3.0" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/um-stochastic_physics + # Blank Upgrade Macro + # Commands From: rose-meta/um-spectral_gwd + # Blank Upgrade Macro + # Commands From: rose-meta/um-orographic_drag + # Blank Upgrade Macro + # Commands From: rose-meta/um-microphysics + # Blank Upgrade Macro + # Commands From: rose-meta/um-iau + # Blank Upgrade Macro + # Commands From: rose-meta/um-convection + # Blank Upgrade Macro + # Commands From: rose-meta/um-cloud + # Blank Upgrade Macro + # Commands From: rose-meta/um-chemistry + # Blank Upgrade Macro + # Commands From: rose-meta/um-boundary_layer + # Blank Upgrade Macro + # Commands From: rose-meta/um-aerosol + # Blank Upgrade Macro + # Commands From: rose-meta/socrates-radiation + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lfric + # Blank Upgrade Macro + # Commands From: rose-meta/jules-lsm + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-driver + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-gungho + # Blank Upgrade Macro + # Commands From: rose-meta/lfric-linear + # Blank Upgrade Macro + return config, self.reports diff --git a/science/linear/rose-meta/lfric-linear/versions.py b/science/linear/rose-meta/lfric-linear/versions.py index bd569e3af..152c043d0 100644 --- a/science/linear/rose-meta/lfric-linear/versions.py +++ b/science/linear/rose-meta/lfric-linear/versions.py @@ -2,7 +2,7 @@ from metomi.rose.upgrade import MacroUpgrade -from .version21_22 import * +from .version22_30 import * class UpgradeError(Exception): @@ -20,485 +20,14 @@ def __repr__(self): """ Copy this template and complete to add your macro + class vnXX_txxx(MacroUpgrade): # Upgrade macro for by + BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" + def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn22_t885(MacroUpgrade): - """Upgrade macro for ticket #885 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2" - AFTER_TAG = "vn2.2_t885" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Add iau_sst_path to files namelist""" - self.add_setting(config, ["namelist:files", "iau_sst_path"], "''") - """Add iau_sst to section_choice namelist""" - self.add_setting( - config, ["namelist:section_choice", "iau_sst"], ".false." - ) - return config, self.reports - - -class vn22_t4661(MacroUpgrade): - """Upgrade macro for ticket #4661 by Denis Sergeev.""" - - BEFORE_TAG = "vn2.2_t885" - AFTER_TAG = "vn2.2_t4661" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting(config, ["namelist:extrusion", "eta_values"], "''") - return config, self.reports - - -class vn22_t771(MacroUpgrade): - """Upgrade macro for ticket #771 by josephwallwork.""" - - BEFORE_TAG = "vn2.2_t4661" - AFTER_TAG = "vn2.2_t771" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """Add new namelist options for chemistry timestep halving""" - self.add_setting( - config, - ["namelist:chemistry", "i_chem_timestep_halvings"], - value="0", - ) - return config, self.reports - - -class vn22_t887(MacroUpgrade): - """Upgrade macro for ticket #887 by Mike Whitall.""" - - BEFORE_TAG = "vn2.2_t771" - AFTER_TAG = "vn2.2_t887" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-cloud - nml = "namelist:cloud" - self.add_setting(config, [nml, "dbsdtbs_turb_0"], "1.5E-4") - self.add_setting(config, [nml, "i_pc2_erosion_numerics"], "'implicit'") - return config, self.reports - - -class vn22_t987(MacroUpgrade): - """Upgrade macro for ticket #987 by Christine Johnson.""" - - BEFORE_TAG = "vn2.2_t887" - AFTER_TAG = "vn2.2_t987" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - scaling = self.get_setting_value( - config, ["namelist:planet", "scaling_factor"] - ) - if "125.0" in scaling: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".false.") - else: - self.add_setting(config, ["namelist:linear", "fixed_ls"], ".true.") - - return config, self.reports - - -class vn22_t886(MacroUpgrade): - """Upgrade macro for ticket #886 by Samantha Pullen.""" - - BEFORE_TAG = "vn2.2_t987" - AFTER_TAG = "vn2.2_t886" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-iau - # Blank Upgrade Macro - return config, self.reports - - -class vn22_t850(MacroUpgrade): - """Upgrade macro for ticket #850 by Shusuke Nishimoto.""" - - BEFORE_TAG = "vn2.2_t886" - AFTER_TAG = "vn2.2_t850" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-stochastic_physics - idealised_test_name = self.get_setting_value( - config, ["namelist:idealised", "test"] - ) - l_multigrid = self.get_setting_value( - config, ["namelist:formulation", "l_multigrid"] - ) - limited_area = self.get_setting_value( - config, ["namelist:boundaries", "limited_area"] - ) - if ( - idealised_test_name == "'none'" - and limited_area == ".true." - and l_multigrid == ".true." - ): - self.change_setting_value( - config, - ["namelist:section_choice", "stochastic_physics"], - "'um'", - ) - self.add_setting( - config, - ["namelist:physics", "stochastic_physics_placement"], - "'fast'", - ) - blpert_type = "'theta_and_moist'" - mesh_names = self.get_setting_value( - config, ["namelist:multigrid", "chain_mesh_tags"] - ) - coarsest_mesh_name = mesh_names.split(",")[-1] - else: - blpert_type = "'off'" - coarsest_mesh_name = "''" - self.add_setting( - config, ["namelist:stochastic_physics", "blpert_type"], blpert_type - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_mesh_name"], - coarsest_mesh_name, - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_time_correlation"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_decorrelation_time"], - "600.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_only_near_edge"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_npts_from_edge"], - "24", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_noncumulus_points"], - ".false.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_bottom"], - "0.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_height_top"], - "1500.0", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_add_vertical_shape"], - ".true.", - ) - self.add_setting( - config, - ["namelist:stochastic_physics", "blpert_max_magnitude"], - "1.0", - ) - - return config, self.reports - - -class vn22_t36(MacroUpgrade): - """Upgrade macro for ticket #36 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t850" - AFTER_TAG = "vn2.2_t36" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Reorganises the transport options that describe treatment of - cubed-sphere panel edges. - Replace all "special edges" options with "remapping". - """ - # Get values of old options - nml = "namelist:transport" - special_edges = self.get_setting_value( - config, [nml, "special_edges_treatment"] - ) - extended = self.get_setting_value(config, [nml, "extended_mesh"]) - # Work out the new option for "panel_edge_treatment" - if special_edges == ".true.": - panel_edge_treatment = "'special_edges'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - elif extended == ".true.": - panel_edge_treatment = "'extended_mesh'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".false.") - else: - panel_edge_treatment = "'none'" - self.add_setting(config, [nml, "panel_edge_high_order"], ".true.") - # Add the new option and remove the old ones - self.remove_setting(config, [nml, "extended_mesh"]) - self.remove_setting(config, [nml, "special_edges_treatment"]) - self.remove_setting(config, [nml, "special_edges_high_order"]) - self.add_setting( - config, [nml, "panel_edge_treatment"], panel_edge_treatment - ) - - return config, self.reports - - -class vn22_t797(MacroUpgrade): - """Upgrade macro for ticket #797 by Charlotte Norris.""" - - BEFORE_TAG = "vn2.2_t36" - AFTER_TAG = "vn2.2_t797" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add fastjx_numwavel, fjx_solcyc_type, fjx_scat_file, fjx_solar_file, - fastjx_dir, fjx_spec_file to namelist chemistry - """ - self.add_setting( - config, ["namelist:chemistry", "fastjx_numwavel"], "18" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.add_setting( - config, ["namelist:chemistry", "fjx_scat_file"], "'FJX_scat.dat'" - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_solar_file"], - "'FJX_solcyc_May17.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fjx_spec_file"], - "'FJX_spec_Nov11.dat'", - ) - self.add_setting( - config, - ["namelist:chemistry", "fastjx_dir"], - "'$UMDIR/vn13.9/ctldata/UKCA/fastj'", - ) - - return config, self.reports - - -class vn22_t995(MacroUpgrade): - """Upgrade macro for ticket None by None.""" - - BEFORE_TAG = "vn2.2_t797" - AFTER_TAG = "vn2.2_t995" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - self.add_setting(config, ["namelist:mixing", "smag_l_calc"], "'UseDx'") - - return config, self.reports - - -class vn22_t202(MacroUpgrade): - """Upgrade macro for ticket #202 by Katty Huang.""" - - BEFORE_TAG = "vn2.2_t995" - AFTER_TAG = "vn2.2_t202" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_mean"], "20.0" - ) - self.add_setting( - config, ["namelist:jules_surface", "anthrop_heat_option"], "'dukes'" - ) - - return config, self.reports - - -class vn22_t827(MacroUpgrade): - """Upgrade macro for ticket #827 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t202" - AFTER_TAG = "vn2.2_t827" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Adds the "theta_moist_source" variable to the formulation namelist, - which controls the option to add the missing term to the potential - temperature equation, relating to the different heat capacities of moist - phases. This is set to be trig-ignored when moisture settings are not - 'traditional'. In both cases the default value is .false. - """ - nml = "namelist:formulation" - moisture = self.get_setting_value(config, [nml, "moisture_formulation"]) - default_setting = ".false." - if moisture == "'traditional'": - self.add_setting( - config, [nml, "theta_moist_source"], default_setting - ) - else: - # Trig-ignored as moisture not being used - self.add_setting( - config, [nml, "!!theta_moist_source"], default_setting - ) - - return config, self.reports - - -class vn22_t938(MacroUpgrade): - """Upgrade macro for ticket #938 by Jon Elsey.""" - - BEFORE_TAG = "vn2.2_t827" - AFTER_TAG = "vn2.2_t938" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-aerosol - # Add setting for ukca_mode_segment_size - self.add_setting( - config, ["namelist:aerosol", "ukca_mode_seg_size"], value="4" - ) - - return config, self.reports - - -class vn22_t903(MacroUpgrade): - """Upgrade macro for ticket #903 by James Kent.""" - - BEFORE_TAG = "vn2.2_t938" - AFTER_TAG = "vn2.2_t903" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add horizontal predictor options to formulation namelist - self.add_setting( - config, - ["namelist:formulation", "horizontal_physics_predictor"], - ".false.", - ) - self.add_setting( - config, - ["namelist:formulation", "horizontal_transport_predictor"], - ".false.", - ) - - return config, self.reports - - -class vn22_t1012(MacroUpgrade): - """Upgrade macro for ticket #1012 by Maggie Hendry.""" - - BEFORE_TAG = "vn2.2_t903" - AFTER_TAG = "vn2.2_t1012" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Blank upgrade macro to bump tag - - return config, self.reports - - -class vn22_t953(MacroUpgrade): - """Upgrade macro for ticket #593 by Thomas Bendall.""" - - BEFORE_TAG = "vn2.2_t1012" - AFTER_TAG = "vn2.2_t953" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """ - Add "wind_mono_top" and "wind_mono_top_depth" to the transport namelist. - The "wind_mono_top" option is set to false by default. - """ - num_layers = self.get_setting_value( - config, ["namelist:extrusion", "number_of_layers"] - ) - wind_mono_top = ".false." - # Add wind_mono_top setting - self.add_setting( - config, ["namelist:transport", "wind_mono_top"], wind_mono_top - ) - # Add wind_mono_top_depth setting - # If the number of layers is greater than 10, set the depth to 5 - # otherwise set it to 0 - if int(num_layers) > 10: - wind_mono_top_depth = "5" - else: - wind_mono_top_depth = "0" - self.add_setting( - config, - ["namelist:transport", "wind_mono_top_depth"], - wind_mono_top_depth, - ) - - return config, self.reports - - -class vn22_t4020(MacroUpgrade): - """Upgrade macro for ticket #4020 by Andrew Coughtrie.""" - - BEFORE_TAG = "vn2.2_t953" - AFTER_TAG = "vn2.2_t4020" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-driver - self.add_setting( - config, ["namelist:io", "end_of_run_checkpoint"], ".true." - ) - self.add_setting(config, ["namelist:io", "checkpoint_times"], "") - - return config, self.reports - - -class vn22_t618(MacroUpgrade): - """Upgrade macro for ticket #618 by Mohit Dalvi.""" - - BEFORE_TAG = "vn2.2_t4020" - AFTER_TAG = "vn2.2_t618" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/um-chemistry - """ - Add Photolysis scheme and FastJX namelist items to chemistry namelist. - Value of photol_scheme is based on chem_scheme choice. - Change the value of fastjx_dir to replace hardwired path with - link from central ctldata extract - """ - chem_scheme = self.get_setting_value( - config, ["namelist:chemistry", "chem_scheme"] - ) - if chem_scheme == "'strattrop'": - phot_scheme = "'fastjx'" - else: - phot_scheme = "'off'" # Default - self.add_setting( - config, ["namelist:chemistry", "photol_scheme"], phot_scheme - ) - self.add_setting( - config, ["namelist:chemistry", "chem_timestep"], "3600" - ) - self.add_setting(config, ["namelist:chemistry", "fastjx_mode"], "1") - self.add_setting( - config, ["namelist:chemistry", "fastjx_prescutoff"], "20.0" - ) - self.add_setting( - config, ["namelist:chemistry", "fjx_solcyc_months"], "0" - ) - self.add_setting(config, ["namelist:chemistry", "fjx_solcyc_type"], "0") - self.change_setting_value( - config, ["namelist:chemistry", "fastjx_dir"], "'fastj'" - ) - - return config, self.reports diff --git a/science/linear/rose-meta/lfric-linear/vn3.0/rose-meta.conf b/science/linear/rose-meta/lfric-linear/vn3.0/rose-meta.conf new file mode 100644 index 000000000..955f84080 --- /dev/null +++ b/science/linear/rose-meta/lfric-linear/vn3.0/rose-meta.conf @@ -0,0 +1,106 @@ +import=lfric-gungho/vn3.0 + +[namelist:linear] +compulsory=true +description=Provides extra information for the tangent linear model. +help= +ns=namelist/Linear/Initial +sort-key=Section-A07 +title=Linear + +[namelist:linear=fixed_ls] +compulsory=true +description=Do not update the linearisation state during the timestep. +help=The linearisation state is the same for every outer and inner loop. +!kind=default +type=logical + +[namelist:linear=l_stabilise_bl] +compulsory=true +description=?????? +help=If true then turn on boundary layer stabilisation in linear model +!kind=default +ns=namelist/Job/Timestepping/semi-implicit +type=logical + +[namelist:linear=ls_read_w2h] +compulsory=true +!default=kind +description=For the linearisation state, read winds on a W2h space + =from a file. +help=Horizontal winds are read in on a W2h space from the ls file. If + =false, then cell-centres (W3), co-located winds are assumed. +sort-key=Panel-A07a +type=logical + +[namelist:linear=max_bl_stabilisation] +compulsory=false +description=?????? +fail-if=this < 0.0 +help=Maximum boundary layer stabilisation scalar in linear model +!kind=default +ns=namelist/Job/Timestepping/semi-implicit +range=0.0: +type=real + +[namelist:linear=n_bl_levels_to_stabilise] +compulsory=false +description=?????? +fail-if=this < 1 ; +help=Number of boundary layers levels to stabilise in linear model +!kind=default +ns=namelist/Job/Timestepping/semi-implicit +range=1: +type=integer + +[namelist:linear=pert_option] +compulsory=true +description=Method to generate the perturbation. +!enumeration=true +help=This can be an analytical perturbation, random data or from a file. + =The analytical perturbation is based on the DCMIP gravity wave test. + =The random data is generated with the Fortran intrinsic function 'random_number'. + =The file contains data produced from LFRic with horizontal winds in W2. +ns=namelist/Linear/Initial +sort-key=Panel-A07a +value-titles=analytic, + =random, + =file, + =zero +values='analytic', 'random', 'file', 'zero' + +[namelist:validity_test] +compulsory=true +description=Provides settings for the tangent linear validity tests. +help=The validity tests are performed using the integration test framework. +ns=namelist/Linear/ValidityTest +sort-key=Section-A07 +title=Validity Tests + +[namelist:validity_test=number_gamma_values] +compulsory=true +description=The number of values of gamma to loop through. +fail-if=this <0 ; +help=Gamma is the size of the perturbation used in the validity test. + =For standard testing (i.e. through rose), the number of gamma values should be 2. + =But to create a graph of the relative error against gamma, then a value around 10 should be used. +!kind=default +ns=namelist/Linear/ValidityTest +range=0: +sort-key=Panel-A07b +type=integer + +[namelist:validity_test=update_ls_frequency] +compulsory=true +description=The frequency to update the linearisation state. +fail-if=this <0 ; +help=In the integration tests, when running over multiple timesteps, + = the linearisation state is produced by stepping the nonlinear model + = and then copying this output to the linearisation state. + = The update_frequency controls how often to copy the output to the + = linearisation state, e.g. every 3 timesteps. +!kind=default +ns=namelist/Linear/ValidityTest +range=0: +sort-key=Panel-A07c +type=integer