diff --git a/build/extract/extract.yaml b/build/extract/extract.yaml index f206bd3b88..de3782c300 100644 --- a/build/extract/extract.yaml +++ b/build/extract/extract.yaml @@ -114,6 +114,7 @@ ukca: - src/control/core/top_level/ukca_init.F90 - src/control/core/top_level/ukca_main1-ukca_main1.F90 - src/control/core/top_level/ukca_radaer_lfric_api_mod.F90 + - src/control/core/top_level/ukca_radaer_lfric_init_mod.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 @@ -356,6 +357,10 @@ ukca: - 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_lfric_list_mod.F90 + - src/science/radaer/ukca_radaer_lfric_saved_mod.F90 + - src/science/radaer/ukca_radaer_lfric_settings_mod.F90 + - src/science/radaer/ukca_radaer_lfric_struct_mod.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 diff --git a/dependencies.yaml b/dependencies.yaml index 3d597dc0e8..36b2fefd4f 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -50,5 +50,5 @@ socrates-spectral: ref: 2026.07.1 ukca: - source: git@github.com:MetOffice/ukca.git - ref: 9fc2b6da8701f4904911b561a2738e3f16c4e501 + source: git@github.com:alanjhewitt/ukca.git + ref: radaer_api_ukca_side_5 diff --git a/documentation/source/science_guide/radaer/index.rst b/documentation/source/science_guide/radaer/index.rst new file mode 100644 index 0000000000..603b821ae5 --- /dev/null +++ b/documentation/source/science_guide/radaer/index.rst @@ -0,0 +1,26 @@ +.. ----------------------------------------------------------------------------- + (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. + ----------------------------------------------------------------------------- +.. _radaer_api_index: + +Summary of RADAER +================================ + +RADAER is a package of software within the UKCA repository that is called +independently of the rest of UKCA. Functionally, it sits in slow physics and +deals with the interactions between aerosols and SOCRATES (radiation) and is +called prior to the SOCRATES radiation code. + +RADAER gets called directly from its parent applications (for example in +LFRic_apps via radaer_kernel_mod). + + + + +.. toctree:: + :maxdepth: 1 + :glob: + + * diff --git a/documentation/source/science_guide/radaer/radaer_api.rst b/documentation/source/science_guide/radaer/radaer_api.rst new file mode 100644 index 0000000000..16bb6b7f30 --- /dev/null +++ b/documentation/source/science_guide/radaer/radaer_api.rst @@ -0,0 +1,34 @@ +.. ----------------------------------------------------------------------------- + (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. + ----------------------------------------------------------------------------- + +========== +RADAER API +========== + +:Author: Alan J Hewitt + +Description of RADAER API +========================= + +Radaer will be available to the parent application via a single API module as +a minimal set of top_level subroutines. These will include an initialisation +function to correctly set up radaer for the user inputs and a runtime module. + +Names of subroutines presented via the API will start ```ukca_radaer_``` + +All run time communication between the parent model and UKCA will be via +argument lists. + +All RADAER state variables will be available to the parent model between +time steps as native FORTRAN arrays, for inspection and possible modification. +The fields in these arrays will be in a specific order and size, which will +differ depending on user configuration. The lists of fields will be determined +by field names retrieved by the parent at run time. + +The RADAER interface was designed to be very lean. No significant further +developments are intended for radaer. There is scope to revisit the lean +interface in future, if significant developments are required. However, +replacing RADAER with a different package is more likely to happen in future. diff --git a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/HEAD/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/HEAD/rose-meta.conf index c49280c8a5..70381bad5a 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/HEAD/rose-meta.conf +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/HEAD/rose-meta.conf @@ -120,7 +120,7 @@ help=Which emissions options to use =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 +sort-key=Panel-A04 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'; @@ -187,6 +187,7 @@ trigger=namelist:aerosol=activation_scheme: 'climatology','dust_and_clim' ; =namelist:aerosol=ukca_scale_marine_pom_ems: 'ukca' ; =namelist:aerosol=ukca_scale_sea_salt_ems: 'ukca' ; =namelist:aerosol=horiz_d: 'ukca','dust_and_clim'; + =namelist:aerosol=mode_setup: 'ukca'; =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' @@ -200,6 +201,50 @@ range=0:99.9 sort-key=Panel-F01 type=real +[namelist:aerosol=mode_setup] +compulsory=true +description=Set GLOMAP Aerosol Components and Modes +!enumeration=true +help=The GLOMAP aerosol scheme is currently available in the configurations + =described below: + = + =DUonly_2mode (previously option (6) in the UM) + = Dust (DU) in insoluble accumulation and insoluble coarse mode. + = This is sometimes labelled as DUonly_2mode + = + =SUBCOCSSDU_7mode (previously option (8) in the UM) + = Sulphate (SU) Black Carbon (BC) Organic Carbon (OC) Sea Salt (SS) + = Dust (DU) components in 4 soluble modes and 3 insoluble modes. + = This is sometimes labelled SUBCOCSSDU_7mode . + = + =Coming soon SUBCOCSSDUNH_7mode ( previously option (12) ) for UKESM2. + = + =Coming soon SolInsol. + = + =mode_setup is not triggered by glomap_mode_climatology . + =glomap_mode_climatology is hard coded to (8) SUBCOCSSDU_7mode . + = + =Setting glomap_mode_dust_and_clim calls UKCA with (6) dust only. The + =dust prognostic fields are combined with climatology aerosol fields from + =other components (SU, BC, OC, SS). CDNC and RADAER outputs are then + =calculated with GLOMAP setting (8) SUBCOCSSDU_7mode . + =glomap_mode_dust_and_clim is used for operational NWP which requires dust + =prognostic fields for visibility and everything else needs to be fast. +sort-key=Panel-A03 +trigger=namelist:aerosol=l_dust_mp_ageing: 'SUBCOCSSDU_7mode' ; +value-titles=DUonly_2mode,SUBCOCSSDU_7mode +values='DUonly_2mode','SUBCOCSSDU_7mode' + +[namelist:aerosol=l_dust_mp_ageing] +compulsory=true +description=Turn on ageing, nucleation scavenging, coagulation, + =activation, and hetero chemistry for + =UKCA-mode dust and microplastics +#fail-if=this ==".true." and namelist:aerosol=mode_setup==6 +ns=namelist/Science/UM Aerosol +sort-key=Panel-A05 +type=logical + [namelist:aerosol=l_radaer] compulsory=true description=Direct effect of climatology aerosols in RADAER @@ -215,6 +260,17 @@ trigger=namelist:aerosol=aclw_file: .true. ; =namelist:aerosol=crsw_file: .true. ; =namelist:aerosol=prec_file: .true. ; =namelist:aerosol=n_radaer_step: .true. ; + =namelist:aerosol=l_ukca_radaer_sustrat: .true. ; +type=logical + +[namelist:aerosol=l_ukca_radaer_sustrat] +compulsory=true +description=Sulphuric acid aerosol in stratosphere +help=Direct effect of UKCA-MODE aerosols will assume sulphuric acid + =optical properties for sulphate aerosol in the stratosphere + =aerosol optical depth. +ns=namelist/Science/UM Aerosol +sort-key=Panel-B01a type=logical [namelist:aerosol=marine_pom_ems_scaling] @@ -223,7 +279,7 @@ description=Marine POM emission scale factor help=Scaling factor for marine particulate organic matter emission !kind=double range=0.0:10.0 -sort-key=Panel-A02b +sort-key=Panel-A04b type=real [namelist:aerosol=murk] @@ -314,7 +370,7 @@ description=Sea salt emission scale factor help=Scaling factor for sea salt emission !kind=double range=0.0:10.0 -sort-key=Panel-A02d +sort-key=Panel-A04d type=real [namelist:aerosol=sulphuric_strat_climatology] @@ -350,7 +406,7 @@ 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 +sort-key=Panel-A02 type=integer [namelist:aerosol=ukca_scale_marine_pom_ems] @@ -363,7 +419,7 @@ help=This logical activates the scaling factor marine_pom_ems_scaling. =it maybe be necessary to scale emissions to gain agreement across =resolutions. !kind=default -sort-key=Panel-A02a +sort-key=Panel-A04a trigger=namelist:aerosol=marine_pom_ems_scaling: .true. ; type=logical @@ -376,7 +432,7 @@ help=This logical activates the scaling factor sea_salt_ems_scaling. =generally stronger at higher resolutions. Hence it maybe be necessary =to scale emissions to gain agreement across resolutions. !kind=default -sort-key=Panel-A02c +sort-key=Panel-A04c trigger=namelist:aerosol=sea_salt_ems_scaling: .true. ; type=logical 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 01e65a2b91..94ee8927b8 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py @@ -18,16 +18,38 @@ def __repr__(self): __str__ = __repr__ -""" -Copy this template and complete to add your macro +class vn32_t698(MacroUpgrade): + """ + Upgrade macro for ticket #698 by Alan J Hewitt. -class vnXX_txxx(MacroUpgrade): - # Upgrade macro for by + Users can now select UKCA GLOMAP setting via namelist. + Note that dust_and_clim is treated by UKCA as if setting (6) + but is treated by RADAER as if setting (8). - BEFORE_TAG = "vnX.X" - AFTER_TAG = "vnX.X_txxx" + Users can now set dust ageing via the namelist. + + Users can now set radaer SUstrat via the namelist. + """ + + BEFORE_TAG = "vn3.2" + AFTER_TAG = "vn3.2_t698" def upgrade(self, config, meta_config=None): # Add settings + + # Add new settings with the default option SUBCOCSSDU_7mode + self.add_setting( config, + ["namelist:aerosol","mode_setup"], + "'SUBCOCSSDU_7mode'") + + # Default to false since this is the setting in all existing tests + self.add_setting( config, + ["namelist:aerosol", "l_dust_mp_ageing"], + ".false." ) + + # Default to true since this is the setting in all existing tests + self.add_setting( config, + ["namelist:aerosol", "l_ukca_radaer_sustrat"], + ".true." ) + return config, self.reports -""" diff --git a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/HEAD/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/HEAD/rose-meta.conf index 22d7661b72..26253b5ab8 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/HEAD/rose-meta.conf +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/HEAD/rose-meta.conf @@ -182,7 +182,7 @@ 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. + = 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. diff --git a/interfaces/physics_schemes_interface/source/kernel/radaer_kernel_mod.F90 b/interfaces/physics_schemes_interface/source/kernel/radaer_kernel_mod.F90 index 42b55e903f..b728bc73d2 100644 --- a/interfaces/physics_schemes_interface/source/kernel/radaer_kernel_mod.F90 +++ b/interfaces/physics_schemes_interface/source/kernel/radaer_kernel_mod.F90 @@ -355,7 +355,8 @@ subroutine radaer_code( nlayers, & use constants_mod, only: r_def, i_def, r_um, i_um - use aerosol_config_mod, only: n_radaer_step + use aerosol_config_mod, only: n_radaer_step, & + l_ukca_radaer_sustrat use socrates_init_mod, only: n_sw_band, & sw_n_band_exclude, & sw_index_exclude, & @@ -379,12 +380,6 @@ subroutine radaer_code( nlayers, & ip_ukca_mode_accum, & ip_ukca_mode_coarse - use ukca_radaer_band_average_mod, only: ukca_radaer_band_average - - use ukca_radaer_prepare_mod, only: ukca_radaer_prepare - - use ukca_radaer_compute_aod_mod, only: ukca_radaer_compute_aod - use planet_config_mod, only: p_zero, kappa, gravity use ukca_radaer_precalc, only: npd_ukca_aod_wavel @@ -393,6 +388,24 @@ subroutine radaer_code( nlayers, & use ukca_radaer_lfric_api_mod, only: ukca_radaer_lfric_interface + use ukca_radaer_lfric_list_mod, only: max_fldname_len, & + pvol_comp_names, & + comp_names, & + mode_names, & + rhopar_mode_names, & + dry_diam_mode_names, & + modal_volume_names, & + ait_sol_volume_names, & + acc_sol_volume_names, & + cor_sol_volume_names, & + ait_ins_volume_names, & + acc_ins_volume_names, & + cor_ins_volume_names, & + modal_wtv_names, & + wet_diam_mode_names + + use ukca_radaer_lfric_init_mod, only: n_ukca_mode, n_ukca_cpnt + implicit none ! Arguments @@ -514,12 +527,6 @@ subroutine radaer_code( nlayers, & ! Local variables for the kernel - ! Note - n_ukca_mode excludes the GLOMAP nucleation mode - ! Since nucleation is the first mode in GLOMAP, the subsequent modes 2-7 - ! have been reordered in RADAER as modes 1-6 - integer(i_um), parameter :: n_ukca_mode = 6 - integer(i_um), parameter :: n_ukca_cpnt = 17 - integer(i_um) :: npd_exclude_lw integer(i_um) :: npd_exclude_sw logical, parameter :: l_exclude_sw = .true. @@ -611,126 +618,6 @@ subroutine radaer_code( nlayers, & !----------------------------------------------------------------------- - integer, parameter :: max_fldname_len = 40 - - character(len=max_fldname_len), parameter, dimension(17) :: & - pvol_comp_names = [ 'fldname_pvol_su_ait_sol' , & - 'fldname_pvol_bc_ait_sol' , & - 'fldname_pvol_om_ait_sol' , & - 'fldname_pvol_su_acc_sol' , & - 'fldname_pvol_bc_acc_sol' , & - 'fldname_pvol_om_acc_sol' , & - 'fldname_pvol_ss_acc_sol' , & - 'fldname_pvol_du_acc_sol' , & - 'fldname_pvol_su_cor_sol' , & - 'fldname_pvol_bc_cor_sol' , & - 'fldname_pvol_om_cor_sol' , & - 'fldname_pvol_ss_cor_sol' , & - 'fldname_pvol_du_cor_sol' , & - 'fldname_pvol_bc_ait_ins' , & - 'fldname_pvol_om_ait_ins' , & - 'fldname_pvol_du_acc_ins' , & - 'fldname_pvol_du_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(17) :: & - comp_names = [ 'fldname_ait_sol_su' , & - 'fldname_ait_sol_bc' , & - 'fldname_ait_sol_om' , & - 'fldname_acc_sol_su' , & - 'fldname_acc_sol_bc' , & - 'fldname_acc_sol_om' , & - 'fldname_acc_sol_ss' , & - 'fldname_acc_sol_du' , & - 'fldname_cor_sol_su' , & - 'fldname_cor_sol_bc' , & - 'fldname_cor_sol_om' , & - 'fldname_cor_sol_ss' , & - 'fldname_cor_sol_du' , & - 'fldname_ait_ins_bc' , & - 'fldname_ait_ins_om' , & - 'fldname_acc_ins_du' , & - 'fldname_cor_ins_du' ] - - character(len=max_fldname_len), parameter, dimension(6) :: & - mode_names = [ 'fldname_n_ait_sol' , & - 'fldname_n_acc_sol' , & - 'fldname_n_cor_sol' , & - 'fldname_n_ait_ins' , & - 'fldname_n_acc_ins' , & - 'fldname_n_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(6) :: & - rhopar_mode_names = [ 'fldname_rhopar_ait_sol' , & - 'fldname_rhopar_acc_sol' , & - 'fldname_rhopar_cor_sol' , & - 'fldname_rhopar_ait_ins' , & - 'fldname_rhopar_acc_ins' , & - 'fldname_rhopar_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(6) :: & - dry_diam_mode_names = [ 'fldname_drydp_ait_sol' , & - 'fldname_drydp_acc_sol' , & - 'fldname_drydp_cor_sol' , & - 'fldname_drydp_ait_ins' , & - 'fldname_drydp_acc_ins' , & - 'fldname_drydp_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(6) :: & - modal_volume_names = [ 'fldname_mod_vol_ait_sol' , & - 'fldname_mod_vol_acc_sol' , & - 'fldname_mod_vol_cor_sol' , & - 'fldname_mod_vol_ait_ins' , & - 'fldname_mod_vol_acc_ins' , & - 'fldname_mod_vol_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(4) :: & - ait_sol_volume_names = [ 'pvol_wat_ait_sol' , & - 'pvol_su_ait_sol ' , & - 'pvol_bc_ait_sol ' , & - 'pvol_om_ait_sol ' ] - - character(len=max_fldname_len), parameter,dimension(5) :: & - acc_sol_volume_names = [ 'pvol_wat_acc_sol' , & - 'pvol_su_acc_sol ' , & - 'pvol_bc_acc_sol ' , & - 'pvol_om_acc_sol ' , & - 'pvol_ss_acc_sol ' ] - - character(len=max_fldname_len), parameter,dimension(5) :: & - cor_sol_volume_names = [ 'pvol_wat_cor_sol' , & - 'pvol_su_cor_sol ' , & - 'pvol_bc_cor_sol ' , & - 'pvol_om_cor_sol ' , & - 'pvol_ss_cor_sol ' ] - - character(len=max_fldname_len), parameter,dimension(2) :: & - ait_ins_volume_names = [ 'pvol_bc_ait_ins' , & - 'pvol_om_ait_ins' ] - - character(len=max_fldname_len), parameter, dimension(1) :: & - acc_ins_volume_names = [ 'pvol_du_acc_ins' ] - - character(len=max_fldname_len), parameter, dimension(1) :: & - cor_ins_volume_names = [ 'pvol_du_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(6) :: & - modal_wtv_names = [ 'fldname_pvol_wat_ait_sol' , & - 'fldname_pvol_wat_acc_sol' , & - 'fldname_pvol_wat_cor_sol' , & - 'fldname_pvol_wat_ait_ins' , & - 'fldname_pvol_wat_acc_ins' , & - 'fldname_pvol_wat_cor_ins' ] - - character(len=max_fldname_len), parameter, dimension(6) :: & - wet_diam_mode_names = [ 'fldname_wetdp_ait_sol' , & - 'fldname_wetdp_acc_sol' , & - 'fldname_wetdp_cor_sol' , & - 'fldname_wetdp_ait_ins' , & - 'fldname_wetdp_acc_ins' , & - 'fldname_wetdp_cor_ins' ] - - !----------------------------------------------------------------------- - ncp_max_x_nmodes = ncp_max * nmodes npd_exclude_lw = SIZE( lw_index_exclude, 1 ) @@ -1490,6 +1377,8 @@ subroutine radaer_code( nlayers, & ukca_modal_wtv, & ! Logical to describe orientation l_inverted, & + ! Logical to account for optical properties of sulphate in atmosphere + l_ukca_radaer_sustrat, & ! Control option for prescribed single scattering albedo array i_ukca_radaer_prescribe_ssa, & ! Model level of the tropopause (input) diff --git a/interfaces/physics_schemes_interface/source/support/radaer_init_mod.f90 b/interfaces/physics_schemes_interface/source/support/radaer_init_mod.f90 new file mode 100644 index 0000000000..09ea68c0f0 --- /dev/null +++ b/interfaces/physics_schemes_interface/source/support/radaer_init_mod.f90 @@ -0,0 +1,150 @@ +!---------------------------------------------------------------------------- +! (c) Crown copyright Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!---------------------------------------------------------------------------- +!> @brief RADAER initialisation subroutine for science configuration + +module um_radaer_init_mod + + ! LFRic namelists which have been read + use aerosol_config_mod, only: glomap_mode, & + glomap_mode_climatology, & + glomap_mode_dust_and_clim, & + glomap_mode_off, & + glomap_mode_radaer_test, & + glomap_mode_ukca, & + mode_setup, & + mode_setup_SUBCOCSSDU_7mode, & + mode_setup_DUonly_2mode, & + l_dust_mp_ageing, & + l_ukca_radaer_sustrat + + use ukca_api_mod, only: ukca_i_sussbcocdu_7mode, & + ukca_i_du_2mode, & + ukca_i_ukca_bc_tuned, & + ukca_i_ukca_tune_bc_off + + use constants_mod, only: i_um + + use ukca_radaer_lfric_init_mod, only: ukca_radaer_lfric_init + + use log_mod, only: log_event, & + log_scratch_space, & + LOG_LEVEL_ERROR + + implicit none + + private + public :: um_radaer_init + +contains + +subroutine um_radaer_init() + + implicit none + + ! Some options have a different value of mode_setup + ! between ukca and radaer. + ! For example, we use prognostic dust (6) with other aerosol components (8) + ! in operational NWP. + integer(i_um) :: i_mode_setup_radaer_local + + integer(i_um) :: i_ukca_tune_bc_local + + logical :: l_dust_mp_ageing_local + + logical :: l_ukca_radaer_sustrat_local + + if ( glomap_mode == glomap_mode_climatology ) then + ! mode_setup is not set in the namelist for glomap_mode_climatology + ! this is always fixed to ukca_i_sussbcocdu_7mode. + i_mode_setup_radaer_local = ukca_i_sussbcocdu_7mode + + ! Tune BC turned off + i_ukca_tune_bc_local = ukca_i_ukca_tune_bc_off + + ! Dust ageing turned off + l_dust_mp_ageing_local = .false. + + ! sustrat turned on + l_ukca_radaer_sustrat_local = .true. + + call ukca_radaer_lfric_init( i_mode_setup_radaer_local, & + i_ukca_tune_bc_local, & + l_dust_mp_ageing_local, & + l_ukca_radaer_sustrat_local ) + + else if ( glomap_mode == glomap_mode_dust_and_clim ) then + ! dust_and_clim runs with a diffent mode_setup between ukca and radaer + ! this is always fixed to ukca_i_sussbcocdu_7mode. + i_mode_setup_radaer_local = ukca_i_sussbcocdu_7mode + + ! Tune BC turned off + i_ukca_tune_bc_local = ukca_i_ukca_tune_bc_off + + ! Dust ageing not allowed for dust only ukca + l_dust_mp_ageing_local = .false. + + ! sustrat turned on + l_ukca_radaer_sustrat_local = .true. + + call ukca_radaer_lfric_init( i_mode_setup_radaer_local, & + i_ukca_tune_bc_local, & + l_dust_mp_ageing_local, & + l_ukca_radaer_sustrat_local ) + + else if ( glomap_mode == glomap_mode_radaer_test ) then + ! This was developed for aqua planet runs and may be redundant + ! For now fix this to ukca_i_sussbcocdu_7mode. + i_mode_setup_radaer_local = ukca_i_sussbcocdu_7mode + + ! Tune BC turned off + i_ukca_tune_bc_local = ukca_i_ukca_tune_bc_off + + ! Dust ageing turned off + l_dust_mp_ageing_local = .false. + + ! sustrat turned on + l_ukca_radaer_sustrat_local = .true. + + call ukca_radaer_lfric_init( i_mode_setup_radaer_local, & + i_ukca_tune_bc_local, & + l_dust_mp_ageing_local, & + l_ukca_radaer_sustrat_local ) + + else if ( glomap_mode == glomap_mode_ukca ) then + ! UKCA and RADAER will use the same value for mode_setup + + ! Match rose-meta integers with those used in UKCA + select case ( mode_setup ) + case ( mode_setup_SUBCOCSSDU_7mode ) + i_mode_setup_radaer_local = ukca_i_sussbcocdu_7mode + case ( mode_setup_DUonly_2mode ) + i_mode_setup_radaer_local = ukca_i_du_2mode + case default + write( log_scratch_space, '(A,I0)' ) & + 'Developers should include additional mode settings here: ', mode_setup + call log_event( log_scratch_space, LOG_LEVEL_ERROR ) + end select + + ! UKCA currently set to ukca_i_ukca_bc_tuned + i_ukca_tune_bc_local = ukca_i_ukca_bc_tuned + + ! Dust ageing set by namelist + l_dust_mp_ageing_local = l_dust_mp_ageing + + ! sustrat set by namelist + l_ukca_radaer_sustrat_local = l_ukca_radaer_sustrat + + call ukca_radaer_lfric_init( i_mode_setup_radaer_local, & + i_ukca_tune_bc_local, & + l_dust_mp_ageing_local, & + l_ukca_radaer_sustrat_local ) + + end if + +end subroutine um_radaer_init + +end module um_radaer_init_mod + diff --git a/interfaces/physics_schemes_interface/source/support/um_ukca_init_mod.f90 b/interfaces/physics_schemes_interface/source/support/um_ukca_init_mod.f90 index f233d3085b..d942f543e6 100644 --- a/interfaces/physics_schemes_interface/source/support/um_ukca_init_mod.f90 +++ b/interfaces/physics_schemes_interface/source/support/um_ukca_init_mod.f90 @@ -11,12 +11,19 @@ module um_ukca_init_mod use aerosol_config_mod, only: glomap_mode, & glomap_mode_ukca, & glomap_mode_dust_and_clim, & - emissions, emissions_GC3, emissions_GC5,& - easyaerosol_cdnc, ukca_mode_seg_size, & + emissions, & + emissions_GC3, & + emissions_GC5, & + easyaerosol_cdnc, & + ukca_mode_seg_size, & ukca_scale_marine_pom_ems, & marine_pom_ems_scaling, & ukca_scale_sea_salt_ems, & - sea_salt_ems_scaling + sea_salt_ems_scaling, & + mode_setup, & + mode_setup_SUBCOCSSDU_7mode, & + mode_setup_DUonly_2mode, & + l_dust_mp_ageing use section_choice_config_mod, only: aerosol, aerosol_um use chemistry_config_mod, only: chem_scheme, chem_scheme_offline_ox, & chem_scheme_strattrop, chem_scheme_none,& @@ -34,7 +41,8 @@ module um_ukca_init_mod top_bdy_opt_overwrt_only_top_lev, & top_bdy_opt_overwrt_co_no_o3_top, & top_bdy_opt_overwrt_co_no_o3_h2o_top, & - ! Variables related to initialisation of photolysis + ! Variables related to initialisation of + ! photolysis photol_scheme, photol_scheme_off, & photol_scheme_fastjx, & photol_scheme_prescribed, fastjx_mode, & @@ -92,7 +100,9 @@ module um_ukca_init_mod ukca_maxlen_emiss_vert_fact, & ukca_strat_lbc_env, & ukca_get_photol_reaction_data, & - ukca_photol_varname_len + ukca_photol_varname_len, & + ukca_i_sussbcocdu_7mode, & + ukca_i_du_2mode ! Photolysis module use photol_api_mod, only: photol_jlabel_len, photol_fieldname_len, & @@ -651,6 +661,9 @@ module um_ukca_init_mod integer, save, public :: n_phot_flds_req ! Num of photol driving fields + ! Pass setting of mode_setup to UKCA + integer(i_um) :: i_mode_setup_local + contains subroutine um_ukca_init(ncells_ukca, model_clock) @@ -900,7 +913,7 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, & case ( top_bdy_opt_overwrt_co_no_o3_h2o_top ) i_ukca_top_boundary_opt = i_overwrt_co_no_o3_h2o_top case default - call log_event('Unknown option - UKCA tracer top boundary handling', & + call log_event('Unknown option - UKCA tracer top boundary handling',& LOG_LEVEL_ERROR) end select @@ -911,9 +924,23 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, & call log_event('No Chemical scheme chosen for UKCA', LOG_LEVEL_INFO) return end if + if (aerosol == aerosol_um .and. glomap_mode == glomap_mode_ukca) then + l_ukca_chem_aero = .true. l_ukca_mode = .true. + + select case( mode_setup ) + case ( mode_setup_SUBCOCSSDU_7mode ) + i_mode_setup_local = ukca_i_sussbcocdu_7mode + case ( mode_setup_DUonly_2mode ) + i_mode_setup_local = ukca_i_du_2mode + case default + write( log_scratch_space, '(A,I0)' ) & + 'This Glomap option is not supported yet. Include it here ', mode_setup + call log_event( log_scratch_space, LOG_LEVEL_ERROR ) + end select + end if ! If the Easy Aerosol climatology is being used to set CDNC values @@ -1022,7 +1049,7 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, & i_photol_scheme_fastjx = photol_fastjx, & ! General GLOMAP configuration options i_mode_nzts=15, & - i_mode_setup=8, & + i_mode_setup=i_mode_setup_local, & l_mode_bhn_on=.true., & l_mode_bln_on=.false., & i_mode_nucscav=i_mode_nucscav, & @@ -1031,7 +1058,7 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, & ukca_mode_seg_size=i_ukca_mode_seg_size, & l_cv_rainout=.not.(l_ukca_plume_scav), & l_dust_mp_slinn_impc_scav=.true., & - l_dust_mp_ageing=.false., & + l_dust_mp_ageing=l_dust_mp_ageing, & ! GLOMAP emissions configuration options l_ukca_primsu=.true., & l_ukca_primss=.true., & @@ -1863,7 +1890,8 @@ subroutine aerosol_ukca_dust_only_init( row_length, rows, model_levels, & ! i_mode_nzts=15, & ukca_mode_seg_size=i_ukca_mode_seg_size, & - i_mode_setup=6, & + ! i_mode_setup hard coded to ukca_i_du_2mode (6) for dust_and_clim + i_mode_setup=ukca_i_du_2mode, & i_mode_nucscav=i_mode_nucscav, & l_cv_rainout=.not.(l_ukca_plume_scav), & l_dust_mp_slinn_impc_scav=.true., & @@ -1972,16 +2000,12 @@ subroutine aerosol_ukca_dust_only_init( row_length, rows, model_levels, & select case( emiss_names(i) ) case('DMS') long_name = 'DMS emissions expressed as sulfur' - case('Monoterp') long_name = 'Monoterpene surf emissions expressed as carbon' - case('SO2_low') long_name = 'SO2 low level emissions expressed as sulfur' - case('SO2_high') long_name = 'SO2 high level emissions expressed as sulfur' - end select if (emiss_names(i) == 'SO2_high') then @@ -2141,5 +2165,4 @@ subroutine deallocate_fastjx_filevars() return end subroutine deallocate_fastjx_filevars - end module um_ukca_init_mod diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index 1aef30df73..f1d16abde5 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -111,6 +111,7 @@ module gungho_model_mod use um_domain_init_mod, only : um_domain_init use um_sizes_init_mod, only : um_sizes_init use um_physics_init_mod, only : um_physics_init + use um_radaer_init_mod, only : um_radaer_init use um_radaer_lut_init_mod, only : um_radaer_lut_init use um_ukca_init_mod, only : um_ukca_init use jules_timestep_alg_mod, only : jules_timestep_type @@ -444,6 +445,7 @@ subroutine basic_initialisations(mesh,model_clock,config) radiation_socrates, & surface, & surface_jules + use aerosol_config_mod, only: l_radaer #endif use config_mod, only: config_type @@ -484,9 +486,6 @@ subroutine basic_initialisations(mesh,model_clock,config) ! Initialisation of UM physics variables call um_physics_init() - ! Read all the radaer lut namelist files - call um_radaer_lut_init() - ! Initialisation of Jules high-level variables call jules_control_init() @@ -497,8 +496,20 @@ subroutine basic_initialisations(mesh,model_clock,config) ! Initialisation of UKCA physics variables call um_ukca_init(ncells_ukca, model_clock) + ! This is the way into the UKCA repo + + if ( l_radaer ) then + + ! Read all the radaer lut namelist files + call um_radaer_lut_init() + + ! Initialisation of UKCA RADAER variables + call um_radaer_init() + + end if end if + #endif end subroutine basic_initialisations